@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
|
@@ -795,19 +795,19 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
795
795
|
{
|
|
796
796
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
797
797
|
validity: 'tooShort',
|
|
798
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
798
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
799
799
|
},
|
|
800
800
|
{
|
|
801
801
|
check: (e) => e.value?.length > e.maxLength,
|
|
802
802
|
validity: 'tooLong',
|
|
803
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
803
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
804
804
|
}
|
|
805
805
|
],
|
|
806
806
|
pattern: [
|
|
807
807
|
{
|
|
808
808
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
809
809
|
validity: 'patternMismatch',
|
|
810
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
810
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
811
811
|
}
|
|
812
812
|
]
|
|
813
813
|
},
|
|
@@ -1002,10 +1002,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
1002
1002
|
if (!hasValue && elem.required && elem.touched) {
|
|
1003
1003
|
elem.validity = 'valueMissing';
|
|
1004
1004
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1005
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1005
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1006
1006
|
this.validateType(elem);
|
|
1007
1007
|
this.validateElementAttributes(elem);
|
|
1008
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
1008
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
1009
1009
|
this.validateElementAttributes(elem);
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
@@ -3340,6 +3340,267 @@ class AuroFloatingUI {
|
|
|
3340
3340
|
}
|
|
3341
3341
|
}
|
|
3342
3342
|
|
|
3343
|
+
// Selectors for focusable elements
|
|
3344
|
+
const FOCUSABLE_SELECTORS = [
|
|
3345
|
+
'a[href]',
|
|
3346
|
+
'button:not([disabled])',
|
|
3347
|
+
'textarea:not([disabled])',
|
|
3348
|
+
'input:not([disabled])',
|
|
3349
|
+
'select:not([disabled])',
|
|
3350
|
+
'[role="tab"]:not([disabled])',
|
|
3351
|
+
'[role="link"]:not([disabled])',
|
|
3352
|
+
'[role="button"]:not([disabled])',
|
|
3353
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3354
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3355
|
+
];
|
|
3356
|
+
|
|
3357
|
+
// List of custom components that are known to be focusable
|
|
3358
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3359
|
+
'auro-checkbox',
|
|
3360
|
+
'auro-radio',
|
|
3361
|
+
'auro-dropdown',
|
|
3362
|
+
'auro-button',
|
|
3363
|
+
'auro-combobox',
|
|
3364
|
+
'auro-input',
|
|
3365
|
+
'auro-counter',
|
|
3366
|
+
'auro-menu',
|
|
3367
|
+
'auro-select',
|
|
3368
|
+
'auro-datepicker',
|
|
3369
|
+
'auro-hyperlink',
|
|
3370
|
+
'auro-accordion',
|
|
3371
|
+
];
|
|
3372
|
+
|
|
3373
|
+
/**
|
|
3374
|
+
* Determines if a given element is a custom focusable component.
|
|
3375
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3376
|
+
*
|
|
3377
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3378
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3379
|
+
*/
|
|
3380
|
+
function isFocusableComponent(element) {
|
|
3381
|
+
const componentName = element.tagName.toLowerCase();
|
|
3382
|
+
|
|
3383
|
+
// Guard Clause: Element is a focusable component
|
|
3384
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3385
|
+
|
|
3386
|
+
// Guard Clause: Element is not disabled
|
|
3387
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3388
|
+
|
|
3389
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3390
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3391
|
+
|
|
3392
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3393
|
+
return true;
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3398
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3399
|
+
*
|
|
3400
|
+
* @param {HTMLElement} container The container to search within
|
|
3401
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3402
|
+
*/
|
|
3403
|
+
function getFocusableElements(container) {
|
|
3404
|
+
// Get elements in DOM order by walking the tree
|
|
3405
|
+
const orderedFocusableElements = [];
|
|
3406
|
+
|
|
3407
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3408
|
+
const collectFocusableElements = (root) => {
|
|
3409
|
+
// Check if current element is focusable
|
|
3410
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3411
|
+
// Check if this is a custom component that is focusable
|
|
3412
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3413
|
+
|
|
3414
|
+
if (isComponentFocusable) {
|
|
3415
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3416
|
+
orderedFocusableElements.push(root);
|
|
3417
|
+
return; // Skip traversing inside this component
|
|
3418
|
+
}
|
|
3419
|
+
|
|
3420
|
+
// Check if the element itself matches any selector
|
|
3421
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3422
|
+
if (root.matches?.(selector)) {
|
|
3423
|
+
orderedFocusableElements.push(root);
|
|
3424
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
// Process shadow DOM only for non-Auro components
|
|
3429
|
+
if (root.shadowRoot) {
|
|
3430
|
+
// Process shadow DOM children in order
|
|
3431
|
+
if (root.shadowRoot.children) {
|
|
3432
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3433
|
+
collectFocusableElements(child);
|
|
3434
|
+
});
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
// Process slots and their assigned nodes in order
|
|
3439
|
+
if (root.tagName === 'SLOT') {
|
|
3440
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3441
|
+
for (const node of assignedNodes) {
|
|
3442
|
+
collectFocusableElements(node);
|
|
3443
|
+
}
|
|
3444
|
+
} else {
|
|
3445
|
+
// Process light DOM children in order
|
|
3446
|
+
if (root.children) {
|
|
3447
|
+
Array.from(root.children).forEach(child => {
|
|
3448
|
+
collectFocusableElements(child);
|
|
3449
|
+
});
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
};
|
|
3454
|
+
|
|
3455
|
+
// Start the traversal from the container
|
|
3456
|
+
collectFocusableElements(container);
|
|
3457
|
+
|
|
3458
|
+
// Remove duplicates that might have been collected through different paths
|
|
3459
|
+
// while preserving order
|
|
3460
|
+
const uniqueElements = [];
|
|
3461
|
+
const seen = new Set();
|
|
3462
|
+
|
|
3463
|
+
for (const element of orderedFocusableElements) {
|
|
3464
|
+
if (!seen.has(element)) {
|
|
3465
|
+
seen.add(element);
|
|
3466
|
+
uniqueElements.push(element);
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3470
|
+
return uniqueElements;
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
/**
|
|
3474
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3475
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3476
|
+
*/
|
|
3477
|
+
class FocusTrap {
|
|
3478
|
+
/**
|
|
3479
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3480
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3481
|
+
*
|
|
3482
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3483
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3484
|
+
*/
|
|
3485
|
+
constructor(container) {
|
|
3486
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3487
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
this.container = container;
|
|
3491
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3492
|
+
|
|
3493
|
+
this._init();
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
/**
|
|
3497
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3498
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3499
|
+
*
|
|
3500
|
+
* @private
|
|
3501
|
+
*/
|
|
3502
|
+
_init() {
|
|
3503
|
+
|
|
3504
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3505
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3506
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3507
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3508
|
+
}
|
|
3509
|
+
|
|
3510
|
+
// Track tab direction
|
|
3511
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3514
|
+
/**
|
|
3515
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3516
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3517
|
+
*
|
|
3518
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3519
|
+
* @private
|
|
3520
|
+
*/
|
|
3521
|
+
_onKeydown = (e) => {
|
|
3522
|
+
|
|
3523
|
+
if (e.key === 'Tab') {
|
|
3524
|
+
|
|
3525
|
+
// Set the tab direction based on the key pressed
|
|
3526
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3527
|
+
|
|
3528
|
+
// Get the active element(s) in the document and shadow root
|
|
3529
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3530
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3531
|
+
let activeElement = document.activeElement;
|
|
3532
|
+
const actives = [activeElement];
|
|
3533
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3534
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3535
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3536
|
+
}
|
|
3537
|
+
|
|
3538
|
+
// Update the focusable elements
|
|
3539
|
+
const focusables = this._getFocusableElements();
|
|
3540
|
+
|
|
3541
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3542
|
+
const focusIndex =
|
|
3543
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3544
|
+
? focusables.length - 1
|
|
3545
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3546
|
+
? 0
|
|
3547
|
+
: null;
|
|
3548
|
+
|
|
3549
|
+
if (focusIndex !== null) {
|
|
3550
|
+
focusables[focusIndex].focus();
|
|
3551
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3552
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
};
|
|
3556
|
+
|
|
3557
|
+
/**
|
|
3558
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3559
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3560
|
+
*
|
|
3561
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3562
|
+
* @private
|
|
3563
|
+
*/
|
|
3564
|
+
_getFocusableElements() {
|
|
3565
|
+
// Use the imported utility function to get focusable elements
|
|
3566
|
+
const elements = getFocusableElements(this.container);
|
|
3567
|
+
|
|
3568
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3569
|
+
return elements;
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* Moves focus to the first focusable element within the container.
|
|
3574
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3575
|
+
*/
|
|
3576
|
+
focusFirstElement() {
|
|
3577
|
+
const focusables = this._getFocusableElements();
|
|
3578
|
+
if (focusables.length) focusables[0].focus();
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
/**
|
|
3582
|
+
* Moves focus to the last focusable element within the container.
|
|
3583
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3584
|
+
*/
|
|
3585
|
+
focusLastElement() {
|
|
3586
|
+
const focusables = this._getFocusableElements();
|
|
3587
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
/**
|
|
3591
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3592
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3593
|
+
*/
|
|
3594
|
+
disconnect() {
|
|
3595
|
+
|
|
3596
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3597
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3601
|
+
}
|
|
3602
|
+
}
|
|
3603
|
+
|
|
3343
3604
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3344
3605
|
// See LICENSE in the project root for license information.
|
|
3345
3606
|
|
|
@@ -3777,11 +4038,11 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3777
4038
|
|
|
3778
4039
|
var iconVersion$3 = '6.1.2';
|
|
3779
4040
|
|
|
3780
|
-
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
|
|
4041
|
+
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}`;
|
|
3781
4042
|
|
|
3782
4043
|
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)}`;
|
|
3783
4044
|
|
|
3784
|
-
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-
|
|
4045
|
+
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)}`;
|
|
3785
4046
|
|
|
3786
4047
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3787
4048
|
// See LICENSE in the project root for license information.
|
|
@@ -3941,17 +4202,6 @@ class AuroDropdownBib extends i$2 {
|
|
|
3941
4202
|
}
|
|
3942
4203
|
}
|
|
3943
4204
|
});
|
|
3944
|
-
|
|
3945
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
3946
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
3947
|
-
this.addEventListener('touchstart', this.preventBodyScroll, { passive: false });
|
|
3948
|
-
}
|
|
3949
|
-
|
|
3950
|
-
disconnectedCallback() {
|
|
3951
|
-
super.disconnectedCallback();
|
|
3952
|
-
|
|
3953
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
3954
|
-
this.removeEventListener('touchstart', this.preventBodyScroll, { passive: false });
|
|
3955
4205
|
}
|
|
3956
4206
|
|
|
3957
4207
|
firstUpdated(changedProperties) {
|
|
@@ -3967,19 +4217,6 @@ class AuroDropdownBib extends i$2 {
|
|
|
3967
4217
|
}));
|
|
3968
4218
|
}
|
|
3969
4219
|
|
|
3970
|
-
/**
|
|
3971
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
3972
|
-
* @param {Event} event - The touchmove event.
|
|
3973
|
-
* @returns {void}
|
|
3974
|
-
*/
|
|
3975
|
-
preventBodyScroll(event) {
|
|
3976
|
-
// when touchmove/touchstart on empty space
|
|
3977
|
-
if (event.target === this) {
|
|
3978
|
-
event.preventDefault();
|
|
3979
|
-
event.stopImmediatePropagation();
|
|
3980
|
-
}
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
4220
|
// function that renders the HTML and CSS into the scope of the component
|
|
3984
4221
|
render() {
|
|
3985
4222
|
const classes = {
|
|
@@ -4002,19 +4239,19 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
4002
4239
|
|
|
4003
4240
|
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}`;
|
|
4004
4241
|
|
|
4005
|
-
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:
|
|
4242
|
+
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)}`;
|
|
4006
4243
|
|
|
4007
|
-
var classicColorCss$1 = i$5
|
|
4244
|
+
var classicColorCss$1 = i$5``;
|
|
4008
4245
|
|
|
4009
|
-
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]) .
|
|
4246
|
+
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%}`;
|
|
4010
4247
|
|
|
4011
|
-
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
|
|
4248
|
+
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)}`;
|
|
4012
4249
|
|
|
4013
|
-
var styleSnowflakeCss$1 = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row
|
|
4250
|
+
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)}`;
|
|
4014
4251
|
|
|
4015
4252
|
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)}`;
|
|
4016
4253
|
|
|
4017
|
-
var styleCss$7 = i$5
|
|
4254
|
+
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}`;
|
|
4018
4255
|
|
|
4019
4256
|
var tokensCss$6 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
4020
4257
|
|
|
@@ -4319,10 +4556,8 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4319
4556
|
// See LICENSE in the project root for license information.
|
|
4320
4557
|
|
|
4321
4558
|
|
|
4322
|
-
|
|
4323
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4559
|
+
/*
|
|
4324
4560
|
* @slot - Default slot for the popover content.
|
|
4325
|
-
* @slot label - Defines the content of the label.
|
|
4326
4561
|
* @slot helpText - Defines the content of the helpText.
|
|
4327
4562
|
* @slot trigger - Defines the content of the trigger.
|
|
4328
4563
|
* @csspart trigger - The trigger content container.
|
|
@@ -4341,18 +4576,22 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4341
4576
|
this.matchWidth = false;
|
|
4342
4577
|
this.noHideOnThisFocusLoss = false;
|
|
4343
4578
|
|
|
4344
|
-
this.errorMessage =
|
|
4579
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4345
4580
|
|
|
4346
4581
|
// Layout Config
|
|
4347
|
-
this.layout =
|
|
4348
|
-
this.shape =
|
|
4349
|
-
this.size =
|
|
4582
|
+
this.layout = undefined;
|
|
4583
|
+
this.shape = undefined;
|
|
4584
|
+
this.size = undefined;
|
|
4350
4585
|
|
|
4351
4586
|
this.parentBorder = false;
|
|
4352
4587
|
|
|
4353
4588
|
this.privateDefaults();
|
|
4354
4589
|
}
|
|
4355
4590
|
|
|
4591
|
+
/**
|
|
4592
|
+
* @private
|
|
4593
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4594
|
+
*/
|
|
4356
4595
|
get commonWrapperClasses() {
|
|
4357
4596
|
return {
|
|
4358
4597
|
'trigger': true,
|
|
@@ -4370,13 +4609,10 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4370
4609
|
privateDefaults() {
|
|
4371
4610
|
this.chevron = false;
|
|
4372
4611
|
this.disabled = false;
|
|
4612
|
+
this.disableFocusTrap = false;
|
|
4373
4613
|
this.error = false;
|
|
4374
|
-
this.inset = false;
|
|
4375
|
-
this.rounded = false;
|
|
4376
4614
|
this.tabIndex = 0;
|
|
4377
4615
|
this.noToggle = false;
|
|
4378
|
-
this.a11yAutocomplete = 'none';
|
|
4379
|
-
this.labeled = true;
|
|
4380
4616
|
this.a11yRole = 'button';
|
|
4381
4617
|
this.onDark = false;
|
|
4382
4618
|
this.showTriggerBorders = true;
|
|
@@ -4472,6 +4708,18 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4472
4708
|
this.floater.showBib();
|
|
4473
4709
|
}
|
|
4474
4710
|
|
|
4711
|
+
/**
|
|
4712
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4713
|
+
* If not, trigger element will get focus.
|
|
4714
|
+
*/
|
|
4715
|
+
focus() {
|
|
4716
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4717
|
+
this.focusTrap.focusFirstElement();
|
|
4718
|
+
} else {
|
|
4719
|
+
this.trigger.focus();
|
|
4720
|
+
}
|
|
4721
|
+
}
|
|
4722
|
+
|
|
4475
4723
|
// function to define props used within the scope of this component
|
|
4476
4724
|
static get properties() {
|
|
4477
4725
|
return {
|
|
@@ -4485,6 +4733,15 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4485
4733
|
reflect: true
|
|
4486
4734
|
},
|
|
4487
4735
|
|
|
4736
|
+
/**
|
|
4737
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4738
|
+
* @default false
|
|
4739
|
+
*/
|
|
4740
|
+
disableEventShow: {
|
|
4741
|
+
type: Boolean,
|
|
4742
|
+
reflect: true
|
|
4743
|
+
},
|
|
4744
|
+
|
|
4488
4745
|
/**
|
|
4489
4746
|
* If declared, applies a border around the trigger slot.
|
|
4490
4747
|
*/
|
|
@@ -4503,17 +4760,17 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4503
4760
|
},
|
|
4504
4761
|
|
|
4505
4762
|
/**
|
|
4506
|
-
* If declared, the dropdown
|
|
4763
|
+
* If declared, the dropdown is not interactive.
|
|
4507
4764
|
*/
|
|
4508
|
-
|
|
4765
|
+
disabled: {
|
|
4509
4766
|
type: Boolean,
|
|
4510
4767
|
reflect: true
|
|
4511
4768
|
},
|
|
4512
4769
|
|
|
4513
4770
|
/**
|
|
4514
|
-
* If declared, the
|
|
4771
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4515
4772
|
*/
|
|
4516
|
-
|
|
4773
|
+
disableFocusTrap: {
|
|
4517
4774
|
type: Boolean,
|
|
4518
4775
|
reflect: true
|
|
4519
4776
|
},
|
|
@@ -4558,22 +4815,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4558
4815
|
reflect: true
|
|
4559
4816
|
},
|
|
4560
4817
|
|
|
4561
|
-
/**
|
|
4562
|
-
* Makes the trigger to be full width of its parent container.
|
|
4563
|
-
*/
|
|
4564
|
-
fluid: {
|
|
4565
|
-
type: Boolean,
|
|
4566
|
-
reflect: true
|
|
4567
|
-
},
|
|
4568
|
-
|
|
4569
|
-
/**
|
|
4570
|
-
* If declared, will apply padding around trigger slot content.
|
|
4571
|
-
*/
|
|
4572
|
-
inset: {
|
|
4573
|
-
type: Boolean,
|
|
4574
|
-
reflect: true
|
|
4575
|
-
},
|
|
4576
|
-
|
|
4577
4818
|
/**
|
|
4578
4819
|
* If true, the dropdown bib is displayed.
|
|
4579
4820
|
*/
|
|
@@ -4617,15 +4858,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4617
4858
|
reflect: true
|
|
4618
4859
|
},
|
|
4619
4860
|
|
|
4620
|
-
/**
|
|
4621
|
-
* Defines if there is a label preset.
|
|
4622
|
-
* @private
|
|
4623
|
-
*/
|
|
4624
|
-
labeled: {
|
|
4625
|
-
type: Boolean,
|
|
4626
|
-
reflect: true
|
|
4627
|
-
},
|
|
4628
|
-
|
|
4629
4861
|
/**
|
|
4630
4862
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4631
4863
|
* @private
|
|
@@ -4686,6 +4918,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4686
4918
|
reflect: true
|
|
4687
4919
|
},
|
|
4688
4920
|
|
|
4921
|
+
/**
|
|
4922
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4923
|
+
*/
|
|
4689
4924
|
onSlotChange: {
|
|
4690
4925
|
type: Function,
|
|
4691
4926
|
reflect: false
|
|
@@ -4700,14 +4935,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4700
4935
|
reflect: true
|
|
4701
4936
|
},
|
|
4702
4937
|
|
|
4703
|
-
/**
|
|
4704
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4705
|
-
*/
|
|
4706
|
-
rounded: {
|
|
4707
|
-
type: Boolean,
|
|
4708
|
-
reflect: true
|
|
4709
|
-
},
|
|
4710
|
-
|
|
4711
4938
|
/**
|
|
4712
4939
|
* @private
|
|
4713
4940
|
*/
|
|
@@ -4722,22 +4949,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4722
4949
|
type: String || undefined,
|
|
4723
4950
|
attribute: false,
|
|
4724
4951
|
reflect: false
|
|
4725
|
-
},
|
|
4726
|
-
|
|
4727
|
-
/**
|
|
4728
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4729
|
-
*/
|
|
4730
|
-
a11yAutocomplete: {
|
|
4731
|
-
type: String,
|
|
4732
|
-
attribute: false,
|
|
4733
4952
|
}
|
|
4734
4953
|
};
|
|
4735
4954
|
}
|
|
4736
4955
|
|
|
4737
4956
|
static get styles() {
|
|
4738
4957
|
return [
|
|
4739
|
-
colorCss$1$3,
|
|
4740
4958
|
tokensCss$1$3,
|
|
4959
|
+
colorCss$1$3,
|
|
4741
4960
|
|
|
4742
4961
|
// default layout
|
|
4743
4962
|
classicColorCss$1,
|
|
@@ -4800,6 +5019,12 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4800
5019
|
this.handleTriggerContentSlotChange();
|
|
4801
5020
|
}
|
|
4802
5021
|
|
|
5022
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
5023
|
+
this.updateFocusTrap();
|
|
5024
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
5025
|
+
this.trigger.focus();
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
4803
5028
|
}
|
|
4804
5029
|
|
|
4805
5030
|
firstUpdated() {
|
|
@@ -4820,9 +5045,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4820
5045
|
}
|
|
4821
5046
|
|
|
4822
5047
|
this.bibContent = this.floater.element.bib;
|
|
4823
|
-
this.bibContent.setAttribute('role', 'dialog');
|
|
4824
|
-
this.bibContent.setAttribute('aria-modal', 'true');
|
|
4825
|
-
this.bibContent.setAttribute('aria-labelledby', 'triggerLabel');
|
|
4826
5048
|
|
|
4827
5049
|
// Add the tag name as an attribute if it is different than the component name
|
|
4828
5050
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
@@ -4868,6 +5090,27 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4868
5090
|
this.hasFocus = true;
|
|
4869
5091
|
}
|
|
4870
5092
|
|
|
5093
|
+
/**
|
|
5094
|
+
* @private
|
|
5095
|
+
*/
|
|
5096
|
+
updateFocusTrap() {
|
|
5097
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5098
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5099
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5100
|
+
this.focusTrap.focusFirstElement();
|
|
5101
|
+
return;
|
|
5102
|
+
}
|
|
5103
|
+
|
|
5104
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5105
|
+
if (!this.focusTrap) {
|
|
5106
|
+
return;
|
|
5107
|
+
}
|
|
5108
|
+
|
|
5109
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5110
|
+
this.focusTrap.disconnect();
|
|
5111
|
+
this.focusTrap = undefined;
|
|
5112
|
+
}
|
|
5113
|
+
|
|
4871
5114
|
/**
|
|
4872
5115
|
* Function to support @focusout event.
|
|
4873
5116
|
* @private
|
|
@@ -5153,10 +5396,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5153
5396
|
id="bib"
|
|
5154
5397
|
shape="${this.shape}"
|
|
5155
5398
|
?data-show="${this.isPopoverVisible}"
|
|
5156
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5157
|
-
?common="${this.common}"
|
|
5158
|
-
?rounded="${this.common || this.rounded}"
|
|
5159
|
-
?inset="${this.common || this.inset}">
|
|
5399
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5160
5400
|
<div class="slotContent">
|
|
5161
5401
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5162
5402
|
</div>
|
|
@@ -5264,19 +5504,19 @@ var styleCss$4$2 = i$5`.util_displayInline{display:inline}.util_displayInlineBlo
|
|
|
5264
5504
|
|
|
5265
5505
|
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}`;
|
|
5266
5506
|
|
|
5267
|
-
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-
|
|
5507
|
+
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)}`;
|
|
5268
5508
|
|
|
5269
5509
|
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}`;
|
|
5270
5510
|
|
|
5271
|
-
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
|
|
5511
|
+
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}`;
|
|
5272
5512
|
|
|
5273
5513
|
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)}`;
|
|
5274
5514
|
|
|
5275
|
-
var emphasizedStyleCss = i$5`:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:
|
|
5515
|
+
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)}`;
|
|
5276
5516
|
|
|
5277
5517
|
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)}`;
|
|
5278
5518
|
|
|
5279
|
-
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}`;
|
|
5519
|
+
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}`;
|
|
5280
5520
|
|
|
5281
5521
|
const watchedItems = new Set();
|
|
5282
5522
|
|
|
@@ -9791,19 +10031,19 @@ class AuroFormValidation {
|
|
|
9791
10031
|
{
|
|
9792
10032
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
9793
10033
|
validity: 'tooShort',
|
|
9794
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
10034
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
9795
10035
|
},
|
|
9796
10036
|
{
|
|
9797
10037
|
check: (e) => e.value?.length > e.maxLength,
|
|
9798
10038
|
validity: 'tooLong',
|
|
9799
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
10039
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
9800
10040
|
}
|
|
9801
10041
|
],
|
|
9802
10042
|
pattern: [
|
|
9803
10043
|
{
|
|
9804
10044
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
9805
10045
|
validity: 'patternMismatch',
|
|
9806
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
10046
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
9807
10047
|
}
|
|
9808
10048
|
]
|
|
9809
10049
|
},
|
|
@@ -9998,10 +10238,10 @@ class AuroFormValidation {
|
|
|
9998
10238
|
if (!hasValue && elem.required && elem.touched) {
|
|
9999
10239
|
elem.validity = 'valueMissing';
|
|
10000
10240
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
10001
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10241
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
10002
10242
|
this.validateType(elem);
|
|
10003
10243
|
this.validateElementAttributes(elem);
|
|
10004
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
10244
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
10005
10245
|
this.validateElementAttributes(elem);
|
|
10006
10246
|
}
|
|
10007
10247
|
}
|
|
@@ -10483,7 +10723,7 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10483
10723
|
},
|
|
10484
10724
|
|
|
10485
10725
|
/**
|
|
10486
|
-
* Define custom placeholder text
|
|
10726
|
+
* Define custom placeholder text.
|
|
10487
10727
|
*/
|
|
10488
10728
|
placeholder: {
|
|
10489
10729
|
type: String,
|
|
@@ -10780,9 +11020,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10780
11020
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
10781
11021
|
this.validation.validate(this);
|
|
10782
11022
|
}
|
|
10783
|
-
|
|
10784
|
-
this.notifyValueChanged();
|
|
10785
11023
|
}
|
|
11024
|
+
|
|
11025
|
+
this.notifyValueChanged();
|
|
10786
11026
|
}
|
|
10787
11027
|
|
|
10788
11028
|
if (changedProperties.has('error')) {
|
|
@@ -12743,7 +12983,7 @@ var buttonVersion$1 = '11.0.0';
|
|
|
12743
12983
|
|
|
12744
12984
|
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)}`;
|
|
12745
12985
|
|
|
12746
|
-
var styleCss$6 = i$5
|
|
12986
|
+
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}`;
|
|
12747
12987
|
|
|
12748
12988
|
var tokensCss$5 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
12749
12989
|
|
|
@@ -13020,7 +13260,7 @@ class AuroInput extends BaseInput {
|
|
|
13020
13260
|
*/
|
|
13021
13261
|
get commonInputClasses() {
|
|
13022
13262
|
return {
|
|
13023
|
-
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
13263
|
+
'util_displayHiddenVisually': (this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0) || ((!this.value || this.value.length === 0) && !this.hasFocus && (!this.placeholder || this.placeholder === '')),
|
|
13024
13264
|
};
|
|
13025
13265
|
}
|
|
13026
13266
|
|
|
@@ -15304,6 +15544,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
15304
15544
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
15305
15545
|
}
|
|
15306
15546
|
|
|
15547
|
+
/**
|
|
15548
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
15549
|
+
* @param {Event} event - The touchmove event.
|
|
15550
|
+
* @returns {void}
|
|
15551
|
+
*/
|
|
15552
|
+
preventBodyScroll(event) {
|
|
15553
|
+
if (event.target === this) {
|
|
15554
|
+
event.preventDefault();
|
|
15555
|
+
}
|
|
15556
|
+
}
|
|
15557
|
+
|
|
15558
|
+
connectedCallback() {
|
|
15559
|
+
super.connectedCallback();
|
|
15560
|
+
|
|
15561
|
+
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
15562
|
+
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15563
|
+
}
|
|
15564
|
+
|
|
15565
|
+
disconnectedCallback() {
|
|
15566
|
+
super.disconnectedCallback();
|
|
15567
|
+
|
|
15568
|
+
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15569
|
+
}
|
|
15570
|
+
|
|
15307
15571
|
onCloseButtonClick() {
|
|
15308
15572
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
15309
15573
|
composed: true }));
|
|
@@ -15335,7 +15599,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
15335
15599
|
<div id="bibTemplate" part="bibtemplate">
|
|
15336
15600
|
${this.isFullscreen ? u$2`
|
|
15337
15601
|
<div id="headerContainer">
|
|
15338
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15602
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
15339
15603
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
15340
15604
|
</${this.buttonTag}>
|
|
15341
15605
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -15464,7 +15728,7 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
15464
15728
|
|
|
15465
15729
|
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)}`;
|
|
15466
15730
|
|
|
15467
|
-
var styleCss$3 = i$5
|
|
15731
|
+
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}`;
|
|
15468
15732
|
|
|
15469
15733
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
15470
15734
|
|
|
@@ -16352,18 +16616,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16352
16616
|
/**
|
|
16353
16617
|
* Validate every time we remove focus from the datepicker.
|
|
16354
16618
|
*/
|
|
16355
|
-
this.addEventListener('focusout', (
|
|
16356
|
-
if (event.relatedTarget === event.target) {
|
|
16357
|
-
// if the focus is moved within combobox, do nothing.
|
|
16358
|
-
return;
|
|
16359
|
-
}
|
|
16619
|
+
this.addEventListener('focusout', () => {
|
|
16360
16620
|
if (document.activeElement !== this) {
|
|
16361
16621
|
this.validate();
|
|
16362
|
-
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
16363
|
-
event.preventDefault();
|
|
16364
|
-
event.stopImmediatePropagation();
|
|
16365
|
-
this.focus();
|
|
16366
|
-
}
|
|
16367
16622
|
}
|
|
16368
16623
|
});
|
|
16369
16624
|
|
|
@@ -16469,12 +16724,23 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16469
16724
|
}
|
|
16470
16725
|
}
|
|
16471
16726
|
|
|
16472
|
-
if (evt.key === 'Tab') {
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16727
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
16728
|
+
if (this.dropdown.isBibFullscreen) {
|
|
16729
|
+
|
|
16730
|
+
// when focus is on the input, move focus back to close button with Tab key
|
|
16731
|
+
if (document.activeElement.shadowRoot.activeElement === this.inputInBib &&
|
|
16732
|
+
this.inputInBib.shadowRoot.activeElement.tagName !== 'INPUT' &&
|
|
16733
|
+
!evt.shiftKey) {
|
|
16734
|
+
evt.preventDefault();
|
|
16735
|
+
this.dropdown.focus();
|
|
16476
16736
|
}
|
|
16477
|
-
}
|
|
16737
|
+
} else {
|
|
16738
|
+
setTimeout(() => {
|
|
16739
|
+
if (document.activeElement !== this) {
|
|
16740
|
+
this.hideBib();
|
|
16741
|
+
}
|
|
16742
|
+
}, 0);
|
|
16743
|
+
}
|
|
16478
16744
|
}
|
|
16479
16745
|
|
|
16480
16746
|
/**
|
|
@@ -16487,7 +16753,12 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16487
16753
|
|
|
16488
16754
|
if (this.dropdown.isPopoverVisible) {
|
|
16489
16755
|
evt.preventDefault();
|
|
16490
|
-
|
|
16756
|
+
|
|
16757
|
+
// navigate on menu only when the focus is on input
|
|
16758
|
+
if (!this.dropdown.isBibFullscreen || this.shadowRoot.activeElement === this.inputInBib) {
|
|
16759
|
+
const direction = evt.key.replace('Arrow', '').toLowerCase();
|
|
16760
|
+
this.menu.navigateOptions(direction);
|
|
16761
|
+
}
|
|
16491
16762
|
}
|
|
16492
16763
|
}
|
|
16493
16764
|
});
|
|
@@ -16539,9 +16810,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16539
16810
|
* @returns {void}
|
|
16540
16811
|
*/
|
|
16541
16812
|
focus() {
|
|
16542
|
-
|
|
16543
|
-
this.setInputFocus();
|
|
16544
|
-
}
|
|
16813
|
+
this.input.focus();
|
|
16545
16814
|
}
|
|
16546
16815
|
|
|
16547
16816
|
/**
|
|
@@ -16821,7 +17090,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
16821
17090
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
16822
17091
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
16823
17092
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
16824
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
16825
17093
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
16826
17094
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
16827
17095
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -16934,9 +17202,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
16934
17202
|
reflect: true,
|
|
16935
17203
|
attribute: 'multiselect'
|
|
16936
17204
|
},
|
|
17205
|
+
|
|
17206
|
+
/**
|
|
17207
|
+
* Value selected for the component.
|
|
17208
|
+
*/
|
|
16937
17209
|
value: {
|
|
16938
|
-
|
|
16939
|
-
|
|
17210
|
+
type: String,
|
|
17211
|
+
reflect: true,
|
|
17212
|
+
attribute: 'value'
|
|
16940
17213
|
},
|
|
16941
17214
|
|
|
16942
17215
|
/**
|
|
@@ -16971,6 +17244,25 @@ class AuroMenu extends AuroElement$1 {
|
|
|
16971
17244
|
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroMenu);
|
|
16972
17245
|
}
|
|
16973
17246
|
|
|
17247
|
+
/**
|
|
17248
|
+
* Formatted value based on `multiSelect` state.
|
|
17249
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
17250
|
+
* @private
|
|
17251
|
+
* @returns {String|Array<String>}
|
|
17252
|
+
*/
|
|
17253
|
+
get formattedValue() {
|
|
17254
|
+
if (this.multiSelect) {
|
|
17255
|
+
if (!this.value) {
|
|
17256
|
+
return undefined;
|
|
17257
|
+
}
|
|
17258
|
+
if (this.value.startsWith("[")) {
|
|
17259
|
+
return JSON.parse(this.value);
|
|
17260
|
+
}
|
|
17261
|
+
return [this.value];
|
|
17262
|
+
}
|
|
17263
|
+
return this.value;
|
|
17264
|
+
}
|
|
17265
|
+
|
|
16974
17266
|
// Lifecycle Methods
|
|
16975
17267
|
|
|
16976
17268
|
connectedCallback() {
|
|
@@ -17013,7 +17305,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17013
17305
|
updated(changedProperties) {
|
|
17014
17306
|
super.updated(changedProperties);
|
|
17015
17307
|
|
|
17016
|
-
if (changedProperties.has('multiSelect')) {
|
|
17308
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
17017
17309
|
// Reset selection if multiSelect mode changes
|
|
17018
17310
|
this.clearSelection();
|
|
17019
17311
|
}
|
|
@@ -17027,7 +17319,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17027
17319
|
} else {
|
|
17028
17320
|
if (this.multiSelect) {
|
|
17029
17321
|
// In multiselect mode, this.value should be an array of strings
|
|
17030
|
-
const valueArray =
|
|
17322
|
+
const valueArray = this.formattedValue;
|
|
17031
17323
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
17032
17324
|
|
|
17033
17325
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -17194,14 +17486,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17194
17486
|
*/
|
|
17195
17487
|
handleSelectState(option) {
|
|
17196
17488
|
if (this.multiSelect) {
|
|
17197
|
-
const currentValue = this.
|
|
17489
|
+
const currentValue = this.formattedValue || [];
|
|
17198
17490
|
const currentSelected = this.optionSelected || [];
|
|
17199
17491
|
|
|
17200
17492
|
if (!currentValue.includes(option.value)) {
|
|
17201
|
-
this.value = [
|
|
17493
|
+
this.value = JSON.stringify([
|
|
17202
17494
|
...currentValue,
|
|
17203
17495
|
option.value
|
|
17204
|
-
];
|
|
17496
|
+
]);
|
|
17205
17497
|
}
|
|
17206
17498
|
if (!currentSelected.includes(option)) {
|
|
17207
17499
|
this.optionSelected = [
|
|
@@ -17224,13 +17516,15 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17224
17516
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
17225
17517
|
*/
|
|
17226
17518
|
handleDeselectState(option) {
|
|
17227
|
-
if (this.multiSelect
|
|
17519
|
+
if (this.multiSelect) {
|
|
17228
17520
|
// Remove this option from array
|
|
17229
|
-
|
|
17521
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
17230
17522
|
|
|
17231
17523
|
// If array is empty after removal, set back to undefined
|
|
17232
|
-
if (
|
|
17524
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
17233
17525
|
this.value = undefined;
|
|
17526
|
+
} else {
|
|
17527
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
17234
17528
|
}
|
|
17235
17529
|
|
|
17236
17530
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -17581,7 +17875,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17581
17875
|
}
|
|
17582
17876
|
}
|
|
17583
17877
|
|
|
17584
|
-
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) +
|
|
17878
|
+
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}`;
|
|
17585
17879
|
|
|
17586
17880
|
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)}`;
|
|
17587
17881
|
|