@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.14 → 0.0.0-pr624.16
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 +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1022 -12
- package/components/bibtemplate/dist/registered.js +1022 -12
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +2 -2
- package/components/checkbox/demo/api.min.js +24 -19
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +24 -19
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +24 -19
- package/components/checkbox/dist/registered.js +24 -19
- package/components/combobox/demo/api.md +52 -0
- package/components/combobox/demo/api.min.js +2059 -651
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2059 -651
- package/components/combobox/dist/auro-combobox.d.ts +4 -4
- package/components/combobox/dist/index.js +1978 -629
- package/components/combobox/dist/registered.js +1978 -629
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +2326 -539
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +2326 -539
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +92 -1
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +2326 -539
- package/components/counter/dist/registered.js +2326 -539
- package/components/datepicker/demo/api.md +3 -1
- package/components/datepicker/demo/api.min.js +5402 -3158
- package/components/datepicker/demo/index.md +6 -1
- package/components/datepicker/demo/index.min.js +5402 -3158
- package/components/datepicker/dist/auro-datepicker.d.ts +17 -7
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +5402 -3158
- package/components/datepicker/dist/registered.js +5402 -3158
- package/components/dropdown/demo/api.md +3 -4
- package/components/dropdown/demo/api.min.js +69 -119
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +69 -119
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +69 -119
- package/components/dropdown/dist/registered.js +69 -119
- package/components/input/demo/api.md +12 -5
- package/components/input/demo/api.min.js +665 -285
- package/components/input/demo/index.min.js +665 -285
- package/components/input/dist/auro-input.d.ts +6 -0
- package/components/input/dist/base-input.d.ts +29 -6
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +665 -285
- package/components/input/dist/registered.js +665 -285
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +63 -2
- package/components/menu/demo/api.min.js +190 -36
- package/components/menu/demo/index.min.js +190 -36
- package/components/menu/dist/auro-menu.d.ts +22 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +190 -36
- package/components/menu/dist/registered.js +190 -36
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.min.js +4 -2
- package/components/radio/demo/index.min.js +4 -2
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +4 -2
- package/components/radio/dist/registered.js +4 -2
- package/components/select/demo/api.md +5 -5
- package/components/select/demo/api.min.js +1412 -293
- package/components/select/demo/index.md +42 -1
- package/components/select/demo/index.min.js +1412 -293
- package/components/select/dist/auro-select.d.ts +8 -8
- package/components/select/dist/index.js +1321 -261
- package/components/select/dist/registered.js +1321 -261
- package/package.json +2 -2
- /package/components/{menu/dist/styles/color-menu-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
|
@@ -71,7 +71,7 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$1=t=>(...e)=>({_$litDirective$:t,values:e});cl
|
|
|
71
71
|
// See LICENSE in the project root for license information.
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
let AuroDependencyVersioning$
|
|
74
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -872,7 +872,9 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
872
872
|
elem.validity = this.auroInputElements[0].validity;
|
|
873
873
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
874
874
|
|
|
875
|
-
|
|
875
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
876
|
+
// combobox's 2nd input will have noValidate set true.
|
|
877
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
876
878
|
elem.validity = this.auroInputElements[1].validity;
|
|
877
879
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
878
880
|
}
|
|
@@ -3199,7 +3201,7 @@ class AuroFloatingUI {
|
|
|
3199
3201
|
// See LICENSE in the project root for license information.
|
|
3200
3202
|
|
|
3201
3203
|
|
|
3202
|
-
let AuroDependencyVersioning$
|
|
3204
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
3203
3205
|
|
|
3204
3206
|
/**
|
|
3205
3207
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3245,7 +3247,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
3245
3247
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3246
3248
|
*/
|
|
3247
3249
|
|
|
3248
|
-
let AuroElement$1$
|
|
3250
|
+
let AuroElement$1$3 = class AuroElement extends i$2 {
|
|
3249
3251
|
|
|
3250
3252
|
// function to define props used within the scope of this component
|
|
3251
3253
|
static get properties() {
|
|
@@ -3313,7 +3315,7 @@ var styleCss$2$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3313
3315
|
*/
|
|
3314
3316
|
|
|
3315
3317
|
// build the component class
|
|
3316
|
-
let BaseIcon$3 = class BaseIcon extends AuroElement$1$
|
|
3318
|
+
let BaseIcon$3 = class BaseIcon extends AuroElement$1$3 {
|
|
3317
3319
|
constructor() {
|
|
3318
3320
|
super();
|
|
3319
3321
|
this.onDark = false;
|
|
@@ -3385,9 +3387,9 @@ let BaseIcon$3 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3385
3387
|
}
|
|
3386
3388
|
};
|
|
3387
3389
|
|
|
3388
|
-
var tokensCss$2$
|
|
3390
|
+
var tokensCss$2$3 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
3389
3391
|
|
|
3390
|
-
var colorCss$3$
|
|
3392
|
+
var colorCss$3$3 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3391
3393
|
|
|
3392
3394
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3393
3395
|
// See LICENSE in the project root for license information.
|
|
@@ -3545,9 +3547,9 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3545
3547
|
static get styles() {
|
|
3546
3548
|
return [
|
|
3547
3549
|
super.styles,
|
|
3548
|
-
i$5`${tokensCss$2$
|
|
3550
|
+
i$5`${tokensCss$2$3}`,
|
|
3549
3551
|
i$5`${styleCss$2$3}`,
|
|
3550
|
-
i$5`${colorCss$3$
|
|
3552
|
+
i$5`${colorCss$3$3}`
|
|
3551
3553
|
];
|
|
3552
3554
|
}
|
|
3553
3555
|
|
|
@@ -3581,8 +3583,12 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3581
3583
|
async firstUpdated() {
|
|
3582
3584
|
await super.firstUpdated();
|
|
3583
3585
|
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
+
/**
|
|
3587
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3588
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3589
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3590
|
+
*/
|
|
3591
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3586
3592
|
const svgDesc = this.svg.querySelector('desc');
|
|
3587
3593
|
|
|
3588
3594
|
if (svgDesc) {
|
|
@@ -3628,11 +3634,11 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3628
3634
|
|
|
3629
3635
|
var iconVersion$3 = '6.1.2';
|
|
3630
3636
|
|
|
3631
|
-
var styleCss$1$3 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{
|
|
3637
|
+
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}`;
|
|
3632
3638
|
|
|
3633
|
-
var colorCss$2$
|
|
3639
|
+
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)}`;
|
|
3634
3640
|
|
|
3635
|
-
var tokensCss$1$
|
|
3641
|
+
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-dropdown-helptext-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-dropdown-helptext-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)}`;
|
|
3636
3642
|
|
|
3637
3643
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3638
3644
|
// See LICENSE in the project root for license information.
|
|
@@ -3653,7 +3659,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3653
3659
|
*/
|
|
3654
3660
|
|
|
3655
3661
|
class AuroDropdownBib extends i$2 {
|
|
3656
|
-
|
|
3662
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3657
3663
|
constructor() {
|
|
3658
3664
|
super();
|
|
3659
3665
|
|
|
@@ -3663,13 +3669,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3663
3669
|
this._mobileBreakpointValue = undefined;
|
|
3664
3670
|
|
|
3665
3671
|
AuroLibraryRuntimeUtils$2$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3672
|
+
|
|
3673
|
+
this.shape = "rounded";
|
|
3674
|
+
this.matchWidth = false;
|
|
3666
3675
|
}
|
|
3667
3676
|
|
|
3668
3677
|
static get styles() {
|
|
3669
3678
|
return [
|
|
3670
3679
|
styleCss$1$3,
|
|
3671
|
-
colorCss$2$
|
|
3672
|
-
tokensCss$1$
|
|
3680
|
+
colorCss$2$3,
|
|
3681
|
+
tokensCss$1$3
|
|
3673
3682
|
];
|
|
3674
3683
|
}
|
|
3675
3684
|
|
|
@@ -3700,6 +3709,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
3700
3709
|
reflect: true
|
|
3701
3710
|
},
|
|
3702
3711
|
|
|
3712
|
+
/**
|
|
3713
|
+
* If declared, the bib width will match the trigger width.
|
|
3714
|
+
* @private
|
|
3715
|
+
*/
|
|
3716
|
+
matchWidth: {
|
|
3717
|
+
type: Boolean,
|
|
3718
|
+
reflect: true
|
|
3719
|
+
},
|
|
3720
|
+
|
|
3703
3721
|
/**
|
|
3704
3722
|
* If declared, will apply border-radius to the bib.
|
|
3705
3723
|
*/
|
|
@@ -3713,6 +3731,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
3713
3731
|
*/
|
|
3714
3732
|
bibTemplate: {
|
|
3715
3733
|
type: Object
|
|
3734
|
+
},
|
|
3735
|
+
|
|
3736
|
+
shape: {
|
|
3737
|
+
type: String,
|
|
3738
|
+
reflect: true
|
|
3716
3739
|
}
|
|
3717
3740
|
};
|
|
3718
3741
|
}
|
|
@@ -3792,8 +3815,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3792
3815
|
|
|
3793
3816
|
// function that renders the HTML and CSS into the scope of the component
|
|
3794
3817
|
render() {
|
|
3818
|
+
const classes = {
|
|
3819
|
+
container: true
|
|
3820
|
+
};
|
|
3821
|
+
|
|
3822
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
3823
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
3824
|
+
classes[`shape-${this.shape}`] = true;
|
|
3825
|
+
|
|
3795
3826
|
return u$2`
|
|
3796
|
-
<div class="
|
|
3827
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
3797
3828
|
<slot></slot>
|
|
3798
3829
|
</div>
|
|
3799
3830
|
`;
|
|
@@ -3802,17 +3833,17 @@ class AuroDropdownBib extends i$2 {
|
|
|
3802
3833
|
|
|
3803
3834
|
var dropdownVersion$1 = '3.0.0';
|
|
3804
3835
|
|
|
3805
|
-
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}.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;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}.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;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}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;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}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;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}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
3836
|
+
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}`;
|
|
3806
3837
|
|
|
3807
3838
|
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:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
3808
3839
|
|
|
3809
|
-
var classicColorCss$1 = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)
|
|
3840
|
+
var classicColorCss$1 = i$5`:host([layout*=classic]:not([onDark])) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]:not([onDark])) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic]:not([onDark])) .trigger:focus-within,:host([layout*=classic]:not([onDark])) .trigger: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([layout*=classic][disabled]:not([onDark])){--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([layout*=classic][error]:not([onDark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][error]:not([onDark])) .trigger:focus-within,:host([layout*=classic][error]:not([onDark])) .trigger: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([layout*=classic][onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic][onDark]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic][onDark]) .trigger:focus-within,:host([layout*=classic][onDark]) .trigger: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([layout*=classic][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([layout*=classic][onDark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][onDark][error]) .trigger:focus-within,:host([layout*=classic][onDark][error]) .trigger: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)}`;
|
|
3810
3841
|
|
|
3811
|
-
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]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;
|
|
3842
|
+
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]) .trigger{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]) .trigger: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([layout*=classic]:not([simple])) .triggerContentWrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}`;
|
|
3812
3843
|
|
|
3813
|
-
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}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
3844
|
+
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}.trigger{display:flex;flex:1;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)}`;
|
|
3814
3845
|
|
|
3815
|
-
var styleSnowflakeCss$1 = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
3846
|
+
var styleSnowflakeCss$1 = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;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)}`;
|
|
3816
3847
|
|
|
3817
3848
|
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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3818
3849
|
|
|
@@ -4057,18 +4088,21 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4057
4088
|
}
|
|
4058
4089
|
|
|
4059
4090
|
resetShapeClasses() {
|
|
4060
|
-
|
|
4061
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4091
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4062
4092
|
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4093
|
+
if (wrapper) {
|
|
4094
|
+
wrapper.classList.forEach((className) => {
|
|
4095
|
+
if (className.startsWith('shape-')) {
|
|
4096
|
+
wrapper.classList.remove(className);
|
|
4097
|
+
}
|
|
4098
|
+
});
|
|
4069
4099
|
|
|
4070
|
-
|
|
4071
|
-
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4102
|
+
if (this.shape && this.size) {
|
|
4103
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4104
|
+
} else {
|
|
4105
|
+
wrapper.classList.add('shape-none');
|
|
4072
4106
|
}
|
|
4073
4107
|
}
|
|
4074
4108
|
|
|
@@ -4144,19 +4178,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4144
4178
|
|
|
4145
4179
|
// Layout Config
|
|
4146
4180
|
this.layout = 'classic';
|
|
4147
|
-
this.shape = '
|
|
4181
|
+
this.shape = 'classic';
|
|
4148
4182
|
this.size = 'xl';
|
|
4183
|
+
|
|
4149
4184
|
this.parentBorder = false;
|
|
4150
4185
|
|
|
4151
4186
|
this.privateDefaults();
|
|
4152
4187
|
}
|
|
4153
4188
|
|
|
4154
|
-
get commonLabelClasses() {
|
|
4155
|
-
return {
|
|
4156
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4157
|
-
};
|
|
4158
|
-
}
|
|
4159
|
-
|
|
4160
4189
|
get commonWrapperClasses() {
|
|
4161
4190
|
return {
|
|
4162
4191
|
'trigger': true,
|
|
@@ -4225,7 +4254,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4225
4254
|
/**
|
|
4226
4255
|
* Generate unique names for dependency components.
|
|
4227
4256
|
*/
|
|
4228
|
-
const versioning = new AuroDependencyVersioning$
|
|
4257
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
4229
4258
|
|
|
4230
4259
|
/**
|
|
4231
4260
|
* @private
|
|
@@ -4541,7 +4570,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4541
4570
|
static get styles() {
|
|
4542
4571
|
return [
|
|
4543
4572
|
colorCss$1$3,
|
|
4544
|
-
tokensCss$1$
|
|
4573
|
+
tokensCss$1$3,
|
|
4545
4574
|
|
|
4546
4575
|
// default layout
|
|
4547
4576
|
classicColorCss$1,
|
|
@@ -4829,14 +4858,13 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4829
4858
|
* @returns {void}
|
|
4830
4859
|
*/
|
|
4831
4860
|
handleTriggerContentSlotChange(event) {
|
|
4832
|
-
|
|
4833
4861
|
this.floater.handleTriggerTabIndex();
|
|
4834
4862
|
|
|
4835
4863
|
// Get the trigger
|
|
4836
4864
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
4837
4865
|
|
|
4838
4866
|
// Get the trigger slot
|
|
4839
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
4867
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
4840
4868
|
|
|
4841
4869
|
// If there's a trigger slot
|
|
4842
4870
|
if (triggerSlot) {
|
|
@@ -4908,29 +4936,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4908
4936
|
}
|
|
4909
4937
|
}
|
|
4910
4938
|
|
|
4911
|
-
/**
|
|
4912
|
-
* @private
|
|
4913
|
-
* @method handleLabelSlotChange
|
|
4914
|
-
* @param {event} event - The event object representing the slot change.
|
|
4915
|
-
* @description Handles the slot change event for the label slot.
|
|
4916
|
-
*/
|
|
4917
|
-
handleLabelSlotChange (event) {
|
|
4918
|
-
|
|
4919
|
-
// Get the nodes from the event
|
|
4920
|
-
const nodes = event.target.assignedNodes();
|
|
4921
|
-
|
|
4922
|
-
// Guard clause for no nodes
|
|
4923
|
-
if (!nodes) {
|
|
4924
|
-
return;
|
|
4925
|
-
}
|
|
4926
|
-
|
|
4927
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
4928
|
-
const nodesArr = Array.from(nodes);
|
|
4929
|
-
|
|
4930
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
4931
|
-
this.labeled = nodesArr.length > 0;
|
|
4932
|
-
}
|
|
4933
|
-
|
|
4934
4939
|
/**
|
|
4935
4940
|
* Returns HTML for the common portion of the layouts.
|
|
4936
4941
|
* @private
|
|
@@ -4945,22 +4950,17 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4945
4950
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
4946
4951
|
tabindex="${this.tabIndex}"
|
|
4947
4952
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4948
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4949
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4953
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4954
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4950
4955
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4951
4956
|
@focusin="${this.handleFocusin}"
|
|
4952
4957
|
@blur="${this.handleFocusOut}">
|
|
4953
|
-
<div class="triggerContentWrapper">
|
|
4954
|
-
<
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
<div class="triggerContent">
|
|
4958
|
-
<slot
|
|
4959
|
-
name="trigger"
|
|
4960
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4961
|
-
</div>
|
|
4958
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
4959
|
+
<slot
|
|
4960
|
+
name="trigger"
|
|
4961
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4962
4962
|
</div>
|
|
4963
|
-
${this.chevron
|
|
4963
|
+
${this.chevron ? u$2`
|
|
4964
4964
|
<div
|
|
4965
4965
|
id="showStateIcon"
|
|
4966
4966
|
class="chevron"
|
|
@@ -4981,6 +4981,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4981
4981
|
<div id="bibSizer" part="size"></div>
|
|
4982
4982
|
<${this.dropdownBibTag}
|
|
4983
4983
|
id="bib"
|
|
4984
|
+
shape="${this.shape}"
|
|
4984
4985
|
?data-show="${this.isPopoverVisible}"
|
|
4985
4986
|
?isfullscreen="${this.isBibFullscreen}"
|
|
4986
4987
|
?common="${this.common}"
|
|
@@ -5000,62 +5001,13 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5000
5001
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5001
5002
|
*/
|
|
5002
5003
|
renderLayoutClassic() {
|
|
5004
|
+
// TODO: check with Doug why this was never used?
|
|
5005
|
+
const helpTextClasses = {
|
|
5006
|
+
'helpText': true
|
|
5007
|
+
};
|
|
5003
5008
|
|
|
5004
5009
|
return u$2`
|
|
5005
|
-
|
|
5006
|
-
<div
|
|
5007
|
-
id="trigger"
|
|
5008
|
-
class="trigger"
|
|
5009
|
-
part="trigger"
|
|
5010
|
-
tabindex="${this.tabIndex}"
|
|
5011
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5012
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5013
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5014
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5015
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5016
|
-
>
|
|
5017
|
-
<div class="triggerContentWrapper">
|
|
5018
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5019
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5020
|
-
</label>
|
|
5021
|
-
<div class="triggerContent">
|
|
5022
|
-
<slot
|
|
5023
|
-
name="trigger"
|
|
5024
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5025
|
-
</div>
|
|
5026
|
-
</div>
|
|
5027
|
-
${this.chevron || this.common ? u$2`
|
|
5028
|
-
<div
|
|
5029
|
-
id="showStateIcon"
|
|
5030
|
-
part="chevron">
|
|
5031
|
-
<${this.iconTag}
|
|
5032
|
-
category="interface"
|
|
5033
|
-
name="chevron-down"
|
|
5034
|
-
?onDark="${this.onDark}"
|
|
5035
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5036
|
-
>
|
|
5037
|
-
</${this.iconTag}>
|
|
5038
|
-
</div>
|
|
5039
|
-
` : undefined }
|
|
5040
|
-
</div>
|
|
5041
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5042
|
-
<slot name="helpText"></slot>
|
|
5043
|
-
</${this.helpTextTag}>
|
|
5044
|
-
|
|
5045
|
-
<div id="bibSizer" part="size"></div>
|
|
5046
|
-
<${this.dropdownBibTag}
|
|
5047
|
-
id="bib"
|
|
5048
|
-
?data-show="${this.isPopoverVisible}"
|
|
5049
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5050
|
-
?common="${this.common}"
|
|
5051
|
-
?rounded="${this.common || this.rounded}"
|
|
5052
|
-
?inset="${this.common || this.inset}"
|
|
5053
|
-
>
|
|
5054
|
-
<div class="slotContent">
|
|
5055
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5056
|
-
</div>
|
|
5057
|
-
</${this.dropdownBibTag}>
|
|
5058
|
-
</div>
|
|
5010
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5059
5011
|
`;
|
|
5060
5012
|
}
|
|
5061
5013
|
|
|
@@ -5136,9 +5088,9 @@ var dropdownVersion = '3.0.0';
|
|
|
5136
5088
|
*/
|
|
5137
5089
|
const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=e$1(class extends i{constructor(e){if(super(e),e.type!==t$1.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return {values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r$1,c]){const d=p(s),{values:p$1,keys:a}=this.dt(t,r$1,c);if(!Array.isArray(d))return this.ut=a,p$1;const h=this.ut??=[],v$1=[];let m$1,y,x=0,j=d.length-1,k=0,w=p$1.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v$1[k]=v(d[x],p$1[k]),x++,k++;else if(h[j]===a[w])v$1[w]=v(d[j],p$1[w]),j--,w--;else if(h[x]===a[w])v$1[w]=v(d[x],p$1[w]),r(s,v$1[w+1],d[x]),x++,w--;else if(h[j]===a[k])v$1[k]=v(d[j],p$1[k]),r(s,d[x],d[j]),j--,k++;else if(void 0===m$1&&(m$1=u(a,k,w),y=u(h,x,j)),m$1.has(h[x]))if(m$1.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=r(s,d[x]);v(e,p$1[k]),v$1[k]=e;}else v$1[k]=v(t,p$1[k]),r(s,d[x],t),d[e]=null;k++;}else M(d[j]),j--;else M(d[x]),x++;for(;k<=w;){const e=r(s,v$1[w+1]);v(e,p$1[k]),v$1[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M(e);}return this.ut=a,m(s,v$1),T}});
|
|
5138
5090
|
|
|
5139
|
-
var shapeSizeCss = 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}.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;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}.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;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}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;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}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;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}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
5091
|
+
var shapeSizeCss = 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}`;
|
|
5140
5092
|
|
|
5141
|
-
var styleCss$4$
|
|
5093
|
+
var styleCss$4$2 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{overflow:hidden;width:100%;padding:0;border:0;background:unset;outline:none;text-overflow:ellipsis}.displayValue{display:none}.displayValue.hasContent:is(.withValue):not(.hasFocus){display:flex;align-items:center}.accents:not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center}`;
|
|
5142
5094
|
|
|
5143
5095
|
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}`;
|
|
5144
5096
|
|
|
@@ -5146,15 +5098,15 @@ var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);b
|
|
|
5146
5098
|
|
|
5147
5099
|
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-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: transparent}`;
|
|
5148
5100
|
|
|
5149
|
-
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{padding-top:4px;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;padding-bottom:8px;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 .
|
|
5101
|
+
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{padding-top:4px;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;padding-bottom:8px;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.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}`;
|
|
5150
5102
|
|
|
5151
5103
|
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-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5152
5104
|
|
|
5153
|
-
var emphasizedStyleCss = i$5`:host
|
|
5105
|
+
var emphasizedStyleCss = i$5`:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.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:24px}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:24px}.layout-emphasized-left .alertNotification{margin-right:8px}.layout-emphasized-left .clear{margin-left:8px}.layout-emphasized-right .alertNotification{margin-left:8px}.layout-emphasized-right .clear{margin-right:8px}`;
|
|
5154
5106
|
|
|
5155
5107
|
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)}`;
|
|
5156
5108
|
|
|
5157
|
-
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 .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.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}.helpTextWrapper{text-align:center}`;
|
|
5109
|
+
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}.helpTextWrapper{text-align:center}`;
|
|
5158
5110
|
|
|
5159
5111
|
const watchedItems = new Set();
|
|
5160
5112
|
|
|
@@ -5217,6 +5169,8 @@ const stringsES = {
|
|
|
5217
5169
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
5218
5170
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
5219
5171
|
'clearInput': 'Borrar campo de entrada',
|
|
5172
|
+
'showPassword': 'Mostrar contraseña',
|
|
5173
|
+
'hidePassword': 'Ocultar contraseña'
|
|
5220
5174
|
};
|
|
5221
5175
|
|
|
5222
5176
|
const stringsEN = {
|
|
@@ -5241,6 +5195,8 @@ const stringsEN = {
|
|
|
5241
5195
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
5242
5196
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
5243
5197
|
'clearInput': 'Clear input field',
|
|
5198
|
+
'showPassword': 'Show password',
|
|
5199
|
+
'hidePassword': 'Hide password'
|
|
5244
5200
|
};
|
|
5245
5201
|
|
|
5246
5202
|
/**
|
|
@@ -9535,7 +9491,7 @@ const {
|
|
|
9535
9491
|
|
|
9536
9492
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9537
9493
|
|
|
9538
|
-
let AuroLibraryRuntimeUtils$
|
|
9494
|
+
let AuroLibraryRuntimeUtils$3$1 = class AuroLibraryRuntimeUtils {
|
|
9539
9495
|
|
|
9540
9496
|
/* eslint-disable jsdoc/require-param */
|
|
9541
9497
|
|
|
@@ -9605,7 +9561,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
9605
9561
|
class AuroFormValidation {
|
|
9606
9562
|
|
|
9607
9563
|
constructor() {
|
|
9608
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9564
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3$1();
|
|
9609
9565
|
}
|
|
9610
9566
|
|
|
9611
9567
|
/**
|
|
@@ -9884,7 +9840,9 @@ class AuroFormValidation {
|
|
|
9884
9840
|
elem.validity = this.auroInputElements[0].validity;
|
|
9885
9841
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
9886
9842
|
|
|
9887
|
-
|
|
9843
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
9844
|
+
// combobox's 2nd input will have noValidate set true.
|
|
9845
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
9888
9846
|
elem.validity = this.auroInputElements[1].validity;
|
|
9889
9847
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
9890
9848
|
}
|
|
@@ -9964,7 +9922,7 @@ class AuroFormValidation {
|
|
|
9964
9922
|
}
|
|
9965
9923
|
}
|
|
9966
9924
|
|
|
9967
|
-
let AuroElement$
|
|
9925
|
+
let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
9968
9926
|
static get properties() {
|
|
9969
9927
|
return {
|
|
9970
9928
|
|
|
@@ -9999,18 +9957,21 @@ let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
|
9999
9957
|
}
|
|
10000
9958
|
|
|
10001
9959
|
resetShapeClasses() {
|
|
10002
|
-
|
|
10003
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9960
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
10004
9961
|
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
9962
|
+
if (wrapper) {
|
|
9963
|
+
wrapper.classList.forEach((className) => {
|
|
9964
|
+
if (className.startsWith('shape-')) {
|
|
9965
|
+
wrapper.classList.remove(className);
|
|
9966
|
+
}
|
|
9967
|
+
});
|
|
10011
9968
|
|
|
10012
|
-
|
|
10013
|
-
|
|
9969
|
+
}
|
|
9970
|
+
|
|
9971
|
+
if (this.shape && this.size) {
|
|
9972
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9973
|
+
} else {
|
|
9974
|
+
wrapper.classList.add('shape-none');
|
|
10014
9975
|
}
|
|
10015
9976
|
}
|
|
10016
9977
|
|
|
@@ -10068,17 +10029,21 @@ let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
|
10068
10029
|
*
|
|
10069
10030
|
* @slot helptext - Sets the help text displayed below the input.
|
|
10070
10031
|
* @slot label - Sets the label text for the input.
|
|
10032
|
+
* @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
|
|
10071
10033
|
*
|
|
10072
10034
|
* @csspart wrapper - Use for customizing the style of the root element
|
|
10073
10035
|
* @csspart label - Use for customizing the style of the label element
|
|
10074
10036
|
* @csspart helpText - Use for customizing the style of the helpText element
|
|
10037
|
+
* @csspart input - Use for customizing the style of the input element
|
|
10075
10038
|
* @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
|
|
10076
10039
|
* @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
|
|
10040
|
+
* @csspart accent-left - Use for customizing the style of the left accent element (e.g. padding, margin)
|
|
10041
|
+
* @csspart accent-right - Use for customizing the style of the right accent element (e.g. padding, margin)
|
|
10077
10042
|
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
10078
10043
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
10079
10044
|
*/
|
|
10080
10045
|
|
|
10081
|
-
class BaseInput extends AuroElement$
|
|
10046
|
+
class BaseInput extends AuroElement$2$1 {
|
|
10082
10047
|
|
|
10083
10048
|
constructor() {
|
|
10084
10049
|
super();
|
|
@@ -10171,7 +10136,6 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10171
10136
|
*/
|
|
10172
10137
|
a11yRole: {
|
|
10173
10138
|
type: String,
|
|
10174
|
-
attribute: true,
|
|
10175
10139
|
reflect: true
|
|
10176
10140
|
},
|
|
10177
10141
|
|
|
@@ -10180,7 +10144,6 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10180
10144
|
*/
|
|
10181
10145
|
a11yExpanded: {
|
|
10182
10146
|
type: Boolean,
|
|
10183
|
-
attribute: true,
|
|
10184
10147
|
reflect: true
|
|
10185
10148
|
},
|
|
10186
10149
|
|
|
@@ -10189,7 +10152,6 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10189
10152
|
*/
|
|
10190
10153
|
a11yControls: {
|
|
10191
10154
|
type: String,
|
|
10192
|
-
attribute: true,
|
|
10193
10155
|
reflect: true
|
|
10194
10156
|
},
|
|
10195
10157
|
|
|
@@ -10205,7 +10167,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10205
10167
|
* An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters].
|
|
10206
10168
|
*/
|
|
10207
10169
|
autocapitalize: {
|
|
10208
|
-
type: String
|
|
10170
|
+
type: String,
|
|
10171
|
+
reflect: true
|
|
10209
10172
|
},
|
|
10210
10173
|
|
|
10211
10174
|
/**
|
|
@@ -10220,7 +10183,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10220
10183
|
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
10221
10184
|
*/
|
|
10222
10185
|
autocorrect: {
|
|
10223
|
-
type: String
|
|
10186
|
+
type: String,
|
|
10187
|
+
reflect: true
|
|
10224
10188
|
},
|
|
10225
10189
|
|
|
10226
10190
|
/**
|
|
@@ -10265,7 +10229,6 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10265
10229
|
/** Exposes inputmode attribute for input. */
|
|
10266
10230
|
inputmode: {
|
|
10267
10231
|
type: String,
|
|
10268
|
-
attribute: true,
|
|
10269
10232
|
reflect: true
|
|
10270
10233
|
},
|
|
10271
10234
|
|
|
@@ -10273,7 +10236,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10273
10236
|
* Defines the language of an element.
|
|
10274
10237
|
*/
|
|
10275
10238
|
lang: {
|
|
10276
|
-
type: String
|
|
10239
|
+
type: String,
|
|
10240
|
+
reflect: true
|
|
10277
10241
|
},
|
|
10278
10242
|
|
|
10279
10243
|
/**
|
|
@@ -10287,7 +10251,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10287
10251
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
10288
10252
|
*/
|
|
10289
10253
|
maxLength: {
|
|
10290
|
-
type: Number
|
|
10254
|
+
type: Number,
|
|
10255
|
+
reflect: true
|
|
10291
10256
|
},
|
|
10292
10257
|
|
|
10293
10258
|
/**
|
|
@@ -10301,14 +10266,25 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10301
10266
|
* The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
10302
10267
|
*/
|
|
10303
10268
|
minLength: {
|
|
10304
|
-
type: Number
|
|
10269
|
+
type: Number,
|
|
10270
|
+
reflect: true
|
|
10305
10271
|
},
|
|
10306
10272
|
|
|
10307
10273
|
/**
|
|
10308
10274
|
* Populates the `name` attribute on the input.
|
|
10309
10275
|
*/
|
|
10310
10276
|
name: {
|
|
10311
|
-
type: String
|
|
10277
|
+
type: String,
|
|
10278
|
+
reflect: true
|
|
10279
|
+
},
|
|
10280
|
+
|
|
10281
|
+
/**
|
|
10282
|
+
* Sets styles for nested operation - removes borders, hides help + error text, and
|
|
10283
|
+
* hides accents.
|
|
10284
|
+
*/
|
|
10285
|
+
nested: {
|
|
10286
|
+
type: Boolean,
|
|
10287
|
+
reflect: true
|
|
10312
10288
|
},
|
|
10313
10289
|
|
|
10314
10290
|
/**
|
|
@@ -10339,7 +10315,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10339
10315
|
* Define custom placeholder text, only supported by date input formats.
|
|
10340
10316
|
*/
|
|
10341
10317
|
placeholder: {
|
|
10342
|
-
type: String
|
|
10318
|
+
type: String,
|
|
10319
|
+
reflect: true
|
|
10343
10320
|
},
|
|
10344
10321
|
|
|
10345
10322
|
/**
|
|
@@ -10428,6 +10405,14 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10428
10405
|
type: String
|
|
10429
10406
|
},
|
|
10430
10407
|
|
|
10408
|
+
/**
|
|
10409
|
+
* borderless
|
|
10410
|
+
*/
|
|
10411
|
+
simple: {
|
|
10412
|
+
type: Boolean,
|
|
10413
|
+
reflect: true
|
|
10414
|
+
},
|
|
10415
|
+
|
|
10431
10416
|
/**
|
|
10432
10417
|
* Custom help text message for email type validity.
|
|
10433
10418
|
*/
|
|
@@ -10439,7 +10424,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10439
10424
|
* An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
|
|
10440
10425
|
*/
|
|
10441
10426
|
spellcheck: {
|
|
10442
|
-
type: String
|
|
10427
|
+
type: String,
|
|
10428
|
+
reflect: true
|
|
10443
10429
|
},
|
|
10444
10430
|
|
|
10445
10431
|
/**
|
|
@@ -10454,7 +10440,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10454
10440
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
10455
10441
|
*/
|
|
10456
10442
|
value: {
|
|
10457
|
-
type: String
|
|
10443
|
+
type: String,
|
|
10444
|
+
reflect: true
|
|
10458
10445
|
},
|
|
10459
10446
|
|
|
10460
10447
|
/**
|
|
@@ -10734,7 +10721,6 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10734
10721
|
|
|
10735
10722
|
/**
|
|
10736
10723
|
* Function to set element focus.
|
|
10737
|
-
* @private
|
|
10738
10724
|
* @return {void}
|
|
10739
10725
|
*/
|
|
10740
10726
|
focus() {
|
|
@@ -10952,8 +10938,7 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10952
10938
|
|
|
10953
10939
|
this.requestUpdate();
|
|
10954
10940
|
|
|
10955
|
-
|
|
10956
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
10941
|
+
return this.placeholderStr;
|
|
10957
10942
|
}
|
|
10958
10943
|
|
|
10959
10944
|
/**
|
|
@@ -11166,7 +11151,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
11166
11151
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
11167
11152
|
*/
|
|
11168
11153
|
|
|
11169
|
-
let AuroElement$
|
|
11154
|
+
let AuroElement$1$2 = class AuroElement extends i$2 {
|
|
11170
11155
|
|
|
11171
11156
|
// function to define props used within the scope of this component
|
|
11172
11157
|
static get properties() {
|
|
@@ -11222,7 +11207,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
11222
11207
|
return _fetchMap$2.get(uri);
|
|
11223
11208
|
};
|
|
11224
11209
|
|
|
11225
|
-
var styleCss$3$
|
|
11210
|
+
var styleCss$3$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
11226
11211
|
|
|
11227
11212
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11228
11213
|
// See LICENSE in the project root for license information.
|
|
@@ -11234,7 +11219,7 @@ var styleCss$3$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
11234
11219
|
*/
|
|
11235
11220
|
|
|
11236
11221
|
// build the component class
|
|
11237
|
-
let BaseIcon$2 = class BaseIcon extends AuroElement$
|
|
11222
|
+
let BaseIcon$2 = class BaseIcon extends AuroElement$1$2 {
|
|
11238
11223
|
constructor() {
|
|
11239
11224
|
super();
|
|
11240
11225
|
this.onDark = false;
|
|
@@ -11265,7 +11250,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
11265
11250
|
|
|
11266
11251
|
static get styles() {
|
|
11267
11252
|
return i$5`
|
|
11268
|
-
${styleCss$3$
|
|
11253
|
+
${styleCss$3$2}
|
|
11269
11254
|
`;
|
|
11270
11255
|
}
|
|
11271
11256
|
|
|
@@ -11308,7 +11293,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
11308
11293
|
|
|
11309
11294
|
var tokensCss$3$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
11310
11295
|
|
|
11311
|
-
var colorCss$3$
|
|
11296
|
+
var colorCss$3$2 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
11312
11297
|
|
|
11313
11298
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11314
11299
|
// See LICENSE in the project root for license information.
|
|
@@ -11317,7 +11302,7 @@ var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]
|
|
|
11317
11302
|
|
|
11318
11303
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11319
11304
|
|
|
11320
|
-
let AuroLibraryRuntimeUtils$
|
|
11305
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
11321
11306
|
|
|
11322
11307
|
/* eslint-disable jsdoc/require-param */
|
|
11323
11308
|
|
|
@@ -11399,7 +11384,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11399
11384
|
*/
|
|
11400
11385
|
privateDefaults() {
|
|
11401
11386
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11402
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11387
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11403
11388
|
}
|
|
11404
11389
|
|
|
11405
11390
|
// function to define props used within the scope of this component
|
|
@@ -11467,8 +11452,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11467
11452
|
return [
|
|
11468
11453
|
super.styles,
|
|
11469
11454
|
i$5`${tokensCss$3$1}`,
|
|
11470
|
-
i$5`${styleCss$3$
|
|
11471
|
-
i$5`${colorCss$3$
|
|
11455
|
+
i$5`${styleCss$3$2}`,
|
|
11456
|
+
i$5`${colorCss$3$2}`
|
|
11472
11457
|
];
|
|
11473
11458
|
}
|
|
11474
11459
|
|
|
@@ -11481,7 +11466,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11481
11466
|
*
|
|
11482
11467
|
*/
|
|
11483
11468
|
static register(name = "auro-icon") {
|
|
11484
|
-
AuroLibraryRuntimeUtils$
|
|
11469
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroIcon);
|
|
11485
11470
|
}
|
|
11486
11471
|
|
|
11487
11472
|
connectedCallback() {
|
|
@@ -11502,8 +11487,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11502
11487
|
async firstUpdated() {
|
|
11503
11488
|
await super.firstUpdated();
|
|
11504
11489
|
|
|
11505
|
-
|
|
11506
|
-
|
|
11490
|
+
/**
|
|
11491
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
11492
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
11493
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
11494
|
+
*/
|
|
11495
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
11507
11496
|
const svgDesc = this.svg.querySelector('desc');
|
|
11508
11497
|
|
|
11509
11498
|
if (svgDesc) {
|
|
@@ -11547,123 +11536,481 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11547
11536
|
}
|
|
11548
11537
|
};
|
|
11549
11538
|
|
|
11550
|
-
var iconVersion$2 = '8.0.
|
|
11551
|
-
|
|
11552
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11553
|
-
// See LICENSE in the project root for license information.
|
|
11539
|
+
var iconVersion$2 = '8.0.4';
|
|
11554
11540
|
|
|
11541
|
+
/**
|
|
11542
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
11543
|
+
*/
|
|
11544
|
+
const _observers$1 = new WeakMap();
|
|
11555
11545
|
|
|
11556
|
-
|
|
11546
|
+
/**
|
|
11547
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
11548
|
+
* Structure: {
|
|
11549
|
+
* host: {
|
|
11550
|
+
* matchers: Set<Function>,
|
|
11551
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
11552
|
+
* }
|
|
11553
|
+
* }
|
|
11554
|
+
*/
|
|
11555
|
+
const _transportConfig$1 = new WeakMap();
|
|
11557
11556
|
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11557
|
+
/**
|
|
11558
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
11559
|
+
*
|
|
11560
|
+
* @param {Object} params - The parameters for the function.
|
|
11561
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
11562
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11563
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
11564
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
11565
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
11566
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
11567
|
+
*/
|
|
11568
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
11569
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
11570
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
11571
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
11572
|
+
}
|
|
11567
11573
|
|
|
11568
|
-
|
|
11569
|
-
|
|
11574
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
11575
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
11576
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
11577
|
+
}
|
|
11570
11578
|
|
|
11571
|
-
|
|
11579
|
+
// Guard Clause: Ensure match is a function
|
|
11580
|
+
if (typeof match !== 'function') {
|
|
11581
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
11572
11582
|
}
|
|
11573
11583
|
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11584
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
11585
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
11586
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
11587
|
+
}
|
|
11588
|
+
|
|
11589
|
+
// Register this transport and get cleanup function
|
|
11590
|
+
return _registerTransport$1({
|
|
11591
|
+
host,
|
|
11592
|
+
target,
|
|
11593
|
+
matcher: match,
|
|
11594
|
+
removeOriginal
|
|
11595
|
+
});
|
|
11596
|
+
};
|
|
11583
11597
|
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11598
|
+
/**
|
|
11599
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
11600
|
+
*
|
|
11601
|
+
* @param {Object} params - The parameters object.
|
|
11602
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
11603
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
11604
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
11605
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
11606
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
11607
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
11608
|
+
* @private
|
|
11609
|
+
*/
|
|
11610
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11611
|
+
// Initialize config for this host if it doesn't exist
|
|
11612
|
+
if (!_transportConfig$1.has(host)) {
|
|
11613
|
+
_transportConfig$1.set(host, {
|
|
11614
|
+
matchers: new Set(),
|
|
11615
|
+
targets: new Map()
|
|
11616
|
+
});
|
|
11617
|
+
}
|
|
11587
11618
|
|
|
11588
|
-
|
|
11619
|
+
const config = _transportConfig$1.get(host);
|
|
11620
|
+
|
|
11621
|
+
// Add the matcher to the set of matchers for this host
|
|
11622
|
+
config.matchers.add(matcher);
|
|
11623
|
+
|
|
11624
|
+
// Initialize target entry if it doesn't exist
|
|
11625
|
+
if (!config.targets.has(target)) {
|
|
11626
|
+
config.targets.set(target, new Map());
|
|
11627
|
+
}
|
|
11628
|
+
|
|
11629
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
11630
|
+
config.targets.get(target).set(matcher, {
|
|
11631
|
+
removeOriginal,
|
|
11632
|
+
currentAttributes: new Map()
|
|
11633
|
+
});
|
|
11634
|
+
|
|
11635
|
+
// Perform initial attribute transport
|
|
11636
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
11637
|
+
|
|
11638
|
+
// Attach observer
|
|
11639
|
+
_attachObserver$1(host);
|
|
11640
|
+
|
|
11641
|
+
// Return cleanup function and utility functions
|
|
11642
|
+
return {
|
|
11643
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
11644
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
11645
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
11589
11646
|
}
|
|
11590
11647
|
};
|
|
11591
11648
|
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11649
|
+
/**
|
|
11650
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
11651
|
+
*
|
|
11652
|
+
* @param {HTMLElement} host - The host element
|
|
11653
|
+
* @param {HTMLElement} target - The target element
|
|
11654
|
+
* @param {Function} matcher - The matcher function
|
|
11655
|
+
* @private
|
|
11656
|
+
*/
|
|
11657
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
11658
|
+
const config = _transportConfig$1.get(host);
|
|
11659
|
+
if (!config) return;
|
|
11660
|
+
|
|
11661
|
+
// Remove this matcher from this target
|
|
11662
|
+
const targetMatchers = config.targets.get(target);
|
|
11663
|
+
if (targetMatchers) {
|
|
11664
|
+
targetMatchers.delete(matcher);
|
|
11665
|
+
|
|
11666
|
+
// If this target has no more matchers, remove it
|
|
11667
|
+
if (targetMatchers.size === 0) {
|
|
11668
|
+
config.targets.delete(target);
|
|
11669
|
+
}
|
|
11670
|
+
}
|
|
11671
|
+
|
|
11672
|
+
// Check if this matcher is still used by any target
|
|
11673
|
+
let matcherStillUsed = false;
|
|
11674
|
+
for (const matcherMap of config.targets.values()) {
|
|
11675
|
+
if (matcherMap.has(matcher)) {
|
|
11676
|
+
matcherStillUsed = true;
|
|
11677
|
+
break;
|
|
11678
|
+
}
|
|
11679
|
+
}
|
|
11680
|
+
|
|
11681
|
+
// If not used anymore, remove from matchers set
|
|
11682
|
+
if (!matcherStillUsed) {
|
|
11683
|
+
config.matchers.delete(matcher);
|
|
11684
|
+
}
|
|
11685
|
+
|
|
11686
|
+
// If no more targets or matchers, detach observer
|
|
11687
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
11688
|
+
_detachObserver$1(host);
|
|
11689
|
+
}
|
|
11690
|
+
};
|
|
11596
11691
|
|
|
11597
|
-
|
|
11692
|
+
/**
|
|
11693
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
11694
|
+
*
|
|
11695
|
+
* @param {Object} params - The parameters object.
|
|
11696
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
11697
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11698
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
11699
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
11700
|
+
* @returns {void}
|
|
11701
|
+
* @private
|
|
11702
|
+
*/
|
|
11703
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11704
|
+
// Get a list of all matching attributes on the host element and their values
|
|
11705
|
+
const matchingAttributes = host.getAttributeNames()
|
|
11706
|
+
.filter(attr => matcher(attr))
|
|
11707
|
+
.reduce((acc, attr) => {
|
|
11708
|
+
acc[attr] = host.getAttribute(attr);
|
|
11709
|
+
return acc;
|
|
11710
|
+
}, {});
|
|
11711
|
+
|
|
11712
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
11713
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
11714
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
11715
|
+
target.setAttribute(key, value);
|
|
11716
|
+
if (removeOriginal) {
|
|
11717
|
+
host.removeAttribute(key);
|
|
11718
|
+
}
|
|
11719
|
+
});
|
|
11720
|
+
};
|
|
11598
11721
|
|
|
11599
|
-
|
|
11722
|
+
/**
|
|
11723
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
11724
|
+
*
|
|
11725
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
11726
|
+
* @returns {MutationObserver} The observer instance.
|
|
11727
|
+
* @private
|
|
11728
|
+
*/
|
|
11729
|
+
const _attachObserver$1 = (host) => {
|
|
11730
|
+
// If an observer for this host already exists, return it
|
|
11731
|
+
if (_observers$1.has(host)) {
|
|
11732
|
+
return _observers$1.get(host);
|
|
11733
|
+
}
|
|
11600
11734
|
|
|
11601
|
-
|
|
11735
|
+
// Create a new MutationObserver
|
|
11736
|
+
const observer = new MutationObserver((mutations) => {
|
|
11737
|
+
const config = _transportConfig$1.get(host);
|
|
11738
|
+
if (!config) return;
|
|
11739
|
+
|
|
11740
|
+
// For each mutation affecting attributes
|
|
11741
|
+
mutations
|
|
11742
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
11743
|
+
.forEach(mutation => {
|
|
11744
|
+
const attributeName = mutation.attributeName;
|
|
11745
|
+
|
|
11746
|
+
// Find matchers that care about this attribute
|
|
11747
|
+
for (const matcher of config.matchers) {
|
|
11748
|
+
if (matcher(attributeName)) {
|
|
11749
|
+
// For each target that uses this matcher
|
|
11750
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
11751
|
+
if (matcherConfigs.has(matcher)) {
|
|
11752
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
11753
|
+
_transportAttributes$1({
|
|
11754
|
+
host,
|
|
11755
|
+
target,
|
|
11756
|
+
matcher,
|
|
11757
|
+
removeOriginal
|
|
11758
|
+
});
|
|
11759
|
+
}
|
|
11760
|
+
}
|
|
11761
|
+
}
|
|
11762
|
+
}
|
|
11763
|
+
});
|
|
11764
|
+
});
|
|
11765
|
+
|
|
11766
|
+
// Start observing attribute changes
|
|
11767
|
+
observer.observe(host, { attributes: true });
|
|
11768
|
+
|
|
11769
|
+
// Store the observer
|
|
11770
|
+
_observers$1.set(host, observer);
|
|
11771
|
+
|
|
11772
|
+
return observer;
|
|
11773
|
+
};
|
|
11774
|
+
|
|
11775
|
+
/**
|
|
11776
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
11777
|
+
*
|
|
11778
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
11779
|
+
* @private
|
|
11780
|
+
*/
|
|
11781
|
+
const _detachObserver$1 = (host) => {
|
|
11782
|
+
if (_observers$1.has(host)) {
|
|
11783
|
+
const observer = _observers$1.get(host);
|
|
11784
|
+
observer.disconnect();
|
|
11785
|
+
_observers$1.delete(host);
|
|
11786
|
+
}
|
|
11787
|
+
|
|
11788
|
+
// Clean up the transport config as well
|
|
11789
|
+
if (_transportConfig$1.has(host)) {
|
|
11790
|
+
_transportConfig$1.delete(host);
|
|
11791
|
+
}
|
|
11792
|
+
};
|
|
11793
|
+
|
|
11794
|
+
/**
|
|
11795
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
11796
|
+
* @param {HTMLElement} host - The host element
|
|
11797
|
+
* @param {HTMLElement} target - The target element
|
|
11798
|
+
* @param {Function} matcher - The matcher function
|
|
11799
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
11800
|
+
* @private
|
|
11801
|
+
*/
|
|
11802
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
11803
|
+
const config = _transportConfig$1.get(host);
|
|
11804
|
+
if (!config) return undefined;
|
|
11805
|
+
|
|
11806
|
+
const targetMatchers = config.targets.get(target);
|
|
11807
|
+
if (!targetMatchers) return undefined;
|
|
11808
|
+
|
|
11809
|
+
return targetMatchers.get(matcher);
|
|
11810
|
+
};
|
|
11811
|
+
|
|
11812
|
+
/**
|
|
11813
|
+
* Sets an observed attribute value
|
|
11814
|
+
* @param {HTMLElement} host - The host element
|
|
11815
|
+
* @param {HTMLElement} target - The target element
|
|
11816
|
+
* @param {Function} matcher - The matcher function
|
|
11817
|
+
* @param {string} key - The attribute name
|
|
11818
|
+
* @param {string} value - The attribute value
|
|
11819
|
+
* @private
|
|
11820
|
+
*/
|
|
11821
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
11822
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11823
|
+
if (matcherConfig) {
|
|
11824
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11825
|
+
}
|
|
11826
|
+
};
|
|
11827
|
+
|
|
11828
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
11829
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11830
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
11831
|
+
return undefined;
|
|
11832
|
+
};
|
|
11833
|
+
|
|
11834
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
11835
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11836
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
11837
|
+
return [];
|
|
11838
|
+
};
|
|
11839
|
+
|
|
11840
|
+
const _matchers$1 = {
|
|
11841
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
11842
|
+
'role': attr => attr.match(/^role$/)
|
|
11843
|
+
};
|
|
11844
|
+
|
|
11845
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
11846
|
+
return transportAttributes$1({
|
|
11847
|
+
host,
|
|
11848
|
+
target,
|
|
11849
|
+
match: attr => {
|
|
11850
|
+
for (const key in _matchers$1) {
|
|
11851
|
+
if (_matchers$1[key](attr)) return true;
|
|
11852
|
+
}
|
|
11853
|
+
return false;
|
|
11854
|
+
},
|
|
11855
|
+
removeOriginal
|
|
11856
|
+
});
|
|
11857
|
+
};
|
|
11858
|
+
|
|
11859
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
11602
11860
|
|
|
11603
11861
|
/**
|
|
11604
|
-
*
|
|
11605
|
-
* @
|
|
11606
|
-
* @
|
|
11607
|
-
* @
|
|
11862
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
11863
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
11864
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
11865
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11866
|
+
* @private
|
|
11608
11867
|
*/
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11868
|
+
attributeWatcher;
|
|
11869
|
+
|
|
11870
|
+
static get properties() {
|
|
11871
|
+
return {
|
|
11872
|
+
|
|
11873
|
+
/**
|
|
11874
|
+
* Defines the layout of an element.
|
|
11875
|
+
* @default {'default'}
|
|
11876
|
+
*/
|
|
11877
|
+
layout: {
|
|
11878
|
+
type: String,
|
|
11879
|
+
attribute: "layout",
|
|
11880
|
+
reflect: true
|
|
11881
|
+
},
|
|
11882
|
+
|
|
11883
|
+
/**
|
|
11884
|
+
* Defines the shape of an element.
|
|
11885
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
11886
|
+
* @default {'default'}
|
|
11887
|
+
*/
|
|
11888
|
+
shape: {
|
|
11889
|
+
type: String,
|
|
11890
|
+
attribute: "shape",
|
|
11891
|
+
reflect: true
|
|
11892
|
+
},
|
|
11893
|
+
|
|
11894
|
+
/**
|
|
11895
|
+
* Defines the size of an element.
|
|
11896
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
11897
|
+
* @default {'md'}
|
|
11898
|
+
*/
|
|
11899
|
+
size: {
|
|
11900
|
+
type: String,
|
|
11901
|
+
attribute: "size",
|
|
11902
|
+
reflect: true
|
|
11903
|
+
},
|
|
11904
|
+
|
|
11905
|
+
/**
|
|
11906
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
11907
|
+
* @default {false}
|
|
11908
|
+
*/
|
|
11909
|
+
onDark: {
|
|
11910
|
+
type: Boolean,
|
|
11911
|
+
attribute: "ondark",
|
|
11912
|
+
reflect: true
|
|
11913
|
+
},
|
|
11914
|
+
|
|
11915
|
+
/**
|
|
11916
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
11917
|
+
* This is used to apply layout and shape classes dynamically.
|
|
11918
|
+
* @type {HTMLElement|null}
|
|
11919
|
+
* @default {null}
|
|
11920
|
+
* @private
|
|
11921
|
+
*/
|
|
11922
|
+
wrapper: {
|
|
11923
|
+
type: HTMLElement,
|
|
11924
|
+
attribute: false,
|
|
11925
|
+
reflect: false
|
|
11926
|
+
}
|
|
11927
|
+
};
|
|
11928
|
+
}
|
|
11929
|
+
|
|
11930
|
+
|
|
11931
|
+
|
|
11932
|
+
resetShapeClasses() {
|
|
11933
|
+
if (this.shape && this.size) {
|
|
11934
|
+
|
|
11935
|
+
if (this.wrapper) {
|
|
11936
|
+
this.wrapper.classList.forEach((className) => {
|
|
11937
|
+
if (className.startsWith('shape-')) {
|
|
11938
|
+
this.wrapper.classList.remove(className);
|
|
11939
|
+
}
|
|
11940
|
+
});
|
|
11941
|
+
|
|
11942
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
11943
|
+
}
|
|
11612
11944
|
}
|
|
11613
11945
|
}
|
|
11614
11946
|
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11628
|
-
) {
|
|
11629
|
-
return __Closest(base);
|
|
11947
|
+
resetLayoutClasses() {
|
|
11948
|
+
if (this.layout) {
|
|
11949
|
+
if (this.wrapper) {
|
|
11950
|
+
this.wrapper.classList.forEach((className) => {
|
|
11951
|
+
if (className.startsWith('layout-')) {
|
|
11952
|
+
this.wrapper.classList.remove(className);
|
|
11953
|
+
}
|
|
11954
|
+
});
|
|
11955
|
+
|
|
11956
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
11957
|
+
}
|
|
11958
|
+
}
|
|
11630
11959
|
}
|
|
11631
|
-
/* eslint-enable jsdoc/require-param */
|
|
11632
11960
|
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
* @returns {void}
|
|
11638
|
-
*/
|
|
11639
|
-
handleComponentTagRename(elem, tagName) {
|
|
11640
|
-
const tag = tagName.toLowerCase();
|
|
11641
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11961
|
+
updateComponentArchitecture() {
|
|
11962
|
+
this.resetLayoutClasses();
|
|
11963
|
+
this.resetShapeClasses();
|
|
11964
|
+
}
|
|
11642
11965
|
|
|
11643
|
-
|
|
11644
|
-
|
|
11966
|
+
updated(changedProperties) {
|
|
11967
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
11968
|
+
this.updateComponentArchitecture();
|
|
11645
11969
|
}
|
|
11646
11970
|
}
|
|
11647
11971
|
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
* @param {Object} elem - The element to validate.
|
|
11651
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
11652
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11653
|
-
*/
|
|
11654
|
-
elementMatch(elem, tagName) {
|
|
11655
|
-
const tag = tagName.toLowerCase();
|
|
11656
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11972
|
+
firstUpdated() {
|
|
11973
|
+
super.firstUpdated();
|
|
11657
11974
|
|
|
11658
|
-
|
|
11975
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
11976
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
11977
|
+
|
|
11978
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
11979
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11982
|
+
disconnectedCallback() {
|
|
11983
|
+
super.disconnectedCallback();
|
|
11984
|
+
|
|
11985
|
+
// Cleanup the ARIA observer if it exists
|
|
11986
|
+
if (this.attributeWatcher) {
|
|
11987
|
+
this.attributeWatcher.cleanup();
|
|
11988
|
+
this.attributeWatcher = null;
|
|
11989
|
+
}
|
|
11990
|
+
}
|
|
11991
|
+
|
|
11992
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
11993
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
11994
|
+
render() {
|
|
11995
|
+
try {
|
|
11996
|
+
return this.renderLayout();
|
|
11997
|
+
} catch (error) {
|
|
11998
|
+
// failed to get the defined layout
|
|
11999
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
12000
|
+
|
|
12001
|
+
// fallback to the default layout
|
|
12002
|
+
return this.getLayout('default');
|
|
12003
|
+
}
|
|
11659
12004
|
}
|
|
11660
12005
|
};
|
|
11661
12006
|
|
|
11662
|
-
var styleCss$2$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block
|
|
12007
|
+
var styleCss$2$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
12008
|
+
|
|
12009
|
+
var colorCss$2$2 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
11663
12010
|
|
|
11664
|
-
var
|
|
12011
|
+
var tokensCss$2$2 = i$5`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
11665
12012
|
|
|
11666
|
-
var
|
|
12013
|
+
var shapeSize$1 = i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
11667
12014
|
|
|
11668
12015
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11669
12016
|
// See LICENSE in the project root for license information.
|
|
@@ -11739,13 +12086,13 @@ var styleCss$1$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
11739
12086
|
|
|
11740
12087
|
var colorCss$1$2 = i$5`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
11741
12088
|
|
|
11742
|
-
var tokensCss$1$
|
|
12089
|
+
var tokensCss$1$2 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11743
12090
|
|
|
11744
12091
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11745
12092
|
// See LICENSE in the project root for license information.
|
|
11746
12093
|
|
|
11747
12094
|
|
|
11748
|
-
class AuroLoader extends i$2 {
|
|
12095
|
+
let AuroLoader$1 = class AuroLoader extends i$2 {
|
|
11749
12096
|
constructor() {
|
|
11750
12097
|
super();
|
|
11751
12098
|
|
|
@@ -11817,7 +12164,7 @@ class AuroLoader extends i$2 {
|
|
|
11817
12164
|
return [
|
|
11818
12165
|
i$5`${styleCss$1$2}`,
|
|
11819
12166
|
i$5`${colorCss$1$2}`,
|
|
11820
|
-
i$5`${tokensCss$1$
|
|
12167
|
+
i$5`${tokensCss$1$2}`
|
|
11821
12168
|
];
|
|
11822
12169
|
}
|
|
11823
12170
|
|
|
@@ -11878,18 +12225,17 @@ class AuroLoader extends i$2 {
|
|
|
11878
12225
|
}
|
|
11879
12226
|
`;
|
|
11880
12227
|
}
|
|
11881
|
-
}
|
|
12228
|
+
};
|
|
11882
12229
|
|
|
11883
|
-
var loaderVersion = '5.0.0';
|
|
12230
|
+
var loaderVersion$1 = '5.0.0';
|
|
11884
12231
|
|
|
11885
|
-
/* eslint-disable max-lines */
|
|
12232
|
+
/* eslint-disable max-lines, curly */
|
|
11886
12233
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11887
12234
|
// See LICENSE in the project root for license information.
|
|
11888
12235
|
|
|
11889
12236
|
|
|
11890
12237
|
/**
|
|
11891
12238
|
* @slot - Default slot for the text of the button.
|
|
11892
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
11893
12239
|
* @csspart button - Apply CSS to HTML5 button.
|
|
11894
12240
|
* @csspart loader - Apply CSS to auro-loader.
|
|
11895
12241
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -11898,7 +12244,18 @@ var loaderVersion = '5.0.0';
|
|
|
11898
12244
|
|
|
11899
12245
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
11900
12246
|
|
|
11901
|
-
|
|
12247
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
12248
|
+
|
|
12249
|
+
/**
|
|
12250
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
12251
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
12252
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
12253
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
12254
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
12255
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
12256
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
12257
|
+
*/
|
|
12258
|
+
let AuroButton$1 = class AuroButton extends AuroElement$3 {
|
|
11902
12259
|
|
|
11903
12260
|
/**
|
|
11904
12261
|
* Enables form association for this element.
|
|
@@ -11913,13 +12270,10 @@ class AuroButton extends i$2 {
|
|
|
11913
12270
|
super();
|
|
11914
12271
|
this.autofocus = false;
|
|
11915
12272
|
this.disabled = false;
|
|
11916
|
-
this.iconOnly = false;
|
|
11917
12273
|
this.loading = false;
|
|
12274
|
+
this.size = "md";
|
|
12275
|
+
this.shape = "rounded";
|
|
11918
12276
|
this.onDark = false;
|
|
11919
|
-
this.secondary = false;
|
|
11920
|
-
this.tertiary = false;
|
|
11921
|
-
this.rounded = false;
|
|
11922
|
-
this.slim = false;
|
|
11923
12277
|
this.fluid = false;
|
|
11924
12278
|
this.loadingText = this.loadingText || 'Loading...';
|
|
11925
12279
|
|
|
@@ -11936,55 +12290,50 @@ class AuroButton extends i$2 {
|
|
|
11936
12290
|
/**
|
|
11937
12291
|
* Generate unique names for dependency components.
|
|
11938
12292
|
*/
|
|
11939
|
-
const versioning = new AuroDependencyVersioning$
|
|
12293
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
11940
12294
|
|
|
11941
12295
|
/**
|
|
11942
12296
|
* @private
|
|
11943
12297
|
*/
|
|
11944
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
12298
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
11945
12299
|
}
|
|
11946
12300
|
|
|
11947
12301
|
static get styles() {
|
|
11948
12302
|
return [
|
|
11949
|
-
tokensCss$2$
|
|
12303
|
+
tokensCss$2$2,
|
|
11950
12304
|
styleCss$2$2,
|
|
11951
|
-
colorCss$2$
|
|
12305
|
+
colorCss$2$2,
|
|
12306
|
+
shapeSize$1
|
|
11952
12307
|
];
|
|
11953
12308
|
}
|
|
11954
12309
|
|
|
11955
12310
|
static get properties() {
|
|
11956
12311
|
return {
|
|
11957
12312
|
|
|
11958
|
-
|
|
11959
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11960
|
-
*/
|
|
11961
|
-
autofocus: {
|
|
11962
|
-
type: Boolean,
|
|
11963
|
-
reflect: true
|
|
11964
|
-
},
|
|
12313
|
+
...super.properties,
|
|
11965
12314
|
|
|
11966
12315
|
/**
|
|
11967
|
-
*
|
|
12316
|
+
* Override layout since it isn't used in this component.
|
|
12317
|
+
* @private
|
|
11968
12318
|
*/
|
|
11969
|
-
|
|
12319
|
+
layout: {
|
|
11970
12320
|
type: Boolean,
|
|
11971
|
-
|
|
12321
|
+
attribute: false,
|
|
12322
|
+
reflect: false
|
|
11972
12323
|
},
|
|
11973
12324
|
|
|
11974
12325
|
/**
|
|
11975
|
-
*
|
|
11976
|
-
* @deprecated
|
|
12326
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11977
12327
|
*/
|
|
11978
|
-
|
|
12328
|
+
autofocus: {
|
|
11979
12329
|
type: Boolean,
|
|
11980
12330
|
reflect: true
|
|
11981
12331
|
},
|
|
11982
12332
|
|
|
11983
12333
|
/**
|
|
11984
|
-
*
|
|
11985
|
-
* @deprecated
|
|
12334
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
11986
12335
|
*/
|
|
11987
|
-
|
|
12336
|
+
disabled: {
|
|
11988
12337
|
type: Boolean,
|
|
11989
12338
|
reflect: true
|
|
11990
12339
|
},
|
|
@@ -11992,15 +12341,7 @@ class AuroButton extends i$2 {
|
|
|
11992
12341
|
/**
|
|
11993
12342
|
* Alters the shape of the button to be full width of its parent container.
|
|
11994
12343
|
*/
|
|
11995
|
-
fluid:
|
|
11996
|
-
type: Boolean,
|
|
11997
|
-
reflect: true
|
|
11998
|
-
},
|
|
11999
|
-
|
|
12000
|
-
/**
|
|
12001
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
12002
|
-
*/
|
|
12003
|
-
iconOnly: {
|
|
12344
|
+
fluid: {
|
|
12004
12345
|
type: Boolean,
|
|
12005
12346
|
reflect: true
|
|
12006
12347
|
},
|
|
@@ -12008,7 +12349,7 @@ class AuroButton extends i$2 {
|
|
|
12008
12349
|
/**
|
|
12009
12350
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
12010
12351
|
*/
|
|
12011
|
-
loading:
|
|
12352
|
+
loading: {
|
|
12012
12353
|
type: Boolean,
|
|
12013
12354
|
reflect: true
|
|
12014
12355
|
},
|
|
@@ -12016,34 +12357,10 @@ class AuroButton extends i$2 {
|
|
|
12016
12357
|
/**
|
|
12017
12358
|
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
12018
12359
|
*/
|
|
12019
|
-
loadingText:
|
|
12360
|
+
loadingText: {
|
|
12020
12361
|
type: String
|
|
12021
12362
|
},
|
|
12022
12363
|
|
|
12023
|
-
/**
|
|
12024
|
-
* Set value for on-dark version of auro-button.
|
|
12025
|
-
*/
|
|
12026
|
-
onDark: {
|
|
12027
|
-
type: Boolean,
|
|
12028
|
-
reflect: true
|
|
12029
|
-
},
|
|
12030
|
-
|
|
12031
|
-
/**
|
|
12032
|
-
* If set to true, the button will have a rounded shape.
|
|
12033
|
-
*/
|
|
12034
|
-
rounded: {
|
|
12035
|
-
type: Boolean,
|
|
12036
|
-
reflect: true
|
|
12037
|
-
},
|
|
12038
|
-
|
|
12039
|
-
/**
|
|
12040
|
-
* Set value for slim version of auro-button.
|
|
12041
|
-
*/
|
|
12042
|
-
slim: {
|
|
12043
|
-
type: Boolean,
|
|
12044
|
-
reflect: true
|
|
12045
|
-
},
|
|
12046
|
-
|
|
12047
12364
|
/**
|
|
12048
12365
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
12049
12366
|
*/
|
|
@@ -12053,75 +12370,37 @@ class AuroButton extends i$2 {
|
|
|
12053
12370
|
},
|
|
12054
12371
|
|
|
12055
12372
|
/**
|
|
12056
|
-
*
|
|
12057
|
-
*/
|
|
12058
|
-
ariahidden: {
|
|
12059
|
-
type: String,
|
|
12060
|
-
reflect: true,
|
|
12061
|
-
},
|
|
12062
|
-
|
|
12063
|
-
/**
|
|
12064
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
12065
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
12066
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
12373
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
12067
12374
|
*/
|
|
12068
|
-
|
|
12375
|
+
title: {
|
|
12069
12376
|
type: String,
|
|
12070
12377
|
reflect: true
|
|
12071
12378
|
},
|
|
12072
12379
|
|
|
12073
12380
|
/**
|
|
12074
|
-
*
|
|
12075
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
12076
|
-
* List multiple element IDs in a space delimited fashion.
|
|
12381
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
12077
12382
|
*/
|
|
12078
|
-
|
|
12383
|
+
type: {
|
|
12079
12384
|
type: String,
|
|
12080
12385
|
reflect: true
|
|
12081
12386
|
},
|
|
12082
12387
|
|
|
12083
12388
|
/**
|
|
12084
|
-
*
|
|
12085
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
12086
|
-
* This is an optional attribute for buttons.
|
|
12087
|
-
*/
|
|
12088
|
-
ariaexpanded: {
|
|
12089
|
-
type: Boolean,
|
|
12090
|
-
reflect: true
|
|
12091
|
-
},
|
|
12092
|
-
|
|
12093
|
-
/**
|
|
12094
|
-
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
12389
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
12095
12390
|
*/
|
|
12096
|
-
|
|
12391
|
+
value: {
|
|
12097
12392
|
type: String,
|
|
12098
12393
|
reflect: true
|
|
12099
12394
|
},
|
|
12100
12395
|
|
|
12101
12396
|
/**
|
|
12102
|
-
*
|
|
12397
|
+
* Sets button variant option.
|
|
12398
|
+
* @default primary
|
|
12103
12399
|
*/
|
|
12104
|
-
|
|
12400
|
+
variant: {
|
|
12105
12401
|
type: String,
|
|
12106
12402
|
reflect: true
|
|
12107
12403
|
},
|
|
12108
|
-
|
|
12109
|
-
/**
|
|
12110
|
-
* Defines the value associated with the button which is submitted with the form data.
|
|
12111
|
-
*/
|
|
12112
|
-
value: {
|
|
12113
|
-
type: String,
|
|
12114
|
-
reflect: true
|
|
12115
|
-
},
|
|
12116
|
-
|
|
12117
|
-
/**
|
|
12118
|
-
* Sets button variant option. Possible values are: `secondary`, `tertiary`.
|
|
12119
|
-
*/
|
|
12120
|
-
variant: {
|
|
12121
|
-
type: String,
|
|
12122
|
-
reflect: true
|
|
12123
|
-
},
|
|
12124
|
-
ready: { type: Boolean },
|
|
12125
12404
|
};
|
|
12126
12405
|
}
|
|
12127
12406
|
|
|
@@ -12134,7 +12413,7 @@ class AuroButton extends i$2 {
|
|
|
12134
12413
|
*
|
|
12135
12414
|
*/
|
|
12136
12415
|
static register(name = "auro-button") {
|
|
12137
|
-
AuroLibraryRuntimeUtils$
|
|
12416
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroButton);
|
|
12138
12417
|
}
|
|
12139
12418
|
|
|
12140
12419
|
/**
|
|
@@ -12146,17 +12425,6 @@ class AuroButton extends i$2 {
|
|
|
12146
12425
|
this.renderRoot.querySelector('button').focus();
|
|
12147
12426
|
}
|
|
12148
12427
|
|
|
12149
|
-
updated() {
|
|
12150
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
12151
|
-
if (this.secondary) {
|
|
12152
|
-
this.setAttribute('variant', 'secondary');
|
|
12153
|
-
}
|
|
12154
|
-
|
|
12155
|
-
if (this.tertiary) {
|
|
12156
|
-
this.setAttribute('variant', 'tertiary');
|
|
12157
|
-
}
|
|
12158
|
-
}
|
|
12159
|
-
|
|
12160
12428
|
/**
|
|
12161
12429
|
* Submits the form that this button is associated with.
|
|
12162
12430
|
* @private
|
|
@@ -12177,25 +12445,57 @@ class AuroButton extends i$2 {
|
|
|
12177
12445
|
return this.internals ? this.internals.form : null;
|
|
12178
12446
|
}
|
|
12179
12447
|
|
|
12180
|
-
|
|
12448
|
+
/**
|
|
12449
|
+
* @private
|
|
12450
|
+
* @returns {Boolean}
|
|
12451
|
+
*/
|
|
12452
|
+
get hideText() {
|
|
12453
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
12454
|
+
}
|
|
12455
|
+
|
|
12456
|
+
/**
|
|
12457
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
12458
|
+
* @returns {string | undefined}
|
|
12459
|
+
* @private
|
|
12460
|
+
*/
|
|
12461
|
+
get currentAriaLabel() {
|
|
12462
|
+
if (!this.attributeWatcher) return undefined;
|
|
12463
|
+
|
|
12464
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
12465
|
+
return ariaLabel || undefined;
|
|
12466
|
+
}
|
|
12467
|
+
|
|
12468
|
+
/**
|
|
12469
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
12470
|
+
* @returns {string | undefined}
|
|
12471
|
+
* @private
|
|
12472
|
+
*/
|
|
12473
|
+
get currentAriaLabelledBy() {
|
|
12474
|
+
if (!this.attributeWatcher) return undefined;
|
|
12475
|
+
|
|
12476
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
12477
|
+
return ariaLabelledBy || undefined;
|
|
12478
|
+
}
|
|
12479
|
+
|
|
12480
|
+
/**
|
|
12481
|
+
* Renders the default layout for the button.
|
|
12482
|
+
* @returns {TemplateResult}
|
|
12483
|
+
* @private
|
|
12484
|
+
*/
|
|
12485
|
+
renderLayoutDefault() {
|
|
12181
12486
|
const classes = {
|
|
12182
|
-
|
|
12183
|
-
|
|
12184
|
-
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
12188
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
12189
|
-
'loading': this.loading
|
|
12487
|
+
"util_insetLg--squish": true,
|
|
12488
|
+
"auro-button": true,
|
|
12489
|
+
"icon-only": this.hideText,
|
|
12490
|
+
wrapper: true,
|
|
12491
|
+
loading: this.loading,
|
|
12190
12492
|
};
|
|
12191
12493
|
|
|
12192
12494
|
return u$2`
|
|
12193
12495
|
<button
|
|
12194
12496
|
part="button"
|
|
12195
|
-
aria-
|
|
12196
|
-
aria-
|
|
12197
|
-
aria-labelledby="${o(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
12198
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
12497
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
12498
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
12199
12499
|
tabIndex="${o(this.tIndex)}"
|
|
12200
12500
|
?autofocus="${this.autofocus}"
|
|
12201
12501
|
class="${e(classes)}"
|
|
@@ -12212,19 +12512,24 @@ class AuroButton extends i$2 {
|
|
|
12212
12512
|
|
|
12213
12513
|
<span class="contentWrapper">
|
|
12214
12514
|
<span class="textSlot" part="text">
|
|
12215
|
-
|
|
12216
|
-
</span>
|
|
12217
|
-
|
|
12218
|
-
<span part="icon">
|
|
12219
|
-
<slot name="icon"></slot>
|
|
12515
|
+
<slot></slot>
|
|
12220
12516
|
</span>
|
|
12221
12517
|
</span>
|
|
12222
12518
|
</button>
|
|
12223
12519
|
`;
|
|
12224
12520
|
}
|
|
12225
|
-
}
|
|
12226
12521
|
|
|
12227
|
-
|
|
12522
|
+
/**
|
|
12523
|
+
* Renders the layout of the button
|
|
12524
|
+
* @returns {TemplateResult}
|
|
12525
|
+
* @private
|
|
12526
|
+
*/
|
|
12527
|
+
renderLayout() {
|
|
12528
|
+
return this.renderLayoutDefault();
|
|
12529
|
+
}
|
|
12530
|
+
};
|
|
12531
|
+
|
|
12532
|
+
var buttonVersion$1 = '11.0.0';
|
|
12228
12533
|
|
|
12229
12534
|
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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
12230
12535
|
|
|
@@ -12452,7 +12757,7 @@ class AuroInput extends BaseInput {
|
|
|
12452
12757
|
/**
|
|
12453
12758
|
* @private
|
|
12454
12759
|
*/
|
|
12455
|
-
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
12760
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion$1, AuroButton$1);
|
|
12456
12761
|
|
|
12457
12762
|
/**
|
|
12458
12763
|
* @private
|
|
@@ -12476,7 +12781,7 @@ class AuroInput extends BaseInput {
|
|
|
12476
12781
|
i$5`${classicColorCss}`,
|
|
12477
12782
|
i$5`${shapeSizeCss}`,
|
|
12478
12783
|
i$5`${colorBaseCss}`,
|
|
12479
|
-
i$5`${styleCss$4$
|
|
12784
|
+
i$5`${styleCss$4$2}`,
|
|
12480
12785
|
i$5`${styleDefaultCss}`,
|
|
12481
12786
|
i$5`${tokensCss$4}`,
|
|
12482
12787
|
i$5`${emphasizedStyleCss}`,
|
|
@@ -12492,6 +12797,7 @@ class AuroInput extends BaseInput {
|
|
|
12492
12797
|
*/
|
|
12493
12798
|
get commonLabelClasses() {
|
|
12494
12799
|
return {
|
|
12800
|
+
'is-disabled': this.disabled,
|
|
12495
12801
|
'withValue': this.value && this.value.length > 0,
|
|
12496
12802
|
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
12497
12803
|
};
|
|
@@ -12528,11 +12834,23 @@ class AuroInput extends BaseInput {
|
|
|
12528
12834
|
get commonWrapperClasses() {
|
|
12529
12835
|
return {
|
|
12530
12836
|
'wrapper': true,
|
|
12837
|
+
'simple': this.simple,
|
|
12531
12838
|
'withValue': this.value && this.value.length > 0,
|
|
12532
12839
|
'hasFocus': this.hasFocus
|
|
12533
12840
|
};
|
|
12534
12841
|
}
|
|
12535
12842
|
|
|
12843
|
+
/**
|
|
12844
|
+
* Returns classmap configuration for accent elements in each layout.
|
|
12845
|
+
* @private
|
|
12846
|
+
* @returns {object} - Returns classmap.
|
|
12847
|
+
*/
|
|
12848
|
+
get commonAccentClasses() {
|
|
12849
|
+
return {
|
|
12850
|
+
'util_displayHidden': false
|
|
12851
|
+
};
|
|
12852
|
+
}
|
|
12853
|
+
|
|
12536
12854
|
/**
|
|
12537
12855
|
* Returns classmap configuration for helpText elements in each layout.
|
|
12538
12856
|
* @private
|
|
@@ -12555,7 +12873,7 @@ class AuroInput extends BaseInput {
|
|
|
12555
12873
|
*
|
|
12556
12874
|
*/
|
|
12557
12875
|
static register(name = "auro-input") {
|
|
12558
|
-
AuroLibraryRuntimeUtils$
|
|
12876
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroInput);
|
|
12559
12877
|
}
|
|
12560
12878
|
|
|
12561
12879
|
/**
|
|
@@ -12628,28 +12946,33 @@ class AuroInput extends BaseInput {
|
|
|
12628
12946
|
: this.commonInputClasses;
|
|
12629
12947
|
|
|
12630
12948
|
return u$2`
|
|
12631
|
-
<label for=${this.
|
|
12949
|
+
<label for=${this.inputId} class="${e(this.commonLabelClasses)}" part="label">
|
|
12632
12950
|
<slot name="label">
|
|
12633
12951
|
${this.label}
|
|
12634
12952
|
</slot>
|
|
12635
12953
|
</label>
|
|
12954
|
+
|
|
12955
|
+
<!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
|
|
12636
12956
|
<input
|
|
12637
12957
|
@blur="${this.handleBlur}"
|
|
12638
12958
|
@focusin="${this.handleFocusin}"
|
|
12639
12959
|
@focusout="${this.handleFocusout}"
|
|
12640
12960
|
@input="${this.handleInput}"
|
|
12961
|
+
.placeholder=${this.placeholderStr}
|
|
12962
|
+
.role=${this.a11yRole}
|
|
12641
12963
|
?activeLabel="${this.activeLabel}"
|
|
12642
12964
|
?disabled="${this.disabled}"
|
|
12643
12965
|
?required="${this.required}"
|
|
12644
|
-
|
|
12966
|
+
aria-controls=${o(this.a11yControls)}
|
|
12645
12967
|
aria-describedby="${this.uniqueId}"
|
|
12968
|
+
aria-expanded=${o(this.a11yExpanded)}
|
|
12646
12969
|
aria-invalid="${this.validity !== 'valid'}"
|
|
12647
|
-
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
12648
12970
|
autocomplete="${o(this.autocomplete ? this.autocomplete : undefined)}"
|
|
12971
|
+
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
12649
12972
|
autocorrect="${o(this.autocorrect ? this.autocorrect : undefined)}"
|
|
12650
12973
|
class="${e(inputOverrideClasses)}"
|
|
12651
12974
|
id="${this.inputId}"
|
|
12652
|
-
|
|
12975
|
+
inputmode="${o(this.inputmode ? this.inputmode : undefined)}"
|
|
12653
12976
|
lang="${o(this.lang)}"
|
|
12654
12977
|
maxlength="${o(this.maxLength ? this.maxLength : undefined)}"
|
|
12655
12978
|
minlength="${o(this.minLength ? this.minLength : undefined)}"
|
|
@@ -12657,7 +12980,8 @@ class AuroInput extends BaseInput {
|
|
|
12657
12980
|
part="input"
|
|
12658
12981
|
pattern="${o(this.definePattern())}"
|
|
12659
12982
|
spellcheck="${o(this.spellcheck ? this.spellcheck : undefined)}"
|
|
12660
|
-
type="${this.type ===
|
|
12983
|
+
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
12984
|
+
/>
|
|
12661
12985
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
12662
12986
|
<div class="displayValueWrapper">
|
|
12663
12987
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
@@ -12679,11 +13003,12 @@ class AuroInput extends BaseInput {
|
|
|
12679
13003
|
?onDark="${this.onDark}"
|
|
12680
13004
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
12681
13005
|
class="notificationBtn clearBtn"
|
|
12682
|
-
|
|
12683
|
-
|
|
13006
|
+
shape="circle"
|
|
13007
|
+
size="sm"
|
|
13008
|
+
variant="ghost">
|
|
12684
13009
|
<${this.iconTag}
|
|
13010
|
+
?customColor="${this.onDark}"
|
|
12685
13011
|
category="interface"
|
|
12686
|
-
customColor
|
|
12687
13012
|
name="x-lg"
|
|
12688
13013
|
>
|
|
12689
13014
|
</${this.iconTag}>
|
|
@@ -12701,22 +13026,23 @@ class AuroInput extends BaseInput {
|
|
|
12701
13026
|
return u$2`
|
|
12702
13027
|
<div class="notification">
|
|
12703
13028
|
<${this.buttonTag}
|
|
12704
|
-
@click="${this.handleClickShowPassword}
|
|
13029
|
+
@click="${this.handleClickShowPassword}"
|
|
12705
13030
|
?onDark="${this.onDark}"
|
|
12706
|
-
aria-hidden="true"
|
|
12707
13031
|
class="notificationBtn passwordBtn"
|
|
12708
|
-
|
|
12709
|
-
|
|
13032
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
13033
|
+
shape="circle"
|
|
13034
|
+
size="sm"
|
|
13035
|
+
variant="ghost">
|
|
12710
13036
|
<${this.iconTag}
|
|
13037
|
+
?customColor="${this.onDark}"
|
|
12711
13038
|
?hidden=${!this.showPassword}
|
|
12712
13039
|
category="interface"
|
|
12713
|
-
customColor
|
|
12714
13040
|
name="hide-password-stroke">
|
|
12715
13041
|
</${this.iconTag}>
|
|
12716
13042
|
<${this.iconTag}
|
|
13043
|
+
?customColor="${this.onDark}"
|
|
12717
13044
|
?hidden=${this.showPassword}
|
|
12718
13045
|
category="interface"
|
|
12719
|
-
customColor
|
|
12720
13046
|
name="view-password-stroke">
|
|
12721
13047
|
</${this.iconTag}>
|
|
12722
13048
|
</${this.buttonTag}>
|
|
@@ -12796,19 +13122,25 @@ class AuroInput extends BaseInput {
|
|
|
12796
13122
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
12797
13123
|
*/
|
|
12798
13124
|
renderLayoutClassic() {
|
|
13125
|
+
const classicClassMap = {
|
|
13126
|
+
...this.commonWrapperClasses,
|
|
13127
|
+
'thin': !this.simple
|
|
13128
|
+
};
|
|
13129
|
+
|
|
12799
13130
|
return u$2`
|
|
12800
13131
|
<div
|
|
12801
13132
|
@click="${this.handleClick}"
|
|
12802
|
-
class="${e(
|
|
13133
|
+
class="${e(classicClassMap)}"
|
|
12803
13134
|
part="wrapper">
|
|
12804
|
-
<div class="accents left">
|
|
13135
|
+
<div part="accent-left" class="accents left ${e(this.commonAccentClasses)}">
|
|
12805
13136
|
${this.renderHtmlTypeIcon()}
|
|
12806
13137
|
</div>
|
|
12807
13138
|
<div class="mainContent">
|
|
12808
13139
|
${this.renderHtmlInput(true)}
|
|
12809
13140
|
</div>
|
|
12810
|
-
<div class="accents right">
|
|
13141
|
+
<div part="accent-right" class="accents right ${e(this.commonAccentClasses)}">
|
|
12811
13142
|
${this.renderValidationErrorIconHtml()}
|
|
13143
|
+
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
12812
13144
|
${this.hasValue ? u$2`
|
|
12813
13145
|
${!this.disabled && !this.readonly ? u$2`
|
|
12814
13146
|
${this.renderHtmlActionClear()}
|
|
@@ -12833,7 +13165,7 @@ class AuroInput extends BaseInput {
|
|
|
12833
13165
|
@click="${this.handleClick}"
|
|
12834
13166
|
class="${e(this.commonWrapperClasses)}"
|
|
12835
13167
|
part="wrapper">
|
|
12836
|
-
<div class="accents left">
|
|
13168
|
+
<div class="accents left ${this.commonAccentClasses}">
|
|
12837
13169
|
${this.layout.includes('left') ? u$2`
|
|
12838
13170
|
${this.renderValidationErrorIconHtml()}
|
|
12839
13171
|
` : undefined}
|
|
@@ -12841,7 +13173,7 @@ class AuroInput extends BaseInput {
|
|
|
12841
13173
|
<div class="mainContent">
|
|
12842
13174
|
${this.renderHtmlInput()}
|
|
12843
13175
|
</div>
|
|
12844
|
-
<div class="accents right">
|
|
13176
|
+
<div class="accents right ${this.commonAccentClasses}">
|
|
12845
13177
|
${this.layout.includes('right') || this.layout === "emphasized" ? u$2`
|
|
12846
13178
|
${this.renderValidationErrorIconHtml()}
|
|
12847
13179
|
` : undefined}
|
|
@@ -12920,9 +13252,9 @@ class AuroInput extends BaseInput {
|
|
|
12920
13252
|
|
|
12921
13253
|
var inputVersion = '4.2.0';
|
|
12922
13254
|
|
|
12923
|
-
var colorCss$
|
|
13255
|
+
var colorCss$3$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
12924
13256
|
|
|
12925
|
-
var styleCss$
|
|
13257
|
+
var styleCss$4$1 = i$5`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){box-sizing:border-box;padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
12926
13258
|
|
|
12927
13259
|
var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-basic-color-surface-default, #ffffff)}`;
|
|
12928
13260
|
|
|
@@ -12933,109 +13265,1102 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
12933
13265
|
|
|
12934
13266
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12935
13267
|
|
|
12936
|
-
let AuroLibraryRuntimeUtils$
|
|
13268
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
12937
13269
|
|
|
12938
13270
|
/* eslint-disable jsdoc/require-param */
|
|
12939
13271
|
|
|
12940
13272
|
/**
|
|
12941
|
-
* This will register a new custom element with the browser.
|
|
12942
|
-
* @param {String} name - The name of the custom element.
|
|
12943
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
12944
|
-
* @returns {void}
|
|
13273
|
+
* This will register a new custom element with the browser.
|
|
13274
|
+
* @param {String} name - The name of the custom element.
|
|
13275
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13276
|
+
* @returns {void}
|
|
13277
|
+
*/
|
|
13278
|
+
registerComponent(name, componentClass) {
|
|
13279
|
+
if (!customElements.get(name)) {
|
|
13280
|
+
customElements.define(name, class extends componentClass {});
|
|
13281
|
+
}
|
|
13282
|
+
}
|
|
13283
|
+
|
|
13284
|
+
/**
|
|
13285
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13286
|
+
* @returns {void}
|
|
13287
|
+
*/
|
|
13288
|
+
closestElement(
|
|
13289
|
+
selector, // selector like in .closest()
|
|
13290
|
+
base = this, // extra functionality to skip a parent
|
|
13291
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13292
|
+
!el || el === document || el === window
|
|
13293
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13294
|
+
: found
|
|
13295
|
+
? found // found a selector INside this element
|
|
13296
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13297
|
+
) {
|
|
13298
|
+
return __Closest(base);
|
|
13299
|
+
}
|
|
13300
|
+
/* eslint-enable jsdoc/require-param */
|
|
13301
|
+
|
|
13302
|
+
/**
|
|
13303
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
13304
|
+
* @param {Object} elem - The element to check.
|
|
13305
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13306
|
+
* @returns {void}
|
|
13307
|
+
*/
|
|
13308
|
+
handleComponentTagRename(elem, tagName) {
|
|
13309
|
+
const tag = tagName.toLowerCase();
|
|
13310
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13311
|
+
|
|
13312
|
+
if (elemTag !== tag) {
|
|
13313
|
+
elem.setAttribute(tag, true);
|
|
13314
|
+
}
|
|
13315
|
+
}
|
|
13316
|
+
|
|
13317
|
+
/**
|
|
13318
|
+
* Validates if an element is a specific Auro component.
|
|
13319
|
+
* @param {Object} elem - The element to validate.
|
|
13320
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13321
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13322
|
+
*/
|
|
13323
|
+
elementMatch(elem, tagName) {
|
|
13324
|
+
const tag = tagName.toLowerCase();
|
|
13325
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13326
|
+
|
|
13327
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13328
|
+
}
|
|
13329
|
+
};
|
|
13330
|
+
|
|
13331
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13332
|
+
// See LICENSE in the project root for license information.
|
|
13333
|
+
|
|
13334
|
+
|
|
13335
|
+
class AuroDependencyVersioning {
|
|
13336
|
+
|
|
13337
|
+
/**
|
|
13338
|
+
* Generates a unique string to be used for child auro element naming.
|
|
13339
|
+
* @private
|
|
13340
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13341
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13342
|
+
* @returns {string} - Unique string to be used for naming.
|
|
13343
|
+
*/
|
|
13344
|
+
generateElementName(baseName, version) {
|
|
13345
|
+
let result = baseName;
|
|
13346
|
+
|
|
13347
|
+
result += '-';
|
|
13348
|
+
result += version.replace(/[.]/g, '_');
|
|
13349
|
+
|
|
13350
|
+
return result;
|
|
13351
|
+
}
|
|
13352
|
+
|
|
13353
|
+
/**
|
|
13354
|
+
* Generates a unique string to be used for child auro element naming.
|
|
13355
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13356
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13357
|
+
* @returns {string} - Unique string to be used for naming.
|
|
13358
|
+
*/
|
|
13359
|
+
generateTag(baseName, version, tagClass) {
|
|
13360
|
+
const elementName = this.generateElementName(baseName, version);
|
|
13361
|
+
const tag = i$1`${s$1(elementName)}`;
|
|
13362
|
+
|
|
13363
|
+
if (!customElements.get(elementName)) {
|
|
13364
|
+
customElements.define(elementName, class extends tagClass {});
|
|
13365
|
+
}
|
|
13366
|
+
|
|
13367
|
+
return tag;
|
|
13368
|
+
}
|
|
13369
|
+
}
|
|
13370
|
+
|
|
13371
|
+
/**
|
|
13372
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
13373
|
+
*/
|
|
13374
|
+
const _observers = new WeakMap();
|
|
13375
|
+
|
|
13376
|
+
/**
|
|
13377
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
13378
|
+
* Structure: {
|
|
13379
|
+
* host: {
|
|
13380
|
+
* matchers: Set<Function>,
|
|
13381
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
13382
|
+
* }
|
|
13383
|
+
* }
|
|
13384
|
+
*/
|
|
13385
|
+
const _transportConfig = new WeakMap();
|
|
13386
|
+
|
|
13387
|
+
/**
|
|
13388
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
13389
|
+
*
|
|
13390
|
+
* @param {Object} params - The parameters for the function.
|
|
13391
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
13392
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13393
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
13394
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
13395
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
13396
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
13397
|
+
*/
|
|
13398
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
13399
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
13400
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
13401
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
13402
|
+
}
|
|
13403
|
+
|
|
13404
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
13405
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
13406
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
13407
|
+
}
|
|
13408
|
+
|
|
13409
|
+
// Guard Clause: Ensure match is a function
|
|
13410
|
+
if (typeof match !== 'function') {
|
|
13411
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
13412
|
+
}
|
|
13413
|
+
|
|
13414
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
13415
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
13416
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
13417
|
+
}
|
|
13418
|
+
|
|
13419
|
+
// Register this transport and get cleanup function
|
|
13420
|
+
return _registerTransport({
|
|
13421
|
+
host,
|
|
13422
|
+
target,
|
|
13423
|
+
matcher: match,
|
|
13424
|
+
removeOriginal
|
|
13425
|
+
});
|
|
13426
|
+
};
|
|
13427
|
+
|
|
13428
|
+
/**
|
|
13429
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
13430
|
+
*
|
|
13431
|
+
* @param {Object} params - The parameters object.
|
|
13432
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
13433
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
13434
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
13435
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
13436
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
13437
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
13438
|
+
* @private
|
|
13439
|
+
*/
|
|
13440
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13441
|
+
// Initialize config for this host if it doesn't exist
|
|
13442
|
+
if (!_transportConfig.has(host)) {
|
|
13443
|
+
_transportConfig.set(host, {
|
|
13444
|
+
matchers: new Set(),
|
|
13445
|
+
targets: new Map()
|
|
13446
|
+
});
|
|
13447
|
+
}
|
|
13448
|
+
|
|
13449
|
+
const config = _transportConfig.get(host);
|
|
13450
|
+
|
|
13451
|
+
// Add the matcher to the set of matchers for this host
|
|
13452
|
+
config.matchers.add(matcher);
|
|
13453
|
+
|
|
13454
|
+
// Initialize target entry if it doesn't exist
|
|
13455
|
+
if (!config.targets.has(target)) {
|
|
13456
|
+
config.targets.set(target, new Map());
|
|
13457
|
+
}
|
|
13458
|
+
|
|
13459
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
13460
|
+
config.targets.get(target).set(matcher, {
|
|
13461
|
+
removeOriginal,
|
|
13462
|
+
currentAttributes: new Map()
|
|
13463
|
+
});
|
|
13464
|
+
|
|
13465
|
+
// Perform initial attribute transport
|
|
13466
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
13467
|
+
|
|
13468
|
+
// Attach observer
|
|
13469
|
+
_attachObserver(host);
|
|
13470
|
+
|
|
13471
|
+
// Return cleanup function and utility functions
|
|
13472
|
+
return {
|
|
13473
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
13474
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
13475
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
13476
|
+
}
|
|
13477
|
+
};
|
|
13478
|
+
|
|
13479
|
+
/**
|
|
13480
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
13481
|
+
*
|
|
13482
|
+
* @param {HTMLElement} host - The host element
|
|
13483
|
+
* @param {HTMLElement} target - The target element
|
|
13484
|
+
* @param {Function} matcher - The matcher function
|
|
13485
|
+
* @private
|
|
13486
|
+
*/
|
|
13487
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
13488
|
+
const config = _transportConfig.get(host);
|
|
13489
|
+
if (!config) return;
|
|
13490
|
+
|
|
13491
|
+
// Remove this matcher from this target
|
|
13492
|
+
const targetMatchers = config.targets.get(target);
|
|
13493
|
+
if (targetMatchers) {
|
|
13494
|
+
targetMatchers.delete(matcher);
|
|
13495
|
+
|
|
13496
|
+
// If this target has no more matchers, remove it
|
|
13497
|
+
if (targetMatchers.size === 0) {
|
|
13498
|
+
config.targets.delete(target);
|
|
13499
|
+
}
|
|
13500
|
+
}
|
|
13501
|
+
|
|
13502
|
+
// Check if this matcher is still used by any target
|
|
13503
|
+
let matcherStillUsed = false;
|
|
13504
|
+
for (const matcherMap of config.targets.values()) {
|
|
13505
|
+
if (matcherMap.has(matcher)) {
|
|
13506
|
+
matcherStillUsed = true;
|
|
13507
|
+
break;
|
|
13508
|
+
}
|
|
13509
|
+
}
|
|
13510
|
+
|
|
13511
|
+
// If not used anymore, remove from matchers set
|
|
13512
|
+
if (!matcherStillUsed) {
|
|
13513
|
+
config.matchers.delete(matcher);
|
|
13514
|
+
}
|
|
13515
|
+
|
|
13516
|
+
// If no more targets or matchers, detach observer
|
|
13517
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
13518
|
+
_detachObserver(host);
|
|
13519
|
+
}
|
|
13520
|
+
};
|
|
13521
|
+
|
|
13522
|
+
/**
|
|
13523
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
13524
|
+
*
|
|
13525
|
+
* @param {Object} params - The parameters object.
|
|
13526
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
13527
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13528
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
13529
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
13530
|
+
* @returns {void}
|
|
13531
|
+
* @private
|
|
13532
|
+
*/
|
|
13533
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13534
|
+
// Get a list of all matching attributes on the host element and their values
|
|
13535
|
+
const matchingAttributes = host.getAttributeNames()
|
|
13536
|
+
.filter(attr => matcher(attr))
|
|
13537
|
+
.reduce((acc, attr) => {
|
|
13538
|
+
acc[attr] = host.getAttribute(attr);
|
|
13539
|
+
return acc;
|
|
13540
|
+
}, {});
|
|
13541
|
+
|
|
13542
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
13543
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
13544
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
13545
|
+
target.setAttribute(key, value);
|
|
13546
|
+
if (removeOriginal) {
|
|
13547
|
+
host.removeAttribute(key);
|
|
13548
|
+
}
|
|
13549
|
+
});
|
|
13550
|
+
};
|
|
13551
|
+
|
|
13552
|
+
/**
|
|
13553
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
13554
|
+
*
|
|
13555
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
13556
|
+
* @returns {MutationObserver} The observer instance.
|
|
13557
|
+
* @private
|
|
13558
|
+
*/
|
|
13559
|
+
const _attachObserver = (host) => {
|
|
13560
|
+
// If an observer for this host already exists, return it
|
|
13561
|
+
if (_observers.has(host)) {
|
|
13562
|
+
return _observers.get(host);
|
|
13563
|
+
}
|
|
13564
|
+
|
|
13565
|
+
// Create a new MutationObserver
|
|
13566
|
+
const observer = new MutationObserver((mutations) => {
|
|
13567
|
+
const config = _transportConfig.get(host);
|
|
13568
|
+
if (!config) return;
|
|
13569
|
+
|
|
13570
|
+
// For each mutation affecting attributes
|
|
13571
|
+
mutations
|
|
13572
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
13573
|
+
.forEach(mutation => {
|
|
13574
|
+
const attributeName = mutation.attributeName;
|
|
13575
|
+
|
|
13576
|
+
// Find matchers that care about this attribute
|
|
13577
|
+
for (const matcher of config.matchers) {
|
|
13578
|
+
if (matcher(attributeName)) {
|
|
13579
|
+
// For each target that uses this matcher
|
|
13580
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
13581
|
+
if (matcherConfigs.has(matcher)) {
|
|
13582
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
13583
|
+
_transportAttributes({
|
|
13584
|
+
host,
|
|
13585
|
+
target,
|
|
13586
|
+
matcher,
|
|
13587
|
+
removeOriginal
|
|
13588
|
+
});
|
|
13589
|
+
}
|
|
13590
|
+
}
|
|
13591
|
+
}
|
|
13592
|
+
}
|
|
13593
|
+
});
|
|
13594
|
+
});
|
|
13595
|
+
|
|
13596
|
+
// Start observing attribute changes
|
|
13597
|
+
observer.observe(host, { attributes: true });
|
|
13598
|
+
|
|
13599
|
+
// Store the observer
|
|
13600
|
+
_observers.set(host, observer);
|
|
13601
|
+
|
|
13602
|
+
return observer;
|
|
13603
|
+
};
|
|
13604
|
+
|
|
13605
|
+
/**
|
|
13606
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
13607
|
+
*
|
|
13608
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
13609
|
+
* @private
|
|
13610
|
+
*/
|
|
13611
|
+
const _detachObserver = (host) => {
|
|
13612
|
+
if (_observers.has(host)) {
|
|
13613
|
+
const observer = _observers.get(host);
|
|
13614
|
+
observer.disconnect();
|
|
13615
|
+
_observers.delete(host);
|
|
13616
|
+
}
|
|
13617
|
+
|
|
13618
|
+
// Clean up the transport config as well
|
|
13619
|
+
if (_transportConfig.has(host)) {
|
|
13620
|
+
_transportConfig.delete(host);
|
|
13621
|
+
}
|
|
13622
|
+
};
|
|
13623
|
+
|
|
13624
|
+
/**
|
|
13625
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
13626
|
+
* @param {HTMLElement} host - The host element
|
|
13627
|
+
* @param {HTMLElement} target - The target element
|
|
13628
|
+
* @param {Function} matcher - The matcher function
|
|
13629
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
13630
|
+
* @private
|
|
13631
|
+
*/
|
|
13632
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
13633
|
+
const config = _transportConfig.get(host);
|
|
13634
|
+
if (!config) return undefined;
|
|
13635
|
+
|
|
13636
|
+
const targetMatchers = config.targets.get(target);
|
|
13637
|
+
if (!targetMatchers) return undefined;
|
|
13638
|
+
|
|
13639
|
+
return targetMatchers.get(matcher);
|
|
13640
|
+
};
|
|
13641
|
+
|
|
13642
|
+
/**
|
|
13643
|
+
* Sets an observed attribute value
|
|
13644
|
+
* @param {HTMLElement} host - The host element
|
|
13645
|
+
* @param {HTMLElement} target - The target element
|
|
13646
|
+
* @param {Function} matcher - The matcher function
|
|
13647
|
+
* @param {string} key - The attribute name
|
|
13648
|
+
* @param {string} value - The attribute value
|
|
13649
|
+
* @private
|
|
13650
|
+
*/
|
|
13651
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
13652
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13653
|
+
if (matcherConfig) {
|
|
13654
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
13655
|
+
}
|
|
13656
|
+
};
|
|
13657
|
+
|
|
13658
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
13659
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13660
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
13661
|
+
return undefined;
|
|
13662
|
+
};
|
|
13663
|
+
|
|
13664
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
13665
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13666
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
13667
|
+
return [];
|
|
13668
|
+
};
|
|
13669
|
+
|
|
13670
|
+
const _matchers = {
|
|
13671
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
13672
|
+
'role': attr => attr.match(/^role$/)
|
|
13673
|
+
};
|
|
13674
|
+
|
|
13675
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
13676
|
+
return transportAttributes({
|
|
13677
|
+
host,
|
|
13678
|
+
target,
|
|
13679
|
+
match: attr => {
|
|
13680
|
+
for (const key in _matchers) {
|
|
13681
|
+
if (_matchers[key](attr)) return true;
|
|
13682
|
+
}
|
|
13683
|
+
return false;
|
|
13684
|
+
},
|
|
13685
|
+
removeOriginal
|
|
13686
|
+
});
|
|
13687
|
+
};
|
|
13688
|
+
|
|
13689
|
+
let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
13690
|
+
|
|
13691
|
+
/**
|
|
13692
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
13693
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
13694
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
13695
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
13696
|
+
* @private
|
|
13697
|
+
*/
|
|
13698
|
+
attributeWatcher;
|
|
13699
|
+
|
|
13700
|
+
static get properties() {
|
|
13701
|
+
return {
|
|
13702
|
+
|
|
13703
|
+
/**
|
|
13704
|
+
* Defines the layout of an element.
|
|
13705
|
+
* @default {'default'}
|
|
13706
|
+
*/
|
|
13707
|
+
layout: {
|
|
13708
|
+
type: String,
|
|
13709
|
+
attribute: "layout",
|
|
13710
|
+
reflect: true
|
|
13711
|
+
},
|
|
13712
|
+
|
|
13713
|
+
/**
|
|
13714
|
+
* Defines the shape of an element.
|
|
13715
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
13716
|
+
* @default {'default'}
|
|
13717
|
+
*/
|
|
13718
|
+
shape: {
|
|
13719
|
+
type: String,
|
|
13720
|
+
attribute: "shape",
|
|
13721
|
+
reflect: true
|
|
13722
|
+
},
|
|
13723
|
+
|
|
13724
|
+
/**
|
|
13725
|
+
* Defines the size of an element.
|
|
13726
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
13727
|
+
* @default {'md'}
|
|
13728
|
+
*/
|
|
13729
|
+
size: {
|
|
13730
|
+
type: String,
|
|
13731
|
+
attribute: "size",
|
|
13732
|
+
reflect: true
|
|
13733
|
+
},
|
|
13734
|
+
|
|
13735
|
+
/**
|
|
13736
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
13737
|
+
* @default {false}
|
|
13738
|
+
*/
|
|
13739
|
+
onDark: {
|
|
13740
|
+
type: Boolean,
|
|
13741
|
+
attribute: "ondark",
|
|
13742
|
+
reflect: true
|
|
13743
|
+
},
|
|
13744
|
+
|
|
13745
|
+
/**
|
|
13746
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
13747
|
+
* This is used to apply layout and shape classes dynamically.
|
|
13748
|
+
* @type {HTMLElement|null}
|
|
13749
|
+
* @default {null}
|
|
13750
|
+
* @private
|
|
13751
|
+
*/
|
|
13752
|
+
wrapper: {
|
|
13753
|
+
type: HTMLElement,
|
|
13754
|
+
attribute: false,
|
|
13755
|
+
reflect: false
|
|
13756
|
+
}
|
|
13757
|
+
};
|
|
13758
|
+
}
|
|
13759
|
+
|
|
13760
|
+
|
|
13761
|
+
|
|
13762
|
+
resetShapeClasses() {
|
|
13763
|
+
if (this.shape && this.size) {
|
|
13764
|
+
|
|
13765
|
+
if (this.wrapper) {
|
|
13766
|
+
this.wrapper.classList.forEach((className) => {
|
|
13767
|
+
if (className.startsWith('shape-')) {
|
|
13768
|
+
this.wrapper.classList.remove(className);
|
|
13769
|
+
}
|
|
13770
|
+
});
|
|
13771
|
+
|
|
13772
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
13773
|
+
}
|
|
13774
|
+
}
|
|
13775
|
+
}
|
|
13776
|
+
|
|
13777
|
+
resetLayoutClasses() {
|
|
13778
|
+
if (this.layout) {
|
|
13779
|
+
if (this.wrapper) {
|
|
13780
|
+
this.wrapper.classList.forEach((className) => {
|
|
13781
|
+
if (className.startsWith('layout-')) {
|
|
13782
|
+
this.wrapper.classList.remove(className);
|
|
13783
|
+
}
|
|
13784
|
+
});
|
|
13785
|
+
|
|
13786
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
13787
|
+
}
|
|
13788
|
+
}
|
|
13789
|
+
}
|
|
13790
|
+
|
|
13791
|
+
updateComponentArchitecture() {
|
|
13792
|
+
this.resetLayoutClasses();
|
|
13793
|
+
this.resetShapeClasses();
|
|
13794
|
+
}
|
|
13795
|
+
|
|
13796
|
+
updated(changedProperties) {
|
|
13797
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
13798
|
+
this.updateComponentArchitecture();
|
|
13799
|
+
}
|
|
13800
|
+
}
|
|
13801
|
+
|
|
13802
|
+
firstUpdated() {
|
|
13803
|
+
super.firstUpdated();
|
|
13804
|
+
|
|
13805
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
13806
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13807
|
+
|
|
13808
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
13809
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
13810
|
+
}
|
|
13811
|
+
|
|
13812
|
+
disconnectedCallback() {
|
|
13813
|
+
super.disconnectedCallback();
|
|
13814
|
+
|
|
13815
|
+
// Cleanup the ARIA observer if it exists
|
|
13816
|
+
if (this.attributeWatcher) {
|
|
13817
|
+
this.attributeWatcher.cleanup();
|
|
13818
|
+
this.attributeWatcher = null;
|
|
13819
|
+
}
|
|
13820
|
+
}
|
|
13821
|
+
|
|
13822
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
13823
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
13824
|
+
render() {
|
|
13825
|
+
try {
|
|
13826
|
+
return this.renderLayout();
|
|
13827
|
+
} catch (error) {
|
|
13828
|
+
// failed to get the defined layout
|
|
13829
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
13830
|
+
|
|
13831
|
+
// fallback to the default layout
|
|
13832
|
+
return this.getLayout('default');
|
|
13833
|
+
}
|
|
13834
|
+
}
|
|
13835
|
+
};
|
|
13836
|
+
|
|
13837
|
+
var styleCss$3$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
13838
|
+
|
|
13839
|
+
var colorCss$2$1 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
13840
|
+
|
|
13841
|
+
var tokensCss$2$1 = i$5`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
13842
|
+
|
|
13843
|
+
var shapeSize = i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
13844
|
+
|
|
13845
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13846
|
+
// See LICENSE in the project root for license information.
|
|
13847
|
+
|
|
13848
|
+
// ---------------------------------------------------------------------
|
|
13849
|
+
|
|
13850
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13851
|
+
|
|
13852
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13853
|
+
|
|
13854
|
+
/* eslint-disable jsdoc/require-param */
|
|
13855
|
+
|
|
13856
|
+
/**
|
|
13857
|
+
* This will register a new custom element with the browser.
|
|
13858
|
+
* @param {String} name - The name of the custom element.
|
|
13859
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13860
|
+
* @returns {void}
|
|
13861
|
+
*/
|
|
13862
|
+
registerComponent(name, componentClass) {
|
|
13863
|
+
if (!customElements.get(name)) {
|
|
13864
|
+
customElements.define(name, class extends componentClass {});
|
|
13865
|
+
}
|
|
13866
|
+
}
|
|
13867
|
+
|
|
13868
|
+
/**
|
|
13869
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13870
|
+
* @returns {void}
|
|
13871
|
+
*/
|
|
13872
|
+
closestElement(
|
|
13873
|
+
selector, // selector like in .closest()
|
|
13874
|
+
base = this, // extra functionality to skip a parent
|
|
13875
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13876
|
+
!el || el === document || el === window
|
|
13877
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13878
|
+
: found
|
|
13879
|
+
? found // found a selector INside this element
|
|
13880
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13881
|
+
) {
|
|
13882
|
+
return __Closest(base);
|
|
13883
|
+
}
|
|
13884
|
+
/* eslint-enable jsdoc/require-param */
|
|
13885
|
+
|
|
13886
|
+
/**
|
|
13887
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
13888
|
+
* @param {Object} elem - The element to check.
|
|
13889
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13890
|
+
* @returns {void}
|
|
13891
|
+
*/
|
|
13892
|
+
handleComponentTagRename(elem, tagName) {
|
|
13893
|
+
const tag = tagName.toLowerCase();
|
|
13894
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13895
|
+
|
|
13896
|
+
if (elemTag !== tag) {
|
|
13897
|
+
elem.setAttribute(tag, true);
|
|
13898
|
+
}
|
|
13899
|
+
}
|
|
13900
|
+
|
|
13901
|
+
/**
|
|
13902
|
+
* Validates if an element is a specific Auro component.
|
|
13903
|
+
* @param {Object} elem - The element to validate.
|
|
13904
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13905
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13906
|
+
*/
|
|
13907
|
+
elementMatch(elem, tagName) {
|
|
13908
|
+
const tag = tagName.toLowerCase();
|
|
13909
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13910
|
+
|
|
13911
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13912
|
+
}
|
|
13913
|
+
};
|
|
13914
|
+
|
|
13915
|
+
var styleCss$2$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
13916
|
+
|
|
13917
|
+
var colorCss$1$1 = i$5`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
13918
|
+
|
|
13919
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
13920
|
+
|
|
13921
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13922
|
+
// See LICENSE in the project root for license information.
|
|
13923
|
+
|
|
13924
|
+
|
|
13925
|
+
class AuroLoader extends i$2 {
|
|
13926
|
+
constructor() {
|
|
13927
|
+
super();
|
|
13928
|
+
|
|
13929
|
+
/**
|
|
13930
|
+
* @private
|
|
13931
|
+
*/
|
|
13932
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
13933
|
+
|
|
13934
|
+
/**
|
|
13935
|
+
* @private
|
|
13936
|
+
*/
|
|
13937
|
+
this.mdCount = 3;
|
|
13938
|
+
|
|
13939
|
+
/**
|
|
13940
|
+
* @private
|
|
13941
|
+
*/
|
|
13942
|
+
this.smCount = 2;
|
|
13943
|
+
|
|
13944
|
+
/**
|
|
13945
|
+
* @private
|
|
13946
|
+
*/
|
|
13947
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
13948
|
+
|
|
13949
|
+
this.orbit = false;
|
|
13950
|
+
this.ringworm = false;
|
|
13951
|
+
this.laser = false;
|
|
13952
|
+
this.pulse = false;
|
|
13953
|
+
}
|
|
13954
|
+
|
|
13955
|
+
// function to define props used within the scope of this component
|
|
13956
|
+
static get properties() {
|
|
13957
|
+
return {
|
|
13958
|
+
|
|
13959
|
+
/**
|
|
13960
|
+
* Sets loader to laser type.
|
|
13961
|
+
*/
|
|
13962
|
+
laser: {
|
|
13963
|
+
type: Boolean,
|
|
13964
|
+
reflect: true
|
|
13965
|
+
},
|
|
13966
|
+
|
|
13967
|
+
/**
|
|
13968
|
+
* Sets loader to orbit type.
|
|
13969
|
+
*/
|
|
13970
|
+
orbit: {
|
|
13971
|
+
type: Boolean,
|
|
13972
|
+
reflect: true
|
|
13973
|
+
},
|
|
13974
|
+
|
|
13975
|
+
/**
|
|
13976
|
+
* Sets loader to pulse type.
|
|
13977
|
+
*/
|
|
13978
|
+
pulse: {
|
|
13979
|
+
type: Boolean,
|
|
13980
|
+
reflect: true
|
|
13981
|
+
},
|
|
13982
|
+
|
|
13983
|
+
/**
|
|
13984
|
+
* Sets loader to ringworm type.
|
|
13985
|
+
*/
|
|
13986
|
+
ringworm: {
|
|
13987
|
+
type: Boolean,
|
|
13988
|
+
reflect: true
|
|
13989
|
+
}
|
|
13990
|
+
};
|
|
13991
|
+
}
|
|
13992
|
+
|
|
13993
|
+
static get styles() {
|
|
13994
|
+
return [
|
|
13995
|
+
i$5`${styleCss$2$1}`,
|
|
13996
|
+
i$5`${colorCss$1$1}`,
|
|
13997
|
+
i$5`${tokensCss$1$1}`
|
|
13998
|
+
];
|
|
13999
|
+
}
|
|
14000
|
+
|
|
14001
|
+
/**
|
|
14002
|
+
* This will register this element with the browser.
|
|
14003
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
14004
|
+
*
|
|
14005
|
+
* @example
|
|
14006
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
14007
|
+
*
|
|
14008
|
+
*/
|
|
14009
|
+
static register(name = "auro-loader") {
|
|
14010
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
14011
|
+
}
|
|
14012
|
+
|
|
14013
|
+
firstUpdated() {
|
|
14014
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
14015
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
14016
|
+
}
|
|
14017
|
+
|
|
14018
|
+
connectedCallback() {
|
|
14019
|
+
super.connectedCallback();
|
|
14020
|
+
}
|
|
14021
|
+
|
|
14022
|
+
/**
|
|
14023
|
+
* @private
|
|
14024
|
+
* @returns {Array} Numbered array for template map.
|
|
14025
|
+
*/
|
|
14026
|
+
defineTemplate() {
|
|
14027
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
14028
|
+
|
|
14029
|
+
if (this.orbit || this.laser) {
|
|
14030
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
14031
|
+
} else if (this.ringworm) {
|
|
14032
|
+
nodes = Array.from(Array(0).keys());
|
|
14033
|
+
}
|
|
14034
|
+
|
|
14035
|
+
return nodes;
|
|
14036
|
+
}
|
|
14037
|
+
|
|
14038
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
14039
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
14040
|
+
|
|
14041
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
14042
|
+
render() {
|
|
14043
|
+
return x`
|
|
14044
|
+
${this.defineTemplate().map((idx) => x`
|
|
14045
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
14046
|
+
`)}
|
|
14047
|
+
|
|
14048
|
+
<div class="no-animation">Loading...</div>
|
|
14049
|
+
|
|
14050
|
+
${this.ringworm ? x`
|
|
14051
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
14052
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
14053
|
+
</svg>`
|
|
14054
|
+
: ``
|
|
14055
|
+
}
|
|
14056
|
+
`;
|
|
14057
|
+
}
|
|
14058
|
+
}
|
|
14059
|
+
|
|
14060
|
+
var loaderVersion = '5.0.0';
|
|
14061
|
+
|
|
14062
|
+
/* eslint-disable max-lines, curly */
|
|
14063
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
14064
|
+
// See LICENSE in the project root for license information.
|
|
14065
|
+
|
|
14066
|
+
|
|
14067
|
+
/**
|
|
14068
|
+
* @slot - Default slot for the text of the button.
|
|
14069
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
14070
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
14071
|
+
* @csspart text - Apply CSS to text slot.
|
|
14072
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
14073
|
+
*/
|
|
14074
|
+
|
|
14075
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
14076
|
+
|
|
14077
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
14078
|
+
|
|
14079
|
+
/**
|
|
14080
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
14081
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
14082
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
14083
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
14084
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
14085
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
14086
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
14087
|
+
*/
|
|
14088
|
+
class AuroButton extends AuroElement$1$1 {
|
|
14089
|
+
|
|
14090
|
+
/**
|
|
14091
|
+
* Enables form association for this element.
|
|
14092
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
14093
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
14094
|
+
*/
|
|
14095
|
+
static get formAssociated() {
|
|
14096
|
+
return true;
|
|
14097
|
+
}
|
|
14098
|
+
|
|
14099
|
+
constructor() {
|
|
14100
|
+
super();
|
|
14101
|
+
this.autofocus = false;
|
|
14102
|
+
this.disabled = false;
|
|
14103
|
+
this.loading = false;
|
|
14104
|
+
this.size = "md";
|
|
14105
|
+
this.shape = "rounded";
|
|
14106
|
+
this.onDark = false;
|
|
14107
|
+
this.fluid = false;
|
|
14108
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
14109
|
+
|
|
14110
|
+
// Support for HTML5 forms
|
|
14111
|
+
if (typeof this.attachInternals === 'function') {
|
|
14112
|
+
this.internals = this.attachInternals();
|
|
14113
|
+
} else {
|
|
14114
|
+
this.internals = null;
|
|
14115
|
+
|
|
14116
|
+
// eslint-disable-next-line no-console
|
|
14117
|
+
console.warn('This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually.');
|
|
14118
|
+
}
|
|
14119
|
+
|
|
14120
|
+
/**
|
|
14121
|
+
* Generate unique names for dependency components.
|
|
14122
|
+
*/
|
|
14123
|
+
const versioning = new AuroDependencyVersioning();
|
|
14124
|
+
|
|
14125
|
+
/**
|
|
14126
|
+
* @private
|
|
14127
|
+
*/
|
|
14128
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
14129
|
+
}
|
|
14130
|
+
|
|
14131
|
+
static get styles() {
|
|
14132
|
+
return [
|
|
14133
|
+
tokensCss$2$1,
|
|
14134
|
+
styleCss$3$1,
|
|
14135
|
+
colorCss$2$1,
|
|
14136
|
+
shapeSize
|
|
14137
|
+
];
|
|
14138
|
+
}
|
|
14139
|
+
|
|
14140
|
+
static get properties() {
|
|
14141
|
+
return {
|
|
14142
|
+
|
|
14143
|
+
...super.properties,
|
|
14144
|
+
|
|
14145
|
+
/**
|
|
14146
|
+
* Override layout since it isn't used in this component.
|
|
14147
|
+
* @private
|
|
14148
|
+
*/
|
|
14149
|
+
layout: {
|
|
14150
|
+
type: Boolean,
|
|
14151
|
+
attribute: false,
|
|
14152
|
+
reflect: false
|
|
14153
|
+
},
|
|
14154
|
+
|
|
14155
|
+
/**
|
|
14156
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
14157
|
+
*/
|
|
14158
|
+
autofocus: {
|
|
14159
|
+
type: Boolean,
|
|
14160
|
+
reflect: true
|
|
14161
|
+
},
|
|
14162
|
+
|
|
14163
|
+
/**
|
|
14164
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
14165
|
+
*/
|
|
14166
|
+
disabled: {
|
|
14167
|
+
type: Boolean,
|
|
14168
|
+
reflect: true
|
|
14169
|
+
},
|
|
14170
|
+
|
|
14171
|
+
/**
|
|
14172
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
14173
|
+
*/
|
|
14174
|
+
fluid: {
|
|
14175
|
+
type: Boolean,
|
|
14176
|
+
reflect: true
|
|
14177
|
+
},
|
|
14178
|
+
|
|
14179
|
+
/**
|
|
14180
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
14181
|
+
*/
|
|
14182
|
+
loading: {
|
|
14183
|
+
type: Boolean,
|
|
14184
|
+
reflect: true
|
|
14185
|
+
},
|
|
14186
|
+
|
|
14187
|
+
/**
|
|
14188
|
+
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
14189
|
+
*/
|
|
14190
|
+
loadingText: {
|
|
14191
|
+
type: String
|
|
14192
|
+
},
|
|
14193
|
+
|
|
14194
|
+
/**
|
|
14195
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
14196
|
+
*/
|
|
14197
|
+
tIndex: {
|
|
14198
|
+
type: String,
|
|
14199
|
+
reflect: true
|
|
14200
|
+
},
|
|
14201
|
+
|
|
14202
|
+
/**
|
|
14203
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
14204
|
+
*/
|
|
14205
|
+
title: {
|
|
14206
|
+
type: String,
|
|
14207
|
+
reflect: true
|
|
14208
|
+
},
|
|
14209
|
+
|
|
14210
|
+
/**
|
|
14211
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
14212
|
+
*/
|
|
14213
|
+
type: {
|
|
14214
|
+
type: String,
|
|
14215
|
+
reflect: true
|
|
14216
|
+
},
|
|
14217
|
+
|
|
14218
|
+
/**
|
|
14219
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
14220
|
+
*/
|
|
14221
|
+
value: {
|
|
14222
|
+
type: String,
|
|
14223
|
+
reflect: true
|
|
14224
|
+
},
|
|
14225
|
+
|
|
14226
|
+
/**
|
|
14227
|
+
* Sets button variant option.
|
|
14228
|
+
* @default primary
|
|
14229
|
+
*/
|
|
14230
|
+
variant: {
|
|
14231
|
+
type: String,
|
|
14232
|
+
reflect: true
|
|
14233
|
+
},
|
|
14234
|
+
};
|
|
14235
|
+
}
|
|
14236
|
+
|
|
14237
|
+
/**
|
|
14238
|
+
* This will register this element with the browser.
|
|
14239
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
14240
|
+
*
|
|
14241
|
+
* @example
|
|
14242
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
14243
|
+
*
|
|
12945
14244
|
*/
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
customElements.define(name, class extends componentClass {});
|
|
12949
|
-
}
|
|
14245
|
+
static register(name = "auro-button") {
|
|
14246
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
12950
14247
|
}
|
|
12951
14248
|
|
|
12952
14249
|
/**
|
|
12953
|
-
*
|
|
14250
|
+
* Internal method to apply focus to the HTML5 button.
|
|
14251
|
+
* @private
|
|
12954
14252
|
* @returns {void}
|
|
12955
14253
|
*/
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
base = this, // extra functionality to skip a parent
|
|
12959
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
12960
|
-
!el || el === document || el === window
|
|
12961
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
12962
|
-
: found
|
|
12963
|
-
? found // found a selector INside this element
|
|
12964
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
12965
|
-
) {
|
|
12966
|
-
return __Closest(base);
|
|
14254
|
+
focus() {
|
|
14255
|
+
this.renderRoot.querySelector('button').focus();
|
|
12967
14256
|
}
|
|
12968
|
-
/* eslint-enable jsdoc/require-param */
|
|
12969
14257
|
|
|
12970
14258
|
/**
|
|
12971
|
-
*
|
|
12972
|
-
* @
|
|
12973
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
14259
|
+
* Submits the form that this button is associated with.
|
|
14260
|
+
* @private
|
|
12974
14261
|
* @returns {void}
|
|
12975
14262
|
*/
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
if (elemTag !== tag) {
|
|
12981
|
-
elem.setAttribute(tag, true);
|
|
14263
|
+
surfaceSubmitEvent() {
|
|
14264
|
+
if (this.form) {
|
|
14265
|
+
this.form.requestSubmit();
|
|
12982
14266
|
}
|
|
12983
14267
|
}
|
|
12984
14268
|
|
|
12985
14269
|
/**
|
|
12986
|
-
*
|
|
12987
|
-
* @
|
|
12988
|
-
* @
|
|
12989
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
14270
|
+
* Returns the form element that this button is associated with.
|
|
14271
|
+
* @private
|
|
14272
|
+
* @returns {HTMLFormElement | null}
|
|
12990
14273
|
*/
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
12994
|
-
|
|
12995
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
14274
|
+
get form() {
|
|
14275
|
+
return this.internals ? this.internals.form : null;
|
|
12996
14276
|
}
|
|
12997
|
-
};
|
|
12998
14277
|
|
|
12999
|
-
|
|
13000
|
-
|
|
14278
|
+
/**
|
|
14279
|
+
* @private
|
|
14280
|
+
* @returns {Boolean}
|
|
14281
|
+
*/
|
|
14282
|
+
get hideText() {
|
|
14283
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
14284
|
+
}
|
|
13001
14285
|
|
|
14286
|
+
/**
|
|
14287
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
14288
|
+
* @returns {string | undefined}
|
|
14289
|
+
* @private
|
|
14290
|
+
*/
|
|
14291
|
+
get currentAriaLabel() {
|
|
14292
|
+
if (!this.attributeWatcher) return undefined;
|
|
13002
14293
|
|
|
13003
|
-
|
|
14294
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
14295
|
+
return ariaLabel || undefined;
|
|
14296
|
+
}
|
|
13004
14297
|
|
|
13005
14298
|
/**
|
|
13006
|
-
*
|
|
14299
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
14300
|
+
* @returns {string | undefined}
|
|
13007
14301
|
* @private
|
|
13008
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13009
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13010
|
-
* @returns {string} - Unique string to be used for naming.
|
|
13011
14302
|
*/
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
result += '-';
|
|
13016
|
-
result += version.replace(/[.]/g, '_');
|
|
14303
|
+
get currentAriaLabelledBy() {
|
|
14304
|
+
if (!this.attributeWatcher) return undefined;
|
|
13017
14305
|
|
|
13018
|
-
|
|
14306
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
14307
|
+
return ariaLabelledBy || undefined;
|
|
13019
14308
|
}
|
|
13020
14309
|
|
|
13021
14310
|
/**
|
|
13022
|
-
*
|
|
13023
|
-
* @
|
|
13024
|
-
* @
|
|
13025
|
-
* @returns {string} - Unique string to be used for naming.
|
|
14311
|
+
* Renders the default layout for the button.
|
|
14312
|
+
* @returns {TemplateResult}
|
|
14313
|
+
* @private
|
|
13026
14314
|
*/
|
|
13027
|
-
|
|
13028
|
-
const
|
|
13029
|
-
|
|
14315
|
+
renderLayoutDefault() {
|
|
14316
|
+
const classes = {
|
|
14317
|
+
"util_insetLg--squish": true,
|
|
14318
|
+
"auro-button": true,
|
|
14319
|
+
"icon-only": this.hideText,
|
|
14320
|
+
wrapper: true,
|
|
14321
|
+
loading: this.loading,
|
|
14322
|
+
};
|
|
13030
14323
|
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
14324
|
+
return u$2`
|
|
14325
|
+
<button
|
|
14326
|
+
part="button"
|
|
14327
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
14328
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
14329
|
+
tabIndex="${o(this.tIndex)}"
|
|
14330
|
+
?autofocus="${this.autofocus}"
|
|
14331
|
+
class="${e(classes)}"
|
|
14332
|
+
?disabled="${this.disabled || this.loading}"
|
|
14333
|
+
?onDark="${this.onDark}"
|
|
14334
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
14335
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
14336
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
14337
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
14338
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
14339
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
14340
|
+
>
|
|
14341
|
+
${o(this.loading ? u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
13034
14342
|
|
|
13035
|
-
|
|
14343
|
+
<span class="contentWrapper">
|
|
14344
|
+
<span class="textSlot" part="text">
|
|
14345
|
+
<slot></slot>
|
|
14346
|
+
</span>
|
|
14347
|
+
</span>
|
|
14348
|
+
</button>
|
|
14349
|
+
`;
|
|
14350
|
+
}
|
|
14351
|
+
|
|
14352
|
+
/**
|
|
14353
|
+
* Renders the layout of the button
|
|
14354
|
+
* @returns {TemplateResult}
|
|
14355
|
+
* @private
|
|
14356
|
+
*/
|
|
14357
|
+
renderLayout() {
|
|
14358
|
+
return this.renderLayoutDefault();
|
|
13036
14359
|
}
|
|
13037
14360
|
}
|
|
13038
14361
|
|
|
14362
|
+
var buttonVersion = '11.0.0';
|
|
14363
|
+
|
|
13039
14364
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13040
14365
|
// See LICENSE in the project root for license information.
|
|
13041
14366
|
|
|
@@ -13382,8 +14707,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13382
14707
|
async firstUpdated() {
|
|
13383
14708
|
await super.firstUpdated();
|
|
13384
14709
|
|
|
13385
|
-
|
|
13386
|
-
|
|
14710
|
+
/**
|
|
14711
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
14712
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
14713
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
14714
|
+
*/
|
|
14715
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
13387
14716
|
const svgDesc = this.svg.querySelector('desc');
|
|
13388
14717
|
|
|
13389
14718
|
if (svgDesc) {
|
|
@@ -13427,7 +14756,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13427
14756
|
}
|
|
13428
14757
|
};
|
|
13429
14758
|
|
|
13430
|
-
var iconVersion$1 = '8.0.
|
|
14759
|
+
var iconVersion$1 = '8.0.4';
|
|
13431
14760
|
|
|
13432
14761
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13433
14762
|
// See LICENSE in the project root for license information.
|
|
@@ -13436,7 +14765,7 @@ var iconVersion$1 = '8.0.3';
|
|
|
13436
14765
|
|
|
13437
14766
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13438
14767
|
|
|
13439
|
-
let AuroLibraryRuntimeUtils$
|
|
14768
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
13440
14769
|
|
|
13441
14770
|
/* eslint-disable jsdoc/require-param */
|
|
13442
14771
|
|
|
@@ -13528,7 +14857,7 @@ class AuroHeader extends i$2 {
|
|
|
13528
14857
|
/**
|
|
13529
14858
|
* @private
|
|
13530
14859
|
*/
|
|
13531
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
14860
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
13532
14861
|
}
|
|
13533
14862
|
|
|
13534
14863
|
// function to define props used within the scope of this component
|
|
@@ -13558,7 +14887,7 @@ class AuroHeader extends i$2 {
|
|
|
13558
14887
|
*
|
|
13559
14888
|
*/
|
|
13560
14889
|
static register(name = "auro-header") {
|
|
13561
|
-
AuroLibraryRuntimeUtils$
|
|
14890
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
13562
14891
|
}
|
|
13563
14892
|
|
|
13564
14893
|
firstUpdated() {
|
|
@@ -13654,17 +14983,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
13654
14983
|
|
|
13655
14984
|
this.large = false;
|
|
13656
14985
|
|
|
13657
|
-
AuroLibraryRuntimeUtils$
|
|
14986
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13658
14987
|
|
|
13659
14988
|
const versioning = new AuroDependencyVersioning();
|
|
14989
|
+
|
|
14990
|
+
/**
|
|
14991
|
+
* @private
|
|
14992
|
+
*/
|
|
13660
14993
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
14994
|
+
|
|
14995
|
+
/**
|
|
14996
|
+
* @private
|
|
14997
|
+
*/
|
|
13661
14998
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
14999
|
+
|
|
15000
|
+
/**
|
|
15001
|
+
* @private
|
|
15002
|
+
*/
|
|
15003
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
13662
15004
|
}
|
|
13663
15005
|
|
|
13664
15006
|
static get styles() {
|
|
13665
15007
|
return [
|
|
13666
|
-
colorCss$
|
|
13667
|
-
styleCss$
|
|
15008
|
+
colorCss$3$1,
|
|
15009
|
+
styleCss$4$1,
|
|
13668
15010
|
tokenCss
|
|
13669
15011
|
];
|
|
13670
15012
|
}
|
|
@@ -13693,7 +15035,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13693
15035
|
*
|
|
13694
15036
|
*/
|
|
13695
15037
|
static register(name = "auro-bibtemplate") {
|
|
13696
|
-
AuroLibraryRuntimeUtils$
|
|
15038
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
13697
15039
|
}
|
|
13698
15040
|
|
|
13699
15041
|
/**
|
|
@@ -13751,9 +15093,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
13751
15093
|
<div id="bibTemplate" part="bibtemplate">
|
|
13752
15094
|
${this.isFullscreen ? u$2`
|
|
13753
15095
|
<div id="headerContainer">
|
|
13754
|
-
|
|
15096
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
13755
15097
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
13756
|
-
|
|
15098
|
+
</${this.buttonTag}>
|
|
13757
15099
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
13758
15100
|
<slot name="header"></slot>
|
|
13759
15101
|
</${this.headerTag}>
|
|
@@ -13818,18 +15160,21 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
13818
15160
|
}
|
|
13819
15161
|
|
|
13820
15162
|
resetShapeClasses() {
|
|
13821
|
-
|
|
13822
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
15163
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13823
15164
|
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
15165
|
+
if (wrapper) {
|
|
15166
|
+
wrapper.classList.forEach((className) => {
|
|
15167
|
+
if (className.startsWith('shape-')) {
|
|
15168
|
+
wrapper.classList.remove(className);
|
|
15169
|
+
}
|
|
15170
|
+
});
|
|
13830
15171
|
|
|
13831
|
-
|
|
13832
|
-
|
|
15172
|
+
}
|
|
15173
|
+
|
|
15174
|
+
if (this.shape && this.size) {
|
|
15175
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
15176
|
+
} else {
|
|
15177
|
+
wrapper.classList.add('shape-none');
|
|
13833
15178
|
}
|
|
13834
15179
|
}
|
|
13835
15180
|
|
|
@@ -14091,6 +15436,7 @@ class AuroHelpText extends i$2 {
|
|
|
14091
15436
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
14092
15437
|
* @slot label - Defines the content of the label.
|
|
14093
15438
|
* @slot helpText - Defines the content of the helpText.
|
|
15439
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts.
|
|
14094
15440
|
* @event auroCombobox-valueSet - Notifies that the component has a new value set.
|
|
14095
15441
|
* @event auroFormElement-validated - Notifies that the component value(s) have been validated.
|
|
14096
15442
|
*/
|
|
@@ -14153,7 +15499,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14153
15499
|
this.noFlip = false;
|
|
14154
15500
|
this.autoPlacement = false;
|
|
14155
15501
|
|
|
14156
|
-
const versioning = new AuroDependencyVersioning$
|
|
15502
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
14157
15503
|
|
|
14158
15504
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
14159
15505
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
@@ -14377,7 +15723,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14377
15723
|
* @type {string}
|
|
14378
15724
|
*/
|
|
14379
15725
|
value: {
|
|
14380
|
-
type:
|
|
15726
|
+
type: String
|
|
14381
15727
|
},
|
|
14382
15728
|
|
|
14383
15729
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -14582,6 +15928,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14582
15928
|
* @returns {void}
|
|
14583
15929
|
*/
|
|
14584
15930
|
configureDropdown() {
|
|
15931
|
+
this.dropdown.a11yRole = "combobox";
|
|
14585
15932
|
|
|
14586
15933
|
// Listen for the ID to be added to the dropdown so we can capture it and use it for accessibility.
|
|
14587
15934
|
this.dropdown.addEventListener('auroDropdown-idAdded', (event) => {
|
|
@@ -14593,7 +15940,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14593
15940
|
this.dropdownOpen = ev.detail.expanded;
|
|
14594
15941
|
|
|
14595
15942
|
// wait a frame in case the bib gets hide immediately after showing because there is no value
|
|
14596
|
-
setTimeout(this.
|
|
15943
|
+
setTimeout(this.setInputFocus, 0);
|
|
14597
15944
|
});
|
|
14598
15945
|
|
|
14599
15946
|
this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
|
|
@@ -14601,7 +15948,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14601
15948
|
});
|
|
14602
15949
|
|
|
14603
15950
|
// setting up bibtemplate
|
|
14604
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
15951
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
15952
|
+
this.inputInBib = this.bibtemplate.querySelector(this.inputTag._$litStatic$);
|
|
14605
15953
|
|
|
14606
15954
|
// Exposes the CSS parts from the bibtemplate for styling
|
|
14607
15955
|
this.bibtemplate.exposeCssParts();
|
|
@@ -14609,14 +15957,24 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14609
15957
|
this.hideBib = this.hideBib.bind(this);
|
|
14610
15958
|
this.bibtemplate.addEventListener('close-click', this.hideBib);
|
|
14611
15959
|
|
|
14612
|
-
this.
|
|
14613
|
-
|
|
15960
|
+
this.setInputFocus = this.setInputFocus.bind(this);
|
|
14614
15961
|
this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
|
|
14615
15962
|
// event when the strategy(bib mode) is changed between fullscreen and floating
|
|
14616
|
-
setTimeout(this.
|
|
15963
|
+
setTimeout(this.setInputFocus, 0);
|
|
14617
15964
|
});
|
|
14618
15965
|
}
|
|
14619
15966
|
|
|
15967
|
+
/**
|
|
15968
|
+
* @private
|
|
15969
|
+
*/
|
|
15970
|
+
setInputFocus() {
|
|
15971
|
+
if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
|
|
15972
|
+
this.inputInBib.focus();
|
|
15973
|
+
} else {
|
|
15974
|
+
this.input.focus();
|
|
15975
|
+
}
|
|
15976
|
+
}
|
|
15977
|
+
|
|
14620
15978
|
/**
|
|
14621
15979
|
* Binds all behavior needed to the menu after rendering.
|
|
14622
15980
|
* @private
|
|
@@ -14625,6 +15983,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14625
15983
|
configureMenu() {
|
|
14626
15984
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
14627
15985
|
|
|
15986
|
+
// set menu's default size if there it's not specified.
|
|
15987
|
+
if (!this.menu.getAttribute('size')) {
|
|
15988
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
15989
|
+
}
|
|
15990
|
+
|
|
15991
|
+
if (!this.getAttribute('shape')) {
|
|
15992
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
15993
|
+
}
|
|
15994
|
+
|
|
14628
15995
|
// a racing condition on custom-combobox with custom-menu
|
|
14629
15996
|
if (!this.menu || this.menuShadowRoot === null) {
|
|
14630
15997
|
setTimeout(() => {
|
|
@@ -14757,63 +16124,19 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14757
16124
|
}
|
|
14758
16125
|
|
|
14759
16126
|
/**
|
|
14760
|
-
*
|
|
14761
|
-
* Otherwise, it's moved back to the trigger slot.
|
|
16127
|
+
* Handle changes to the input value and trigger changes that should result.
|
|
14762
16128
|
* @private
|
|
16129
|
+
* @param {Event} event - The input event triggered by the input element.
|
|
14763
16130
|
* @returns {void}
|
|
14764
16131
|
*/
|
|
14765
|
-
|
|
14766
|
-
if (
|
|
16132
|
+
handleInputValueChange(event) {
|
|
16133
|
+
if (event.target === this.inputInBib) {
|
|
16134
|
+
this.input.value = this.inputInBib.value;
|
|
14767
16135
|
return;
|
|
14768
16136
|
}
|
|
14769
16137
|
|
|
14770
|
-
|
|
14771
|
-
const inputAlertIcon = this.input.shadowRoot.querySelector(".alertNotification");
|
|
14772
|
-
|
|
14773
|
-
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
14774
|
-
|
|
14775
|
-
if (this.input.parentNode === this.dropdown) {
|
|
14776
|
-
// keep the trigger size the same even after input gets removed
|
|
14777
|
-
const parentSize = window.getComputedStyle(this.dropdown.trigger);
|
|
14778
|
-
this.dropdown.trigger.style.height = parentSize.height;
|
|
14779
|
-
|
|
14780
|
-
// input will not have border on bib
|
|
14781
|
-
this.input.removeAttribute('bordered');
|
|
14782
|
-
this.input.setAttribute('borderless', true);
|
|
14783
|
-
this.input.setAttribute('slot', 'subheader');
|
|
14784
|
-
|
|
14785
|
-
// set display of helpText and alert icon programmatically
|
|
14786
|
-
// because ::slotted and ::part do not work together
|
|
14787
|
-
inputHelpText.style.display = 'none';
|
|
14788
|
-
if (inputAlertIcon) {
|
|
14789
|
-
inputAlertIcon.style.display = 'none';
|
|
14790
|
-
}
|
|
14791
|
-
|
|
14792
|
-
this.bibtemplate.prepend(this.input);
|
|
14793
|
-
this.input.focus();
|
|
14794
|
-
}
|
|
14795
|
-
} else if (this.input.parentNode !== this.dropdown) {
|
|
14796
|
-
this.input.setAttribute('bordered', true);
|
|
14797
|
-
this.input.removeAttribute('borderless');
|
|
14798
|
-
this.input.setAttribute('slot', 'trigger');
|
|
14799
|
-
|
|
14800
|
-
// reset display of helpText and alert icon to be visible
|
|
14801
|
-
inputHelpText.style.display = '';
|
|
14802
|
-
if (inputAlertIcon) {
|
|
14803
|
-
inputAlertIcon.style.display = '';
|
|
14804
|
-
}
|
|
14805
|
-
|
|
14806
|
-
this.dropdown.prepend(this.input);
|
|
14807
|
-
this.input.focus();
|
|
14808
|
-
}
|
|
14809
|
-
}
|
|
16138
|
+
this.inputInBib.value = this.input.value;
|
|
14810
16139
|
|
|
14811
|
-
/**
|
|
14812
|
-
* Handle changes to the input value and trigger changes that should result.
|
|
14813
|
-
* @private
|
|
14814
|
-
* @returns {void}
|
|
14815
|
-
*/
|
|
14816
|
-
handleInputValueChange() {
|
|
14817
16140
|
this.menu.matchWord = this.input.value;
|
|
14818
16141
|
this.optionActive = null;
|
|
14819
16142
|
|
|
@@ -14929,8 +16252,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14929
16252
|
// Add the tag name as an attribute if it is different than the component name
|
|
14930
16253
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-combobox');
|
|
14931
16254
|
|
|
14932
|
-
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
14933
|
-
this.input = this.dropdown.querySelector(this.inputTag._$litStatic$);
|
|
16255
|
+
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
16256
|
+
this.input = this.dropdown.querySelector(this.inputTag._$litStatic$);
|
|
14934
16257
|
|
|
14935
16258
|
this.configureMenu();
|
|
14936
16259
|
this.configureInput();
|
|
@@ -15003,6 +16326,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
15003
16326
|
this.input.setAttribute('error', this.getAttribute('error'));
|
|
15004
16327
|
this.validate();
|
|
15005
16328
|
}
|
|
16329
|
+
|
|
16330
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
16331
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
16332
|
+
}
|
|
16333
|
+
|
|
16334
|
+
if (changedProperties.has('size') && this.menu) {
|
|
16335
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
16336
|
+
}
|
|
15006
16337
|
}
|
|
15007
16338
|
|
|
15008
16339
|
/**
|
|
@@ -15047,7 +16378,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
15047
16378
|
case 'label':
|
|
15048
16379
|
// Programmatically inject as the slot cannot be carried over to bibtemplate.
|
|
15049
16380
|
// It's because the bib is/will be separated from dropdown to body.
|
|
15050
|
-
this.transportAssignedNodes(event.target, this.
|
|
16381
|
+
this.transportAssignedNodes(event.target, this.inputInBib, "label");
|
|
15051
16382
|
break;
|
|
15052
16383
|
case 'bib.fullscreen.headline':
|
|
15053
16384
|
this.transportAssignedNodes(event.target, this.bibtemplate, 'header');
|
|
@@ -15077,20 +16408,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
15077
16408
|
: undefined
|
|
15078
16409
|
}
|
|
15079
16410
|
</div>
|
|
15080
|
-
<div class="util_displayHiddenVisually" aria-hidden="true">
|
|
15081
|
-
<slot name="label" @slotchange="${this.handleSlotChange}"></slot>
|
|
15082
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
15083
|
-
</div>
|
|
15084
16411
|
<${this.dropdownTag}
|
|
16412
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
16413
|
+
.offset="${this.offset}"
|
|
16414
|
+
.placement="${this.placement}"
|
|
15085
16415
|
?autoPlacement="${this.autoPlacement}"
|
|
15086
16416
|
?disabled="${this.disabled}"
|
|
15087
16417
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
15088
16418
|
?noFlip="${this.noFlip}"
|
|
15089
16419
|
?onDark="${this.onDark}"
|
|
15090
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
15091
|
-
.offset="${this.offset}"
|
|
15092
|
-
.placement="${this.placement}"
|
|
15093
|
-
simple
|
|
15094
16420
|
disableEventShow
|
|
15095
16421
|
fluid
|
|
15096
16422
|
for="dropdownMenu"
|
|
@@ -15098,34 +16424,57 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
15098
16424
|
matchWidth="${o(this.matchWidth)}"
|
|
15099
16425
|
nocheckmark
|
|
15100
16426
|
rounded
|
|
16427
|
+
simple
|
|
15101
16428
|
shape="${this.shape}"
|
|
15102
16429
|
size="${this.size}">
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
|
|
15117
|
-
|
|
15118
|
-
|
|
15119
|
-
|
|
15120
|
-
|
|
15121
|
-
|
|
15122
|
-
|
|
15123
|
-
|
|
15124
|
-
|
|
15125
|
-
|
|
16430
|
+
<${this.inputTag}
|
|
16431
|
+
@input="${this.handleInputValueChange}"
|
|
16432
|
+
.a11yExpanded="${this.dropdownOpen}"
|
|
16433
|
+
.a11yControls="${this.dropdownId}"
|
|
16434
|
+
.autocomplete="${this.autocomplete}"
|
|
16435
|
+
.inputmode="${this.inputmode}"
|
|
16436
|
+
.placeholder="${this.placeholder}"
|
|
16437
|
+
.type="${this.type}"
|
|
16438
|
+
?disabled="${this.disabled}"
|
|
16439
|
+
?icon="${this.triggerIcon}"
|
|
16440
|
+
?noValidate="${this.noValidate}"
|
|
16441
|
+
?onDark="${this.onDark}"
|
|
16442
|
+
?required="${this.required}"
|
|
16443
|
+
a11yRole="combobox"
|
|
16444
|
+
id="${this.id}"
|
|
16445
|
+
layout="${this.layout}"
|
|
16446
|
+
setCustomValidity="${this.setCustomValidity}"
|
|
16447
|
+
setCustomValidityCustomError="${this.setCustomValidityCustomError}"
|
|
16448
|
+
setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
|
|
16449
|
+
shape="${this.shape}"
|
|
16450
|
+
size="${this.size}"
|
|
16451
|
+
slot="trigger">
|
|
16452
|
+
<slot name="label" slot="label" @slotchange="${this.handleSlotChange}"></slot>
|
|
16453
|
+
<slot name="displayValue" slot="displayValue"></slot>
|
|
16454
|
+
</${this.inputTag}>
|
|
15126
16455
|
|
|
15127
16456
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
16457
|
+
<slot name="bib.fullscreen.headline" slot="header"></slot>
|
|
15128
16458
|
<slot></slot>
|
|
16459
|
+
<${this.inputTag}
|
|
16460
|
+
@input="${this.handleInputValueChange}"
|
|
16461
|
+
.a11yControls="${this.dropdownId}"
|
|
16462
|
+
.autocomplete="${this.autocomplete}"
|
|
16463
|
+
.inputmode="${this.inputmode}"
|
|
16464
|
+
.placeholder="${this.placeholder}"
|
|
16465
|
+
.type="${this.type}"
|
|
16466
|
+
?disabled="${this.disabled}"
|
|
16467
|
+
?icon="${this.triggerIcon}"
|
|
16468
|
+
?required="${this.required}"
|
|
16469
|
+
a11yRole="combobox"
|
|
16470
|
+
a11yExpanded="true"
|
|
16471
|
+
layout="classic"
|
|
16472
|
+
noValidate="true"
|
|
16473
|
+
shape="classic"
|
|
16474
|
+
simple
|
|
16475
|
+
size="sm"
|
|
16476
|
+
slot="subheader">
|
|
16477
|
+
</${this.inputTag}>
|
|
15129
16478
|
</${this.bibtemplateTag}>
|
|
15130
16479
|
|
|
15131
16480
|
<span slot="helpText">
|
|
@@ -15152,11 +16501,11 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
15152
16501
|
}
|
|
15153
16502
|
}
|
|
15154
16503
|
|
|
15155
|
-
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:
|
|
16504
|
+
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;vertical-align:middle}:host .wrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .wrapper[class*=-lg]{padding:var(--ds-size-150, 0.75rem)}:host([root]) .wrapper[class*=-xl]{padding:var(--ds-size-200, 1rem)}`;
|
|
15156
16505
|
|
|
15157
16506
|
var colorCss$2 = i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
15158
16507
|
|
|
15159
|
-
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
16508
|
+
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
15160
16509
|
|
|
15161
16510
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15162
16511
|
// See LICENSE in the project root for license information.
|
|
@@ -15222,14 +16571,17 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
15222
16571
|
* @slot - Slot for insertion of menu options.
|
|
15223
16572
|
*/
|
|
15224
16573
|
|
|
15225
|
-
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
16574
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens, no-inline-comments, line-comment-position */
|
|
15226
16575
|
|
|
15227
|
-
class AuroMenu extends
|
|
16576
|
+
class AuroMenu extends AuroElement$1 {
|
|
15228
16577
|
constructor() {
|
|
15229
16578
|
super();
|
|
15230
16579
|
|
|
15231
16580
|
// State properties (reactive)
|
|
15232
16581
|
|
|
16582
|
+
this.shape = ""; // box, rounded, pill
|
|
16583
|
+
this.size = ""; // md, lg, xl
|
|
16584
|
+
|
|
15233
16585
|
// Value of the selected options
|
|
15234
16586
|
this.value = undefined;
|
|
15235
16587
|
// Currently selected option
|
|
@@ -15288,6 +16640,7 @@ class AuroMenu extends i$2 {
|
|
|
15288
16640
|
|
|
15289
16641
|
static get properties() {
|
|
15290
16642
|
return {
|
|
16643
|
+
...super.properties,
|
|
15291
16644
|
noCheckmark: {
|
|
15292
16645
|
type: Boolean,
|
|
15293
16646
|
reflect: true,
|
|
@@ -15321,6 +16674,16 @@ class AuroMenu extends i$2 {
|
|
|
15321
16674
|
value: {
|
|
15322
16675
|
// Allow string, string[] arrays and undefined
|
|
15323
16676
|
type: Object
|
|
16677
|
+
},
|
|
16678
|
+
|
|
16679
|
+
/**
|
|
16680
|
+
* Indent level for submenus.
|
|
16681
|
+
* @private
|
|
16682
|
+
*/
|
|
16683
|
+
level: {
|
|
16684
|
+
type: Number,
|
|
16685
|
+
reflect: false,
|
|
16686
|
+
attribute: false
|
|
15324
16687
|
}
|
|
15325
16688
|
};
|
|
15326
16689
|
}
|
|
@@ -15373,12 +16736,15 @@ class AuroMenu extends i$2 {
|
|
|
15373
16736
|
}
|
|
15374
16737
|
|
|
15375
16738
|
updated(changedProperties) {
|
|
16739
|
+
super.updated(changedProperties);
|
|
16740
|
+
|
|
15376
16741
|
if (changedProperties.has('multiSelect')) {
|
|
15377
16742
|
// Reset selection if multiSelect mode changes
|
|
15378
16743
|
this.clearSelection();
|
|
15379
16744
|
}
|
|
15380
16745
|
|
|
15381
|
-
|
|
16746
|
+
|
|
16747
|
+
if (changedProperties.has("value")) {
|
|
15382
16748
|
// Handle null/undefined case
|
|
15383
16749
|
if (this.value === undefined || this.value === null) {
|
|
15384
16750
|
this.optionSelected = undefined;
|
|
@@ -15446,6 +16812,19 @@ class AuroMenu extends i$2 {
|
|
|
15446
16812
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
15447
16813
|
}
|
|
15448
16814
|
|
|
16815
|
+
// Handle layout propagation to all menus and options
|
|
16816
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
16817
|
+
[
|
|
16818
|
+
'size',
|
|
16819
|
+
'shape'
|
|
16820
|
+
].forEach((prop) => {
|
|
16821
|
+
if (changedProperties.has(prop)) {
|
|
16822
|
+
propagationTargets.forEach((el) => {
|
|
16823
|
+
el.setAttribute(prop, this[prop]);
|
|
16824
|
+
});
|
|
16825
|
+
}
|
|
16826
|
+
});
|
|
16827
|
+
|
|
15449
16828
|
// Regex for matchWord if needed
|
|
15450
16829
|
let regexWord = null;
|
|
15451
16830
|
|
|
@@ -15642,21 +17021,20 @@ class AuroMenu extends i$2 {
|
|
|
15642
17021
|
* @param {HTMLElement} menu - Root menu element.
|
|
15643
17022
|
*/
|
|
15644
17023
|
handleNestedMenus(menu) {
|
|
15645
|
-
|
|
17024
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
15646
17025
|
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
if (!
|
|
15651
|
-
|
|
17026
|
+
if (menu.level > 0) {
|
|
17027
|
+
menu.setAttribute('role', 'group');
|
|
17028
|
+
menu.removeAttribute("root");
|
|
17029
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
17030
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
15652
17031
|
}
|
|
17032
|
+
}
|
|
15653
17033
|
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
this.handleNestedMenus(nestedMenu);
|
|
17034
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
17035
|
+
options.forEach((option) => {
|
|
17036
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
17037
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
15660
17038
|
});
|
|
15661
17039
|
}
|
|
15662
17040
|
|
|
@@ -15898,28 +17276,39 @@ class AuroMenu extends i$2 {
|
|
|
15898
17276
|
}
|
|
15899
17277
|
|
|
15900
17278
|
/**
|
|
15901
|
-
*
|
|
15902
|
-
* @
|
|
17279
|
+
* Logic to determine the layout of the component.
|
|
17280
|
+
* @protected
|
|
17281
|
+
* @returns {void}
|
|
15903
17282
|
*/
|
|
15904
|
-
|
|
17283
|
+
renderLayout() {
|
|
15905
17284
|
if (this.loading) {
|
|
15906
17285
|
return x`
|
|
15907
|
-
<
|
|
15908
|
-
<
|
|
15909
|
-
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
|
|
17286
|
+
<div class="wrapper">
|
|
17287
|
+
<auro-menuoption
|
|
17288
|
+
disabled
|
|
17289
|
+
loadingplaceholder
|
|
17290
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
17291
|
+
>
|
|
17292
|
+
<div>
|
|
17293
|
+
<slot name="loadingIcon"></slot>
|
|
17294
|
+
<slot name="loadingText"></slot>
|
|
17295
|
+
</div>
|
|
17296
|
+
</auro-menuoption>
|
|
17297
|
+
</div>
|
|
15913
17298
|
`;
|
|
15914
17299
|
}
|
|
15915
17300
|
|
|
15916
|
-
return x
|
|
17301
|
+
return x`
|
|
17302
|
+
<div class="wrapper">
|
|
17303
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
17304
|
+
</div>
|
|
17305
|
+
`;
|
|
15917
17306
|
}
|
|
15918
17307
|
}
|
|
15919
17308
|
|
|
15920
|
-
var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-
|
|
17309
|
+
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) + 24px + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);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);margin-bottom:var(--ds-size-100, 0.5rem)}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
15921
17310
|
|
|
15922
|
-
var colorCss$1 = i$5`:host{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)}`;
|
|
17311
|
+
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)}`;
|
|
15923
17312
|
|
|
15924
17313
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15925
17314
|
// See LICENSE in the project root for license information.
|
|
@@ -16267,8 +17656,12 @@ class AuroIcon extends BaseIcon {
|
|
|
16267
17656
|
async firstUpdated() {
|
|
16268
17657
|
await super.firstUpdated();
|
|
16269
17658
|
|
|
16270
|
-
|
|
16271
|
-
|
|
17659
|
+
/**
|
|
17660
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
17661
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
17662
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
17663
|
+
*/
|
|
17664
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
16272
17665
|
const svgDesc = this.svg.querySelector('desc');
|
|
16273
17666
|
|
|
16274
17667
|
if (svgDesc) {
|
|
@@ -16312,7 +17705,7 @@ class AuroIcon extends BaseIcon {
|
|
|
16312
17705
|
}
|
|
16313
17706
|
}
|
|
16314
17707
|
|
|
16315
|
-
var iconVersion = '8.0.
|
|
17708
|
+
var iconVersion = '8.0.4';
|
|
16316
17709
|
|
|
16317
17710
|
var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
16318
17711
|
|
|
@@ -16330,14 +17723,17 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
16330
17723
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
16331
17724
|
* @slot - Specifies text for an option, but is not the value.
|
|
16332
17725
|
*/
|
|
16333
|
-
class AuroMenuOption extends
|
|
17726
|
+
class AuroMenuOption extends AuroElement$1 {
|
|
16334
17727
|
constructor() {
|
|
16335
17728
|
super();
|
|
16336
17729
|
|
|
17730
|
+
this.size = ""; // md, lg, xl
|
|
17731
|
+
this.shape = ""; // box, rounded, pill
|
|
17732
|
+
|
|
16337
17733
|
/**
|
|
16338
17734
|
* Generate unique names for dependency components.
|
|
16339
17735
|
*/
|
|
16340
|
-
const versioning = new AuroDependencyVersioning$
|
|
17736
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
16341
17737
|
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
16342
17738
|
|
|
16343
17739
|
this.selected = false;
|
|
@@ -16357,6 +17753,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16357
17753
|
|
|
16358
17754
|
static get properties() {
|
|
16359
17755
|
return {
|
|
17756
|
+
...super.properties,
|
|
16360
17757
|
nocheckmark: {
|
|
16361
17758
|
type: Boolean,
|
|
16362
17759
|
reflect: true
|
|
@@ -16418,6 +17815,8 @@ class AuroMenuOption extends i$2 {
|
|
|
16418
17815
|
|
|
16419
17816
|
// observer for selected property changes
|
|
16420
17817
|
updated(changedProperties) {
|
|
17818
|
+
super.updated(changedProperties);
|
|
17819
|
+
|
|
16421
17820
|
if (changedProperties.has('selected')) {
|
|
16422
17821
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
16423
17822
|
}
|
|
@@ -16439,10 +17838,19 @@ class AuroMenuOption extends i$2 {
|
|
|
16439
17838
|
return u$2`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
|
|
16440
17839
|
}
|
|
16441
17840
|
|
|
16442
|
-
|
|
17841
|
+
/**
|
|
17842
|
+
* Logic to determine the layout of the component.
|
|
17843
|
+
* @protected
|
|
17844
|
+
* @returns {void}
|
|
17845
|
+
*/
|
|
17846
|
+
renderLayout() {
|
|
16443
17847
|
return u$2`
|
|
16444
|
-
|
|
16445
|
-
|
|
17848
|
+
<div class="wrapper">
|
|
17849
|
+
${this.selected && !this.nocheckmark
|
|
17850
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
17851
|
+
: undefined}
|
|
17852
|
+
<slot></slot>
|
|
17853
|
+
</div>
|
|
16446
17854
|
`;
|
|
16447
17855
|
}
|
|
16448
17856
|
}
|