html-combobox-element 0.0.3 → 0.0.5
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/cjs/combobox/Boolean.attribute.value.normalizer.d.ts +2 -0
- package/dist/cjs/combobox/Combobox.markup.d.ts +35 -0
- package/dist/cjs/combobox/Combobox.markup.js +1 -1
- package/dist/cjs/combobox/HTML.combobox.element.d.ts +60 -0
- package/dist/cjs/combobox/HTML.combobox.element.js +25 -1
- package/dist/cjs/combobox/HTML.combobox.option.element.d.ts +24 -0
- package/dist/cjs/combobox/HTML.combobox.option.element.js +10 -3
- package/dist/cjs/combobox/HTML.combobox.tag.element.d.ts +12 -0
- package/dist/cjs/combobox/index.d.ts +1 -0
- package/dist/cjs/index.d.ts +253 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/combobox/Combobox.markup.js +1 -1
- package/dist/esm/combobox/HTML.combobox.element.js +25 -1
- package/dist/esm/combobox/HTML.combobox.option.element.js +10 -3
- package/dist/types/combobox/Boolean.attribute.value.normalizer.d.ts +0 -1
- package/dist/types/combobox/Combobox.markup.d.ts +0 -1
- package/dist/types/combobox/HTML.combobox.element.d.ts +0 -1
- package/dist/types/combobox/HTML.combobox.option.element.d.ts +0 -1
- package/dist/types/combobox/HTML.combobox.tag.element.d.ts +0 -1
- package/dist/types/combobox/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -2
- package/package.json +10 -4
- package/dist/types/combobox/Boolean.attribute.value.normalizer.d.ts.map +0 -1
- package/dist/types/combobox/Combobox.markup.d.ts.map +0 -1
- package/dist/types/combobox/HTML.combobox.element.d.ts.map +0 -1
- package/dist/types/combobox/HTML.combobox.option.element.d.ts.map +0 -1
- package/dist/types/combobox/HTML.combobox.tag.element.d.ts.map +0 -1
- package/dist/types/combobox/index.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HTMLComboboxTagElement } from './HTML.combobox.tag.element.js';
|
|
2
|
+
import { HTMLComboboxOptionElement } from './HTML.combobox.option.element.js';
|
|
3
|
+
export declare class ComboboxMarkup {
|
|
4
|
+
#private;
|
|
5
|
+
tagsContainer: HTMLDivElement | null;
|
|
6
|
+
optionsContainer: HTMLDivElement | null;
|
|
7
|
+
clearAllButton: HTMLButtonElement | null;
|
|
8
|
+
dropdown: HTMLDivElement | null;
|
|
9
|
+
placeholder: HTMLDivElement | null;
|
|
10
|
+
searchInput: HTMLInputElement | null;
|
|
11
|
+
tagTemplate: HTMLComboboxTagElement | null;
|
|
12
|
+
constructor(shadowRoot: ShadowRoot, internals: ElementInternals);
|
|
13
|
+
connect(): void;
|
|
14
|
+
onHostConnected(): void;
|
|
15
|
+
disconnect(): void;
|
|
16
|
+
setPlaceholder(value: string): void;
|
|
17
|
+
setInputValue(value: string): void;
|
|
18
|
+
onClearAllFocusOut: (event: FocusEvent) => void;
|
|
19
|
+
onClickOutside: (ev: MouseEvent) => void;
|
|
20
|
+
sort(query: string): void;
|
|
21
|
+
get options(): NodeListOf<HTMLComboboxOptionElement>;
|
|
22
|
+
getTagControl(tag: HTMLComboboxTagElement): HTMLButtonElement;
|
|
23
|
+
setDropdownPosition(): void;
|
|
24
|
+
showDropdown(): void;
|
|
25
|
+
onFocusIn: () => void;
|
|
26
|
+
closeDropdown(): void;
|
|
27
|
+
onFocusOut: () => void;
|
|
28
|
+
createAndAppendTag(option: HTMLComboboxOptionElement): HTMLButtonElement;
|
|
29
|
+
getTagByValue(value: string): HTMLComboboxTagElement;
|
|
30
|
+
getOptionByValue(value: string): HTMLComboboxOptionElement;
|
|
31
|
+
get selectedOptions(): NodeListOf<HTMLComboboxOptionElement>;
|
|
32
|
+
static importCSS(urls: string[]): void;
|
|
33
|
+
static template: string;
|
|
34
|
+
static markup: HTMLTemplateElement;
|
|
35
|
+
}
|
|
@@ -425,7 +425,7 @@ ${urls.map(url => `@import "${url}";`)}
|
|
|
425
425
|
|
|
426
426
|
<div id="dropdown" popover="manual" part='dropdown' >
|
|
427
427
|
<input placeholder='Поиск' name="search-input" part="search-input" inputmode='search' autofocus />
|
|
428
|
-
<div part="options" id='options'></div>
|
|
428
|
+
<div part="options" id='options' role="listbox"></div>
|
|
429
429
|
</div>
|
|
430
430
|
|
|
431
431
|
<template id='tag-template'>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HTMLComboboxOptionElement } from './HTML.combobox.option.element.js';
|
|
2
|
+
export declare class HTMLComboboxElement extends HTMLElement {
|
|
3
|
+
#private;
|
|
4
|
+
static OWN_IDL: Set<string>;
|
|
5
|
+
static observerOptions: {
|
|
6
|
+
childList: boolean;
|
|
7
|
+
};
|
|
8
|
+
static styleSheet: CSSStyleSheet[];
|
|
9
|
+
static formAssociated: boolean;
|
|
10
|
+
shadowRoot: ShadowRoot;
|
|
11
|
+
constructor();
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
insertBefore: <T extends Node>(node: T, referenceNode: Node | null) => T;
|
|
14
|
+
appendChild: <T extends Node>(node: T) => T;
|
|
15
|
+
append: (...nodes: (Node | string)[]) => void;
|
|
16
|
+
prepend: (...nodes: (Node | string)[]) => void;
|
|
17
|
+
replaceChildren: (...nodes: (Node | string)[]) => void;
|
|
18
|
+
removeChild: <T extends Node>(child: T) => T;
|
|
19
|
+
replaceChild: <T extends Node>(newChild: Node, oldChild: T) => T;
|
|
20
|
+
get changed(): boolean;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
formResetCallback(): void;
|
|
23
|
+
formDisabledCallback(): void;
|
|
24
|
+
get valueAsArray(): string[];
|
|
25
|
+
get query(): string;
|
|
26
|
+
set query(value: string);
|
|
27
|
+
get placeholder(): string;
|
|
28
|
+
set placeholder(value: string);
|
|
29
|
+
get clearable(): boolean;
|
|
30
|
+
set clearable(value: boolean);
|
|
31
|
+
get filterable(): boolean;
|
|
32
|
+
set filterable(value: boolean);
|
|
33
|
+
get searchable(): boolean;
|
|
34
|
+
set searchable(value: boolean);
|
|
35
|
+
get disabled(): boolean;
|
|
36
|
+
set disabled(value: boolean);
|
|
37
|
+
get form(): HTMLFormElement;
|
|
38
|
+
get labels(): NodeList;
|
|
39
|
+
get length(): number;
|
|
40
|
+
get multiple(): boolean;
|
|
41
|
+
set multiple(value: boolean);
|
|
42
|
+
get required(): boolean;
|
|
43
|
+
set required(value: boolean);
|
|
44
|
+
get selectedOptions(): NodeListOf<HTMLComboboxOptionElement>;
|
|
45
|
+
get type(): "select-multiple" | "select-one";
|
|
46
|
+
get validationMessage(): string;
|
|
47
|
+
get validity(): ValidityState;
|
|
48
|
+
get willValidate(): boolean;
|
|
49
|
+
get value(): string;
|
|
50
|
+
set value(value: string);
|
|
51
|
+
checkValidity(): void;
|
|
52
|
+
item(index: number): HTMLComboboxOptionElement;
|
|
53
|
+
reportValidity(): void;
|
|
54
|
+
setCustomValidity(message: string): void;
|
|
55
|
+
showPicker(): void;
|
|
56
|
+
setAttribute(name: string, value: any): void;
|
|
57
|
+
removeAttribute(name: string): void;
|
|
58
|
+
static loadCssFromUrls(urls: string[]): void;
|
|
59
|
+
static loadCssFromDocumentStyleSheets(): void;
|
|
60
|
+
}
|
|
@@ -21,13 +21,13 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
21
21
|
super();
|
|
22
22
|
this.#internals = this.attachInternals();
|
|
23
23
|
this.#internals.role = "combobox";
|
|
24
|
-
this.#internals.ariaHasPopup = "dialog";
|
|
25
24
|
this.shadowRoot = this.attachShadow({ mode: 'open', delegatesFocus: true }); //delegatesFocus: true
|
|
26
25
|
this.#markup = new Combobox_markup_js_1.ComboboxMarkup(this.shadowRoot, this.#internals);
|
|
27
26
|
this.shadowRoot.appendChild(Combobox_markup_js_1.ComboboxMarkup.markup.content.cloneNode(true));
|
|
28
27
|
this.shadowRoot.adoptedStyleSheets = _a.styleSheet;
|
|
29
28
|
this.#observer = new MutationObserver(this.#onOptionsChanges);
|
|
30
29
|
this.#markup.connect();
|
|
30
|
+
this.#syncPopupSemantics();
|
|
31
31
|
}
|
|
32
32
|
// Lifecycle callbacks
|
|
33
33
|
connectedCallback() {
|
|
@@ -184,12 +184,14 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
184
184
|
}
|
|
185
185
|
set filterable(value) {
|
|
186
186
|
super.toggleAttribute('filterable', (0, Boolean_attribute_value_normalizer_js_1.toBoolean)(value));
|
|
187
|
+
this.#syncPopupSemantics();
|
|
187
188
|
}
|
|
188
189
|
get searchable() {
|
|
189
190
|
return this.hasAttribute('searchable');
|
|
190
191
|
}
|
|
191
192
|
set searchable(value) {
|
|
192
193
|
super.toggleAttribute('searchable', (0, Boolean_attribute_value_normalizer_js_1.toBoolean)(value));
|
|
194
|
+
this.#syncPopupSemantics();
|
|
193
195
|
}
|
|
194
196
|
// <select> specific properties (implements HTMLSelectElement)
|
|
195
197
|
get disabled() {
|
|
@@ -215,6 +217,7 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
215
217
|
}
|
|
216
218
|
set multiple(value) {
|
|
217
219
|
super.toggleAttribute('multiple', (0, Boolean_attribute_value_normalizer_js_1.toBoolean)(value));
|
|
220
|
+
this.#syncPopupSemantics();
|
|
218
221
|
}
|
|
219
222
|
// get options
|
|
220
223
|
// (there is no constructor of HTMLOptionsCollection, need to implement)
|
|
@@ -400,6 +403,7 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
400
403
|
if (state === oldState)
|
|
401
404
|
return;
|
|
402
405
|
if (state === 'open') {
|
|
406
|
+
this.#syncPopupSemantics();
|
|
403
407
|
this.#prevValue = this.value;
|
|
404
408
|
this.#changed = true;
|
|
405
409
|
}
|
|
@@ -454,6 +458,26 @@ class HTMLComboboxElement extends HTMLElement {
|
|
|
454
458
|
this.#markup.sort(this.#markup.searchInput?.value || '');
|
|
455
459
|
}
|
|
456
460
|
};
|
|
461
|
+
// Without a search field the popup is just the listbox. With one, it is a dialog holding the field and the listbox.
|
|
462
|
+
#syncPopupSemantics() {
|
|
463
|
+
const withSearch = this.searchable || this.filterable;
|
|
464
|
+
this.#internals.ariaHasPopup = withSearch ? 'dialog' : 'listbox';
|
|
465
|
+
if (withSearch) {
|
|
466
|
+
this.#markup?.dropdown?.setAttribute('role', 'dialog');
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
this.#markup?.dropdown?.removeAttribute('role');
|
|
470
|
+
}
|
|
471
|
+
this.#markup?.optionsContainer?.setAttribute('aria-multiselectable', String(this.multiple));
|
|
472
|
+
// Shadow content can't point at the outer <label> with aria-labelledby, so it borrows the label's text.
|
|
473
|
+
const name = Array.from(this.#internals.labels ?? [], (label) => label.textContent?.trim()).filter(Boolean).join(' ');
|
|
474
|
+
for (const popup of [this.#markup?.dropdown, this.#markup?.optionsContainer]) {
|
|
475
|
+
if (name && popup?.hasAttribute('role'))
|
|
476
|
+
popup.setAttribute('aria-label', name);
|
|
477
|
+
else
|
|
478
|
+
popup?.removeAttribute('aria-label');
|
|
479
|
+
}
|
|
480
|
+
}
|
|
457
481
|
#setValidityAndFormValue() {
|
|
458
482
|
this.#markup.clearAllButton?.toggleAttribute('disabled', !Boolean(this.#values.size));
|
|
459
483
|
let empty = false;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class HTMLComboboxOptionElement extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
static OWN_IDL: Set<string>;
|
|
4
|
+
static EventInit: {
|
|
5
|
+
bubbles: boolean;
|
|
6
|
+
cancelable: boolean;
|
|
7
|
+
composed: boolean;
|
|
8
|
+
};
|
|
9
|
+
static captureFocus(event: FocusEvent): void;
|
|
10
|
+
static onNavigate(event: KeyboardEvent): void;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
get value(): string;
|
|
14
|
+
set value(value: string);
|
|
15
|
+
get label(): string;
|
|
16
|
+
set label(value: string);
|
|
17
|
+
get selected(): boolean;
|
|
18
|
+
set selected(value: boolean);
|
|
19
|
+
get disabled(): boolean;
|
|
20
|
+
set disabled(value: boolean);
|
|
21
|
+
setAttribute(name: string, value: string): void;
|
|
22
|
+
removeAttribute(name: string): void;
|
|
23
|
+
toggleAttribute(name: string, force?: boolean): boolean;
|
|
24
|
+
}
|
|
@@ -6,6 +6,8 @@ const Boolean_attribute_value_normalizer_js_1 = require("./Boolean.attribute.val
|
|
|
6
6
|
class HTMLComboboxOptionElement extends HTMLElement {
|
|
7
7
|
static OWN_IDL = new Set(['value', 'label', 'selected', 'disabled']);
|
|
8
8
|
static EventInit = { bubbles: true, cancelable: true, composed: true };
|
|
9
|
+
// The browser only knows what `selected` means on a native <option>; here the state reaches assistive tech through internals.
|
|
10
|
+
#internals = this.attachInternals();
|
|
9
11
|
static captureFocus(event) {
|
|
10
12
|
if (event.relatedTarget && event.relatedTarget instanceof _a) {
|
|
11
13
|
event.stopPropagation();
|
|
@@ -40,6 +42,7 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
40
42
|
this.part.add('option');
|
|
41
43
|
super.setAttribute('tabindex', "0");
|
|
42
44
|
super.setAttribute('role', "option");
|
|
45
|
+
this.#internals.ariaSelected = String(this.selected);
|
|
43
46
|
if (!this.value)
|
|
44
47
|
this.value = this.label;
|
|
45
48
|
if (!this.textContent)
|
|
@@ -82,6 +85,7 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
82
85
|
}
|
|
83
86
|
super.toggleAttribute('selected', force);
|
|
84
87
|
this.part.toggle('selected', force);
|
|
88
|
+
this.#internals.ariaSelected = String(force);
|
|
85
89
|
// console.log('this.isConnected', this.isConnected)
|
|
86
90
|
if (this.isConnected) {
|
|
87
91
|
this.dispatchEvent(new Event('optionselectedstatechange', _a.EventInit));
|
|
@@ -118,9 +122,12 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
124
|
toggleAttribute(name, force) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
const result = super.toggleAttribute(name, force);
|
|
126
|
+
if (name === 'selected') {
|
|
127
|
+
this.part.toggle(name, result);
|
|
128
|
+
this.#internals.ariaSelected = String(result);
|
|
129
|
+
}
|
|
130
|
+
return result;
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
exports.HTMLComboboxOptionElement = HTMLComboboxOptionElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class HTMLComboboxTagElement extends HTMLElement {
|
|
2
|
+
static EventInit: {
|
|
3
|
+
bubbles: boolean;
|
|
4
|
+
cancelable: boolean;
|
|
5
|
+
composed: boolean;
|
|
6
|
+
};
|
|
7
|
+
get value(): string;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
static onClearTag(event: Event): void;
|
|
11
|
+
static captureFocus(event: Event): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HTML.combobox.element.js';
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
export * from './combobox/index.js';
|
|
2
|
+
interface HTMLComboboxTagElement extends HTMLElement {
|
|
3
|
+
}
|
|
4
|
+
interface HTMLComboboxOptionElement extends HTMLOptionElement {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
interface HTMLComboboxElement extends HTMLSelectElement {
|
|
9
|
+
/** List of selected options value attribute */
|
|
10
|
+
valueAsArray: string[];
|
|
11
|
+
multiple: boolean;
|
|
12
|
+
/** The value of internal input
|
|
13
|
+
*
|
|
14
|
+
* Internal input is visible when either "searchable" or "filterable" attribute is presented */
|
|
15
|
+
query: string;
|
|
16
|
+
/** The placeholder of internal input
|
|
17
|
+
*
|
|
18
|
+
* Internal input is visible when either "searchable" or "filterable" attribute is presented
|
|
19
|
+
*
|
|
20
|
+
* When <combo-box> is empty, this value is also shown as <combo-box> placeholder itself
|
|
21
|
+
* */
|
|
22
|
+
placeholder: string;
|
|
23
|
+
/** When is true, the clear-all-button is shown in the <combo-box> itself,
|
|
24
|
+
* and the clear-button is shown for each selected tag.
|
|
25
|
+
*
|
|
26
|
+
* If multiple attribute is set to "true", this is also enabled.
|
|
27
|
+
*
|
|
28
|
+
* If multiple attribute is set to "false", i.e. the <combo-box> is used as a <select>,
|
|
29
|
+
* then setting this attribute to "true" will make the clear-button of selected tag visible
|
|
30
|
+
* */
|
|
31
|
+
clearable: boolean;
|
|
32
|
+
/** When is true, the internal input is shown.
|
|
33
|
+
*
|
|
34
|
+
* When user type something, available options are not filtered by this query.
|
|
35
|
+
* You have to set an "input" listener to the <combo-box> and filter options by yourself
|
|
36
|
+
*
|
|
37
|
+
* Setting both "searchable" and "filterable" make no sense, the "searchable" will have priority
|
|
38
|
+
* */
|
|
39
|
+
searchable: boolean;
|
|
40
|
+
/** When is true, the internal input is shown.
|
|
41
|
+
*
|
|
42
|
+
* When user type something, available options are filtered by this query.
|
|
43
|
+
*
|
|
44
|
+
* Setting both "filterable" and "searchable" make no sense, the "searchable" will have priority
|
|
45
|
+
* */
|
|
46
|
+
filterable: boolean;
|
|
47
|
+
selectedOptions: HTMLCollectionOf<HTMLComboboxOptionElement>;
|
|
48
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
49
|
+
addEventListener<K extends keyof ComboboxEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: ComboboxEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
50
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
51
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
52
|
+
removeEventListener<K extends keyof ComboboxEventMap>(type: K, listener: (this: HTMLComboboxElement, ev: ComboboxEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
53
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
54
|
+
}
|
|
55
|
+
interface ComboboxEventMap extends HTMLElementEventMap {
|
|
56
|
+
"change": ComboboxEvent;
|
|
57
|
+
"blur": ComboboxFocusEvent;
|
|
58
|
+
"focus": ComboboxFocusEvent;
|
|
59
|
+
"focusin": ComboboxFocusEvent;
|
|
60
|
+
"focusout": ComboboxFocusEvent;
|
|
61
|
+
"input": ComboboxInputEvent;
|
|
62
|
+
"invalid": ComboboxEvent;
|
|
63
|
+
"selectionchange": ComboboxEvent;
|
|
64
|
+
"selectstart": ComboboxEvent;
|
|
65
|
+
}
|
|
66
|
+
/** Own attributes/properties of `<combo-box>`, shared by every JSX integration below. */
|
|
67
|
+
export interface ComboboxJsxAttributes {
|
|
68
|
+
/** The value of the internal input.
|
|
69
|
+
*
|
|
70
|
+
* The internal input is visible when either the `searchable` or `filterable` attribute is present.
|
|
71
|
+
*
|
|
72
|
+
* Setting ""
|
|
73
|
+
* */
|
|
74
|
+
query?: string;
|
|
75
|
+
/** A comma-separated list of descendant `<box-option>` value attributes to be selected by default.
|
|
76
|
+
*
|
|
77
|
+
* When the `multiple` attribute is present, only the first option will be selected.
|
|
78
|
+
*
|
|
79
|
+
* Alternatively, you can set default selections by adding the `selected` attribute directly to individual `<box-option>` elements. */
|
|
80
|
+
value?: string;
|
|
81
|
+
/** This Boolean attribute indicates that multiple options can be selected.
|
|
82
|
+
*
|
|
83
|
+
* When present, users can select multiple options. When absent, only one option can be selected at a time (the `<combo-box>` behaves like a `<select>`). */
|
|
84
|
+
multiple?: boolean;
|
|
85
|
+
/** The placeholder for the internal input.
|
|
86
|
+
*
|
|
87
|
+
* The internal input is visible when either the `searchable` or `filterable` attribute is present.
|
|
88
|
+
*
|
|
89
|
+
* When the `<combo-box>` is empty, this value is also shown as the `<combo-box>` placeholder itself. */
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
/** When present, the clear-all button is shown in the `<combo-box>` itself, and the clear button is shown for each selected tag.
|
|
92
|
+
*
|
|
93
|
+
* This attribute is automatically enabled when the `multiple` attribute is present.
|
|
94
|
+
*
|
|
95
|
+
* When the `multiple` attribute is absent (single-select mode), setting `clearable` makes the clear button visible on the selected tag. */
|
|
96
|
+
clearable?: boolean;
|
|
97
|
+
/** When present, the internal input is shown.
|
|
98
|
+
*
|
|
99
|
+
* As the user types, available options are **not** filtered by the query. You must attach an `input` listener to the `<combo-box>` and filter options manually.
|
|
100
|
+
*
|
|
101
|
+
* Setting both `searchable` and `filterable` is not recommended—`searchable` takes precedence. */
|
|
102
|
+
searchable?: boolean;
|
|
103
|
+
/** When present, the internal input is shown.
|
|
104
|
+
*
|
|
105
|
+
* As the user types, available options are filtered by the query automatically.
|
|
106
|
+
*
|
|
107
|
+
* Setting both `filterable` and `searchable` is not recommended—`searchable` takes precedence. */
|
|
108
|
+
filterable?: boolean;
|
|
109
|
+
/** A Boolean attribute indicating that at least one option must be selected. */
|
|
110
|
+
required?: boolean;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface ComboboxOptionJsxAttributes {
|
|
114
|
+
value: string;
|
|
115
|
+
label?: string;
|
|
116
|
+
selected?: boolean;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Generic HTML/JSX passthrough attributes (class, style, event handlers, `data-*`, `aria-*`, ...).
|
|
120
|
+
*
|
|
121
|
+
* These are intentionally framework-agnostic: they don't reference React's, Preact's, Vue's
|
|
122
|
+
* or Solid's own type packages, so this file never requires any of them to be installed just
|
|
123
|
+
* to be imported. Every framework below layers `ComboboxJsxAttributes`/`ComboboxOptionJsxAttributes`
|
|
124
|
+
* on top of this instead of that framework's own `HTMLAttributes` type.
|
|
125
|
+
*/
|
|
126
|
+
export interface ComboboxCommonAttributes {
|
|
127
|
+
id?: string;
|
|
128
|
+
class?: string;
|
|
129
|
+
className?: string;
|
|
130
|
+
style?: unknown;
|
|
131
|
+
slot?: string;
|
|
132
|
+
title?: string;
|
|
133
|
+
tabIndex?: number;
|
|
134
|
+
hidden?: boolean;
|
|
135
|
+
children?: unknown;
|
|
136
|
+
ref?: unknown;
|
|
137
|
+
key?: string | number;
|
|
138
|
+
onChange?: (event: ComboboxEvent) => void;
|
|
139
|
+
onInput?: (event: ComboboxInputEvent) => void;
|
|
140
|
+
onFocus?: (event: ComboboxFocusEvent) => void;
|
|
141
|
+
onBlur?: (event: ComboboxFocusEvent) => void;
|
|
142
|
+
onInvalid?: (event: ComboboxEvent) => void;
|
|
143
|
+
[key: `data-${string}`]: unknown;
|
|
144
|
+
[key: `aria-${string}`]: unknown;
|
|
145
|
+
[key: `on${string}`]: ((event: any) => void) | undefined;
|
|
146
|
+
}
|
|
147
|
+
declare global {
|
|
148
|
+
interface HTMLElementTagNameMap {
|
|
149
|
+
'combo-box': HTMLComboboxElement;
|
|
150
|
+
'box-option': HTMLComboboxOptionElement;
|
|
151
|
+
'box-tag': HTMLComboboxTagElement;
|
|
152
|
+
}
|
|
153
|
+
interface ComboboxEvent extends Event {
|
|
154
|
+
readonly target: HTMLComboboxElement;
|
|
155
|
+
readonly currentTarget: HTMLComboboxElement;
|
|
156
|
+
}
|
|
157
|
+
interface ComboboxInputEvent extends InputEvent {
|
|
158
|
+
readonly target: HTMLComboboxElement;
|
|
159
|
+
readonly currentTarget: HTMLComboboxElement;
|
|
160
|
+
}
|
|
161
|
+
interface ComboboxFocusEvent extends FocusEvent {
|
|
162
|
+
readonly target: HTMLComboboxElement;
|
|
163
|
+
}
|
|
164
|
+
type ComboboxElementAttributes = ComboboxCommonAttributes & ComboboxJsxAttributes;
|
|
165
|
+
type ComboboxOptionElementAttributes = ComboboxCommonAttributes & ComboboxOptionJsxAttributes;
|
|
166
|
+
type ComboboxTagElementAttributes = ComboboxCommonAttributes;
|
|
167
|
+
namespace JSX {
|
|
168
|
+
interface IntrinsicElements {
|
|
169
|
+
'combo-box': ComboboxElementAttributes;
|
|
170
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
171
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
declare module 'react' {
|
|
176
|
+
namespace JSX {
|
|
177
|
+
interface IntrinsicElements {
|
|
178
|
+
'combo-box': ComboboxElementAttributes;
|
|
179
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
180
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
declare module 'react/jsx-runtime' {
|
|
185
|
+
namespace JSX {
|
|
186
|
+
interface IntrinsicElements {
|
|
187
|
+
'combo-box': ComboboxElementAttributes;
|
|
188
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
189
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
declare module 'react/jsx-dev-runtime' {
|
|
194
|
+
namespace JSX {
|
|
195
|
+
interface IntrinsicElements {
|
|
196
|
+
'combo-box': ComboboxElementAttributes;
|
|
197
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
198
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
declare module 'preact' {
|
|
203
|
+
namespace JSX {
|
|
204
|
+
interface IntrinsicElements {
|
|
205
|
+
'combo-box': ComboboxElementAttributes;
|
|
206
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
207
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
namespace JSXInternal {
|
|
211
|
+
interface IntrinsicElements {
|
|
212
|
+
'combo-box': ComboboxElementAttributes;
|
|
213
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
214
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
declare module 'preact/jsx-runtime' {
|
|
219
|
+
namespace JSX {
|
|
220
|
+
interface IntrinsicElements {
|
|
221
|
+
'combo-box': ComboboxElementAttributes;
|
|
222
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
223
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
declare module 'solid-js' {
|
|
228
|
+
namespace JSX {
|
|
229
|
+
interface IntrinsicElements {
|
|
230
|
+
'combo-box': ComboboxElementAttributes;
|
|
231
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
232
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
declare module 'solid-js/jsx-runtime' {
|
|
237
|
+
namespace JSX {
|
|
238
|
+
interface IntrinsicElements {
|
|
239
|
+
'combo-box': ComboboxElementAttributes;
|
|
240
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
241
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
declare module 'vue' {
|
|
246
|
+
namespace JSX {
|
|
247
|
+
interface IntrinsicElements {
|
|
248
|
+
'combo-box': ComboboxElementAttributes;
|
|
249
|
+
'box-option': ComboboxOptionElementAttributes;
|
|
250
|
+
'box-tag': ComboboxTagElementAttributes;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -422,7 +422,7 @@ ${urls.map(url => `@import "${url}";`)}
|
|
|
422
422
|
|
|
423
423
|
<div id="dropdown" popover="manual" part='dropdown' >
|
|
424
424
|
<input placeholder='Поиск' name="search-input" part="search-input" inputmode='search' autofocus />
|
|
425
|
-
<div part="options" id='options'></div>
|
|
425
|
+
<div part="options" id='options' role="listbox"></div>
|
|
426
426
|
</div>
|
|
427
427
|
|
|
428
428
|
<template id='tag-template'>
|
|
@@ -17,13 +17,13 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
17
17
|
super();
|
|
18
18
|
this.#internals = this.attachInternals();
|
|
19
19
|
this.#internals.role = "combobox";
|
|
20
|
-
this.#internals.ariaHasPopup = "dialog";
|
|
21
20
|
this.shadowRoot = this.attachShadow({ mode: 'open', delegatesFocus: true }); //delegatesFocus: true
|
|
22
21
|
this.#markup = new ComboboxMarkup(this.shadowRoot, this.#internals);
|
|
23
22
|
this.shadowRoot.appendChild(ComboboxMarkup.markup.content.cloneNode(true));
|
|
24
23
|
this.shadowRoot.adoptedStyleSheets = HTMLComboboxElement.styleSheet;
|
|
25
24
|
this.#observer = new MutationObserver(this.#onOptionsChanges);
|
|
26
25
|
this.#markup.connect();
|
|
26
|
+
this.#syncPopupSemantics();
|
|
27
27
|
}
|
|
28
28
|
// Lifecycle callbacks
|
|
29
29
|
connectedCallback() {
|
|
@@ -180,12 +180,14 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
180
180
|
}
|
|
181
181
|
set filterable(value) {
|
|
182
182
|
super.toggleAttribute('filterable', toBoolean(value));
|
|
183
|
+
this.#syncPopupSemantics();
|
|
183
184
|
}
|
|
184
185
|
get searchable() {
|
|
185
186
|
return this.hasAttribute('searchable');
|
|
186
187
|
}
|
|
187
188
|
set searchable(value) {
|
|
188
189
|
super.toggleAttribute('searchable', toBoolean(value));
|
|
190
|
+
this.#syncPopupSemantics();
|
|
189
191
|
}
|
|
190
192
|
// <select> specific properties (implements HTMLSelectElement)
|
|
191
193
|
get disabled() {
|
|
@@ -211,6 +213,7 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
211
213
|
}
|
|
212
214
|
set multiple(value) {
|
|
213
215
|
super.toggleAttribute('multiple', toBoolean(value));
|
|
216
|
+
this.#syncPopupSemantics();
|
|
214
217
|
}
|
|
215
218
|
// get options
|
|
216
219
|
// (there is no constructor of HTMLOptionsCollection, need to implement)
|
|
@@ -396,6 +399,7 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
396
399
|
if (state === oldState)
|
|
397
400
|
return;
|
|
398
401
|
if (state === 'open') {
|
|
402
|
+
this.#syncPopupSemantics();
|
|
399
403
|
this.#prevValue = this.value;
|
|
400
404
|
this.#changed = true;
|
|
401
405
|
}
|
|
@@ -450,6 +454,26 @@ export class HTMLComboboxElement extends HTMLElement {
|
|
|
450
454
|
this.#markup.sort(this.#markup.searchInput?.value || '');
|
|
451
455
|
}
|
|
452
456
|
};
|
|
457
|
+
// Without a search field the popup is just the listbox. With one, it is a dialog holding the field and the listbox.
|
|
458
|
+
#syncPopupSemantics() {
|
|
459
|
+
const withSearch = this.searchable || this.filterable;
|
|
460
|
+
this.#internals.ariaHasPopup = withSearch ? 'dialog' : 'listbox';
|
|
461
|
+
if (withSearch) {
|
|
462
|
+
this.#markup?.dropdown?.setAttribute('role', 'dialog');
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
this.#markup?.dropdown?.removeAttribute('role');
|
|
466
|
+
}
|
|
467
|
+
this.#markup?.optionsContainer?.setAttribute('aria-multiselectable', String(this.multiple));
|
|
468
|
+
// Shadow content can't point at the outer <label> with aria-labelledby, so it borrows the label's text.
|
|
469
|
+
const name = Array.from(this.#internals.labels ?? [], (label) => label.textContent?.trim()).filter(Boolean).join(' ');
|
|
470
|
+
for (const popup of [this.#markup?.dropdown, this.#markup?.optionsContainer]) {
|
|
471
|
+
if (name && popup?.hasAttribute('role'))
|
|
472
|
+
popup.setAttribute('aria-label', name);
|
|
473
|
+
else
|
|
474
|
+
popup?.removeAttribute('aria-label');
|
|
475
|
+
}
|
|
476
|
+
}
|
|
453
477
|
#setValidityAndFormValue() {
|
|
454
478
|
this.#markup.clearAllButton?.toggleAttribute('disabled', !Boolean(this.#values.size));
|
|
455
479
|
let empty = false;
|
|
@@ -2,6 +2,8 @@ import { toBoolean } from './Boolean.attribute.value.normalizer.js';
|
|
|
2
2
|
export class HTMLComboboxOptionElement extends HTMLElement {
|
|
3
3
|
static OWN_IDL = new Set(['value', 'label', 'selected', 'disabled']);
|
|
4
4
|
static EventInit = { bubbles: true, cancelable: true, composed: true };
|
|
5
|
+
// The browser only knows what `selected` means on a native <option>; here the state reaches assistive tech through internals.
|
|
6
|
+
#internals = this.attachInternals();
|
|
5
7
|
static captureFocus(event) {
|
|
6
8
|
if (event.relatedTarget && event.relatedTarget instanceof HTMLComboboxOptionElement) {
|
|
7
9
|
event.stopPropagation();
|
|
@@ -36,6 +38,7 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
36
38
|
this.part.add('option');
|
|
37
39
|
super.setAttribute('tabindex', "0");
|
|
38
40
|
super.setAttribute('role', "option");
|
|
41
|
+
this.#internals.ariaSelected = String(this.selected);
|
|
39
42
|
if (!this.value)
|
|
40
43
|
this.value = this.label;
|
|
41
44
|
if (!this.textContent)
|
|
@@ -78,6 +81,7 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
78
81
|
}
|
|
79
82
|
super.toggleAttribute('selected', force);
|
|
80
83
|
this.part.toggle('selected', force);
|
|
84
|
+
this.#internals.ariaSelected = String(force);
|
|
81
85
|
// console.log('this.isConnected', this.isConnected)
|
|
82
86
|
if (this.isConnected) {
|
|
83
87
|
this.dispatchEvent(new Event('optionselectedstatechange', HTMLComboboxOptionElement.EventInit));
|
|
@@ -114,9 +118,12 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
114
118
|
}
|
|
115
119
|
}
|
|
116
120
|
toggleAttribute(name, force) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
const result = super.toggleAttribute(name, force);
|
|
122
|
+
if (name === 'selected') {
|
|
123
|
+
this.part.toggle(name, result);
|
|
124
|
+
this.#internals.ariaSelected = String(result);
|
|
125
|
+
}
|
|
126
|
+
return result;
|
|
120
127
|
}
|
|
121
128
|
}
|
|
122
129
|
if (!window.customElements.get('box-option')) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -172,7 +172,6 @@ declare global {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
export type { ComboboxEvent, ComboboxInputEvent, ComboboxFocusEvent, ComboboxElementAttributes, ComboboxOptionElementAttributes, ComboboxTagElementAttributes, };
|
|
176
175
|
declare module 'react' {
|
|
177
176
|
namespace JSX {
|
|
178
177
|
interface IntrinsicElements {
|
|
@@ -252,4 +251,3 @@ declare module 'vue' {
|
|
|
252
251
|
}
|
|
253
252
|
}
|
|
254
253
|
}
|
|
255
|
-
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-combobox-element",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "The combo-box web-component & customizable select polyfill",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"clean": "rm -rf dist",
|
|
9
9
|
"build:combobox": "tsc -b configs/tsconfig.cjs.json configs/tsconfig.esm.json configs/tsconfig.types.json",
|
|
10
10
|
"build": "npm-run-all clean build:combobox",
|
|
11
|
+
"postbuild": "node scripts/fix-dual-package.mjs",
|
|
11
12
|
"check-types": "tsc --noEmit"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
@@ -45,9 +46,14 @@
|
|
|
45
46
|
"types": "dist/types/index.d.ts",
|
|
46
47
|
"exports": {
|
|
47
48
|
".": {
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
"import": {
|
|
50
|
+
"types": "./dist/types/index.d.ts",
|
|
51
|
+
"default": "./dist/esm/index.js"
|
|
52
|
+
},
|
|
53
|
+
"require": {
|
|
54
|
+
"types": "./dist/cjs/index.d.ts",
|
|
55
|
+
"default": "./dist/cjs/index.js"
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Boolean.attribute.value.normalizer.d.ts","sourceRoot":"","sources":["../../../src/combobox/Boolean.attribute.value.normalizer.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,WAInC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.markup.d.ts","sourceRoot":"","sources":["../../../src/combobox/Combobox.markup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,qBAAa,cAAc;;IAGzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC5C,gBAAgB,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC/C,cAAc,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAChD,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAQ;IACvC,WAAW,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC1C,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC5C,WAAW,EAAE,sBAAsB,GAAG,IAAI,CAAQ;gBAOtC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB;IAU/D,OAAO;IAuBP,eAAe;IAMf,UAAU;IAQV,cAAc,CAAC,KAAK,EAAE,MAAM;IAM5B,aAAa,CAAC,KAAK,EAAE,MAAM;IAM3B,kBAAkB,GAAI,OAAO,UAAU,UAStC;IAED,cAAc,GAAI,IAAI,UAAU,UAI/B;IAID,IAAI,CAAC,KAAK,EAAE,MAAM;IAgBlB,IAAI,OAAO,0CAEV;IAED,aAAa,CAAC,GAAG,EAAE,sBAAsB;IAczC,mBAAmB;IAqBnB,YAAY;IAIZ,SAAS,aASR;IAED,aAAa;IASb,UAAU,aAGT;IAGD,kBAAkB,CAAC,MAAM,EAAE,yBAAyB;IAsCpD,aAAa,CAAC,KAAK,EAAE,MAAM;IAI3B,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAI9B,IAAI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D,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAMtB;IAED,IAAI,WAAW,WAEd;IACD,IAAI,WAAW,CAAC,KAAK,QAAA,EAKpB;IAED,IAAI,SAAS,YAEZ;IACD,IAAI,SAAS,CAAC,KAAK,SAAA,EAElB;IAED,IAAI,UAAU,YAEb;IACD,IAAI,UAAU,CAAC,KAAK,SAAA,EAEnB;IAED,IAAI,UAAU,YAEb;IACD,IAAI,UAAU,CAAC,KAAK,SAAA,EAEnB;IAGD,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAKjB;IAED,IAAI,IAAI,oBAEP;IAED,IAAI,MAAM,aAET;IAED,IAAI,MAAM,WAET;IAED,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAEjB;IAKD,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAGjB;IAID,IAAI,eAAe,0CAElB;IAMD,IAAI,IAAI,qCAEP;IAED,IAAI,iBAAiB,WAEpB;IAED,IAAI,QAAQ,kBAEX;IAED,IAAI,YAAY,YAEf;IAED,IAAI,KAAK,IAGQ,MAAM,CADtB;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAWtB;IAQD,aAAa;IAIb,IAAI,CAAC,KAAK,EAAE,MAAM;IASlB,cAAc;IAId,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAQjC,UAAU;IAKV,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAQrC,eAAe,CAAC,IAAI,EAAE,MAAM;IAuM5B,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE;IAIrC,MAAM,CAAC,8BAA8B;CAoBtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HTML.combobox.option.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.option.element.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAA0B,SAAQ,WAAW;;IACxD,MAAM,CAAC,OAAO,cAAuD;IACrE,MAAM,CAAC,SAAS;;;;MAAuD;IAGvE,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU;IAOrC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,aAAa;IAwBtC,iBAAiB;IAgBjB,oBAAoB;IAWpB,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAGd;IAED,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAGd;IAED,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAajB;IAGD,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAKjB;IAQD,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQxC,eAAe,CAAC,IAAI,EAAE,MAAM;IAQ5B,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO;CAIxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HTML.combobox.tag.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.tag.element.ts"],"names":[],"mappings":"AAAA,qBAAa,sBAAuB,SAAQ,WAAW;IACrD,MAAM,CAAC,SAAS;;;;MAAuD;IAEvE,IAAI,KAAK,WAER;IAED,iBAAiB;IAiBjB,oBAAoB;IAMpB,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK;IAK9B,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK;CAIjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/combobox/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","s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