@aurodesignsystem-dev/auro-formkit 0.0.0-pr740.9 → 0.0.0-pr750.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +6 -0
- package/components/bibtemplate/dist/index.js +25 -1
- package/components/bibtemplate/dist/registered.js +25 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.min.js +23 -16
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.min.js +23 -16
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/dist/index.js +23 -16
- package/components/checkbox/dist/registered.js +23 -16
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +12 -6
- package/components/combobox/demo/api.min.js +442 -148
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.min.js +442 -148
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/index.js +405 -136
- package/components/combobox/dist/registered.js +405 -136
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +140 -7
- package/components/counter/demo/api.min.js +1171 -1016
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +86 -0
- package/components/counter/demo/index.min.js +1171 -1016
- 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 +1171 -1016
- package/components/counter/dist/registered.js +1171 -1016
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.min.js +403 -123
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.min.js +403 -123
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
- package/components/datepicker/dist/index.js +403 -123
- package/components/datepicker/dist/registered.js +403 -123
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +77 -269
- package/components/dropdown/demo/api.min.js +336 -96
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +45 -363
- package/components/dropdown/demo/index.min.js +336 -96
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +35 -67
- package/components/dropdown/dist/auro-dropdownBib.d.ts +0 -6
- package/components/dropdown/dist/index.js +336 -96
- package/components/dropdown/dist/registered.js +336 -96
- 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 +520 -358
- package/components/select/demo/index.html +16 -11
- package/components/select/demo/index.md +6 -158
- package/components/select/demo/index.min.js +520 -346
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +33 -8
- package/components/select/dist/index.js +483 -334
- package/components/select/dist/registered.js +483 -334
- package/package.json +26 -25
|
@@ -653,19 +653,19 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
653
653
|
{
|
|
654
654
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
655
655
|
validity: 'tooShort',
|
|
656
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
656
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
657
657
|
},
|
|
658
658
|
{
|
|
659
659
|
check: (e) => e.value?.length > e.maxLength,
|
|
660
660
|
validity: 'tooLong',
|
|
661
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
661
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
662
662
|
}
|
|
663
663
|
],
|
|
664
664
|
pattern: [
|
|
665
665
|
{
|
|
666
666
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
667
667
|
validity: 'patternMismatch',
|
|
668
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
668
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
669
669
|
}
|
|
670
670
|
]
|
|
671
671
|
},
|
|
@@ -860,10 +860,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
860
860
|
if (!hasValue && elem.required && elem.touched) {
|
|
861
861
|
elem.validity = 'valueMissing';
|
|
862
862
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
863
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
863
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
864
864
|
this.validateType(elem);
|
|
865
865
|
this.validateElementAttributes(elem);
|
|
866
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
866
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
867
867
|
this.validateElementAttributes(elem);
|
|
868
868
|
}
|
|
869
869
|
}
|
|
@@ -3198,6 +3198,267 @@ class AuroFloatingUI {
|
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
3200
|
|
|
3201
|
+
// Selectors for focusable elements
|
|
3202
|
+
const FOCUSABLE_SELECTORS = [
|
|
3203
|
+
'a[href]',
|
|
3204
|
+
'button:not([disabled])',
|
|
3205
|
+
'textarea:not([disabled])',
|
|
3206
|
+
'input:not([disabled])',
|
|
3207
|
+
'select:not([disabled])',
|
|
3208
|
+
'[role="tab"]:not([disabled])',
|
|
3209
|
+
'[role="link"]:not([disabled])',
|
|
3210
|
+
'[role="button"]:not([disabled])',
|
|
3211
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3212
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3213
|
+
];
|
|
3214
|
+
|
|
3215
|
+
// List of custom components that are known to be focusable
|
|
3216
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3217
|
+
'auro-checkbox',
|
|
3218
|
+
'auro-radio',
|
|
3219
|
+
'auro-dropdown',
|
|
3220
|
+
'auro-button',
|
|
3221
|
+
'auro-combobox',
|
|
3222
|
+
'auro-input',
|
|
3223
|
+
'auro-counter',
|
|
3224
|
+
'auro-menu',
|
|
3225
|
+
'auro-select',
|
|
3226
|
+
'auro-datepicker',
|
|
3227
|
+
'auro-hyperlink',
|
|
3228
|
+
'auro-accordion',
|
|
3229
|
+
];
|
|
3230
|
+
|
|
3231
|
+
/**
|
|
3232
|
+
* Determines if a given element is a custom focusable component.
|
|
3233
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3234
|
+
*
|
|
3235
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3236
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3237
|
+
*/
|
|
3238
|
+
function isFocusableComponent(element) {
|
|
3239
|
+
const componentName = element.tagName.toLowerCase();
|
|
3240
|
+
|
|
3241
|
+
// Guard Clause: Element is a focusable component
|
|
3242
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3243
|
+
|
|
3244
|
+
// Guard Clause: Element is not disabled
|
|
3245
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3246
|
+
|
|
3247
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3248
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3249
|
+
|
|
3250
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3251
|
+
return true;
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3254
|
+
/**
|
|
3255
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3256
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3257
|
+
*
|
|
3258
|
+
* @param {HTMLElement} container The container to search within
|
|
3259
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3260
|
+
*/
|
|
3261
|
+
function getFocusableElements(container) {
|
|
3262
|
+
// Get elements in DOM order by walking the tree
|
|
3263
|
+
const orderedFocusableElements = [];
|
|
3264
|
+
|
|
3265
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3266
|
+
const collectFocusableElements = (root) => {
|
|
3267
|
+
// Check if current element is focusable
|
|
3268
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3269
|
+
// Check if this is a custom component that is focusable
|
|
3270
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3271
|
+
|
|
3272
|
+
if (isComponentFocusable) {
|
|
3273
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3274
|
+
orderedFocusableElements.push(root);
|
|
3275
|
+
return; // Skip traversing inside this component
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
// Check if the element itself matches any selector
|
|
3279
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3280
|
+
if (root.matches?.(selector)) {
|
|
3281
|
+
orderedFocusableElements.push(root);
|
|
3282
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
// Process shadow DOM only for non-Auro components
|
|
3287
|
+
if (root.shadowRoot) {
|
|
3288
|
+
// Process shadow DOM children in order
|
|
3289
|
+
if (root.shadowRoot.children) {
|
|
3290
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3291
|
+
collectFocusableElements(child);
|
|
3292
|
+
});
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
// Process slots and their assigned nodes in order
|
|
3297
|
+
if (root.tagName === 'SLOT') {
|
|
3298
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3299
|
+
for (const node of assignedNodes) {
|
|
3300
|
+
collectFocusableElements(node);
|
|
3301
|
+
}
|
|
3302
|
+
} else {
|
|
3303
|
+
// Process light DOM children in order
|
|
3304
|
+
if (root.children) {
|
|
3305
|
+
Array.from(root.children).forEach(child => {
|
|
3306
|
+
collectFocusableElements(child);
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
};
|
|
3312
|
+
|
|
3313
|
+
// Start the traversal from the container
|
|
3314
|
+
collectFocusableElements(container);
|
|
3315
|
+
|
|
3316
|
+
// Remove duplicates that might have been collected through different paths
|
|
3317
|
+
// while preserving order
|
|
3318
|
+
const uniqueElements = [];
|
|
3319
|
+
const seen = new Set();
|
|
3320
|
+
|
|
3321
|
+
for (const element of orderedFocusableElements) {
|
|
3322
|
+
if (!seen.has(element)) {
|
|
3323
|
+
seen.add(element);
|
|
3324
|
+
uniqueElements.push(element);
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
return uniqueElements;
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
/**
|
|
3332
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3333
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3334
|
+
*/
|
|
3335
|
+
class FocusTrap {
|
|
3336
|
+
/**
|
|
3337
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3338
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3339
|
+
*
|
|
3340
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3341
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3342
|
+
*/
|
|
3343
|
+
constructor(container) {
|
|
3344
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3345
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
this.container = container;
|
|
3349
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3350
|
+
|
|
3351
|
+
this._init();
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
/**
|
|
3355
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3356
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3357
|
+
*
|
|
3358
|
+
* @private
|
|
3359
|
+
*/
|
|
3360
|
+
_init() {
|
|
3361
|
+
|
|
3362
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3363
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3364
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3365
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
// Track tab direction
|
|
3369
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
/**
|
|
3373
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3374
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3375
|
+
*
|
|
3376
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3377
|
+
* @private
|
|
3378
|
+
*/
|
|
3379
|
+
_onKeydown = (e) => {
|
|
3380
|
+
|
|
3381
|
+
if (e.key === 'Tab') {
|
|
3382
|
+
|
|
3383
|
+
// Set the tab direction based on the key pressed
|
|
3384
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3385
|
+
|
|
3386
|
+
// Get the active element(s) in the document and shadow root
|
|
3387
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3388
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3389
|
+
let activeElement = document.activeElement;
|
|
3390
|
+
const actives = [activeElement];
|
|
3391
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3392
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3393
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
// Update the focusable elements
|
|
3397
|
+
const focusables = this._getFocusableElements();
|
|
3398
|
+
|
|
3399
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3400
|
+
const focusIndex =
|
|
3401
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3402
|
+
? focusables.length - 1
|
|
3403
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3404
|
+
? 0
|
|
3405
|
+
: null;
|
|
3406
|
+
|
|
3407
|
+
if (focusIndex !== null) {
|
|
3408
|
+
focusables[focusIndex].focus();
|
|
3409
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3410
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
};
|
|
3414
|
+
|
|
3415
|
+
/**
|
|
3416
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3417
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3418
|
+
*
|
|
3419
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3420
|
+
* @private
|
|
3421
|
+
*/
|
|
3422
|
+
_getFocusableElements() {
|
|
3423
|
+
// Use the imported utility function to get focusable elements
|
|
3424
|
+
const elements = getFocusableElements(this.container);
|
|
3425
|
+
|
|
3426
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3427
|
+
return elements;
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
/**
|
|
3431
|
+
* Moves focus to the first focusable element within the container.
|
|
3432
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3433
|
+
*/
|
|
3434
|
+
focusFirstElement() {
|
|
3435
|
+
const focusables = this._getFocusableElements();
|
|
3436
|
+
if (focusables.length) focusables[0].focus();
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
/**
|
|
3440
|
+
* Moves focus to the last focusable element within the container.
|
|
3441
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3442
|
+
*/
|
|
3443
|
+
focusLastElement() {
|
|
3444
|
+
const focusables = this._getFocusableElements();
|
|
3445
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3450
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3451
|
+
*/
|
|
3452
|
+
disconnect() {
|
|
3453
|
+
|
|
3454
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3455
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3456
|
+
}
|
|
3457
|
+
|
|
3458
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3201
3462
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3202
3463
|
// See LICENSE in the project root for license information.
|
|
3203
3464
|
|
|
@@ -3635,11 +3896,11 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3635
3896
|
|
|
3636
3897
|
var iconVersion$3 = '6.1.2';
|
|
3637
3898
|
|
|
3638
|
-
var styleCss$1$3 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){top:0;left:0
|
|
3899
|
+
var styleCss$1$3 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
3639
3900
|
|
|
3640
3901
|
var colorCss$2$3 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3641
3902
|
|
|
3642
|
-
var tokensCss$1$3 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-
|
|
3903
|
+
var tokensCss$1$3 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3643
3904
|
|
|
3644
3905
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3645
3906
|
// See LICENSE in the project root for license information.
|
|
@@ -3799,17 +4060,6 @@ class AuroDropdownBib extends i$2 {
|
|
|
3799
4060
|
}
|
|
3800
4061
|
}
|
|
3801
4062
|
});
|
|
3802
|
-
|
|
3803
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
3804
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
3805
|
-
this.addEventListener('touchstart', this.preventBodyScroll, { passive: false });
|
|
3806
|
-
}
|
|
3807
|
-
|
|
3808
|
-
disconnectedCallback() {
|
|
3809
|
-
super.disconnectedCallback();
|
|
3810
|
-
|
|
3811
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
3812
|
-
this.removeEventListener('touchstart', this.preventBodyScroll, { passive: false });
|
|
3813
4063
|
}
|
|
3814
4064
|
|
|
3815
4065
|
firstUpdated(changedProperties) {
|
|
@@ -3825,19 +4075,6 @@ class AuroDropdownBib extends i$2 {
|
|
|
3825
4075
|
}));
|
|
3826
4076
|
}
|
|
3827
4077
|
|
|
3828
|
-
/**
|
|
3829
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
3830
|
-
* @param {Event} event - The touchmove event.
|
|
3831
|
-
* @returns {void}
|
|
3832
|
-
*/
|
|
3833
|
-
preventBodyScroll(event) {
|
|
3834
|
-
// when touchmove/touchstart on empty space
|
|
3835
|
-
if (event.target === this) {
|
|
3836
|
-
event.preventDefault();
|
|
3837
|
-
event.stopImmediatePropagation();
|
|
3838
|
-
}
|
|
3839
|
-
}
|
|
3840
|
-
|
|
3841
4078
|
// function that renders the HTML and CSS into the scope of the component
|
|
3842
4079
|
render() {
|
|
3843
4080
|
const classes = {
|
|
@@ -3860,19 +4097,19 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
3860
4097
|
|
|
3861
4098
|
var shapeSizeCss$1 = i$5`.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}`;
|
|
3862
4099
|
|
|
3863
|
-
var colorCss$1$3 = i$5`:host .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,:host(:not([ondark])) .wrapper:
|
|
4100
|
+
var colorCss$1$3 = i$5`: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)}`;
|
|
3864
4101
|
|
|
3865
|
-
var classicColorCss$1 = i$5
|
|
4102
|
+
var classicColorCss$1 = i$5``;
|
|
3866
4103
|
|
|
3867
|
-
var classicLayoutCss = i$5`: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]) .
|
|
4104
|
+
var classicLayoutCss = i$5`: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%}`;
|
|
3868
4105
|
|
|
3869
|
-
var styleEmphasizedCss$1 = i$5`: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-direction:row
|
|
4106
|
+
var styleEmphasizedCss$1 = i$5`: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)}`;
|
|
3870
4107
|
|
|
3871
|
-
var styleSnowflakeCss$1 = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row
|
|
4108
|
+
var styleSnowflakeCss$1 = i$5`:host{display:block}.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*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3872
4109
|
|
|
3873
4110
|
var colorCss$6 = i$5`: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)}`;
|
|
3874
4111
|
|
|
3875
|
-
var styleCss$7 = i$5
|
|
4112
|
+
var styleCss$7 = i$5`: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}`;
|
|
3876
4113
|
|
|
3877
4114
|
var tokensCss$6 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3878
4115
|
|
|
@@ -4177,10 +4414,8 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4177
4414
|
// See LICENSE in the project root for license information.
|
|
4178
4415
|
|
|
4179
4416
|
|
|
4180
|
-
|
|
4181
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4417
|
+
/*
|
|
4182
4418
|
* @slot - Default slot for the popover content.
|
|
4183
|
-
* @slot label - Defines the content of the label.
|
|
4184
4419
|
* @slot helpText - Defines the content of the helpText.
|
|
4185
4420
|
* @slot trigger - Defines the content of the trigger.
|
|
4186
4421
|
* @csspart trigger - The trigger content container.
|
|
@@ -4199,18 +4434,22 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4199
4434
|
this.matchWidth = false;
|
|
4200
4435
|
this.noHideOnThisFocusLoss = false;
|
|
4201
4436
|
|
|
4202
|
-
this.errorMessage =
|
|
4437
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4203
4438
|
|
|
4204
4439
|
// Layout Config
|
|
4205
|
-
this.layout =
|
|
4206
|
-
this.shape =
|
|
4207
|
-
this.size =
|
|
4440
|
+
this.layout = undefined;
|
|
4441
|
+
this.shape = undefined;
|
|
4442
|
+
this.size = undefined;
|
|
4208
4443
|
|
|
4209
4444
|
this.parentBorder = false;
|
|
4210
4445
|
|
|
4211
4446
|
this.privateDefaults();
|
|
4212
4447
|
}
|
|
4213
4448
|
|
|
4449
|
+
/**
|
|
4450
|
+
* @private
|
|
4451
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4452
|
+
*/
|
|
4214
4453
|
get commonWrapperClasses() {
|
|
4215
4454
|
return {
|
|
4216
4455
|
'trigger': true,
|
|
@@ -4228,13 +4467,10 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4228
4467
|
privateDefaults() {
|
|
4229
4468
|
this.chevron = false;
|
|
4230
4469
|
this.disabled = false;
|
|
4470
|
+
this.disableFocusTrap = false;
|
|
4231
4471
|
this.error = false;
|
|
4232
|
-
this.inset = false;
|
|
4233
|
-
this.rounded = false;
|
|
4234
4472
|
this.tabIndex = 0;
|
|
4235
4473
|
this.noToggle = false;
|
|
4236
|
-
this.a11yAutocomplete = 'none';
|
|
4237
|
-
this.labeled = true;
|
|
4238
4474
|
this.a11yRole = 'button';
|
|
4239
4475
|
this.onDark = false;
|
|
4240
4476
|
this.showTriggerBorders = true;
|
|
@@ -4330,6 +4566,18 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4330
4566
|
this.floater.showBib();
|
|
4331
4567
|
}
|
|
4332
4568
|
|
|
4569
|
+
/**
|
|
4570
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4571
|
+
* If not, trigger element will get focus.
|
|
4572
|
+
*/
|
|
4573
|
+
focus() {
|
|
4574
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4575
|
+
this.focusTrap.focusFirstElement();
|
|
4576
|
+
} else {
|
|
4577
|
+
this.trigger.focus();
|
|
4578
|
+
}
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4333
4581
|
// function to define props used within the scope of this component
|
|
4334
4582
|
static get properties() {
|
|
4335
4583
|
return {
|
|
@@ -4343,6 +4591,15 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4343
4591
|
reflect: true
|
|
4344
4592
|
},
|
|
4345
4593
|
|
|
4594
|
+
/**
|
|
4595
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4596
|
+
* @default false
|
|
4597
|
+
*/
|
|
4598
|
+
disableEventShow: {
|
|
4599
|
+
type: Boolean,
|
|
4600
|
+
reflect: true
|
|
4601
|
+
},
|
|
4602
|
+
|
|
4346
4603
|
/**
|
|
4347
4604
|
* If declared, applies a border around the trigger slot.
|
|
4348
4605
|
*/
|
|
@@ -4361,17 +4618,17 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4361
4618
|
},
|
|
4362
4619
|
|
|
4363
4620
|
/**
|
|
4364
|
-
* If declared, the dropdown
|
|
4621
|
+
* If declared, the dropdown is not interactive.
|
|
4365
4622
|
*/
|
|
4366
|
-
|
|
4623
|
+
disabled: {
|
|
4367
4624
|
type: Boolean,
|
|
4368
4625
|
reflect: true
|
|
4369
4626
|
},
|
|
4370
4627
|
|
|
4371
4628
|
/**
|
|
4372
|
-
* If declared, the
|
|
4629
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4373
4630
|
*/
|
|
4374
|
-
|
|
4631
|
+
disableFocusTrap: {
|
|
4375
4632
|
type: Boolean,
|
|
4376
4633
|
reflect: true
|
|
4377
4634
|
},
|
|
@@ -4416,22 +4673,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4416
4673
|
reflect: true
|
|
4417
4674
|
},
|
|
4418
4675
|
|
|
4419
|
-
/**
|
|
4420
|
-
* Makes the trigger to be full width of its parent container.
|
|
4421
|
-
*/
|
|
4422
|
-
fluid: {
|
|
4423
|
-
type: Boolean,
|
|
4424
|
-
reflect: true
|
|
4425
|
-
},
|
|
4426
|
-
|
|
4427
|
-
/**
|
|
4428
|
-
* If declared, will apply padding around trigger slot content.
|
|
4429
|
-
*/
|
|
4430
|
-
inset: {
|
|
4431
|
-
type: Boolean,
|
|
4432
|
-
reflect: true
|
|
4433
|
-
},
|
|
4434
|
-
|
|
4435
4676
|
/**
|
|
4436
4677
|
* If true, the dropdown bib is displayed.
|
|
4437
4678
|
*/
|
|
@@ -4475,15 +4716,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4475
4716
|
reflect: true
|
|
4476
4717
|
},
|
|
4477
4718
|
|
|
4478
|
-
/**
|
|
4479
|
-
* Defines if there is a label preset.
|
|
4480
|
-
* @private
|
|
4481
|
-
*/
|
|
4482
|
-
labeled: {
|
|
4483
|
-
type: Boolean,
|
|
4484
|
-
reflect: true
|
|
4485
|
-
},
|
|
4486
|
-
|
|
4487
4719
|
/**
|
|
4488
4720
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4489
4721
|
* @private
|
|
@@ -4544,6 +4776,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4544
4776
|
reflect: true
|
|
4545
4777
|
},
|
|
4546
4778
|
|
|
4779
|
+
/**
|
|
4780
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4781
|
+
*/
|
|
4547
4782
|
onSlotChange: {
|
|
4548
4783
|
type: Function,
|
|
4549
4784
|
reflect: false
|
|
@@ -4558,14 +4793,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4558
4793
|
reflect: true
|
|
4559
4794
|
},
|
|
4560
4795
|
|
|
4561
|
-
/**
|
|
4562
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4563
|
-
*/
|
|
4564
|
-
rounded: {
|
|
4565
|
-
type: Boolean,
|
|
4566
|
-
reflect: true
|
|
4567
|
-
},
|
|
4568
|
-
|
|
4569
4796
|
/**
|
|
4570
4797
|
* @private
|
|
4571
4798
|
*/
|
|
@@ -4580,22 +4807,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4580
4807
|
type: String || undefined,
|
|
4581
4808
|
attribute: false,
|
|
4582
4809
|
reflect: false
|
|
4583
|
-
},
|
|
4584
|
-
|
|
4585
|
-
/**
|
|
4586
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4587
|
-
*/
|
|
4588
|
-
a11yAutocomplete: {
|
|
4589
|
-
type: String,
|
|
4590
|
-
attribute: false,
|
|
4591
4810
|
}
|
|
4592
4811
|
};
|
|
4593
4812
|
}
|
|
4594
4813
|
|
|
4595
4814
|
static get styles() {
|
|
4596
4815
|
return [
|
|
4597
|
-
colorCss$1$3,
|
|
4598
4816
|
tokensCss$1$3,
|
|
4817
|
+
colorCss$1$3,
|
|
4599
4818
|
|
|
4600
4819
|
// default layout
|
|
4601
4820
|
classicColorCss$1,
|
|
@@ -4658,6 +4877,12 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4658
4877
|
this.handleTriggerContentSlotChange();
|
|
4659
4878
|
}
|
|
4660
4879
|
|
|
4880
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
4881
|
+
this.updateFocusTrap();
|
|
4882
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
4883
|
+
this.trigger.focus();
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4661
4886
|
}
|
|
4662
4887
|
|
|
4663
4888
|
firstUpdated() {
|
|
@@ -4678,9 +4903,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4678
4903
|
}
|
|
4679
4904
|
|
|
4680
4905
|
this.bibContent = this.floater.element.bib;
|
|
4681
|
-
this.bibContent.setAttribute('role', 'dialog');
|
|
4682
|
-
this.bibContent.setAttribute('aria-modal', 'true');
|
|
4683
|
-
this.bibContent.setAttribute('aria-labelledby', 'triggerLabel');
|
|
4684
4906
|
|
|
4685
4907
|
// Add the tag name as an attribute if it is different than the component name
|
|
4686
4908
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
@@ -4726,6 +4948,27 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4726
4948
|
this.hasFocus = true;
|
|
4727
4949
|
}
|
|
4728
4950
|
|
|
4951
|
+
/**
|
|
4952
|
+
* @private
|
|
4953
|
+
*/
|
|
4954
|
+
updateFocusTrap() {
|
|
4955
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
4956
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
4957
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
4958
|
+
this.focusTrap.focusFirstElement();
|
|
4959
|
+
return;
|
|
4960
|
+
}
|
|
4961
|
+
|
|
4962
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
4963
|
+
if (!this.focusTrap) {
|
|
4964
|
+
return;
|
|
4965
|
+
}
|
|
4966
|
+
|
|
4967
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
4968
|
+
this.focusTrap.disconnect();
|
|
4969
|
+
this.focusTrap = undefined;
|
|
4970
|
+
}
|
|
4971
|
+
|
|
4729
4972
|
/**
|
|
4730
4973
|
* Function to support @focusout event.
|
|
4731
4974
|
* @private
|
|
@@ -5011,10 +5254,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5011
5254
|
id="bib"
|
|
5012
5255
|
shape="${this.shape}"
|
|
5013
5256
|
?data-show="${this.isPopoverVisible}"
|
|
5014
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5015
|
-
?common="${this.common}"
|
|
5016
|
-
?rounded="${this.common || this.rounded}"
|
|
5017
|
-
?inset="${this.common || this.inset}">
|
|
5257
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5018
5258
|
<div class="slotContent">
|
|
5019
5259
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5020
5260
|
</div>
|
|
@@ -5122,19 +5362,19 @@ var styleCss$4$2 = i$5`.util_displayInline{display:inline}.util_displayInlineBlo
|
|
|
5122
5362
|
|
|
5123
5363
|
var styleDefaultCss = i$5`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}: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}.layoutDefault :host,:host(:not([layout])) :host{position:relative;display:block}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{display:flex;flex-direction:row}.layoutDefault .main,:host(:not([layout])) .main{display:flex;flex-direction:row;position:relative;flex:1}`;
|
|
5124
5364
|
|
|
5125
|
-
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}.wrapper input::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper .displayValue{background-color:var(--ds-auro-input-background-color)}:host(:not([ondark])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host(:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([ondark])[disabled]){--ds-auro-input-border-color: var(--ds-
|
|
5365
|
+
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}.wrapper input::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper .displayValue{background-color:var(--ds-auro-input-background-color)}:host(:not([ondark])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host(:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([ondark])[disabled]){--ds-auro-input-border-color: var(--ds-basic-color-border-subtle, #dddddd);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([ondark][disabled]){--ds-auro-input-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
5126
5366
|
|
|
5127
5367
|
var tokensCss$4 = i$5`:host(:not([ondark])){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: transparent}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: transparent}`;
|
|
5128
5368
|
|
|
5129
|
-
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-input-outline-color)}.layout-classic .mainContent{position:relative;display:flex;flex:1;flex-direction:column;justify-content:center;cursor:text}.layout-classic .mainContent label{cursor:text;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{height:auto;font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);justify-self:flex-start;line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;padding-bottom:0;line-height:0}.layout-classic .accents{padding:0
|
|
5369
|
+
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-input-outline-color)}.layout-classic .mainContent{position:relative;display:flex;flex:1;flex-direction:column;justify-content:center;cursor:text}.layout-classic .mainContent label{cursor:text;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{height:auto;font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);justify-self:flex-start;line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;padding-bottom:0;line-height:0}.layout-classic .accents .typeIcon>*{margin-left:var(--ds-size-50, 0.25rem)}.layout-classic .accents.left{padding-right:var(--ds-size-50, 0.25rem)}.layout-classic .accents.right{padding-left:var(--ds-size-50, 0.25rem)}.layout-classic .accents.right .notification{margin-right:var(--ds-size-50, 0.25rem)}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}`;
|
|
5130
5370
|
|
|
5131
5371
|
var classicColorCss = i$5`.layout-classic label{color:var(--ds-auro-input-label-text-color)}.layout-classic:focus-within{--ds-auro-input-outline-color: var(--ds-auro-input-border-color)}:host(:not([ondark])) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a);--ds-auro-input-outline-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-outline-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
5132
5372
|
|
|
5133
|
-
var emphasizedStyleCss = i$5`:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:
|
|
5373
|
+
var emphasizedStyleCss = i$5`:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:var(--ds-size-150, 0.75rem);width:calc(100% - var(--ds-size-150, 0.75rem))}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:var(--ds-size-150, 0.75rem);width:calc(100% - var(--ds-size-150, 0.75rem))}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:var(--ds-size-150, 0.75rem);width:calc(100% - var(--ds-size-300, 1.5rem))}.layout-emphasized,.layout-emphasized-left,.layout-emphasized-right{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-emphasized label,.layout-emphasized-left label,.layout-emphasized-right label{text-transform:uppercase;font-size:32px;line-height:38px}.layout-emphasized input,.layout-emphasized-left input,.layout-emphasized-right input{text-align:center;font-size:14px;line-height:20px}.layout-emphasized .mainContent,.layout-emphasized-left .mainContent,.layout-emphasized-right .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-emphasized .displayValue,.layout-emphasized-left .displayValue,.layout-emphasized-right .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-emphasized .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-left .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-right .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-emphasized .displayValueWrapper,.layout-emphasized-left .displayValueWrapper,.layout-emphasized-right .displayValueWrapper{transform:translateY(-50%)}.layout-emphasized.withValue,.layout-emphasized-left.withValue,.layout-emphasized-right.withValue{justify-content:flex-start}.layout-emphasized.withValue label,.layout-emphasized-left.withValue label,.layout-emphasized-right.withValue label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized.withValue input,.layout-emphasized-left.withValue input,.layout-emphasized-right.withValue input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-left:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-right:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{justify-content:flex-start}.layout-emphasized:focus-within label,.layout-emphasized-left:focus-within label,.layout-emphasized-right:focus-within label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized:focus-within input,.layout-emphasized-left:focus-within input,.layout-emphasized-right:focus-within input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:focus-within .alertNotification,.layout-emphasized-left:focus-within .alertNotification,.layout-emphasized-right:focus-within .alertNotification{display:none}.layout-emphasized .accents.left,.layout-emphasized-left .accents.left,.layout-emphasized-right .accents.left{padding-left:var(--ds-size-150, 0.75rem)}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:var(--ds-size-150, 0.75rem)}.layout-emphasized-left .alertNotification{margin-right:var(--ds-size-50, 0.25rem)}.layout-emphasized-left .clear{margin-left:var(--ds-size-50, 0.25rem)}.layout-emphasized-right .alertNotification{margin-left:var(--ds-size-50, 0.25rem)}.layout-emphasized-right .clear{margin-right:var(--ds-size-50, 0.25rem)}`;
|
|
5134
5374
|
|
|
5135
5375
|
var emphasizedColorCss = i$5`.layout-emphasized:focus-within,.layout-emphasized.withValue,.layout-emphasized-left:focus-within,.layout-emphasized-left.withValue,.layout-emphasized-right:focus-within,.layout-emphasized-right.withValue{--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{--auro-input-border-color: var(--ds-auro-input-border-color)}`;
|
|
5136
5376
|
|
|
5137
|
-
var snowflakeStyleCss = i$5`:root{--ds-advanced-color-button-flat-text: #676767;--ds-advanced-color-button-flat-text-disabled: #d0d0d0;--ds-advanced-color-button-flat-text-hover: #525252;--ds-advanced-color-button-flat-text-inverse: #ffffff;--ds-advanced-color-button-flat-text-inverse-disabled: #7e8894;--ds-advanced-color-button-flat-text-inverse-hover: #adadad;--ds-advanced-color-button-ghost-background-hover: rgba(0, 0, 0, 0.05);--ds-advanced-color-button-ghost-background-inverse-hover: rgba(255, 255, 255, 0.05);--ds-advanced-color-button-ghost-text: #01426a;--ds-advanced-color-button-ghost-text-disabled: #d0d0d0;--ds-advanced-color-button-ghost-text-inverse: #ffffff;--ds-advanced-color-button-ghost-text-inverse-disabled: #7e8894;--ds-advanced-color-button-primary-background: #01426a;--ds-advanced-color-button-primary-background-disabled: #acc9e2;--ds-advanced-color-button-primary-background-hover: #00274a;--ds-advanced-color-button-primary-background-inactive: #cfe0ef;--ds-advanced-color-button-primary-background-inactive-hover: #89b2d4;--ds-advanced-color-button-primary-background-inverse: #ffffff;--ds-advanced-color-button-primary-background-inverse-disabled: rgba(255, 255, 255, 0.75);--ds-advanced-color-button-primary-background-inverse-hover: #ebf3f9;--ds-advanced-color-button-primary-border: #01426a;--ds-advanced-color-button-primary-border-disabled: #acc9e2;--ds-advanced-color-button-primary-border-hover: #00274a;--ds-advanced-color-button-primary-border-inverse: #ffffff;--ds-advanced-color-button-primary-border-inverse-disabled: rgba(255, 255, 255, 0.75);--ds-advanced-color-button-primary-border-inverse-hover: #ebf3f9;--ds-advanced-color-button-primary-text: #ffffff;--ds-advanced-color-button-primary-text-disabled: #ffffff;--ds-advanced-color-button-primary-text-inverse: #01426a;--ds-advanced-color-button-secondary-background: #ffffff;--ds-advanced-color-button-secondary-background-disabled: #f7f7f7;--ds-advanced-color-button-secondary-background-hover: #f2f2f2;--ds-advanced-color-button-secondary-background-inverse-hover: rgba(255, 255, 255, 0.1);--ds-advanced-color-button-secondary-border: #01426a;--ds-advanced-color-button-secondary-border-hover: #00274a;--ds-advanced-color-button-secondary-border-disabled: #cfe0ef;--ds-advanced-color-button-secondary-border-inverse: #ffffff;--ds-advanced-color-button-secondary-border-inverse-disabled: #dddddd;--ds-advanced-color-button-secondary-text: #01426a;--ds-advanced-color-button-secondary-text-hover: #00274a;--ds-advanced-color-button-secondary-text-inverse: #ffffff;--ds-advanced-color-button-tertiary-background: rgba(0, 0, 0, 0.05);--ds-advanced-color-button-tertiary-background-hover: rgba(0, 0, 0, 0.1);--ds-advanced-color-button-tertiary-background-inverse: rgba(255, 255, 255, 0.05);--ds-advanced-color-button-tertiary-background-inverse-hover: rgba(255, 255, 255, 0.1);--ds-advanced-color-button-tertiary-text: #01426a;--ds-advanced-color-button-tertiary-text-hover: #00274a;--ds-advanced-color-button-tertiary-text-inverse: #ffffff;--ds-advanced-color-accents-accent1: #b2d583;--ds-advanced-color-accents-accent1-bold: #92c450;--ds-advanced-color-accents-accent1-muted: #deedca;--ds-advanced-color-accents-accent2: #fad362;--ds-advanced-color-accents-accent2-bold: #f2ba14;--ds-advanced-color-accents-accent2-muted: #fde398;--ds-advanced-color-accents-accent3: #63beff;--ds-advanced-color-accents-accent3-bold: #0074ca;--ds-advanced-color-accents-accent3-muted: #aedeff;--ds-advanced-color-accents-accent4: #feb17a;--ds-advanced-color-accents-accent4-bold: #fb7f24;--ds-advanced-color-accents-accent4-muted: #ffe2cf;--ds-advanced-color-accents-transparency: rgba(0, 0, 0, 0.1);--ds-advanced-color-accents-transparency-inverse: rgba(255, 255, 255, 0.2);--ds-advanced-color-avatar-gradient-bottom: #cfe0ef;--ds-advanced-color-avatar-gradient-top: #6899c6;--ds-advanced-color-boolean-disabled-inverse: #7e8894;--ds-advanced-color-boolean-error: #e31f26;--ds-advanced-color-boolean-error-hover: #b1161c;--ds-advanced-color-boolean-error-inverse: #f9a4a8;--ds-advanced-color-boolean-error-inverse-hover: #f15f65;--ds-advanced-color-boolean-indicator: #ffffff;--ds-advanced-color-boolean-indicator-inverse: #00274a;--ds-advanced-color-boolean-isfalse: #ffffff;--ds-advanced-color-boolean-isfalse-border: #585e67;--ds-advanced-color-boolean-isfalse-border-inverse: #ffffff;--ds-advanced-color-boolean-isfalse-hover: #f2f2f2;--ds-advanced-color-boolean-isfalse-inverse: rgba(255, 255, 255, 0.15);--ds-advanced-color-boolean-isfalse-inverse-hover: rgba(255, 255, 255, 0.2);--ds-advanced-color-boolean-istrue: #01426a;--ds-advanced-color-boolean-istrue-hover: #00274a;--ds-advanced-color-boolean-istrue-inverse: #ffffff;--ds-advanced-color-boolean-istrue-inverse-hover: rgba(255, 255, 255, 0.7);--ds-advanced-color-flightline-indicator: #00274a;--ds-advanced-color-flightline-line: #00274a;--ds-advanced-color-hyperlink-text: #2875b5;--ds-advanced-color-hyperlink-text-hover: #01426a;--ds-advanced-color-hyperlink-text-inverse: #ffffff;--ds-advanced-color-hyperlink-text-inverse-hover: #ebf3f9;--ds-advanced-color-shared-background: #ffffff;--ds-advanced-color-shared-background-inverse: rgba(255, 255, 255, 0.15);--ds-advanced-color-shared-background-inverse-disabled: rgba(255, 255, 255, 0.1);--ds-advanced-color-shared-background-inverse-hover: rgba(255, 255, 255, 0.2);--ds-advanced-color-shared-background-muted: #f7f7f7;--ds-advanced-color-shared-background-strong: #7e7e7e;--ds-advanced-color-shared-scrim: rgba(0, 0, 0, 0.5);--ds-advanced-color-shared-text-accent: #2875b5;--ds-advanced-color-skeleton-background: #f7f8fa;--ds-advanced-color-skeleton-wave: #e4e8ec;--ds-advanced-color-state-background-disabled: #dddddd;--ds-advanced-color-state-background-hover: #f2f2f2;--ds-advanced-color-state-background-inverse-disabled: #7e8894;--ds-advanced-color-state-error-inverse: #f9a4a8;--ds-advanced-color-state-focused: #01426a;--ds-advanced-color-state-focused-inverse: #ffffff;--ds-advanced-color-state-selected: #01426a;--ds-advanced-color-state-selected-hover: #00274a;--ds-basic-color-border-bold: #585e67;--ds-basic-color-border-brand: #00274a;--ds-basic-color-border-default: #959595;--ds-basic-color-border-divider: rgba(0, 0, 0, 0.15);--ds-basic-color-border-divider-inverse: rgba(255, 255, 255, 0.4);--ds-basic-color-border-inverse: #ffffff;--ds-basic-color-border-subtle: #dddddd;--ds-basic-color-brand-primary: #01426a;--ds-basic-color-brand-primary-bold: #00274a;--ds-basic-color-brand-primary-muted: #ebf3f9;--ds-basic-color-brand-primary-subtle: #2875b5;--ds-basic-color-brand-secondary: #5de3f7;--ds-basic-color-brand-secondary-bold: #18c3dd;--ds-basic-color-brand-secondary-muted: #ebfafd;--ds-basic-color-brand-secondary-subtle: #b4eff9;--ds-basic-color-brand-tertiary: #a3cd6a;--ds-basic-color-brand-tertiary-bold: #7daf3b;--ds-basic-color-brand-tertiary-muted: #eaf3dd;--ds-basic-color-brand-tertiary-subtle: #c9e1a7;--ds-basic-color-fare-basiceconomy: #97eaf8;--ds-basic-color-fare-business: #01426a;--ds-basic-color-fare-economy: #0074ca;--ds-basic-color-fare-first: #00274a;--ds-basic-color-fare-premiumeconomy: #005154;--ds-basic-color-page-background-default: #ebfafd;--ds-basic-color-page-background-utility: #ffffff;--ds-basic-color-status-default: #afb9c6;--ds-basic-color-status-error: #e31f26;--ds-basic-color-status-error-subtle: #fbc6c6;--ds-basic-color-status-info: #01426a;--ds-basic-color-status-info-subtle: #ebf3f9;--ds-basic-color-status-success: #447a1f;--ds-basic-color-status-success-subtle: #d6eac7;--ds-basic-color-status-warning: #fac200;--ds-basic-color-status-warning-subtle: #fff0b2;--ds-basic-color-surface-accent1: #5de3f7;--ds-basic-color-surface-accent1-muted: #ebfafd;--ds-basic-color-surface-accent1-subtle: #b4eff9;--ds-basic-color-surface-accent2: #a3cd6a;--ds-basic-color-surface-accent2-muted: #eaf3dd;--ds-basic-color-surface-default: #ffffff;--ds-basic-color-surface-inverse: #00274a;--ds-basic-color-surface-inverse-subtle: #2875b5;--ds-basic-color-surface-neutral-medium: #c5c5c5;--ds-basic-color-surface-neutral-subtle: #f7f7f7;--ds-basic-color-texticon-accent1: #265688;--ds-basic-color-texticon-default: #2a2a2a;--ds-basic-color-texticon-disabled: #d0d0d0;--ds-basic-color-texticon-inverse: #ffffff;--ds-basic-color-texticon-inverse-disabled: #7e8894;--ds-basic-color-texticon-inverse-muted: #ccd2db;--ds-basic-color-texticon-muted: #676767;--ds-basic-color-tier-program-loungetier-lounge: #01426a;--ds-basic-color-tier-program-loungetier-loungeplus: #53b390;--ds-basic-color-tier-program-loyaltytier-bronze: #d99f6d;--ds-basic-color-tier-program-loyaltytier-bronze-muted: #eed4be;--ds-basic-color-tier-program-loyaltytier-cobalt: #030772;--ds-basic-color-tier-program-loyaltytier-cobalt-muted: #a9b6d6;--ds-basic-color-tier-program-loyaltytier-copper: #cb7457;--ds-basic-color-tier-program-loyaltytier-copper-muted: #e7bfb1;--ds-basic-color-tier-program-loyaltytier-gold: #fbdc7a;--ds-basic-color-tier-program-loyaltytier-gold-muted: #fdefc4;--ds-basic-color-tier-program-loyaltytier-nickel: #abaab1;--ds-basic-color-tier-program-loyaltytier-nickel-muted: #e5e4e7;--ds-basic-color-tier-program-loyaltytier-platinum: #bcb8a4;--ds-basic-color-tier-program-loyaltytier-platinum-muted: #dad8cd;--ds-basic-color-tier-program-loyaltytier-silver: #e4e9ec;--ds-basic-color-tier-program-loyaltytier-silver-muted: #f9fafb;--ds-basic-color-tier-program-loyaltytier-titanium: #282828;--ds-basic-color-tier-program-loyaltytier-titanium-muted: #545454;--ds-basic-color-tier-program-oneworld-emerald: #139142;--ds-basic-color-tier-program-oneworld-ruby: #a41d4a;--ds-basic-color-tier-program-oneworld-sapphire: #015daa;--ds-basic-type-brand-family-primary: "AS Circular";--ds-basic-type-brand-family-secondary: "Good OT";--ds-basic-type-brand-line-height-primary: 1.3;--ds-basic-type-brand-line-height-secondary: 1;--ds-basic-type-brand-letter-spacing-primary: 0;--ds-basic-type-brand-letter-spacing-secondary: 0.05em;--ds-basic-type-brand-letter-spacing-tertiary: 0.10em;--ds-basic-type-family-accent: "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-body: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-display: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-heading: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-letter-spacing-accent: 0.05em;--ds-basic-type-letter-spacing-accent2: 0.10em;--ds-basic-type-letter-spacing-body: 0;--ds-basic-type-letter-spacing-display: 0;--ds-basic-type-letter-spacing-heading: 0;--ds-basic-type-line-height-accent: 1.3;--ds-basic-type-line-height-accent2: 1;--ds-basic-type-line-height-body: 1.63;--ds-basic-type-line-height-body2: 1.5;--ds-basic-type-line-height-body3: 1.25;--ds-basic-type-line-height-body4: 1;--ds-basic-type-line-height-body5: 0.88;--ds-basic-type-line-height-display: 1.3;--ds-basic-type-line-height-heading: 1.3;--ds-basic-type-weight-accent: 450;--ds-basic-type-weight-accent2: 500;--ds-basic-type-weight-body: 450;--ds-basic-type-weight-display: 300;--ds-basic-type-weight-heading: 300;--ds-basic-type-weight-heading2: 450}:host([layout*=snowflake]) .leftIndent{margin-left:24px;width:calc(100% - 48px)}:host([layout*=snowflake]) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.layout-snowflake{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-snowflake label{font-size:var(--ds-text-body-size-xs);line-height:20px}.layout-snowflake input{text-align:center;font-size:18px;line-height:26px}.layout-snowflake .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-snowflake .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-snowflake .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-snowflake .displayValueWrapper{transform:translateY(-50%)}.layout-snowflake.withValue{justify-content:flex-start}.layout-snowflake:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-snowflake:focus-within{justify-content:flex-start}.layout-snowflake:focus-within .alertNotification{display:none}.layout-snowflake .accents{width:24px}.layout-snowflake .accents.left{padding-left:24px}.layout-snowflake .accents.right{padding-right:24px}:host([layout*=snowflake]) .helpTextWrapper{text-align:center}`;
|
|
5377
|
+
var snowflakeStyleCss = i$5`:root{--ds-advanced-color-button-flat-text: #676767;--ds-advanced-color-button-flat-text-disabled: #d0d0d0;--ds-advanced-color-button-flat-text-hover: #525252;--ds-advanced-color-button-flat-text-inverse: #ffffff;--ds-advanced-color-button-flat-text-inverse-disabled: #7e8894;--ds-advanced-color-button-flat-text-inverse-hover: #adadad;--ds-advanced-color-button-ghost-background-hover: rgba(0, 0, 0, 0.05);--ds-advanced-color-button-ghost-background-inverse-hover: rgba(255, 255, 255, 0.05);--ds-advanced-color-button-ghost-text: #01426a;--ds-advanced-color-button-ghost-text-disabled: #d0d0d0;--ds-advanced-color-button-ghost-text-inverse: #ffffff;--ds-advanced-color-button-ghost-text-inverse-disabled: #7e8894;--ds-advanced-color-button-primary-background: #01426a;--ds-advanced-color-button-primary-background-disabled: #acc9e2;--ds-advanced-color-button-primary-background-hover: #00274a;--ds-advanced-color-button-primary-background-inactive: #cfe0ef;--ds-advanced-color-button-primary-background-inactive-hover: #89b2d4;--ds-advanced-color-button-primary-background-inverse: #ffffff;--ds-advanced-color-button-primary-background-inverse-disabled: rgba(255, 255, 255, 0.75);--ds-advanced-color-button-primary-background-inverse-hover: #ebf3f9;--ds-advanced-color-button-primary-border: #01426a;--ds-advanced-color-button-primary-border-disabled: #acc9e2;--ds-advanced-color-button-primary-border-hover: #00274a;--ds-advanced-color-button-primary-border-inverse: #ffffff;--ds-advanced-color-button-primary-border-inverse-disabled: rgba(255, 255, 255, 0.75);--ds-advanced-color-button-primary-border-inverse-hover: #ebf3f9;--ds-advanced-color-button-primary-text: #ffffff;--ds-advanced-color-button-primary-text-disabled: #ffffff;--ds-advanced-color-button-primary-text-inverse: #01426a;--ds-advanced-color-button-secondary-background: #ffffff;--ds-advanced-color-button-secondary-background-disabled: #f7f7f7;--ds-advanced-color-button-secondary-background-hover: #f2f2f2;--ds-advanced-color-button-secondary-background-inverse-hover: rgba(255, 255, 255, 0.1);--ds-advanced-color-button-secondary-border: #01426a;--ds-advanced-color-button-secondary-border-hover: #00274a;--ds-advanced-color-button-secondary-border-disabled: #cfe0ef;--ds-advanced-color-button-secondary-border-inverse: #ffffff;--ds-advanced-color-button-secondary-border-inverse-disabled: #dddddd;--ds-advanced-color-button-secondary-text: #01426a;--ds-advanced-color-button-secondary-text-hover: #00274a;--ds-advanced-color-button-secondary-text-inverse: #ffffff;--ds-advanced-color-button-tertiary-background: rgba(0, 0, 0, 0.05);--ds-advanced-color-button-tertiary-background-hover: rgba(0, 0, 0, 0.1);--ds-advanced-color-button-tertiary-background-inverse: rgba(255, 255, 255, 0.05);--ds-advanced-color-button-tertiary-background-inverse-hover: rgba(255, 255, 255, 0.1);--ds-advanced-color-button-tertiary-text: #01426a;--ds-advanced-color-button-tertiary-text-hover: #00274a;--ds-advanced-color-button-tertiary-text-inverse: #ffffff;--ds-advanced-color-accents-accent1: #b2d583;--ds-advanced-color-accents-accent1-bold: #92c450;--ds-advanced-color-accents-accent1-muted: #deedca;--ds-advanced-color-accents-accent2: #fad362;--ds-advanced-color-accents-accent2-bold: #f2ba14;--ds-advanced-color-accents-accent2-muted: #fde398;--ds-advanced-color-accents-accent3: #63beff;--ds-advanced-color-accents-accent3-bold: #0074ca;--ds-advanced-color-accents-accent3-muted: #aedeff;--ds-advanced-color-accents-accent4: #feb17a;--ds-advanced-color-accents-accent4-bold: #fb7f24;--ds-advanced-color-accents-accent4-muted: #ffe2cf;--ds-advanced-color-accents-transparency: rgba(0, 0, 0, 0.1);--ds-advanced-color-accents-transparency-inverse: rgba(255, 255, 255, 0.2);--ds-advanced-color-avatar-gradient-bottom: #cfe0ef;--ds-advanced-color-avatar-gradient-top: #6899c6;--ds-advanced-color-boolean-disabled-inverse: #7e8894;--ds-advanced-color-boolean-error: #e31f26;--ds-advanced-color-boolean-error-hover: #b1161c;--ds-advanced-color-boolean-error-inverse: #f9a4a8;--ds-advanced-color-boolean-error-inverse-hover: #f15f65;--ds-advanced-color-boolean-indicator: #ffffff;--ds-advanced-color-boolean-indicator-inverse: #00274a;--ds-advanced-color-boolean-isfalse: #ffffff;--ds-advanced-color-boolean-isfalse-border: #585e67;--ds-advanced-color-boolean-isfalse-border-inverse: #ffffff;--ds-advanced-color-boolean-isfalse-hover: #f2f2f2;--ds-advanced-color-boolean-isfalse-inverse: rgba(255, 255, 255, 0.15);--ds-advanced-color-boolean-isfalse-inverse-hover: rgba(255, 255, 255, 0.2);--ds-advanced-color-boolean-istrue: #01426a;--ds-advanced-color-boolean-istrue-hover: #00274a;--ds-advanced-color-boolean-istrue-inverse: #ffffff;--ds-advanced-color-boolean-istrue-inverse-hover: rgba(255, 255, 255, 0.7);--ds-advanced-color-flightline-indicator: #00274a;--ds-advanced-color-flightline-line: #00274a;--ds-advanced-color-hyperlink-text: #2875b5;--ds-advanced-color-hyperlink-text-hover: #01426a;--ds-advanced-color-hyperlink-text-inverse: #ffffff;--ds-advanced-color-hyperlink-text-inverse-hover: #ebf3f9;--ds-advanced-color-shared-background: #ffffff;--ds-advanced-color-shared-background-inverse: rgba(255, 255, 255, 0.15);--ds-advanced-color-shared-background-inverse-disabled: rgba(255, 255, 255, 0.1);--ds-advanced-color-shared-background-inverse-hover: rgba(255, 255, 255, 0.2);--ds-advanced-color-shared-background-muted: #f7f7f7;--ds-advanced-color-shared-background-strong: #7e7e7e;--ds-advanced-color-shared-scrim: rgba(0, 0, 0, 0.5);--ds-advanced-color-shared-text-accent: #2875b5;--ds-advanced-color-skeleton-background: #f7f8fa;--ds-advanced-color-skeleton-wave: #e4e8ec;--ds-advanced-color-state-background-disabled: #dddddd;--ds-advanced-color-state-background-hover: #f2f2f2;--ds-advanced-color-state-background-inverse-disabled: #7e8894;--ds-advanced-color-state-error-inverse: #f9a4a8;--ds-advanced-color-state-focused: #01426a;--ds-advanced-color-state-focused-inverse: #ffffff;--ds-advanced-color-state-selected: #01426a;--ds-advanced-color-state-selected-hover: #00274a;--ds-basic-color-border-bold: #585e67;--ds-basic-color-border-brand: #00274a;--ds-basic-color-border-default: #959595;--ds-basic-color-border-divider: rgba(0, 0, 0, 0.15);--ds-basic-color-border-divider-inverse: rgba(255, 255, 255, 0.4);--ds-basic-color-border-inverse: #ffffff;--ds-basic-color-border-subtle: #dddddd;--ds-basic-color-brand-primary: #01426a;--ds-basic-color-brand-primary-bold: #00274a;--ds-basic-color-brand-primary-muted: #ebf3f9;--ds-basic-color-brand-primary-subtle: #2875b5;--ds-basic-color-brand-secondary: #5de3f7;--ds-basic-color-brand-secondary-bold: #18c3dd;--ds-basic-color-brand-secondary-muted: #ebfafd;--ds-basic-color-brand-secondary-subtle: #b4eff9;--ds-basic-color-brand-tertiary: #a3cd6a;--ds-basic-color-brand-tertiary-bold: #7daf3b;--ds-basic-color-brand-tertiary-muted: #eaf3dd;--ds-basic-color-brand-tertiary-subtle: #c9e1a7;--ds-basic-color-fare-basiceconomy: #97eaf8;--ds-basic-color-fare-business: #01426a;--ds-basic-color-fare-economy: #0074ca;--ds-basic-color-fare-first: #00274a;--ds-basic-color-fare-premiumeconomy: #005154;--ds-basic-color-page-background-default: #ebfafd;--ds-basic-color-page-background-utility: #ffffff;--ds-basic-color-status-default: #afb9c6;--ds-basic-color-status-error: #e31f26;--ds-basic-color-status-error-subtle: #fbc6c6;--ds-basic-color-status-info: #01426a;--ds-basic-color-status-info-subtle: #ebf3f9;--ds-basic-color-status-success: #447a1f;--ds-basic-color-status-success-subtle: #d6eac7;--ds-basic-color-status-warning: #fac200;--ds-basic-color-status-warning-subtle: #fff0b2;--ds-basic-color-surface-accent1: #5de3f7;--ds-basic-color-surface-accent1-muted: #ebfafd;--ds-basic-color-surface-accent1-subtle: #b4eff9;--ds-basic-color-surface-accent2: #a3cd6a;--ds-basic-color-surface-accent2-muted: #eaf3dd;--ds-basic-color-surface-default: #ffffff;--ds-basic-color-surface-inverse: #00274a;--ds-basic-color-surface-inverse-subtle: #2875b5;--ds-basic-color-surface-neutral-medium: #c5c5c5;--ds-basic-color-surface-neutral-subtle: #f7f7f7;--ds-basic-color-texticon-accent1: #265688;--ds-basic-color-texticon-default: #2a2a2a;--ds-basic-color-texticon-disabled: #d0d0d0;--ds-basic-color-texticon-inverse: #ffffff;--ds-basic-color-texticon-inverse-disabled: #7e8894;--ds-basic-color-texticon-inverse-muted: #ccd2db;--ds-basic-color-texticon-muted: #676767;--ds-basic-color-tier-program-loungetier-lounge: #01426a;--ds-basic-color-tier-program-loungetier-loungeplus: #53b390;--ds-basic-color-tier-program-loyaltytier-bronze: #d99f6d;--ds-basic-color-tier-program-loyaltytier-bronze-muted: #eed4be;--ds-basic-color-tier-program-loyaltytier-cobalt: #030772;--ds-basic-color-tier-program-loyaltytier-cobalt-muted: #a9b6d6;--ds-basic-color-tier-program-loyaltytier-copper: #cb7457;--ds-basic-color-tier-program-loyaltytier-copper-muted: #e7bfb1;--ds-basic-color-tier-program-loyaltytier-gold: #fbdc7a;--ds-basic-color-tier-program-loyaltytier-gold-muted: #fdefc4;--ds-basic-color-tier-program-loyaltytier-nickel: #abaab1;--ds-basic-color-tier-program-loyaltytier-nickel-muted: #e5e4e7;--ds-basic-color-tier-program-loyaltytier-platinum: #bcb8a4;--ds-basic-color-tier-program-loyaltytier-platinum-muted: #dad8cd;--ds-basic-color-tier-program-loyaltytier-silver: #e4e9ec;--ds-basic-color-tier-program-loyaltytier-silver-muted: #f9fafb;--ds-basic-color-tier-program-loyaltytier-titanium: #282828;--ds-basic-color-tier-program-loyaltytier-titanium-muted: #545454;--ds-basic-color-tier-program-oneworld-emerald: #139142;--ds-basic-color-tier-program-oneworld-ruby: #a41d4a;--ds-basic-color-tier-program-oneworld-sapphire: #015daa;--ds-basic-type-brand-family-primary: "AS Circular";--ds-basic-type-brand-family-secondary: "Good OT";--ds-basic-type-brand-line-height-primary: 1.3;--ds-basic-type-brand-line-height-secondary: 1;--ds-basic-type-brand-letter-spacing-primary: 0;--ds-basic-type-brand-letter-spacing-secondary: 0.05em;--ds-basic-type-brand-letter-spacing-tertiary: 0.10em;--ds-basic-type-family-accent: "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-body: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-display: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-heading: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-letter-spacing-accent: 0.05em;--ds-basic-type-letter-spacing-accent2: 0.10em;--ds-basic-type-letter-spacing-body: 0;--ds-basic-type-letter-spacing-display: 0;--ds-basic-type-letter-spacing-heading: 0;--ds-basic-type-line-height-accent: 1.3;--ds-basic-type-line-height-accent2: 1;--ds-basic-type-line-height-body: 1.63;--ds-basic-type-line-height-body2: 1.5;--ds-basic-type-line-height-body3: 1.25;--ds-basic-type-line-height-body4: 1;--ds-basic-type-line-height-body5: 0.88;--ds-basic-type-line-height-display: 1.3;--ds-basic-type-line-height-heading: 1.3;--ds-basic-type-weight-accent: 450;--ds-basic-type-weight-accent2: 500;--ds-basic-type-weight-body: 450;--ds-basic-type-weight-display: 300;--ds-basic-type-weight-heading: 300;--ds-basic-type-weight-heading2: 450}:host([layout*=snowflake]) .leftIndent{margin-left:var(--ds-size-150, 0.75rem);width:calc(100% - var(--ds-size-300, 1.5rem))}:host([layout*=snowflake]) .rightIndent{margin-right:var(--ds-size-150, 0.75rem);width:calc(100% - var(--ds-size-300, 1.5rem))}.layout-snowflake{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-snowflake label{font-size:var(--ds-text-body-size-xs);line-height:20px}.layout-snowflake input{text-align:center;font-size:18px;line-height:26px}.layout-snowflake .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-snowflake .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-snowflake .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-snowflake .displayValueWrapper{transform:translateY(-50%)}.layout-snowflake.withValue{justify-content:flex-start}.layout-snowflake:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-snowflake:focus-within{justify-content:flex-start}.layout-snowflake:focus-within .alertNotification{display:none}.layout-snowflake .accents{width:var(--ds-size-150, 0.75rem)}.layout-snowflake .accents.left{padding-left:var(--ds-size-150, 0.75rem)}.layout-snowflake .accents.right{padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=snowflake]) .helpTextWrapper{text-align:center}`;
|
|
5138
5378
|
|
|
5139
5379
|
const watchedItems = new Set();
|
|
5140
5380
|
|
|
@@ -9649,19 +9889,19 @@ class AuroFormValidation {
|
|
|
9649
9889
|
{
|
|
9650
9890
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
9651
9891
|
validity: 'tooShort',
|
|
9652
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
9892
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
9653
9893
|
},
|
|
9654
9894
|
{
|
|
9655
9895
|
check: (e) => e.value?.length > e.maxLength,
|
|
9656
9896
|
validity: 'tooLong',
|
|
9657
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
9897
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
9658
9898
|
}
|
|
9659
9899
|
],
|
|
9660
9900
|
pattern: [
|
|
9661
9901
|
{
|
|
9662
9902
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
9663
9903
|
validity: 'patternMismatch',
|
|
9664
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
9904
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
9665
9905
|
}
|
|
9666
9906
|
]
|
|
9667
9907
|
},
|
|
@@ -9856,10 +10096,10 @@ class AuroFormValidation {
|
|
|
9856
10096
|
if (!hasValue && elem.required && elem.touched) {
|
|
9857
10097
|
elem.validity = 'valueMissing';
|
|
9858
10098
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
9859
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10099
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
9860
10100
|
this.validateType(elem);
|
|
9861
10101
|
this.validateElementAttributes(elem);
|
|
9862
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
10102
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
9863
10103
|
this.validateElementAttributes(elem);
|
|
9864
10104
|
}
|
|
9865
10105
|
}
|
|
@@ -10341,7 +10581,7 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10341
10581
|
},
|
|
10342
10582
|
|
|
10343
10583
|
/**
|
|
10344
|
-
* Define custom placeholder text
|
|
10584
|
+
* Define custom placeholder text.
|
|
10345
10585
|
*/
|
|
10346
10586
|
placeholder: {
|
|
10347
10587
|
type: String,
|
|
@@ -10638,9 +10878,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10638
10878
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
10639
10879
|
this.validation.validate(this);
|
|
10640
10880
|
}
|
|
10641
|
-
|
|
10642
|
-
this.notifyValueChanged();
|
|
10643
10881
|
}
|
|
10882
|
+
|
|
10883
|
+
this.notifyValueChanged();
|
|
10644
10884
|
}
|
|
10645
10885
|
|
|
10646
10886
|
if (changedProperties.has('error')) {
|
|
@@ -12601,7 +12841,7 @@ var buttonVersion$1 = '11.0.0';
|
|
|
12601
12841
|
|
|
12602
12842
|
var colorCss$5 = i$5`: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)}`;
|
|
12603
12843
|
|
|
12604
|
-
var styleCss$6 = i$5
|
|
12844
|
+
var styleCss$6 = i$5`: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}`;
|
|
12605
12845
|
|
|
12606
12846
|
var tokensCss$5 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
12607
12847
|
|
|
@@ -12878,7 +13118,7 @@ class AuroInput extends BaseInput {
|
|
|
12878
13118
|
*/
|
|
12879
13119
|
get commonInputClasses() {
|
|
12880
13120
|
return {
|
|
12881
|
-
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
13121
|
+
'util_displayHiddenVisually': (this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0) || ((!this.value || this.value.length === 0) && !this.hasFocus && (!this.placeholder || this.placeholder === '')),
|
|
12882
13122
|
};
|
|
12883
13123
|
}
|
|
12884
13124
|
|
|
@@ -15162,6 +15402,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
15162
15402
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
15163
15403
|
}
|
|
15164
15404
|
|
|
15405
|
+
/**
|
|
15406
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
15407
|
+
* @param {Event} event - The touchmove event.
|
|
15408
|
+
* @returns {void}
|
|
15409
|
+
*/
|
|
15410
|
+
preventBodyScroll(event) {
|
|
15411
|
+
if (event.target === this) {
|
|
15412
|
+
event.preventDefault();
|
|
15413
|
+
}
|
|
15414
|
+
}
|
|
15415
|
+
|
|
15416
|
+
connectedCallback() {
|
|
15417
|
+
super.connectedCallback();
|
|
15418
|
+
|
|
15419
|
+
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
15420
|
+
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15421
|
+
}
|
|
15422
|
+
|
|
15423
|
+
disconnectedCallback() {
|
|
15424
|
+
super.disconnectedCallback();
|
|
15425
|
+
|
|
15426
|
+
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15427
|
+
}
|
|
15428
|
+
|
|
15165
15429
|
onCloseButtonClick() {
|
|
15166
15430
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
15167
15431
|
composed: true }));
|
|
@@ -15193,7 +15457,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
15193
15457
|
<div id="bibTemplate" part="bibtemplate">
|
|
15194
15458
|
${this.isFullscreen ? u$2`
|
|
15195
15459
|
<div id="headerContainer">
|
|
15196
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15460
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15197
15461
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
15198
15462
|
</${this.buttonTag}>
|
|
15199
15463
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -15322,7 +15586,7 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
15322
15586
|
|
|
15323
15587
|
var colorCss$3 = i$5`: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)}`;
|
|
15324
15588
|
|
|
15325
|
-
var styleCss$3 = i$5
|
|
15589
|
+
var styleCss$3 = i$5`: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}`;
|
|
15326
15590
|
|
|
15327
15591
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
15328
15592
|
|
|
@@ -16210,18 +16474,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16210
16474
|
/**
|
|
16211
16475
|
* Validate every time we remove focus from the datepicker.
|
|
16212
16476
|
*/
|
|
16213
|
-
this.addEventListener('focusout', (
|
|
16214
|
-
if (event.relatedTarget === event.target) {
|
|
16215
|
-
// if the focus is moved within combobox, do nothing.
|
|
16216
|
-
return;
|
|
16217
|
-
}
|
|
16477
|
+
this.addEventListener('focusout', () => {
|
|
16218
16478
|
if (document.activeElement !== this) {
|
|
16219
16479
|
this.validate();
|
|
16220
|
-
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
16221
|
-
event.preventDefault();
|
|
16222
|
-
event.stopImmediatePropagation();
|
|
16223
|
-
this.focus();
|
|
16224
|
-
}
|
|
16225
16480
|
}
|
|
16226
16481
|
});
|
|
16227
16482
|
|
|
@@ -16327,12 +16582,23 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16327
16582
|
}
|
|
16328
16583
|
}
|
|
16329
16584
|
|
|
16330
|
-
if (evt.key === 'Tab') {
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
|
|
16585
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
16586
|
+
if (this.dropdown.isBibFullscreen) {
|
|
16587
|
+
|
|
16588
|
+
// when focus is on the input, move focus back to close button with Tab key
|
|
16589
|
+
if (document.activeElement.shadowRoot.activeElement === this.inputInBib &&
|
|
16590
|
+
this.inputInBib.shadowRoot.activeElement.tagName !== 'INPUT' &&
|
|
16591
|
+
!evt.shiftKey) {
|
|
16592
|
+
evt.preventDefault();
|
|
16593
|
+
this.dropdown.focus();
|
|
16334
16594
|
}
|
|
16335
|
-
}
|
|
16595
|
+
} else {
|
|
16596
|
+
setTimeout(() => {
|
|
16597
|
+
if (document.activeElement !== this) {
|
|
16598
|
+
this.hideBib();
|
|
16599
|
+
}
|
|
16600
|
+
}, 0);
|
|
16601
|
+
}
|
|
16336
16602
|
}
|
|
16337
16603
|
|
|
16338
16604
|
/**
|
|
@@ -16345,7 +16611,12 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16345
16611
|
|
|
16346
16612
|
if (this.dropdown.isPopoverVisible) {
|
|
16347
16613
|
evt.preventDefault();
|
|
16348
|
-
|
|
16614
|
+
|
|
16615
|
+
// navigate on menu only when the focus is on input
|
|
16616
|
+
if (!this.dropdown.isBibFullscreen || this.shadowRoot.activeElement === this.inputInBib) {
|
|
16617
|
+
const direction = evt.key.replace('Arrow', '').toLowerCase();
|
|
16618
|
+
this.menu.navigateOptions(direction);
|
|
16619
|
+
}
|
|
16349
16620
|
}
|
|
16350
16621
|
}
|
|
16351
16622
|
});
|
|
@@ -16397,9 +16668,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16397
16668
|
* @returns {void}
|
|
16398
16669
|
*/
|
|
16399
16670
|
focus() {
|
|
16400
|
-
|
|
16401
|
-
this.setInputFocus();
|
|
16402
|
-
}
|
|
16671
|
+
this.input.focus();
|
|
16403
16672
|
}
|
|
16404
16673
|
|
|
16405
16674
|
/**
|
|
@@ -16679,7 +16948,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
16679
16948
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
16680
16949
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
16681
16950
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
16682
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
16683
16951
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
16684
16952
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
16685
16953
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -16792,9 +17060,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
16792
17060
|
reflect: true,
|
|
16793
17061
|
attribute: 'multiselect'
|
|
16794
17062
|
},
|
|
17063
|
+
|
|
17064
|
+
/**
|
|
17065
|
+
* Value selected for the component.
|
|
17066
|
+
*/
|
|
16795
17067
|
value: {
|
|
16796
|
-
|
|
16797
|
-
|
|
17068
|
+
type: String,
|
|
17069
|
+
reflect: true,
|
|
17070
|
+
attribute: 'value'
|
|
16798
17071
|
},
|
|
16799
17072
|
|
|
16800
17073
|
/**
|
|
@@ -16829,6 +17102,25 @@ class AuroMenu extends AuroElement$1 {
|
|
|
16829
17102
|
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroMenu);
|
|
16830
17103
|
}
|
|
16831
17104
|
|
|
17105
|
+
/**
|
|
17106
|
+
* Formatted value based on `multiSelect` state.
|
|
17107
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
17108
|
+
* @private
|
|
17109
|
+
* @returns {String|Array<String>}
|
|
17110
|
+
*/
|
|
17111
|
+
get formattedValue() {
|
|
17112
|
+
if (this.multiSelect) {
|
|
17113
|
+
if (!this.value) {
|
|
17114
|
+
return undefined;
|
|
17115
|
+
}
|
|
17116
|
+
if (this.value.startsWith("[")) {
|
|
17117
|
+
return JSON.parse(this.value);
|
|
17118
|
+
}
|
|
17119
|
+
return [this.value];
|
|
17120
|
+
}
|
|
17121
|
+
return this.value;
|
|
17122
|
+
}
|
|
17123
|
+
|
|
16832
17124
|
// Lifecycle Methods
|
|
16833
17125
|
|
|
16834
17126
|
connectedCallback() {
|
|
@@ -16871,7 +17163,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
16871
17163
|
updated(changedProperties) {
|
|
16872
17164
|
super.updated(changedProperties);
|
|
16873
17165
|
|
|
16874
|
-
if (changedProperties.has('multiSelect')) {
|
|
17166
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
16875
17167
|
// Reset selection if multiSelect mode changes
|
|
16876
17168
|
this.clearSelection();
|
|
16877
17169
|
}
|
|
@@ -16885,7 +17177,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
16885
17177
|
} else {
|
|
16886
17178
|
if (this.multiSelect) {
|
|
16887
17179
|
// In multiselect mode, this.value should be an array of strings
|
|
16888
|
-
const valueArray =
|
|
17180
|
+
const valueArray = this.formattedValue;
|
|
16889
17181
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
16890
17182
|
|
|
16891
17183
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -17052,14 +17344,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17052
17344
|
*/
|
|
17053
17345
|
handleSelectState(option) {
|
|
17054
17346
|
if (this.multiSelect) {
|
|
17055
|
-
const currentValue = this.
|
|
17347
|
+
const currentValue = this.formattedValue || [];
|
|
17056
17348
|
const currentSelected = this.optionSelected || [];
|
|
17057
17349
|
|
|
17058
17350
|
if (!currentValue.includes(option.value)) {
|
|
17059
|
-
this.value = [
|
|
17351
|
+
this.value = JSON.stringify([
|
|
17060
17352
|
...currentValue,
|
|
17061
17353
|
option.value
|
|
17062
|
-
];
|
|
17354
|
+
]);
|
|
17063
17355
|
}
|
|
17064
17356
|
if (!currentSelected.includes(option)) {
|
|
17065
17357
|
this.optionSelected = [
|
|
@@ -17082,13 +17374,15 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17082
17374
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
17083
17375
|
*/
|
|
17084
17376
|
handleDeselectState(option) {
|
|
17085
|
-
if (this.multiSelect
|
|
17377
|
+
if (this.multiSelect) {
|
|
17086
17378
|
// Remove this option from array
|
|
17087
|
-
|
|
17379
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
17088
17380
|
|
|
17089
17381
|
// If array is empty after removal, set back to undefined
|
|
17090
|
-
if (
|
|
17382
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
17091
17383
|
this.value = undefined;
|
|
17384
|
+
} else {
|
|
17385
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
17092
17386
|
}
|
|
17093
17387
|
|
|
17094
17388
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -17439,7 +17733,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17439
17733
|
}
|
|
17440
17734
|
}
|
|
17441
17735
|
|
|
17442
|
-
var styleCss$1 = i$5`: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) +
|
|
17736
|
+
var styleCss$1 = i$5`: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) + var(--ds-size-150, 0.75rem) + 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) + var(--ds-size-150, 0.75rem) + 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}`;
|
|
17443
17737
|
|
|
17444
17738
|
var colorCss$1 = i$5`: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)}`;
|
|
17445
17739
|
|