@aurodesignsystem-dev/auro-formkit 0.0.0-pr741.0 → 0.0.0-pr750.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.
- package/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.min.js +11 -11
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.min.js +11 -11
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/dist/index.js +11 -11
- package/components/checkbox/dist/registered.js +11 -11
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +12 -6
- package/components/combobox/demo/api.min.js +411 -103
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.min.js +411 -103
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/index.js +374 -91
- package/components/combobox/dist/registered.js +374 -91
- package/components/counter/demo/api.html +16 -10
- package/components/counter/demo/api.md +140 -7
- package/components/counter/demo/api.min.js +1145 -987
- package/components/counter/demo/index.html +16 -10
- package/components/counter/demo/index.md +82 -0
- package/components/counter/demo/index.min.js +1145 -987
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-group.d.ts +64 -23
- package/components/counter/dist/auro-counter.d.ts +10 -0
- package/components/counter/dist/index.js +1145 -987
- package/components/counter/dist/registered.js +1145 -987
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.min.js +374 -91
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.min.js +374 -91
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
- package/components/datepicker/dist/index.js +374 -91
- package/components/datepicker/dist/registered.js +374 -91
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +77 -267
- package/components/dropdown/demo/api.min.js +331 -64
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +45 -363
- package/components/dropdown/demo/index.min.js +331 -64
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +35 -67
- package/components/dropdown/dist/index.js +331 -64
- package/components/dropdown/dist/registered.js +331 -64
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/helptext/dist/index.js +1 -1
- package/components/helptext/dist/registered.js +1 -1
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +1 -1
- package/components/input/demo/api.min.js +14 -14
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.min.js +14 -14
- package/components/input/demo/readme.html +16 -9
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +14 -14
- package/components/input/dist/registered.js +14 -14
- package/components/menu/demo/api.html +16 -32
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/api.min.js +37 -12
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +37 -12
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +13 -2
- package/components/menu/dist/index.js +37 -12
- package/components/menu/dist/registered.js +37 -12
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +0 -1
- package/components/radio/demo/api.min.js +61 -76
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +61 -76
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio.d.ts +8 -11
- package/components/radio/dist/index.js +61 -76
- package/components/radio/dist/registered.js +61 -76
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +53 -51
- package/components/select/demo/api.min.js +491 -326
- package/components/select/demo/index.html +16 -11
- package/components/select/demo/index.md +6 -158
- package/components/select/demo/index.min.js +491 -314
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +33 -8
- package/components/select/dist/index.js +454 -302
- package/components/select/dist/registered.js +454 -302
- package/package.json +26 -25
|
@@ -649,19 +649,19 @@ class AuroFormValidation {
|
|
|
649
649
|
{
|
|
650
650
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
651
651
|
validity: 'tooShort',
|
|
652
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
652
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
653
653
|
},
|
|
654
654
|
{
|
|
655
655
|
check: (e) => e.value?.length > e.maxLength,
|
|
656
656
|
validity: 'tooLong',
|
|
657
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
657
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
658
658
|
}
|
|
659
659
|
],
|
|
660
660
|
pattern: [
|
|
661
661
|
{
|
|
662
662
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
663
663
|
validity: 'patternMismatch',
|
|
664
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
664
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
665
665
|
}
|
|
666
666
|
]
|
|
667
667
|
},
|
|
@@ -856,10 +856,10 @@ class AuroFormValidation {
|
|
|
856
856
|
if (!hasValue && elem.required && elem.touched) {
|
|
857
857
|
elem.validity = 'valueMissing';
|
|
858
858
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
859
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
859
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
860
860
|
this.validateType(elem);
|
|
861
861
|
this.validateElementAttributes(elem);
|
|
862
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
862
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
863
863
|
this.validateElementAttributes(elem);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
@@ -3228,6 +3228,267 @@ class AuroFloatingUI {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
3230
3230
|
|
|
3231
|
+
// Selectors for focusable elements
|
|
3232
|
+
const FOCUSABLE_SELECTORS = [
|
|
3233
|
+
'a[href]',
|
|
3234
|
+
'button:not([disabled])',
|
|
3235
|
+
'textarea:not([disabled])',
|
|
3236
|
+
'input:not([disabled])',
|
|
3237
|
+
'select:not([disabled])',
|
|
3238
|
+
'[role="tab"]:not([disabled])',
|
|
3239
|
+
'[role="link"]:not([disabled])',
|
|
3240
|
+
'[role="button"]:not([disabled])',
|
|
3241
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3242
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3243
|
+
];
|
|
3244
|
+
|
|
3245
|
+
// List of custom components that are known to be focusable
|
|
3246
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3247
|
+
'auro-checkbox',
|
|
3248
|
+
'auro-radio',
|
|
3249
|
+
'auro-dropdown',
|
|
3250
|
+
'auro-button',
|
|
3251
|
+
'auro-combobox',
|
|
3252
|
+
'auro-input',
|
|
3253
|
+
'auro-counter',
|
|
3254
|
+
'auro-menu',
|
|
3255
|
+
'auro-select',
|
|
3256
|
+
'auro-datepicker',
|
|
3257
|
+
'auro-hyperlink',
|
|
3258
|
+
'auro-accordion',
|
|
3259
|
+
];
|
|
3260
|
+
|
|
3261
|
+
/**
|
|
3262
|
+
* Determines if a given element is a custom focusable component.
|
|
3263
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3264
|
+
*
|
|
3265
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3266
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3267
|
+
*/
|
|
3268
|
+
function isFocusableComponent(element) {
|
|
3269
|
+
const componentName = element.tagName.toLowerCase();
|
|
3270
|
+
|
|
3271
|
+
// Guard Clause: Element is a focusable component
|
|
3272
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3273
|
+
|
|
3274
|
+
// Guard Clause: Element is not disabled
|
|
3275
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3276
|
+
|
|
3277
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3278
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3279
|
+
|
|
3280
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3281
|
+
return true;
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3286
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3287
|
+
*
|
|
3288
|
+
* @param {HTMLElement} container The container to search within
|
|
3289
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3290
|
+
*/
|
|
3291
|
+
function getFocusableElements(container) {
|
|
3292
|
+
// Get elements in DOM order by walking the tree
|
|
3293
|
+
const orderedFocusableElements = [];
|
|
3294
|
+
|
|
3295
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3296
|
+
const collectFocusableElements = (root) => {
|
|
3297
|
+
// Check if current element is focusable
|
|
3298
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3299
|
+
// Check if this is a custom component that is focusable
|
|
3300
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3301
|
+
|
|
3302
|
+
if (isComponentFocusable) {
|
|
3303
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3304
|
+
orderedFocusableElements.push(root);
|
|
3305
|
+
return; // Skip traversing inside this component
|
|
3306
|
+
}
|
|
3307
|
+
|
|
3308
|
+
// Check if the element itself matches any selector
|
|
3309
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3310
|
+
if (root.matches?.(selector)) {
|
|
3311
|
+
orderedFocusableElements.push(root);
|
|
3312
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3313
|
+
}
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
// Process shadow DOM only for non-Auro components
|
|
3317
|
+
if (root.shadowRoot) {
|
|
3318
|
+
// Process shadow DOM children in order
|
|
3319
|
+
if (root.shadowRoot.children) {
|
|
3320
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3321
|
+
collectFocusableElements(child);
|
|
3322
|
+
});
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
// Process slots and their assigned nodes in order
|
|
3327
|
+
if (root.tagName === 'SLOT') {
|
|
3328
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3329
|
+
for (const node of assignedNodes) {
|
|
3330
|
+
collectFocusableElements(node);
|
|
3331
|
+
}
|
|
3332
|
+
} else {
|
|
3333
|
+
// Process light DOM children in order
|
|
3334
|
+
if (root.children) {
|
|
3335
|
+
Array.from(root.children).forEach(child => {
|
|
3336
|
+
collectFocusableElements(child);
|
|
3337
|
+
});
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
};
|
|
3342
|
+
|
|
3343
|
+
// Start the traversal from the container
|
|
3344
|
+
collectFocusableElements(container);
|
|
3345
|
+
|
|
3346
|
+
// Remove duplicates that might have been collected through different paths
|
|
3347
|
+
// while preserving order
|
|
3348
|
+
const uniqueElements = [];
|
|
3349
|
+
const seen = new Set();
|
|
3350
|
+
|
|
3351
|
+
for (const element of orderedFocusableElements) {
|
|
3352
|
+
if (!seen.has(element)) {
|
|
3353
|
+
seen.add(element);
|
|
3354
|
+
uniqueElements.push(element);
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
return uniqueElements;
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
/**
|
|
3362
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3363
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3364
|
+
*/
|
|
3365
|
+
class FocusTrap {
|
|
3366
|
+
/**
|
|
3367
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3368
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3369
|
+
*
|
|
3370
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3371
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3372
|
+
*/
|
|
3373
|
+
constructor(container) {
|
|
3374
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3375
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
this.container = container;
|
|
3379
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3380
|
+
|
|
3381
|
+
this._init();
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
/**
|
|
3385
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3386
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3387
|
+
*
|
|
3388
|
+
* @private
|
|
3389
|
+
*/
|
|
3390
|
+
_init() {
|
|
3391
|
+
|
|
3392
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3393
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3394
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3395
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
// Track tab direction
|
|
3399
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
/**
|
|
3403
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3404
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3405
|
+
*
|
|
3406
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3407
|
+
* @private
|
|
3408
|
+
*/
|
|
3409
|
+
_onKeydown = (e) => {
|
|
3410
|
+
|
|
3411
|
+
if (e.key === 'Tab') {
|
|
3412
|
+
|
|
3413
|
+
// Set the tab direction based on the key pressed
|
|
3414
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3415
|
+
|
|
3416
|
+
// Get the active element(s) in the document and shadow root
|
|
3417
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3418
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3419
|
+
let activeElement = document.activeElement;
|
|
3420
|
+
const actives = [activeElement];
|
|
3421
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3422
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3423
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
// Update the focusable elements
|
|
3427
|
+
const focusables = this._getFocusableElements();
|
|
3428
|
+
|
|
3429
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3430
|
+
const focusIndex =
|
|
3431
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3432
|
+
? focusables.length - 1
|
|
3433
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3434
|
+
? 0
|
|
3435
|
+
: null;
|
|
3436
|
+
|
|
3437
|
+
if (focusIndex !== null) {
|
|
3438
|
+
focusables[focusIndex].focus();
|
|
3439
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3440
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
};
|
|
3444
|
+
|
|
3445
|
+
/**
|
|
3446
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3447
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3448
|
+
*
|
|
3449
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3450
|
+
* @private
|
|
3451
|
+
*/
|
|
3452
|
+
_getFocusableElements() {
|
|
3453
|
+
// Use the imported utility function to get focusable elements
|
|
3454
|
+
const elements = getFocusableElements(this.container);
|
|
3455
|
+
|
|
3456
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3457
|
+
return elements;
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
* Moves focus to the first focusable element within the container.
|
|
3462
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3463
|
+
*/
|
|
3464
|
+
focusFirstElement() {
|
|
3465
|
+
const focusables = this._getFocusableElements();
|
|
3466
|
+
if (focusables.length) focusables[0].focus();
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3469
|
+
/**
|
|
3470
|
+
* Moves focus to the last focusable element within the container.
|
|
3471
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3472
|
+
*/
|
|
3473
|
+
focusLastElement() {
|
|
3474
|
+
const focusables = this._getFocusableElements();
|
|
3475
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
/**
|
|
3479
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3480
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3481
|
+
*/
|
|
3482
|
+
disconnect() {
|
|
3483
|
+
|
|
3484
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3485
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3231
3492
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3232
3493
|
// See LICENSE in the project root for license information.
|
|
3233
3494
|
|
|
@@ -3866,11 +4127,11 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
3866
4127
|
|
|
3867
4128
|
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
3868
4129
|
|
|
3869
|
-
var colorCss$1$1 = css`:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
4130
|
+
var colorCss$1$1 = css`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
3870
4131
|
|
|
3871
4132
|
var classicColorCss = css``;
|
|
3872
4133
|
|
|
3873
|
-
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([
|
|
4134
|
+
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}`;
|
|
3874
4135
|
|
|
3875
4136
|
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3876
4137
|
|
|
@@ -3878,7 +4139,7 @@ var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex:1;fle
|
|
|
3878
4139
|
|
|
3879
4140
|
var colorCss$5 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3880
4141
|
|
|
3881
|
-
var styleCss$6 = css
|
|
4142
|
+
var styleCss$6 = css`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
3882
4143
|
|
|
3883
4144
|
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3884
4145
|
|
|
@@ -4183,10 +4444,8 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4183
4444
|
// See LICENSE in the project root for license information.
|
|
4184
4445
|
|
|
4185
4446
|
|
|
4186
|
-
|
|
4187
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4447
|
+
/*
|
|
4188
4448
|
* @slot - Default slot for the popover content.
|
|
4189
|
-
* @slot label - Defines the content of the label.
|
|
4190
4449
|
* @slot helpText - Defines the content of the helpText.
|
|
4191
4450
|
* @slot trigger - Defines the content of the trigger.
|
|
4192
4451
|
* @csspart trigger - The trigger content container.
|
|
@@ -4205,18 +4464,22 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4205
4464
|
this.matchWidth = false;
|
|
4206
4465
|
this.noHideOnThisFocusLoss = false;
|
|
4207
4466
|
|
|
4208
|
-
this.errorMessage =
|
|
4467
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4209
4468
|
|
|
4210
4469
|
// Layout Config
|
|
4211
|
-
this.layout =
|
|
4212
|
-
this.shape =
|
|
4213
|
-
this.size =
|
|
4470
|
+
this.layout = undefined;
|
|
4471
|
+
this.shape = undefined;
|
|
4472
|
+
this.size = undefined;
|
|
4214
4473
|
|
|
4215
4474
|
this.parentBorder = false;
|
|
4216
4475
|
|
|
4217
4476
|
this.privateDefaults();
|
|
4218
4477
|
}
|
|
4219
4478
|
|
|
4479
|
+
/**
|
|
4480
|
+
* @private
|
|
4481
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4482
|
+
*/
|
|
4220
4483
|
get commonWrapperClasses() {
|
|
4221
4484
|
return {
|
|
4222
4485
|
'trigger': true,
|
|
@@ -4234,13 +4497,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4234
4497
|
privateDefaults() {
|
|
4235
4498
|
this.chevron = false;
|
|
4236
4499
|
this.disabled = false;
|
|
4500
|
+
this.disableFocusTrap = false;
|
|
4237
4501
|
this.error = false;
|
|
4238
|
-
this.inset = false;
|
|
4239
|
-
this.rounded = false;
|
|
4240
4502
|
this.tabIndex = 0;
|
|
4241
4503
|
this.noToggle = false;
|
|
4242
|
-
this.a11yAutocomplete = 'none';
|
|
4243
|
-
this.labeled = true;
|
|
4244
4504
|
this.a11yRole = 'button';
|
|
4245
4505
|
this.onDark = false;
|
|
4246
4506
|
this.showTriggerBorders = true;
|
|
@@ -4336,6 +4596,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4336
4596
|
this.floater.showBib();
|
|
4337
4597
|
}
|
|
4338
4598
|
|
|
4599
|
+
/**
|
|
4600
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4601
|
+
* If not, trigger element will get focus.
|
|
4602
|
+
*/
|
|
4603
|
+
focus() {
|
|
4604
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4605
|
+
this.focusTrap.focusFirstElement();
|
|
4606
|
+
} else {
|
|
4607
|
+
this.trigger.focus();
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
|
|
4339
4611
|
// function to define props used within the scope of this component
|
|
4340
4612
|
static get properties() {
|
|
4341
4613
|
return {
|
|
@@ -4349,6 +4621,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4349
4621
|
reflect: true
|
|
4350
4622
|
},
|
|
4351
4623
|
|
|
4624
|
+
/**
|
|
4625
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4626
|
+
* @default false
|
|
4627
|
+
*/
|
|
4628
|
+
disableEventShow: {
|
|
4629
|
+
type: Boolean,
|
|
4630
|
+
reflect: true
|
|
4631
|
+
},
|
|
4632
|
+
|
|
4352
4633
|
/**
|
|
4353
4634
|
* If declared, applies a border around the trigger slot.
|
|
4354
4635
|
*/
|
|
@@ -4367,17 +4648,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4367
4648
|
},
|
|
4368
4649
|
|
|
4369
4650
|
/**
|
|
4370
|
-
* If declared, the dropdown
|
|
4651
|
+
* If declared, the dropdown is not interactive.
|
|
4371
4652
|
*/
|
|
4372
|
-
|
|
4653
|
+
disabled: {
|
|
4373
4654
|
type: Boolean,
|
|
4374
4655
|
reflect: true
|
|
4375
4656
|
},
|
|
4376
4657
|
|
|
4377
4658
|
/**
|
|
4378
|
-
* If declared, the
|
|
4659
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4379
4660
|
*/
|
|
4380
|
-
|
|
4661
|
+
disableFocusTrap: {
|
|
4381
4662
|
type: Boolean,
|
|
4382
4663
|
reflect: true
|
|
4383
4664
|
},
|
|
@@ -4422,22 +4703,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4422
4703
|
reflect: true
|
|
4423
4704
|
},
|
|
4424
4705
|
|
|
4425
|
-
/**
|
|
4426
|
-
* Makes the trigger to be full width of its parent container.
|
|
4427
|
-
*/
|
|
4428
|
-
fluid: {
|
|
4429
|
-
type: Boolean,
|
|
4430
|
-
reflect: true
|
|
4431
|
-
},
|
|
4432
|
-
|
|
4433
|
-
/**
|
|
4434
|
-
* If declared, will apply padding around trigger slot content.
|
|
4435
|
-
*/
|
|
4436
|
-
inset: {
|
|
4437
|
-
type: Boolean,
|
|
4438
|
-
reflect: true
|
|
4439
|
-
},
|
|
4440
|
-
|
|
4441
4706
|
/**
|
|
4442
4707
|
* If true, the dropdown bib is displayed.
|
|
4443
4708
|
*/
|
|
@@ -4481,15 +4746,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4481
4746
|
reflect: true
|
|
4482
4747
|
},
|
|
4483
4748
|
|
|
4484
|
-
/**
|
|
4485
|
-
* Defines if there is a label preset.
|
|
4486
|
-
* @private
|
|
4487
|
-
*/
|
|
4488
|
-
labeled: {
|
|
4489
|
-
type: Boolean,
|
|
4490
|
-
reflect: true
|
|
4491
|
-
},
|
|
4492
|
-
|
|
4493
4749
|
/**
|
|
4494
4750
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4495
4751
|
* @private
|
|
@@ -4550,6 +4806,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4550
4806
|
reflect: true
|
|
4551
4807
|
},
|
|
4552
4808
|
|
|
4809
|
+
/**
|
|
4810
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4811
|
+
*/
|
|
4553
4812
|
onSlotChange: {
|
|
4554
4813
|
type: Function,
|
|
4555
4814
|
reflect: false
|
|
@@ -4564,14 +4823,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4564
4823
|
reflect: true
|
|
4565
4824
|
},
|
|
4566
4825
|
|
|
4567
|
-
/**
|
|
4568
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4569
|
-
*/
|
|
4570
|
-
rounded: {
|
|
4571
|
-
type: Boolean,
|
|
4572
|
-
reflect: true
|
|
4573
|
-
},
|
|
4574
|
-
|
|
4575
4826
|
/**
|
|
4576
4827
|
* @private
|
|
4577
4828
|
*/
|
|
@@ -4586,22 +4837,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4586
4837
|
type: String || undefined,
|
|
4587
4838
|
attribute: false,
|
|
4588
4839
|
reflect: false
|
|
4589
|
-
},
|
|
4590
|
-
|
|
4591
|
-
/**
|
|
4592
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4593
|
-
*/
|
|
4594
|
-
a11yAutocomplete: {
|
|
4595
|
-
type: String,
|
|
4596
|
-
attribute: false,
|
|
4597
4840
|
}
|
|
4598
4841
|
};
|
|
4599
4842
|
}
|
|
4600
4843
|
|
|
4601
4844
|
static get styles() {
|
|
4602
4845
|
return [
|
|
4603
|
-
colorCss$1$1,
|
|
4604
4846
|
tokensCss$1$1,
|
|
4847
|
+
colorCss$1$1,
|
|
4605
4848
|
|
|
4606
4849
|
// default layout
|
|
4607
4850
|
classicColorCss,
|
|
@@ -4664,6 +4907,12 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4664
4907
|
this.handleTriggerContentSlotChange();
|
|
4665
4908
|
}
|
|
4666
4909
|
|
|
4910
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
4911
|
+
this.updateFocusTrap();
|
|
4912
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
4913
|
+
this.trigger.focus();
|
|
4914
|
+
}
|
|
4915
|
+
}
|
|
4667
4916
|
}
|
|
4668
4917
|
|
|
4669
4918
|
firstUpdated() {
|
|
@@ -4729,6 +4978,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4729
4978
|
this.hasFocus = true;
|
|
4730
4979
|
}
|
|
4731
4980
|
|
|
4981
|
+
/**
|
|
4982
|
+
* @private
|
|
4983
|
+
*/
|
|
4984
|
+
updateFocusTrap() {
|
|
4985
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
4986
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
4987
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
4988
|
+
this.focusTrap.focusFirstElement();
|
|
4989
|
+
return;
|
|
4990
|
+
}
|
|
4991
|
+
|
|
4992
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
4993
|
+
if (!this.focusTrap) {
|
|
4994
|
+
return;
|
|
4995
|
+
}
|
|
4996
|
+
|
|
4997
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
4998
|
+
this.focusTrap.disconnect();
|
|
4999
|
+
this.focusTrap = undefined;
|
|
5000
|
+
}
|
|
5001
|
+
|
|
4732
5002
|
/**
|
|
4733
5003
|
* Function to support @focusout event.
|
|
4734
5004
|
* @private
|
|
@@ -5014,10 +5284,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5014
5284
|
id="bib"
|
|
5015
5285
|
shape="${this.shape}"
|
|
5016
5286
|
?data-show="${this.isPopoverVisible}"
|
|
5017
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5018
|
-
?common="${this.common}"
|
|
5019
|
-
?rounded="${this.common || this.rounded}"
|
|
5020
|
-
?inset="${this.common || this.inset}">
|
|
5287
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5021
5288
|
<div class="slotContent">
|
|
5022
5289
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5023
5290
|
</div>
|
|
@@ -6998,7 +7265,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
6998
7265
|
<div id="bibTemplate" part="bibtemplate">
|
|
6999
7266
|
${this.isFullscreen ? html`
|
|
7000
7267
|
<div id="headerContainer">
|
|
7001
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7268
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7002
7269
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7003
7270
|
</${this.buttonTag}>
|
|
7004
7271
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -7026,7 +7293,7 @@ var bibTemplateVersion = '1.0.0';
|
|
|
7026
7293
|
|
|
7027
7294
|
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
7028
7295
|
|
|
7029
|
-
var styleCss$1 = css
|
|
7296
|
+
var styleCss$1 = css`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
7030
7297
|
|
|
7031
7298
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
7032
7299
|
|
|
@@ -7232,68 +7499,7 @@ class AuroHelpText extends LitElement {
|
|
|
7232
7499
|
|
|
7233
7500
|
var helpTextVersion = '1.0.0';
|
|
7234
7501
|
|
|
7235
|
-
css
|
|
7236
|
-
|
|
7237
|
-
css`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
7238
|
-
|
|
7239
|
-
css`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
7240
|
-
|
|
7241
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7242
|
-
// See LICENSE in the project root for license information.
|
|
7243
|
-
|
|
7244
|
-
// ---------------------------------------------------------------------
|
|
7245
|
-
|
|
7246
|
-
/**
|
|
7247
|
-
* Converts value to an array.
|
|
7248
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
7249
|
-
* If the value is already an array, it is returned.
|
|
7250
|
-
* If the value is undefined, it returns undefined.
|
|
7251
|
-
* @private
|
|
7252
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
7253
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
7254
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
7255
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
7256
|
-
*/
|
|
7257
|
-
function arrayConverter(value) {
|
|
7258
|
-
// Allow undefined
|
|
7259
|
-
if (value === undefined) {
|
|
7260
|
-
return undefined;
|
|
7261
|
-
}
|
|
7262
|
-
|
|
7263
|
-
// Return the value if it is already an array
|
|
7264
|
-
if (Array.isArray(value)) {
|
|
7265
|
-
return value;
|
|
7266
|
-
}
|
|
7267
|
-
|
|
7268
|
-
try {
|
|
7269
|
-
// If value is a JSON string, parse it
|
|
7270
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
7271
|
-
|
|
7272
|
-
// Check if the parsed value is an array
|
|
7273
|
-
if (Array.isArray(parsed)) {
|
|
7274
|
-
return parsed;
|
|
7275
|
-
}
|
|
7276
|
-
} catch (error) {
|
|
7277
|
-
// If JSON parsing fails, continue to throw an error below
|
|
7278
|
-
/* eslint-disable no-console */
|
|
7279
|
-
console.error('JSON parsing failed:', error);
|
|
7280
|
-
}
|
|
7281
|
-
|
|
7282
|
-
// Throw error if the input is not an array or undefined
|
|
7283
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
7284
|
-
}
|
|
7285
|
-
|
|
7286
|
-
css`:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem)}:host .wrapper[class*=-lg]:not(:last-child){margin-bottom:var(--ds-size-50, 0.25rem)}:host .wrapper[class*=-xl]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem)}:host .wrapper[class*=-xl]:not(:last-child){margin-bottom:var(--ds-size-100, 0.5rem)}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
7287
|
-
|
|
7288
|
-
css`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
7289
|
-
|
|
7290
|
-
css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
7291
|
-
|
|
7292
|
-
css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
7293
|
-
|
|
7294
|
-
css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
7295
|
-
|
|
7296
|
-
var styleCss = 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}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 8px 0 24px}:host([layout*=classic]) .triggerContent{padding:0 8px}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
7502
|
+
var styleCss = 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}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-50, 0.25rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-50, 0.25rem) 0 var(--ds-size-150, 0.75rem)}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-50, 0.25rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
7297
7503
|
|
|
7298
7504
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7299
7505
|
// See LICENSE in the project root for license information.
|
|
@@ -7308,7 +7514,6 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
|
|
|
7308
7514
|
* @slot label - Defines the content of the label.
|
|
7309
7515
|
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
7310
7516
|
* @slot helpText - Defines the content of the helpText.
|
|
7311
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
7312
7517
|
* @slot valueText - Dropdown value text display.
|
|
7313
7518
|
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
7314
7519
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
@@ -7578,6 +7783,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7578
7783
|
reflect: true
|
|
7579
7784
|
},
|
|
7580
7785
|
|
|
7786
|
+
/**
|
|
7787
|
+
* Define custom placeholder text.
|
|
7788
|
+
*/
|
|
7789
|
+
placeholder: {
|
|
7790
|
+
type: String,
|
|
7791
|
+
reflect: true
|
|
7792
|
+
},
|
|
7793
|
+
|
|
7581
7794
|
/**
|
|
7582
7795
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
7583
7796
|
*/
|
|
@@ -7624,11 +7837,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7624
7837
|
},
|
|
7625
7838
|
|
|
7626
7839
|
/**
|
|
7627
|
-
* Value selected for the component.
|
|
7628
|
-
* @type {String|Array<String>}
|
|
7840
|
+
* Value selected for the component.
|
|
7629
7841
|
*/
|
|
7630
7842
|
value: {
|
|
7631
|
-
type:
|
|
7843
|
+
type: String,
|
|
7844
|
+
reflect: true,
|
|
7845
|
+
attribute: 'value'
|
|
7632
7846
|
},
|
|
7633
7847
|
|
|
7634
7848
|
/**
|
|
@@ -7680,6 +7894,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7680
7894
|
];
|
|
7681
7895
|
}
|
|
7682
7896
|
|
|
7897
|
+
/**
|
|
7898
|
+
* Formatted value based on `multiSelect` state.
|
|
7899
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
7900
|
+
* @private
|
|
7901
|
+
* @returns {String|Array<String>}
|
|
7902
|
+
*/
|
|
7903
|
+
get formattedValue() {
|
|
7904
|
+
if (this.multiSelect) {
|
|
7905
|
+
if (!this.value) {
|
|
7906
|
+
return undefined;
|
|
7907
|
+
}
|
|
7908
|
+
if (this.value.startsWith("[")) {
|
|
7909
|
+
return JSON.parse(this.value);
|
|
7910
|
+
}
|
|
7911
|
+
return [this.value];
|
|
7912
|
+
}
|
|
7913
|
+
return this.value;
|
|
7914
|
+
}
|
|
7915
|
+
|
|
7683
7916
|
/**
|
|
7684
7917
|
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7685
7918
|
* @private
|
|
@@ -7688,7 +7921,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7688
7921
|
get commonLabelClasses() {
|
|
7689
7922
|
return {
|
|
7690
7923
|
'is-disabled': this.disabled,
|
|
7691
|
-
'withValue': this.value && this.value.length > 0,
|
|
7924
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7692
7925
|
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7693
7926
|
};
|
|
7694
7927
|
}
|
|
@@ -7714,6 +7947,21 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7714
7947
|
|
|
7715
7948
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
7716
7949
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
7950
|
+
|
|
7951
|
+
if (this.dropdown.isPopoverVisible) {
|
|
7952
|
+
// wait til the bib gets fully rendered
|
|
7953
|
+
setTimeout(() => {
|
|
7954
|
+
if (this.dropdown.isBibFullscreen) {
|
|
7955
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
7956
|
+
this.dropdown.trigger.focus();
|
|
7957
|
+
|
|
7958
|
+
// default focus indicator on the first menu option
|
|
7959
|
+
if (this.menu.index < 0) {
|
|
7960
|
+
this.menu.navigateOptions('down');
|
|
7961
|
+
}
|
|
7962
|
+
}
|
|
7963
|
+
});
|
|
7964
|
+
}
|
|
7717
7965
|
});
|
|
7718
7966
|
|
|
7719
7967
|
// setting up bibtemplate
|
|
@@ -7864,46 +8112,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7864
8112
|
configureSelect() {
|
|
7865
8113
|
|
|
7866
8114
|
this.addEventListener('keydown', (evt) => {
|
|
7867
|
-
|
|
7868
|
-
|
|
8115
|
+
// when the focus is on trigger not on close button
|
|
8116
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8117
|
+
if (evt.key === 'ArrowUp') {
|
|
8118
|
+
evt.preventDefault();
|
|
7869
8119
|
|
|
7870
|
-
|
|
8120
|
+
this.dropdown.show();
|
|
8121
|
+
|
|
8122
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8123
|
+
this.menu.navigateOptions('up');
|
|
8124
|
+
}
|
|
7871
8125
|
|
|
7872
|
-
|
|
7873
|
-
this.menu.navigateOptions('up');
|
|
8126
|
+
return;
|
|
7874
8127
|
}
|
|
7875
8128
|
|
|
7876
|
-
|
|
7877
|
-
|
|
8129
|
+
if (evt.key === 'ArrowDown') {
|
|
8130
|
+
evt.preventDefault();
|
|
7878
8131
|
|
|
7879
|
-
|
|
7880
|
-
evt.preventDefault();
|
|
8132
|
+
this.dropdown.show();
|
|
7881
8133
|
|
|
7882
|
-
|
|
8134
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8135
|
+
this.menu.navigateOptions('down');
|
|
8136
|
+
}
|
|
7883
8137
|
|
|
7884
|
-
|
|
7885
|
-
this.menu.navigateOptions('down');
|
|
8138
|
+
return;
|
|
7886
8139
|
}
|
|
7887
8140
|
|
|
7888
|
-
|
|
7889
|
-
|
|
8141
|
+
if (evt.key === 'Enter') {
|
|
8142
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8143
|
+
evt.preventDefault();
|
|
8144
|
+
this.menu.makeSelection();
|
|
8145
|
+
}
|
|
7890
8146
|
|
|
7891
|
-
|
|
7892
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
7893
|
-
evt.preventDefault();
|
|
7894
|
-
this.menu.makeSelection();
|
|
8147
|
+
return;
|
|
7895
8148
|
}
|
|
7896
|
-
|
|
7897
|
-
return;
|
|
7898
8149
|
}
|
|
7899
8150
|
|
|
7900
|
-
if (evt.key === 'Tab') {
|
|
8151
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
7901
8152
|
if (this.dropdown.isBibFullscreen) {
|
|
7902
8153
|
evt.preventDefault();
|
|
8154
|
+
|
|
8155
|
+
// when the focus is on trigger not on close button
|
|
8156
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8157
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8158
|
+
// when bib it not open, it will focus onto trigger.
|
|
8159
|
+
this.dropdown.focus();
|
|
8160
|
+
} else {
|
|
8161
|
+
// when close button has the focus, move focus back to the trigger
|
|
8162
|
+
this.dropdown.trigger.focus();
|
|
8163
|
+
}
|
|
7903
8164
|
} else {
|
|
7904
8165
|
this.dropdown.hide();
|
|
7905
8166
|
}
|
|
7906
|
-
|
|
7907
8167
|
return;
|
|
7908
8168
|
}
|
|
7909
8169
|
|
|
@@ -8071,38 +8331,29 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8071
8331
|
this.configureDropdown();
|
|
8072
8332
|
this.configureMenu();
|
|
8073
8333
|
this.configureSelect();
|
|
8074
|
-
|
|
8075
|
-
// Set the initial value in auro-menu if defined
|
|
8076
|
-
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
8077
|
-
this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
|
|
8078
|
-
if (this.menu) {
|
|
8079
|
-
this.menu.value = this.value;
|
|
8080
|
-
}
|
|
8081
|
-
}
|
|
8082
8334
|
}
|
|
8083
8335
|
|
|
8084
8336
|
/**
|
|
8085
8337
|
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8086
8338
|
* @param {string} value - The value to set in the menu.
|
|
8087
|
-
* @returns void
|
|
8339
|
+
* @returns {void}
|
|
8088
8340
|
* @private
|
|
8089
8341
|
*/
|
|
8090
8342
|
async updateMenuValue(value) {
|
|
8091
8343
|
if (!this.menu) return;
|
|
8092
8344
|
|
|
8345
|
+
this.menu.setAttribute('value', value);
|
|
8093
8346
|
this.menu.value = value;
|
|
8094
8347
|
await this.menu.updateComplete;
|
|
8095
8348
|
}
|
|
8096
8349
|
|
|
8097
8350
|
async updated(changedProperties) {
|
|
8098
|
-
if (changedProperties.has('multiSelect')) {
|
|
8351
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
8099
8352
|
this.clearSelection();
|
|
8100
8353
|
}
|
|
8101
8354
|
|
|
8102
8355
|
if (changedProperties.has('value')) {
|
|
8103
8356
|
if (this.value) {
|
|
8104
|
-
this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
|
|
8105
|
-
|
|
8106
8357
|
await this.updateMenuValue(this.value);
|
|
8107
8358
|
|
|
8108
8359
|
if (this.menu) {
|
|
@@ -8128,7 +8379,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8128
8379
|
composed: true,
|
|
8129
8380
|
detail: {
|
|
8130
8381
|
optionSelected: this.optionSelected,
|
|
8131
|
-
value: this.
|
|
8382
|
+
value: this.formattedValue
|
|
8132
8383
|
}
|
|
8133
8384
|
}));
|
|
8134
8385
|
}
|
|
@@ -8187,13 +8438,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8187
8438
|
const selectedValue = selectedOption.value;
|
|
8188
8439
|
|
|
8189
8440
|
if (this.multiSelect) {
|
|
8190
|
-
const currentArray =
|
|
8441
|
+
const currentArray = this.formattedValue;
|
|
8191
8442
|
|
|
8192
8443
|
if (!currentArray.includes(selectedValue)) {
|
|
8193
|
-
this.value = [
|
|
8444
|
+
this.value = JSON.stringify([
|
|
8194
8445
|
...currentArray,
|
|
8195
8446
|
selectedValue
|
|
8196
|
-
];
|
|
8447
|
+
]);
|
|
8197
8448
|
}
|
|
8198
8449
|
} else {
|
|
8199
8450
|
const currentValue = this.value;
|
|
@@ -8216,12 +8467,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8216
8467
|
}
|
|
8217
8468
|
|
|
8218
8469
|
if (this.multiSelect) {
|
|
8219
|
-
nativeSelect.value = this.
|
|
8470
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
8220
8471
|
} else {
|
|
8221
8472
|
nativeSelect.value = this.value || '';
|
|
8222
8473
|
}
|
|
8223
8474
|
}
|
|
8224
8475
|
|
|
8476
|
+
/**
|
|
8477
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8478
|
+
* @private
|
|
8479
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8480
|
+
*/
|
|
8225
8481
|
renderAriaHtml() {
|
|
8226
8482
|
return html`
|
|
8227
8483
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -8242,6 +8498,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8242
8498
|
`;
|
|
8243
8499
|
}
|
|
8244
8500
|
|
|
8501
|
+
/**
|
|
8502
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8503
|
+
* @private
|
|
8504
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8505
|
+
*/
|
|
8245
8506
|
renderNativeSelect() {
|
|
8246
8507
|
return html`
|
|
8247
8508
|
<div class="nativeSelectWrapper util_displayHidden">
|
|
@@ -8288,7 +8549,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8288
8549
|
: html`
|
|
8289
8550
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
8290
8551
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
8291
|
-
|
|
8552
|
+
${this.errorMessage}
|
|
8292
8553
|
</p>
|
|
8293
8554
|
</${this.helpTextTag}>
|
|
8294
8555
|
`
|
|
@@ -8303,14 +8564,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8303
8564
|
*/
|
|
8304
8565
|
renderLayoutEmphasized() {
|
|
8305
8566
|
const placeholderClass = {
|
|
8306
|
-
|
|
8567
|
+
'util_displayHidden': this.value
|
|
8307
8568
|
};
|
|
8308
8569
|
|
|
8309
8570
|
const displayValueClasses = {
|
|
8310
8571
|
'displayValue': true,
|
|
8311
8572
|
'hasContent': this.hasDisplayValueContent,
|
|
8312
8573
|
'hasFocus': this.isPopoverVisible,
|
|
8313
|
-
'withValue': this.value && this.value.length > 0,
|
|
8574
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8314
8575
|
'force': this.forceDisplayValue,
|
|
8315
8576
|
};
|
|
8316
8577
|
|
|
@@ -8337,7 +8598,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8337
8598
|
.offset="${this.offset}"
|
|
8338
8599
|
.placement="${this.placement}"
|
|
8339
8600
|
chevron
|
|
8340
|
-
fluid
|
|
8341
8601
|
for="selectMenu"
|
|
8342
8602
|
layout="${this.layout}"
|
|
8343
8603
|
part="dropdown"
|
|
@@ -8354,11 +8614,9 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8354
8614
|
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8355
8615
|
</label>
|
|
8356
8616
|
<div class="value" id="value"></div>
|
|
8357
|
-
${
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
</div>
|
|
8361
|
-
`}
|
|
8617
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8618
|
+
${this.placeholder}
|
|
8619
|
+
</div>
|
|
8362
8620
|
</div>
|
|
8363
8621
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8364
8622
|
<slot name="displayValue"></slot>
|
|
@@ -8385,14 +8643,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8385
8643
|
*/
|
|
8386
8644
|
renderLayoutSnowflake() {
|
|
8387
8645
|
const placeholderClass = {
|
|
8388
|
-
|
|
8646
|
+
'util_displayHidden': this.value
|
|
8389
8647
|
};
|
|
8390
8648
|
|
|
8391
8649
|
const displayValueClasses = {
|
|
8392
8650
|
'displayValue': true,
|
|
8393
8651
|
'hasContent': this.hasDisplayValueContent,
|
|
8394
8652
|
'hasFocus': this.isPopoverVisible,
|
|
8395
|
-
'withValue': this.value && this.value.length > 0,
|
|
8653
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8396
8654
|
'force': this.forceDisplayValue,
|
|
8397
8655
|
};
|
|
8398
8656
|
|
|
@@ -8418,7 +8676,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8418
8676
|
.offset="${this.offset}"
|
|
8419
8677
|
.placement="${this.placement}"
|
|
8420
8678
|
chevron
|
|
8421
|
-
fluid
|
|
8422
8679
|
for="selectMenu"
|
|
8423
8680
|
layout="${this.layout}"
|
|
8424
8681
|
part="dropdown"
|
|
@@ -8435,11 +8692,9 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8435
8692
|
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8436
8693
|
</label>
|
|
8437
8694
|
<div class="value" id="value"></div>
|
|
8438
|
-
${
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
</div>
|
|
8442
|
-
`}
|
|
8695
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8696
|
+
${this.placeholder}
|
|
8697
|
+
</div>
|
|
8443
8698
|
</div>
|
|
8444
8699
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8445
8700
|
<slot name="displayValue"></slot>
|
|
@@ -8467,14 +8722,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8467
8722
|
*/
|
|
8468
8723
|
renderLayoutClassic() {
|
|
8469
8724
|
const placeholderClass = {
|
|
8470
|
-
|
|
8725
|
+
'util_displayHidden': this.value
|
|
8471
8726
|
};
|
|
8472
8727
|
|
|
8473
8728
|
const displayValueClasses = {
|
|
8474
8729
|
'displayValue': true,
|
|
8475
8730
|
'hasContent': this.hasDisplayValueContent,
|
|
8476
8731
|
'hasFocus': this.isPopoverVisible,
|
|
8477
|
-
'withValue': this.value && this.value.length > 0,
|
|
8732
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8478
8733
|
'force': this.forceDisplayValue,
|
|
8479
8734
|
};
|
|
8480
8735
|
|
|
@@ -8500,7 +8755,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8500
8755
|
.offset="${this.offset}"
|
|
8501
8756
|
.placement="${this.placement}"
|
|
8502
8757
|
chevron
|
|
8503
|
-
fluid
|
|
8504
8758
|
for="selectMenu"
|
|
8505
8759
|
layout="${this.layout}"
|
|
8506
8760
|
part="dropdown"
|
|
@@ -8517,11 +8771,9 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8517
8771
|
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8518
8772
|
</label>
|
|
8519
8773
|
<div class="value" id="value"></div>
|
|
8520
|
-
${
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
</div>
|
|
8524
|
-
`}
|
|
8774
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8775
|
+
${this.placeholder}
|
|
8776
|
+
</div>
|
|
8525
8777
|
</div>
|
|
8526
8778
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8527
8779
|
<slot name="displayValue"></slot>
|
|
@@ -8571,106 +8823,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8571
8823
|
|
|
8572
8824
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
8573
8825
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
8574
|
-
|
|
8575
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
8576
|
-
renderBACKUP() {
|
|
8577
|
-
const placeholderClass = {
|
|
8578
|
-
hidden: this.value,
|
|
8579
|
-
};
|
|
8580
|
-
|
|
8581
|
-
return html`
|
|
8582
|
-
<div class="outerWrapper">
|
|
8583
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
8584
|
-
${this.optionActive && this.options.length > 0
|
|
8585
|
-
? html`
|
|
8586
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
8587
|
-
`
|
|
8588
|
-
: undefined
|
|
8589
|
-
};
|
|
8590
|
-
|
|
8591
|
-
${this.optionSelected && this.options.length > 0
|
|
8592
|
-
? html`
|
|
8593
|
-
${`${this.optionSelected.innerText} selected`}
|
|
8594
|
-
`
|
|
8595
|
-
: undefined
|
|
8596
|
-
};
|
|
8597
|
-
</div>
|
|
8598
|
-
<div id="slotHolder" aria-hidden="true">
|
|
8599
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8600
|
-
</div>
|
|
8601
|
-
<${this.dropdownTag}
|
|
8602
|
-
?autoPlacement="${this.autoPlacement}"
|
|
8603
|
-
?disabled="${this.disabled}"
|
|
8604
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8605
|
-
?matchWidth="${this.matchWidth}"
|
|
8606
|
-
?noFlip="${this.noFlip}"
|
|
8607
|
-
?onDark="${this.onDark}"
|
|
8608
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8609
|
-
.offset="${this.offset}"
|
|
8610
|
-
.placement="${this.placement}"
|
|
8611
|
-
chevron
|
|
8612
|
-
fluid
|
|
8613
|
-
for="selectMenu"
|
|
8614
|
-
layout="${this.layout}"
|
|
8615
|
-
part="dropdown"
|
|
8616
|
-
shape="${this.shape}"
|
|
8617
|
-
size="${this.size}">
|
|
8618
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
8619
|
-
<span id="placeholder"
|
|
8620
|
-
class="${classMap(placeholderClass)}"
|
|
8621
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
8622
|
-
>
|
|
8623
|
-
<slot name="placeholder"></slot>
|
|
8624
|
-
</span>
|
|
8625
|
-
<slot name="valueText" id="valueText"></slot>
|
|
8626
|
-
</span>
|
|
8627
|
-
|
|
8628
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8629
|
-
<slot></slot>
|
|
8630
|
-
</${this.bibtemplateTag}>
|
|
8631
|
-
<slot name="label" slot="label"></slot>
|
|
8632
|
-
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8633
|
-
<p slot="helpText">
|
|
8634
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
8635
|
-
? html`
|
|
8636
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
8637
|
-
<slot name="helpText"></slot>
|
|
8638
|
-
</span>`
|
|
8639
|
-
: html`
|
|
8640
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
8641
|
-
${this.errorMessage}
|
|
8642
|
-
</span>`
|
|
8643
|
-
}
|
|
8644
|
-
</p>
|
|
8645
|
-
</${this.dropdownTag}>
|
|
8646
|
-
<div class="nativeSelectWrapper">
|
|
8647
|
-
<select
|
|
8648
|
-
tabindex="-1"
|
|
8649
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
8650
|
-
name="${this.name || ''}"
|
|
8651
|
-
?disabled="${this.disabled}"
|
|
8652
|
-
?required="${this.required}"
|
|
8653
|
-
aria-hidden="true"
|
|
8654
|
-
autocomplete="${ifDefined$1(this.autocomplete)}"
|
|
8655
|
-
@change="${this._handleNativeSelectChange}">
|
|
8656
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
8657
|
-
${this.options.map((option) => {
|
|
8658
|
-
const optionValue = option.value || option.textContent;
|
|
8659
|
-
return html`
|
|
8660
|
-
<option
|
|
8661
|
-
value="${optionValue}"
|
|
8662
|
-
?selected="${this.value === optionValue}">
|
|
8663
|
-
${option.textContent}
|
|
8664
|
-
</option>
|
|
8665
|
-
`;
|
|
8666
|
-
})}
|
|
8667
|
-
</select>
|
|
8668
|
-
</div>
|
|
8669
|
-
<!-- Help text and error message template -->
|
|
8670
|
-
${this.renderHtmlHelpText()}
|
|
8671
|
-
</div>
|
|
8672
|
-
`;
|
|
8673
|
-
}
|
|
8674
8826
|
}
|
|
8675
8827
|
|
|
8676
8828
|
AuroSelect.register();
|