@cas-smartdesign/list 6.3.2 → 6.5.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/docs/doc.css +1 -1
- package/dist/docs/doc.mjs +66 -70
- package/dist/docs/multi-select.js +1 -1
- package/dist/docs/single-select.js +1 -1
- package/dist/docs/trigger-only.js +1 -1
- package/dist/list-with-externals.js +28 -52
- package/dist/list-with-externals.js.map +4 -4
- package/dist/list.mjs +2 -3
- package/dist/list.mjs.map +1 -1
- package/npm-third-party-licenses.json +62 -47
- package/package.json +6 -6
package/dist/list.mjs
CHANGED
|
@@ -154,8 +154,7 @@ const n = class n 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(() => {
|
|
@@ -213,7 +212,7 @@ const n = class n extends h {
|
|
|
213
212
|
}
|
|
214
213
|
updateFocusedElement() {
|
|
215
214
|
const e = this.getListItem(this.focusIndex);
|
|
216
|
-
e && (this.focusTarget ||
|
|
215
|
+
e && (this.focusTarget || this.matches(":focus")) ? (e.setAttribute("focused", ""), this.setAttribute("aria-activedescendant", e.id), this.ensureItemVisible(e)) : this.removeAttribute("aria-activedescendant");
|
|
217
216
|
}
|
|
218
217
|
handleItemClick(e, t) {
|
|
219
218
|
if (e.button !== null) {
|
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 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,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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AAQ,gBAAgB,UAAU,GAEtCA,EAAQ,aAAa,iBAAiB,OAAOuB,CAAQ,CAAC;AAAA,EAE9D;AAAA,EAEQ,WAAWvB,GAA2B;AACnC,WAAAA,EAAQ,aAAa,UAAU;AAAA,EAC1C;AACJ;AApZId,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;AAuZAsC,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 || this.matches(\":focus\"))) {\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;A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,aAAAD;AAAA,QAAA;AAAA,QAEJ,SAAS;AAAA,QACT,UAAU;AAAA,MAAA,CACb;AAAA,IAAA;AAAA,EAET;AAAA,EAEQ,0BAA0BE,GAAuB;AACrD,UAAMjC,IAAQ,KAAK,iBAAiB,QAAQiC,CAAa;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@
|
|
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
|
-
"@
|
|
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@
|
|
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,47 @@
|
|
|
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@
|
|
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@
|
|
28
|
-
"licenses": "
|
|
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@
|
|
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@
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
"
|
|
62
|
+
"d3-color@3.1.0": {
|
|
63
|
+
"licenses": "ISC",
|
|
64
|
+
"repository": "https://github.com/d3/d3-color",
|
|
65
|
+
"licenseUrl": "https://github.com/d3/d3-color/raw/HEAD/LICENSE"
|
|
66
|
+
},
|
|
67
|
+
"esbuild@0.25.9": {
|
|
63
68
|
"licenses": "MIT",
|
|
64
69
|
"repository": "https://github.com/evanw/esbuild",
|
|
65
70
|
"licenseUrl": "https://github.com/evanw/esbuild/raw/HEAD/LICENSE.md"
|
|
@@ -69,57 +74,62 @@
|
|
|
69
74
|
"repository": "https://github.com/google/eslint-config-google",
|
|
70
75
|
"licenseUrl": "https://github.com/google/eslint-config-google/raw/HEAD/LICENSE"
|
|
71
76
|
},
|
|
72
|
-
"eslint-config-prettier@
|
|
77
|
+
"eslint-config-prettier@10.1.8": {
|
|
73
78
|
"licenses": "MIT",
|
|
74
79
|
"repository": "https://github.com/prettier/eslint-config-prettier",
|
|
75
80
|
"licenseUrl": "https://github.com/prettier/eslint-config-prettier/raw/HEAD/LICENSE"
|
|
76
81
|
},
|
|
77
|
-
"eslint@
|
|
82
|
+
"eslint@9.34.0": {
|
|
78
83
|
"licenses": "MIT",
|
|
79
84
|
"repository": "https://github.com/eslint/eslint",
|
|
80
85
|
"licenseUrl": "https://github.com/eslint/eslint/raw/HEAD/LICENSE"
|
|
81
86
|
},
|
|
82
|
-
"github-markdown-css@5.
|
|
87
|
+
"github-markdown-css@5.8.1": {
|
|
83
88
|
"licenses": "MIT",
|
|
84
89
|
"repository": "https://github.com/sindresorhus/github-markdown-css",
|
|
85
90
|
"licenseUrl": "https://github.com/sindresorhus/github-markdown-css/raw/HEAD/license"
|
|
86
91
|
},
|
|
87
|
-
"highlight.js@11.
|
|
92
|
+
"highlight.js@11.11.1": {
|
|
88
93
|
"licenses": "BSD-3-Clause",
|
|
89
94
|
"repository": "https://github.com/highlightjs/highlight.js",
|
|
90
95
|
"licenseUrl": "https://github.com/highlightjs/highlight.js/raw/HEAD/LICENSE"
|
|
91
96
|
},
|
|
92
|
-
"junit-report-builder@
|
|
97
|
+
"junit-report-builder@5.1.1": {
|
|
93
98
|
"licenses": "MIT",
|
|
94
99
|
"repository": "https://github.com/davidparsson/junit-report-builder",
|
|
95
100
|
"licenseUrl": "https://github.com/davidparsson/junit-report-builder/raw/HEAD/LICENSE"
|
|
96
101
|
},
|
|
97
|
-
"lint-staged@
|
|
102
|
+
"lint-staged@16.1.5": {
|
|
98
103
|
"licenses": "MIT",
|
|
99
|
-
"repository": "https://github.com/
|
|
100
|
-
"licenseUrl": "https://github.com/
|
|
104
|
+
"repository": "https://github.com/lint-staged/lint-staged",
|
|
105
|
+
"licenseUrl": "https://github.com/lint-staged/lint-staged/raw/HEAD/LICENSE"
|
|
106
|
+
},
|
|
107
|
+
"lit-html@3.3.1": {
|
|
108
|
+
"licenses": "BSD-3-Clause",
|
|
109
|
+
"repository": "https://github.com/lit/lit",
|
|
110
|
+
"licenseUrl": "https://github.com/lit/lit/raw/HEAD/LICENSE"
|
|
101
111
|
},
|
|
102
|
-
"lit@
|
|
112
|
+
"lit@3.3.1": {
|
|
103
113
|
"licenses": "BSD-3-Clause",
|
|
104
114
|
"repository": "https://github.com/lit/lit",
|
|
105
115
|
"licenseUrl": "https://github.com/lit/lit/raw/HEAD/LICENSE"
|
|
106
116
|
},
|
|
107
|
-
"marked@
|
|
117
|
+
"marked@16.2.1": {
|
|
108
118
|
"licenses": "MIT",
|
|
109
119
|
"repository": "https://github.com/markedjs/marked",
|
|
110
120
|
"licenseUrl": "https://github.com/markedjs/marked/raw/HEAD/LICENSE.md"
|
|
111
121
|
},
|
|
112
|
-
"postcss-prefix-selector@1.
|
|
122
|
+
"postcss-prefix-selector@2.1.1": {
|
|
113
123
|
"licenses": "MIT",
|
|
114
124
|
"repository": "https://github.com/RadValentin/postcss-prefix-selector",
|
|
115
125
|
"licenseUrl": "https://github.com/RadValentin/postcss-prefix-selector/raw/HEAD/LICENSE"
|
|
116
126
|
},
|
|
117
|
-
"postcss@8.
|
|
127
|
+
"postcss@8.5.6": {
|
|
118
128
|
"licenses": "MIT",
|
|
119
129
|
"repository": "https://github.com/postcss/postcss",
|
|
120
130
|
"licenseUrl": "https://github.com/postcss/postcss/raw/HEAD/LICENSE"
|
|
121
131
|
},
|
|
122
|
-
"prettier@3.
|
|
132
|
+
"prettier@3.6.2": {
|
|
123
133
|
"licenses": "MIT",
|
|
124
134
|
"repository": "https://github.com/prettier/prettier",
|
|
125
135
|
"licenseUrl": "https://github.com/prettier/prettier/raw/HEAD/LICENSE"
|
|
@@ -129,62 +139,67 @@
|
|
|
129
139
|
"repository": "https://github.com/sindresorhus/resolve-pkg",
|
|
130
140
|
"licenseUrl": "https://github.com/sindresorhus/resolve-pkg/raw/HEAD/license"
|
|
131
141
|
},
|
|
132
|
-
"sass@1.
|
|
142
|
+
"sass@1.91.0": {
|
|
133
143
|
"licenses": "MIT",
|
|
134
144
|
"repository": "https://github.com/sass/dart-sass",
|
|
135
145
|
"licenseUrl": "https://github.com/sass/dart-sass/raw/HEAD/LICENSE"
|
|
136
146
|
},
|
|
137
|
-
"stylelint-config-recommended-scss@
|
|
147
|
+
"stylelint-config-recommended-scss@16.0.0": {
|
|
138
148
|
"licenses": "MIT",
|
|
139
149
|
"repository": "https://github.com/stylelint-scss/stylelint-config-recommended-scss",
|
|
140
150
|
"licenseUrl": "https://github.com/stylelint-scss/stylelint-config-recommended-scss/raw/HEAD/LICENSE"
|
|
141
151
|
},
|
|
142
|
-
"stylelint-config-standard@
|
|
152
|
+
"stylelint-config-standard@39.0.0": {
|
|
143
153
|
"licenses": "MIT",
|
|
144
154
|
"repository": "https://github.com/stylelint/stylelint-config-standard",
|
|
145
155
|
"licenseUrl": "https://github.com/stylelint/stylelint-config-standard/raw/HEAD/LICENSE"
|
|
146
156
|
},
|
|
147
|
-
"stylelint-scss@6.
|
|
157
|
+
"stylelint-scss@6.12.1": {
|
|
148
158
|
"licenses": "MIT",
|
|
149
159
|
"repository": "https://github.com/stylelint-scss/stylelint-scss",
|
|
150
160
|
"licenseUrl": "https://github.com/stylelint-scss/stylelint-scss/raw/HEAD/LICENSE"
|
|
151
161
|
},
|
|
152
|
-
"stylelint@16.1
|
|
162
|
+
"stylelint@16.23.1": {
|
|
153
163
|
"licenses": "MIT",
|
|
154
164
|
"repository": "https://github.com/stylelint/stylelint",
|
|
155
165
|
"licenseUrl": "https://github.com/stylelint/stylelint/raw/HEAD/LICENSE"
|
|
156
166
|
},
|
|
157
|
-
"tsup@8.0
|
|
167
|
+
"tsup@8.5.0": {
|
|
158
168
|
"licenses": "MIT",
|
|
159
169
|
"repository": "https://github.com/egoist/tsup",
|
|
160
170
|
"licenseUrl": "https://github.com/egoist/tsup/raw/HEAD/LICENSE"
|
|
161
171
|
},
|
|
162
|
-
"turbo@
|
|
163
|
-
"licenses": "
|
|
164
|
-
"repository": "https://github.com/vercel/
|
|
165
|
-
"licenseUrl": "https://github.com/vercel/
|
|
172
|
+
"turbo@2.5.6": {
|
|
173
|
+
"licenses": "MIT",
|
|
174
|
+
"repository": "https://github.com/vercel/turborepo",
|
|
175
|
+
"licenseUrl": "https://github.com/vercel/turborepo/raw/HEAD/LICENSE"
|
|
176
|
+
},
|
|
177
|
+
"typescript-eslint@8.41.0": {
|
|
178
|
+
"licenses": "MIT",
|
|
179
|
+
"repository": "https://github.com/typescript-eslint/typescript-eslint",
|
|
180
|
+
"licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
|
|
166
181
|
},
|
|
167
|
-
"typescript@5.
|
|
182
|
+
"typescript@5.9.2": {
|
|
168
183
|
"licenses": "Apache-2.0",
|
|
169
|
-
"repository": "https://github.com/
|
|
170
|
-
"licenseUrl": "https://github.com/
|
|
184
|
+
"repository": "https://github.com/microsoft/TypeScript",
|
|
185
|
+
"licenseUrl": "https://github.com/microsoft/TypeScript/raw/HEAD/LICENSE.txt"
|
|
171
186
|
},
|
|
172
|
-
"vite-tsconfig-paths@
|
|
187
|
+
"vite-tsconfig-paths@5.1.4": {
|
|
173
188
|
"licenses": "MIT",
|
|
174
189
|
"repository": "https://github.com/aleclarson/vite-tsconfig-paths",
|
|
175
190
|
"licenseUrl": "https://github.com/aleclarson/vite-tsconfig-paths/raw/HEAD/LICENSE"
|
|
176
191
|
},
|
|
177
|
-
"vite@
|
|
192
|
+
"vite@7.1.3": {
|
|
178
193
|
"licenses": "MIT",
|
|
179
194
|
"repository": "https://github.com/vitejs/vite",
|
|
180
195
|
"licenseUrl": "https://github.com/vitejs/vite/raw/HEAD/LICENSE.md"
|
|
181
196
|
},
|
|
182
|
-
"vitest@
|
|
197
|
+
"vitest@3.2.4": {
|
|
183
198
|
"licenses": "MIT",
|
|
184
199
|
"repository": "https://github.com/vitest-dev/vitest",
|
|
185
200
|
"licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE.md"
|
|
186
201
|
},
|
|
187
|
-
"yargs@
|
|
202
|
+
"yargs@18.0.0": {
|
|
188
203
|
"licenses": "MIT",
|
|
189
204
|
"repository": "https://github.com/yargs/yargs",
|
|
190
205
|
"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
|
+
"version": "6.5.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/
|
|
11
|
-
"@cas-smartdesign/
|
|
10
|
+
"@cas-smartdesign/element-base": "^5.1.0",
|
|
11
|
+
"@cas-smartdesign/list-item": "^7.4.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@cas-smartdesign/element-
|
|
15
|
-
"@cas-smartdesign/
|
|
16
|
-
"@cas-smartdesign/
|
|
14
|
+
"@cas-smartdesign/element-preview": "^0.3.0",
|
|
15
|
+
"@cas-smartdesign/element-utils": "^1.2.0",
|
|
16
|
+
"@cas-smartdesign/license-generator": "^1.7.0"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|