@cas-smartdesign/list 6.3.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.d.ts ADDED
@@ -0,0 +1,68 @@
1
+ import { ElementBase, CustomEventMap as BaseCustomEventMap } from "@cas-smartdesign/element-base";
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ [List.ID]: List;
5
+ }
6
+ }
7
+ export type ItemGenerator = (data: any, index: number) => HTMLElement;
8
+ export type SelectionType = "trigger-only" | "single" | "multi";
9
+ export type ISelectionEvent = {
10
+ index: number;
11
+ selected: boolean;
12
+ hasModifier: boolean;
13
+ };
14
+ export interface CustomEventMap extends BaseCustomEventMap {
15
+ selection: CustomEvent<ISelectionEvent>;
16
+ }
17
+ export default interface List {
18
+ addEventListener<K extends keyof CustomEventMap>(event: K, listener: ((this: this, ev: CustomEventMap[K]) => unknown) | null, options?: AddEventListenerOptions | boolean): void;
19
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
20
+ removeEventListener<K extends keyof CustomEventMap>(type: K, listener: (this: this, ev: CustomEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
21
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
22
+ dispatchEvent<EventType extends CustomEventMap[keyof CustomEventMap]>(event: EventType): boolean;
23
+ }
24
+ export default class List extends ElementBase {
25
+ static readonly ID = "sd-list";
26
+ static ensureDefined: () => void;
27
+ private _items;
28
+ private _selectedIndexes;
29
+ private _itemGenerator;
30
+ private _fallbackId;
31
+ get items(): any[];
32
+ set items(value: any[]);
33
+ get itemGenerator(): ItemGenerator;
34
+ set itemGenerator(value: ItemGenerator);
35
+ get selectionType(): SelectionType;
36
+ set selectionType(type: SelectionType);
37
+ get focusIndex(): number;
38
+ set focusIndex(index: number);
39
+ get focusTarget(): boolean;
40
+ set focusTarget(value: boolean);
41
+ getListItem(index: number): HTMLElement | null;
42
+ get getListItems(): Array<HTMLElement>;
43
+ get selectedIndexes(): number[];
44
+ set selectedIndexes(indexes: number[]);
45
+ static get observedAttributes(): string[];
46
+ is(): string;
47
+ protected template(): HTMLTemplateElement;
48
+ constructor();
49
+ private removeFocusedItemAttributes;
50
+ connectedCallback(): void;
51
+ private onDefaultSlotChange;
52
+ private get defaultSlot();
53
+ private isSeparator;
54
+ attributeChangedCallback(name: string, oldValue: unknown, _newValue: unknown): void;
55
+ increaseWidthIfNeeded(): void;
56
+ private enableLineClampOnItemsIfNeeded;
57
+ private render;
58
+ private initListItem;
59
+ private ensureItemVisible;
60
+ private handleKeyDown;
61
+ private updateFocusedElement;
62
+ private handleItemClick;
63
+ private handleSelection;
64
+ private removeFromSelectedIndexes;
65
+ private toggleSelection;
66
+ private setSelectedAttr;
67
+ private isSelected;
68
+ }
package/dist/list.mjs ADDED
@@ -0,0 +1,264 @@
1
+ import { ElementBase as h } from "@cas-smartdesign/element-base";
2
+ import d, { generator as u } from "@cas-smartdesign/list-item";
3
+ const f = `<style>
4
+ :host {
5
+ background-color: var(--sd-list-base-background-color, white);
6
+ }
7
+
8
+ .container {
9
+ width: 100%;
10
+ height: 100%;
11
+ }
12
+
13
+ :host(:focus) {
14
+ outline: none;
15
+ }
16
+
17
+ :host(:focus-visible) ::slotted([focused]) {
18
+ box-shadow: 0 0 0 1px #1467ba inset;
19
+ }
20
+
21
+ .container ::slotted(*) {
22
+ display: block;
23
+ box-sizing: border-box;
24
+ }
25
+
26
+ .container ::slotted(:not(:last-of-type)) {
27
+ border-bottom: 1px solid #d9d9d9;
28
+ }
29
+ </style>
30
+
31
+ <div class="container">
32
+ <slot name="items"></slot>
33
+ <slot id="default-slot"></slot>
34
+ </div>
35
+ `;
36
+ let m = 0;
37
+ const o = class o extends h {
38
+ constructor() {
39
+ super(), this._items = [], this._selectedIndexes = [], this._itemGenerator = u, this.onDefaultSlotChange = () => {
40
+ let e = 0;
41
+ this.defaultSlot.assignedElements().forEach((t) => {
42
+ this.isSeparator(t) || this.initListItem(t, e++);
43
+ }), this.updateFocusedElement();
44
+ }, this.handleKeyDown = (e) => {
45
+ let t = !0;
46
+ switch (e.key) {
47
+ case "ArrowDown":
48
+ case "Down":
49
+ this.focusIndex = Math.min(this.getListItems.length - 1, this.focusIndex + 1);
50
+ break;
51
+ case "ArrowUp":
52
+ case "Up":
53
+ this.focusIndex = Math.max(0, this.focusIndex - 1);
54
+ break;
55
+ case "Enter":
56
+ case "Space":
57
+ case " ":
58
+ this.handleSelection(this.focusIndex, e.metaKey || e.ctrlKey);
59
+ break;
60
+ case "End":
61
+ case "PageDown":
62
+ this.focusIndex = this.items.length - 1;
63
+ break;
64
+ case "Home":
65
+ case "PageUp":
66
+ this.focusIndex = 0;
67
+ break;
68
+ default:
69
+ t = !1;
70
+ break;
71
+ }
72
+ t && (e.preventDefault(), e.stopPropagation());
73
+ }, this._fallbackId = o.ID + "_" + m++, this.addEventListener("pointerup", (e) => {
74
+ this.focusIndex = this.getListItems.indexOf(e.target), this.updateFocusedElement();
75
+ }), this.addEventListener("focus", () => {
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());
77
+ }), this.addEventListener("blur", () => this.removeFocusedItemAttributes());
78
+ }
79
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
80
+ get items() {
81
+ return this._items;
82
+ }
83
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
84
+ set items(e) {
85
+ this._items = e, this.render();
86
+ }
87
+ get itemGenerator() {
88
+ return this._itemGenerator;
89
+ }
90
+ set itemGenerator(e) {
91
+ this._itemGenerator = e, this.render();
92
+ }
93
+ get selectionType() {
94
+ return this.getAttribute("selection-type");
95
+ }
96
+ set selectionType(e) {
97
+ e ? this.setAttribute("selection-type", e) : this.removeAttribute("selection-type");
98
+ }
99
+ get focusIndex() {
100
+ return this.hasAttribute("focus-index") ? Number(this.getAttribute("focus-index")) : -1;
101
+ }
102
+ set focusIndex(e) {
103
+ 0 <= e && e < this.getListItems.length ? this.setAttribute("focus-index", e.toString()) : this.removeAttribute("focus-index");
104
+ }
105
+ get focusTarget() {
106
+ return this.hasAttribute("focus-target");
107
+ }
108
+ set focusTarget(e) {
109
+ this.toggleAttribute("focus-target", e);
110
+ }
111
+ getListItem(e) {
112
+ return this.shadowRoot ? this.getListItems[e] : null;
113
+ }
114
+ get getListItems() {
115
+ return Array.prototype.slice.call(this.children).filter((e) => !this.isSeparator(e));
116
+ }
117
+ get selectedIndexes() {
118
+ return this._selectedIndexes;
119
+ }
120
+ set selectedIndexes(e) {
121
+ const t = this._selectedIndexes || [];
122
+ this._selectedIndexes = e || [], t.filter((s) => !this._selectedIndexes.includes(s)).forEach((s) => {
123
+ this.setSelectedAttr(this.getListItem(s), !1);
124
+ }), this._selectedIndexes.filter((s) => !t.includes(s)).forEach((s) => {
125
+ this.setSelectedAttr(this.getListItem(s), !0);
126
+ });
127
+ }
128
+ static get observedAttributes() {
129
+ return ["focus-index", "focus-target"];
130
+ }
131
+ is() {
132
+ return o.ID;
133
+ }
134
+ template() {
135
+ const e = document.createElement("template");
136
+ return e.innerHTML = f, e;
137
+ }
138
+ removeFocusedItemAttributes() {
139
+ if (this.focusIndex != -1) {
140
+ const e = this.getListItem(this.focusIndex);
141
+ e && (e.removeAttribute("focused"), this.removeAttribute("aria-activedescendant"));
142
+ }
143
+ }
144
+ connectedCallback() {
145
+ super.connectedCallback(), this.defaultSlot.addEventListener("slotchange", this.onDefaultSlotChange), this.hasAttribute("role") || this.setAttribute("role", "listbox"), this.id || (this.id = this._fallbackId), this.render(), this.addEventListener("keydown", this.handleKeyDown), this.selectionType || (this.selectionType = "trigger-only");
146
+ }
147
+ get defaultSlot() {
148
+ return this.shadowRoot.querySelector("#default-slot");
149
+ }
150
+ isSeparator(e) {
151
+ return e.tagName == "HR" || e.getAttribute("role") == "separator";
152
+ }
153
+ attributeChangedCallback(e, t, s) {
154
+ if (e === "focus-index") {
155
+ const i = this.getListItem(t);
156
+ i && i.removeAttribute("focused"), this.updateFocusedElement();
157
+ } else
158
+ e === "focus-target" && (this.focusTarget ? this.updateFocusedElement() : document.activeElement != this && this.removeFocusedItemAttributes());
159
+ }
160
+ increaseWidthIfNeeded() {
161
+ window.requestAnimationFrame(() => {
162
+ let e = Number.MAX_SAFE_INTEGER;
163
+ const t = getComputedStyle(this).maxWidth, s = this.offsetWidth;
164
+ t.endsWith("px") && (e = Number.parseInt(t) - s);
165
+ const i = this.style.width;
166
+ if (e == 0 || i.endsWith("px") && s < Number.parseInt(i))
167
+ this.enableLineClampOnItemsIfNeeded();
168
+ else {
169
+ const n = [...this.querySelectorAll("[slot='items']")].map((r) => {
170
+ if (r instanceof d) {
171
+ r.enableLineClamp = !1;
172
+ const a = r.missingWidthForTexts;
173
+ return a > e && (r.enableLineClamp = !0), a;
174
+ }
175
+ }), l = Math.max(...n);
176
+ if (l > 0) {
177
+ const r = s + l;
178
+ this.style.width = `${r}px`, this.offsetWidth < r && this.enableLineClampOnItemsIfNeeded();
179
+ }
180
+ }
181
+ });
182
+ }
183
+ enableLineClampOnItemsIfNeeded() {
184
+ this.querySelectorAll("[slot='items']").forEach((e) => {
185
+ e instanceof d && (e.enableLineClamp = e.enableLineClamp || e.missingWidthForTexts > 0);
186
+ });
187
+ }
188
+ render() {
189
+ if (!this.isConnected || !this.items)
190
+ return;
191
+ this.querySelectorAll("[slot='items']").forEach((s) => {
192
+ this.removeChild(s);
193
+ });
194
+ const e = document.createDocumentFragment();
195
+ let t = 0;
196
+ 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);
199
+ }), this.appendChild(e), this.updateFocusedElement();
200
+ }
201
+ initListItem(e, t) {
202
+ this.setSelectedAttr(e, this.selectedIndexes.includes(t)), e.addEventListener("click", (s) => {
203
+ this.handleItemClick(s, t);
204
+ }), e.addEventListener("mousedown", (s) => {
205
+ s.button == 1 && s.preventDefault();
206
+ }), e.addEventListener("auxclick", (s) => {
207
+ this.handleItemClick(s, t);
208
+ }), (!e.id || e.id.startsWith(this.id + "_item_")) && (e.id = this.id + "_item_" + t);
209
+ }
210
+ ensureItemVisible(e) {
211
+ const t = e.getBoundingClientRect(), s = this.getBoundingClientRect();
212
+ t.bottom > s.bottom ? this.scrollTop += t.bottom - s.bottom : t.top < s.top && (this.scrollTop -= s.top - t.top);
213
+ }
214
+ updateFocusedElement() {
215
+ const e = this.getListItem(this.focusIndex);
216
+ e && (this.focusTarget || document.activeElement == this) ? (e.setAttribute("focused", ""), this.setAttribute("aria-activedescendant", e.id), this.ensureItemVisible(e)) : this.removeAttribute("aria-activedescendant");
217
+ }
218
+ handleItemClick(e, t) {
219
+ if (e.button !== null) {
220
+ const s = e.type == "auxclick" && e.button == 1 || e.metaKey || e.ctrlKey;
221
+ (e.button == 0 || e.button == 1) && this.handleSelection(t, s);
222
+ }
223
+ }
224
+ handleSelection(e, t) {
225
+ const s = this.items[e];
226
+ if (!s || s.disabled)
227
+ 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(
230
+ new CustomEvent("selection", {
231
+ detail: {
232
+ index: e,
233
+ selected: this.selectionType == "trigger-only" || !n,
234
+ hasModifier: t
235
+ },
236
+ bubbles: !0,
237
+ composed: !0
238
+ })
239
+ );
240
+ }
241
+ removeFromSelectedIndexes(e) {
242
+ const t = this._selectedIndexes.indexOf(e);
243
+ t !== -1 && this._selectedIndexes.splice(t, 1);
244
+ }
245
+ toggleSelection(e) {
246
+ const t = !e.hasAttribute("selected");
247
+ return this.setSelectedAttr(e, t), t;
248
+ }
249
+ setSelectedAttr(e, t) {
250
+ e && (t ? e.setAttribute("selected", "") : e.removeAttribute("selected"), e.setAttribute("aria-selected", String(t)));
251
+ }
252
+ isSelected(e) {
253
+ return e.hasAttribute("selected");
254
+ }
255
+ };
256
+ o.ID = "sd-list", o.ensureDefined = () => {
257
+ d.ensureDefined(), customElements.get(o.ID) || customElements.define(o.ID, o);
258
+ };
259
+ let c = o;
260
+ c.ensureDefined();
261
+ export {
262
+ c as default
263
+ };
264
+ //# sourceMappingURL=list.mjs.map
@@ -0,0 +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,KA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GAAuB;AACrD,UAAMjC,IAAQ,KAAK,iBAAiB,QAAQiC,CAAa;AACzD,IAAIjC,MAAU,MACL,KAAA,iBAAiB,OAAOA,GAAO,CAAC;AAAA,EAE7C;AAAA,EAEQ,gBAAgBW,GAA2B;AAC/C,UAAMuB,IAAW,CAACvB,EAAQ,aAAa,UAAU;AAC5C,gBAAA,gBAAgBA,GAASuB,CAAQ,GAC/BA;AAAA,EACX;AAAA,EAEQ,gBAAgBvB,GAAkBuB,GAAmB;AACzD,IAAIvB,MACIuB,IACQvB,EAAA,aAAa,YAAY,EAAE,IAEnCA,EAAQ,gBAAgB,UAAU,GAEtCA,EAAQ,aAAa,iBAAiB,OAAOuB,CAAQ,CAAC;AAAA,EAE9D;AAAA,EAEQ,WAAWvB,GAA2B;AACnC,WAAAA,EAAQ,aAAa,UAAU;AAAA,EAC1C;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;"}
@@ -0,0 +1,192 @@
1
+ {
2
+ "@cypress/vite-dev-server@5.0.7": {
3
+ "licenses": "MIT",
4
+ "repository": "https://github.com/cypress-io/cypress",
5
+ "licenseUrl": "https://github.com/cypress-io/cypress/tree/develop/npm/vite-dev-server#readme"
6
+ },
7
+ "@rollup/plugin-node-resolve@15.2.3": {
8
+ "licenses": "MIT",
9
+ "repository": "https://github.com/rollup/plugins",
10
+ "licenseUrl": "https://github.com/rollup/plugins/raw/HEAD/LICENSE"
11
+ },
12
+ "@types/node@20.10.6": {
13
+ "licenses": "MIT",
14
+ "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped",
15
+ "licenseUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/raw/HEAD/LICENSE"
16
+ },
17
+ "@types/postcss-prefix-selector@1.16.3": {
18
+ "licenses": "MIT",
19
+ "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped",
20
+ "licenseUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/raw/HEAD/LICENSE"
21
+ },
22
+ "@typescript-eslint/eslint-plugin@6.17.0": {
23
+ "licenses": "MIT",
24
+ "repository": "https://github.com/typescript-eslint/typescript-eslint",
25
+ "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
26
+ },
27
+ "@typescript-eslint/parser@6.17.0": {
28
+ "licenses": "BSD-2-Clause",
29
+ "repository": "https://github.com/typescript-eslint/typescript-eslint",
30
+ "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
31
+ },
32
+ "@vitest/coverage-v8@1.1.1": {
33
+ "licenses": "MIT",
34
+ "repository": "https://github.com/vitest-dev/vitest",
35
+ "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE"
36
+ },
37
+ "@vitest/ui@1.1.1": {
38
+ "licenses": "MIT",
39
+ "repository": "https://github.com/vitest-dev/vitest",
40
+ "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE"
41
+ },
42
+ "axe-core@4.8.3": {
43
+ "licenses": "MPL-2.0",
44
+ "repository": "https://github.com/dequelabs/axe-core",
45
+ "licenseUrl": "https://github.com/dequelabs/axe-core/raw/HEAD/LICENSE"
46
+ },
47
+ "cypress-axe@1.5.0": {
48
+ "licenses": "MIT",
49
+ "repository": "https://github.com/component-driven/cypress-axe",
50
+ "licenseUrl": "https://github.com/component-driven/cypress-axe/raw/HEAD/License.md"
51
+ },
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": {
58
+ "licenses": "MIT",
59
+ "repository": "https://github.com/cypress-io/cypress",
60
+ "licenseUrl": "https://cypress.io"
61
+ },
62
+ "esbuild@0.19.11": {
63
+ "licenses": "MIT",
64
+ "repository": "https://github.com/evanw/esbuild",
65
+ "licenseUrl": "https://github.com/evanw/esbuild/raw/HEAD/LICENSE.md"
66
+ },
67
+ "eslint-config-google@0.14.0": {
68
+ "licenses": "Apache-2.0",
69
+ "repository": "https://github.com/google/eslint-config-google",
70
+ "licenseUrl": "https://github.com/google/eslint-config-google/raw/HEAD/LICENSE"
71
+ },
72
+ "eslint-config-prettier@9.1.0": {
73
+ "licenses": "MIT",
74
+ "repository": "https://github.com/prettier/eslint-config-prettier",
75
+ "licenseUrl": "https://github.com/prettier/eslint-config-prettier/raw/HEAD/LICENSE"
76
+ },
77
+ "eslint@8.56.0": {
78
+ "licenses": "MIT",
79
+ "repository": "https://github.com/eslint/eslint",
80
+ "licenseUrl": "https://github.com/eslint/eslint/raw/HEAD/LICENSE"
81
+ },
82
+ "github-markdown-css@5.5.0": {
83
+ "licenses": "MIT",
84
+ "repository": "https://github.com/sindresorhus/github-markdown-css",
85
+ "licenseUrl": "https://github.com/sindresorhus/github-markdown-css/raw/HEAD/license"
86
+ },
87
+ "highlight.js@11.9.0": {
88
+ "licenses": "BSD-3-Clause",
89
+ "repository": "https://github.com/highlightjs/highlight.js",
90
+ "licenseUrl": "https://github.com/highlightjs/highlight.js/raw/HEAD/LICENSE"
91
+ },
92
+ "junit-report-builder@3.1.0": {
93
+ "licenses": "MIT",
94
+ "repository": "https://github.com/davidparsson/junit-report-builder",
95
+ "licenseUrl": "https://github.com/davidparsson/junit-report-builder/raw/HEAD/LICENSE"
96
+ },
97
+ "lint-staged@15.2.0": {
98
+ "licenses": "MIT",
99
+ "repository": "https://github.com/okonet/lint-staged",
100
+ "licenseUrl": "https://github.com/okonet/lint-staged/raw/HEAD/LICENSE"
101
+ },
102
+ "lit@2.8.0": {
103
+ "licenses": "BSD-3-Clause",
104
+ "repository": "https://github.com/lit/lit",
105
+ "licenseUrl": "https://github.com/lit/lit/raw/HEAD/LICENSE"
106
+ },
107
+ "marked@11.1.1": {
108
+ "licenses": "MIT",
109
+ "repository": "https://github.com/markedjs/marked",
110
+ "licenseUrl": "https://github.com/markedjs/marked/raw/HEAD/LICENSE.md"
111
+ },
112
+ "postcss-prefix-selector@1.16.0": {
113
+ "licenses": "MIT",
114
+ "repository": "https://github.com/RadValentin/postcss-prefix-selector",
115
+ "licenseUrl": "https://github.com/RadValentin/postcss-prefix-selector/raw/HEAD/LICENSE"
116
+ },
117
+ "postcss@8.4.32": {
118
+ "licenses": "MIT",
119
+ "repository": "https://github.com/postcss/postcss",
120
+ "licenseUrl": "https://github.com/postcss/postcss/raw/HEAD/LICENSE"
121
+ },
122
+ "prettier@3.1.1": {
123
+ "licenses": "MIT",
124
+ "repository": "https://github.com/prettier/prettier",
125
+ "licenseUrl": "https://github.com/prettier/prettier/raw/HEAD/LICENSE"
126
+ },
127
+ "resolve-pkg@2.0.0": {
128
+ "licenses": "MIT",
129
+ "repository": "https://github.com/sindresorhus/resolve-pkg",
130
+ "licenseUrl": "https://github.com/sindresorhus/resolve-pkg/raw/HEAD/license"
131
+ },
132
+ "sass@1.69.6": {
133
+ "licenses": "MIT",
134
+ "repository": "https://github.com/sass/dart-sass",
135
+ "licenseUrl": "https://github.com/sass/dart-sass/raw/HEAD/LICENSE"
136
+ },
137
+ "stylelint-config-recommended-scss@14.0.0": {
138
+ "licenses": "MIT",
139
+ "repository": "https://github.com/stylelint-scss/stylelint-config-recommended-scss",
140
+ "licenseUrl": "https://github.com/stylelint-scss/stylelint-config-recommended-scss/raw/HEAD/LICENSE"
141
+ },
142
+ "stylelint-config-standard@36.0.0": {
143
+ "licenses": "MIT",
144
+ "repository": "https://github.com/stylelint/stylelint-config-standard",
145
+ "licenseUrl": "https://github.com/stylelint/stylelint-config-standard/raw/HEAD/LICENSE"
146
+ },
147
+ "stylelint-scss@6.0.0": {
148
+ "licenses": "MIT",
149
+ "repository": "https://github.com/stylelint-scss/stylelint-scss",
150
+ "licenseUrl": "https://github.com/stylelint-scss/stylelint-scss/raw/HEAD/LICENSE"
151
+ },
152
+ "stylelint@16.1.0": {
153
+ "licenses": "MIT",
154
+ "repository": "https://github.com/stylelint/stylelint",
155
+ "licenseUrl": "https://github.com/stylelint/stylelint/raw/HEAD/LICENSE"
156
+ },
157
+ "tsup@8.0.1": {
158
+ "licenses": "MIT",
159
+ "repository": "https://github.com/egoist/tsup",
160
+ "licenseUrl": "https://github.com/egoist/tsup/raw/HEAD/LICENSE"
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"
166
+ },
167
+ "typescript@5.3.3": {
168
+ "licenses": "Apache-2.0",
169
+ "repository": "https://github.com/Microsoft/TypeScript",
170
+ "licenseUrl": "https://github.com/Microsoft/TypeScript/raw/HEAD/LICENSE.txt"
171
+ },
172
+ "vite-tsconfig-paths@4.2.3": {
173
+ "licenses": "MIT",
174
+ "repository": "https://github.com/aleclarson/vite-tsconfig-paths",
175
+ "licenseUrl": "https://github.com/aleclarson/vite-tsconfig-paths/raw/HEAD/LICENSE"
176
+ },
177
+ "vite@5.0.10": {
178
+ "licenses": "MIT",
179
+ "repository": "https://github.com/vitejs/vite",
180
+ "licenseUrl": "https://github.com/vitejs/vite/raw/HEAD/LICENSE.md"
181
+ },
182
+ "vitest@1.1.1": {
183
+ "licenses": "MIT",
184
+ "repository": "https://github.com/vitest-dev/vitest",
185
+ "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE.md"
186
+ },
187
+ "yargs@17.7.2": {
188
+ "licenses": "MIT",
189
+ "repository": "https://github.com/yargs/yargs",
190
+ "licenseUrl": "https://github.com/yargs/yargs/raw/HEAD/LICENSE"
191
+ }
192
+ }
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@cas-smartdesign/list",
3
+ "version": "6.3.0",
4
+ "description": "A list element with SmartDesign look and feel.",
5
+ "main": "dist/list-with-externals.js",
6
+ "module": "dist/list.mjs",
7
+ "license": "SEE LICENSE IN LICENSE",
8
+ "types": "dist/list.d.ts",
9
+ "dependencies": {
10
+ "@cas-smartdesign/element-base": "^5.0.1",
11
+ "@cas-smartdesign/list-item": "^7.2.2"
12
+ },
13
+ "devDependencies": {
14
+ "@cas-smartdesign/element-utils": "^1.0.2",
15
+ "@cas-smartdesign/element-preview": "^0.2.1",
16
+ "@cas-smartdesign/license-generator": "^1.6.1"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "npm-third-party-licenses.json"
21
+ ],
22
+ "publishConfig": {
23
+ "registry": "https://registry.npmjs.org/",
24
+ "access": "public"
25
+ },
26
+ "scripts": {
27
+ "version": "pnpm version",
28
+ "generate-declaration": "tsc -p tsconfig.types.json",
29
+ "build:no-license": "vite build && pnpm generate-declaration && vite build --mode documentation",
30
+ "build": "pnpm generate-license && pnpm build:no-license",
31
+ "watch": "vite build --watch",
32
+ "dev": "vite",
33
+ "generate-license": "sd-license-generator --r ../../"
34
+ }
35
+ }