@aurodesignsystem-dev/auro-formkit 0.0.0-pr1433.0 → 0.0.0-pr1433.2
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/README.md +1 -1
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +14 -3
- package/components/combobox/demo/index.min.js +14 -3
- package/components/combobox/dist/auro-combobox copy.d.ts +578 -0
- package/components/combobox/dist/index.js +14 -3
- package/components/combobox/dist/registered.js +14 -3
- package/components/counter/demo/api.min.js +5 -2
- package/components/counter/demo/index.min.js +5 -2
- package/components/counter/dist/index.js +5 -2
- package/components/counter/dist/registered.js +5 -2
- package/components/datepicker/demo/api.min.js +6 -3
- package/components/datepicker/demo/index.min.js +6 -3
- package/components/datepicker/dist/index.js +6 -3
- package/components/datepicker/dist/registered.js +6 -3
- package/components/dropdown/demo/api.min.js +4 -1
- package/components/dropdown/demo/index.min.js +4 -1
- package/components/dropdown/dist/index.js +4 -1
- package/components/dropdown/dist/keyboardUtils.d.ts +18 -0
- package/components/dropdown/dist/registered.js +4 -1
- package/components/form/demo/api.min.js +33 -13
- package/components/form/demo/index.min.js +33 -13
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +5 -2
- package/components/select/demo/index.min.js +5 -2
- package/components/select/dist/index.js +5 -2
- package/components/select/dist/registered.js +5 -2
- package/custom-elements.json +2658 -2658
- package/package.json +2 -2
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `auro-combobox` element provides users with a way to select an option from a list of filtered or suggested options based on user input.
|
|
3
|
+
* @customElement auro-combobox
|
|
4
|
+
*
|
|
5
|
+
* @slot default - Default slot for the menu content.
|
|
6
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
7
|
+
* @slot ariaLabel.input.clear - Sets aria-label on clear button
|
|
8
|
+
* @slot ariaLabel.bib.close - Sets aria-label on close button in fullscreen bib
|
|
9
|
+
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
10
|
+
* @slot label - Defines the content of the label.
|
|
11
|
+
* @slot helpText - Defines the content of the helpText.
|
|
12
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts.
|
|
13
|
+
* @event auroCombobox-valueSet - (Deprecated) Notifies that the component has a new value set.
|
|
14
|
+
* @event input - Notifies that the component has a new value set.
|
|
15
|
+
* @event inputValue - Notifies that the components internal HTML5 input value has changed.
|
|
16
|
+
* @event auroFormElement-validated - Notifies that the component value(s) have been validated.
|
|
17
|
+
*/
|
|
18
|
+
export class AuroCombobox extends AuroElement {
|
|
19
|
+
static get properties(): {
|
|
20
|
+
/**
|
|
21
|
+
* Defines whether the component will be on lighter or darker backgrounds.
|
|
22
|
+
* @property {'default' | 'inverse'} appearance - The visual appearance of the component.
|
|
23
|
+
* @default 'default'
|
|
24
|
+
*/
|
|
25
|
+
appearance: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
reflect: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
31
|
+
*/
|
|
32
|
+
autocomplete: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
reflect: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
38
|
+
*/
|
|
39
|
+
autoPlacement: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
reflect: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Array of available options to display in the dropdown.
|
|
45
|
+
* This array contains all non-hidden options (e.g., hidden by filtering on input value).
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
availableOptions: {
|
|
49
|
+
state: boolean;
|
|
50
|
+
type: ArrayConstructor;
|
|
51
|
+
reflect: boolean;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Sets the behavior of the combobox, "filter" or "suggestion".
|
|
55
|
+
* "filter" requires the user to select an option from the menu.
|
|
56
|
+
* "suggestion" allows the user to enter a value not present in the menu options.
|
|
57
|
+
* @type {'filter' | 'suggestion'}
|
|
58
|
+
* @default 'suggestion'
|
|
59
|
+
*/
|
|
60
|
+
behavior: "filter" | "suggestion";
|
|
61
|
+
/**
|
|
62
|
+
* When attribute is present auro-menu will apply check marks to selected options.
|
|
63
|
+
*/
|
|
64
|
+
checkmark: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
reflect: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* If set, disables the combobox.
|
|
70
|
+
*/
|
|
71
|
+
disabled: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
reflect: boolean;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* ID for the dropdown.
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
dropdownId: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
reflect: boolean;
|
|
82
|
+
attribute: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Whether or not the dropdown is open.
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
dropdownOpen: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
reflect: boolean;
|
|
91
|
+
attribute: boolean;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
|
|
95
|
+
*/
|
|
96
|
+
dvInputOnly: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
reflect: boolean;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
102
|
+
*/
|
|
103
|
+
error: {
|
|
104
|
+
type: StringConstructor;
|
|
105
|
+
reflect: boolean;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Specifies the input mask format.
|
|
109
|
+
*/
|
|
110
|
+
format: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
reflect: boolean;
|
|
113
|
+
};
|
|
114
|
+
/** Exposes inputmode attribute for input. */
|
|
115
|
+
inputmode: {
|
|
116
|
+
type: StringConstructor;
|
|
117
|
+
attribute: boolean;
|
|
118
|
+
reflect: boolean;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Sets the layout of the combobox.
|
|
122
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
123
|
+
* @default 'classic'
|
|
124
|
+
*/
|
|
125
|
+
layout: "classic" | "emphasized" | "snowflake";
|
|
126
|
+
/**
|
|
127
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
matchWidth: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
reflect: boolean;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* If set, combobox will not filter menuoptions based on input.
|
|
136
|
+
*/
|
|
137
|
+
noFilter: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
reflect: boolean;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
143
|
+
* when there isn't enough space in the specified `placement`.
|
|
144
|
+
*/
|
|
145
|
+
noFlip: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
reflect: boolean;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
151
|
+
*/
|
|
152
|
+
shift: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
reflect: boolean;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* If set, disables auto-validation on blur.
|
|
158
|
+
*/
|
|
159
|
+
noValidate: {
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
reflect: boolean;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Gap between the trigger element and bib.
|
|
165
|
+
* @default 0
|
|
166
|
+
*/
|
|
167
|
+
offset: {
|
|
168
|
+
type: NumberConstructor;
|
|
169
|
+
reflect: boolean;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
173
|
+
*/
|
|
174
|
+
onDark: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
reflect: boolean;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Specifies the current selected option.
|
|
180
|
+
* @type {HTMLElement}
|
|
181
|
+
*/
|
|
182
|
+
optionSelected: HTMLElement;
|
|
183
|
+
/**
|
|
184
|
+
* If declared, selecting a menu option will not change the input value. By doing so,
|
|
185
|
+
* the current menu filter will be preserved and the user can continue from their last
|
|
186
|
+
* filter state. It is recommended to use this in combination with the `displayValue` slot.
|
|
187
|
+
*/
|
|
188
|
+
persistInput: {
|
|
189
|
+
type: BooleanConstructor;
|
|
190
|
+
reflect: boolean;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Position where the bib should appear relative to the trigger.
|
|
194
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
195
|
+
* @default 'bottom-start'
|
|
196
|
+
*/
|
|
197
|
+
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
198
|
+
/**
|
|
199
|
+
* Define custom placeholder text, only supported by date input formats.
|
|
200
|
+
*/
|
|
201
|
+
placeholder: {
|
|
202
|
+
type: StringConstructor;
|
|
203
|
+
reflect: boolean;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
207
|
+
*/
|
|
208
|
+
required: {
|
|
209
|
+
type: BooleanConstructor;
|
|
210
|
+
reflect: boolean;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Sets a custom help text message to display for all validityStates.
|
|
214
|
+
*/
|
|
215
|
+
setCustomValidity: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Custom help text message to display when validity = `customError`.
|
|
220
|
+
*/
|
|
221
|
+
setCustomValidityCustomError: {
|
|
222
|
+
type: StringConstructor;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
226
|
+
*/
|
|
227
|
+
setCustomValidityValueMissing: {
|
|
228
|
+
type: StringConstructor;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Custom help text message to display when validity = `valueMissing` due to the user not choosing a menu option when behavior = "filter".
|
|
232
|
+
*/
|
|
233
|
+
setCustomValidityValueMissingFilter: {
|
|
234
|
+
type: StringConstructor;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Indicates whether the combobox is in a dirty state (has been interacted with).
|
|
238
|
+
* @private
|
|
239
|
+
*/
|
|
240
|
+
touched: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
reflect: boolean;
|
|
243
|
+
attribute: boolean;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* If set, the `icon` attribute will be applied to the trigger `auro-input` element.
|
|
247
|
+
*/
|
|
248
|
+
triggerIcon: {
|
|
249
|
+
type: BooleanConstructor;
|
|
250
|
+
reflect: boolean;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Applies the defined value as the type attribute on `auro-input`.
|
|
254
|
+
*/
|
|
255
|
+
type: {
|
|
256
|
+
type: StringConstructor;
|
|
257
|
+
reflect: boolean;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Specifies the value of the input element within the combobox.
|
|
261
|
+
*/
|
|
262
|
+
typedValue: {
|
|
263
|
+
type: StringConstructor;
|
|
264
|
+
reflect: boolean;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Specifies the `validityState` this element is in.
|
|
268
|
+
*/
|
|
269
|
+
validity: {
|
|
270
|
+
type: StringConstructor;
|
|
271
|
+
reflect: boolean;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Value selected for the dropdown menu.
|
|
275
|
+
*/
|
|
276
|
+
value: {
|
|
277
|
+
type: StringConstructor;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
281
|
+
* Otherwise, Heading 600
|
|
282
|
+
*/
|
|
283
|
+
largeFullscreenHeadline: {
|
|
284
|
+
type: BooleanConstructor;
|
|
285
|
+
reflect: boolean;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Defines the screen size breakpointat which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
289
|
+
*
|
|
290
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
291
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
292
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
293
|
+
* @default 'sm'
|
|
294
|
+
*/
|
|
295
|
+
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
296
|
+
/**
|
|
297
|
+
* Specifies the currently active option.
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
optionActive: {
|
|
301
|
+
type: ObjectConstructor;
|
|
302
|
+
reflect: boolean;
|
|
303
|
+
attribute: boolean;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Deferred aria-expanded state for the trigger input.
|
|
307
|
+
* Delays the "true" transition so VoiceOver finishes its character echo
|
|
308
|
+
* before announcing "expanded".
|
|
309
|
+
* @private
|
|
310
|
+
*/
|
|
311
|
+
triggerExpandedState: {
|
|
312
|
+
type: BooleanConstructor;
|
|
313
|
+
reflect: boolean;
|
|
314
|
+
attribute: boolean;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
static get styles(): import("lit").CSSResult[];
|
|
318
|
+
/**
|
|
319
|
+
* This will register this element with the browser.
|
|
320
|
+
* @param {string} [name='auro-combobox'] - The name of the element that you want to register.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* AuroCombobox.register('custom-combobox') // this will register this element to <custom-combobox/>
|
|
324
|
+
*
|
|
325
|
+
*/
|
|
326
|
+
static register(name?: string): void;
|
|
327
|
+
/**
|
|
328
|
+
* @private
|
|
329
|
+
* @returns {void} Internal defaults.
|
|
330
|
+
*/
|
|
331
|
+
private _initializeDefaults;
|
|
332
|
+
appearance: string;
|
|
333
|
+
disabled: boolean;
|
|
334
|
+
msgSelectionMissing: string;
|
|
335
|
+
noFilter: boolean;
|
|
336
|
+
noValidate: boolean;
|
|
337
|
+
optionActive: any;
|
|
338
|
+
persistInput: boolean;
|
|
339
|
+
required: boolean;
|
|
340
|
+
value: any;
|
|
341
|
+
typedValue: any;
|
|
342
|
+
behavior: string;
|
|
343
|
+
clearBtnFocused: boolean;
|
|
344
|
+
checkmark: boolean;
|
|
345
|
+
dvInputOnly: boolean;
|
|
346
|
+
fullscreenBreakpoint: string;
|
|
347
|
+
matchWidth: boolean;
|
|
348
|
+
shape: string;
|
|
349
|
+
size: string;
|
|
350
|
+
triggerIcon: boolean;
|
|
351
|
+
placement: string;
|
|
352
|
+
offset: number;
|
|
353
|
+
noFlip: boolean;
|
|
354
|
+
shift: boolean;
|
|
355
|
+
autoPlacement: boolean;
|
|
356
|
+
dropdownTag: any;
|
|
357
|
+
bibtemplateTag: any;
|
|
358
|
+
inputTag: any;
|
|
359
|
+
helpTextTag: any;
|
|
360
|
+
availableOptions: any[] | any[];
|
|
361
|
+
dropdownId: any;
|
|
362
|
+
dropdownOpen: any;
|
|
363
|
+
triggerExpandedState: boolean;
|
|
364
|
+
_expandedTimeout: NodeJS.Timeout;
|
|
365
|
+
_inFullscreenTransition: boolean;
|
|
366
|
+
errorMessage: any;
|
|
367
|
+
isHiddenWhileLoading: boolean;
|
|
368
|
+
largeFullscreenHeadline: boolean;
|
|
369
|
+
onDark: boolean;
|
|
370
|
+
optionSelected: any;
|
|
371
|
+
runtimeUtils: any;
|
|
372
|
+
touched: boolean;
|
|
373
|
+
validation: AuroFormValidation;
|
|
374
|
+
validity: any;
|
|
375
|
+
/**
|
|
376
|
+
* Returns the current value of the input element within the combobox.
|
|
377
|
+
* @returns {string|undefined} The value of the input element, or undefined if the input is not present.
|
|
378
|
+
*/
|
|
379
|
+
get inputValue(): string | undefined;
|
|
380
|
+
/**
|
|
381
|
+
* Checks if the element is valid.
|
|
382
|
+
* @returns {boolean} - Returns true if the element is valid, false otherwise.
|
|
383
|
+
*/
|
|
384
|
+
isValid(): boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Mark the first available (non-hidden), enabled option as `active`.
|
|
387
|
+
* @private
|
|
388
|
+
* @returns {void}
|
|
389
|
+
*/
|
|
390
|
+
private activateFirstEnabledAvailableOption;
|
|
391
|
+
/**
|
|
392
|
+
* Mark the last available (non-hidden), enabled option as `active`.
|
|
393
|
+
* @private
|
|
394
|
+
* @returns {void}
|
|
395
|
+
*/
|
|
396
|
+
private activateLastEnabledAvailableOption;
|
|
397
|
+
/**
|
|
398
|
+
* Updates the filter for the available options based on the input value.
|
|
399
|
+
* @private
|
|
400
|
+
*/
|
|
401
|
+
private updateFilter;
|
|
402
|
+
noMatchOption: any;
|
|
403
|
+
/**
|
|
404
|
+
* Syncs the values and states of this component, the input, and the menu, including this.optionSelected and this.menu.optionSelected.
|
|
405
|
+
* @private
|
|
406
|
+
* @returns {void}
|
|
407
|
+
*/
|
|
408
|
+
private syncValuesAndStates;
|
|
409
|
+
/**
|
|
410
|
+
* Update displayValue or input.value, it's called when making a selection.
|
|
411
|
+
* @param {string} label - The label of the selected option.
|
|
412
|
+
* @private
|
|
413
|
+
*/
|
|
414
|
+
private updateTriggerTextDisplay;
|
|
415
|
+
/**
|
|
416
|
+
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
417
|
+
* @private
|
|
418
|
+
* @returns {void}
|
|
419
|
+
*/
|
|
420
|
+
private handleMenuOptions;
|
|
421
|
+
/**
|
|
422
|
+
* Determines the element error state based on the `required` attribute and input value.
|
|
423
|
+
* @private
|
|
424
|
+
* @returns {void}
|
|
425
|
+
*/
|
|
426
|
+
private generateOptionsArray;
|
|
427
|
+
options: any;
|
|
428
|
+
/**
|
|
429
|
+
* Hides the dropdown bib if its open.
|
|
430
|
+
* @returns {void}
|
|
431
|
+
*/
|
|
432
|
+
hideBib(): void;
|
|
433
|
+
/**
|
|
434
|
+
* Shows the dropdown bib if there are options to show.
|
|
435
|
+
* @returns {void}
|
|
436
|
+
*/
|
|
437
|
+
showBib(): void;
|
|
438
|
+
/**
|
|
439
|
+
* Binds all behavior needed to the dropdown after rendering.
|
|
440
|
+
* @private
|
|
441
|
+
* @returns {void}
|
|
442
|
+
*/
|
|
443
|
+
private configureDropdown;
|
|
444
|
+
bibtemplate: any;
|
|
445
|
+
inputInBib: any;
|
|
446
|
+
/**
|
|
447
|
+
* @private
|
|
448
|
+
*/
|
|
449
|
+
private setInputFocus;
|
|
450
|
+
/**
|
|
451
|
+
* @private
|
|
452
|
+
*/
|
|
453
|
+
private setClearBtnFocus;
|
|
454
|
+
/**
|
|
455
|
+
* @private
|
|
456
|
+
*/
|
|
457
|
+
private setTriggerInputFocus;
|
|
458
|
+
/**
|
|
459
|
+
* Suppresses or restores dialog semantics on the bib's dialog element.
|
|
460
|
+
* On desktop (non-fullscreen), VoiceOver verbosely announces "listbox inside
|
|
461
|
+
* of a dialog" which disrupts combobox usage. Setting role="presentation"
|
|
462
|
+
* suppresses this. In fullscreen mode, dialog semantics are restored.
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
private updateBibDialogRole;
|
|
466
|
+
/**
|
|
467
|
+
* Update menu to default for fullscreen bib, otherwise to this.size and this.shape.
|
|
468
|
+
* @private
|
|
469
|
+
*/
|
|
470
|
+
private updateMenuShapeSize;
|
|
471
|
+
/**
|
|
472
|
+
* Returns the shadow root containing the live region for screen reader announcements.
|
|
473
|
+
* When the bib is open in fullscreen modal mode, everything outside the <dialog>
|
|
474
|
+
* is inert, so we target the bib's own shadow root instead of the host's.
|
|
475
|
+
* @private
|
|
476
|
+
* @returns {ShadowRoot}
|
|
477
|
+
*/
|
|
478
|
+
private _getAnnouncementRoot;
|
|
479
|
+
/**
|
|
480
|
+
* Binds all behavior needed to the menu after rendering.
|
|
481
|
+
* @private
|
|
482
|
+
* @returns {void}
|
|
483
|
+
*/
|
|
484
|
+
private configureMenu;
|
|
485
|
+
menu: Element;
|
|
486
|
+
defaultMenuShape: string;
|
|
487
|
+
/**
|
|
488
|
+
* Binds all behavior needed to the input after rendering.
|
|
489
|
+
* @private
|
|
490
|
+
* @returns {void}
|
|
491
|
+
*/
|
|
492
|
+
private configureInput;
|
|
493
|
+
/**
|
|
494
|
+
* Manages the visibility of the dropdown based on loading state changes.
|
|
495
|
+
*
|
|
496
|
+
* This method listens for loading state changes and adjusts the visibility of the dropdown accordingly.
|
|
497
|
+
* If the dropdown is visible and loading is true without any loading placeholders, it hides the dropdown
|
|
498
|
+
* and sets a flag to indicate it is hidden while loading. If loading is false and the dropdown was previously
|
|
499
|
+
* hidden, it checks if the active element is within the dropdown and shows it again if true.
|
|
500
|
+
*
|
|
501
|
+
* @private
|
|
502
|
+
* @param {CustomEvent} event - The event object containing details about the loading state change.
|
|
503
|
+
* @param {boolean} event.detail.loading - Indicates whether the menu is currently loading.
|
|
504
|
+
* @param {boolean} event.detail.hasLoadingPlaceholder - Indicates if there are loading placeholders present.
|
|
505
|
+
* @returns {void}
|
|
506
|
+
*/
|
|
507
|
+
private handleMenuLoadingChange;
|
|
508
|
+
/**
|
|
509
|
+
* Handle changes to the input value and trigger changes that should result.
|
|
510
|
+
* @private
|
|
511
|
+
* @param {Event} event - The input event triggered by the input element.
|
|
512
|
+
* @returns {void}
|
|
513
|
+
*/
|
|
514
|
+
private handleInputValueChange;
|
|
515
|
+
_syncingBibValue: boolean;
|
|
516
|
+
/**
|
|
517
|
+
* Binds all behavior needed to the combobox after rendering.
|
|
518
|
+
* @private
|
|
519
|
+
* @returns {void}
|
|
520
|
+
*/
|
|
521
|
+
private configureCombobox;
|
|
522
|
+
menus: Element[];
|
|
523
|
+
firstUpdated(): void;
|
|
524
|
+
dropdown: any;
|
|
525
|
+
input: any;
|
|
526
|
+
/**
|
|
527
|
+
* Focuses the combobox trigger input.
|
|
528
|
+
* @returns {void}
|
|
529
|
+
*/
|
|
530
|
+
focus(): void;
|
|
531
|
+
/**
|
|
532
|
+
* Sets the menu value if menu is available.
|
|
533
|
+
* @param {string} value - The value to set on the menu.
|
|
534
|
+
* @returns {void}
|
|
535
|
+
*/
|
|
536
|
+
setMenuValue(value: string): void;
|
|
537
|
+
/**
|
|
538
|
+
* Resets component to initial state.
|
|
539
|
+
* @returns {void}
|
|
540
|
+
*/
|
|
541
|
+
reset(): void;
|
|
542
|
+
/**
|
|
543
|
+
* Clears the current value of the combobox.
|
|
544
|
+
* @returns {void}
|
|
545
|
+
*/
|
|
546
|
+
clear(): void;
|
|
547
|
+
/**
|
|
548
|
+
* Validates value.
|
|
549
|
+
* @param {boolean} [force=false] - Whether to force validation.
|
|
550
|
+
*/
|
|
551
|
+
validate(force?: boolean): void;
|
|
552
|
+
updated(changedProperties: any): void;
|
|
553
|
+
hasValue: boolean;
|
|
554
|
+
/**
|
|
555
|
+
* Applies slotted nodes to a target element with a new slot name.
|
|
556
|
+
* @private
|
|
557
|
+
* @param {HTMLSlotElement} slot - The slot element containing the nodes to apply.
|
|
558
|
+
* @param {HTMLElement} target - The target element to apply the nodes to.
|
|
559
|
+
* @param {string} newSlotName - The new slot name for the applied nodes.
|
|
560
|
+
* @returns {void}
|
|
561
|
+
*/
|
|
562
|
+
private transportAssignedNodes;
|
|
563
|
+
/**
|
|
564
|
+
* Updates the active option in the menu.
|
|
565
|
+
* @param {number} index - Index of the option to make active.
|
|
566
|
+
*/
|
|
567
|
+
updateActiveOption(index: number): void;
|
|
568
|
+
/**
|
|
569
|
+
* Watch for slot changes and recalculate the menuoptions.
|
|
570
|
+
* @private
|
|
571
|
+
* @param {Event} event - `slotchange` event.
|
|
572
|
+
* @returns {void}
|
|
573
|
+
*/
|
|
574
|
+
private handleSlotChange;
|
|
575
|
+
render(): import("lit-html").TemplateResult;
|
|
576
|
+
}
|
|
577
|
+
import { AuroElement } from '../../layoutElement/src/auroElement.js';
|
|
578
|
+
import AuroFormValidation from '@aurodesignsystem/form-validation';
|
|
@@ -4763,6 +4763,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
4763
4763
|
documentElement.style.overflow = 'hidden';
|
|
4764
4764
|
|
|
4765
4765
|
try {
|
|
4766
|
+
console.log('showing modal dialog');
|
|
4766
4767
|
dialog.showModal();
|
|
4767
4768
|
} finally {
|
|
4768
4769
|
// Restore overflow immediately — the lock was only needed to
|
|
@@ -4776,6 +4777,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
4776
4777
|
|
|
4777
4778
|
} else {
|
|
4778
4779
|
// Open the inner dialog so slotted content renders.
|
|
4780
|
+
console.log('showing non-modal dialog');
|
|
4779
4781
|
dialog.setAttribute('open', '');
|
|
4780
4782
|
|
|
4781
4783
|
// Use popover on the host for top-layer placement without focus
|
|
@@ -5073,7 +5075,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
5073
5075
|
}
|
|
5074
5076
|
};
|
|
5075
5077
|
|
|
5076
|
-
var formkitVersion$2 = '
|
|
5078
|
+
var formkitVersion$2 = '202604101700';
|
|
5077
5079
|
|
|
5078
5080
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
5079
5081
|
static get properties() {
|
|
@@ -5343,6 +5345,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5343
5345
|
* @returns {void}
|
|
5344
5346
|
*/
|
|
5345
5347
|
show() {
|
|
5348
|
+
console.log('show first line');
|
|
5346
5349
|
this.floater.showBib();
|
|
5347
5350
|
|
|
5348
5351
|
// Open dialog synchronously so callers remain in the user gesture
|
|
@@ -12830,7 +12833,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
12830
12833
|
}
|
|
12831
12834
|
};
|
|
12832
12835
|
|
|
12833
|
-
var formkitVersion$1 = '
|
|
12836
|
+
var formkitVersion$1 = '202604101700';
|
|
12834
12837
|
|
|
12835
12838
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12836
12839
|
// See LICENSE in the project root for license information.
|
|
@@ -13895,7 +13898,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13895
13898
|
}
|
|
13896
13899
|
}
|
|
13897
13900
|
|
|
13898
|
-
var formkitVersion = '
|
|
13901
|
+
var formkitVersion = '202604101700';
|
|
13899
13902
|
|
|
13900
13903
|
var styleCss$1 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13901
13904
|
|
|
@@ -14945,6 +14948,7 @@ class AuroCombobox extends AuroElement {
|
|
|
14945
14948
|
* @returns {void}
|
|
14946
14949
|
*/
|
|
14947
14950
|
showBib() {
|
|
14951
|
+
console.log('inside showBib first line');
|
|
14948
14952
|
// Do not auto-open from programmatic value/option updates when the
|
|
14949
14953
|
// combobox is not focused. User-driven interactions still open normally
|
|
14950
14954
|
// once focus enters the component.
|
|
@@ -14961,6 +14965,7 @@ class AuroCombobox extends AuroElement {
|
|
|
14961
14965
|
if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
|
|
14962
14966
|
this.isHiddenWhileLoading = true;
|
|
14963
14967
|
} else {
|
|
14968
|
+
console.log('inside showBib before dropdown show');
|
|
14964
14969
|
this.dropdown.show();
|
|
14965
14970
|
}
|
|
14966
14971
|
}
|
|
@@ -15053,6 +15058,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15053
15058
|
});
|
|
15054
15059
|
|
|
15055
15060
|
this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
|
|
15061
|
+
console.log('inside triggerClick event listener');
|
|
15056
15062
|
this.showBib();
|
|
15057
15063
|
});
|
|
15058
15064
|
|
|
@@ -15394,6 +15400,8 @@ class AuroCombobox extends AuroElement {
|
|
|
15394
15400
|
* @returns {void}
|
|
15395
15401
|
*/
|
|
15396
15402
|
handleInputValueChange(event) {
|
|
15403
|
+
console.log('handleInputValueChange first line');
|
|
15404
|
+
|
|
15397
15405
|
// When the event comes from the fullscreen bib input, sync the value to
|
|
15398
15406
|
// the trigger input. Setting trigger.value triggers Lit's updated()
|
|
15399
15407
|
// (async, microtask) which fires notifyValueChanged() → another 'input'
|
|
@@ -15462,6 +15470,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15462
15470
|
this.hideBib();
|
|
15463
15471
|
} else if (this.menu.loading) {
|
|
15464
15472
|
// if input has value but menu is loading, show bib immediately
|
|
15473
|
+
console.log('handleInputValueChange showBib because loading');
|
|
15465
15474
|
this.showBib();
|
|
15466
15475
|
} else if (this.availableOptions.length === 0 && !this.dropdown.isBibFullscreen) {
|
|
15467
15476
|
// Force dropdown bib to hide if input value has no matching suggestions
|
|
@@ -15477,6 +15486,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15477
15486
|
// typing.
|
|
15478
15487
|
if (this.dropdown.isBibFullscreen && this.input.value && this.input.value.length > 0) {
|
|
15479
15488
|
if (!this.dropdown.isPopoverVisible) {
|
|
15489
|
+
console.log('handleInputValueChange showBib for iOS keyboard retention');
|
|
15480
15490
|
this.showBib();
|
|
15481
15491
|
}
|
|
15482
15492
|
if (this.dropdown.isPopoverVisible) {
|
|
@@ -15743,6 +15753,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15743
15753
|
// :focus-within hasn't propagated through the top-layer dialog's nested
|
|
15744
15754
|
// shadow DOM boundaries.
|
|
15745
15755
|
if ((this.availableOptions.length > 0 && (this.componentHasFocus || this.dropdownOpen)) || this.menu.loading || (this.availableOptions.length === 0 && this.noMatchOption)) {
|
|
15756
|
+
console.log('changedProperties has availableOptions showBib');
|
|
15746
15757
|
this.showBib();
|
|
15747
15758
|
if (!this.availableOptions.includes(this.menu.optionActive)) {
|
|
15748
15759
|
this.activateFirstEnabledAvailableOption();
|