@cas-smartdesign/list 6.3.1 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/list.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ElementBase as h } from "@cas-smartdesign/element-base";
2
- import d, { generator as u } from "@cas-smartdesign/list-item";
2
+ import l, { generator as u } from "@cas-smartdesign/list-item";
3
3
  const f = `<style>
4
4
  :host {
5
5
  background-color: var(--sd-list-base-background-color, white);
@@ -34,7 +34,7 @@ const f = `<style>
34
34
  </div>
35
35
  `;
36
36
  let m = 0;
37
- const o = class o extends h {
37
+ const n = class n extends h {
38
38
  constructor() {
39
39
  super(), this._items = [], this._selectedIndexes = [], this._itemGenerator = u, this.onDefaultSlotChange = () => {
40
40
  let e = 0;
@@ -70,7 +70,7 @@ const o = class o extends h {
70
70
  break;
71
71
  }
72
72
  t && (e.preventDefault(), e.stopPropagation());
73
- }, this._fallbackId = o.ID + "_" + m++, this.addEventListener("pointerup", (e) => {
73
+ }, this._fallbackId = n.ID + "_" + m++, this.addEventListener("pointerup", (e) => {
74
74
  this.focusIndex = this.getListItems.indexOf(e.target), this.updateFocusedElement();
75
75
  }), this.addEventListener("focus", () => {
76
76
  this.matches(":focus-visible") && (this.focusIndex == -1 ? (this.selectedIndexes && (this.focusIndex = this.selectedIndexes[0]), this.focusIndex == -1 && this.childElementCount > 0 && (this.focusIndex = 0)) : this.updateFocusedElement());
@@ -129,7 +129,7 @@ const o = class o extends h {
129
129
  return ["focus-index", "focus-target"];
130
130
  }
131
131
  is() {
132
- return o.ID;
132
+ return n.ID;
133
133
  }
134
134
  template() {
135
135
  const e = document.createElement("template");
@@ -154,8 +154,7 @@ const o = class o extends h {
154
154
  if (e === "focus-index") {
155
155
  const i = this.getListItem(t);
156
156
  i && i.removeAttribute("focused"), this.updateFocusedElement();
157
- } else
158
- e === "focus-target" && (this.focusTarget ? this.updateFocusedElement() : document.activeElement != this && this.removeFocusedItemAttributes());
157
+ } else e === "focus-target" && (this.focusTarget ? this.updateFocusedElement() : document.activeElement != this && this.removeFocusedItemAttributes());
159
158
  }
160
159
  increaseWidthIfNeeded() {
161
160
  window.requestAnimationFrame(() => {
@@ -166,15 +165,15 @@ const o = class o extends h {
166
165
  if (e == 0 || i.endsWith("px") && s < Number.parseInt(i))
167
166
  this.enableLineClampOnItemsIfNeeded();
168
167
  else {
169
- const n = [...this.querySelectorAll("[slot='items']")].map((r) => {
170
- if (r instanceof d) {
168
+ const o = [...this.querySelectorAll("[slot='items']")].map((r) => {
169
+ if (r instanceof l) {
171
170
  r.enableLineClamp = !1;
172
171
  const a = r.missingWidthForTexts;
173
172
  return a > e && (r.enableLineClamp = !0), a;
174
173
  }
175
- }), l = Math.max(...n);
176
- if (l > 0) {
177
- const r = s + l;
174
+ }), c = Math.max(...o);
175
+ if (c > 0) {
176
+ const r = s + c;
178
177
  this.style.width = `${r}px`, this.offsetWidth < r && this.enableLineClampOnItemsIfNeeded();
179
178
  }
180
179
  }
@@ -182,7 +181,7 @@ const o = class o extends h {
182
181
  }
183
182
  enableLineClampOnItemsIfNeeded() {
184
183
  this.querySelectorAll("[slot='items']").forEach((e) => {
185
- e instanceof d && (e.enableLineClamp = e.enableLineClamp || e.missingWidthForTexts > 0);
184
+ e instanceof l && (e.enableLineClamp = e.enableLineClamp || e.missingWidthForTexts > 0);
186
185
  });
187
186
  }
188
187
  render() {
@@ -194,8 +193,8 @@ const o = class o extends h {
194
193
  const e = document.createDocumentFragment();
195
194
  let t = 0;
196
195
  this.items.forEach((s, i) => {
197
- const n = this.itemGenerator(s, i);
198
- this.isSeparator(n) || this.initListItem(n, t++), n.slot = "items", e.appendChild(n);
196
+ const o = this.itemGenerator(s, i);
197
+ this.isSeparator(o) || this.initListItem(o, t++), o.slot = "items", e.appendChild(o);
199
198
  }), this.appendChild(e), this.updateFocusedElement();
200
199
  }
201
200
  initListItem(e, t) {
@@ -222,15 +221,15 @@ const o = class o extends h {
222
221
  }
223
222
  }
224
223
  handleSelection(e, t) {
225
- const s = this.items[e];
226
- if (!s || s.disabled)
224
+ const s = this.getListItem(e);
225
+ if (s.getAttribute("aria-disabled") == "true" || s.hasAttribute("disabled"))
227
226
  return;
228
- const i = this.getListItem(e), n = this.isSelected(i);
229
- this.selectionType !== "trigger-only" && (this.selectionType === "single" ? this.selectedIndexes = n ? [] : [e] : this.toggleSelection(i) ? this._selectedIndexes.push(e) : this.removeFromSelectedIndexes(e)), this.focusIndex = e, this.dispatchEvent(
227
+ const i = this.isSelected(s);
228
+ this.selectionType !== "trigger-only" && (this.selectionType === "single" ? this.selectedIndexes = i ? [] : [e] : this.toggleSelection(s) ? this._selectedIndexes.push(e) : this.removeFromSelectedIndexes(e)), this.focusIndex = e, this.dispatchEvent(
230
229
  new CustomEvent("selection", {
231
230
  detail: {
232
231
  index: e,
233
- selected: this.selectionType == "trigger-only" || !n,
232
+ selected: this.selectionType == "trigger-only" || !i,
234
233
  hasModifier: t
235
234
  },
236
235
  bubbles: !0,
@@ -253,12 +252,12 @@ const o = class o extends h {
253
252
  return e.hasAttribute("selected");
254
253
  }
255
254
  };
256
- o.ID = "sd-list", o.ensureDefined = () => {
257
- d.ensureDefined(), customElements.get(o.ID) || customElements.define(o.ID, o);
255
+ n.ID = "sd-list", n.ensureDefined = () => {
256
+ l.ensureDefined(), customElements.get(n.ID) || customElements.define(n.ID, n);
258
257
  };
259
- let c = o;
260
- c.ensureDefined();
258
+ let d = n;
259
+ d.ensureDefined();
261
260
  export {
262
- c as default
261
+ d as default
263
262
  };
264
263
  //# sourceMappingURL=list.mjs.map
package/dist/list.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"list.mjs","sources":["../list.html?raw","../list.ts"],"sourcesContent":["export default \"<style>\\n\\t:host {\\n\\t\\tbackground-color: var(--sd-list-base-background-color, white);\\n\\t}\\n\\n\\t.container {\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t}\\n\\n\\t:host(:focus) {\\n\\t\\toutline: none;\\n\\t}\\n\\n\\t:host(:focus-visible) ::slotted([focused]) {\\n\\t\\tbox-shadow: 0 0 0 1px #1467ba inset;\\n\\t}\\n\\n\\t.container ::slotted(*) {\\n\\t\\tdisplay: block;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\n\\t.container ::slotted(:not(:last-of-type)) {\\n\\t\\tborder-bottom: 1px solid #d9d9d9;\\n\\t}\\n</style>\\n\\n<div class=\\\"container\\\">\\n\\t<slot name=\\\"items\\\"></slot>\\n\\t<slot id=\\\"default-slot\\\"></slot>\\n</div>\\n\"","import { ElementBase, CustomEventMap as BaseCustomEventMap } from \"@cas-smartdesign/element-base\";\nimport ListItem, { generator } from \"@cas-smartdesign/list-item\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [List.ID]: List;\n }\n}\n\nimport { default as htmlTemplate } from \"./list.html?raw\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ItemGenerator = (data: any, index: number) => HTMLElement;\nexport type SelectionType = \"trigger-only\" | \"single\" | \"multi\";\n\nlet idCounter = 0;\n\nexport type ISelectionEvent = {\n index: number;\n selected: boolean;\n hasModifier: boolean;\n};\n\nexport interface CustomEventMap extends BaseCustomEventMap {\n selection: CustomEvent<ISelectionEvent>;\n}\n\nexport default interface List {\n addEventListener<K extends keyof CustomEventMap>(\n event: K,\n listener: ((this: this, ev: CustomEventMap[K]) => unknown) | null,\n options?: AddEventListenerOptions | boolean,\n ): void;\n addEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: AddEventListenerOptions | boolean,\n ): void;\n removeEventListener<K extends keyof CustomEventMap>(\n type: K,\n listener: (this: this, ev: CustomEventMap[K]) => unknown,\n options?: boolean | EventListenerOptions,\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): void;\n dispatchEvent<EventType extends CustomEventMap[keyof CustomEventMap]>(event: EventType): boolean;\n}\n\nexport default class List extends ElementBase {\n public static readonly ID = \"sd-list\";\n public static ensureDefined = (): void => {\n ListItem.ensureDefined();\n if (!customElements.get(List.ID)) {\n customElements.define(List.ID, List);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _items: any[] = [];\n private _selectedIndexes: number[] = [];\n private _itemGenerator: ItemGenerator = generator;\n private _fallbackId: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public get items(): any[] {\n return this._items;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public set items(value: any[]) {\n this._items = value;\n this.render();\n }\n\n public get itemGenerator(): ItemGenerator {\n return this._itemGenerator;\n }\n\n public set itemGenerator(value: ItemGenerator) {\n this._itemGenerator = value;\n this.render();\n }\n\n public get selectionType(): SelectionType {\n return this.getAttribute(\"selection-type\") as SelectionType;\n }\n\n public set selectionType(type: SelectionType) {\n if (type) {\n this.setAttribute(\"selection-type\", type);\n } else {\n this.removeAttribute(\"selection-type\");\n }\n }\n\n public get focusIndex(): number {\n return this.hasAttribute(\"focus-index\") ? Number(this.getAttribute(\"focus-index\")) : -1;\n }\n\n public set focusIndex(index: number) {\n if (0 <= index && index < this.getListItems.length) {\n this.setAttribute(\"focus-index\", index.toString());\n } else {\n this.removeAttribute(\"focus-index\");\n }\n }\n\n public get focusTarget(): boolean {\n return this.hasAttribute(\"focus-target\");\n }\n\n public set focusTarget(value: boolean) {\n this.toggleAttribute(\"focus-target\", value);\n }\n\n public getListItem(index: number): HTMLElement | null {\n if (this.shadowRoot) {\n return this.getListItems[index];\n }\n return null;\n }\n\n public get getListItems(): Array<HTMLElement> {\n return Array.prototype.slice.call(this.children).filter((child) => !this.isSeparator(child));\n }\n\n public get selectedIndexes(): number[] {\n return this._selectedIndexes;\n }\n\n public set selectedIndexes(indexes: number[]) {\n const prevIndexes = this._selectedIndexes || [];\n this._selectedIndexes = indexes || [];\n prevIndexes\n .filter((index) => !this._selectedIndexes.includes(index))\n .forEach((index) => {\n this.setSelectedAttr(this.getListItem(index), false);\n });\n this._selectedIndexes\n .filter((index) => !prevIndexes.includes(index))\n .forEach((index) => {\n this.setSelectedAttr(this.getListItem(index), true);\n });\n }\n\n static get observedAttributes(): string[] {\n return [\"focus-index\", \"focus-target\"];\n }\n\n is(): string {\n return List.ID;\n }\n\n protected template(): HTMLTemplateElement {\n const template = document.createElement(\"template\");\n template.innerHTML = htmlTemplate;\n return template;\n }\n\n constructor() {\n super();\n this._fallbackId = List.ID + \"_\" + idCounter++;\n this.addEventListener(\"pointerup\", (event) => {\n this.focusIndex = this.getListItems.indexOf(event.target as HTMLElement);\n this.updateFocusedElement();\n });\n this.addEventListener(\"focus\", () => {\n if (this.matches(\":focus-visible\")) {\n if (this.focusIndex == -1) {\n if (this.selectedIndexes) {\n this.focusIndex = this.selectedIndexes[0];\n }\n if (this.focusIndex == -1 && this.childElementCount > 0) {\n this.focusIndex = 0;\n }\n } else {\n this.updateFocusedElement();\n }\n }\n });\n this.addEventListener(\"blur\", () => this.removeFocusedItemAttributes());\n }\n\n private removeFocusedItemAttributes() {\n if (this.focusIndex != -1) {\n const focusedElement = this.getListItem(this.focusIndex);\n if (focusedElement) {\n focusedElement.removeAttribute(\"focused\");\n this.removeAttribute(\"aria-activedescendant\");\n }\n }\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n this.defaultSlot.addEventListener(\"slotchange\", this.onDefaultSlotChange);\n if (!this.hasAttribute(\"role\")) {\n this.setAttribute(\"role\", \"listbox\");\n }\n if (!this.id) {\n this.id = this._fallbackId;\n }\n\n this.render();\n this.addEventListener(\"keydown\", this.handleKeyDown);\n\n if (!this.selectionType) {\n this.selectionType = \"trigger-only\";\n }\n }\n\n private onDefaultSlotChange = () => {\n let index = 0;\n this.defaultSlot.assignedElements().forEach((item: HTMLElement) => {\n if (!this.isSeparator(item)) {\n this.initListItem(item, index++);\n }\n });\n this.updateFocusedElement();\n };\n\n private get defaultSlot(): HTMLSlotElement {\n return this.shadowRoot.querySelector(\"#default-slot\");\n }\n\n private isSeparator(element: Element): boolean {\n return \"HR\" == element.tagName || element.getAttribute(\"role\") == \"separator\";\n }\n\n public attributeChangedCallback(name: string, oldValue: unknown, _newValue: unknown): void {\n if (name === \"focus-index\") {\n const lastFocusedElement = this.getListItem(oldValue as number);\n if (lastFocusedElement) {\n lastFocusedElement.removeAttribute(\"focused\");\n }\n this.updateFocusedElement();\n } else if (name === \"focus-target\") {\n if (this.focusTarget) {\n this.updateFocusedElement();\n } else if (document.activeElement != this) {\n this.removeFocusedItemAttributes();\n }\n }\n }\n\n public increaseWidthIfNeeded() {\n window.requestAnimationFrame(() => {\n let remainingWidth = Number.MAX_SAFE_INTEGER;\n const maxWidth = getComputedStyle(this).maxWidth;\n const offsetWidth = this.offsetWidth;\n if (maxWidth.endsWith(\"px\")) {\n remainingWidth = Number.parseInt(maxWidth) - offsetWidth;\n }\n const styleWidth = this.style.width;\n if (remainingWidth == 0 || (styleWidth.endsWith(\"px\") && offsetWidth < Number.parseInt(styleWidth))) {\n this.enableLineClampOnItemsIfNeeded();\n } else {\n const missingWidths = [...this.querySelectorAll(\"[slot='items']\")].map((item) => {\n if (item instanceof ListItem) {\n item.enableLineClamp = false;\n const missingWidthForTexts = item.missingWidthForTexts;\n if (missingWidthForTexts > remainingWidth) {\n item.enableLineClamp = true;\n }\n return missingWidthForTexts;\n }\n });\n const additionalWidth = Math.max(...missingWidths);\n if (additionalWidth > 0) {\n const requiredWidth = offsetWidth + additionalWidth;\n this.style.width = `${requiredWidth}px`;\n if (this.offsetWidth < requiredWidth) {\n this.enableLineClampOnItemsIfNeeded();\n }\n }\n }\n });\n }\n\n private enableLineClampOnItemsIfNeeded() {\n this.querySelectorAll(\"[slot='items']\").forEach((item) => {\n if (item instanceof ListItem) {\n item.enableLineClamp = item.enableLineClamp || item.missingWidthForTexts > 0;\n }\n });\n }\n\n private render(): void {\n if (!this.isConnected || !this.items) {\n return;\n }\n this.querySelectorAll(\"[slot='items']\").forEach((oldItem) => {\n this.removeChild(oldItem);\n });\n\n const fragment = document.createDocumentFragment();\n let indexOfRealItems = 0;\n this.items.forEach((item, index) => {\n const itemElement = this.itemGenerator(item, index);\n\n if (!this.isSeparator(itemElement)) {\n this.initListItem(itemElement, indexOfRealItems++);\n }\n\n itemElement.slot = \"items\";\n fragment.appendChild(itemElement);\n });\n this.appendChild(fragment);\n\n this.updateFocusedElement();\n }\n\n private initListItem(item: HTMLElement, index: number): void {\n this.setSelectedAttr(item, this.selectedIndexes.includes(index));\n item.addEventListener(\"click\", (event) => {\n this.handleItemClick(event, index);\n });\n item.addEventListener(\"mousedown\", (event) => {\n if (event.button == 1) {\n event.preventDefault();\n }\n });\n item.addEventListener(\"auxclick\", (event) => {\n this.handleItemClick(event, index);\n });\n if (!item.id || item.id.startsWith(this.id + \"_item_\")) {\n item.id = this.id + \"_item_\" + index;\n }\n }\n\n private ensureItemVisible(item: HTMLElement): void {\n const itemRect = item.getBoundingClientRect();\n const rect = this.getBoundingClientRect();\n if (itemRect.bottom > rect.bottom) {\n this.scrollTop += itemRect.bottom - rect.bottom;\n } else if (itemRect.top < rect.top) {\n this.scrollTop -= rect.top - itemRect.top;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n let shouldPrevent = true;\n switch (event.key) {\n case \"ArrowDown\":\n case \"Down\":\n this.focusIndex = Math.min(this.getListItems.length - 1, this.focusIndex + 1);\n break;\n case \"ArrowUp\":\n case \"Up\":\n this.focusIndex = Math.max(0, this.focusIndex - 1);\n break;\n case \"Enter\":\n case \"Space\":\n case \" \":\n this.handleSelection(this.focusIndex, event.metaKey || event.ctrlKey);\n break;\n case \"End\":\n case \"PageDown\":\n this.focusIndex = this.items.length - 1;\n break;\n case \"Home\":\n case \"PageUp\":\n this.focusIndex = 0;\n break;\n default:\n shouldPrevent = false;\n break;\n }\n if (shouldPrevent) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private updateFocusedElement(): void {\n const focusedElement = this.getListItem(this.focusIndex);\n if (focusedElement && (this.focusTarget || document.activeElement == this)) {\n focusedElement.setAttribute(\"focused\", \"\");\n this.setAttribute(\"aria-activedescendant\", focusedElement.id);\n this.ensureItemVisible(focusedElement);\n } else {\n this.removeAttribute(\"aria-activedescendant\");\n }\n }\n\n private handleItemClick(event: MouseEvent, index: number): void {\n if (event.button !== null) {\n const hasModifier = (event.type == \"auxclick\" && event.button == 1) || event.metaKey || event.ctrlKey;\n if (event.button == 0 || event.button == 1) {\n this.handleSelection(index, hasModifier);\n }\n }\n }\n\n private handleSelection(index: number, hasModifier: boolean): void {\n const item = this.items[index];\n if (!item || item.disabled) {\n return;\n }\n const element = this.getListItem(index);\n const wasSelected = this.isSelected(element);\n if (this.selectionType !== \"trigger-only\") {\n if (this.selectionType === \"single\") {\n this.selectedIndexes = wasSelected ? [] : [index];\n } else {\n const newSelectedState = this.toggleSelection(element);\n if (newSelectedState) {\n this._selectedIndexes.push(index);\n } else {\n this.removeFromSelectedIndexes(index);\n }\n }\n }\n this.focusIndex = index;\n this.dispatchEvent(\n new CustomEvent<ISelectionEvent>(\"selection\", {\n detail: {\n index,\n selected: this.selectionType == \"trigger-only\" || !wasSelected,\n hasModifier,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private removeFromSelectedIndexes(indexToRemove: number) {\n const index = this._selectedIndexes.indexOf(indexToRemove);\n if (index !== -1) {\n this._selectedIndexes.splice(index, 1);\n }\n }\n\n private toggleSelection(element: Element): boolean {\n const selected = !element.hasAttribute(\"selected\");\n this.setSelectedAttr(element, selected);\n return selected;\n }\n\n private setSelectedAttr(element: Element, selected: boolean) {\n if (element) {\n if (selected) {\n element.setAttribute(\"selected\", \"\");\n } else {\n element.removeAttribute(\"selected\");\n }\n element.setAttribute(\"aria-selected\", String(selected));\n }\n }\n\n private isSelected(element: Element): boolean {\n return element.hasAttribute(\"selected\");\n }\n}\n\nList.ensureDefined();\n"],"names":["htmlTemplate","idCounter","_List","ElementBase","generator","index","item","event","shouldPrevent","value","type","child","indexes","prevIndexes","template","focusedElement","element","name","oldValue","_newValue","lastFocusedElement","remainingWidth","maxWidth","offsetWidth","styleWidth","missingWidths","ListItem","missingWidthForTexts","additionalWidth","requiredWidth","oldItem","fragment","indexOfRealItems","itemElement","itemRect","rect","hasModifier","wasSelected","indexToRemove","selected","List"],"mappings":";;AAAA,MAAeA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACef,IAAIC,IAAY;AAoChB,MAAqBC,IAArB,MAAqBA,UAAaC,EAAY;AAAA,EA+G1C,cAAc;AACJ,aAtGV,KAAQ,SAAgB,IACxB,KAAQ,mBAA6B,IACrC,KAAQ,iBAAgCC,GAuJxC,KAAQ,sBAAsB,MAAM;AAChC,UAAIC,IAAQ;AACZ,WAAK,YAAY,iBAAmB,EAAA,QAAQ,CAACC,MAAsB;AAC/D,QAAK,KAAK,YAAYA,CAAI,KACjB,KAAA,aAAaA,GAAMD,GAAO;AAAA,MACnC,CACH,GACD,KAAK,qBAAqB;AAAA,IAAA,GA0HtB,KAAA,gBAAgB,CAACE,MAAyB;AAC9C,UAAIC,IAAgB;AACpB,cAAQD,EAAM,KAAK;AAAA,QACf,KAAK;AAAA,QACL,KAAK;AACI,eAAA,aAAa,KAAK,IAAI,KAAK,aAAa,SAAS,GAAG,KAAK,aAAa,CAAC;AAC5E;AAAA,QACJ,KAAK;AAAA,QACL,KAAK;AACD,eAAK,aAAa,KAAK,IAAI,GAAG,KAAK,aAAa,CAAC;AACjD;AAAA,QACJ,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AACD,eAAK,gBAAgB,KAAK,YAAYA,EAAM,WAAWA,EAAM,OAAO;AACpE;AAAA,QACJ,KAAK;AAAA,QACL,KAAK;AACI,eAAA,aAAa,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;AACJ;AArZId,EAAuB,KAAK,WAC5BA,EAAc,gBAAgB,MAAY;AACtC,EAAAwB,EAAS,cAAc,GAClB,eAAe,IAAIxB,EAAK,EAAE,KACZ,eAAA,OAAOA,EAAK,IAAIA,CAAI;AACvC;AANR,IAAqBsC,IAArBtC;AAwZAsC,EAAK,cAAc;"}
1
+ {"version":3,"file":"list.mjs","sources":["../list.html?raw","../list.ts"],"sourcesContent":["export default \"<style>\\n\\t:host {\\n\\t\\tbackground-color: var(--sd-list-base-background-color, white);\\n\\t}\\n\\n\\t.container {\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t}\\n\\n\\t:host(:focus) {\\n\\t\\toutline: none;\\n\\t}\\n\\n\\t:host(:focus-visible) ::slotted([focused]) {\\n\\t\\tbox-shadow: 0 0 0 1px #1467ba inset;\\n\\t}\\n\\n\\t.container ::slotted(*) {\\n\\t\\tdisplay: block;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\n\\t.container ::slotted(:not(:last-of-type)) {\\n\\t\\tborder-bottom: 1px solid #d9d9d9;\\n\\t}\\n</style>\\n\\n<div class=\\\"container\\\">\\n\\t<slot name=\\\"items\\\"></slot>\\n\\t<slot id=\\\"default-slot\\\"></slot>\\n</div>\\n\"","import { ElementBase, CustomEventMap as BaseCustomEventMap } from \"@cas-smartdesign/element-base\";\nimport ListItem, { generator } from \"@cas-smartdesign/list-item\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [List.ID]: List;\n }\n}\n\nimport { default as htmlTemplate } from \"./list.html?raw\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ItemGenerator = (data: any, index: number) => HTMLElement;\nexport type SelectionType = \"trigger-only\" | \"single\" | \"multi\";\n\nlet idCounter = 0;\n\nexport type ISelectionEvent = {\n index: number;\n selected: boolean;\n hasModifier: boolean;\n};\n\nexport interface CustomEventMap extends BaseCustomEventMap {\n selection: CustomEvent<ISelectionEvent>;\n}\n\nexport default interface List {\n addEventListener<K extends keyof CustomEventMap>(\n event: K,\n listener: ((this: this, ev: CustomEventMap[K]) => unknown) | null,\n options?: AddEventListenerOptions | boolean,\n ): void;\n addEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: AddEventListenerOptions | boolean,\n ): void;\n removeEventListener<K extends keyof CustomEventMap>(\n type: K,\n listener: (this: this, ev: CustomEventMap[K]) => unknown,\n options?: boolean | EventListenerOptions,\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): void;\n dispatchEvent<EventType extends CustomEventMap[keyof CustomEventMap]>(event: EventType): boolean;\n}\n\nexport default class List extends ElementBase {\n public static readonly ID = \"sd-list\";\n public static ensureDefined = (): void => {\n ListItem.ensureDefined();\n if (!customElements.get(List.ID)) {\n customElements.define(List.ID, List);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _items: any[] = [];\n private _selectedIndexes: number[] = [];\n private _itemGenerator: ItemGenerator = generator;\n private _fallbackId: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public get items(): any[] {\n return this._items;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public set items(value: any[]) {\n this._items = value;\n this.render();\n }\n\n public get itemGenerator(): ItemGenerator {\n return this._itemGenerator;\n }\n\n public set itemGenerator(value: ItemGenerator) {\n this._itemGenerator = value;\n this.render();\n }\n\n public get selectionType(): SelectionType {\n return this.getAttribute(\"selection-type\") as SelectionType;\n }\n\n public set selectionType(type: SelectionType) {\n if (type) {\n this.setAttribute(\"selection-type\", type);\n } else {\n this.removeAttribute(\"selection-type\");\n }\n }\n\n public get focusIndex(): number {\n return this.hasAttribute(\"focus-index\") ? Number(this.getAttribute(\"focus-index\")) : -1;\n }\n\n public set focusIndex(index: number) {\n if (0 <= index && index < this.getListItems.length) {\n this.setAttribute(\"focus-index\", index.toString());\n } else {\n this.removeAttribute(\"focus-index\");\n }\n }\n\n public get focusTarget(): boolean {\n return this.hasAttribute(\"focus-target\");\n }\n\n public set focusTarget(value: boolean) {\n this.toggleAttribute(\"focus-target\", value);\n }\n\n public getListItem(index: number): HTMLElement | null {\n if (this.shadowRoot) {\n return this.getListItems[index];\n }\n return null;\n }\n\n public get getListItems(): Array<HTMLElement> {\n return Array.prototype.slice.call(this.children).filter((child) => !this.isSeparator(child));\n }\n\n public get selectedIndexes(): number[] {\n return this._selectedIndexes;\n }\n\n public set selectedIndexes(indexes: number[]) {\n const prevIndexes = this._selectedIndexes || [];\n this._selectedIndexes = indexes || [];\n prevIndexes\n .filter((index) => !this._selectedIndexes.includes(index))\n .forEach((index) => {\n this.setSelectedAttr(this.getListItem(index), false);\n });\n this._selectedIndexes\n .filter((index) => !prevIndexes.includes(index))\n .forEach((index) => {\n this.setSelectedAttr(this.getListItem(index), true);\n });\n }\n\n static get observedAttributes(): string[] {\n return [\"focus-index\", \"focus-target\"];\n }\n\n is(): string {\n return List.ID;\n }\n\n protected template(): HTMLTemplateElement {\n const template = document.createElement(\"template\");\n template.innerHTML = htmlTemplate;\n return template;\n }\n\n constructor() {\n super();\n this._fallbackId = List.ID + \"_\" + idCounter++;\n this.addEventListener(\"pointerup\", (event) => {\n this.focusIndex = this.getListItems.indexOf(event.target as HTMLElement);\n this.updateFocusedElement();\n });\n this.addEventListener(\"focus\", () => {\n if (this.matches(\":focus-visible\")) {\n if (this.focusIndex == -1) {\n if (this.selectedIndexes) {\n this.focusIndex = this.selectedIndexes[0];\n }\n if (this.focusIndex == -1 && this.childElementCount > 0) {\n this.focusIndex = 0;\n }\n } else {\n this.updateFocusedElement();\n }\n }\n });\n this.addEventListener(\"blur\", () => this.removeFocusedItemAttributes());\n }\n\n private removeFocusedItemAttributes() {\n if (this.focusIndex != -1) {\n const focusedElement = this.getListItem(this.focusIndex);\n if (focusedElement) {\n focusedElement.removeAttribute(\"focused\");\n this.removeAttribute(\"aria-activedescendant\");\n }\n }\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n this.defaultSlot.addEventListener(\"slotchange\", this.onDefaultSlotChange);\n if (!this.hasAttribute(\"role\")) {\n this.setAttribute(\"role\", \"listbox\");\n }\n if (!this.id) {\n this.id = this._fallbackId;\n }\n\n this.render();\n this.addEventListener(\"keydown\", this.handleKeyDown);\n\n if (!this.selectionType) {\n this.selectionType = \"trigger-only\";\n }\n }\n\n private onDefaultSlotChange = () => {\n let index = 0;\n this.defaultSlot.assignedElements().forEach((item: HTMLElement) => {\n if (!this.isSeparator(item)) {\n this.initListItem(item, index++);\n }\n });\n this.updateFocusedElement();\n };\n\n private get defaultSlot(): HTMLSlotElement {\n return this.shadowRoot.querySelector(\"#default-slot\");\n }\n\n private isSeparator(element: Element): boolean {\n return \"HR\" == element.tagName || element.getAttribute(\"role\") == \"separator\";\n }\n\n public attributeChangedCallback(name: string, oldValue: unknown, _newValue: unknown): void {\n if (name === \"focus-index\") {\n const lastFocusedElement = this.getListItem(oldValue as number);\n if (lastFocusedElement) {\n lastFocusedElement.removeAttribute(\"focused\");\n }\n this.updateFocusedElement();\n } else if (name === \"focus-target\") {\n if (this.focusTarget) {\n this.updateFocusedElement();\n } else if (document.activeElement != this) {\n this.removeFocusedItemAttributes();\n }\n }\n }\n\n public increaseWidthIfNeeded() {\n window.requestAnimationFrame(() => {\n let remainingWidth = Number.MAX_SAFE_INTEGER;\n const maxWidth = getComputedStyle(this).maxWidth;\n const offsetWidth = this.offsetWidth;\n if (maxWidth.endsWith(\"px\")) {\n remainingWidth = Number.parseInt(maxWidth) - offsetWidth;\n }\n const styleWidth = this.style.width;\n if (remainingWidth == 0 || (styleWidth.endsWith(\"px\") && offsetWidth < Number.parseInt(styleWidth))) {\n this.enableLineClampOnItemsIfNeeded();\n } else {\n const missingWidths = [...this.querySelectorAll(\"[slot='items']\")].map((item) => {\n if (item instanceof ListItem) {\n item.enableLineClamp = false;\n const missingWidthForTexts = item.missingWidthForTexts;\n if (missingWidthForTexts > remainingWidth) {\n item.enableLineClamp = true;\n }\n return missingWidthForTexts;\n }\n });\n const additionalWidth = Math.max(...missingWidths);\n if (additionalWidth > 0) {\n const requiredWidth = offsetWidth + additionalWidth;\n this.style.width = `${requiredWidth}px`;\n if (this.offsetWidth < requiredWidth) {\n this.enableLineClampOnItemsIfNeeded();\n }\n }\n }\n });\n }\n\n private enableLineClampOnItemsIfNeeded() {\n this.querySelectorAll(\"[slot='items']\").forEach((item) => {\n if (item instanceof ListItem) {\n item.enableLineClamp = item.enableLineClamp || item.missingWidthForTexts > 0;\n }\n });\n }\n\n private render(): void {\n if (!this.isConnected || !this.items) {\n return;\n }\n this.querySelectorAll(\"[slot='items']\").forEach((oldItem) => {\n this.removeChild(oldItem);\n });\n\n const fragment = document.createDocumentFragment();\n let indexOfRealItems = 0;\n this.items.forEach((item, index) => {\n const itemElement = this.itemGenerator(item, index);\n\n if (!this.isSeparator(itemElement)) {\n this.initListItem(itemElement, indexOfRealItems++);\n }\n\n itemElement.slot = \"items\";\n fragment.appendChild(itemElement);\n });\n this.appendChild(fragment);\n\n this.updateFocusedElement();\n }\n\n private initListItem(item: HTMLElement, index: number): void {\n this.setSelectedAttr(item, this.selectedIndexes.includes(index));\n item.addEventListener(\"click\", (event) => {\n this.handleItemClick(event, index);\n });\n item.addEventListener(\"mousedown\", (event) => {\n if (event.button == 1) {\n event.preventDefault();\n }\n });\n item.addEventListener(\"auxclick\", (event) => {\n this.handleItemClick(event, index);\n });\n if (!item.id || item.id.startsWith(this.id + \"_item_\")) {\n item.id = this.id + \"_item_\" + index;\n }\n }\n\n private ensureItemVisible(item: HTMLElement): void {\n const itemRect = item.getBoundingClientRect();\n const rect = this.getBoundingClientRect();\n if (itemRect.bottom > rect.bottom) {\n this.scrollTop += itemRect.bottom - rect.bottom;\n } else if (itemRect.top < rect.top) {\n this.scrollTop -= rect.top - itemRect.top;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n let shouldPrevent = true;\n switch (event.key) {\n case \"ArrowDown\":\n case \"Down\":\n this.focusIndex = Math.min(this.getListItems.length - 1, this.focusIndex + 1);\n break;\n case \"ArrowUp\":\n case \"Up\":\n this.focusIndex = Math.max(0, this.focusIndex - 1);\n break;\n case \"Enter\":\n case \"Space\":\n case \" \":\n this.handleSelection(this.focusIndex, event.metaKey || event.ctrlKey);\n break;\n case \"End\":\n case \"PageDown\":\n this.focusIndex = this.items.length - 1;\n break;\n case \"Home\":\n case \"PageUp\":\n this.focusIndex = 0;\n break;\n default:\n shouldPrevent = false;\n break;\n }\n if (shouldPrevent) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private updateFocusedElement(): void {\n const focusedElement = this.getListItem(this.focusIndex);\n if (focusedElement && (this.focusTarget || document.activeElement == this)) {\n focusedElement.setAttribute(\"focused\", \"\");\n this.setAttribute(\"aria-activedescendant\", focusedElement.id);\n this.ensureItemVisible(focusedElement);\n } else {\n this.removeAttribute(\"aria-activedescendant\");\n }\n }\n\n private handleItemClick(event: MouseEvent, index: number): void {\n if (event.button !== null) {\n const hasModifier = (event.type == \"auxclick\" && event.button == 1) || event.metaKey || event.ctrlKey;\n if (event.button == 0 || event.button == 1) {\n this.handleSelection(index, hasModifier);\n }\n }\n }\n\n private handleSelection(index: number, hasModifier: boolean): void {\n const element = this.getListItem(index);\n if (element.getAttribute(\"aria-disabled\") == \"true\" || element.hasAttribute(\"disabled\")) {\n return;\n }\n const wasSelected = this.isSelected(element);\n if (this.selectionType !== \"trigger-only\") {\n if (this.selectionType === \"single\") {\n this.selectedIndexes = wasSelected ? [] : [index];\n } else {\n const newSelectedState = this.toggleSelection(element);\n if (newSelectedState) {\n this._selectedIndexes.push(index);\n } else {\n this.removeFromSelectedIndexes(index);\n }\n }\n }\n this.focusIndex = index;\n this.dispatchEvent(\n new CustomEvent<ISelectionEvent>(\"selection\", {\n detail: {\n index,\n selected: this.selectionType == \"trigger-only\" || !wasSelected,\n hasModifier,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private removeFromSelectedIndexes(indexToRemove: number) {\n const index = this._selectedIndexes.indexOf(indexToRemove);\n if (index !== -1) {\n this._selectedIndexes.splice(index, 1);\n }\n }\n\n private toggleSelection(element: Element): boolean {\n const selected = !element.hasAttribute(\"selected\");\n this.setSelectedAttr(element, selected);\n return selected;\n }\n\n private setSelectedAttr(element: Element, selected: boolean) {\n if (element) {\n if (selected) {\n element.setAttribute(\"selected\", \"\");\n } else {\n element.removeAttribute(\"selected\");\n }\n element.setAttribute(\"aria-selected\", String(selected));\n }\n }\n\n private isSelected(element: Element): boolean {\n return element.hasAttribute(\"selected\");\n }\n}\n\nList.ensureDefined();\n"],"names":["htmlTemplate","idCounter","_List","ElementBase","generator","index","item","event","shouldPrevent","value","type","child","indexes","prevIndexes","template","focusedElement","element","name","oldValue","_newValue","lastFocusedElement","remainingWidth","maxWidth","offsetWidth","styleWidth","missingWidths","ListItem","missingWidthForTexts","additionalWidth","requiredWidth","oldItem","fragment","indexOfRealItems","itemElement","itemRect","rect","hasModifier","wasSelected","indexToRemove","selected","List"],"mappings":";;AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACef,IAAIC,IAAY;AAoChB,MAAqBC,IAArB,MAAqBA,UAAaC,EAAY;AAAA,EA+G1C,cAAc;AACV,UAAA,GAtGJ,KAAQ,SAAgB,CAAA,GACxB,KAAQ,mBAA6B,CAAA,GACrC,KAAQ,iBAAgCC,GAuJxC,KAAQ,sBAAsB,MAAM;AAChC,UAAIC,IAAQ;AACZ,WAAK,YAAY,iBAAA,EAAmB,QAAQ,CAACC,MAAsB;AAC/D,QAAK,KAAK,YAAYA,CAAI,KACtB,KAAK,aAAaA,GAAMD,GAAO;AAAA,MAEvC,CAAC,GACD,KAAK,qBAAA;AAAA,IACT,GAyH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AACzD,IAAIjC,MAAU,MACV,KAAK,iBAAiB,OAAOA,GAAO,CAAC;AAAA,EAE7C;AAAA,EAEQ,gBAAgBW,GAA2B;AAC/C,UAAMuB,IAAW,CAACvB,EAAQ,aAAa,UAAU;AACjD,gBAAK,gBAAgBA,GAASuB,CAAQ,GAC/BA;AAAA,EACX;AAAA,EAEQ,gBAAgBvB,GAAkBuB,GAAmB;AACzD,IAAIvB,MACIuB,IACAvB,EAAQ,aAAa,YAAY,EAAE,IAEnCA,EAAQ,gBAAgB,UAAU,GAEtCA,EAAQ,aAAa,iBAAiB,OAAOuB,CAAQ,CAAC;AAAA,EAE9D;AAAA,EAEQ,WAAWvB,GAA2B;AAC1C,WAAOA,EAAQ,aAAa,UAAU;AAAA,EAC1C;AACJ;AApZId,EAAuB,KAAK,WAC5BA,EAAc,gBAAgB,MAAY;AACtC,EAAAwB,EAAS,cAAA,GACJ,eAAe,IAAIxB,EAAK,EAAE,KAC3B,eAAe,OAAOA,EAAK,IAAIA,CAAI;AAE3C;AAPJ,IAAqBsC,IAArBtC;AAuZAsC,EAAK,cAAA;"}
@@ -1,15 +1,20 @@
1
1
  {
2
- "@cypress/vite-dev-server@5.0.7": {
2
+ "@cypress/vite-dev-server@7.0.0": {
3
3
  "licenses": "MIT",
4
4
  "repository": "https://github.com/cypress-io/cypress",
5
5
  "licenseUrl": "https://github.com/cypress-io/cypress/tree/develop/npm/vite-dev-server#readme"
6
6
  },
7
- "@rollup/plugin-node-resolve@15.2.3": {
7
+ "@eslint/js@9.34.0": {
8
+ "licenses": "MIT",
9
+ "repository": "https://github.com/eslint/eslint",
10
+ "licenseUrl": "https://github.com/eslint/eslint/raw/HEAD/LICENSE"
11
+ },
12
+ "@rollup/plugin-node-resolve@16.0.1": {
8
13
  "licenses": "MIT",
9
14
  "repository": "https://github.com/rollup/plugins",
10
15
  "licenseUrl": "https://github.com/rollup/plugins/raw/HEAD/LICENSE"
11
16
  },
12
- "@types/node@20.10.6": {
17
+ "@types/node@24.3.0": {
13
18
  "licenses": "MIT",
14
19
  "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped",
15
20
  "licenseUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/raw/HEAD/LICENSE"
@@ -19,47 +24,42 @@
19
24
  "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped",
20
25
  "licenseUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/raw/HEAD/LICENSE"
21
26
  },
22
- "@typescript-eslint/eslint-plugin@6.17.0": {
27
+ "@typescript-eslint/eslint-plugin@8.41.0": {
23
28
  "licenses": "MIT",
24
29
  "repository": "https://github.com/typescript-eslint/typescript-eslint",
25
30
  "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
26
31
  },
27
- "@typescript-eslint/parser@6.17.0": {
28
- "licenses": "BSD-2-Clause",
32
+ "@typescript-eslint/parser@8.41.0": {
33
+ "licenses": "MIT",
29
34
  "repository": "https://github.com/typescript-eslint/typescript-eslint",
30
35
  "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
31
36
  },
32
- "@vitest/coverage-v8@1.1.1": {
37
+ "@vitest/coverage-v8@3.2.4": {
33
38
  "licenses": "MIT",
34
39
  "repository": "https://github.com/vitest-dev/vitest",
35
40
  "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE"
36
41
  },
37
- "@vitest/ui@1.1.1": {
42
+ "@vitest/ui@3.2.4": {
38
43
  "licenses": "MIT",
39
44
  "repository": "https://github.com/vitest-dev/vitest",
40
45
  "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE"
41
46
  },
42
- "axe-core@4.8.3": {
47
+ "axe-core@4.10.3": {
43
48
  "licenses": "MPL-2.0",
44
49
  "repository": "https://github.com/dequelabs/axe-core",
45
50
  "licenseUrl": "https://github.com/dequelabs/axe-core/raw/HEAD/LICENSE"
46
51
  },
47
- "cypress-axe@1.5.0": {
52
+ "cypress-axe@1.7.0": {
48
53
  "licenses": "MIT",
49
54
  "repository": "https://github.com/component-driven/cypress-axe",
50
55
  "licenseUrl": "https://github.com/component-driven/cypress-axe/raw/HEAD/License.md"
51
56
  },
52
- "cypress-real-events@1.13.0": {
53
- "licenses": "MIT",
54
- "repository": "https://github.com/dmtrKovalenko/cypress-real-events",
55
- "licenseUrl": "https://github.com/dmtrKovalenko/cypress-real-events"
56
- },
57
- "cypress@13.6.2": {
57
+ "cypress@15.0.0": {
58
58
  "licenses": "MIT",
59
59
  "repository": "https://github.com/cypress-io/cypress",
60
60
  "licenseUrl": "https://cypress.io"
61
61
  },
62
- "esbuild@0.19.11": {
62
+ "esbuild@0.25.9": {
63
63
  "licenses": "MIT",
64
64
  "repository": "https://github.com/evanw/esbuild",
65
65
  "licenseUrl": "https://github.com/evanw/esbuild/raw/HEAD/LICENSE.md"
@@ -69,57 +69,57 @@
69
69
  "repository": "https://github.com/google/eslint-config-google",
70
70
  "licenseUrl": "https://github.com/google/eslint-config-google/raw/HEAD/LICENSE"
71
71
  },
72
- "eslint-config-prettier@9.1.0": {
72
+ "eslint-config-prettier@10.1.8": {
73
73
  "licenses": "MIT",
74
74
  "repository": "https://github.com/prettier/eslint-config-prettier",
75
75
  "licenseUrl": "https://github.com/prettier/eslint-config-prettier/raw/HEAD/LICENSE"
76
76
  },
77
- "eslint@8.56.0": {
77
+ "eslint@9.34.0": {
78
78
  "licenses": "MIT",
79
79
  "repository": "https://github.com/eslint/eslint",
80
80
  "licenseUrl": "https://github.com/eslint/eslint/raw/HEAD/LICENSE"
81
81
  },
82
- "github-markdown-css@5.5.0": {
82
+ "github-markdown-css@5.8.1": {
83
83
  "licenses": "MIT",
84
84
  "repository": "https://github.com/sindresorhus/github-markdown-css",
85
85
  "licenseUrl": "https://github.com/sindresorhus/github-markdown-css/raw/HEAD/license"
86
86
  },
87
- "highlight.js@11.9.0": {
87
+ "highlight.js@11.11.1": {
88
88
  "licenses": "BSD-3-Clause",
89
89
  "repository": "https://github.com/highlightjs/highlight.js",
90
90
  "licenseUrl": "https://github.com/highlightjs/highlight.js/raw/HEAD/LICENSE"
91
91
  },
92
- "junit-report-builder@3.1.0": {
92
+ "junit-report-builder@5.1.1": {
93
93
  "licenses": "MIT",
94
94
  "repository": "https://github.com/davidparsson/junit-report-builder",
95
95
  "licenseUrl": "https://github.com/davidparsson/junit-report-builder/raw/HEAD/LICENSE"
96
96
  },
97
- "lint-staged@15.2.0": {
97
+ "lint-staged@16.1.5": {
98
98
  "licenses": "MIT",
99
- "repository": "https://github.com/okonet/lint-staged",
100
- "licenseUrl": "https://github.com/okonet/lint-staged/raw/HEAD/LICENSE"
99
+ "repository": "https://github.com/lint-staged/lint-staged",
100
+ "licenseUrl": "https://github.com/lint-staged/lint-staged/raw/HEAD/LICENSE"
101
101
  },
102
- "lit@2.8.0": {
102
+ "lit@3.3.1": {
103
103
  "licenses": "BSD-3-Clause",
104
104
  "repository": "https://github.com/lit/lit",
105
105
  "licenseUrl": "https://github.com/lit/lit/raw/HEAD/LICENSE"
106
106
  },
107
- "marked@11.1.1": {
107
+ "marked@16.2.1": {
108
108
  "licenses": "MIT",
109
109
  "repository": "https://github.com/markedjs/marked",
110
110
  "licenseUrl": "https://github.com/markedjs/marked/raw/HEAD/LICENSE.md"
111
111
  },
112
- "postcss-prefix-selector@1.16.0": {
112
+ "postcss-prefix-selector@2.1.1": {
113
113
  "licenses": "MIT",
114
114
  "repository": "https://github.com/RadValentin/postcss-prefix-selector",
115
115
  "licenseUrl": "https://github.com/RadValentin/postcss-prefix-selector/raw/HEAD/LICENSE"
116
116
  },
117
- "postcss@8.4.32": {
117
+ "postcss@8.5.6": {
118
118
  "licenses": "MIT",
119
119
  "repository": "https://github.com/postcss/postcss",
120
120
  "licenseUrl": "https://github.com/postcss/postcss/raw/HEAD/LICENSE"
121
121
  },
122
- "prettier@3.1.1": {
122
+ "prettier@3.6.2": {
123
123
  "licenses": "MIT",
124
124
  "repository": "https://github.com/prettier/prettier",
125
125
  "licenseUrl": "https://github.com/prettier/prettier/raw/HEAD/LICENSE"
@@ -129,62 +129,67 @@
129
129
  "repository": "https://github.com/sindresorhus/resolve-pkg",
130
130
  "licenseUrl": "https://github.com/sindresorhus/resolve-pkg/raw/HEAD/license"
131
131
  },
132
- "sass@1.69.6": {
132
+ "sass@1.91.0": {
133
133
  "licenses": "MIT",
134
134
  "repository": "https://github.com/sass/dart-sass",
135
135
  "licenseUrl": "https://github.com/sass/dart-sass/raw/HEAD/LICENSE"
136
136
  },
137
- "stylelint-config-recommended-scss@14.0.0": {
137
+ "stylelint-config-recommended-scss@16.0.0": {
138
138
  "licenses": "MIT",
139
139
  "repository": "https://github.com/stylelint-scss/stylelint-config-recommended-scss",
140
140
  "licenseUrl": "https://github.com/stylelint-scss/stylelint-config-recommended-scss/raw/HEAD/LICENSE"
141
141
  },
142
- "stylelint-config-standard@36.0.0": {
142
+ "stylelint-config-standard@39.0.0": {
143
143
  "licenses": "MIT",
144
144
  "repository": "https://github.com/stylelint/stylelint-config-standard",
145
145
  "licenseUrl": "https://github.com/stylelint/stylelint-config-standard/raw/HEAD/LICENSE"
146
146
  },
147
- "stylelint-scss@6.0.0": {
147
+ "stylelint-scss@6.12.1": {
148
148
  "licenses": "MIT",
149
149
  "repository": "https://github.com/stylelint-scss/stylelint-scss",
150
150
  "licenseUrl": "https://github.com/stylelint-scss/stylelint-scss/raw/HEAD/LICENSE"
151
151
  },
152
- "stylelint@16.1.0": {
152
+ "stylelint@16.23.1": {
153
153
  "licenses": "MIT",
154
154
  "repository": "https://github.com/stylelint/stylelint",
155
155
  "licenseUrl": "https://github.com/stylelint/stylelint/raw/HEAD/LICENSE"
156
156
  },
157
- "tsup@8.0.1": {
157
+ "tsup@8.5.0": {
158
158
  "licenses": "MIT",
159
159
  "repository": "https://github.com/egoist/tsup",
160
160
  "licenseUrl": "https://github.com/egoist/tsup/raw/HEAD/LICENSE"
161
161
  },
162
- "turbo@1.11.2": {
163
- "licenses": "MPL-2.0",
164
- "repository": "https://github.com/vercel/turbo",
165
- "licenseUrl": "https://github.com/vercel/turbo/raw/HEAD/LICENSE"
162
+ "turbo@2.5.6": {
163
+ "licenses": "MIT",
164
+ "repository": "https://github.com/vercel/turborepo",
165
+ "licenseUrl": "https://github.com/vercel/turborepo/raw/HEAD/LICENSE"
166
+ },
167
+ "typescript-eslint@8.41.0": {
168
+ "licenses": "MIT",
169
+ "repository": "https://github.com/typescript-eslint/typescript-eslint",
170
+ "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
166
171
  },
167
- "typescript@5.3.3": {
172
+ "typescript@5.9.2": {
168
173
  "licenses": "Apache-2.0",
169
- "repository": "https://github.com/Microsoft/TypeScript",
170
- "licenseUrl": "https://github.com/Microsoft/TypeScript/raw/HEAD/LICENSE.txt"
174
+ "repository": "https://github.com/microsoft/TypeScript",
175
+ "licenseUrl": "https://github.com/microsoft/TypeScript/raw/HEAD/LICENSE.txt"
171
176
  },
172
- "vite-tsconfig-paths@4.2.3": {
177
+ "vite-tsconfig-paths@5.1.4": {
173
178
  "licenses": "MIT",
174
179
  "repository": "https://github.com/aleclarson/vite-tsconfig-paths",
175
180
  "licenseUrl": "https://github.com/aleclarson/vite-tsconfig-paths/raw/HEAD/LICENSE"
176
181
  },
177
- "vite@5.0.10": {
182
+ "vite@7.1.3": {
178
183
  "licenses": "MIT",
179
184
  "repository": "https://github.com/vitejs/vite",
180
185
  "licenseUrl": "https://github.com/vitejs/vite/raw/HEAD/LICENSE.md"
181
186
  },
182
- "vitest@1.1.1": {
187
+ "vitest@3.2.4": {
183
188
  "licenses": "MIT",
184
189
  "repository": "https://github.com/vitest-dev/vitest",
185
190
  "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE.md"
186
191
  },
187
- "yargs@17.7.2": {
192
+ "yargs@18.0.0": {
188
193
  "licenses": "MIT",
189
194
  "repository": "https://github.com/yargs/yargs",
190
195
  "licenseUrl": "https://github.com/yargs/yargs/raw/HEAD/LICENSE"
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@cas-smartdesign/list",
3
- "version": "6.3.1",
3
+ "version": "6.4.0",
4
4
  "description": "A list element with SmartDesign look and feel.",
5
5
  "main": "dist/list-with-externals.js",
6
6
  "module": "dist/list.mjs",
7
7
  "license": "SEE LICENSE IN LICENSE",
8
8
  "types": "dist/list.d.ts",
9
9
  "dependencies": {
10
- "@cas-smartdesign/list-item": "^7.2.3",
11
- "@cas-smartdesign/element-base": "^5.0.2"
10
+ "@cas-smartdesign/element-base": "^5.1.0",
11
+ "@cas-smartdesign/list-item": "^7.3.0"
12
12
  },
13
13
  "devDependencies": {
14
- "@cas-smartdesign/element-preview": "^0.2.2",
15
- "@cas-smartdesign/element-utils": "^1.0.3",
16
- "@cas-smartdesign/license-generator": "^1.6.3"
14
+ "@cas-smartdesign/element-preview": "^0.3.0",
15
+ "@cas-smartdesign/element-utils": "^1.1.0",
16
+ "@cas-smartdesign/license-generator": "^1.7.0"
17
17
  },
18
18
  "files": [
19
19
  "dist",