@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.7 → 0.0.0-pr624.70
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 +1262 -81
- package/components/bibtemplate/dist/registered.js +1262 -81
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +47 -14
- package/components/checkbox/demo/api.min.js +65 -42
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +65 -42
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +65 -42
- package/components/checkbox/dist/registered.js +65 -42
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +113 -8
- package/components/combobox/demo/api.min.js +3096 -870
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +3096 -870
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/auro-combobox.d.ts +42 -8
- package/components/combobox/dist/index.js +2878 -748
- package/components/combobox/dist/registered.js +2878 -748
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +156 -21
- package/components/counter/demo/api.min.js +3363 -652
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +185 -34
- package/components/counter/demo/index.min.js +3363 -652
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +151 -11
- package/components/counter/dist/auro-counter.d.ts +16 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +3364 -653
- package/components/counter/dist/registered.js +3364 -653
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +25 -16
- package/components/datepicker/demo/api.min.js +11857 -8105
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +71 -4
- package/components/datepicker/demo/index.min.js +11857 -8105
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/auro-datepicker.d.ts +89 -11
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +8691 -4939
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +8691 -4939
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +81 -274
- package/components/dropdown/demo/api.min.js +429 -195
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +429 -195
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +41 -76
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +429 -195
- package/components/dropdown/dist/registered.js +429 -195
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +1 -1
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/index.js +2 -2
- package/components/helptext/dist/registered.js +2 -2
- package/components/input/README.md +5 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +228 -130
- package/components/input/demo/api.min.js +908 -246
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +908 -246
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +5 -2
- package/components/input/dist/auro-input.d.ts +3 -3
- package/components/input/dist/base-input.d.ts +38 -10
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +908 -246
- package/components/input/dist/registered.js +908 -246
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +32 -10
- package/components/menu/demo/api.md +69 -8
- package/components/menu/demo/api.min.js +238 -47
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +238 -47
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +41 -7
- 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 +238 -47
- package/components/menu/dist/registered.js +238 -47
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +7 -8
- package/components/radio/demo/api.min.js +88 -90
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +88 -90
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +9 -12
- package/components/radio/dist/index.js +88 -90
- package/components/radio/dist/registered.js +88 -90
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +104 -57
- package/components/select/demo/api.min.js +2148 -635
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +45 -158
- package/components/select/demo/index.min.js +2148 -623
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +49 -16
- package/components/select/dist/index.js +2078 -649
- package/components/select/dist/registered.js +2078 -649
- package/package.json +30 -27
- /package/components/{datepicker/dist/styles/emphasized/style-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/dropdown/dist/styles/{default → classic}/bibColors-css.d.ts +0 -0
- /package/components/dropdown/dist/styles/{default → classic}/bibStyles-css.d.ts +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menu-css.d.ts} +0 -0
|
@@ -39,18 +39,21 @@ let AuroElement$3 = class AuroElement extends LitElement {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
resetShapeClasses() {
|
|
42
|
-
|
|
43
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
42
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
if (wrapper) {
|
|
45
|
+
wrapper.classList.forEach((className) => {
|
|
46
|
+
if (className.startsWith('shape-')) {
|
|
47
|
+
wrapper.classList.remove(className);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (this.shape && this.size) {
|
|
54
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
55
|
+
} else {
|
|
56
|
+
wrapper.classList.add('shape-none');
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
|
|
@@ -96,9 +99,9 @@ let AuroElement$3 = class AuroElement extends LitElement {
|
|
|
96
99
|
}
|
|
97
100
|
};
|
|
98
101
|
|
|
99
|
-
var shapeSizeCss$1 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.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:
|
|
102
|
+
var shapeSizeCss$1 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
100
103
|
|
|
101
|
-
var tokensCss$
|
|
104
|
+
var tokensCss$5 = css`:host(:not([ondark])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-select-outline-color: transparent}`;
|
|
102
105
|
|
|
103
106
|
class DateFormatter {
|
|
104
107
|
|
|
@@ -516,7 +519,7 @@ const {
|
|
|
516
519
|
|
|
517
520
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
518
521
|
|
|
519
|
-
let AuroLibraryRuntimeUtils$
|
|
522
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
520
523
|
|
|
521
524
|
/* eslint-disable jsdoc/require-param */
|
|
522
525
|
|
|
@@ -586,7 +589,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
586
589
|
class AuroFormValidation {
|
|
587
590
|
|
|
588
591
|
constructor() {
|
|
589
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
592
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
590
593
|
}
|
|
591
594
|
|
|
592
595
|
/**
|
|
@@ -646,19 +649,19 @@ class AuroFormValidation {
|
|
|
646
649
|
{
|
|
647
650
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
648
651
|
validity: 'tooShort',
|
|
649
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
652
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
650
653
|
},
|
|
651
654
|
{
|
|
652
655
|
check: (e) => e.value?.length > e.maxLength,
|
|
653
656
|
validity: 'tooLong',
|
|
654
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
657
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
655
658
|
}
|
|
656
659
|
],
|
|
657
660
|
pattern: [
|
|
658
661
|
{
|
|
659
662
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
660
663
|
validity: 'patternMismatch',
|
|
661
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
664
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
662
665
|
}
|
|
663
666
|
]
|
|
664
667
|
},
|
|
@@ -805,13 +808,24 @@ class AuroFormValidation {
|
|
|
805
808
|
this.getInputElements(elem);
|
|
806
809
|
this.getAuroInputs(elem);
|
|
807
810
|
|
|
808
|
-
//
|
|
811
|
+
// Check if validation should run
|
|
809
812
|
let validationShouldRun =
|
|
813
|
+
|
|
814
|
+
// If the validation was forced
|
|
810
815
|
force ||
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
816
|
+
|
|
817
|
+
// If the validation should run on input
|
|
818
|
+
elem.validateOnInput ||
|
|
819
|
+
|
|
820
|
+
// State-based checks
|
|
821
|
+
(
|
|
822
|
+
// Element is not currently focused
|
|
823
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
824
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
825
|
+
|
|
826
|
+
// And element has been touched or is untouched but has a value
|
|
827
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
828
|
+
);
|
|
815
829
|
|
|
816
830
|
if (elem.hasAttribute('error')) {
|
|
817
831
|
elem.validity = 'customError';
|
|
@@ -853,10 +867,10 @@ class AuroFormValidation {
|
|
|
853
867
|
if (!hasValue && elem.required && elem.touched) {
|
|
854
868
|
elem.validity = 'valueMissing';
|
|
855
869
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
856
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
870
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
857
871
|
this.validateType(elem);
|
|
858
872
|
this.validateElementAttributes(elem);
|
|
859
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
873
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
860
874
|
this.validateElementAttributes(elem);
|
|
861
875
|
}
|
|
862
876
|
}
|
|
@@ -865,7 +879,9 @@ class AuroFormValidation {
|
|
|
865
879
|
elem.validity = this.auroInputElements[0].validity;
|
|
866
880
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
867
881
|
|
|
868
|
-
|
|
882
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
883
|
+
// combobox's 2nd input will have noValidate set true.
|
|
884
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
869
885
|
elem.validity = this.auroInputElements[1].validity;
|
|
870
886
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
871
887
|
}
|
|
@@ -2671,7 +2687,7 @@ class AuroFloatingUI {
|
|
|
2671
2687
|
*/
|
|
2672
2688
|
mirrorSize() {
|
|
2673
2689
|
// mirror the boxsize from bibSizer
|
|
2674
|
-
if (this.element.bibSizer) {
|
|
2690
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2675
2691
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2676
2692
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2677
2693
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2883,13 +2899,13 @@ class AuroFloatingUI {
|
|
|
2883
2899
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2884
2900
|
return;
|
|
2885
2901
|
}
|
|
2886
|
-
|
|
2902
|
+
|
|
2887
2903
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
2888
2904
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2889
2905
|
return;
|
|
2890
2906
|
}
|
|
2891
2907
|
|
|
2892
|
-
this.hideBib();
|
|
2908
|
+
this.hideBib("keydown");
|
|
2893
2909
|
}
|
|
2894
2910
|
|
|
2895
2911
|
setupHideHandlers() {
|
|
@@ -2914,7 +2930,7 @@ class AuroFloatingUI {
|
|
|
2914
2930
|
document.expandedAuroFormkitDropdown = null;
|
|
2915
2931
|
document.expandedAuroFloater = this;
|
|
2916
2932
|
} else {
|
|
2917
|
-
this.hideBib();
|
|
2933
|
+
this.hideBib("click");
|
|
2918
2934
|
}
|
|
2919
2935
|
}
|
|
2920
2936
|
};
|
|
@@ -2927,7 +2943,7 @@ class AuroFloatingUI {
|
|
|
2927
2943
|
// if something else is open, let it handle itself
|
|
2928
2944
|
return;
|
|
2929
2945
|
}
|
|
2930
|
-
this.hideBib();
|
|
2946
|
+
this.hideBib("keydown");
|
|
2931
2947
|
}
|
|
2932
2948
|
};
|
|
2933
2949
|
|
|
@@ -3010,7 +3026,11 @@ class AuroFloatingUI {
|
|
|
3010
3026
|
}
|
|
3011
3027
|
}
|
|
3012
3028
|
|
|
3013
|
-
|
|
3029
|
+
/**
|
|
3030
|
+
* Hides the floating UI element.
|
|
3031
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3032
|
+
*/
|
|
3033
|
+
hideBib(eventType = "unknown") {
|
|
3014
3034
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3015
3035
|
this.lockScroll(false);
|
|
3016
3036
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3021,7 +3041,7 @@ class AuroFloatingUI {
|
|
|
3021
3041
|
if (this.showing) {
|
|
3022
3042
|
this.cleanupHideHandlers();
|
|
3023
3043
|
this.showing = false;
|
|
3024
|
-
this.dispatchEventDropdownToggle();
|
|
3044
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3025
3045
|
}
|
|
3026
3046
|
}
|
|
3027
3047
|
document.expandedAuroFloater = null;
|
|
@@ -3030,11 +3050,13 @@ class AuroFloatingUI {
|
|
|
3030
3050
|
/**
|
|
3031
3051
|
* @private
|
|
3032
3052
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3053
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3033
3054
|
*/
|
|
3034
|
-
dispatchEventDropdownToggle() {
|
|
3055
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3035
3056
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3036
3057
|
detail: {
|
|
3037
3058
|
expanded: this.showing,
|
|
3059
|
+
eventType: eventType || "unknown",
|
|
3038
3060
|
},
|
|
3039
3061
|
composed: true
|
|
3040
3062
|
});
|
|
@@ -3044,7 +3066,7 @@ class AuroFloatingUI {
|
|
|
3044
3066
|
|
|
3045
3067
|
handleClick() {
|
|
3046
3068
|
if (this.element.isPopoverVisible) {
|
|
3047
|
-
this.hideBib();
|
|
3069
|
+
this.hideBib("click");
|
|
3048
3070
|
} else {
|
|
3049
3071
|
this.showBib();
|
|
3050
3072
|
}
|
|
@@ -3067,8 +3089,9 @@ class AuroFloatingUI {
|
|
|
3067
3089
|
// Space is included as it's expected behavior for interactive elements
|
|
3068
3090
|
|
|
3069
3091
|
const origin = event.composedPath()[0];
|
|
3070
|
-
if (event.key === 'Enter' || (
|
|
3071
|
-
|
|
3092
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3093
|
+
|
|
3094
|
+
event.preventDefault();
|
|
3072
3095
|
this.handleClick();
|
|
3073
3096
|
}
|
|
3074
3097
|
break;
|
|
@@ -3079,7 +3102,7 @@ class AuroFloatingUI {
|
|
|
3079
3102
|
break;
|
|
3080
3103
|
case 'mouseleave':
|
|
3081
3104
|
if (this.element.hoverToggle) {
|
|
3082
|
-
this.hideBib();
|
|
3105
|
+
this.hideBib("mouseleave");
|
|
3083
3106
|
}
|
|
3084
3107
|
break;
|
|
3085
3108
|
case 'focus':
|
|
@@ -3222,6 +3245,267 @@ class AuroFloatingUI {
|
|
|
3222
3245
|
}
|
|
3223
3246
|
}
|
|
3224
3247
|
|
|
3248
|
+
// Selectors for focusable elements
|
|
3249
|
+
const FOCUSABLE_SELECTORS = [
|
|
3250
|
+
'a[href]',
|
|
3251
|
+
'button:not([disabled])',
|
|
3252
|
+
'textarea:not([disabled])',
|
|
3253
|
+
'input:not([disabled])',
|
|
3254
|
+
'select:not([disabled])',
|
|
3255
|
+
'[role="tab"]:not([disabled])',
|
|
3256
|
+
'[role="link"]:not([disabled])',
|
|
3257
|
+
'[role="button"]:not([disabled])',
|
|
3258
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3259
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3260
|
+
];
|
|
3261
|
+
|
|
3262
|
+
// List of custom components that are known to be focusable
|
|
3263
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3264
|
+
'auro-checkbox',
|
|
3265
|
+
'auro-radio',
|
|
3266
|
+
'auro-dropdown',
|
|
3267
|
+
'auro-button',
|
|
3268
|
+
'auro-combobox',
|
|
3269
|
+
'auro-input',
|
|
3270
|
+
'auro-counter',
|
|
3271
|
+
'auro-menu',
|
|
3272
|
+
'auro-select',
|
|
3273
|
+
'auro-datepicker',
|
|
3274
|
+
'auro-hyperlink',
|
|
3275
|
+
'auro-accordion',
|
|
3276
|
+
];
|
|
3277
|
+
|
|
3278
|
+
/**
|
|
3279
|
+
* Determines if a given element is a custom focusable component.
|
|
3280
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3281
|
+
*
|
|
3282
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3283
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3284
|
+
*/
|
|
3285
|
+
function isFocusableComponent(element) {
|
|
3286
|
+
const componentName = element.tagName.toLowerCase();
|
|
3287
|
+
|
|
3288
|
+
// Guard Clause: Element is a focusable component
|
|
3289
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3290
|
+
|
|
3291
|
+
// Guard Clause: Element is not disabled
|
|
3292
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3293
|
+
|
|
3294
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3295
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3296
|
+
|
|
3297
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3298
|
+
return true;
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
/**
|
|
3302
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3303
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3304
|
+
*
|
|
3305
|
+
* @param {HTMLElement} container The container to search within
|
|
3306
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3307
|
+
*/
|
|
3308
|
+
function getFocusableElements(container) {
|
|
3309
|
+
// Get elements in DOM order by walking the tree
|
|
3310
|
+
const orderedFocusableElements = [];
|
|
3311
|
+
|
|
3312
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3313
|
+
const collectFocusableElements = (root) => {
|
|
3314
|
+
// Check if current element is focusable
|
|
3315
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3316
|
+
// Check if this is a custom component that is focusable
|
|
3317
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3318
|
+
|
|
3319
|
+
if (isComponentFocusable) {
|
|
3320
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3321
|
+
orderedFocusableElements.push(root);
|
|
3322
|
+
return; // Skip traversing inside this component
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
// Check if the element itself matches any selector
|
|
3326
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3327
|
+
if (root.matches?.(selector)) {
|
|
3328
|
+
orderedFocusableElements.push(root);
|
|
3329
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
// Process shadow DOM only for non-Auro components
|
|
3334
|
+
if (root.shadowRoot) {
|
|
3335
|
+
// Process shadow DOM children in order
|
|
3336
|
+
if (root.shadowRoot.children) {
|
|
3337
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3338
|
+
collectFocusableElements(child);
|
|
3339
|
+
});
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
// Process slots and their assigned nodes in order
|
|
3344
|
+
if (root.tagName === 'SLOT') {
|
|
3345
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3346
|
+
for (const node of assignedNodes) {
|
|
3347
|
+
collectFocusableElements(node);
|
|
3348
|
+
}
|
|
3349
|
+
} else {
|
|
3350
|
+
// Process light DOM children in order
|
|
3351
|
+
if (root.children) {
|
|
3352
|
+
Array.from(root.children).forEach(child => {
|
|
3353
|
+
collectFocusableElements(child);
|
|
3354
|
+
});
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
};
|
|
3359
|
+
|
|
3360
|
+
// Start the traversal from the container
|
|
3361
|
+
collectFocusableElements(container);
|
|
3362
|
+
|
|
3363
|
+
// Remove duplicates that might have been collected through different paths
|
|
3364
|
+
// while preserving order
|
|
3365
|
+
const uniqueElements = [];
|
|
3366
|
+
const seen = new Set();
|
|
3367
|
+
|
|
3368
|
+
for (const element of orderedFocusableElements) {
|
|
3369
|
+
if (!seen.has(element)) {
|
|
3370
|
+
seen.add(element);
|
|
3371
|
+
uniqueElements.push(element);
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
return uniqueElements;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3380
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3381
|
+
*/
|
|
3382
|
+
class FocusTrap {
|
|
3383
|
+
/**
|
|
3384
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3385
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3386
|
+
*
|
|
3387
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3388
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3389
|
+
*/
|
|
3390
|
+
constructor(container) {
|
|
3391
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3392
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
this.container = container;
|
|
3396
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3397
|
+
|
|
3398
|
+
this._init();
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
/**
|
|
3402
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3403
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3404
|
+
*
|
|
3405
|
+
* @private
|
|
3406
|
+
*/
|
|
3407
|
+
_init() {
|
|
3408
|
+
|
|
3409
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3410
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3411
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3412
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
// Track tab direction
|
|
3416
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
/**
|
|
3420
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3421
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3422
|
+
*
|
|
3423
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3424
|
+
* @private
|
|
3425
|
+
*/
|
|
3426
|
+
_onKeydown = (e) => {
|
|
3427
|
+
|
|
3428
|
+
if (e.key === 'Tab') {
|
|
3429
|
+
|
|
3430
|
+
// Set the tab direction based on the key pressed
|
|
3431
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3432
|
+
|
|
3433
|
+
// Get the active element(s) in the document and shadow root
|
|
3434
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3435
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3436
|
+
let activeElement = document.activeElement;
|
|
3437
|
+
const actives = [activeElement];
|
|
3438
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3439
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3440
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
// Update the focusable elements
|
|
3444
|
+
const focusables = this._getFocusableElements();
|
|
3445
|
+
|
|
3446
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3447
|
+
const focusIndex =
|
|
3448
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3449
|
+
? focusables.length - 1
|
|
3450
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3451
|
+
? 0
|
|
3452
|
+
: null;
|
|
3453
|
+
|
|
3454
|
+
if (focusIndex !== null) {
|
|
3455
|
+
focusables[focusIndex].focus();
|
|
3456
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3457
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
};
|
|
3461
|
+
|
|
3462
|
+
/**
|
|
3463
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3464
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3465
|
+
*
|
|
3466
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3467
|
+
* @private
|
|
3468
|
+
*/
|
|
3469
|
+
_getFocusableElements() {
|
|
3470
|
+
// Use the imported utility function to get focusable elements
|
|
3471
|
+
const elements = getFocusableElements(this.container);
|
|
3472
|
+
|
|
3473
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3474
|
+
return elements;
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
/**
|
|
3478
|
+
* Moves focus to the first focusable element within the container.
|
|
3479
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3480
|
+
*/
|
|
3481
|
+
focusFirstElement() {
|
|
3482
|
+
const focusables = this._getFocusableElements();
|
|
3483
|
+
if (focusables.length) focusables[0].focus();
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* Moves focus to the last focusable element within the container.
|
|
3488
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3489
|
+
*/
|
|
3490
|
+
focusLastElement() {
|
|
3491
|
+
const focusables = this._getFocusableElements();
|
|
3492
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
/**
|
|
3496
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3497
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3498
|
+
*/
|
|
3499
|
+
disconnect() {
|
|
3500
|
+
|
|
3501
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3502
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3225
3509
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3226
3510
|
// See LICENSE in the project root for license information.
|
|
3227
3511
|
|
|
@@ -3272,7 +3556,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
3272
3556
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3273
3557
|
*/
|
|
3274
3558
|
|
|
3275
|
-
let AuroElement$1 = class AuroElement extends LitElement {
|
|
3559
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
3276
3560
|
|
|
3277
3561
|
// function to define props used within the scope of this component
|
|
3278
3562
|
static get properties() {
|
|
@@ -3340,7 +3624,7 @@ var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3340
3624
|
*/
|
|
3341
3625
|
|
|
3342
3626
|
// build the component class
|
|
3343
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
3627
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
3344
3628
|
constructor() {
|
|
3345
3629
|
super();
|
|
3346
3630
|
this.onDark = false;
|
|
@@ -3412,9 +3696,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3412
3696
|
}
|
|
3413
3697
|
};
|
|
3414
3698
|
|
|
3415
|
-
var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
3699
|
+
var tokensCss$2$1 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
3416
3700
|
|
|
3417
|
-
var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3701
|
+
var colorCss$3$1 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3418
3702
|
|
|
3419
3703
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3420
3704
|
// See LICENSE in the project root for license information.
|
|
@@ -3572,9 +3856,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3572
3856
|
static get styles() {
|
|
3573
3857
|
return [
|
|
3574
3858
|
super.styles,
|
|
3575
|
-
css`${tokensCss$2}`,
|
|
3859
|
+
css`${tokensCss$2$1}`,
|
|
3576
3860
|
css`${styleCss$2$1}`,
|
|
3577
|
-
css`${colorCss$3}`
|
|
3861
|
+
css`${colorCss$3$1}`
|
|
3578
3862
|
];
|
|
3579
3863
|
}
|
|
3580
3864
|
|
|
@@ -3608,8 +3892,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3608
3892
|
async firstUpdated() {
|
|
3609
3893
|
await super.firstUpdated();
|
|
3610
3894
|
|
|
3611
|
-
|
|
3612
|
-
|
|
3895
|
+
/**
|
|
3896
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3897
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3898
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3899
|
+
*/
|
|
3900
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3613
3901
|
const svgDesc = this.svg.querySelector('desc');
|
|
3614
3902
|
|
|
3615
3903
|
if (svgDesc) {
|
|
@@ -3655,11 +3943,11 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3655
3943
|
|
|
3656
3944
|
var iconVersion$1 = '6.1.2';
|
|
3657
3945
|
|
|
3658
|
-
var styleCss$1$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{
|
|
3946
|
+
var styleCss$1$2 = css`: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}`;
|
|
3659
3947
|
|
|
3660
3948
|
var colorCss$2$1 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3661
3949
|
|
|
3662
|
-
var tokensCss$1$1 = css`: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:
|
|
3950
|
+
var tokensCss$1$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3663
3951
|
|
|
3664
3952
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3665
3953
|
// See LICENSE in the project root for license information.
|
|
@@ -3680,7 +3968,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3680
3968
|
*/
|
|
3681
3969
|
|
|
3682
3970
|
class AuroDropdownBib extends LitElement {
|
|
3683
|
-
|
|
3971
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3684
3972
|
constructor() {
|
|
3685
3973
|
super();
|
|
3686
3974
|
|
|
@@ -3690,6 +3978,9 @@ class AuroDropdownBib extends LitElement {
|
|
|
3690
3978
|
this._mobileBreakpointValue = undefined;
|
|
3691
3979
|
|
|
3692
3980
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3981
|
+
|
|
3982
|
+
this.shape = "rounded";
|
|
3983
|
+
this.matchWidth = false;
|
|
3693
3984
|
}
|
|
3694
3985
|
|
|
3695
3986
|
static get styles() {
|
|
@@ -3727,6 +4018,15 @@ class AuroDropdownBib extends LitElement {
|
|
|
3727
4018
|
reflect: true
|
|
3728
4019
|
},
|
|
3729
4020
|
|
|
4021
|
+
/**
|
|
4022
|
+
* If declared, the bib width will match the trigger width.
|
|
4023
|
+
* @private
|
|
4024
|
+
*/
|
|
4025
|
+
matchWidth: {
|
|
4026
|
+
type: Boolean,
|
|
4027
|
+
reflect: true
|
|
4028
|
+
},
|
|
4029
|
+
|
|
3730
4030
|
/**
|
|
3731
4031
|
* If declared, will apply border-radius to the bib.
|
|
3732
4032
|
*/
|
|
@@ -3740,6 +4040,11 @@ class AuroDropdownBib extends LitElement {
|
|
|
3740
4040
|
*/
|
|
3741
4041
|
bibTemplate: {
|
|
3742
4042
|
type: Object
|
|
4043
|
+
},
|
|
4044
|
+
|
|
4045
|
+
shape: {
|
|
4046
|
+
type: String,
|
|
4047
|
+
reflect: true
|
|
3743
4048
|
}
|
|
3744
4049
|
};
|
|
3745
4050
|
}
|
|
@@ -3819,8 +4124,16 @@ class AuroDropdownBib extends LitElement {
|
|
|
3819
4124
|
|
|
3820
4125
|
// function that renders the HTML and CSS into the scope of the component
|
|
3821
4126
|
render() {
|
|
4127
|
+
const classes = {
|
|
4128
|
+
container: true
|
|
4129
|
+
};
|
|
4130
|
+
|
|
4131
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4132
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4133
|
+
classes[`shape-${this.shape}`] = true;
|
|
4134
|
+
|
|
3822
4135
|
return html`
|
|
3823
|
-
<div class="
|
|
4136
|
+
<div class="${classMap(classes)}" part="bibContainer">
|
|
3824
4137
|
<slot></slot>
|
|
3825
4138
|
</div>
|
|
3826
4139
|
`;
|
|
@@ -3829,23 +4142,23 @@ class AuroDropdownBib extends LitElement {
|
|
|
3829
4142
|
|
|
3830
4143
|
var dropdownVersion$1 = '3.0.0';
|
|
3831
4144
|
|
|
3832
|
-
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.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:
|
|
4145
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
3833
4146
|
|
|
3834
|
-
var colorCss$1$1 = css`: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:
|
|
4147
|
+
var colorCss$1$1 = css`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
3835
4148
|
|
|
3836
|
-
var classicColorCss = css
|
|
4149
|
+
var classicColorCss = css``;
|
|
3837
4150
|
|
|
3838
|
-
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .
|
|
4151
|
+
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}`;
|
|
3839
4152
|
|
|
3840
|
-
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row
|
|
4153
|
+
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3841
4154
|
|
|
3842
|
-
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex
|
|
4155
|
+
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3843
4156
|
|
|
3844
|
-
var colorCss$
|
|
4157
|
+
var colorCss$5 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3845
4158
|
|
|
3846
|
-
var styleCss$
|
|
4159
|
+
var styleCss$6 = css`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
3847
4160
|
|
|
3848
|
-
var tokensCss$
|
|
4161
|
+
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3849
4162
|
|
|
3850
4163
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3851
4164
|
// See LICENSE in the project root for license information.
|
|
@@ -3854,7 +4167,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3854
4167
|
|
|
3855
4168
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3856
4169
|
|
|
3857
|
-
let AuroLibraryRuntimeUtils$
|
|
4170
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
3858
4171
|
|
|
3859
4172
|
/* eslint-disable jsdoc/require-param */
|
|
3860
4173
|
|
|
@@ -3935,14 +4248,14 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3935
4248
|
this.onDark = false;
|
|
3936
4249
|
this.hasTextContent = false;
|
|
3937
4250
|
|
|
3938
|
-
AuroLibraryRuntimeUtils$
|
|
4251
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3939
4252
|
}
|
|
3940
4253
|
|
|
3941
4254
|
static get styles() {
|
|
3942
4255
|
return [
|
|
3943
|
-
colorCss$
|
|
3944
|
-
styleCss$
|
|
3945
|
-
tokensCss$
|
|
4256
|
+
colorCss$5,
|
|
4257
|
+
styleCss$6,
|
|
4258
|
+
tokensCss$4
|
|
3946
4259
|
];
|
|
3947
4260
|
}
|
|
3948
4261
|
|
|
@@ -3991,7 +4304,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3991
4304
|
*
|
|
3992
4305
|
*/
|
|
3993
4306
|
static register(name = "auro-helptext") {
|
|
3994
|
-
AuroLibraryRuntimeUtils$
|
|
4307
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
3995
4308
|
}
|
|
3996
4309
|
|
|
3997
4310
|
updated() {
|
|
@@ -4084,18 +4397,21 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4084
4397
|
}
|
|
4085
4398
|
|
|
4086
4399
|
resetShapeClasses() {
|
|
4087
|
-
|
|
4088
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4400
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4089
4401
|
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4402
|
+
if (wrapper) {
|
|
4403
|
+
wrapper.classList.forEach((className) => {
|
|
4404
|
+
if (className.startsWith('shape-')) {
|
|
4405
|
+
wrapper.classList.remove(className);
|
|
4406
|
+
}
|
|
4407
|
+
});
|
|
4096
4408
|
|
|
4097
|
-
|
|
4098
|
-
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4411
|
+
if (this.shape && this.size) {
|
|
4412
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4413
|
+
} else {
|
|
4414
|
+
wrapper.classList.add('shape-none');
|
|
4099
4415
|
}
|
|
4100
4416
|
}
|
|
4101
4417
|
|
|
@@ -4145,10 +4461,8 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4145
4461
|
// See LICENSE in the project root for license information.
|
|
4146
4462
|
|
|
4147
4463
|
|
|
4148
|
-
|
|
4149
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
4464
|
+
/*
|
|
4150
4465
|
* @slot - Default slot for the popover content.
|
|
4151
|
-
* @slot label - Defines the content of the label.
|
|
4152
4466
|
* @slot helpText - Defines the content of the helpText.
|
|
4153
4467
|
* @slot trigger - Defines the content of the trigger.
|
|
4154
4468
|
* @csspart trigger - The trigger content container.
|
|
@@ -4167,23 +4481,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4167
4481
|
this.matchWidth = false;
|
|
4168
4482
|
this.noHideOnThisFocusLoss = false;
|
|
4169
4483
|
|
|
4170
|
-
this.errorMessage =
|
|
4484
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4171
4485
|
|
|
4172
4486
|
// Layout Config
|
|
4173
|
-
this.layout =
|
|
4174
|
-
this.shape =
|
|
4175
|
-
this.size =
|
|
4487
|
+
this.layout = undefined;
|
|
4488
|
+
this.shape = undefined;
|
|
4489
|
+
this.size = undefined;
|
|
4490
|
+
|
|
4176
4491
|
this.parentBorder = false;
|
|
4177
4492
|
|
|
4178
|
-
|
|
4179
|
-
|
|
4493
|
+
/** @private */
|
|
4494
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4180
4495
|
|
|
4181
|
-
|
|
4182
|
-
return {
|
|
4183
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4184
|
-
};
|
|
4496
|
+
this.privateDefaults();
|
|
4185
4497
|
}
|
|
4186
4498
|
|
|
4499
|
+
/**
|
|
4500
|
+
* @private
|
|
4501
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4502
|
+
*/
|
|
4187
4503
|
get commonWrapperClasses() {
|
|
4188
4504
|
return {
|
|
4189
4505
|
'trigger': true,
|
|
@@ -4201,13 +4517,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4201
4517
|
privateDefaults() {
|
|
4202
4518
|
this.chevron = false;
|
|
4203
4519
|
this.disabled = false;
|
|
4520
|
+
this.disableFocusTrap = false;
|
|
4204
4521
|
this.error = false;
|
|
4205
|
-
this.inset = false;
|
|
4206
|
-
this.rounded = false;
|
|
4207
4522
|
this.tabIndex = 0;
|
|
4208
4523
|
this.noToggle = false;
|
|
4209
|
-
this.a11yAutocomplete = 'none';
|
|
4210
|
-
this.labeled = true;
|
|
4211
4524
|
this.a11yRole = 'button';
|
|
4212
4525
|
this.onDark = false;
|
|
4213
4526
|
this.showTriggerBorders = true;
|
|
@@ -4303,6 +4616,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4303
4616
|
this.floater.showBib();
|
|
4304
4617
|
}
|
|
4305
4618
|
|
|
4619
|
+
/**
|
|
4620
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4621
|
+
* If not, trigger element will get focus.
|
|
4622
|
+
*/
|
|
4623
|
+
focus() {
|
|
4624
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4625
|
+
this.focusTrap.focusFirstElement();
|
|
4626
|
+
} else {
|
|
4627
|
+
this.trigger.focus();
|
|
4628
|
+
}
|
|
4629
|
+
}
|
|
4630
|
+
|
|
4306
4631
|
// function to define props used within the scope of this component
|
|
4307
4632
|
static get properties() {
|
|
4308
4633
|
return {
|
|
@@ -4316,6 +4641,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4641
|
reflect: true
|
|
4317
4642
|
},
|
|
4318
4643
|
|
|
4644
|
+
/**
|
|
4645
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4646
|
+
* @default false
|
|
4647
|
+
*/
|
|
4648
|
+
disableEventShow: {
|
|
4649
|
+
type: Boolean,
|
|
4650
|
+
reflect: true
|
|
4651
|
+
},
|
|
4652
|
+
|
|
4319
4653
|
/**
|
|
4320
4654
|
* If declared, applies a border around the trigger slot.
|
|
4321
4655
|
*/
|
|
@@ -4334,17 +4668,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4334
4668
|
},
|
|
4335
4669
|
|
|
4336
4670
|
/**
|
|
4337
|
-
* If declared, the dropdown
|
|
4671
|
+
* If declared, the dropdown is not interactive.
|
|
4338
4672
|
*/
|
|
4339
|
-
|
|
4673
|
+
disabled: {
|
|
4340
4674
|
type: Boolean,
|
|
4341
4675
|
reflect: true
|
|
4342
4676
|
},
|
|
4343
4677
|
|
|
4344
4678
|
/**
|
|
4345
|
-
* If declared, the
|
|
4679
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4346
4680
|
*/
|
|
4347
|
-
|
|
4681
|
+
disableFocusTrap: {
|
|
4348
4682
|
type: Boolean,
|
|
4349
4683
|
reflect: true
|
|
4350
4684
|
},
|
|
@@ -4389,22 +4723,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4389
4723
|
reflect: true
|
|
4390
4724
|
},
|
|
4391
4725
|
|
|
4392
|
-
/**
|
|
4393
|
-
* Makes the trigger to be full width of its parent container.
|
|
4394
|
-
*/
|
|
4395
|
-
fluid: {
|
|
4396
|
-
type: Boolean,
|
|
4397
|
-
reflect: true
|
|
4398
|
-
},
|
|
4399
|
-
|
|
4400
|
-
/**
|
|
4401
|
-
* If declared, will apply padding around trigger slot content.
|
|
4402
|
-
*/
|
|
4403
|
-
inset: {
|
|
4404
|
-
type: Boolean,
|
|
4405
|
-
reflect: true
|
|
4406
|
-
},
|
|
4407
|
-
|
|
4408
4726
|
/**
|
|
4409
4727
|
* If true, the dropdown bib is displayed.
|
|
4410
4728
|
*/
|
|
@@ -4448,15 +4766,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4448
4766
|
reflect: true
|
|
4449
4767
|
},
|
|
4450
4768
|
|
|
4451
|
-
/**
|
|
4452
|
-
* Defines if there is a label preset.
|
|
4453
|
-
* @private
|
|
4454
|
-
*/
|
|
4455
|
-
labeled: {
|
|
4456
|
-
type: Boolean,
|
|
4457
|
-
reflect: true
|
|
4458
|
-
},
|
|
4459
|
-
|
|
4460
4769
|
/**
|
|
4461
4770
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4462
4771
|
* @private
|
|
@@ -4517,6 +4826,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4517
4826
|
reflect: true
|
|
4518
4827
|
},
|
|
4519
4828
|
|
|
4829
|
+
/**
|
|
4830
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4831
|
+
*/
|
|
4520
4832
|
onSlotChange: {
|
|
4521
4833
|
type: Function,
|
|
4522
4834
|
reflect: false
|
|
@@ -4531,14 +4843,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4531
4843
|
reflect: true
|
|
4532
4844
|
},
|
|
4533
4845
|
|
|
4534
|
-
/**
|
|
4535
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4536
|
-
*/
|
|
4537
|
-
rounded: {
|
|
4538
|
-
type: Boolean,
|
|
4539
|
-
reflect: true
|
|
4540
|
-
},
|
|
4541
|
-
|
|
4542
4846
|
/**
|
|
4543
4847
|
* @private
|
|
4544
4848
|
*/
|
|
@@ -4553,22 +4857,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4553
4857
|
type: String || undefined,
|
|
4554
4858
|
attribute: false,
|
|
4555
4859
|
reflect: false
|
|
4556
|
-
},
|
|
4557
|
-
|
|
4558
|
-
/**
|
|
4559
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4560
|
-
*/
|
|
4561
|
-
a11yAutocomplete: {
|
|
4562
|
-
type: String,
|
|
4563
|
-
attribute: false,
|
|
4564
4860
|
}
|
|
4565
4861
|
};
|
|
4566
4862
|
}
|
|
4567
4863
|
|
|
4568
4864
|
static get styles() {
|
|
4569
4865
|
return [
|
|
4570
|
-
colorCss$1$1,
|
|
4571
4866
|
tokensCss$1$1,
|
|
4867
|
+
colorCss$1$1,
|
|
4572
4868
|
|
|
4573
4869
|
// default layout
|
|
4574
4870
|
classicColorCss,
|
|
@@ -4630,13 +4926,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4630
4926
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4631
4927
|
this.handleTriggerContentSlotChange();
|
|
4632
4928
|
}
|
|
4929
|
+
}
|
|
4633
4930
|
|
|
4931
|
+
/**
|
|
4932
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
4933
|
+
* @private
|
|
4934
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
4935
|
+
*/
|
|
4936
|
+
handleDropdownToggle(event) {
|
|
4937
|
+
this.updateFocusTrap();
|
|
4938
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4939
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4940
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4941
|
+
this.trigger.focus();
|
|
4942
|
+
}
|
|
4634
4943
|
}
|
|
4635
4944
|
|
|
4636
4945
|
firstUpdated() {
|
|
4637
4946
|
|
|
4638
4947
|
// Configure the floater to, this will generate the ID for the bib
|
|
4639
4948
|
this.floater.configure(this, 'auroDropdown');
|
|
4949
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4640
4950
|
|
|
4641
4951
|
/**
|
|
4642
4952
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4696,6 +5006,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4696
5006
|
this.hasFocus = true;
|
|
4697
5007
|
}
|
|
4698
5008
|
|
|
5009
|
+
/**
|
|
5010
|
+
* @private
|
|
5011
|
+
*/
|
|
5012
|
+
updateFocusTrap() {
|
|
5013
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5014
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5015
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5016
|
+
this.focusTrap.focusFirstElement();
|
|
5017
|
+
return;
|
|
5018
|
+
}
|
|
5019
|
+
|
|
5020
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5021
|
+
if (!this.focusTrap) {
|
|
5022
|
+
return;
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5026
|
+
this.focusTrap.disconnect();
|
|
5027
|
+
this.focusTrap = undefined;
|
|
5028
|
+
}
|
|
5029
|
+
|
|
4699
5030
|
/**
|
|
4700
5031
|
* Function to support @focusout event.
|
|
4701
5032
|
* @private
|
|
@@ -4856,14 +5187,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4856
5187
|
* @returns {void}
|
|
4857
5188
|
*/
|
|
4858
5189
|
handleTriggerContentSlotChange(event) {
|
|
4859
|
-
|
|
4860
5190
|
this.floater.handleTriggerTabIndex();
|
|
4861
5191
|
|
|
4862
5192
|
// Get the trigger
|
|
4863
5193
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
4864
5194
|
|
|
4865
5195
|
// Get the trigger slot
|
|
4866
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5196
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
4867
5197
|
|
|
4868
5198
|
// If there's a trigger slot
|
|
4869
5199
|
if (triggerSlot) {
|
|
@@ -4926,7 +5256,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4926
5256
|
*
|
|
4927
5257
|
* @private
|
|
4928
5258
|
* @method handleDefaultSlot
|
|
4929
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4930
5259
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4931
5260
|
*/
|
|
4932
5261
|
handleDefaultSlot() {
|
|
@@ -4937,33 +5266,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4937
5266
|
}
|
|
4938
5267
|
|
|
4939
5268
|
/**
|
|
5269
|
+
* Returns HTML for the common portion of the layouts.
|
|
4940
5270
|
* @private
|
|
4941
|
-
* @
|
|
4942
|
-
* @
|
|
4943
|
-
* @description Handles the slot change event for the label slot.
|
|
4944
|
-
*/
|
|
4945
|
-
handleLabelSlotChange (event) {
|
|
4946
|
-
|
|
4947
|
-
// Get the nodes from the event
|
|
4948
|
-
const nodes = event.target.assignedNodes();
|
|
4949
|
-
|
|
4950
|
-
// Guard clause for no nodes
|
|
4951
|
-
if (!nodes) {
|
|
4952
|
-
return;
|
|
4953
|
-
}
|
|
4954
|
-
|
|
4955
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
4956
|
-
const nodesArr = Array.from(nodes);
|
|
4957
|
-
|
|
4958
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
4959
|
-
this.labeled = nodesArr.length > 0;
|
|
4960
|
-
}
|
|
4961
|
-
|
|
4962
|
-
/**
|
|
4963
|
-
* Returns HTML for the common portion of the layouts.
|
|
4964
|
-
* @private
|
|
4965
|
-
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
4966
|
-
* @returns {html} - Returns HTML.
|
|
5271
|
+
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
5272
|
+
* @returns {html} - Returns HTML.
|
|
4967
5273
|
*/
|
|
4968
5274
|
renderBasicHtml(helpTextClasses) {
|
|
4969
5275
|
return html`
|
|
@@ -4973,22 +5279,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4973
5279
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4974
5280
|
tabindex="${this.tabIndex}"
|
|
4975
5281
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4976
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4977
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5282
|
+
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5283
|
+
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4978
5284
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4979
5285
|
@focusin="${this.handleFocusin}"
|
|
4980
5286
|
@blur="${this.handleFocusOut}">
|
|
4981
|
-
<div class="triggerContentWrapper">
|
|
4982
|
-
<
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
<div class="triggerContent">
|
|
4986
|
-
<slot
|
|
4987
|
-
name="trigger"
|
|
4988
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4989
|
-
</div>
|
|
5287
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5288
|
+
<slot
|
|
5289
|
+
name="trigger"
|
|
5290
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4990
5291
|
</div>
|
|
4991
|
-
${this.chevron
|
|
5292
|
+
${this.chevron ? html`
|
|
4992
5293
|
<div
|
|
4993
5294
|
id="showStateIcon"
|
|
4994
5295
|
class="chevron"
|
|
@@ -5009,11 +5310,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5009
5310
|
<div id="bibSizer" part="size"></div>
|
|
5010
5311
|
<${this.dropdownBibTag}
|
|
5011
5312
|
id="bib"
|
|
5313
|
+
shape="${this.shape}"
|
|
5012
5314
|
?data-show="${this.isPopoverVisible}"
|
|
5013
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5014
|
-
?common="${this.common}"
|
|
5015
|
-
?rounded="${this.common || this.rounded}"
|
|
5016
|
-
?inset="${this.common || this.inset}">
|
|
5315
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5017
5316
|
<div class="slotContent">
|
|
5018
5317
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5019
5318
|
</div>
|
|
@@ -5023,250 +5322,1295 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5023
5322
|
}
|
|
5024
5323
|
|
|
5025
5324
|
/**
|
|
5026
|
-
* Returns HTML for the classic layout. Does not support type="*".
|
|
5325
|
+
* Returns HTML for the classic layout. Does not support type="*".
|
|
5326
|
+
* @private
|
|
5327
|
+
* @returns {html} - Returns HTML for the classic layout.
|
|
5328
|
+
*/
|
|
5329
|
+
renderLayoutClassic() {
|
|
5330
|
+
// TODO: check with Doug why this was never used?
|
|
5331
|
+
const helpTextClasses = {
|
|
5332
|
+
'helpText': true
|
|
5333
|
+
};
|
|
5334
|
+
|
|
5335
|
+
return html`
|
|
5336
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5337
|
+
`;
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
/**
|
|
5341
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
5342
|
+
* @private
|
|
5343
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
5344
|
+
*/
|
|
5345
|
+
renderLayoutSnowflake() {
|
|
5346
|
+
const helpTextClasses = {
|
|
5347
|
+
'helpText': true,
|
|
5348
|
+
'leftIndent': true,
|
|
5349
|
+
'rightIndent': true
|
|
5350
|
+
};
|
|
5351
|
+
|
|
5352
|
+
return html`
|
|
5353
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5354
|
+
`;
|
|
5355
|
+
}
|
|
5356
|
+
|
|
5357
|
+
/**
|
|
5358
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
5359
|
+
* @private
|
|
5360
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
5361
|
+
*/
|
|
5362
|
+
renderLayoutEmphasized() {
|
|
5363
|
+
const helpTextClasses = {
|
|
5364
|
+
'helpText': true,
|
|
5365
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5366
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5367
|
+
};
|
|
5368
|
+
|
|
5369
|
+
return html`
|
|
5370
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5371
|
+
`;
|
|
5372
|
+
}
|
|
5373
|
+
|
|
5374
|
+
/**
|
|
5375
|
+
* Logic to determine the layout of the component.
|
|
5376
|
+
* @private
|
|
5377
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
5378
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
5379
|
+
*/
|
|
5380
|
+
renderLayout(ForcedLayout) {
|
|
5381
|
+
const layout = ForcedLayout || this.layout;
|
|
5382
|
+
|
|
5383
|
+
switch (layout) {
|
|
5384
|
+
case 'emphasized':
|
|
5385
|
+
return this.renderLayoutEmphasized();
|
|
5386
|
+
case 'emphasized-left':
|
|
5387
|
+
return this.renderLayoutEmphasized();
|
|
5388
|
+
case 'emphasized-right':
|
|
5389
|
+
return this.renderLayoutEmphasized();
|
|
5390
|
+
case 'snowflake':
|
|
5391
|
+
return this.renderLayoutSnowflake();
|
|
5392
|
+
case 'snowflake-left':
|
|
5393
|
+
return this.renderLayoutSnowflake();
|
|
5394
|
+
case 'snowflake-right':
|
|
5395
|
+
return this.renderLayoutSnowflake();
|
|
5396
|
+
default:
|
|
5397
|
+
return this.renderLayoutClassic();
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
var dropdownVersion = '3.0.0';
|
|
5403
|
+
|
|
5404
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5405
|
+
|
|
5406
|
+
var styleCss$4 = css`#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)}`;
|
|
5407
|
+
|
|
5408
|
+
var tokenCss = css`: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)}`;
|
|
5409
|
+
|
|
5410
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5411
|
+
// See LICENSE in the project root for license information.
|
|
5412
|
+
|
|
5413
|
+
// ---------------------------------------------------------------------
|
|
5414
|
+
|
|
5415
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5416
|
+
|
|
5417
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5418
|
+
|
|
5419
|
+
/* eslint-disable jsdoc/require-param */
|
|
5420
|
+
|
|
5421
|
+
/**
|
|
5422
|
+
* This will register a new custom element with the browser.
|
|
5423
|
+
* @param {String} name - The name of the custom element.
|
|
5424
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5425
|
+
* @returns {void}
|
|
5426
|
+
*/
|
|
5427
|
+
registerComponent(name, componentClass) {
|
|
5428
|
+
if (!customElements.get(name)) {
|
|
5429
|
+
customElements.define(name, class extends componentClass {});
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
|
|
5433
|
+
/**
|
|
5434
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5435
|
+
* @returns {void}
|
|
5436
|
+
*/
|
|
5437
|
+
closestElement(
|
|
5438
|
+
selector, // selector like in .closest()
|
|
5439
|
+
base = this, // extra functionality to skip a parent
|
|
5440
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5441
|
+
!el || el === document || el === window
|
|
5442
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5443
|
+
: found
|
|
5444
|
+
? found // found a selector INside this element
|
|
5445
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5446
|
+
) {
|
|
5447
|
+
return __Closest(base);
|
|
5448
|
+
}
|
|
5449
|
+
/* eslint-enable jsdoc/require-param */
|
|
5450
|
+
|
|
5451
|
+
/**
|
|
5452
|
+
* 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.
|
|
5453
|
+
* @param {Object} elem - The element to check.
|
|
5454
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5455
|
+
* @returns {void}
|
|
5456
|
+
*/
|
|
5457
|
+
handleComponentTagRename(elem, tagName) {
|
|
5458
|
+
const tag = tagName.toLowerCase();
|
|
5459
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5460
|
+
|
|
5461
|
+
if (elemTag !== tag) {
|
|
5462
|
+
elem.setAttribute(tag, true);
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
|
|
5466
|
+
/**
|
|
5467
|
+
* Validates if an element is a specific Auro component.
|
|
5468
|
+
* @param {Object} elem - The element to validate.
|
|
5469
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5470
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5471
|
+
*/
|
|
5472
|
+
elementMatch(elem, tagName) {
|
|
5473
|
+
const tag = tagName.toLowerCase();
|
|
5474
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5475
|
+
|
|
5476
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5477
|
+
}
|
|
5478
|
+
};
|
|
5479
|
+
|
|
5480
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5481
|
+
// See LICENSE in the project root for license information.
|
|
5482
|
+
|
|
5483
|
+
|
|
5484
|
+
class AuroDependencyVersioning {
|
|
5485
|
+
|
|
5486
|
+
/**
|
|
5487
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5488
|
+
* @private
|
|
5489
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5490
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5491
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5492
|
+
*/
|
|
5493
|
+
generateElementName(baseName, version) {
|
|
5494
|
+
let result = baseName;
|
|
5495
|
+
|
|
5496
|
+
result += '-';
|
|
5497
|
+
result += version.replace(/[.]/g, '_');
|
|
5498
|
+
|
|
5499
|
+
return result;
|
|
5500
|
+
}
|
|
5501
|
+
|
|
5502
|
+
/**
|
|
5503
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5504
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5505
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5506
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5507
|
+
*/
|
|
5508
|
+
generateTag(baseName, version, tagClass) {
|
|
5509
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5510
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5511
|
+
|
|
5512
|
+
if (!customElements.get(elementName)) {
|
|
5513
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5514
|
+
}
|
|
5515
|
+
|
|
5516
|
+
return tag;
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
|
|
5520
|
+
/**
|
|
5521
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5522
|
+
*/
|
|
5523
|
+
const _observers = new WeakMap();
|
|
5524
|
+
|
|
5525
|
+
/**
|
|
5526
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5527
|
+
* Structure: {
|
|
5528
|
+
* host: {
|
|
5529
|
+
* matchers: Set<Function>,
|
|
5530
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5531
|
+
* }
|
|
5532
|
+
* }
|
|
5533
|
+
*/
|
|
5534
|
+
const _transportConfig = new WeakMap();
|
|
5535
|
+
|
|
5536
|
+
/**
|
|
5537
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5538
|
+
*
|
|
5539
|
+
* @param {Object} params - The parameters for the function.
|
|
5540
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5541
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5542
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5543
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5544
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5545
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5546
|
+
*/
|
|
5547
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5548
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5549
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5550
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5553
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5554
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5555
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5556
|
+
}
|
|
5557
|
+
|
|
5558
|
+
// Guard Clause: Ensure match is a function
|
|
5559
|
+
if (typeof match !== 'function') {
|
|
5560
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5564
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5565
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
// Register this transport and get cleanup function
|
|
5569
|
+
return _registerTransport({
|
|
5570
|
+
host,
|
|
5571
|
+
target,
|
|
5572
|
+
matcher: match,
|
|
5573
|
+
removeOriginal
|
|
5574
|
+
});
|
|
5575
|
+
};
|
|
5576
|
+
|
|
5577
|
+
/**
|
|
5578
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5579
|
+
*
|
|
5580
|
+
* @param {Object} params - The parameters object.
|
|
5581
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5582
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5583
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5584
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5585
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5586
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5587
|
+
* @private
|
|
5588
|
+
*/
|
|
5589
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5590
|
+
// Initialize config for this host if it doesn't exist
|
|
5591
|
+
if (!_transportConfig.has(host)) {
|
|
5592
|
+
_transportConfig.set(host, {
|
|
5593
|
+
matchers: new Set(),
|
|
5594
|
+
targets: new Map()
|
|
5595
|
+
});
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
const config = _transportConfig.get(host);
|
|
5599
|
+
|
|
5600
|
+
// Add the matcher to the set of matchers for this host
|
|
5601
|
+
config.matchers.add(matcher);
|
|
5602
|
+
|
|
5603
|
+
// Initialize target entry if it doesn't exist
|
|
5604
|
+
if (!config.targets.has(target)) {
|
|
5605
|
+
config.targets.set(target, new Map());
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5609
|
+
config.targets.get(target).set(matcher, {
|
|
5610
|
+
removeOriginal,
|
|
5611
|
+
currentAttributes: new Map()
|
|
5612
|
+
});
|
|
5613
|
+
|
|
5614
|
+
// Perform initial attribute transport
|
|
5615
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5616
|
+
|
|
5617
|
+
// Attach observer
|
|
5618
|
+
_attachObserver(host);
|
|
5619
|
+
|
|
5620
|
+
// Return cleanup function and utility functions
|
|
5621
|
+
return {
|
|
5622
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5623
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5624
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5625
|
+
}
|
|
5626
|
+
};
|
|
5627
|
+
|
|
5628
|
+
/**
|
|
5629
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5630
|
+
*
|
|
5631
|
+
* @param {HTMLElement} host - The host element
|
|
5632
|
+
* @param {HTMLElement} target - The target element
|
|
5633
|
+
* @param {Function} matcher - The matcher function
|
|
5634
|
+
* @private
|
|
5635
|
+
*/
|
|
5636
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5637
|
+
const config = _transportConfig.get(host);
|
|
5638
|
+
if (!config) return;
|
|
5639
|
+
|
|
5640
|
+
// Remove this matcher from this target
|
|
5641
|
+
const targetMatchers = config.targets.get(target);
|
|
5642
|
+
if (targetMatchers) {
|
|
5643
|
+
targetMatchers.delete(matcher);
|
|
5644
|
+
|
|
5645
|
+
// If this target has no more matchers, remove it
|
|
5646
|
+
if (targetMatchers.size === 0) {
|
|
5647
|
+
config.targets.delete(target);
|
|
5648
|
+
}
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
// Check if this matcher is still used by any target
|
|
5652
|
+
let matcherStillUsed = false;
|
|
5653
|
+
for (const matcherMap of config.targets.values()) {
|
|
5654
|
+
if (matcherMap.has(matcher)) {
|
|
5655
|
+
matcherStillUsed = true;
|
|
5656
|
+
break;
|
|
5657
|
+
}
|
|
5658
|
+
}
|
|
5659
|
+
|
|
5660
|
+
// If not used anymore, remove from matchers set
|
|
5661
|
+
if (!matcherStillUsed) {
|
|
5662
|
+
config.matchers.delete(matcher);
|
|
5663
|
+
}
|
|
5664
|
+
|
|
5665
|
+
// If no more targets or matchers, detach observer
|
|
5666
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5667
|
+
_detachObserver(host);
|
|
5668
|
+
}
|
|
5669
|
+
};
|
|
5670
|
+
|
|
5671
|
+
/**
|
|
5672
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5673
|
+
*
|
|
5674
|
+
* @param {Object} params - The parameters object.
|
|
5675
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5676
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5677
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5678
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5679
|
+
* @returns {void}
|
|
5680
|
+
* @private
|
|
5681
|
+
*/
|
|
5682
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5683
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5684
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5685
|
+
.filter(attr => matcher(attr))
|
|
5686
|
+
.reduce((acc, attr) => {
|
|
5687
|
+
acc[attr] = host.getAttribute(attr);
|
|
5688
|
+
return acc;
|
|
5689
|
+
}, {});
|
|
5690
|
+
|
|
5691
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5692
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5693
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5694
|
+
target.setAttribute(key, value);
|
|
5695
|
+
if (removeOriginal) {
|
|
5696
|
+
host.removeAttribute(key);
|
|
5697
|
+
}
|
|
5698
|
+
});
|
|
5699
|
+
};
|
|
5700
|
+
|
|
5701
|
+
/**
|
|
5702
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5703
|
+
*
|
|
5704
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5705
|
+
* @returns {MutationObserver} The observer instance.
|
|
5706
|
+
* @private
|
|
5707
|
+
*/
|
|
5708
|
+
const _attachObserver = (host) => {
|
|
5709
|
+
// If an observer for this host already exists, return it
|
|
5710
|
+
if (_observers.has(host)) {
|
|
5711
|
+
return _observers.get(host);
|
|
5712
|
+
}
|
|
5713
|
+
|
|
5714
|
+
// Create a new MutationObserver
|
|
5715
|
+
const observer = new MutationObserver((mutations) => {
|
|
5716
|
+
const config = _transportConfig.get(host);
|
|
5717
|
+
if (!config) return;
|
|
5718
|
+
|
|
5719
|
+
// For each mutation affecting attributes
|
|
5720
|
+
mutations
|
|
5721
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5722
|
+
.forEach(mutation => {
|
|
5723
|
+
const attributeName = mutation.attributeName;
|
|
5724
|
+
|
|
5725
|
+
// Find matchers that care about this attribute
|
|
5726
|
+
for (const matcher of config.matchers) {
|
|
5727
|
+
if (matcher(attributeName)) {
|
|
5728
|
+
// For each target that uses this matcher
|
|
5729
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5730
|
+
if (matcherConfigs.has(matcher)) {
|
|
5731
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5732
|
+
_transportAttributes({
|
|
5733
|
+
host,
|
|
5734
|
+
target,
|
|
5735
|
+
matcher,
|
|
5736
|
+
removeOriginal
|
|
5737
|
+
});
|
|
5738
|
+
}
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
});
|
|
5743
|
+
});
|
|
5744
|
+
|
|
5745
|
+
// Start observing attribute changes
|
|
5746
|
+
observer.observe(host, { attributes: true });
|
|
5747
|
+
|
|
5748
|
+
// Store the observer
|
|
5749
|
+
_observers.set(host, observer);
|
|
5750
|
+
|
|
5751
|
+
return observer;
|
|
5752
|
+
};
|
|
5753
|
+
|
|
5754
|
+
/**
|
|
5755
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5756
|
+
*
|
|
5757
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5758
|
+
* @private
|
|
5759
|
+
*/
|
|
5760
|
+
const _detachObserver = (host) => {
|
|
5761
|
+
if (_observers.has(host)) {
|
|
5762
|
+
const observer = _observers.get(host);
|
|
5763
|
+
observer.disconnect();
|
|
5764
|
+
_observers.delete(host);
|
|
5765
|
+
}
|
|
5766
|
+
|
|
5767
|
+
// Clean up the transport config as well
|
|
5768
|
+
if (_transportConfig.has(host)) {
|
|
5769
|
+
_transportConfig.delete(host);
|
|
5770
|
+
}
|
|
5771
|
+
};
|
|
5772
|
+
|
|
5773
|
+
/**
|
|
5774
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5775
|
+
* @param {HTMLElement} host - The host element
|
|
5776
|
+
* @param {HTMLElement} target - The target element
|
|
5777
|
+
* @param {Function} matcher - The matcher function
|
|
5778
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5779
|
+
* @private
|
|
5780
|
+
*/
|
|
5781
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5782
|
+
const config = _transportConfig.get(host);
|
|
5783
|
+
if (!config) return undefined;
|
|
5784
|
+
|
|
5785
|
+
const targetMatchers = config.targets.get(target);
|
|
5786
|
+
if (!targetMatchers) return undefined;
|
|
5787
|
+
|
|
5788
|
+
return targetMatchers.get(matcher);
|
|
5789
|
+
};
|
|
5790
|
+
|
|
5791
|
+
/**
|
|
5792
|
+
* Sets an observed attribute value
|
|
5793
|
+
* @param {HTMLElement} host - The host element
|
|
5794
|
+
* @param {HTMLElement} target - The target element
|
|
5795
|
+
* @param {Function} matcher - The matcher function
|
|
5796
|
+
* @param {string} key - The attribute name
|
|
5797
|
+
* @param {string} value - The attribute value
|
|
5798
|
+
* @private
|
|
5799
|
+
*/
|
|
5800
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5801
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5802
|
+
if (matcherConfig) {
|
|
5803
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5804
|
+
}
|
|
5805
|
+
};
|
|
5806
|
+
|
|
5807
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5808
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5809
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5810
|
+
return undefined;
|
|
5811
|
+
};
|
|
5812
|
+
|
|
5813
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5814
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5815
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5816
|
+
return [];
|
|
5817
|
+
};
|
|
5818
|
+
|
|
5819
|
+
const _matchers = {
|
|
5820
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5821
|
+
'role': attr => attr.match(/^role$/)
|
|
5822
|
+
};
|
|
5823
|
+
|
|
5824
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5825
|
+
return transportAttributes({
|
|
5826
|
+
host,
|
|
5827
|
+
target,
|
|
5828
|
+
match: attr => {
|
|
5829
|
+
for (const key in _matchers) {
|
|
5830
|
+
if (_matchers[key](attr)) return true;
|
|
5831
|
+
}
|
|
5832
|
+
return false;
|
|
5833
|
+
},
|
|
5834
|
+
removeOriginal
|
|
5835
|
+
});
|
|
5836
|
+
};
|
|
5837
|
+
|
|
5838
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
5839
|
+
|
|
5840
|
+
/**
|
|
5841
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5842
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5843
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5844
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5845
|
+
* @private
|
|
5846
|
+
*/
|
|
5847
|
+
attributeWatcher;
|
|
5848
|
+
|
|
5849
|
+
static get properties() {
|
|
5850
|
+
return {
|
|
5851
|
+
|
|
5852
|
+
/**
|
|
5853
|
+
* Defines the layout of an element.
|
|
5854
|
+
* @default {'default'}
|
|
5855
|
+
*/
|
|
5856
|
+
layout: {
|
|
5857
|
+
type: String,
|
|
5858
|
+
attribute: "layout",
|
|
5859
|
+
reflect: true
|
|
5860
|
+
},
|
|
5861
|
+
|
|
5862
|
+
/**
|
|
5863
|
+
* Defines the shape of an element.
|
|
5864
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5865
|
+
* @default {'default'}
|
|
5866
|
+
*/
|
|
5867
|
+
shape: {
|
|
5868
|
+
type: String,
|
|
5869
|
+
attribute: "shape",
|
|
5870
|
+
reflect: true
|
|
5871
|
+
},
|
|
5872
|
+
|
|
5873
|
+
/**
|
|
5874
|
+
* Defines the size of an element.
|
|
5875
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5876
|
+
* @default {'md'}
|
|
5877
|
+
*/
|
|
5878
|
+
size: {
|
|
5879
|
+
type: String,
|
|
5880
|
+
attribute: "size",
|
|
5881
|
+
reflect: true
|
|
5882
|
+
},
|
|
5883
|
+
|
|
5884
|
+
/**
|
|
5885
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5886
|
+
* @default {false}
|
|
5887
|
+
*/
|
|
5888
|
+
onDark: {
|
|
5889
|
+
type: Boolean,
|
|
5890
|
+
attribute: "ondark",
|
|
5891
|
+
reflect: true
|
|
5892
|
+
},
|
|
5893
|
+
|
|
5894
|
+
/**
|
|
5895
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5896
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5897
|
+
* @type {HTMLElement|null}
|
|
5898
|
+
* @default {null}
|
|
5899
|
+
* @private
|
|
5900
|
+
*/
|
|
5901
|
+
wrapper: {
|
|
5902
|
+
attribute: false,
|
|
5903
|
+
reflect: false
|
|
5904
|
+
}
|
|
5905
|
+
};
|
|
5906
|
+
}
|
|
5907
|
+
|
|
5908
|
+
|
|
5909
|
+
|
|
5910
|
+
resetShapeClasses() {
|
|
5911
|
+
if (this.shape && this.size) {
|
|
5912
|
+
|
|
5913
|
+
if (this.wrapper) {
|
|
5914
|
+
this.wrapper.classList.forEach((className) => {
|
|
5915
|
+
if (className.startsWith('shape-')) {
|
|
5916
|
+
this.wrapper.classList.remove(className);
|
|
5917
|
+
}
|
|
5918
|
+
});
|
|
5919
|
+
|
|
5920
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5921
|
+
}
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
|
|
5925
|
+
resetLayoutClasses() {
|
|
5926
|
+
if (this.layout) {
|
|
5927
|
+
if (this.wrapper) {
|
|
5928
|
+
this.wrapper.classList.forEach((className) => {
|
|
5929
|
+
if (className.startsWith('layout-')) {
|
|
5930
|
+
this.wrapper.classList.remove(className);
|
|
5931
|
+
}
|
|
5932
|
+
});
|
|
5933
|
+
|
|
5934
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
5935
|
+
}
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
|
|
5939
|
+
updateComponentArchitecture() {
|
|
5940
|
+
this.resetLayoutClasses();
|
|
5941
|
+
this.resetShapeClasses();
|
|
5942
|
+
}
|
|
5943
|
+
|
|
5944
|
+
updated(changedProperties) {
|
|
5945
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
5946
|
+
this.updateComponentArchitecture();
|
|
5947
|
+
}
|
|
5948
|
+
}
|
|
5949
|
+
|
|
5950
|
+
firstUpdated() {
|
|
5951
|
+
super.firstUpdated();
|
|
5952
|
+
|
|
5953
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
5954
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5955
|
+
|
|
5956
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
5957
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
5958
|
+
}
|
|
5959
|
+
|
|
5960
|
+
disconnectedCallback() {
|
|
5961
|
+
super.disconnectedCallback();
|
|
5962
|
+
|
|
5963
|
+
// Cleanup the ARIA observer if it exists
|
|
5964
|
+
if (this.attributeWatcher) {
|
|
5965
|
+
this.attributeWatcher.cleanup();
|
|
5966
|
+
this.attributeWatcher = null;
|
|
5967
|
+
}
|
|
5968
|
+
}
|
|
5969
|
+
|
|
5970
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
5971
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
5972
|
+
render() {
|
|
5973
|
+
try {
|
|
5974
|
+
return this.renderLayout();
|
|
5975
|
+
} catch (error) {
|
|
5976
|
+
// failed to get the defined layout
|
|
5977
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
5978
|
+
|
|
5979
|
+
// fallback to the default layout
|
|
5980
|
+
return this.getLayout('default');
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
};
|
|
5984
|
+
|
|
5985
|
+
var styleCss$3 = css`: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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}.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([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset{padding-inline:var(--ds-size-150, 0.75rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-150, 0.75rem)*2)}:host([size=sm]) .inset{padding-inline:var(--ds-size-200, 1rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-200, 1rem)*2)}:host([size=md]) .inset{padding-inline:var(--ds-size-300, 1.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-300, 1.5rem)*2)}:host([size=lg]) .inset{padding-inline:var(--ds-size-400, 2rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-400, 2rem)*2)}:host([size=xl]) .inset{padding-inline:var(--ds-size-500, 2.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-500, 2.5rem)*2)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display: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:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(0.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}`;
|
|
5986
|
+
|
|
5987
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.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,.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,.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,.auro-button:not([ondark])[variant=ghost]:focus-visible{border-color:transparent;--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,.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,.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,.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,.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));--ds-auro-button-border-color: transparent}.auro-button[ondark][variant=ghost]:focus,.auro-button[ondark][variant=ghost]:focus-visible{border-color:transparent;--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,.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)}`;
|
|
5988
|
+
|
|
5989
|
+
var tokensCss$2 = css`: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}`;
|
|
5990
|
+
|
|
5991
|
+
var shapeSize = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;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;overflow:hidden;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;overflow:hidden;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-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;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-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.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;overflow:hidden;border-radius:24px 0 0 24px}.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;overflow:hidden;border-radius:0 24px 24px 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}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}`;
|
|
5992
|
+
|
|
5993
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5994
|
+
// See LICENSE in the project root for license information.
|
|
5995
|
+
|
|
5996
|
+
// ---------------------------------------------------------------------
|
|
5997
|
+
|
|
5998
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5999
|
+
|
|
6000
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6001
|
+
|
|
6002
|
+
/* eslint-disable jsdoc/require-param */
|
|
6003
|
+
|
|
6004
|
+
/**
|
|
6005
|
+
* This will register a new custom element with the browser.
|
|
6006
|
+
* @param {String} name - The name of the custom element.
|
|
6007
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6008
|
+
* @returns {void}
|
|
6009
|
+
*/
|
|
6010
|
+
registerComponent(name, componentClass) {
|
|
6011
|
+
if (!customElements.get(name)) {
|
|
6012
|
+
customElements.define(name, class extends componentClass {});
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
/**
|
|
6017
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6018
|
+
* @returns {void}
|
|
6019
|
+
*/
|
|
6020
|
+
closestElement(
|
|
6021
|
+
selector, // selector like in .closest()
|
|
6022
|
+
base = this, // extra functionality to skip a parent
|
|
6023
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6024
|
+
!el || el === document || el === window
|
|
6025
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6026
|
+
: found
|
|
6027
|
+
? found // found a selector INside this element
|
|
6028
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6029
|
+
) {
|
|
6030
|
+
return __Closest(base);
|
|
6031
|
+
}
|
|
6032
|
+
/* eslint-enable jsdoc/require-param */
|
|
6033
|
+
|
|
6034
|
+
/**
|
|
6035
|
+
* 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.
|
|
6036
|
+
* @param {Object} elem - The element to check.
|
|
6037
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6038
|
+
* @returns {void}
|
|
6039
|
+
*/
|
|
6040
|
+
handleComponentTagRename(elem, tagName) {
|
|
6041
|
+
const tag = tagName.toLowerCase();
|
|
6042
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6043
|
+
|
|
6044
|
+
if (elemTag !== tag) {
|
|
6045
|
+
elem.setAttribute(tag, true);
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
/**
|
|
6050
|
+
* Validates if an element is a specific Auro component.
|
|
6051
|
+
* @param {Object} elem - The element to validate.
|
|
6052
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6053
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6054
|
+
*/
|
|
6055
|
+
elementMatch(elem, tagName) {
|
|
6056
|
+
const tag = tagName.toLowerCase();
|
|
6057
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6058
|
+
|
|
6059
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6060
|
+
}
|
|
6061
|
+
};
|
|
6062
|
+
|
|
6063
|
+
var styleCss$2 = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}: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}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}`;
|
|
6064
|
+
|
|
6065
|
+
var colorCss$1 = css`: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}`;
|
|
6066
|
+
|
|
6067
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6068
|
+
|
|
6069
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6070
|
+
// See LICENSE in the project root for license information.
|
|
6071
|
+
|
|
6072
|
+
|
|
6073
|
+
class AuroLoader extends LitElement {
|
|
6074
|
+
constructor() {
|
|
6075
|
+
super();
|
|
6076
|
+
|
|
6077
|
+
/**
|
|
6078
|
+
* @private
|
|
6079
|
+
*/
|
|
6080
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6081
|
+
|
|
6082
|
+
/**
|
|
6083
|
+
* @private
|
|
6084
|
+
*/
|
|
6085
|
+
this.mdCount = 3;
|
|
6086
|
+
|
|
6087
|
+
/**
|
|
6088
|
+
* @private
|
|
6089
|
+
*/
|
|
6090
|
+
this.smCount = 2;
|
|
6091
|
+
|
|
6092
|
+
/**
|
|
6093
|
+
* @private
|
|
6094
|
+
*/
|
|
6095
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6096
|
+
|
|
6097
|
+
this.orbit = false;
|
|
6098
|
+
this.ringworm = false;
|
|
6099
|
+
this.laser = false;
|
|
6100
|
+
this.pulse = false;
|
|
6101
|
+
}
|
|
6102
|
+
|
|
6103
|
+
// function to define props used within the scope of this component
|
|
6104
|
+
static get properties() {
|
|
6105
|
+
return {
|
|
6106
|
+
|
|
6107
|
+
/**
|
|
6108
|
+
* Sets loader to laser type.
|
|
6109
|
+
*/
|
|
6110
|
+
laser: {
|
|
6111
|
+
type: Boolean,
|
|
6112
|
+
reflect: true
|
|
6113
|
+
},
|
|
6114
|
+
|
|
6115
|
+
/**
|
|
6116
|
+
* Sets loader to orbit type.
|
|
6117
|
+
*/
|
|
6118
|
+
orbit: {
|
|
6119
|
+
type: Boolean,
|
|
6120
|
+
reflect: true
|
|
6121
|
+
},
|
|
6122
|
+
|
|
6123
|
+
/**
|
|
6124
|
+
* Sets loader to pulse type.
|
|
6125
|
+
*/
|
|
6126
|
+
pulse: {
|
|
6127
|
+
type: Boolean,
|
|
6128
|
+
reflect: true
|
|
6129
|
+
},
|
|
6130
|
+
|
|
6131
|
+
/**
|
|
6132
|
+
* Sets loader to ringworm type.
|
|
6133
|
+
*/
|
|
6134
|
+
ringworm: {
|
|
6135
|
+
type: Boolean,
|
|
6136
|
+
reflect: true
|
|
6137
|
+
}
|
|
6138
|
+
};
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
static get styles() {
|
|
6142
|
+
return [
|
|
6143
|
+
css`${styleCss$2}`,
|
|
6144
|
+
css`${colorCss$1}`,
|
|
6145
|
+
css`${tokensCss$1}`
|
|
6146
|
+
];
|
|
6147
|
+
}
|
|
6148
|
+
|
|
6149
|
+
/**
|
|
6150
|
+
* This will register this element with the browser.
|
|
6151
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6152
|
+
*
|
|
6153
|
+
* @example
|
|
6154
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6155
|
+
*
|
|
6156
|
+
*/
|
|
6157
|
+
static register(name = "auro-loader") {
|
|
6158
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6159
|
+
}
|
|
6160
|
+
|
|
6161
|
+
firstUpdated() {
|
|
6162
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6163
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
connectedCallback() {
|
|
6167
|
+
super.connectedCallback();
|
|
6168
|
+
}
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* @private
|
|
6172
|
+
* @returns {Array} Numbered array for template map.
|
|
6173
|
+
*/
|
|
6174
|
+
defineTemplate() {
|
|
6175
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6176
|
+
|
|
6177
|
+
if (this.orbit || this.laser) {
|
|
6178
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6179
|
+
} else if (this.ringworm) {
|
|
6180
|
+
nodes = Array.from(Array(0).keys());
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
return nodes;
|
|
6184
|
+
}
|
|
6185
|
+
|
|
6186
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6187
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6188
|
+
|
|
6189
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6190
|
+
render() {
|
|
6191
|
+
return html$1`
|
|
6192
|
+
${this.defineTemplate().map((idx) => html$1`
|
|
6193
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6194
|
+
`)}
|
|
6195
|
+
|
|
6196
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6197
|
+
|
|
6198
|
+
${this.ringworm ? html$1`
|
|
6199
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6200
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6201
|
+
</svg>`
|
|
6202
|
+
: ``
|
|
6203
|
+
}
|
|
6204
|
+
`;
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
|
|
6208
|
+
var loaderVersion = '5.1.0';
|
|
6209
|
+
|
|
6210
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6211
|
+
// See LICENSE in the project root for license information.
|
|
6212
|
+
|
|
6213
|
+
|
|
6214
|
+
/**
|
|
6215
|
+
* @slot - Default slot for the text of the button.
|
|
6216
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6217
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6218
|
+
* @csspart text - Apply CSS to text slot.
|
|
6219
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6220
|
+
*/
|
|
6221
|
+
|
|
6222
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6223
|
+
|
|
6224
|
+
/**
|
|
6225
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6226
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6227
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6228
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6229
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6230
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6231
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6232
|
+
*/
|
|
6233
|
+
class AuroButton extends AuroElement$1 {
|
|
6234
|
+
|
|
6235
|
+
/**
|
|
6236
|
+
* Enables form association for this element.
|
|
6237
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6238
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6239
|
+
*/
|
|
6240
|
+
static get formAssociated() {
|
|
6241
|
+
return true;
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
constructor() {
|
|
6245
|
+
super();
|
|
6246
|
+
this.autofocus = false;
|
|
6247
|
+
this.disabled = false;
|
|
6248
|
+
this.loading = false;
|
|
6249
|
+
this.size = "md";
|
|
6250
|
+
this.shape = "rounded";
|
|
6251
|
+
this.onDark = false;
|
|
6252
|
+
this.fluid = false;
|
|
6253
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6254
|
+
this.variant = 'primary';
|
|
6255
|
+
|
|
6256
|
+
// Support for HTML5 forms
|
|
6257
|
+
if (typeof this.attachInternals === 'function') {
|
|
6258
|
+
this.internals = this.attachInternals();
|
|
6259
|
+
} else {
|
|
6260
|
+
this.internals = null;
|
|
6261
|
+
|
|
6262
|
+
// eslint-disable-next-line no-console
|
|
6263
|
+
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.');
|
|
6264
|
+
}
|
|
6265
|
+
|
|
6266
|
+
/**
|
|
6267
|
+
* Generate unique names for dependency components.
|
|
6268
|
+
*/
|
|
6269
|
+
const versioning = new AuroDependencyVersioning();
|
|
6270
|
+
|
|
6271
|
+
/**
|
|
6272
|
+
* @private
|
|
6273
|
+
*/
|
|
6274
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6275
|
+
|
|
6276
|
+
/**
|
|
6277
|
+
* @private
|
|
6278
|
+
*/
|
|
6279
|
+
this.buttonHref = undefined;
|
|
6280
|
+
|
|
6281
|
+
/**
|
|
6282
|
+
* @private
|
|
6283
|
+
*/
|
|
6284
|
+
this.buttonTarget = undefined;
|
|
6285
|
+
|
|
6286
|
+
/**
|
|
6287
|
+
* @private
|
|
6288
|
+
*/
|
|
6289
|
+
this.buttonRel = undefined;
|
|
6290
|
+
}
|
|
6291
|
+
|
|
6292
|
+
static get styles() {
|
|
6293
|
+
return [
|
|
6294
|
+
tokensCss$2,
|
|
6295
|
+
styleCss$3,
|
|
6296
|
+
colorCss$2,
|
|
6297
|
+
shapeSize
|
|
6298
|
+
];
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
static get properties() {
|
|
6302
|
+
return {
|
|
6303
|
+
|
|
6304
|
+
...super.properties,
|
|
6305
|
+
|
|
6306
|
+
/**
|
|
6307
|
+
* Override layout since it isn't used in this component.
|
|
6308
|
+
* @private
|
|
6309
|
+
*/
|
|
6310
|
+
layout: {
|
|
6311
|
+
type: Boolean,
|
|
6312
|
+
attribute: false,
|
|
6313
|
+
reflect: false
|
|
6314
|
+
},
|
|
6315
|
+
|
|
6316
|
+
/**
|
|
6317
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6318
|
+
*/
|
|
6319
|
+
autofocus: {
|
|
6320
|
+
type: Boolean,
|
|
6321
|
+
reflect: true
|
|
6322
|
+
},
|
|
6323
|
+
|
|
6324
|
+
/**
|
|
6325
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6326
|
+
*/
|
|
6327
|
+
disabled: {
|
|
6328
|
+
type: Boolean,
|
|
6329
|
+
reflect: true
|
|
6330
|
+
},
|
|
6331
|
+
|
|
6332
|
+
/**
|
|
6333
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6334
|
+
*/
|
|
6335
|
+
fluid: {
|
|
6336
|
+
type: Boolean,
|
|
6337
|
+
reflect: true
|
|
6338
|
+
},
|
|
6339
|
+
|
|
6340
|
+
/**
|
|
6341
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6342
|
+
*/
|
|
6343
|
+
loading: {
|
|
6344
|
+
type: Boolean,
|
|
6345
|
+
reflect: true
|
|
6346
|
+
},
|
|
6347
|
+
|
|
6348
|
+
/**
|
|
6349
|
+
* 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.
|
|
6350
|
+
*/
|
|
6351
|
+
loadingText: {
|
|
6352
|
+
type: String
|
|
6353
|
+
},
|
|
6354
|
+
|
|
6355
|
+
/**
|
|
6356
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6357
|
+
*/
|
|
6358
|
+
tIndex: {
|
|
6359
|
+
type: String,
|
|
6360
|
+
reflect: true
|
|
6361
|
+
},
|
|
6362
|
+
|
|
6363
|
+
/**
|
|
6364
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6365
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6366
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6367
|
+
*/
|
|
6368
|
+
tabindex: {
|
|
6369
|
+
type: String,
|
|
6370
|
+
reflect: false
|
|
6371
|
+
},
|
|
6372
|
+
|
|
6373
|
+
/**
|
|
6374
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6375
|
+
*/
|
|
6376
|
+
title: {
|
|
6377
|
+
type: String,
|
|
6378
|
+
reflect: true
|
|
6379
|
+
},
|
|
6380
|
+
|
|
6381
|
+
/**
|
|
6382
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6383
|
+
*/
|
|
6384
|
+
type: {
|
|
6385
|
+
type: String,
|
|
6386
|
+
reflect: true
|
|
6387
|
+
},
|
|
6388
|
+
|
|
6389
|
+
/**
|
|
6390
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6391
|
+
*/
|
|
6392
|
+
value: {
|
|
6393
|
+
type: String,
|
|
6394
|
+
reflect: true
|
|
6395
|
+
},
|
|
6396
|
+
|
|
6397
|
+
/**
|
|
6398
|
+
* Sets button variant option.
|
|
6399
|
+
* @default primary
|
|
6400
|
+
*/
|
|
6401
|
+
variant: {
|
|
6402
|
+
type: String,
|
|
6403
|
+
reflect: true
|
|
6404
|
+
},
|
|
6405
|
+
|
|
6406
|
+
/**
|
|
6407
|
+
* @private
|
|
6408
|
+
*/
|
|
6409
|
+
buttonHref: {
|
|
6410
|
+
type: String,
|
|
6411
|
+
},
|
|
6412
|
+
|
|
6413
|
+
/**
|
|
6414
|
+
* @private
|
|
6415
|
+
*/
|
|
6416
|
+
buttonTarget: {
|
|
6417
|
+
type: String,
|
|
6418
|
+
},
|
|
6419
|
+
|
|
6420
|
+
/**
|
|
6421
|
+
* @private
|
|
6422
|
+
*/
|
|
6423
|
+
buttonRel: {
|
|
6424
|
+
type: String,
|
|
6425
|
+
},
|
|
6426
|
+
};
|
|
6427
|
+
}
|
|
6428
|
+
|
|
6429
|
+
/**
|
|
6430
|
+
* This will register this element with the browser.
|
|
6431
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6432
|
+
*
|
|
6433
|
+
* @example
|
|
6434
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6435
|
+
*
|
|
6436
|
+
*/
|
|
6437
|
+
static register(name = "auro-button") {
|
|
6438
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6439
|
+
}
|
|
6440
|
+
|
|
6441
|
+
/**
|
|
6442
|
+
* Internal method to apply focus to the HTML5 button.
|
|
5027
6443
|
* @private
|
|
5028
|
-
* @returns {
|
|
6444
|
+
* @returns {void}
|
|
5029
6445
|
*/
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
return html`
|
|
5033
|
-
<div>
|
|
5034
|
-
<div
|
|
5035
|
-
id="trigger"
|
|
5036
|
-
class="trigger"
|
|
5037
|
-
part="trigger"
|
|
5038
|
-
tabindex="${this.tabIndex}"
|
|
5039
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5040
|
-
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5041
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5042
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5043
|
-
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5044
|
-
>
|
|
5045
|
-
<div class="triggerContentWrapper">
|
|
5046
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5047
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5048
|
-
</label>
|
|
5049
|
-
<div class="triggerContent">
|
|
5050
|
-
<slot
|
|
5051
|
-
name="trigger"
|
|
5052
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5053
|
-
</div>
|
|
5054
|
-
</div>
|
|
5055
|
-
${this.chevron || this.common ? html`
|
|
5056
|
-
<div
|
|
5057
|
-
id="showStateIcon"
|
|
5058
|
-
part="chevron">
|
|
5059
|
-
<${this.iconTag}
|
|
5060
|
-
category="interface"
|
|
5061
|
-
name="chevron-down"
|
|
5062
|
-
?onDark="${this.onDark}"
|
|
5063
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5064
|
-
>
|
|
5065
|
-
</${this.iconTag}>
|
|
5066
|
-
</div>
|
|
5067
|
-
` : undefined }
|
|
5068
|
-
</div>
|
|
5069
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5070
|
-
<slot name="helpText"></slot>
|
|
5071
|
-
</${this.helpTextTag}>
|
|
5072
|
-
|
|
5073
|
-
<div id="bibSizer" part="size"></div>
|
|
5074
|
-
<${this.dropdownBibTag}
|
|
5075
|
-
id="bib"
|
|
5076
|
-
?data-show="${this.isPopoverVisible}"
|
|
5077
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5078
|
-
?common="${this.common}"
|
|
5079
|
-
?rounded="${this.common || this.rounded}"
|
|
5080
|
-
?inset="${this.common || this.inset}"
|
|
5081
|
-
>
|
|
5082
|
-
<div class="slotContent">
|
|
5083
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5084
|
-
</div>
|
|
5085
|
-
</${this.dropdownBibTag}>
|
|
5086
|
-
</div>
|
|
5087
|
-
`;
|
|
6446
|
+
focus() {
|
|
6447
|
+
this.renderRoot.querySelector('button').focus();
|
|
5088
6448
|
}
|
|
5089
6449
|
|
|
5090
6450
|
/**
|
|
5091
|
-
*
|
|
6451
|
+
* Submits the form that this button is associated with.
|
|
5092
6452
|
* @private
|
|
5093
|
-
* @returns {
|
|
6453
|
+
* @returns {void}
|
|
5094
6454
|
*/
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
'rightIndent': true
|
|
5100
|
-
};
|
|
5101
|
-
|
|
5102
|
-
return html`
|
|
5103
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
5104
|
-
`;
|
|
6455
|
+
surfaceSubmitEvent() {
|
|
6456
|
+
if (this.form) {
|
|
6457
|
+
this.form.requestSubmit();
|
|
6458
|
+
}
|
|
5105
6459
|
}
|
|
5106
6460
|
|
|
5107
6461
|
/**
|
|
5108
|
-
* Returns
|
|
6462
|
+
* Returns the form element that this button is associated with.
|
|
5109
6463
|
* @private
|
|
5110
|
-
* @returns {
|
|
6464
|
+
* @returns {HTMLFormElement | null}
|
|
5111
6465
|
*/
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
'helpText': true,
|
|
5115
|
-
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5116
|
-
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5117
|
-
};
|
|
5118
|
-
|
|
5119
|
-
return html`
|
|
5120
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
5121
|
-
`;
|
|
6466
|
+
get form() {
|
|
6467
|
+
return this.internals ? this.internals.form : null;
|
|
5122
6468
|
}
|
|
5123
6469
|
|
|
5124
6470
|
/**
|
|
5125
|
-
* Logic to determine the layout of the component.
|
|
5126
6471
|
* @private
|
|
5127
|
-
* @
|
|
5128
|
-
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
6472
|
+
* @returns {Boolean}
|
|
5129
6473
|
*/
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
switch (layout) {
|
|
5134
|
-
case 'emphasized':
|
|
5135
|
-
return this.renderLayoutEmphasized();
|
|
5136
|
-
case 'emphasized-left':
|
|
5137
|
-
return this.renderLayoutEmphasized();
|
|
5138
|
-
case 'emphasized-right':
|
|
5139
|
-
return this.renderLayoutEmphasized();
|
|
5140
|
-
case 'snowflake':
|
|
5141
|
-
return this.renderLayoutSnowflake();
|
|
5142
|
-
case 'snowflake-left':
|
|
5143
|
-
return this.renderLayoutSnowflake();
|
|
5144
|
-
case 'snowflake-right':
|
|
5145
|
-
return this.renderLayoutSnowflake();
|
|
5146
|
-
default:
|
|
5147
|
-
return this.renderLayoutClassic();
|
|
5148
|
-
}
|
|
6474
|
+
get showText() {
|
|
6475
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
5149
6476
|
}
|
|
5150
|
-
}
|
|
5151
|
-
|
|
5152
|
-
var dropdownVersion = '3.0.0';
|
|
5153
|
-
|
|
5154
|
-
var colorCss$1 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5155
|
-
|
|
5156
|
-
var styleCss$2 = css`#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]){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}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, 2.5rem)}#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)}`;
|
|
5157
|
-
|
|
5158
|
-
var tokenCss = css`: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)}`;
|
|
5159
|
-
|
|
5160
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5161
|
-
// See LICENSE in the project root for license information.
|
|
5162
|
-
|
|
5163
|
-
// ---------------------------------------------------------------------
|
|
5164
|
-
|
|
5165
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5166
|
-
|
|
5167
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5168
|
-
|
|
5169
|
-
/* eslint-disable jsdoc/require-param */
|
|
5170
6477
|
|
|
5171
6478
|
/**
|
|
5172
|
-
*
|
|
5173
|
-
* @
|
|
5174
|
-
* @
|
|
5175
|
-
* @returns {void}
|
|
6479
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6480
|
+
* @returns {string | undefined}
|
|
6481
|
+
* @private
|
|
5176
6482
|
*/
|
|
5177
|
-
|
|
5178
|
-
if (!
|
|
5179
|
-
|
|
5180
|
-
|
|
6483
|
+
get currentAriaLabel() {
|
|
6484
|
+
if (!this.attributeWatcher) return undefined;
|
|
6485
|
+
|
|
6486
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6487
|
+
return ariaLabel || undefined;
|
|
5181
6488
|
}
|
|
5182
6489
|
|
|
5183
6490
|
/**
|
|
5184
|
-
*
|
|
5185
|
-
* @returns {
|
|
6491
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6492
|
+
* @returns {string | undefined}
|
|
6493
|
+
* @private
|
|
5186
6494
|
*/
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
5193
|
-
: found
|
|
5194
|
-
? found // found a selector INside this element
|
|
5195
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5196
|
-
) {
|
|
5197
|
-
return __Closest(base);
|
|
6495
|
+
get currentAriaLabelledBy() {
|
|
6496
|
+
if (!this.attributeWatcher) return undefined;
|
|
6497
|
+
|
|
6498
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6499
|
+
return ariaLabelledBy || undefined;
|
|
5198
6500
|
}
|
|
5199
|
-
/* eslint-enable jsdoc/require-param */
|
|
5200
6501
|
|
|
5201
6502
|
/**
|
|
5202
|
-
*
|
|
5203
|
-
* @
|
|
5204
|
-
* @
|
|
5205
|
-
* @returns {void}
|
|
6503
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6504
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6505
|
+
* @private
|
|
5206
6506
|
*/
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
5210
|
-
|
|
5211
|
-
if (elemTag !== tag) {
|
|
5212
|
-
elem.setAttribute(tag, true);
|
|
5213
|
-
}
|
|
6507
|
+
get iconOnly() {
|
|
6508
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
5214
6509
|
}
|
|
5215
6510
|
|
|
5216
6511
|
/**
|
|
5217
|
-
*
|
|
5218
|
-
* @
|
|
5219
|
-
* @
|
|
5220
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6512
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6513
|
+
* @returns {string} - The font size class name.
|
|
6514
|
+
* @private
|
|
5221
6515
|
*/
|
|
5222
|
-
|
|
5223
|
-
const tag = tagName.toLowerCase();
|
|
5224
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6516
|
+
getFontSize() {
|
|
5225
6517
|
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
6518
|
+
// Size map for standard buttons
|
|
6519
|
+
const standardButtonSizeMap = {
|
|
6520
|
+
xs: 'body-xs',
|
|
6521
|
+
sm: 'body-sm',
|
|
6522
|
+
md: 'body-default',
|
|
6523
|
+
lg: 'body-lg',
|
|
6524
|
+
xl: 'body-lg'
|
|
6525
|
+
};
|
|
5229
6526
|
|
|
5230
|
-
//
|
|
5231
|
-
|
|
6527
|
+
// Size map for icon-only buttons
|
|
6528
|
+
const iconOnlyButtonSizeMap = {
|
|
6529
|
+
xs: 'heading-xs',
|
|
6530
|
+
sm: 'heading-sm',
|
|
6531
|
+
md: 'heading-sm',
|
|
6532
|
+
lg: 'heading-md',
|
|
6533
|
+
xl: 'heading-lg'
|
|
6534
|
+
};
|
|
5232
6535
|
|
|
6536
|
+
// Determine which map to use based on the shape
|
|
6537
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
5233
6538
|
|
|
5234
|
-
|
|
6539
|
+
// Return the font size based on the button size and shape
|
|
6540
|
+
return sizeMap[this.size] || 'body-default';
|
|
6541
|
+
}
|
|
5235
6542
|
|
|
5236
6543
|
/**
|
|
5237
|
-
*
|
|
6544
|
+
* Renders the default layout for the button.
|
|
6545
|
+
* @returns {TemplateResult}
|
|
5238
6546
|
* @private
|
|
5239
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5240
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5241
|
-
* @returns {string} - Unique string to be used for naming.
|
|
5242
6547
|
*/
|
|
5243
|
-
|
|
5244
|
-
let result = baseName;
|
|
6548
|
+
renderLayoutDefault() {
|
|
5245
6549
|
|
|
5246
|
-
|
|
5247
|
-
|
|
6550
|
+
const fontSize = this.getFontSize();
|
|
6551
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
6552
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5248
6553
|
|
|
5249
|
-
|
|
6554
|
+
const classes = {
|
|
6555
|
+
"auro-button": true,
|
|
6556
|
+
"inset": this.showText,
|
|
6557
|
+
wrapper: true,
|
|
6558
|
+
loading: this.loading,
|
|
6559
|
+
[`${fontSize}`]: true,
|
|
6560
|
+
|
|
6561
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6562
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6563
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6564
|
+
};
|
|
6565
|
+
|
|
6566
|
+
const contentClasses = {
|
|
6567
|
+
"contentWrapper": true,
|
|
6568
|
+
"util_displayHiddenVisually": this.loading
|
|
6569
|
+
};
|
|
6570
|
+
|
|
6571
|
+
return html`
|
|
6572
|
+
<${tag}
|
|
6573
|
+
part="${part}"
|
|
6574
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6575
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6576
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
6577
|
+
?autofocus="${this.autofocus}"
|
|
6578
|
+
class=${classMap(classes)}
|
|
6579
|
+
?disabled="${this.disabled || this.loading}"
|
|
6580
|
+
?onDark="${this.onDark}"
|
|
6581
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
6582
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
6583
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
6584
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6585
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6586
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6587
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
6588
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
6589
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
6590
|
+
>
|
|
6591
|
+
${ifDefined(this.loading ? html`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6592
|
+
|
|
6593
|
+
<span class="${classMap(contentClasses)}">
|
|
6594
|
+
<span class="textSlot" part="text">
|
|
6595
|
+
<slot></slot>
|
|
6596
|
+
</span>
|
|
6597
|
+
</span>
|
|
6598
|
+
</${tag}>
|
|
6599
|
+
`;
|
|
5250
6600
|
}
|
|
5251
6601
|
|
|
5252
6602
|
/**
|
|
5253
|
-
*
|
|
5254
|
-
* @
|
|
5255
|
-
* @
|
|
5256
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6603
|
+
* Renders the layout of the button.
|
|
6604
|
+
* @returns {TemplateResult}
|
|
6605
|
+
* @private
|
|
5257
6606
|
*/
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5261
|
-
|
|
5262
|
-
if (!customElements.get(elementName)) {
|
|
5263
|
-
customElements.define(elementName, class extends tagClass {});
|
|
5264
|
-
}
|
|
5265
|
-
|
|
5266
|
-
return tag;
|
|
6607
|
+
renderLayout() {
|
|
6608
|
+
return this.renderLayoutDefault();
|
|
5267
6609
|
}
|
|
5268
6610
|
}
|
|
5269
6611
|
|
|
6612
|
+
var buttonVersion = '11.3.0';
|
|
6613
|
+
|
|
5270
6614
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5271
6615
|
// See LICENSE in the project root for license information.
|
|
5272
6616
|
|
|
@@ -5417,9 +6761,9 @@ class BaseIcon extends AuroElement {
|
|
|
5417
6761
|
}
|
|
5418
6762
|
}
|
|
5419
6763
|
|
|
5420
|
-
var tokensCss$
|
|
6764
|
+
var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
5421
6765
|
|
|
5422
|
-
var colorCss$
|
|
6766
|
+
var colorCss$4 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5423
6767
|
|
|
5424
6768
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5425
6769
|
// See LICENSE in the project root for license information.
|
|
@@ -5428,7 +6772,7 @@ var colorCss$2 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5428
6772
|
|
|
5429
6773
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5430
6774
|
|
|
5431
|
-
let AuroLibraryRuntimeUtils$
|
|
6775
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5432
6776
|
|
|
5433
6777
|
/* eslint-disable jsdoc/require-param */
|
|
5434
6778
|
|
|
@@ -5510,7 +6854,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5510
6854
|
*/
|
|
5511
6855
|
privateDefaults() {
|
|
5512
6856
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5513
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6857
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
5514
6858
|
}
|
|
5515
6859
|
|
|
5516
6860
|
// function to define props used within the scope of this component
|
|
@@ -5577,9 +6921,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5577
6921
|
static get styles() {
|
|
5578
6922
|
return [
|
|
5579
6923
|
super.styles,
|
|
5580
|
-
css`${tokensCss$
|
|
6924
|
+
css`${tokensCss$3}`,
|
|
5581
6925
|
css`${styleCss$1$1}`,
|
|
5582
|
-
css`${colorCss$
|
|
6926
|
+
css`${colorCss$4}`
|
|
5583
6927
|
];
|
|
5584
6928
|
}
|
|
5585
6929
|
|
|
@@ -5592,7 +6936,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5592
6936
|
*
|
|
5593
6937
|
*/
|
|
5594
6938
|
static register(name = "auro-icon") {
|
|
5595
|
-
AuroLibraryRuntimeUtils$
|
|
6939
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
5596
6940
|
}
|
|
5597
6941
|
|
|
5598
6942
|
connectedCallback() {
|
|
@@ -5613,8 +6957,12 @@ class AuroIcon extends BaseIcon {
|
|
|
5613
6957
|
async firstUpdated() {
|
|
5614
6958
|
await super.firstUpdated();
|
|
5615
6959
|
|
|
5616
|
-
|
|
5617
|
-
|
|
6960
|
+
/**
|
|
6961
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6962
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6963
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6964
|
+
*/
|
|
6965
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5618
6966
|
const svgDesc = this.svg.querySelector('desc');
|
|
5619
6967
|
|
|
5620
6968
|
if (svgDesc) {
|
|
@@ -5656,11 +7004,81 @@ class AuroIcon extends BaseIcon {
|
|
|
5656
7004
|
</div>
|
|
5657
7005
|
`;
|
|
5658
7006
|
}
|
|
5659
|
-
}
|
|
7007
|
+
}
|
|
7008
|
+
|
|
7009
|
+
var iconVersion = '8.0.4';
|
|
7010
|
+
|
|
7011
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7012
|
+
// See LICENSE in the project root for license information.
|
|
7013
|
+
|
|
7014
|
+
// ---------------------------------------------------------------------
|
|
7015
|
+
|
|
7016
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7017
|
+
|
|
7018
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
7019
|
+
|
|
7020
|
+
/* eslint-disable jsdoc/require-param */
|
|
7021
|
+
|
|
7022
|
+
/**
|
|
7023
|
+
* This will register a new custom element with the browser.
|
|
7024
|
+
* @param {String} name - The name of the custom element.
|
|
7025
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7026
|
+
* @returns {void}
|
|
7027
|
+
*/
|
|
7028
|
+
registerComponent(name, componentClass) {
|
|
7029
|
+
if (!customElements.get(name)) {
|
|
7030
|
+
customElements.define(name, class extends componentClass {});
|
|
7031
|
+
}
|
|
7032
|
+
}
|
|
7033
|
+
|
|
7034
|
+
/**
|
|
7035
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7036
|
+
* @returns {void}
|
|
7037
|
+
*/
|
|
7038
|
+
closestElement(
|
|
7039
|
+
selector, // selector like in .closest()
|
|
7040
|
+
base = this, // extra functionality to skip a parent
|
|
7041
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7042
|
+
!el || el === document || el === window
|
|
7043
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7044
|
+
: found
|
|
7045
|
+
? found // found a selector INside this element
|
|
7046
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7047
|
+
) {
|
|
7048
|
+
return __Closest(base);
|
|
7049
|
+
}
|
|
7050
|
+
/* eslint-enable jsdoc/require-param */
|
|
7051
|
+
|
|
7052
|
+
/**
|
|
7053
|
+
* 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.
|
|
7054
|
+
* @param {Object} elem - The element to check.
|
|
7055
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7056
|
+
* @returns {void}
|
|
7057
|
+
*/
|
|
7058
|
+
handleComponentTagRename(elem, tagName) {
|
|
7059
|
+
const tag = tagName.toLowerCase();
|
|
7060
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7061
|
+
|
|
7062
|
+
if (elemTag !== tag) {
|
|
7063
|
+
elem.setAttribute(tag, true);
|
|
7064
|
+
}
|
|
7065
|
+
}
|
|
7066
|
+
|
|
7067
|
+
/**
|
|
7068
|
+
* Validates if an element is a specific Auro component.
|
|
7069
|
+
* @param {Object} elem - The element to validate.
|
|
7070
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7071
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7072
|
+
*/
|
|
7073
|
+
elementMatch(elem, tagName) {
|
|
7074
|
+
const tag = tagName.toLowerCase();
|
|
7075
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5660
7076
|
|
|
5661
|
-
|
|
7077
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7078
|
+
}
|
|
7079
|
+
};
|
|
5662
7080
|
|
|
5663
|
-
var styleCss$
|
|
7081
|
+
var styleCss$5 = css`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
5664
7082
|
|
|
5665
7083
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5666
7084
|
// See LICENSE in the project root for license information.
|
|
@@ -5689,7 +7107,7 @@ class AuroHeader extends LitElement {
|
|
|
5689
7107
|
/**
|
|
5690
7108
|
* @private
|
|
5691
7109
|
*/
|
|
5692
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7110
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5693
7111
|
}
|
|
5694
7112
|
|
|
5695
7113
|
// function to define props used within the scope of this component
|
|
@@ -5707,7 +7125,7 @@ class AuroHeader extends LitElement {
|
|
|
5707
7125
|
}
|
|
5708
7126
|
|
|
5709
7127
|
static get styles() {
|
|
5710
|
-
return [styleCss$
|
|
7128
|
+
return [styleCss$5];
|
|
5711
7129
|
}
|
|
5712
7130
|
|
|
5713
7131
|
/**
|
|
@@ -5719,7 +7137,7 @@ class AuroHeader extends LitElement {
|
|
|
5719
7137
|
*
|
|
5720
7138
|
*/
|
|
5721
7139
|
static register(name = "auro-header") {
|
|
5722
|
-
AuroLibraryRuntimeUtils$
|
|
7140
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5723
7141
|
}
|
|
5724
7142
|
|
|
5725
7143
|
firstUpdated() {
|
|
@@ -5815,17 +7233,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
5815
7233
|
|
|
5816
7234
|
this.large = false;
|
|
5817
7235
|
|
|
5818
|
-
AuroLibraryRuntimeUtils$
|
|
7236
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5819
7237
|
|
|
5820
7238
|
const versioning = new AuroDependencyVersioning();
|
|
7239
|
+
|
|
7240
|
+
/**
|
|
7241
|
+
* @private
|
|
7242
|
+
*/
|
|
5821
7243
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
7244
|
+
|
|
7245
|
+
/**
|
|
7246
|
+
* @private
|
|
7247
|
+
*/
|
|
5822
7248
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7249
|
+
|
|
7250
|
+
/**
|
|
7251
|
+
* @private
|
|
7252
|
+
*/
|
|
7253
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
5823
7254
|
}
|
|
5824
7255
|
|
|
5825
7256
|
static get styles() {
|
|
5826
7257
|
return [
|
|
5827
|
-
colorCss$
|
|
5828
|
-
styleCss$
|
|
7258
|
+
colorCss$3,
|
|
7259
|
+
styleCss$4,
|
|
5829
7260
|
tokenCss
|
|
5830
7261
|
];
|
|
5831
7262
|
}
|
|
@@ -5854,7 +7285,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5854
7285
|
*
|
|
5855
7286
|
*/
|
|
5856
7287
|
static register(name = "auro-bibtemplate") {
|
|
5857
|
-
AuroLibraryRuntimeUtils$
|
|
7288
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
5858
7289
|
}
|
|
5859
7290
|
|
|
5860
7291
|
/**
|
|
@@ -5912,9 +7343,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
5912
7343
|
<div id="bibTemplate" part="bibtemplate">
|
|
5913
7344
|
${this.isFullscreen ? html`
|
|
5914
7345
|
<div id="headerContainer">
|
|
5915
|
-
|
|
7346
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
5916
7347
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
5917
|
-
|
|
7348
|
+
</${this.buttonTag}>
|
|
5918
7349
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
5919
7350
|
<slot name="header"></slot>
|
|
5920
7351
|
</${this.headerTag}>
|
|
@@ -5938,9 +7369,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
5938
7369
|
|
|
5939
7370
|
var bibTemplateVersion = '1.0.0';
|
|
5940
7371
|
|
|
5941
|
-
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-
|
|
7372
|
+
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
5942
7373
|
|
|
5943
|
-
var styleCss$1 = css
|
|
7374
|
+
var styleCss$1 = css`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
5944
7375
|
|
|
5945
7376
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5946
7377
|
|
|
@@ -6146,68 +7577,7 @@ class AuroHelpText extends LitElement {
|
|
|
6146
7577
|
|
|
6147
7578
|
var helpTextVersion = '1.0.0';
|
|
6148
7579
|
|
|
6149
|
-
css
|
|
6150
|
-
|
|
6151
|
-
css`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
6152
|
-
|
|
6153
|
-
css`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
6154
|
-
|
|
6155
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6156
|
-
// See LICENSE in the project root for license information.
|
|
6157
|
-
|
|
6158
|
-
// ---------------------------------------------------------------------
|
|
6159
|
-
|
|
6160
|
-
/**
|
|
6161
|
-
* Converts value to an array.
|
|
6162
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6163
|
-
* If the value is already an array, it is returned.
|
|
6164
|
-
* If the value is undefined, it returns undefined.
|
|
6165
|
-
* @private
|
|
6166
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6167
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6168
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6169
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6170
|
-
*/
|
|
6171
|
-
function arrayConverter(value) {
|
|
6172
|
-
// Allow undefined
|
|
6173
|
-
if (value === undefined) {
|
|
6174
|
-
return undefined;
|
|
6175
|
-
}
|
|
6176
|
-
|
|
6177
|
-
// Return the value if it is already an array
|
|
6178
|
-
if (Array.isArray(value)) {
|
|
6179
|
-
return value;
|
|
6180
|
-
}
|
|
6181
|
-
|
|
6182
|
-
try {
|
|
6183
|
-
// If value is a JSON string, parse it
|
|
6184
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6185
|
-
|
|
6186
|
-
// Check if the parsed value is an array
|
|
6187
|
-
if (Array.isArray(parsed)) {
|
|
6188
|
-
return parsed;
|
|
6189
|
-
}
|
|
6190
|
-
} catch (error) {
|
|
6191
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6192
|
-
/* eslint-disable no-console */
|
|
6193
|
-
console.error('JSON parsing failed:', error);
|
|
6194
|
-
}
|
|
6195
|
-
|
|
6196
|
-
// Throw error if the input is not an array or undefined
|
|
6197
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6198
|
-
}
|
|
6199
|
-
|
|
6200
|
-
css`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}: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([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
6201
|
-
|
|
6202
|
-
css`: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)}`;
|
|
6203
|
-
|
|
6204
|
-
css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
6205
|
-
|
|
6206
|
-
css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
6207
|
-
|
|
6208
|
-
css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
6209
|
-
|
|
6210
|
-
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;justify-content:center;align-items:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
7580
|
+
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
6211
7581
|
|
|
6212
7582
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6213
7583
|
// See LICENSE in the project root for license information.
|
|
@@ -6220,9 +7590,10 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
|
|
|
6220
7590
|
* @slot - Default slot for the menu content.
|
|
6221
7591
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6222
7592
|
* @slot label - Defines the content of the label.
|
|
7593
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6223
7594
|
* @slot helpText - Defines the content of the helpText.
|
|
6224
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6225
7595
|
* @slot valueText - Dropdown value text display.
|
|
7596
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6226
7597
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6227
7598
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6228
7599
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6240,11 +7611,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6240
7611
|
const idSubstrEnd = 8;
|
|
6241
7612
|
const idSubstrStart = 2;
|
|
6242
7613
|
|
|
6243
|
-
this.matchWidth =
|
|
7614
|
+
this.matchWidth = false;
|
|
6244
7615
|
|
|
6245
7616
|
// Layout Config
|
|
6246
|
-
this.layout = '
|
|
6247
|
-
this.shape = '
|
|
7617
|
+
this.layout = 'snowflake';
|
|
7618
|
+
this.shape = 'snowflake';
|
|
6248
7619
|
this.size = 'xl';
|
|
6249
7620
|
|
|
6250
7621
|
// floaterConfig
|
|
@@ -6255,6 +7626,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6255
7626
|
|
|
6256
7627
|
this.forceDisplayValue = false;
|
|
6257
7628
|
|
|
7629
|
+
this.layout = 'classic';
|
|
7630
|
+
this.shape = 'classic';
|
|
7631
|
+
this.size = 'xl';
|
|
7632
|
+
|
|
6258
7633
|
/**
|
|
6259
7634
|
* @private
|
|
6260
7635
|
*/
|
|
@@ -6270,7 +7645,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6270
7645
|
/**
|
|
6271
7646
|
* @private
|
|
6272
7647
|
*/
|
|
6273
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7648
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6274
7649
|
|
|
6275
7650
|
/**
|
|
6276
7651
|
* Generate unique names for dependency components.
|
|
@@ -6385,14 +7760,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6385
7760
|
reflect: true
|
|
6386
7761
|
},
|
|
6387
7762
|
|
|
6388
|
-
/**
|
|
6389
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6390
|
-
*/
|
|
6391
|
-
flexMenuWidth: {
|
|
6392
|
-
type: Boolean,
|
|
6393
|
-
reflect: true
|
|
6394
|
-
},
|
|
6395
|
-
|
|
6396
7763
|
/**
|
|
6397
7764
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6398
7765
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6486,7 +7853,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6486
7853
|
* "top" | "right" | "bottom" | "left" |
|
|
6487
7854
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6488
7855
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6489
|
-
* "left-start" | "left-end"
|
|
7856
|
+
* "left-start" | "left-end".
|
|
6490
7857
|
* @default bottom-start
|
|
6491
7858
|
*/
|
|
6492
7859
|
placement: {
|
|
@@ -6494,6 +7861,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6494
7861
|
reflect: true
|
|
6495
7862
|
},
|
|
6496
7863
|
|
|
7864
|
+
/**
|
|
7865
|
+
* Define custom placeholder text.
|
|
7866
|
+
*/
|
|
7867
|
+
placeholder: {
|
|
7868
|
+
type: String,
|
|
7869
|
+
reflect: true
|
|
7870
|
+
},
|
|
7871
|
+
|
|
6497
7872
|
/**
|
|
6498
7873
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6499
7874
|
*/
|
|
@@ -6540,11 +7915,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6540
7915
|
},
|
|
6541
7916
|
|
|
6542
7917
|
/**
|
|
6543
|
-
* Value selected for the component.
|
|
6544
|
-
* @type {String|Array<String>}
|
|
7918
|
+
* Value selected for the component.
|
|
6545
7919
|
*/
|
|
6546
7920
|
value: {
|
|
6547
|
-
type:
|
|
7921
|
+
type: String,
|
|
7922
|
+
reflect: true,
|
|
7923
|
+
attribute: 'value'
|
|
6548
7924
|
},
|
|
6549
7925
|
|
|
6550
7926
|
/**
|
|
@@ -6591,15 +7967,47 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6591
7967
|
static get styles() {
|
|
6592
7968
|
return [
|
|
6593
7969
|
css`${shapeSizeCss$1}`,
|
|
6594
|
-
css`${tokensCss$
|
|
7970
|
+
css`${tokensCss$5}`,
|
|
6595
7971
|
css`${styleCss}`,
|
|
6596
7972
|
];
|
|
6597
7973
|
}
|
|
6598
7974
|
|
|
7975
|
+
/**
|
|
7976
|
+
* Formatted value based on `multiSelect` state.
|
|
7977
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
7978
|
+
* @private
|
|
7979
|
+
* @returns {String|Array<String>}
|
|
7980
|
+
*/
|
|
7981
|
+
get formattedValue() {
|
|
7982
|
+
if (this.multiSelect) {
|
|
7983
|
+
if (!this.value) {
|
|
7984
|
+
return undefined;
|
|
7985
|
+
}
|
|
7986
|
+
if (this.value.startsWith("[")) {
|
|
7987
|
+
return JSON.parse(this.value);
|
|
7988
|
+
}
|
|
7989
|
+
return [this.value];
|
|
7990
|
+
}
|
|
7991
|
+
return this.value;
|
|
7992
|
+
}
|
|
7993
|
+
|
|
7994
|
+
/**
|
|
7995
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7996
|
+
* @private
|
|
7997
|
+
* @returns {void}
|
|
7998
|
+
*/
|
|
7999
|
+
get commonLabelClasses() {
|
|
8000
|
+
return {
|
|
8001
|
+
'is-disabled': this.disabled,
|
|
8002
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8003
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
8004
|
+
};
|
|
8005
|
+
}
|
|
8006
|
+
|
|
6599
8007
|
/**
|
|
6600
8008
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6601
8009
|
* @private
|
|
6602
|
-
* @
|
|
8010
|
+
* @returns {object} - Returns classmap.
|
|
6603
8011
|
*/
|
|
6604
8012
|
get commonWrapperClasses() {
|
|
6605
8013
|
return {
|
|
@@ -6617,10 +8025,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6617
8025
|
|
|
6618
8026
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6619
8027
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
8028
|
+
|
|
8029
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8030
|
+
// wait til the bib gets fully rendered
|
|
8031
|
+
setTimeout(() => {
|
|
8032
|
+
if (this.dropdown.isBibFullscreen) {
|
|
8033
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
8034
|
+
this.dropdown.trigger.focus();
|
|
8035
|
+
|
|
8036
|
+
// default focus indicator on the first menu option
|
|
8037
|
+
if (this.menu.index < 0) {
|
|
8038
|
+
this.menu.navigateOptions('down');
|
|
8039
|
+
}
|
|
8040
|
+
}
|
|
8041
|
+
});
|
|
8042
|
+
}
|
|
6620
8043
|
});
|
|
6621
8044
|
|
|
6622
8045
|
// setting up bibtemplate
|
|
6623
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
8046
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6624
8047
|
|
|
6625
8048
|
if (this.customBibWidth) {
|
|
6626
8049
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6639,7 +8062,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6639
8062
|
*
|
|
6640
8063
|
*/
|
|
6641
8064
|
static register(name = "auro-select") {
|
|
6642
|
-
AuroLibraryRuntimeUtils$
|
|
8065
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6643
8066
|
}
|
|
6644
8067
|
|
|
6645
8068
|
/**
|
|
@@ -6699,6 +8122,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6699
8122
|
return;
|
|
6700
8123
|
}
|
|
6701
8124
|
|
|
8125
|
+
// set menu's default size if there it's not specified.
|
|
8126
|
+
if (!this.menu.getAttribute('size')) {
|
|
8127
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8128
|
+
}
|
|
8129
|
+
|
|
8130
|
+
if (!this.getAttribute('shape')) {
|
|
8131
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8132
|
+
}
|
|
8133
|
+
|
|
6702
8134
|
if (this.multiSelect) {
|
|
6703
8135
|
this.menu.multiSelect = this.multiSelect;
|
|
6704
8136
|
}
|
|
@@ -6758,46 +8190,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6758
8190
|
configureSelect() {
|
|
6759
8191
|
|
|
6760
8192
|
this.addEventListener('keydown', (evt) => {
|
|
6761
|
-
|
|
6762
|
-
|
|
8193
|
+
// when the focus is on trigger not on close button
|
|
8194
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8195
|
+
if (evt.key === 'ArrowUp') {
|
|
8196
|
+
evt.preventDefault();
|
|
6763
8197
|
|
|
6764
|
-
|
|
8198
|
+
this.dropdown.show();
|
|
8199
|
+
|
|
8200
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8201
|
+
this.menu.navigateOptions('up');
|
|
8202
|
+
}
|
|
6765
8203
|
|
|
6766
|
-
|
|
6767
|
-
this.menu.navigateOptions('up');
|
|
8204
|
+
return;
|
|
6768
8205
|
}
|
|
6769
8206
|
|
|
6770
|
-
|
|
6771
|
-
|
|
8207
|
+
if (evt.key === 'ArrowDown') {
|
|
8208
|
+
evt.preventDefault();
|
|
6772
8209
|
|
|
6773
|
-
|
|
6774
|
-
evt.preventDefault();
|
|
8210
|
+
this.dropdown.show();
|
|
6775
8211
|
|
|
6776
|
-
|
|
8212
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8213
|
+
this.menu.navigateOptions('down');
|
|
8214
|
+
}
|
|
6777
8215
|
|
|
6778
|
-
|
|
6779
|
-
this.menu.navigateOptions('down');
|
|
8216
|
+
return;
|
|
6780
8217
|
}
|
|
6781
8218
|
|
|
6782
|
-
|
|
6783
|
-
|
|
8219
|
+
if (evt.key === 'Enter') {
|
|
8220
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8221
|
+
evt.preventDefault();
|
|
8222
|
+
this.menu.makeSelection();
|
|
8223
|
+
}
|
|
6784
8224
|
|
|
6785
|
-
|
|
6786
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6787
|
-
evt.preventDefault();
|
|
6788
|
-
this.menu.makeSelection();
|
|
8225
|
+
return;
|
|
6789
8226
|
}
|
|
6790
|
-
|
|
6791
|
-
return;
|
|
6792
8227
|
}
|
|
6793
8228
|
|
|
6794
|
-
if (evt.key === 'Tab') {
|
|
8229
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6795
8230
|
if (this.dropdown.isBibFullscreen) {
|
|
6796
8231
|
evt.preventDefault();
|
|
8232
|
+
|
|
8233
|
+
// when the focus is on trigger not on close button
|
|
8234
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8235
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8236
|
+
// when bib it not open, it will focus onto trigger.
|
|
8237
|
+
this.dropdown.focus();
|
|
8238
|
+
} else {
|
|
8239
|
+
// when close button has the focus, move focus back to the trigger
|
|
8240
|
+
this.dropdown.trigger.focus();
|
|
8241
|
+
}
|
|
6797
8242
|
} else {
|
|
6798
8243
|
this.dropdown.hide();
|
|
6799
8244
|
}
|
|
6800
|
-
|
|
6801
8245
|
return;
|
|
6802
8246
|
}
|
|
6803
8247
|
|
|
@@ -6962,34 +8406,39 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6962
8406
|
// Add the tag name as an attribute if it is different than the component name
|
|
6963
8407
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
6964
8408
|
|
|
6965
|
-
this.configureMenu();
|
|
6966
8409
|
this.configureDropdown();
|
|
8410
|
+
this.configureMenu();
|
|
6967
8411
|
this.configureSelect();
|
|
8412
|
+
}
|
|
6968
8413
|
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
8414
|
+
/**
|
|
8415
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8416
|
+
* @param {string} value - The value to set in the menu.
|
|
8417
|
+
* @returns {void}
|
|
8418
|
+
* @private
|
|
8419
|
+
*/
|
|
8420
|
+
async updateMenuValue(value) {
|
|
8421
|
+
if (!this.menu) return;
|
|
8422
|
+
|
|
8423
|
+
this.menu.setAttribute('value', value);
|
|
8424
|
+
this.menu.value = value;
|
|
8425
|
+
await this.menu.updateComplete;
|
|
6974
8426
|
}
|
|
6975
8427
|
|
|
6976
8428
|
async updated(changedProperties) {
|
|
6977
|
-
if (changedProperties.has('multiSelect')) {
|
|
8429
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
6978
8430
|
this.clearSelection();
|
|
6979
8431
|
}
|
|
6980
8432
|
|
|
6981
8433
|
if (changedProperties.has('value')) {
|
|
6982
8434
|
if (this.value) {
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
this.menu.value = this.value;
|
|
8435
|
+
await this.updateMenuValue(this.value);
|
|
6986
8436
|
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8437
|
+
if (this.menu) {
|
|
8438
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8439
|
+
}
|
|
6991
8440
|
} else {
|
|
6992
|
-
this.
|
|
8441
|
+
await this.updateMenuValue(undefined);
|
|
6993
8442
|
}
|
|
6994
8443
|
|
|
6995
8444
|
this._updateNativeSelect();
|
|
@@ -7008,7 +8457,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7008
8457
|
composed: true,
|
|
7009
8458
|
detail: {
|
|
7010
8459
|
optionSelected: this.optionSelected,
|
|
7011
|
-
value: this.
|
|
8460
|
+
value: this.formattedValue
|
|
7012
8461
|
}
|
|
7013
8462
|
}));
|
|
7014
8463
|
}
|
|
@@ -7020,6 +8469,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7020
8469
|
if (changedProperties.has('error')) {
|
|
7021
8470
|
this.validate(true);
|
|
7022
8471
|
}
|
|
8472
|
+
|
|
8473
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8474
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8475
|
+
}
|
|
8476
|
+
|
|
8477
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8478
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8479
|
+
}
|
|
7023
8480
|
}
|
|
7024
8481
|
|
|
7025
8482
|
/**
|
|
@@ -7059,13 +8516,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7059
8516
|
const selectedValue = selectedOption.value;
|
|
7060
8517
|
|
|
7061
8518
|
if (this.multiSelect) {
|
|
7062
|
-
const currentArray =
|
|
8519
|
+
const currentArray = this.formattedValue;
|
|
7063
8520
|
|
|
7064
8521
|
if (!currentArray.includes(selectedValue)) {
|
|
7065
|
-
this.value = [
|
|
8522
|
+
this.value = JSON.stringify([
|
|
7066
8523
|
...currentArray,
|
|
7067
8524
|
selectedValue
|
|
7068
|
-
];
|
|
8525
|
+
]);
|
|
7069
8526
|
}
|
|
7070
8527
|
} else {
|
|
7071
8528
|
const currentValue = this.value;
|
|
@@ -7088,12 +8545,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7088
8545
|
}
|
|
7089
8546
|
|
|
7090
8547
|
if (this.multiSelect) {
|
|
7091
|
-
nativeSelect.value = this.
|
|
8548
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7092
8549
|
} else {
|
|
7093
8550
|
nativeSelect.value = this.value || '';
|
|
7094
8551
|
}
|
|
7095
8552
|
}
|
|
7096
8553
|
|
|
8554
|
+
/**
|
|
8555
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8556
|
+
* @private
|
|
8557
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8558
|
+
*/
|
|
7097
8559
|
renderAriaHtml() {
|
|
7098
8560
|
return html`
|
|
7099
8561
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7114,9 +8576,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7114
8576
|
`;
|
|
7115
8577
|
}
|
|
7116
8578
|
|
|
8579
|
+
/**
|
|
8580
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8581
|
+
* @private
|
|
8582
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8583
|
+
*/
|
|
7117
8584
|
renderNativeSelect() {
|
|
7118
8585
|
return html`
|
|
7119
|
-
<div class="nativeSelectWrapper">
|
|
8586
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7120
8587
|
<select
|
|
7121
8588
|
tabindex="-1"
|
|
7122
8589
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7153,14 +8620,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7153
8620
|
? html`
|
|
7154
8621
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7155
8622
|
<p id="${this.uniqueId}" part="helpText">
|
|
7156
|
-
<slot name="
|
|
8623
|
+
<slot name="helpText"></slot>
|
|
7157
8624
|
</p>
|
|
7158
8625
|
</${this.helpTextTag}>
|
|
7159
8626
|
`
|
|
7160
8627
|
: html`
|
|
7161
8628
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7162
8629
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7163
|
-
|
|
8630
|
+
${this.errorMessage}
|
|
7164
8631
|
</p>
|
|
7165
8632
|
</${this.helpTextTag}>
|
|
7166
8633
|
`
|
|
@@ -7173,17 +8640,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7173
8640
|
* @private
|
|
7174
8641
|
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7175
8642
|
*/
|
|
7176
|
-
// TODO update to use util class
|
|
7177
8643
|
renderLayoutEmphasized() {
|
|
7178
8644
|
const placeholderClass = {
|
|
7179
|
-
|
|
8645
|
+
'util_displayHidden': this.value
|
|
7180
8646
|
};
|
|
7181
8647
|
|
|
7182
8648
|
const displayValueClasses = {
|
|
7183
8649
|
'displayValue': true,
|
|
7184
8650
|
'hasContent': this.hasDisplayValueContent,
|
|
7185
8651
|
'hasFocus': this.isPopoverVisible,
|
|
7186
|
-
'withValue': this.value && this.value.length > 0,
|
|
8652
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7187
8653
|
'force': this.forceDisplayValue,
|
|
7188
8654
|
};
|
|
7189
8655
|
|
|
@@ -7200,16 +8666,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7200
8666
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7201
8667
|
</div>
|
|
7202
8668
|
<${this.dropdownTag}
|
|
8669
|
+
a11yRole="select"
|
|
7203
8670
|
?autoPlacement="${this.autoPlacement}"
|
|
7204
8671
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7205
|
-
?matchWidth="${
|
|
8672
|
+
?matchWidth="${this.matchWidth}"
|
|
7206
8673
|
?noFlip="${this.noFlip}"
|
|
7207
8674
|
?onDark="${this.onDark}"
|
|
7208
8675
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7209
8676
|
.offset="${this.offset}"
|
|
7210
8677
|
.placement="${this.placement}"
|
|
7211
8678
|
chevron
|
|
7212
|
-
fluid
|
|
7213
8679
|
for="selectMenu"
|
|
7214
8680
|
layout="${this.layout}"
|
|
7215
8681
|
part="dropdown"
|
|
@@ -7221,15 +8687,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7221
8687
|
</div>
|
|
7222
8688
|
<div class="mainContent">
|
|
7223
8689
|
<div class="${classMap(valueContainerClasses)}">
|
|
7224
|
-
<label>
|
|
8690
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7225
8691
|
<slot name="label"></slot>
|
|
8692
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7226
8693
|
</label>
|
|
7227
8694
|
<div class="value" id="value"></div>
|
|
7228
|
-
${
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
</div>
|
|
7232
|
-
`}
|
|
8695
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8696
|
+
${this.placeholder}
|
|
8697
|
+
</div>
|
|
7233
8698
|
</div>
|
|
7234
8699
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7235
8700
|
<slot name="displayValue"></slot>
|
|
@@ -7256,14 +8721,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7256
8721
|
*/
|
|
7257
8722
|
renderLayoutSnowflake() {
|
|
7258
8723
|
const placeholderClass = {
|
|
7259
|
-
|
|
8724
|
+
'util_displayHidden': this.value
|
|
7260
8725
|
};
|
|
7261
8726
|
|
|
7262
8727
|
const displayValueClasses = {
|
|
7263
8728
|
'displayValue': true,
|
|
7264
8729
|
'hasContent': this.hasDisplayValueContent,
|
|
7265
8730
|
'hasFocus': this.isPopoverVisible,
|
|
7266
|
-
'withValue': this.value && this.value.length > 0,
|
|
8731
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7267
8732
|
'force': this.forceDisplayValue,
|
|
7268
8733
|
};
|
|
7269
8734
|
|
|
@@ -7282,14 +8747,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7282
8747
|
<${this.dropdownTag}
|
|
7283
8748
|
?autoPlacement="${this.autoPlacement}"
|
|
7284
8749
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7285
|
-
?matchWidth="${
|
|
8750
|
+
?matchWidth="${this.matchWidth}"
|
|
7286
8751
|
?noFlip="${this.noFlip}"
|
|
7287
8752
|
?onDark="${this.onDark}"
|
|
7288
8753
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7289
8754
|
.offset="${this.offset}"
|
|
7290
8755
|
.placement="${this.placement}"
|
|
7291
8756
|
chevron
|
|
7292
|
-
fluid
|
|
7293
8757
|
for="selectMenu"
|
|
7294
8758
|
layout="${this.layout}"
|
|
7295
8759
|
part="dropdown"
|
|
@@ -7301,15 +8765,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7301
8765
|
</div>
|
|
7302
8766
|
<div class="mainContent">
|
|
7303
8767
|
<div class="${classMap(valueContainerClasses)}">
|
|
7304
|
-
<label>
|
|
8768
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7305
8769
|
<slot name="label"></slot>
|
|
8770
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7306
8771
|
</label>
|
|
7307
8772
|
<div class="value" id="value"></div>
|
|
7308
|
-
${
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
</div>
|
|
7312
|
-
`}
|
|
8773
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8774
|
+
${this.placeholder}
|
|
8775
|
+
</div>
|
|
7313
8776
|
</div>
|
|
7314
8777
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7315
8778
|
<slot name="displayValue"></slot>
|
|
@@ -7325,6 +8788,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7325
8788
|
${this.renderHtmlHelpText()}
|
|
7326
8789
|
</div>
|
|
7327
8790
|
</${this.dropdownTag}>
|
|
8791
|
+
${this.renderNativeSelect()}
|
|
7328
8792
|
</div>
|
|
7329
8793
|
`;
|
|
7330
8794
|
}
|
|
@@ -7335,11 +8799,75 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7335
8799
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7336
8800
|
*/
|
|
7337
8801
|
renderLayoutClassic() {
|
|
8802
|
+
const placeholderClass = {
|
|
8803
|
+
'util_displayHidden': this.value
|
|
8804
|
+
};
|
|
8805
|
+
|
|
8806
|
+
const displayValueClasses = {
|
|
8807
|
+
'displayValue': true,
|
|
8808
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8809
|
+
'hasFocus': this.isPopoverVisible,
|
|
8810
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8811
|
+
'force': this.forceDisplayValue,
|
|
8812
|
+
};
|
|
8813
|
+
|
|
8814
|
+
const valueContainerClasses = {
|
|
8815
|
+
'valueContainer': true,
|
|
8816
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8817
|
+
};
|
|
8818
|
+
|
|
7338
8819
|
return html`
|
|
7339
8820
|
<div
|
|
7340
|
-
class="${classMap(this.commonWrapperClasses)}
|
|
8821
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7341
8822
|
part="wrapper">
|
|
7342
|
-
|
|
8823
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8824
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8825
|
+
</div>
|
|
8826
|
+
<${this.dropdownTag}
|
|
8827
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8828
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8829
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8830
|
+
?noFlip="${this.noFlip}"
|
|
8831
|
+
?onDark="${this.onDark}"
|
|
8832
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8833
|
+
.offset="${this.offset}"
|
|
8834
|
+
.placement="${this.placement}"
|
|
8835
|
+
chevron
|
|
8836
|
+
for="selectMenu"
|
|
8837
|
+
layout="${this.layout}"
|
|
8838
|
+
part="dropdown"
|
|
8839
|
+
shape="${this.shape}"
|
|
8840
|
+
size="${this.size}">
|
|
8841
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8842
|
+
<div class="accents left">
|
|
8843
|
+
<slot name="typeIcon"></slot>
|
|
8844
|
+
</div>
|
|
8845
|
+
<div class="mainContent">
|
|
8846
|
+
<div class="${classMap(valueContainerClasses)}">
|
|
8847
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
8848
|
+
<slot name="label"></slot>
|
|
8849
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8850
|
+
</label>
|
|
8851
|
+
<div class="value" id="value"></div>
|
|
8852
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8853
|
+
${this.placeholder}
|
|
8854
|
+
</div>
|
|
8855
|
+
</div>
|
|
8856
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8857
|
+
<slot name="displayValue"></slot>
|
|
8858
|
+
</div>
|
|
8859
|
+
</div>
|
|
8860
|
+
<div class="accents right"></div>
|
|
8861
|
+
</div>
|
|
8862
|
+
<div class="menuWrapper"></div>
|
|
8863
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8864
|
+
<slot></slot>
|
|
8865
|
+
</${this.bibtemplateTag}>
|
|
8866
|
+
<div slot="helpText">
|
|
8867
|
+
${this.renderHtmlHelpText()}
|
|
8868
|
+
</div>
|
|
8869
|
+
</${this.dropdownTag}>
|
|
8870
|
+
${this.renderNativeSelect()}
|
|
7343
8871
|
</div>
|
|
7344
8872
|
`;
|
|
7345
8873
|
}
|
|
@@ -7373,105 +8901,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7373
8901
|
|
|
7374
8902
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7375
8903
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7376
|
-
|
|
7377
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
7378
|
-
renderBACKUP() {
|
|
7379
|
-
const placeholderClass = {
|
|
7380
|
-
hidden: this.value,
|
|
7381
|
-
};
|
|
7382
|
-
|
|
7383
|
-
return html`
|
|
7384
|
-
<div class="outerWrapper">
|
|
7385
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7386
|
-
${this.optionActive && this.options.length > 0
|
|
7387
|
-
? html`
|
|
7388
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7389
|
-
`
|
|
7390
|
-
: undefined
|
|
7391
|
-
};
|
|
7392
|
-
|
|
7393
|
-
${this.optionSelected && this.options.length > 0
|
|
7394
|
-
? html`
|
|
7395
|
-
${`${this.optionSelected.innerText} selected`}
|
|
7396
|
-
`
|
|
7397
|
-
: undefined
|
|
7398
|
-
};
|
|
7399
|
-
</div>
|
|
7400
|
-
<div id="slotHolder" aria-hidden="true">
|
|
7401
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7402
|
-
</div>
|
|
7403
|
-
<${this.dropdownTag}
|
|
7404
|
-
?autoPlacement="${this.autoPlacement}"
|
|
7405
|
-
?disabled="${this.disabled}"
|
|
7406
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7407
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
7408
|
-
?noFlip="${this.noFlip}"
|
|
7409
|
-
?onDark="${this.onDark}"
|
|
7410
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7411
|
-
.offset="${this.offset}"
|
|
7412
|
-
.placement="${this.placement}"
|
|
7413
|
-
chevron
|
|
7414
|
-
fluid
|
|
7415
|
-
for="selectMenu"
|
|
7416
|
-
layout="${this.layout}"
|
|
7417
|
-
part="dropdown"
|
|
7418
|
-
shape="${this.shape}"
|
|
7419
|
-
size="${this.size}">
|
|
7420
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
7421
|
-
<span id="placeholder"
|
|
7422
|
-
class="${classMap(placeholderClass)}"
|
|
7423
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7424
|
-
>
|
|
7425
|
-
<slot name="placeholder"></slot>
|
|
7426
|
-
</span>
|
|
7427
|
-
<slot name="valueText" id="valueText"></slot>
|
|
7428
|
-
</span>
|
|
7429
|
-
|
|
7430
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7431
|
-
<slot></slot>
|
|
7432
|
-
</${this.bibtemplateTag}>
|
|
7433
|
-
<slot name="label" slot="label"></slot>
|
|
7434
|
-
<p slot="helpText">
|
|
7435
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7436
|
-
? html`
|
|
7437
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
7438
|
-
<slot name="helpText"></slot>
|
|
7439
|
-
</span>`
|
|
7440
|
-
: html`
|
|
7441
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7442
|
-
${this.errorMessage}
|
|
7443
|
-
</span>`
|
|
7444
|
-
}
|
|
7445
|
-
</p>
|
|
7446
|
-
</${this.dropdownTag}>
|
|
7447
|
-
<div class="nativeSelectWrapper">
|
|
7448
|
-
<select
|
|
7449
|
-
tabindex="-1"
|
|
7450
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7451
|
-
name="${this.name || ''}"
|
|
7452
|
-
?disabled="${this.disabled}"
|
|
7453
|
-
?required="${this.required}"
|
|
7454
|
-
aria-hidden="true"
|
|
7455
|
-
autocomplete="${ifDefined$1(this.autocomplete)}"
|
|
7456
|
-
@change="${this._handleNativeSelectChange}">
|
|
7457
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
7458
|
-
${this.options.map((option) => {
|
|
7459
|
-
const optionValue = option.value || option.textContent;
|
|
7460
|
-
return html`
|
|
7461
|
-
<option
|
|
7462
|
-
value="${optionValue}"
|
|
7463
|
-
?selected="${this.value === optionValue}">
|
|
7464
|
-
${option.textContent}
|
|
7465
|
-
</option>
|
|
7466
|
-
`;
|
|
7467
|
-
})}
|
|
7468
|
-
</select>
|
|
7469
|
-
</div>
|
|
7470
|
-
<!-- Help text and error message template -->
|
|
7471
|
-
${this.renderHtmlHelpText()}
|
|
7472
|
-
</div>
|
|
7473
|
-
`;
|
|
7474
|
-
}
|
|
7475
8904
|
}
|
|
7476
8905
|
|
|
7477
8906
|
export { AuroSelect };
|