@mustib/web-components 0.0.0-alpha.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.
@@ -0,0 +1,159 @@
1
+ import { M as MUElement, _ as __decorate } from '../mu-element-CZDI_RCY.js';
2
+ import { css, nothing, html } from 'lit';
3
+ import { property, state } from 'lit/decorators.js';
4
+ import { repeat } from 'lit/directives/repeat.js';
5
+ import '../decorators.js';
6
+
7
+ const types = ['label', 'value', 'autocomplete', 'template'];
8
+ const contentSelector = '[data-is="content"]';
9
+ /**
10
+ * Use this element to define custom markup for the label and value.
11
+ *
12
+ * To inject the selected value, add the `data-is="content"` attribute to one of its children.
13
+ * The textContent of the element with this attribute will be replaced with the selected value.
14
+ * If there is no element with this attribute, the textContent of this element itself will be replaced.
15
+ *
16
+ * You also need to set the `type` attribute to either `"label"` or `"value"` so the parent label knows which element to update.
17
+ */
18
+ class MuSelectLabelContent extends MUElement {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.eventActionData = undefined;
22
+ this._addEventActionAttributes = undefined;
23
+ this.active = false;
24
+ this._value = [];
25
+ }
26
+ /**
27
+ * Generate template markup for the template type.
28
+ */
29
+ static generateTemplate(instance) {
30
+ const value = instance._value;
31
+ return value.length ? repeat(value, value => value, (v) => html `
32
+ <div id='template' ?active=${v === instance.activeTemplateValue} part='template' data-select-pointerdown='#nothing&&#prevent'>
33
+ <span id='template-value' part='template-value'>${v}</span>
34
+ <mu-icon name='closeLine' id='template-remove' part='template-remove' data-select-click='remove-value:${v}'></mu-icon>
35
+ </div>
36
+ `) : nothing;
37
+ }
38
+ async setValue(value) {
39
+ await this.updateComplete;
40
+ this._value = value;
41
+ const { contentEl } = this;
42
+ switch (this.type) {
43
+ case 'label':
44
+ console.warn('mu-select-label-content with type="label" should not change the value', this);
45
+ break;
46
+ case "value":
47
+ if (contentEl)
48
+ contentEl.textContent = value.join(', ');
49
+ else
50
+ this.textContent = value.join(', ');
51
+ break;
52
+ case "autocomplete":
53
+ if (contentEl && contentEl instanceof HTMLInputElement)
54
+ contentEl.value = value.join(', ');
55
+ else
56
+ console.warn(`mu-select-label-content with type="autocomplete" should have an input element with ${contentSelector} attribute to change the value`, this);
57
+ break;
58
+ case "template":
59
+ if (this.activeTemplateValue && !value.includes(this.activeTemplateValue))
60
+ this.activeTemplateValue = undefined;
61
+ this.requestUpdate();
62
+ break;
63
+ default:
64
+ this.type;
65
+ break;
66
+ }
67
+ }
68
+ connectedCallback() {
69
+ super.connectedCallback();
70
+ this.contentEl = this.querySelector(contentSelector);
71
+ if (!types.includes(this.type)) {
72
+ console.warn(`'type' attribute of mu-select-label-content must be one of ${types.join(', ')}, but got ${this.type}`, this);
73
+ }
74
+ }
75
+ render() {
76
+ return html `
77
+ <div id='container' part='container'>
78
+ <slot></slot>
79
+ ${this.type === 'template' ? MuSelectLabelContent.generateTemplate(this) : ''}
80
+ </div>
81
+ `;
82
+ }
83
+ }
84
+ MuSelectLabelContent.styles = [MUElement.cssBase, css `
85
+ :host {
86
+ overflow: hidden;
87
+ }
88
+
89
+ :host(:not([active])) {
90
+ display: none;
91
+ }
92
+
93
+ #container {
94
+ overflow: hidden;
95
+ display: inline-flex;
96
+ gap: calc(var(--mu-base-rem) * .5);
97
+ flex-wrap: wrap;
98
+ }
99
+
100
+ #template {
101
+ --select-label-template-background-color: var(--mu-select-label-template-background-color ,var(--mu-color-700));
102
+ --select-label-template-remove-background-color: var(--mu-select-label-template-remove-background-color ,var(--mu-color-400));
103
+ display: inline-flex;
104
+ flex-wrap: wrap-reverse;
105
+ gap: calc(var(--mu-base-rem) * .5);
106
+ align-items: center;
107
+ padding: calc(var(--mu-base-rem) * .5) var(--mu-base-rem);
108
+ background-color: var(--select-label-template-background-color);
109
+ border-radius: 9999px;
110
+ user-select: none;
111
+ }
112
+
113
+ #template[active] {
114
+ --select-label-template-background-color: var(--mu-select-label-template-background-color ,var(--mu-color-500));
115
+ }
116
+
117
+ #template-value {
118
+ cursor: text;
119
+ }
120
+
121
+ #template-remove {
122
+ cursor: pointer;
123
+ --mu-icon-size: calc(var(--mu-base-rem) * 1);
124
+ border-radius: 999px;
125
+ background-color: var(--select-label-template-remove-background-color);
126
+ padding: calc(var(--mu-base-rem) * .5);
127
+ box-shadow: 0 0 2px var(--mu-color-900);
128
+ }
129
+
130
+ @media (prefers-color-scheme: light) {
131
+ #template {
132
+ --select-label-template-background-color: var(--mu-select-label-template-background-color ,var(--mu-color-200));
133
+ }
134
+
135
+ #template[active] {
136
+ --select-label-template-background-color: var(--mu-select-label-template-background-color ,var(--mu-color-300));
137
+ }
138
+
139
+ #template-remove {
140
+ --select-label-template-remove-background-color: var(--mu-select-label-template-remove-background-color ,var(--mu-color-100));
141
+ }
142
+
143
+ #template[active] #template-remove {
144
+ --select-label-template-remove-background-color: var(--mu-select-label-template-remove-background-color ,var(--mu-color-200));
145
+ }
146
+ }
147
+ `];
148
+ __decorate([
149
+ property()
150
+ ], MuSelectLabelContent.prototype, "type", void 0);
151
+ __decorate([
152
+ property({ reflect: true, type: Boolean })
153
+ ], MuSelectLabelContent.prototype, "active", void 0);
154
+ __decorate([
155
+ state()
156
+ ], MuSelectLabelContent.prototype, "activeTemplateValue", void 0);
157
+ MuSelectLabelContent.register('mu-select-label-content');
158
+
159
+ export { MuSelectLabelContent };
@@ -0,0 +1,52 @@
1
+ import { CSSResultGroup, PropertyValues } from 'lit';
2
+ import { MUElement } from './mu-element.js';
3
+ import './mu-trigger.js';
4
+ import { MuSelectLabelContent } from './mu-select-label-content.js';
5
+ import './mu-icon.js';
6
+ import '@mustib/utils/browser';
7
+ import './mu-transparent.js';
8
+
9
+ declare class MuSelectLabel extends MUElement {
10
+ static styles: CSSResultGroup;
11
+ opened: boolean;
12
+ label: string;
13
+ legend?: string;
14
+ type: 'autocomplete' | 'autocomplete-value' | 'autocomplete-template' | 'label-value' | 'label-template';
15
+ value: string[];
16
+ protected _listboxId?: string;
17
+ protected _activeDescendantId?: string;
18
+ protected _labelType: 'label' | 'autocomplete';
19
+ protected _valueType: 'value' | 'template' | 'autocomplete-label';
20
+ protected labelElement?: MuSelectLabelContent;
21
+ protected valueElement?: MuSelectLabelContent;
22
+ protected _isReadyPromise: ReturnType<MUElement['generateIsReadyPromise']>;
23
+ eventActionData: undefined;
24
+ get hasAutocomplete(): boolean;
25
+ get hasAutocompleteBoth(): boolean;
26
+ get hasTemplate(): boolean;
27
+ setListboxId(id?: string): void;
28
+ setActiveDescendantId(id?: string): void;
29
+ connectedCallback(): void;
30
+ protected _assignLabelAndValueTypes(): void;
31
+ get comboboxElement(): MuSelectLabelContent | HTMLElement | null | undefined;
32
+ focus(options?: FocusOptions): void;
33
+ protected _slotChangeHandler: () => void;
34
+ protected firstUpdated(_changedProperties: PropertyValues): void;
35
+ protected _addEventActionAttributes(): void;
36
+ protected getUpdateComplete(): Promise<boolean>;
37
+ protected _updateLabelAndValueElements(): Promise<void>;
38
+ switchActiveTemplate(dir: 'next' | 'prev'): void;
39
+ protected updated(_changedProperties: PropertyValues<this>): Promise<void>;
40
+ protected get _autocompleteInput(): HTMLInputElement | undefined;
41
+ get autocompleteValue(): string | undefined;
42
+ clearAutocompleteValue(): void;
43
+ get activeTemplateValue(): string | undefined;
44
+ protected render(): unknown;
45
+ }
46
+ declare global {
47
+ interface HTMLElementTagNameMap {
48
+ 'mu-select-label': MuSelectLabel;
49
+ }
50
+ }
51
+
52
+ export { MuSelectLabel };
@@ -0,0 +1,352 @@
1
+ import { M as MUElement, _ as __decorate } from '../mu-element-CZDI_RCY.js';
2
+ import { css, html, nothing } from 'lit';
3
+ import './mu-trigger.js';
4
+ import { property, state } from 'lit/decorators.js';
5
+ import { MuSelectLabelContent } from './mu-select-label-content.js';
6
+ import { MuTransparent } from './mu-transparent.js';
7
+ import './mu-icon.js';
8
+ import { staticProperty } from '../decorators.js';
9
+ import 'lit/directives/repeat.js';
10
+
11
+ class MuSelectLabel extends MUElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.opened = false;
15
+ this.label = 'Please select a value';
16
+ this.type = 'label-value';
17
+ this.value = [];
18
+ this.eventActionData = undefined;
19
+ this._slotChangeHandler = () => {
20
+ const addElement = (element) => {
21
+ if (element instanceof MuSelectLabelContent) {
22
+ switch (element.type) {
23
+ case 'label':
24
+ if (!this.hasAutocomplete)
25
+ this.labelElement = element;
26
+ break;
27
+ case 'value':
28
+ if (this._valueType === 'value')
29
+ this.valueElement = element;
30
+ break;
31
+ case 'autocomplete':
32
+ if (this.hasAutocomplete)
33
+ this.labelElement = element;
34
+ break;
35
+ case 'template':
36
+ if (this._valueType === 'template')
37
+ this.valueElement = element;
38
+ break;
39
+ default:
40
+ element.type;
41
+ break;
42
+ }
43
+ }
44
+ };
45
+ this.shadowRoot?.querySelector('slot')?.assignedElements({ flatten: true }).forEach(el => {
46
+ if (el instanceof MuTransparent) {
47
+ el.contents.forEach(el => addElement(el));
48
+ }
49
+ else {
50
+ addElement(el);
51
+ }
52
+ });
53
+ if (!this.labelElement) {
54
+ console.warn('mu-select-label should have mu-select-label-content for label', this);
55
+ }
56
+ else {
57
+ this.comboboxElement?.setAttribute('role', 'combobox');
58
+ this.comboboxElement?.setAttribute('aria-label', this.label);
59
+ this.hasAutocomplete && this.comboboxElement?.setAttribute('aria-autocomplete', 'list');
60
+ this.setListboxId(this._listboxId);
61
+ this.setActiveDescendantId(this._activeDescendantId);
62
+ }
63
+ if (!this.valueElement && this._valueType !== 'autocomplete-label') {
64
+ console.warn('mu-select-label should have mu-select-label-content for value', this);
65
+ }
66
+ if (!this._isReadyPromise.resolved)
67
+ this._isReadyPromise.resolve();
68
+ this._updateLabelAndValueElements();
69
+ };
70
+ }
71
+ get hasAutocomplete() {
72
+ return this._labelType === 'autocomplete';
73
+ }
74
+ get hasAutocompleteBoth() {
75
+ return this.hasAutocomplete && this._valueType === 'autocomplete-label';
76
+ }
77
+ get hasTemplate() {
78
+ return this._valueType === 'template';
79
+ }
80
+ setListboxId(id) {
81
+ this._listboxId = id;
82
+ id ? this.comboboxElement?.setAttribute('aria-controls', id) : this.comboboxElement?.removeAttribute('aria-controls');
83
+ }
84
+ setActiveDescendantId(id) {
85
+ this._activeDescendantId = id;
86
+ id ? this.comboboxElement?.setAttribute('aria-activedescendant', id) : this.comboboxElement?.removeAttribute('aria-activedescendant');
87
+ }
88
+ connectedCallback() {
89
+ super.connectedCallback();
90
+ this.tabIndex = 0;
91
+ this._assignLabelAndValueTypes();
92
+ this.addEventListener('mu-transparent-slotchange', this._slotChangeHandler);
93
+ this._isReadyPromise = this.generateIsReadyPromise();
94
+ }
95
+ _assignLabelAndValueTypes() {
96
+ switch (this.type) {
97
+ case 'autocomplete':
98
+ this._labelType = 'autocomplete';
99
+ this._valueType = 'autocomplete-label';
100
+ break;
101
+ case 'autocomplete-value':
102
+ this._labelType = 'autocomplete';
103
+ this._valueType = 'value';
104
+ break;
105
+ case 'autocomplete-template':
106
+ this._labelType = 'autocomplete';
107
+ this._valueType = 'template';
108
+ break;
109
+ case 'label-value':
110
+ this._labelType = 'label';
111
+ this._valueType = 'value';
112
+ break;
113
+ case 'label-template':
114
+ this._labelType = 'label';
115
+ this._valueType = 'template';
116
+ break;
117
+ default:
118
+ this.type;
119
+ this._labelType = 'label';
120
+ this._valueType = 'value';
121
+ console.warn(`unsupported type (${this.type}) for mu-select-label`, this);
122
+ break;
123
+ }
124
+ }
125
+ get comboboxElement() {
126
+ return this.hasAutocomplete ? this.labelElement?.contentEl : this.labelElement;
127
+ }
128
+ focus(options) {
129
+ const el = this.hasAutocomplete ? this.labelElement?.contentEl : this;
130
+ if (document.activeElement === el)
131
+ return;
132
+ setTimeout(() => {
133
+ el === this ? super.focus(options) : el?.focus(options);
134
+ });
135
+ }
136
+ firstUpdated(_changedProperties) {
137
+ /**
138
+ * needs to be called to add initial elements in case of default slot
139
+ */
140
+ this._slotChangeHandler();
141
+ this.renderRoot.addEventListener('slotchange', this._slotChangeHandler);
142
+ }
143
+ _addEventActionAttributes() {
144
+ const autocompleteInput = this._autocompleteInput;
145
+ const toggleOpenIcon = this.renderRoot.querySelector('#icon-toggle-open');
146
+ const removeAllIcon = this.renderRoot.querySelector('#icon-remove-all');
147
+ this.setAttribute('data-select-pointerdown', 'toggle && #prevent');
148
+ toggleOpenIcon?.setAttribute('data-select-click', 'toggle');
149
+ toggleOpenIcon?.setAttribute('data-select-pointerdown', '#nothing && #prevent');
150
+ removeAllIcon?.setAttribute('data-select-click', 'remove-all');
151
+ removeAllIcon?.setAttribute('data-select-pointerdown', '#nothing && #prevent');
152
+ autocompleteInput?.setAttribute('data-select-pointerdown', 'open');
153
+ autocompleteInput?.setAttribute('data-select-input', 'filter && open');
154
+ }
155
+ async getUpdateComplete() {
156
+ const result = await super.getUpdateComplete();
157
+ await this._isReadyPromise.promise;
158
+ return result;
159
+ }
160
+ async _updateLabelAndValueElements() {
161
+ const hasValue = this.value.length > 0;
162
+ if (this.valueElement) {
163
+ await this.valueElement.updateComplete;
164
+ this.valueElement.setValue(this.value);
165
+ this.valueElement.active = hasValue;
166
+ }
167
+ if (this.labelElement) {
168
+ await this.labelElement.updateComplete;
169
+ this.labelElement.active = this.hasAutocomplete ? true : !hasValue;
170
+ if (this._valueType === 'autocomplete-label') {
171
+ this.labelElement.setValue(this.value);
172
+ }
173
+ }
174
+ }
175
+ switchActiveTemplate(dir) {
176
+ if (!this.valueElement || this._valueType !== 'template')
177
+ return;
178
+ const activeValue = this.valueElement?.activeTemplateValue;
179
+ const activeIndex = this.value.indexOf(activeValue ?? '');
180
+ this.valueElement.activeTemplateValue = this.getNavigationItem({
181
+ items: this.value,
182
+ fromIndex: activeIndex === -1 ? undefined : activeIndex,
183
+ direction: dir,
184
+ isNavigable() {
185
+ return true;
186
+ },
187
+ });
188
+ }
189
+ async updated(_changedProperties) {
190
+ await this.updateComplete;
191
+ if (_changedProperties.has('value')) {
192
+ this._updateLabelAndValueElements();
193
+ }
194
+ if (_changedProperties.has('opened')) {
195
+ this.comboboxElement?.setAttribute('aria-expanded', this.opened ? 'true' : 'false');
196
+ }
197
+ }
198
+ get _autocompleteInput() {
199
+ if (this._labelType !== 'autocomplete')
200
+ return;
201
+ const input = this.labelElement?.contentEl;
202
+ return input instanceof HTMLInputElement ? input : undefined;
203
+ }
204
+ get autocompleteValue() {
205
+ return this._autocompleteInput?.value;
206
+ }
207
+ clearAutocompleteValue() {
208
+ if (this.type === 'autocomplete')
209
+ return;
210
+ const input = this._autocompleteInput;
211
+ if (input)
212
+ input.value = '';
213
+ }
214
+ get activeTemplateValue() {
215
+ if (this._valueType !== 'template')
216
+ return;
217
+ return this.valueElement?.activeTemplateValue;
218
+ }
219
+ render() {
220
+ const label = this.hasAutocomplete ?
221
+ html `
222
+ <mu-select-label-content part='autocomplete' type='autocomplete'>
223
+ <input autocomplete='off' type='text' placeholder=${this.label} id='autocomplete-input' data-is='content'></input>
224
+ </mu-select-label-content>
225
+ ` :
226
+ html `
227
+ <mu-select-label-content type='label'>
228
+ ${this.label}
229
+ </mu-select-label-content>
230
+ `;
231
+ const value = this._valueType === 'value' ?
232
+ html `
233
+ <mu-select-label-content part='value' type='value'></mu-select-label-content>
234
+ ` : this._valueType === 'template' ?
235
+ html `
236
+ <mu-select-label-content part='template' type='template'></mu-select-label-content>
237
+ ` : nothing;
238
+ return html `
239
+ <fieldset id='container' part='container' class='autocomplete'>
240
+ <slot>
241
+ ${this.legend ? html `<legend id='legend' part='legend'>${this.legend}</legend>` : nothing}
242
+ <mu-transparent content-selector='mu-select-label-content'>
243
+ <div id='content' part='content'>${value}${label}</div>
244
+ </mu-transparent>
245
+ <div id='icons' part='icons'>
246
+ <mu-icon role='button' aria-label='Clear' id='icon-remove-all' part='icon-remove-all' name='close'></mu-icon>
247
+ <mu-icon role='button' aria-label=${this.opened ? 'Close' : 'Open'} id='icon-toggle-open' name='downArrow'></mu-icon>
248
+ </div>
249
+ </slot>
250
+ </fieldset>
251
+ `;
252
+ }
253
+ }
254
+ MuSelectLabel.styles = [MUElement.cssBase, css `
255
+ :host(:focus-within) #container,
256
+ :host([opened]) #container {
257
+ --select-label-border-color: var(--mu-select-label-border-color, var(--mu-color-500));
258
+ }
259
+
260
+ #container {
261
+ --select-label-border-width: var(--mu-select-label-border-width, 3px);
262
+ --select-label-border-color: var(--mu-select-label-border-color, var(--mu-color-700));
263
+ --select-label-border-radius: var(--mu-select-label-border-radius, calc(var(--mu-base-rem) * 1.2));
264
+ --select-label-gap: var(--mu-select-label-gap ,var(--mu-base-rem));
265
+ display: grid;
266
+ grid-template-columns: auto auto;
267
+ gap: var(--select-label-gap);
268
+ justify-content: space-between;
269
+ align-items: center;
270
+ transition: all 0.2s ease-in-out;
271
+ user-select: none;
272
+ border-width: var(--select-label-border-width);
273
+ border-style: solid;
274
+ border-color: var(--select-label-border-color);
275
+ border-radius: var(--select-label-border-radius);
276
+ padding: calc(var(--mu-base-rem) * .8) calc(var(--mu-base-rem) * 1.2);
277
+ }
278
+
279
+ @media (prefers-color-scheme: light) {
280
+ :host(:focus-within) #container,
281
+ :host([opened]) #container {
282
+ --select-label-border-color: var(--mu-color-400);
283
+ }
284
+
285
+ #container {
286
+ --select-label-border-color: var(--mu-color-200);
287
+ }
288
+ }
289
+
290
+ #legend {
291
+ margin-left: calc(var(--mu-base-rem) * -.6);
292
+ padding-inline: .75ch;
293
+ font-size: .85em;
294
+ }
295
+
296
+ #icons, #content {
297
+ display: flex;
298
+ gap: var(--select-label-gap);
299
+ align-items: center;
300
+ align-content: start;
301
+ }
302
+
303
+ #content {
304
+ flex-wrap: wrap;
305
+ min-width: 0;
306
+ }
307
+
308
+ #icon-toggle-open, #icon-remove-all {
309
+ transition: all 0.1s ease-in-out;
310
+ cursor: pointer;
311
+ }
312
+
313
+ #icon-remove-all {
314
+ visibility: hidden;
315
+ opacity: 0;
316
+ }
317
+
318
+ :host([opened]) #icon-remove-all, :host(:hover) #icon-remove-all {
319
+ visibility: visible;
320
+ opacity: 1;
321
+ }
322
+
323
+ :host([opened]) #icon-toggle-open {
324
+ transform: scaleY(-1)
325
+ }
326
+
327
+ #autocomplete-input {
328
+ all: unset;
329
+ }
330
+
331
+ #autocomplete-input::placeholder {
332
+ all: unset;
333
+ }
334
+ `];
335
+ __decorate([
336
+ property({ reflect: true, type: Boolean })
337
+ ], MuSelectLabel.prototype, "opened", void 0);
338
+ __decorate([
339
+ staticProperty()
340
+ ], MuSelectLabel.prototype, "label", void 0);
341
+ __decorate([
342
+ staticProperty()
343
+ ], MuSelectLabel.prototype, "legend", void 0);
344
+ __decorate([
345
+ staticProperty()
346
+ ], MuSelectLabel.prototype, "type", void 0);
347
+ __decorate([
348
+ state()
349
+ ], MuSelectLabel.prototype, "value", void 0);
350
+ MuSelectLabel.register('mu-select-label');
351
+
352
+ export { MuSelectLabel };
@@ -0,0 +1,63 @@
1
+ import { CSSResultGroup, PropertyValues } from 'lit';
2
+ import { MUElement } from './mu-element.js';
3
+ import { MuSelectItems, MuSelectItemsEvents } from './mu-select-items.js';
4
+ import { MuSelectLabel } from './mu-select-label.js';
5
+ import { EventAction, GenerateData } from '@mustib/utils/browser';
6
+ import './mu-select-item.js';
7
+ import './mu-trigger.js';
8
+ import './mu-transparent.js';
9
+ import './mu-select-label-content.js';
10
+ import './mu-icon.js';
11
+
12
+ type MuSelectEvents = {
13
+ 'mu-select-opened': CustomEvent;
14
+ 'mu-select-closed': CustomEvent;
15
+ };
16
+ declare class MuSelect extends MUElement {
17
+ static styles: CSSResultGroup;
18
+ static eventAction: EventAction<GenerateData<MuSelect>>;
19
+ opened: boolean;
20
+ noCloseAfterSelect: boolean;
21
+ noCloseAfterBlur: boolean;
22
+ /**
23
+ * for internal usage
24
+ *
25
+ * this is used to prevent closing the select when a value change is dispatched through a way that shouldn't require select to close after receiving a value change event fired by select items like pressing Backspace to remove a value in autocomplete mode
26
+ */
27
+ _canCloseAfterChange: boolean;
28
+ _value: string[];
29
+ protected _assignedElements: Element[];
30
+ protected _itemsElement?: MuSelectItems;
31
+ protected _labelElement?: MuSelectLabel;
32
+ protected _isReady: Readonly<{
33
+ status: "success" | "fail" | "pending";
34
+ resolved: boolean;
35
+ promise: Promise<boolean>;
36
+ resolve: () => void;
37
+ }>;
38
+ eventActionData: {
39
+ eventAction: EventAction;
40
+ events: string[];
41
+ } | undefined;
42
+ protected _addEventActionAttributes(): void;
43
+ focus(): void;
44
+ connectedCallback(): void;
45
+ itemsChangeHandler: (e: MuSelectItemsEvents["mu-select-items-change"]) => void;
46
+ protected _valueChanged(value: string | string[] | undefined): void;
47
+ protected _slotChangeHandler: () => void;
48
+ protected _handleOpenChange(): void;
49
+ protected getUpdateComplete(): Promise<boolean>;
50
+ protected updated(_changedProperties: PropertyValues): void;
51
+ protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
52
+ protected render(): unknown;
53
+ }
54
+ declare global {
55
+ interface HTMLElementTagNameMap {
56
+ 'mu-select': MuSelect;
57
+ }
58
+ interface GlobalEventHandlersEventMap extends MuSelectEvents {
59
+ }
60
+ }
61
+
62
+ export { MuSelect };
63
+ export type { MuSelectEvents };