@rcarls/rc-listbox 0.2.0 → 0.3.1

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.
@@ -0,0 +1,337 @@
1
+ import { LitElement as d, css as u, html as p } from "lit";
2
+ import { property as n } from "lit/decorators.js";
3
+ import { ItemsCollectionController as _, ActiveDescendantController as m } from "@rcarls/rc-common";
4
+ var v = Object.defineProperty, a = (c, t, e, i) => {
5
+ for (var l = void 0, o = c.length - 1, h; o >= 0; o--)
6
+ (h = c[o]) && (l = h(t, e, l) || l);
7
+ return l && v(t, e, l), l;
8
+ };
9
+ let b = 0;
10
+ const f = `
11
+ @layer rc-base {
12
+ rc-listbox ul {
13
+ list-style: none;
14
+ margin: 0;
15
+ padding: 0;
16
+ }
17
+
18
+ rc-listbox li[role='option'] {
19
+ display: flex;
20
+ align-items: center;
21
+ gap: var(--rc-listbox-option-gap, 0.25rem);
22
+ min-block-size: var(--rc-listbox-option-min-block-size, 0px);
23
+ padding: var(--rc-listbox-option-padding-block, 2px) var(--rc-listbox-option-padding-inline, 4px);
24
+ cursor: default;
25
+ user-select: none;
26
+ outline: none;
27
+ background: transparent;
28
+ color: inherit;
29
+ transition: var(--rc-listbox-option-transition);
30
+ }
31
+
32
+ rc-listbox li[role='option']:hover {
33
+ background: var(--rc-listbox-hover-bg, color-mix(in srgb, Highlight 8%, transparent));
34
+ color: var(--rc-listbox-hover-color, inherit);
35
+ }
36
+
37
+ rc-listbox li[role='option'][data-active] {
38
+ background: var(--rc-listbox-active-bg, color-mix(in srgb, Highlight 8%, transparent));
39
+ color: var(--rc-listbox-active-color, var(--rc-listbox-hover-color, inherit));
40
+ }
41
+
42
+ rc-listbox li[role='option'][aria-selected='true'] {
43
+ background: var(--rc-listbox-selected-bg, Highlight);
44
+ color: var(--rc-listbox-selected-color, HighlightText);
45
+ }
46
+
47
+ rc-listbox li[role='option'][aria-disabled='true'] {
48
+ color: var(--rc-listbox-disabled-color, GrayText);
49
+ opacity: var(--rc-listbox-disabled-opacity, 1);
50
+ pointer-events: none;
51
+ }
52
+
53
+ rc-listbox [part~='option-checkmark'] {
54
+ display: none;
55
+ min-inline-size: 1em;
56
+ text-align: center;
57
+ }
58
+
59
+ rc-listbox[checkmark] [part~='option-checkmark'] {
60
+ display: inline;
61
+ visibility: hidden;
62
+ }
63
+
64
+ rc-listbox[checkmark] li[role='option'][aria-selected='true'] [part~='option-checkmark'] {
65
+ visibility: visible;
66
+ }
67
+ }
68
+ `;
69
+ var s;
70
+ const r = (s = class extends d {
71
+ constructor() {
72
+ super(...arguments), this.multiple = !1, this.checkmark = !1, this.filterStrategy = "contains", this._selectionInitialized = !1, this._filterText = "", this._uid = `rc-lb-${++b}`, this._itemsCollectionCtrl = new _(this, {
73
+ idPrefix: this._uid,
74
+ onInitFromDom: () => this._applySelectionFromSource(),
75
+ onActivate: (t) => this._handleActivate(t)
76
+ }), this._activeDescendantCtrl = new m(this, {
77
+ host: () => this,
78
+ items: () => this.navigableItems
79
+ }), this._onBlur = () => {
80
+ this._activeDescendantCtrl.clear();
81
+ }, this._onKeydown = (t) => {
82
+ if (!(t.altKey || t.ctrlKey || t.metaKey))
83
+ switch (t.key) {
84
+ case "ArrowDown": {
85
+ t.preventDefault(), this._activeDescendantCtrl.activeItem ? this._activeDescendantCtrl.navigate(1) : this._activeDescendantCtrl.navigateToFirst(), this.multiple || this._selectActiveItem();
86
+ break;
87
+ }
88
+ case "ArrowUp": {
89
+ t.preventDefault(), this._activeDescendantCtrl.activeItem ? this._activeDescendantCtrl.navigate(-1) : this._activeDescendantCtrl.navigateToLast(), this.multiple || this._selectActiveItem();
90
+ break;
91
+ }
92
+ case "Home": {
93
+ t.preventDefault(), this._activeDescendantCtrl.navigateToFirst(), this.multiple || this._selectActiveItem();
94
+ break;
95
+ }
96
+ case "End": {
97
+ t.preventDefault(), this._activeDescendantCtrl.navigateToLast(), this.multiple || this._selectActiveItem();
98
+ break;
99
+ }
100
+ case " ":
101
+ case "Enter": {
102
+ t.preventDefault();
103
+ const e = this._activeOption();
104
+ if (!e)
105
+ break;
106
+ e.kind === "action" ? this._dispatchAction(e) : this.multiple ? this.toggleOption(e.value) : this._selectActiveItem();
107
+ break;
108
+ }
109
+ }
110
+ };
111
+ }
112
+ static _ensureBaseStyles(t) {
113
+ if (s._styledRoots.has(t)) return;
114
+ s._styledRoots.add(t);
115
+ const e = document.createElement("style");
116
+ e.setAttribute("data-rc-light-dom-base", "rc-listbox"), e.textContent = f, t instanceof Document ? t.head.appendChild(e) : t.appendChild(e);
117
+ }
118
+ connectedCallback() {
119
+ super.connectedCallback(), s._ensureBaseStyles(this.getRootNode()), this.hasAttribute("role") || this.setAttribute("role", "listbox"), this.addEventListener("keydown", this._onKeydown), this.addEventListener("blur", this._onBlur);
120
+ }
121
+ disconnectedCallback() {
122
+ super.disconnectedCallback(), this.removeEventListener("keydown", this._onKeydown), this.removeEventListener("blur", this._onBlur);
123
+ }
124
+ updated(t) {
125
+ t.has("multiple") && (this.multiple ? this.setAttribute("aria-multiselectable", "true") : this.removeAttribute("aria-multiselectable")), t.has("checkmark") && (this._itemsCollectionCtrl.checkmark = this.checkmark);
126
+ }
127
+ render() {
128
+ return p`<slot></slot>`;
129
+ }
130
+ /** All options regardless of filter state. */
131
+ get allOptions() {
132
+ return this._itemsCollectionCtrl.allOptions;
133
+ }
134
+ /** Options currently passing the active filter. */
135
+ get filteredOptions() {
136
+ return this._filterText ? this._itemsCollectionCtrl.allOptions.filter((e) => this._isVisible(e)) : [...this._itemsCollectionCtrl.allOptions];
137
+ }
138
+ /** Replace the full options list. */
139
+ get options() {
140
+ return [...this._itemsCollectionCtrl.allOptions];
141
+ }
142
+ /** Replace the full options list. */
143
+ set options(t) {
144
+ this._itemsCollectionCtrl.setOptions([...t]), this._applySelectionFromSource();
145
+ }
146
+ /** Append a single option without replacing the list. */
147
+ appendOption(t) {
148
+ this._itemsCollectionCtrl.appendOption(t);
149
+ }
150
+ /** Current selection as a consistently-array-shaped read-only view. */
151
+ get selectedValues() {
152
+ return this._itemsCollectionCtrl.selectedValues;
153
+ }
154
+ /** Current selection. Host writes update silently. */
155
+ get value() {
156
+ return this.multiple ? this.selectedValues : this.selectedValues[0] ?? "";
157
+ }
158
+ /** Current selection. Host writes update silently. */
159
+ set value(t) {
160
+ this._value = t, t !== void 0 && (this._selectionInitialized = !0, this._applySelection(this._normalizeValue(t)));
161
+ }
162
+ /** Initial uncontrolled selection. */
163
+ get defaultValue() {
164
+ return this._defaultValue;
165
+ }
166
+ /** Initial uncontrolled selection. */
167
+ set defaultValue(t) {
168
+ this._defaultValue = t, !this._selectionInitialized && this._value === void 0 && t !== void 0 && this._applySelection(this._normalizeValue(t));
169
+ }
170
+ /** Replace the selection set without firing `rc-listbox-change`. */
171
+ setSelectedValues(t) {
172
+ this._applySelection(t);
173
+ }
174
+ /**
175
+ * Toggle the selected state of the option with `value`.
176
+ * In single-select mode, toggling a selected item deselects it (and selects
177
+ * the new item). Fires `rc-listbox-change`.
178
+ */
179
+ toggleOption(t) {
180
+ const e = this._itemsCollectionCtrl.allOptions.find((l) => l.value === t);
181
+ if (!e || e.kind === "action" || e.disabled) return;
182
+ const i = this._itemsCollectionCtrl.isSelected(t);
183
+ if (this.multiple) {
184
+ const l = new Set(this._itemsCollectionCtrl.selectedValues);
185
+ i ? l.delete(t) : l.add(t), this._itemsCollectionCtrl.setSelectedValues([...l]);
186
+ } else
187
+ this._itemsCollectionCtrl.setSelectedValues(i ? [] : [t]);
188
+ this._selectionInitialized = !0, this._dispatchChange(e, !i);
189
+ }
190
+ /** Clears all selected values without firing `rc-listbox-change`. */
191
+ clearSelection() {
192
+ this._applySelection([]);
193
+ }
194
+ /** Filter visible options to those whose label matches `text` (case-insensitive). */
195
+ filterOptions(t) {
196
+ this._filterText = t, this._itemsCollectionCtrl.filterOptions(t, this.filterStrategy);
197
+ }
198
+ /** Removes any active filter, making all options visible. */
199
+ clearFilter() {
200
+ this._filterText = "", this._itemsCollectionCtrl.clearFilter();
201
+ }
202
+ /**
203
+ * Ordered list of currently navigable option elements (visible and not disabled).
204
+ *
205
+ * Feed this to `ActiveDescendantController.items` in the parent component.
206
+ * Includes the create option element when one is set.
207
+ */
208
+ get navigableItems() {
209
+ return this._itemsCollectionCtrl.navigableItems;
210
+ }
211
+ /**
212
+ * Show or hide the "Create" option at the end of the list.
213
+ *
214
+ * Pass `null` to hide it, or a non-empty string to show `Create "{label}"`.
215
+ * Fires `rc-listbox-change` with `reason: 'action'` and `action: 'create'`
216
+ * when activated.
217
+ */
218
+ setCreateOption(t) {
219
+ this._itemsCollectionCtrl.setCreateOption(t);
220
+ }
221
+ /** Routes pointer activations from the controller. */
222
+ _handleActivate(t) {
223
+ t.kind === "action" ? this._dispatchAction(t) : this.toggleOption(t.value);
224
+ }
225
+ /**
226
+ * Selects the active-descendant item without toggling.
227
+ *
228
+ * Used by arrow-key navigation so the item under the cursor is always selected.
229
+ */
230
+ _selectActiveItem() {
231
+ const t = this._activeOption();
232
+ if (!t || t.kind === "action" || t.disabled) return;
233
+ const e = t.value, i = this._itemsCollectionCtrl.selectedValues;
234
+ i.length === 1 && i[0] === e || (this._itemsCollectionCtrl.setSelectedValues([e]), this._selectionInitialized = !0, this._dispatchChange(t, !0));
235
+ }
236
+ /**
237
+ * Returns `true` when `opt` passes the current `_filterText` and `filterStrategy`.
238
+ */
239
+ _isVisible(t) {
240
+ if (!this._filterText) return !0;
241
+ const e = t.label.toLowerCase(), i = this._filterText.toLowerCase();
242
+ return typeof this.filterStrategy == "function" ? this.filterStrategy(e, i) : this.filterStrategy === "contains" ? e.includes(i) : e.startsWith(i);
243
+ }
244
+ /**
245
+ * Directly replaces the selection without firing an event.
246
+ *
247
+ * Enforces the single-select limit when `multiple` is false.
248
+ */
249
+ _applySelection(t) {
250
+ this._itemsCollectionCtrl.setSelectedValues(this.multiple ? t : t.slice(0, 1));
251
+ }
252
+ /**
253
+ * Re-applies `_value` or `_defaultValue` after `options` or DOM bootstrap changes.
254
+ */
255
+ _applySelectionFromSource() {
256
+ if (this._value !== void 0) {
257
+ this._applySelection(this._normalizeValue(this._value));
258
+ return;
259
+ }
260
+ !this._selectionInitialized && this._defaultValue !== void 0 && (this._selectionInitialized = !0, this._applySelection(this._normalizeValue(this._defaultValue)));
261
+ }
262
+ /** Coerces a `string | string[]` value to `string[]`. */
263
+ _normalizeValue(t) {
264
+ return Array.isArray(t) ? t : t ? [t] : [];
265
+ }
266
+ _activeOption() {
267
+ const t = this._activeDescendantCtrl.activeItem;
268
+ return t ? this._itemsCollectionCtrl.optionForElement(t) : null;
269
+ }
270
+ /** Fires `rc-listbox-change` for a command/action row without mutating selection. */
271
+ _dispatchAction(t) {
272
+ this.dispatchEvent(
273
+ new CustomEvent("rc-listbox-change", {
274
+ bubbles: !0,
275
+ composed: !0,
276
+ detail: {
277
+ reason: "action",
278
+ value: this.value,
279
+ selected: !1,
280
+ optionValue: t.value,
281
+ option: t,
282
+ action: t.action,
283
+ selectedValues: this.selectedValues,
284
+ selectedOptions: this._selectedOptionsFor(this.selectedValues)
285
+ }
286
+ })
287
+ );
288
+ }
289
+ /** Fires `rc-listbox-change` with a fully-populated detail object. */
290
+ _dispatchChange(t, e) {
291
+ this.dispatchEvent(
292
+ new CustomEvent("rc-listbox-change", {
293
+ bubbles: !0,
294
+ composed: !0,
295
+ detail: {
296
+ reason: "select",
297
+ value: this.value,
298
+ selected: e,
299
+ optionValue: t.value,
300
+ option: t,
301
+ selectedValues: this.selectedValues,
302
+ selectedOptions: this._selectedOptionsFor(this.selectedValues)
303
+ }
304
+ })
305
+ );
306
+ }
307
+ /**
308
+ * Maps value strings to their `ListboxOption` objects.
309
+ * Creates synthetic `{ value, label: value }` entries for values not in the list.
310
+ */
311
+ _selectedOptionsFor(t) {
312
+ return t.map(
313
+ (e) => this._itemsCollectionCtrl.allOptions.find(
314
+ (i) => i.kind !== "action" && i.value === e
315
+ ) ?? { value: e, label: e }
316
+ );
317
+ }
318
+ }, s.styles = u`
319
+ :host {
320
+ display: block;
321
+ overflow-y: auto;
322
+ }
323
+ `, s._styledRoots = /* @__PURE__ */ new Set(), s);
324
+ a([
325
+ n({ type: Boolean, reflect: !0 })
326
+ ], r.prototype, "multiple");
327
+ a([
328
+ n({ type: Boolean, reflect: !0 })
329
+ ], r.prototype, "checkmark");
330
+ a([
331
+ n({ attribute: "filter-strategy", reflect: !1 })
332
+ ], r.prototype, "filterStrategy");
333
+ let x = r;
334
+ export {
335
+ x as R
336
+ };
337
+ //# sourceMappingURL=rc-listbox-CTedy14U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rc-listbox-CTedy14U.js","sources":["../src/rc-listbox.ts"],"sourcesContent":["import { LitElement, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport {\n ActiveDescendantController,\n ItemsCollectionController,\n type ItemsCollectionActionOption,\n type ItemsCollectionOption,\n type ItemsCollectionSelectableOption,\n type ItemsCollectionFilterStrategy,\n} from '@rcarls/rc-common';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'rc-listbox': RCListbox;\n }\n}\n\n/** Option shape accepted by `rc-listbox`. */\nexport type ListboxOption = ItemsCollectionOption;\nexport type ListboxSelectableOption = ItemsCollectionSelectableOption;\nexport type ListboxActionOption<Action extends string = string> = ItemsCollectionActionOption & {\n action: Action;\n};\n\n/**\n * Listbox that keeps option DOM in light DOM for aria-activedescendant navigation,\n * following the WAI-ARIA Listbox pattern.\n *\n * - `'prefix'`: label must start with the query (default, matches native `<select>` type-ahead).\n * - `'contains'`: label must contain the query anywhere.\n * - `function`: custom predicate; receives lowercased label and query, return `true` to show the option.\n */\nexport type FilterStrategy = ItemsCollectionFilterStrategy;\n\nexport interface RCListboxSelectChangeEvent {\n reason: 'select';\n\n /** Canonical selected value for single mode, or selected values for multi mode. */\n value: string | string[];\n\n /** Whether the option was selected (false means it was deselected). */\n selected: boolean;\n\n /** The option value that was activated. */\n optionValue: string;\n\n /** The option that was activated. */\n option: ListboxSelectableOption;\n\n /** Selected values array (length=1 for single-selection mode). */\n selectedValues: string[];\n\n /** Selected options. */\n selectedOptions: ListboxSelectableOption[];\n}\n\nexport interface RCListboxActionChangeEvent<Action extends string = string> {\n reason: 'action';\n\n /** Current canonical selected value; action rows do not mutate selection. */\n value: string | string[];\n\n /** Action activations never select the action row. */\n selected: false;\n\n /** The action option value that was activated. */\n optionValue: string;\n\n /** The action option that was activated. */\n option: ListboxActionOption<Action>;\n\n /** The activated action command. */\n action: Action;\n\n /** Selected values array (length=1 for single-selection mode). */\n selectedValues: string[];\n\n /** Selected options. */\n selectedOptions: ListboxSelectableOption[];\n}\n\nexport type RCListboxChangeEvent = RCListboxSelectChangeEvent | RCListboxActionChangeEvent;\n\nlet _uid = 0;\n\n/** Structural CSS injected into the root that contains rc-listbox's light-DOM options. */\nconst LIGHT_DOM_CSS = `\n@layer rc-base {\n rc-listbox ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n rc-listbox li[role='option'] {\n display: flex;\n align-items: center;\n gap: var(--rc-listbox-option-gap, 0.25rem);\n min-block-size: var(--rc-listbox-option-min-block-size, 0px);\n padding: var(--rc-listbox-option-padding-block, 2px) var(--rc-listbox-option-padding-inline, 4px);\n cursor: default;\n user-select: none;\n outline: none;\n background: transparent;\n color: inherit;\n transition: var(--rc-listbox-option-transition);\n }\n\n rc-listbox li[role='option']:hover {\n background: var(--rc-listbox-hover-bg, color-mix(in srgb, Highlight 8%, transparent));\n color: var(--rc-listbox-hover-color, inherit);\n }\n\n rc-listbox li[role='option'][data-active] {\n background: var(--rc-listbox-active-bg, color-mix(in srgb, Highlight 8%, transparent));\n color: var(--rc-listbox-active-color, var(--rc-listbox-hover-color, inherit));\n }\n\n rc-listbox li[role='option'][aria-selected='true'] {\n background: var(--rc-listbox-selected-bg, Highlight);\n color: var(--rc-listbox-selected-color, HighlightText);\n }\n\n rc-listbox li[role='option'][aria-disabled='true'] {\n color: var(--rc-listbox-disabled-color, GrayText);\n opacity: var(--rc-listbox-disabled-opacity, 1);\n pointer-events: none;\n }\n\n rc-listbox [part~='option-checkmark'] {\n display: none;\n min-inline-size: 1em;\n text-align: center;\n }\n\n rc-listbox[checkmark] [part~='option-checkmark'] {\n display: inline;\n visibility: hidden;\n }\n\n rc-listbox[checkmark] li[role='option'][aria-selected='true'] [part~='option-checkmark'] {\n visibility: visible;\n }\n}\n`;\n\n/**\n * A WAI-ARIA listbox component that renders a `<ul role=\"presentation\">`\n * + `<li role=\"option\">` subtree directly into its own light DOM to facilitate\n * `aria-activedescendant` virtual navigation with IDs inside the same document\n * or shadow root.\n *\n * Pre-rendered `<ul>/<li>` children are accepted as a progressive enhancement\n * baseline. The component reads them on first connect if no `options` setter\n * has been called.\n *\n * Consumers drive this component via its JS API:\n * - Set `options` to populate the list\n * - Set `value` / `defaultValue` to manage selection\n * - Call `toggleOption()` for internal keyboard/pointer activation\n * - Call `filterOptions()` to filter visible options\n * - Read `navigableItems` to feed `ActiveDescendantController`\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-listbox rc-listbox docs}\n * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/listbox/ WAI-ARIA Listbox pattern}\n *\n * @slot — Accepts pre-rendered `<ul>` with `<li>` children for progressive enhancement.\n *\n * @fires rc-listbox-change - Fired when an option is activated (clicked or Enter/Space)\n *\n * @csspart option - Individual `<li role=\"option\">` elements\n * @csspart option-checkmark - The checkmark `<span>` inside each option (when `checkmark` is true)\n * @csspart create-option - The \"Create\" option when allow-create is active\n *\n * @cssprop [--rc-listbox-option-gap=0.25rem] - Gap between the checkmark and option label.\n * @cssprop [--rc-listbox-option-min-block-size=0px] - Minimum block size (height) of each option row.\n * @cssprop [--rc-listbox-option-padding-block=2px] - Block-axis padding of each option row.\n * @cssprop [--rc-listbox-option-padding-inline=4px] - Inline-axis padding of each option row.\n * @cssprop [--rc-listbox-option-transition] - CSS transition applied to each option row.\n * @cssprop [--rc-listbox-hover-bg] - Background of a hovered option.\n * @cssprop [--rc-listbox-hover-color] - Text color of a hovered option.\n * @cssprop [--rc-listbox-active-bg] - Background of the keyboard-active option.\n * @cssprop [--rc-listbox-active-color] - Text color of the keyboard-active option.\n * @cssprop [--rc-listbox-selected-bg] - Background of a selected option.\n * @cssprop [--rc-listbox-selected-color] - Text color of a selected option.\n * @cssprop [--rc-listbox-disabled-color] - Text color of a disabled option.\n * @cssprop [--rc-listbox-disabled-opacity] - Opacity of a disabled option.\n */\nexport class RCListbox extends LitElement {\n static override styles = css`\n :host {\n display: block;\n overflow-y: auto;\n }\n `;\n\n private static readonly _styledRoots = new Set<Document | ShadowRoot>();\n\n private static _ensureBaseStyles(root: Document | ShadowRoot): void {\n if (RCListbox._styledRoots.has(root)) return;\n RCListbox._styledRoots.add(root);\n\n const style = document.createElement('style');\n style.setAttribute('data-rc-light-dom-base', 'rc-listbox');\n style.textContent = LIGHT_DOM_CSS;\n\n if (root instanceof Document) {\n root.head.appendChild(style);\n } else {\n root.appendChild(style);\n }\n }\n\n /** Allow multiple selection. Reflected as `aria-multiselectable` on the host. */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * Render a checkmark indicator inside each option element.\n *\n * Hidden by default; enable for combobox / select patterns where the\n * consumer's CSS shows it conditionally via `[aria-selected='true']`.\n */\n @property({ type: Boolean, reflect: true })\n checkmark = false;\n\n /**\n * How option labels are matched against the active filter text.\n *\n * Defaults to `'contains'` (substring). Set to `'prefix'` for starts-with\n * matching, or pass a custom predicate for full control.\n * Function values are JS-only; string values may be set via the\n * `filter-strategy` attribute.\n */\n @property({ attribute: 'filter-strategy', reflect: false })\n filterStrategy: FilterStrategy = 'contains';\n\n private _defaultValue: string | string[] | undefined;\n private _value: string | string[] | undefined;\n private _selectionInitialized = false;\n private _filterText = '';\n\n /** Unique ID prefix for all rendered option elements in this instance. */\n protected readonly _uid = `rc-lb-${++_uid}`;\n\n /** Manages the `<ul>/<li>` option DOM subtree in the component's light DOM. */\n protected readonly _itemsCollectionCtrl = new ItemsCollectionController(this, {\n idPrefix: this._uid,\n onInitFromDom: () => this._applySelectionFromSource(),\n onActivate: (option) => this._handleActivate(option),\n });\n\n /** Active-descendant controller; tracks keyboard focus within the option list. */\n protected readonly _activeDescendantCtrl = new ActiveDescendantController(this, {\n host: () => this,\n items: () => this.navigableItems,\n });\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n RCListbox._ensureBaseStyles(this.getRootNode() as Document | ShadowRoot);\n\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listbox');\n }\n\n this.addEventListener('keydown', this._onKeydown);\n this.addEventListener('blur', this._onBlur);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n\n this.removeEventListener('keydown', this._onKeydown);\n this.removeEventListener('blur', this._onBlur);\n }\n\n override updated(changed: Map<PropertyKey, unknown>): void {\n if (changed.has('multiple')) {\n this.multiple\n ? this.setAttribute('aria-multiselectable', 'true')\n : this.removeAttribute('aria-multiselectable');\n }\n\n if (changed.has('checkmark')) {\n this._itemsCollectionCtrl.checkmark = this.checkmark;\n }\n }\n\n protected override render() {\n return html`<slot></slot>`;\n }\n\n /** All options regardless of filter state. */\n get allOptions(): readonly ListboxOption[] {\n return this._itemsCollectionCtrl.allOptions;\n }\n\n /** Options currently passing the active filter. */\n get filteredOptions(): readonly ListboxOption[] {\n const filterText = this._filterText;\n\n if (!filterText) {\n return [...this._itemsCollectionCtrl.allOptions];\n }\n\n return this._itemsCollectionCtrl.allOptions.filter((option) => this._isVisible(option));\n }\n\n /** Replace the full options list. */\n get options(): ListboxOption[] {\n return [...this._itemsCollectionCtrl.allOptions];\n }\n\n /** Replace the full options list. */\n set options(options: ListboxOption[]) {\n this._itemsCollectionCtrl.setOptions([...options]);\n this._applySelectionFromSource();\n }\n\n /** Append a single option without replacing the list. */\n appendOption(option: ListboxOption): void {\n this._itemsCollectionCtrl.appendOption(option);\n }\n\n /** Current selection as a consistently-array-shaped read-only view. */\n get selectedValues(): string[] {\n return this._itemsCollectionCtrl.selectedValues;\n }\n\n /** Current selection. Host writes update silently. */\n get value(): string | string[] {\n return this.multiple ? this.selectedValues : (this.selectedValues[0] ?? '');\n }\n\n /** Current selection. Host writes update silently. */\n set value(value: string | string[] | undefined) {\n this._value = value;\n\n if (value === undefined) return;\n\n this._selectionInitialized = true;\n this._applySelection(this._normalizeValue(value));\n }\n\n /** Initial uncontrolled selection. */\n get defaultValue(): string | string[] | undefined {\n return this._defaultValue;\n }\n\n /** Initial uncontrolled selection. */\n set defaultValue(value: string | string[] | undefined) {\n this._defaultValue = value;\n\n if (!this._selectionInitialized && this._value === undefined && value !== undefined) {\n this._applySelection(this._normalizeValue(value));\n }\n }\n\n /** Replace the selection set without firing `rc-listbox-change`. */\n setSelectedValues(values: string[]): void {\n this._applySelection(values);\n }\n\n /**\n * Toggle the selected state of the option with `value`.\n * In single-select mode, toggling a selected item deselects it (and selects\n * the new item). Fires `rc-listbox-change`.\n */\n toggleOption(value: string): void {\n const option = this._itemsCollectionCtrl.allOptions.find((opt) => opt.value === value);\n\n if (!option || option.kind === 'action' || option.disabled) return;\n\n const wasSelected = this._itemsCollectionCtrl.isSelected(value);\n\n if (this.multiple) {\n const next = new Set(this._itemsCollectionCtrl.selectedValues);\n\n if (wasSelected) {\n next.delete(value);\n } else {\n next.add(value);\n }\n\n this._itemsCollectionCtrl.setSelectedValues([...next]);\n } else {\n this._itemsCollectionCtrl.setSelectedValues(wasSelected ? [] : [value]);\n }\n\n this._selectionInitialized = true;\n this._dispatchChange(option, !wasSelected);\n }\n\n /** Clears all selected values without firing `rc-listbox-change`. */\n clearSelection(): void {\n this._applySelection([]);\n }\n\n /** Filter visible options to those whose label matches `text` (case-insensitive). */\n filterOptions(text: string): void {\n this._filterText = text;\n this._itemsCollectionCtrl.filterOptions(text, this.filterStrategy);\n }\n\n /** Removes any active filter, making all options visible. */\n clearFilter(): void {\n this._filterText = '';\n this._itemsCollectionCtrl.clearFilter();\n }\n\n /**\n * Ordered list of currently navigable option elements (visible and not disabled).\n *\n * Feed this to `ActiveDescendantController.items` in the parent component.\n * Includes the create option element when one is set.\n */\n get navigableItems(): Element[] {\n return this._itemsCollectionCtrl.navigableItems;\n }\n\n /**\n * Show or hide the \"Create\" option at the end of the list.\n *\n * Pass `null` to hide it, or a non-empty string to show `Create \"{label}\"`.\n * Fires `rc-listbox-change` with `reason: 'action'` and `action: 'create'`\n * when activated.\n */\n setCreateOption(label: string | null): void {\n this._itemsCollectionCtrl.setCreateOption(label);\n }\n\n /** Clears the active descendant when focus leaves the listbox. */\n protected _onBlur = (): void => {\n this._activeDescendantCtrl.clear();\n };\n\n /**\n * Handles arrow-key navigation and Enter/Space activation.\n *\n * Passes modifier-key combos through to parent handlers unchanged.\n */\n protected _onKeydown = (e: KeyboardEvent): void => {\n // Pass modifier-key combos to parent handlers (e.g. Alt+Arrow in rc-transfer-list).\n if (e.altKey || e.ctrlKey || e.metaKey) {\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n\n if (this._activeDescendantCtrl.activeItem) {\n this._activeDescendantCtrl.navigate(1);\n } else {\n this._activeDescendantCtrl.navigateToFirst();\n }\n\n if (!this.multiple) {\n this._selectActiveItem();\n }\n\n break;\n }\n\n case 'ArrowUp': {\n e.preventDefault();\n\n if (this._activeDescendantCtrl.activeItem) {\n this._activeDescendantCtrl.navigate(-1);\n } else {\n this._activeDescendantCtrl.navigateToLast();\n }\n\n if (!this.multiple) {\n this._selectActiveItem();\n }\n\n break;\n }\n\n case 'Home': {\n e.preventDefault();\n\n this._activeDescendantCtrl.navigateToFirst();\n\n if (!this.multiple) {\n this._selectActiveItem();\n }\n\n break;\n }\n\n case 'End': {\n e.preventDefault();\n this._activeDescendantCtrl.navigateToLast();\n\n if (!this.multiple) {\n this._selectActiveItem();\n }\n\n break;\n }\n\n case ' ':\n case 'Enter': {\n e.preventDefault();\n\n const option = this._activeOption();\n\n if (!option) {\n break;\n }\n\n if (option.kind === 'action') {\n this._dispatchAction(option);\n } else if (this.multiple) {\n this.toggleOption(option.value);\n } else {\n this._selectActiveItem();\n }\n\n break;\n }\n }\n };\n\n /** Routes pointer activations from the controller. */\n private _handleActivate(option: ListboxOption): void {\n if (option.kind === 'action') {\n this._dispatchAction(option);\n } else {\n this.toggleOption(option.value);\n }\n }\n\n /**\n * Selects the active-descendant item without toggling.\n *\n * Used by arrow-key navigation so the item under the cursor is always selected.\n */\n protected _selectActiveItem(): void {\n const activeOption = this._activeOption();\n\n if (!activeOption || activeOption.kind === 'action' || activeOption.disabled) return;\n\n const value = activeOption.value;\n const current = this._itemsCollectionCtrl.selectedValues;\n\n if (current.length === 1 && current[0] === value) {\n return;\n }\n\n this._itemsCollectionCtrl.setSelectedValues([value]);\n this._selectionInitialized = true;\n\n this._dispatchChange(activeOption, true);\n }\n\n /**\n * Returns `true` when `opt` passes the current `_filterText` and `filterStrategy`.\n */\n protected _isVisible(option: ListboxOption): boolean {\n if (!this._filterText) return true;\n\n const label = option.label.toLowerCase();\n const query = this._filterText.toLowerCase();\n\n if (typeof this.filterStrategy === 'function') {\n return this.filterStrategy(label, query);\n }\n\n if (this.filterStrategy === 'contains') {\n return label.includes(query);\n }\n\n return label.startsWith(query);\n }\n\n /**\n * Directly replaces the selection without firing an event.\n *\n * Enforces the single-select limit when `multiple` is false.\n */\n protected _applySelection(values: string[]): void {\n this._itemsCollectionCtrl.setSelectedValues(this.multiple ? values : values.slice(0, 1));\n }\n\n /**\n * Re-applies `_value` or `_defaultValue` after `options` or DOM bootstrap changes.\n */\n protected _applySelectionFromSource(): void {\n if (this._value !== undefined) {\n this._applySelection(this._normalizeValue(this._value));\n\n return;\n }\n\n if (!this._selectionInitialized && this._defaultValue !== undefined) {\n this._selectionInitialized = true;\n\n this._applySelection(this._normalizeValue(this._defaultValue));\n }\n }\n\n /** Coerces a `string | string[]` value to `string[]`. */\n protected _normalizeValue(value: string | string[]): string[] {\n return Array.isArray(value) ? value : value ? [value] : [];\n }\n\n protected _activeOption(): ListboxOption | null {\n const active = this._activeDescendantCtrl.activeItem;\n\n return active ? this._itemsCollectionCtrl.optionForElement(active) : null;\n }\n\n /** Fires `rc-listbox-change` for a command/action row without mutating selection. */\n protected _dispatchAction(option: ListboxActionOption): void {\n this.dispatchEvent(\n new CustomEvent<RCListboxActionChangeEvent>('rc-listbox-change', {\n bubbles: true,\n composed: true,\n detail: {\n reason: 'action',\n value: this.value,\n selected: false,\n optionValue: option.value,\n option,\n action: option.action,\n selectedValues: this.selectedValues,\n selectedOptions: this._selectedOptionsFor(this.selectedValues),\n },\n }),\n );\n }\n\n /** Fires `rc-listbox-change` with a fully-populated detail object. */\n protected _dispatchChange(option: ListboxSelectableOption, selected: boolean): void {\n this.dispatchEvent(\n new CustomEvent<RCListboxSelectChangeEvent>('rc-listbox-change', {\n bubbles: true,\n composed: true,\n detail: {\n reason: 'select',\n value: this.value,\n selected,\n optionValue: option.value,\n option,\n selectedValues: this.selectedValues,\n selectedOptions: this._selectedOptionsFor(this.selectedValues),\n },\n }),\n );\n }\n\n /**\n * Maps value strings to their `ListboxOption` objects.\n * Creates synthetic `{ value, label: value }` entries for values not in the list.\n */\n protected _selectedOptionsFor(values: string[]): ListboxSelectableOption[] {\n return values.map(\n (value) =>\n this._itemsCollectionCtrl.allOptions.find(\n (opt): opt is ListboxSelectableOption => opt.kind !== 'action' && opt.value === value,\n ) ?? { value, label: value },\n );\n }\n}\n\nexport default RCListbox;\n"],"names":["_uid","LIGHT_DOM_CSS","_RCListbox","_a","LitElement","ItemsCollectionController","option","ActiveDescendantController","e","root","style","changed","html","options","value","values","opt","wasSelected","next","text","label","activeOption","current","query","active","selected","css","__decorateClass","property","RCListbox"],"mappings":";;;;;;;;AAmFA,IAAIA,IAAO;AAGX,MAAMC,IAAgB;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;AA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AAO,OAAOA,EAAA;AAAA,IAAM;AAAA,EAEjC;AACF,GA/dEX,EAAgB,SAASuB;AAAA;AAAA;AAAA;AAAA;AAAA,KAOzBvB,EAAwB,mCAAmB,IAAA,GARtCA;AA2BLwB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA1B/B1B,EA2BX,WAAA,UAAA;AASAyB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAnC/B1B,EAoCX,WAAA,WAAA;AAWAyB,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,mBAAmB,SAAS,IAAO;AAAA,GA9C/C1B,EA+CX,WAAA,gBAAA;AA/CK,IAAM2B,IAAN3B;"}
@@ -1,4 +1,4 @@
1
- import { R as t } from "./rc-listbox-D1vHntE2.js";
1
+ import { R as t } from "./rc-listbox-CTedy14U.js";
2
2
  customElements.get("rc-listbox") || customElements.define("rc-listbox", t);
3
3
  export {
4
4
  t as RCListbox
@@ -1,4 +1,4 @@
1
- import { R as s } from "./rc-listbox-D1vHntE2.js";
1
+ import { R as s } from "./rc-listbox-CTedy14U.js";
2
2
  export {
3
3
  s as RCListbox
4
4
  };