@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.8 → 0.0.0-pr624.81
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 +49 -15
- package/components/checkbox/demo/api.min.js +74 -46
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +74 -46
- 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 +73 -45
- package/components/checkbox/dist/registered.js +73 -45
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +115 -8
- package/components/combobox/demo/api.min.js +3148 -929
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +3148 -929
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/auro-combobox.d.ts +44 -12
- package/components/combobox/dist/index.js +2895 -816
- package/components/combobox/dist/registered.js +2895 -816
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +158 -21
- package/components/counter/demo/api.min.js +3413 -729
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +185 -34
- package/components/counter/demo/index.min.js +3413 -729
- 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 +161 -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 +3416 -732
- package/components/counter/dist/registered.js +3416 -732
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +59 -28
- package/components/datepicker/demo/api.min.js +7096 -3260
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +75 -8
- package/components/datepicker/demo/index.min.js +7096 -3260
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +151 -12
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +6810 -2974
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +6810 -2974
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +82 -275
- package/components/dropdown/demo/api.min.js +450 -261
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +450 -261
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +43 -83
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +449 -260
- package/components/dropdown/dist/registered.js +449 -260
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.min.js +2 -2
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +2 -2
- 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/auro-helptext.d.ts +0 -2
- package/components/helptext/dist/index.js +3 -5
- package/components/helptext/dist/registered.js +3 -5
- 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 -248
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +908 -248
- 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 +907 -247
- package/components/input/dist/registered.js +907 -247
- package/components/layoutElement/dist/index.js +11 -8
- package/components/layoutElement/dist/registered.js +97 -0
- package/components/menu/demo/api.html +17 -10
- package/components/menu/demo/api.md +65 -8
- package/components/menu/demo/api.min.js +298 -63
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +298 -63
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +53 -7
- package/components/menu/dist/auro-menuoption.d.ts +21 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +283 -48
- package/components/menu/dist/registered.js +283 -48
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- 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/menu/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +39 -9
- package/components/radio/demo/api.min.js +92 -96
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +92 -96
- 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 +91 -95
- package/components/radio/dist/registered.js +91 -95
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +150 -121
- package/components/select/demo/api.min.js +2213 -693
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +1066 -259
- package/components/select/demo/index.min.js +2214 -682
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +59 -21
- package/components/select/dist/index.js +2108 -716
- package/components/select/dist/registered.js +2108 -716
- package/package.json +31 -28
- /package/components/{datepicker/dist/styles/default/color-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/classic}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/styles/{emphasized → classic}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → 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/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
|
@@ -39,19 +39,22 @@ 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
|
|
|
51
|
+
if (this.shape && this.size) {
|
|
52
52
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
53
|
+
} else {
|
|
54
|
+
wrapper.classList.add('shape-none');
|
|
53
55
|
}
|
|
54
56
|
}
|
|
57
|
+
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
resetLayoutClasses() {
|
|
@@ -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-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.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') {
|
|
@@ -2807,6 +2823,7 @@ class AuroFloatingUI {
|
|
|
2807
2823
|
this.element.bib.style.left = "0px";
|
|
2808
2824
|
this.element.bib.style.width = '';
|
|
2809
2825
|
this.element.bib.style.height = '';
|
|
2826
|
+
this.element.style.contain = '';
|
|
2810
2827
|
|
|
2811
2828
|
// reset the size that was mirroring `size` css-part
|
|
2812
2829
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2831,6 +2848,7 @@ class AuroFloatingUI {
|
|
|
2831
2848
|
this.element.bib.style.position = '';
|
|
2832
2849
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2833
2850
|
this.element.isBibFullscreen = false;
|
|
2851
|
+
this.element.style.contain = 'layout';
|
|
2834
2852
|
}
|
|
2835
2853
|
|
|
2836
2854
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -2883,13 +2901,13 @@ class AuroFloatingUI {
|
|
|
2883
2901
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2884
2902
|
return;
|
|
2885
2903
|
}
|
|
2886
|
-
|
|
2904
|
+
|
|
2887
2905
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
2888
2906
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2889
2907
|
return;
|
|
2890
2908
|
}
|
|
2891
2909
|
|
|
2892
|
-
this.hideBib();
|
|
2910
|
+
this.hideBib("keydown");
|
|
2893
2911
|
}
|
|
2894
2912
|
|
|
2895
2913
|
setupHideHandlers() {
|
|
@@ -2914,7 +2932,7 @@ class AuroFloatingUI {
|
|
|
2914
2932
|
document.expandedAuroFormkitDropdown = null;
|
|
2915
2933
|
document.expandedAuroFloater = this;
|
|
2916
2934
|
} else {
|
|
2917
|
-
this.hideBib();
|
|
2935
|
+
this.hideBib("click");
|
|
2918
2936
|
}
|
|
2919
2937
|
}
|
|
2920
2938
|
};
|
|
@@ -2927,7 +2945,7 @@ class AuroFloatingUI {
|
|
|
2927
2945
|
// if something else is open, let it handle itself
|
|
2928
2946
|
return;
|
|
2929
2947
|
}
|
|
2930
|
-
this.hideBib();
|
|
2948
|
+
this.hideBib("keydown");
|
|
2931
2949
|
}
|
|
2932
2950
|
};
|
|
2933
2951
|
|
|
@@ -3010,7 +3028,11 @@ class AuroFloatingUI {
|
|
|
3010
3028
|
}
|
|
3011
3029
|
}
|
|
3012
3030
|
|
|
3013
|
-
|
|
3031
|
+
/**
|
|
3032
|
+
* Hides the floating UI element.
|
|
3033
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3034
|
+
*/
|
|
3035
|
+
hideBib(eventType = "unknown") {
|
|
3014
3036
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3015
3037
|
this.lockScroll(false);
|
|
3016
3038
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3021,7 +3043,7 @@ class AuroFloatingUI {
|
|
|
3021
3043
|
if (this.showing) {
|
|
3022
3044
|
this.cleanupHideHandlers();
|
|
3023
3045
|
this.showing = false;
|
|
3024
|
-
this.dispatchEventDropdownToggle();
|
|
3046
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3025
3047
|
}
|
|
3026
3048
|
}
|
|
3027
3049
|
document.expandedAuroFloater = null;
|
|
@@ -3030,11 +3052,13 @@ class AuroFloatingUI {
|
|
|
3030
3052
|
/**
|
|
3031
3053
|
* @private
|
|
3032
3054
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3055
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3033
3056
|
*/
|
|
3034
|
-
dispatchEventDropdownToggle() {
|
|
3057
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3035
3058
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3036
3059
|
detail: {
|
|
3037
3060
|
expanded: this.showing,
|
|
3061
|
+
eventType: eventType || "unknown",
|
|
3038
3062
|
},
|
|
3039
3063
|
composed: true
|
|
3040
3064
|
});
|
|
@@ -3044,7 +3068,7 @@ class AuroFloatingUI {
|
|
|
3044
3068
|
|
|
3045
3069
|
handleClick() {
|
|
3046
3070
|
if (this.element.isPopoverVisible) {
|
|
3047
|
-
this.hideBib();
|
|
3071
|
+
this.hideBib("click");
|
|
3048
3072
|
} else {
|
|
3049
3073
|
this.showBib();
|
|
3050
3074
|
}
|
|
@@ -3067,8 +3091,9 @@ class AuroFloatingUI {
|
|
|
3067
3091
|
// Space is included as it's expected behavior for interactive elements
|
|
3068
3092
|
|
|
3069
3093
|
const origin = event.composedPath()[0];
|
|
3070
|
-
if (event.key === 'Enter' || (
|
|
3071
|
-
|
|
3094
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3095
|
+
|
|
3096
|
+
event.preventDefault();
|
|
3072
3097
|
this.handleClick();
|
|
3073
3098
|
}
|
|
3074
3099
|
break;
|
|
@@ -3079,7 +3104,7 @@ class AuroFloatingUI {
|
|
|
3079
3104
|
break;
|
|
3080
3105
|
case 'mouseleave':
|
|
3081
3106
|
if (this.element.hoverToggle) {
|
|
3082
|
-
this.hideBib();
|
|
3107
|
+
this.hideBib("mouseleave");
|
|
3083
3108
|
}
|
|
3084
3109
|
break;
|
|
3085
3110
|
case 'focus':
|
|
@@ -3222,6 +3247,267 @@ class AuroFloatingUI {
|
|
|
3222
3247
|
}
|
|
3223
3248
|
}
|
|
3224
3249
|
|
|
3250
|
+
// Selectors for focusable elements
|
|
3251
|
+
const FOCUSABLE_SELECTORS = [
|
|
3252
|
+
'a[href]',
|
|
3253
|
+
'button:not([disabled])',
|
|
3254
|
+
'textarea:not([disabled])',
|
|
3255
|
+
'input:not([disabled])',
|
|
3256
|
+
'select:not([disabled])',
|
|
3257
|
+
'[role="tab"]:not([disabled])',
|
|
3258
|
+
'[role="link"]:not([disabled])',
|
|
3259
|
+
'[role="button"]:not([disabled])',
|
|
3260
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3261
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3262
|
+
];
|
|
3263
|
+
|
|
3264
|
+
// List of custom components that are known to be focusable
|
|
3265
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3266
|
+
'auro-checkbox',
|
|
3267
|
+
'auro-radio',
|
|
3268
|
+
'auro-dropdown',
|
|
3269
|
+
'auro-button',
|
|
3270
|
+
'auro-combobox',
|
|
3271
|
+
'auro-input',
|
|
3272
|
+
'auro-counter',
|
|
3273
|
+
'auro-menu',
|
|
3274
|
+
'auro-select',
|
|
3275
|
+
'auro-datepicker',
|
|
3276
|
+
'auro-hyperlink',
|
|
3277
|
+
'auro-accordion',
|
|
3278
|
+
];
|
|
3279
|
+
|
|
3280
|
+
/**
|
|
3281
|
+
* Determines if a given element is a custom focusable component.
|
|
3282
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3283
|
+
*
|
|
3284
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3285
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3286
|
+
*/
|
|
3287
|
+
function isFocusableComponent(element) {
|
|
3288
|
+
const componentName = element.tagName.toLowerCase();
|
|
3289
|
+
|
|
3290
|
+
// Guard Clause: Element is a focusable component
|
|
3291
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3292
|
+
|
|
3293
|
+
// Guard Clause: Element is not disabled
|
|
3294
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3295
|
+
|
|
3296
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3297
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3298
|
+
|
|
3299
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3300
|
+
return true;
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
/**
|
|
3304
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3305
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3306
|
+
*
|
|
3307
|
+
* @param {HTMLElement} container The container to search within
|
|
3308
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3309
|
+
*/
|
|
3310
|
+
function getFocusableElements(container) {
|
|
3311
|
+
// Get elements in DOM order by walking the tree
|
|
3312
|
+
const orderedFocusableElements = [];
|
|
3313
|
+
|
|
3314
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3315
|
+
const collectFocusableElements = (root) => {
|
|
3316
|
+
// Check if current element is focusable
|
|
3317
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3318
|
+
// Check if this is a custom component that is focusable
|
|
3319
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3320
|
+
|
|
3321
|
+
if (isComponentFocusable) {
|
|
3322
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3323
|
+
orderedFocusableElements.push(root);
|
|
3324
|
+
return; // Skip traversing inside this component
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
// Check if the element itself matches any selector
|
|
3328
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3329
|
+
if (root.matches?.(selector)) {
|
|
3330
|
+
orderedFocusableElements.push(root);
|
|
3331
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
// Process shadow DOM only for non-Auro components
|
|
3336
|
+
if (root.shadowRoot) {
|
|
3337
|
+
// Process shadow DOM children in order
|
|
3338
|
+
if (root.shadowRoot.children) {
|
|
3339
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3340
|
+
collectFocusableElements(child);
|
|
3341
|
+
});
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
// Process slots and their assigned nodes in order
|
|
3346
|
+
if (root.tagName === 'SLOT') {
|
|
3347
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3348
|
+
for (const node of assignedNodes) {
|
|
3349
|
+
collectFocusableElements(node);
|
|
3350
|
+
}
|
|
3351
|
+
} else {
|
|
3352
|
+
// Process light DOM children in order
|
|
3353
|
+
if (root.children) {
|
|
3354
|
+
Array.from(root.children).forEach(child => {
|
|
3355
|
+
collectFocusableElements(child);
|
|
3356
|
+
});
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
};
|
|
3361
|
+
|
|
3362
|
+
// Start the traversal from the container
|
|
3363
|
+
collectFocusableElements(container);
|
|
3364
|
+
|
|
3365
|
+
// Remove duplicates that might have been collected through different paths
|
|
3366
|
+
// while preserving order
|
|
3367
|
+
const uniqueElements = [];
|
|
3368
|
+
const seen = new Set();
|
|
3369
|
+
|
|
3370
|
+
for (const element of orderedFocusableElements) {
|
|
3371
|
+
if (!seen.has(element)) {
|
|
3372
|
+
seen.add(element);
|
|
3373
|
+
uniqueElements.push(element);
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
return uniqueElements;
|
|
3378
|
+
}
|
|
3379
|
+
|
|
3380
|
+
/**
|
|
3381
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3382
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3383
|
+
*/
|
|
3384
|
+
class FocusTrap {
|
|
3385
|
+
/**
|
|
3386
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3387
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3388
|
+
*
|
|
3389
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3390
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3391
|
+
*/
|
|
3392
|
+
constructor(container) {
|
|
3393
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3394
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3397
|
+
this.container = container;
|
|
3398
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3399
|
+
|
|
3400
|
+
this._init();
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3403
|
+
/**
|
|
3404
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3405
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3406
|
+
*
|
|
3407
|
+
* @private
|
|
3408
|
+
*/
|
|
3409
|
+
_init() {
|
|
3410
|
+
|
|
3411
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3412
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3413
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3414
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
// Track tab direction
|
|
3418
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
/**
|
|
3422
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3423
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3424
|
+
*
|
|
3425
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3426
|
+
* @private
|
|
3427
|
+
*/
|
|
3428
|
+
_onKeydown = (e) => {
|
|
3429
|
+
|
|
3430
|
+
if (e.key === 'Tab') {
|
|
3431
|
+
|
|
3432
|
+
// Set the tab direction based on the key pressed
|
|
3433
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3434
|
+
|
|
3435
|
+
// Get the active element(s) in the document and shadow root
|
|
3436
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3437
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3438
|
+
let activeElement = document.activeElement;
|
|
3439
|
+
const actives = [activeElement];
|
|
3440
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3441
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3442
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
// Update the focusable elements
|
|
3446
|
+
const focusables = this._getFocusableElements();
|
|
3447
|
+
|
|
3448
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3449
|
+
const focusIndex =
|
|
3450
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3451
|
+
? focusables.length - 1
|
|
3452
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3453
|
+
? 0
|
|
3454
|
+
: null;
|
|
3455
|
+
|
|
3456
|
+
if (focusIndex !== null) {
|
|
3457
|
+
focusables[focusIndex].focus();
|
|
3458
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3459
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
};
|
|
3463
|
+
|
|
3464
|
+
/**
|
|
3465
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3466
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3467
|
+
*
|
|
3468
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3469
|
+
* @private
|
|
3470
|
+
*/
|
|
3471
|
+
_getFocusableElements() {
|
|
3472
|
+
// Use the imported utility function to get focusable elements
|
|
3473
|
+
const elements = getFocusableElements(this.container);
|
|
3474
|
+
|
|
3475
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3476
|
+
return elements;
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
/**
|
|
3480
|
+
* Moves focus to the first focusable element within the container.
|
|
3481
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3482
|
+
*/
|
|
3483
|
+
focusFirstElement() {
|
|
3484
|
+
const focusables = this._getFocusableElements();
|
|
3485
|
+
if (focusables.length) focusables[0].focus();
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
/**
|
|
3489
|
+
* Moves focus to the last focusable element within the container.
|
|
3490
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3491
|
+
*/
|
|
3492
|
+
focusLastElement() {
|
|
3493
|
+
const focusables = this._getFocusableElements();
|
|
3494
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
/**
|
|
3498
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3499
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3500
|
+
*/
|
|
3501
|
+
disconnect() {
|
|
3502
|
+
|
|
3503
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3504
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3508
|
+
}
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3225
3511
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3226
3512
|
// See LICENSE in the project root for license information.
|
|
3227
3513
|
|
|
@@ -3272,7 +3558,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
3272
3558
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3273
3559
|
*/
|
|
3274
3560
|
|
|
3275
|
-
let AuroElement$1 = class AuroElement extends LitElement {
|
|
3561
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
3276
3562
|
|
|
3277
3563
|
// function to define props used within the scope of this component
|
|
3278
3564
|
static get properties() {
|
|
@@ -3328,7 +3614,7 @@ const cacheFetch$1 = (uri, options = {}) => {
|
|
|
3328
3614
|
return _fetchMap$1.get(uri);
|
|
3329
3615
|
};
|
|
3330
3616
|
|
|
3331
|
-
var styleCss$
|
|
3617
|
+
var styleCss$3$1 = 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}`;
|
|
3332
3618
|
|
|
3333
3619
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3334
3620
|
// See LICENSE in the project root for license information.
|
|
@@ -3340,7 +3626,7 @@ var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3340
3626
|
*/
|
|
3341
3627
|
|
|
3342
3628
|
// build the component class
|
|
3343
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
3629
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
3344
3630
|
constructor() {
|
|
3345
3631
|
super();
|
|
3346
3632
|
this.onDark = false;
|
|
@@ -3371,7 +3657,7 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3371
3657
|
|
|
3372
3658
|
static get styles() {
|
|
3373
3659
|
return css`
|
|
3374
|
-
${styleCss$
|
|
3660
|
+
${styleCss$3$1}
|
|
3375
3661
|
`;
|
|
3376
3662
|
}
|
|
3377
3663
|
|
|
@@ -3412,9 +3698,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3412
3698
|
}
|
|
3413
3699
|
};
|
|
3414
3700
|
|
|
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)}`;
|
|
3701
|
+
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
3702
|
|
|
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)}`;
|
|
3703
|
+
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
3704
|
|
|
3419
3705
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3420
3706
|
// See LICENSE in the project root for license information.
|
|
@@ -3572,9 +3858,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3572
3858
|
static get styles() {
|
|
3573
3859
|
return [
|
|
3574
3860
|
super.styles,
|
|
3575
|
-
css`${tokensCss$2}`,
|
|
3576
|
-
css`${styleCss$
|
|
3577
|
-
css`${colorCss$3}`
|
|
3861
|
+
css`${tokensCss$2$1}`,
|
|
3862
|
+
css`${styleCss$3$1}`,
|
|
3863
|
+
css`${colorCss$3$1}`
|
|
3578
3864
|
];
|
|
3579
3865
|
}
|
|
3580
3866
|
|
|
@@ -3608,8 +3894,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3608
3894
|
async firstUpdated() {
|
|
3609
3895
|
await super.firstUpdated();
|
|
3610
3896
|
|
|
3611
|
-
|
|
3612
|
-
|
|
3897
|
+
/**
|
|
3898
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3899
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3900
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3901
|
+
*/
|
|
3902
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3613
3903
|
const svgDesc = this.svg.querySelector('desc');
|
|
3614
3904
|
|
|
3615
3905
|
if (svgDesc) {
|
|
@@ -3655,11 +3945,11 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3655
3945
|
|
|
3656
3946
|
var iconVersion$1 = '6.1.2';
|
|
3657
3947
|
|
|
3658
|
-
var styleCss$1
|
|
3948
|
+
var styleCss$2$1 = 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
3949
|
|
|
3660
3950
|
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
3951
|
|
|
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:
|
|
3952
|
+
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
3953
|
|
|
3664
3954
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3665
3955
|
// See LICENSE in the project root for license information.
|
|
@@ -3680,7 +3970,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3680
3970
|
*/
|
|
3681
3971
|
|
|
3682
3972
|
class AuroDropdownBib extends LitElement {
|
|
3683
|
-
|
|
3973
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3684
3974
|
constructor() {
|
|
3685
3975
|
super();
|
|
3686
3976
|
|
|
@@ -3690,11 +3980,14 @@ class AuroDropdownBib extends LitElement {
|
|
|
3690
3980
|
this._mobileBreakpointValue = undefined;
|
|
3691
3981
|
|
|
3692
3982
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3983
|
+
|
|
3984
|
+
this.shape = "rounded";
|
|
3985
|
+
this.matchWidth = false;
|
|
3693
3986
|
}
|
|
3694
3987
|
|
|
3695
3988
|
static get styles() {
|
|
3696
3989
|
return [
|
|
3697
|
-
styleCss$1
|
|
3990
|
+
styleCss$2$1,
|
|
3698
3991
|
colorCss$2$1,
|
|
3699
3992
|
tokensCss$1$1
|
|
3700
3993
|
];
|
|
@@ -3727,6 +4020,15 @@ class AuroDropdownBib extends LitElement {
|
|
|
3727
4020
|
reflect: true
|
|
3728
4021
|
},
|
|
3729
4022
|
|
|
4023
|
+
/**
|
|
4024
|
+
* If declared, the bib width will match the trigger width.
|
|
4025
|
+
* @private
|
|
4026
|
+
*/
|
|
4027
|
+
matchWidth: {
|
|
4028
|
+
type: Boolean,
|
|
4029
|
+
reflect: true
|
|
4030
|
+
},
|
|
4031
|
+
|
|
3730
4032
|
/**
|
|
3731
4033
|
* If declared, will apply border-radius to the bib.
|
|
3732
4034
|
*/
|
|
@@ -3740,6 +4042,11 @@ class AuroDropdownBib extends LitElement {
|
|
|
3740
4042
|
*/
|
|
3741
4043
|
bibTemplate: {
|
|
3742
4044
|
type: Object
|
|
4045
|
+
},
|
|
4046
|
+
|
|
4047
|
+
shape: {
|
|
4048
|
+
type: String,
|
|
4049
|
+
reflect: true
|
|
3743
4050
|
}
|
|
3744
4051
|
};
|
|
3745
4052
|
}
|
|
@@ -3819,8 +4126,16 @@ class AuroDropdownBib extends LitElement {
|
|
|
3819
4126
|
|
|
3820
4127
|
// function that renders the HTML and CSS into the scope of the component
|
|
3821
4128
|
render() {
|
|
4129
|
+
const classes = {
|
|
4130
|
+
container: true
|
|
4131
|
+
};
|
|
4132
|
+
|
|
4133
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4134
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4135
|
+
classes[`shape-${this.shape}`] = true;
|
|
4136
|
+
|
|
3822
4137
|
return html`
|
|
3823
|
-
<div class="
|
|
4138
|
+
<div class="${classMap(classes)}" part="bibContainer">
|
|
3824
4139
|
<slot></slot>
|
|
3825
4140
|
</div>
|
|
3826
4141
|
`;
|
|
@@ -3829,23 +4144,25 @@ class AuroDropdownBib extends LitElement {
|
|
|
3829
4144
|
|
|
3830
4145
|
var dropdownVersion$1 = '3.0.0';
|
|
3831
4146
|
|
|
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:
|
|
4147
|
+
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-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.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
4148
|
|
|
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:
|
|
4149
|
+
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
4150
|
|
|
3836
|
-
var
|
|
4151
|
+
var styleCss$1$2 = css`:host{display:block;position:relative}:host([open]){z-index:var(--depth-tooltip, 400)}.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([matchwidth]) #bibSizer{width:100%}`;
|
|
3837
4152
|
|
|
3838
|
-
var
|
|
4153
|
+
var classicColorCss = css``;
|
|
3839
4154
|
|
|
3840
|
-
var
|
|
4155
|
+
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)}`;
|
|
3841
4156
|
|
|
3842
|
-
var
|
|
4157
|
+
var styleEmphasizedCss = css`.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}: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)}`;
|
|
3843
4158
|
|
|
3844
|
-
var
|
|
4159
|
+
var styleSnowflakeCss = css`: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)}`;
|
|
3845
4160
|
|
|
3846
|
-
var
|
|
4161
|
+
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)}`;
|
|
3847
4162
|
|
|
3848
|
-
var
|
|
4163
|
+
var styleCss$6 = 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-2xl,.accent-xl{text-transform:uppercase}.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-lg,.accent-md{text-transform:uppercase}.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-sm,.accent-xs{text-transform:uppercase}.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);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
4164
|
+
|
|
4165
|
+
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3849
4166
|
|
|
3850
4167
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3851
4168
|
// See LICENSE in the project root for license information.
|
|
@@ -3854,7 +4171,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3854
4171
|
|
|
3855
4172
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3856
4173
|
|
|
3857
|
-
let AuroLibraryRuntimeUtils$
|
|
4174
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
3858
4175
|
|
|
3859
4176
|
/* eslint-disable jsdoc/require-param */
|
|
3860
4177
|
|
|
@@ -3923,8 +4240,6 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
3923
4240
|
|
|
3924
4241
|
/**
|
|
3925
4242
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
3926
|
-
*
|
|
3927
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
3928
4243
|
*/
|
|
3929
4244
|
let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
3930
4245
|
|
|
@@ -3935,14 +4250,14 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3935
4250
|
this.onDark = false;
|
|
3936
4251
|
this.hasTextContent = false;
|
|
3937
4252
|
|
|
3938
|
-
AuroLibraryRuntimeUtils$
|
|
4253
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3939
4254
|
}
|
|
3940
4255
|
|
|
3941
4256
|
static get styles() {
|
|
3942
4257
|
return [
|
|
3943
|
-
colorCss$
|
|
3944
|
-
styleCss$
|
|
3945
|
-
tokensCss$
|
|
4258
|
+
colorCss$5,
|
|
4259
|
+
styleCss$6,
|
|
4260
|
+
tokensCss$4
|
|
3946
4261
|
];
|
|
3947
4262
|
}
|
|
3948
4263
|
|
|
@@ -3991,7 +4306,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3991
4306
|
*
|
|
3992
4307
|
*/
|
|
3993
4308
|
static register(name = "auro-helptext") {
|
|
3994
|
-
AuroLibraryRuntimeUtils$
|
|
4309
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
3995
4310
|
}
|
|
3996
4311
|
|
|
3997
4312
|
updated() {
|
|
@@ -4040,7 +4355,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
4040
4355
|
// function that renders the HTML and CSS into the scope of the component
|
|
4041
4356
|
render() {
|
|
4042
4357
|
return html$1`
|
|
4043
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
4358
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
4044
4359
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4045
4360
|
</div>
|
|
4046
4361
|
`;
|
|
@@ -4084,19 +4399,22 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4084
4399
|
}
|
|
4085
4400
|
|
|
4086
4401
|
resetShapeClasses() {
|
|
4087
|
-
|
|
4088
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4402
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4089
4403
|
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4404
|
+
if (wrapper) {
|
|
4405
|
+
wrapper.classList.forEach((className) => {
|
|
4406
|
+
if (className.startsWith('shape-')) {
|
|
4407
|
+
wrapper.classList.remove(className);
|
|
4408
|
+
}
|
|
4409
|
+
});
|
|
4096
4410
|
|
|
4411
|
+
if (this.shape && this.size) {
|
|
4097
4412
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4413
|
+
} else {
|
|
4414
|
+
wrapper.classList.add('shape-none');
|
|
4098
4415
|
}
|
|
4099
4416
|
}
|
|
4417
|
+
|
|
4100
4418
|
}
|
|
4101
4419
|
|
|
4102
4420
|
resetLayoutClasses() {
|
|
@@ -4145,10 +4463,9 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4145
4463
|
// See LICENSE in the project root for license information.
|
|
4146
4464
|
|
|
4147
4465
|
|
|
4148
|
-
|
|
4149
|
-
|
|
4466
|
+
|
|
4467
|
+
/*
|
|
4150
4468
|
* @slot - Default slot for the popover content.
|
|
4151
|
-
* @slot label - Defines the content of the label.
|
|
4152
4469
|
* @slot helpText - Defines the content of the helpText.
|
|
4153
4470
|
* @slot trigger - Defines the content of the trigger.
|
|
4154
4471
|
* @csspart trigger - The trigger content container.
|
|
@@ -4167,23 +4484,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4167
4484
|
this.matchWidth = false;
|
|
4168
4485
|
this.noHideOnThisFocusLoss = false;
|
|
4169
4486
|
|
|
4170
|
-
this.errorMessage =
|
|
4487
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4171
4488
|
|
|
4172
4489
|
// Layout Config
|
|
4173
|
-
this.layout =
|
|
4174
|
-
this.shape =
|
|
4175
|
-
this.size =
|
|
4490
|
+
this.layout = undefined;
|
|
4491
|
+
this.shape = undefined;
|
|
4492
|
+
this.size = undefined;
|
|
4493
|
+
|
|
4176
4494
|
this.parentBorder = false;
|
|
4177
4495
|
|
|
4178
|
-
|
|
4179
|
-
|
|
4496
|
+
/** @private */
|
|
4497
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4180
4498
|
|
|
4181
|
-
|
|
4182
|
-
return {
|
|
4183
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4184
|
-
};
|
|
4499
|
+
this.privateDefaults();
|
|
4185
4500
|
}
|
|
4186
4501
|
|
|
4502
|
+
/**
|
|
4503
|
+
* @private
|
|
4504
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4505
|
+
*/
|
|
4187
4506
|
get commonWrapperClasses() {
|
|
4188
4507
|
return {
|
|
4189
4508
|
'trigger': true,
|
|
@@ -4201,13 +4520,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4201
4520
|
privateDefaults() {
|
|
4202
4521
|
this.chevron = false;
|
|
4203
4522
|
this.disabled = false;
|
|
4523
|
+
this.disableFocusTrap = false;
|
|
4204
4524
|
this.error = false;
|
|
4205
|
-
this.inset = false;
|
|
4206
|
-
this.rounded = false;
|
|
4207
4525
|
this.tabIndex = 0;
|
|
4208
4526
|
this.noToggle = false;
|
|
4209
|
-
this.a11yAutocomplete = 'none';
|
|
4210
|
-
this.labeled = true;
|
|
4211
4527
|
this.a11yRole = 'button';
|
|
4212
4528
|
this.onDark = false;
|
|
4213
4529
|
this.showTriggerBorders = true;
|
|
@@ -4303,6 +4619,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4303
4619
|
this.floater.showBib();
|
|
4304
4620
|
}
|
|
4305
4621
|
|
|
4622
|
+
/**
|
|
4623
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4624
|
+
* If not, trigger element will get focus.
|
|
4625
|
+
*/
|
|
4626
|
+
focus() {
|
|
4627
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4628
|
+
this.focusTrap.focusFirstElement();
|
|
4629
|
+
} else {
|
|
4630
|
+
this.trigger.focus();
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4633
|
+
|
|
4306
4634
|
// function to define props used within the scope of this component
|
|
4307
4635
|
static get properties() {
|
|
4308
4636
|
return {
|
|
@@ -4316,6 +4644,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4644
|
reflect: true
|
|
4317
4645
|
},
|
|
4318
4646
|
|
|
4647
|
+
/**
|
|
4648
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4649
|
+
* @default false
|
|
4650
|
+
*/
|
|
4651
|
+
disableEventShow: {
|
|
4652
|
+
type: Boolean,
|
|
4653
|
+
reflect: true
|
|
4654
|
+
},
|
|
4655
|
+
|
|
4319
4656
|
/**
|
|
4320
4657
|
* If declared, applies a border around the trigger slot.
|
|
4321
4658
|
*/
|
|
@@ -4334,17 +4671,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4334
4671
|
},
|
|
4335
4672
|
|
|
4336
4673
|
/**
|
|
4337
|
-
* If declared, the dropdown
|
|
4674
|
+
* If declared, the dropdown is not interactive.
|
|
4338
4675
|
*/
|
|
4339
|
-
|
|
4676
|
+
disabled: {
|
|
4340
4677
|
type: Boolean,
|
|
4341
4678
|
reflect: true
|
|
4342
4679
|
},
|
|
4343
4680
|
|
|
4344
4681
|
/**
|
|
4345
|
-
* If declared, the
|
|
4682
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4346
4683
|
*/
|
|
4347
|
-
|
|
4684
|
+
disableFocusTrap: {
|
|
4348
4685
|
type: Boolean,
|
|
4349
4686
|
reflect: true
|
|
4350
4687
|
},
|
|
@@ -4389,27 +4726,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4389
4726
|
reflect: true
|
|
4390
4727
|
},
|
|
4391
4728
|
|
|
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
4729
|
/**
|
|
4409
4730
|
* If true, the dropdown bib is displayed.
|
|
4410
4731
|
*/
|
|
4411
4732
|
isPopoverVisible: {
|
|
4412
|
-
type: Boolean
|
|
4733
|
+
type: Boolean,
|
|
4734
|
+
reflect: true,
|
|
4735
|
+
attribute: 'open'
|
|
4413
4736
|
},
|
|
4414
4737
|
|
|
4415
4738
|
/**
|
|
@@ -4448,15 +4771,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4448
4771
|
reflect: true
|
|
4449
4772
|
},
|
|
4450
4773
|
|
|
4451
|
-
/**
|
|
4452
|
-
* Defines if there is a label preset.
|
|
4453
|
-
* @private
|
|
4454
|
-
*/
|
|
4455
|
-
labeled: {
|
|
4456
|
-
type: Boolean,
|
|
4457
|
-
reflect: true
|
|
4458
|
-
},
|
|
4459
|
-
|
|
4460
4774
|
/**
|
|
4461
4775
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4462
4776
|
* @private
|
|
@@ -4517,6 +4831,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4517
4831
|
reflect: true
|
|
4518
4832
|
},
|
|
4519
4833
|
|
|
4834
|
+
/**
|
|
4835
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4836
|
+
*/
|
|
4520
4837
|
onSlotChange: {
|
|
4521
4838
|
type: Function,
|
|
4522
4839
|
reflect: false
|
|
@@ -4531,14 +4848,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4531
4848
|
reflect: true
|
|
4532
4849
|
},
|
|
4533
4850
|
|
|
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
4851
|
/**
|
|
4543
4852
|
* @private
|
|
4544
4853
|
*/
|
|
@@ -4553,22 +4862,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4553
4862
|
type: String || undefined,
|
|
4554
4863
|
attribute: false,
|
|
4555
4864
|
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
4865
|
}
|
|
4565
4866
|
};
|
|
4566
4867
|
}
|
|
4567
4868
|
|
|
4568
4869
|
static get styles() {
|
|
4569
4870
|
return [
|
|
4570
|
-
|
|
4871
|
+
styleCss$1$2,
|
|
4571
4872
|
tokensCss$1$1,
|
|
4873
|
+
colorCss$1$1,
|
|
4572
4874
|
|
|
4573
4875
|
// default layout
|
|
4574
4876
|
classicColorCss,
|
|
@@ -4630,13 +4932,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4630
4932
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4631
4933
|
this.handleTriggerContentSlotChange();
|
|
4632
4934
|
}
|
|
4935
|
+
}
|
|
4633
4936
|
|
|
4937
|
+
/**
|
|
4938
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
4939
|
+
* @private
|
|
4940
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
4941
|
+
*/
|
|
4942
|
+
handleDropdownToggle(event) {
|
|
4943
|
+
this.updateFocusTrap();
|
|
4944
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4945
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4946
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4947
|
+
this.trigger.focus();
|
|
4948
|
+
}
|
|
4634
4949
|
}
|
|
4635
4950
|
|
|
4636
4951
|
firstUpdated() {
|
|
4637
4952
|
|
|
4638
4953
|
// Configure the floater to, this will generate the ID for the bib
|
|
4639
4954
|
this.floater.configure(this, 'auroDropdown');
|
|
4955
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4640
4956
|
|
|
4641
4957
|
/**
|
|
4642
4958
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4654,6 +4970,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4654
4970
|
|
|
4655
4971
|
// Add the tag name as an attribute if it is different than the component name
|
|
4656
4972
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
4973
|
+
|
|
4974
|
+
this.trigger.addEventListener('click', () => {
|
|
4975
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
4976
|
+
bubbles: true,
|
|
4977
|
+
composed: true
|
|
4978
|
+
}));
|
|
4979
|
+
});
|
|
4657
4980
|
}
|
|
4658
4981
|
|
|
4659
4982
|
/**
|
|
@@ -4696,6 +5019,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4696
5019
|
this.hasFocus = true;
|
|
4697
5020
|
}
|
|
4698
5021
|
|
|
5022
|
+
/**
|
|
5023
|
+
* @private
|
|
5024
|
+
*/
|
|
5025
|
+
updateFocusTrap() {
|
|
5026
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5027
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5028
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5029
|
+
this.focusTrap.focusFirstElement();
|
|
5030
|
+
return;
|
|
5031
|
+
}
|
|
5032
|
+
|
|
5033
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5034
|
+
if (!this.focusTrap) {
|
|
5035
|
+
return;
|
|
5036
|
+
}
|
|
5037
|
+
|
|
5038
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5039
|
+
this.focusTrap.disconnect();
|
|
5040
|
+
this.focusTrap = undefined;
|
|
5041
|
+
}
|
|
5042
|
+
|
|
4699
5043
|
/**
|
|
4700
5044
|
* Function to support @focusout event.
|
|
4701
5045
|
* @private
|
|
@@ -4706,67 +5050,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4706
5050
|
}
|
|
4707
5051
|
|
|
4708
5052
|
/**
|
|
4709
|
-
*
|
|
5053
|
+
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4710
5054
|
* @private
|
|
4711
|
-
* @param {
|
|
4712
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4713
|
-
*/
|
|
4714
|
-
containsFocusableElement(element) {
|
|
4715
|
-
this.showTriggerBorders = true;
|
|
4716
|
-
|
|
4717
|
-
const nodes = [
|
|
4718
|
-
element,
|
|
4719
|
-
...element.children
|
|
4720
|
-
];
|
|
4721
|
-
|
|
4722
|
-
const focusableElements = [
|
|
4723
|
-
'a',
|
|
4724
|
-
'auro-hyperlink',
|
|
4725
|
-
'button',
|
|
4726
|
-
'auro-button',
|
|
4727
|
-
'input',
|
|
4728
|
-
'auro-input',
|
|
4729
|
-
];
|
|
4730
|
-
|
|
4731
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4732
|
-
|
|
4733
|
-
const result = nodes.some((node) => {
|
|
4734
|
-
const tagName = node.tagName.toLowerCase();
|
|
4735
|
-
|
|
4736
|
-
if (node.tabIndex > -1) {
|
|
4737
|
-
return true;
|
|
4738
|
-
}
|
|
4739
|
-
|
|
4740
|
-
if (focusableElements.includes(tagName)) {
|
|
4741
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4742
|
-
return true;
|
|
4743
|
-
}
|
|
4744
|
-
if (!node.hasAttribute('disabled')) {
|
|
4745
|
-
return true;
|
|
4746
|
-
}
|
|
4747
|
-
}
|
|
4748
|
-
|
|
4749
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4750
|
-
return true;
|
|
4751
|
-
}
|
|
4752
|
-
|
|
4753
|
-
return false;
|
|
4754
|
-
});
|
|
4755
|
-
|
|
4756
|
-
if (result) {
|
|
4757
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4758
|
-
const tagName = node.tagName.toLowerCase();
|
|
4759
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4760
|
-
});
|
|
4761
|
-
}
|
|
4762
|
-
|
|
4763
|
-
return result;
|
|
4764
|
-
}
|
|
4765
|
-
|
|
4766
|
-
/**
|
|
4767
|
-
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4768
|
-
* @private
|
|
4769
|
-
* @param {Event} event - The original focus event.
|
|
5055
|
+
* @param {Event} event - The original focus event.
|
|
4770
5056
|
*/
|
|
4771
5057
|
bindFocusEventToTrigger(event) {
|
|
4772
5058
|
const dupEvent = new FocusEvent(event.type, {
|
|
@@ -4856,14 +5142,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4856
5142
|
* @returns {void}
|
|
4857
5143
|
*/
|
|
4858
5144
|
handleTriggerContentSlotChange(event) {
|
|
4859
|
-
|
|
4860
5145
|
this.floater.handleTriggerTabIndex();
|
|
4861
5146
|
|
|
4862
5147
|
// Get the trigger
|
|
4863
5148
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
4864
5149
|
|
|
4865
5150
|
// Get the trigger slot
|
|
4866
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5151
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
4867
5152
|
|
|
4868
5153
|
// If there's a trigger slot
|
|
4869
5154
|
if (triggerSlot) {
|
|
@@ -4875,7 +5160,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4875
5160
|
if (triggerContentNodes) {
|
|
4876
5161
|
|
|
4877
5162
|
// See if any of them are focusable elements
|
|
4878
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5163
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4879
5164
|
|
|
4880
5165
|
// If any of them are focusable elements
|
|
4881
5166
|
if (this.triggerContentFocusable) {
|
|
@@ -4926,7 +5211,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4926
5211
|
*
|
|
4927
5212
|
* @private
|
|
4928
5213
|
* @method handleDefaultSlot
|
|
4929
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4930
5214
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4931
5215
|
*/
|
|
4932
5216
|
handleDefaultSlot() {
|
|
@@ -4936,29 +5220,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4936
5220
|
}
|
|
4937
5221
|
}
|
|
4938
5222
|
|
|
4939
|
-
/**
|
|
4940
|
-
* @private
|
|
4941
|
-
* @method handleLabelSlotChange
|
|
4942
|
-
* @param {event} event - The event object representing the slot change.
|
|
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
5223
|
/**
|
|
4963
5224
|
* Returns HTML for the common portion of the layouts.
|
|
4964
5225
|
* @private
|
|
@@ -4971,24 +5232,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4971
5232
|
<div
|
|
4972
5233
|
id="trigger"
|
|
4973
5234
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4974
|
-
tabindex="${this.tabIndex}"
|
|
5235
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4975
5236
|
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)}"
|
|
5237
|
+
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5238
|
+
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4978
5239
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4979
5240
|
@focusin="${this.handleFocusin}"
|
|
4980
5241
|
@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>
|
|
5242
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5243
|
+
<slot
|
|
5244
|
+
name="trigger"
|
|
5245
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4990
5246
|
</div>
|
|
4991
|
-
${this.chevron
|
|
5247
|
+
${this.chevron ? html`
|
|
4992
5248
|
<div
|
|
4993
5249
|
id="showStateIcon"
|
|
4994
5250
|
class="chevron"
|
|
@@ -5009,11 +5265,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5009
5265
|
<div id="bibSizer" part="size"></div>
|
|
5010
5266
|
<${this.dropdownBibTag}
|
|
5011
5267
|
id="bib"
|
|
5268
|
+
shape="${this.shape}"
|
|
5012
5269
|
?data-show="${this.isPopoverVisible}"
|
|
5013
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5014
|
-
?common="${this.common}"
|
|
5015
|
-
?rounded="${this.common || this.rounded}"
|
|
5016
|
-
?inset="${this.common || this.inset}">
|
|
5270
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5017
5271
|
<div class="slotContent">
|
|
5018
5272
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5019
5273
|
</div>
|
|
@@ -5028,245 +5282,1290 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5028
5282
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5029
5283
|
*/
|
|
5030
5284
|
renderLayoutClassic() {
|
|
5285
|
+
// TODO: check with Doug why this was never used?
|
|
5286
|
+
const helpTextClasses = {
|
|
5287
|
+
'helpText': true
|
|
5288
|
+
};
|
|
5031
5289
|
|
|
5032
5290
|
return html`
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
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>
|
|
5291
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5292
|
+
`;
|
|
5293
|
+
}
|
|
5294
|
+
|
|
5295
|
+
/**
|
|
5296
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
5297
|
+
* @private
|
|
5298
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
5299
|
+
*/
|
|
5300
|
+
renderLayoutSnowflake() {
|
|
5301
|
+
const helpTextClasses = {
|
|
5302
|
+
'helpText': true,
|
|
5303
|
+
'leftIndent': true,
|
|
5304
|
+
'rightIndent': true
|
|
5305
|
+
};
|
|
5306
|
+
|
|
5307
|
+
return html`
|
|
5308
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5309
|
+
`;
|
|
5310
|
+
}
|
|
5311
|
+
|
|
5312
|
+
/**
|
|
5313
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
5314
|
+
* @private
|
|
5315
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
5316
|
+
*/
|
|
5317
|
+
renderLayoutEmphasized() {
|
|
5318
|
+
const helpTextClasses = {
|
|
5319
|
+
'helpText': true,
|
|
5320
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5321
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5322
|
+
};
|
|
5323
|
+
|
|
5324
|
+
return html`
|
|
5325
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5087
5326
|
`;
|
|
5088
5327
|
}
|
|
5089
5328
|
|
|
5090
5329
|
/**
|
|
5091
|
-
*
|
|
5092
|
-
* @private
|
|
5093
|
-
* @
|
|
5330
|
+
* Logic to determine the layout of the component.
|
|
5331
|
+
* @private
|
|
5332
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
5333
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
5334
|
+
*/
|
|
5335
|
+
renderLayout(ForcedLayout) {
|
|
5336
|
+
const layout = ForcedLayout || this.layout;
|
|
5337
|
+
|
|
5338
|
+
switch (layout) {
|
|
5339
|
+
case 'emphasized':
|
|
5340
|
+
return this.renderLayoutEmphasized();
|
|
5341
|
+
case 'emphasized-left':
|
|
5342
|
+
return this.renderLayoutEmphasized();
|
|
5343
|
+
case 'emphasized-right':
|
|
5344
|
+
return this.renderLayoutEmphasized();
|
|
5345
|
+
case 'snowflake':
|
|
5346
|
+
return this.renderLayoutSnowflake();
|
|
5347
|
+
case 'snowflake-left':
|
|
5348
|
+
return this.renderLayoutSnowflake();
|
|
5349
|
+
case 'snowflake-right':
|
|
5350
|
+
return this.renderLayoutSnowflake();
|
|
5351
|
+
default:
|
|
5352
|
+
return this.renderLayoutClassic();
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5356
|
+
|
|
5357
|
+
var dropdownVersion = '3.0.0';
|
|
5358
|
+
|
|
5359
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5360
|
+
|
|
5361
|
+
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)}`;
|
|
5362
|
+
|
|
5363
|
+
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)}`;
|
|
5364
|
+
|
|
5365
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5366
|
+
// See LICENSE in the project root for license information.
|
|
5367
|
+
|
|
5368
|
+
// ---------------------------------------------------------------------
|
|
5369
|
+
|
|
5370
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5371
|
+
|
|
5372
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5373
|
+
|
|
5374
|
+
/* eslint-disable jsdoc/require-param */
|
|
5375
|
+
|
|
5376
|
+
/**
|
|
5377
|
+
* This will register a new custom element with the browser.
|
|
5378
|
+
* @param {String} name - The name of the custom element.
|
|
5379
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5380
|
+
* @returns {void}
|
|
5381
|
+
*/
|
|
5382
|
+
registerComponent(name, componentClass) {
|
|
5383
|
+
if (!customElements.get(name)) {
|
|
5384
|
+
customElements.define(name, class extends componentClass {});
|
|
5385
|
+
}
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5388
|
+
/**
|
|
5389
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5390
|
+
* @returns {void}
|
|
5391
|
+
*/
|
|
5392
|
+
closestElement(
|
|
5393
|
+
selector, // selector like in .closest()
|
|
5394
|
+
base = this, // extra functionality to skip a parent
|
|
5395
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5396
|
+
!el || el === document || el === window
|
|
5397
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5398
|
+
: found
|
|
5399
|
+
? found // found a selector INside this element
|
|
5400
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5401
|
+
) {
|
|
5402
|
+
return __Closest(base);
|
|
5403
|
+
}
|
|
5404
|
+
/* eslint-enable jsdoc/require-param */
|
|
5405
|
+
|
|
5406
|
+
/**
|
|
5407
|
+
* 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.
|
|
5408
|
+
* @param {Object} elem - The element to check.
|
|
5409
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5410
|
+
* @returns {void}
|
|
5411
|
+
*/
|
|
5412
|
+
handleComponentTagRename(elem, tagName) {
|
|
5413
|
+
const tag = tagName.toLowerCase();
|
|
5414
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5415
|
+
|
|
5416
|
+
if (elemTag !== tag) {
|
|
5417
|
+
elem.setAttribute(tag, true);
|
|
5418
|
+
}
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5421
|
+
/**
|
|
5422
|
+
* Validates if an element is a specific Auro component.
|
|
5423
|
+
* @param {Object} elem - The element to validate.
|
|
5424
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5425
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5426
|
+
*/
|
|
5427
|
+
elementMatch(elem, tagName) {
|
|
5428
|
+
const tag = tagName.toLowerCase();
|
|
5429
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5430
|
+
|
|
5431
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5432
|
+
}
|
|
5433
|
+
};
|
|
5434
|
+
|
|
5435
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5436
|
+
// See LICENSE in the project root for license information.
|
|
5437
|
+
|
|
5438
|
+
|
|
5439
|
+
class AuroDependencyVersioning {
|
|
5440
|
+
|
|
5441
|
+
/**
|
|
5442
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5443
|
+
* @private
|
|
5444
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5445
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5446
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5447
|
+
*/
|
|
5448
|
+
generateElementName(baseName, version) {
|
|
5449
|
+
let result = baseName;
|
|
5450
|
+
|
|
5451
|
+
result += '-';
|
|
5452
|
+
result += version.replace(/[.]/g, '_');
|
|
5453
|
+
|
|
5454
|
+
return result;
|
|
5455
|
+
}
|
|
5456
|
+
|
|
5457
|
+
/**
|
|
5458
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5459
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5460
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5461
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5462
|
+
*/
|
|
5463
|
+
generateTag(baseName, version, tagClass) {
|
|
5464
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5465
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5466
|
+
|
|
5467
|
+
if (!customElements.get(elementName)) {
|
|
5468
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5471
|
+
return tag;
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
|
|
5475
|
+
/**
|
|
5476
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5477
|
+
*/
|
|
5478
|
+
const _observers = new WeakMap();
|
|
5479
|
+
|
|
5480
|
+
/**
|
|
5481
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5482
|
+
* Structure: {
|
|
5483
|
+
* host: {
|
|
5484
|
+
* matchers: Set<Function>,
|
|
5485
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5486
|
+
* }
|
|
5487
|
+
* }
|
|
5488
|
+
*/
|
|
5489
|
+
const _transportConfig = new WeakMap();
|
|
5490
|
+
|
|
5491
|
+
/**
|
|
5492
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5493
|
+
*
|
|
5494
|
+
* @param {Object} params - The parameters for the function.
|
|
5495
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5496
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5497
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5498
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5499
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5500
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5501
|
+
*/
|
|
5502
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5503
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5504
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5505
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5506
|
+
}
|
|
5507
|
+
|
|
5508
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5509
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5510
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
// Guard Clause: Ensure match is a function
|
|
5514
|
+
if (typeof match !== 'function') {
|
|
5515
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5516
|
+
}
|
|
5517
|
+
|
|
5518
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5519
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5520
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5521
|
+
}
|
|
5522
|
+
|
|
5523
|
+
// Register this transport and get cleanup function
|
|
5524
|
+
return _registerTransport({
|
|
5525
|
+
host,
|
|
5526
|
+
target,
|
|
5527
|
+
matcher: match,
|
|
5528
|
+
removeOriginal
|
|
5529
|
+
});
|
|
5530
|
+
};
|
|
5531
|
+
|
|
5532
|
+
/**
|
|
5533
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5534
|
+
*
|
|
5535
|
+
* @param {Object} params - The parameters object.
|
|
5536
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5537
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5538
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5539
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5540
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5541
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5542
|
+
* @private
|
|
5543
|
+
*/
|
|
5544
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5545
|
+
// Initialize config for this host if it doesn't exist
|
|
5546
|
+
if (!_transportConfig.has(host)) {
|
|
5547
|
+
_transportConfig.set(host, {
|
|
5548
|
+
matchers: new Set(),
|
|
5549
|
+
targets: new Map()
|
|
5550
|
+
});
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5553
|
+
const config = _transportConfig.get(host);
|
|
5554
|
+
|
|
5555
|
+
// Add the matcher to the set of matchers for this host
|
|
5556
|
+
config.matchers.add(matcher);
|
|
5557
|
+
|
|
5558
|
+
// Initialize target entry if it doesn't exist
|
|
5559
|
+
if (!config.targets.has(target)) {
|
|
5560
|
+
config.targets.set(target, new Map());
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5564
|
+
config.targets.get(target).set(matcher, {
|
|
5565
|
+
removeOriginal,
|
|
5566
|
+
currentAttributes: new Map()
|
|
5567
|
+
});
|
|
5568
|
+
|
|
5569
|
+
// Perform initial attribute transport
|
|
5570
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5571
|
+
|
|
5572
|
+
// Attach observer
|
|
5573
|
+
_attachObserver(host);
|
|
5574
|
+
|
|
5575
|
+
// Return cleanup function and utility functions
|
|
5576
|
+
return {
|
|
5577
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5578
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5579
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5580
|
+
}
|
|
5581
|
+
};
|
|
5582
|
+
|
|
5583
|
+
/**
|
|
5584
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5585
|
+
*
|
|
5586
|
+
* @param {HTMLElement} host - The host element
|
|
5587
|
+
* @param {HTMLElement} target - The target element
|
|
5588
|
+
* @param {Function} matcher - The matcher function
|
|
5589
|
+
* @private
|
|
5590
|
+
*/
|
|
5591
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5592
|
+
const config = _transportConfig.get(host);
|
|
5593
|
+
if (!config) return;
|
|
5594
|
+
|
|
5595
|
+
// Remove this matcher from this target
|
|
5596
|
+
const targetMatchers = config.targets.get(target);
|
|
5597
|
+
if (targetMatchers) {
|
|
5598
|
+
targetMatchers.delete(matcher);
|
|
5599
|
+
|
|
5600
|
+
// If this target has no more matchers, remove it
|
|
5601
|
+
if (targetMatchers.size === 0) {
|
|
5602
|
+
config.targets.delete(target);
|
|
5603
|
+
}
|
|
5604
|
+
}
|
|
5605
|
+
|
|
5606
|
+
// Check if this matcher is still used by any target
|
|
5607
|
+
let matcherStillUsed = false;
|
|
5608
|
+
for (const matcherMap of config.targets.values()) {
|
|
5609
|
+
if (matcherMap.has(matcher)) {
|
|
5610
|
+
matcherStillUsed = true;
|
|
5611
|
+
break;
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
|
|
5615
|
+
// If not used anymore, remove from matchers set
|
|
5616
|
+
if (!matcherStillUsed) {
|
|
5617
|
+
config.matchers.delete(matcher);
|
|
5618
|
+
}
|
|
5619
|
+
|
|
5620
|
+
// If no more targets or matchers, detach observer
|
|
5621
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5622
|
+
_detachObserver(host);
|
|
5623
|
+
}
|
|
5624
|
+
};
|
|
5625
|
+
|
|
5626
|
+
/**
|
|
5627
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5628
|
+
*
|
|
5629
|
+
* @param {Object} params - The parameters object.
|
|
5630
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5631
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5632
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5633
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5634
|
+
* @returns {void}
|
|
5635
|
+
* @private
|
|
5636
|
+
*/
|
|
5637
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5638
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5639
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5640
|
+
.filter(attr => matcher(attr))
|
|
5641
|
+
.reduce((acc, attr) => {
|
|
5642
|
+
acc[attr] = host.getAttribute(attr);
|
|
5643
|
+
return acc;
|
|
5644
|
+
}, {});
|
|
5645
|
+
|
|
5646
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5647
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5648
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5649
|
+
target.setAttribute(key, value);
|
|
5650
|
+
if (removeOriginal) {
|
|
5651
|
+
host.removeAttribute(key);
|
|
5652
|
+
}
|
|
5653
|
+
});
|
|
5654
|
+
};
|
|
5655
|
+
|
|
5656
|
+
/**
|
|
5657
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5658
|
+
*
|
|
5659
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5660
|
+
* @returns {MutationObserver} The observer instance.
|
|
5661
|
+
* @private
|
|
5662
|
+
*/
|
|
5663
|
+
const _attachObserver = (host) => {
|
|
5664
|
+
// If an observer for this host already exists, return it
|
|
5665
|
+
if (_observers.has(host)) {
|
|
5666
|
+
return _observers.get(host);
|
|
5667
|
+
}
|
|
5668
|
+
|
|
5669
|
+
// Create a new MutationObserver
|
|
5670
|
+
const observer = new MutationObserver((mutations) => {
|
|
5671
|
+
const config = _transportConfig.get(host);
|
|
5672
|
+
if (!config) return;
|
|
5673
|
+
|
|
5674
|
+
// For each mutation affecting attributes
|
|
5675
|
+
mutations
|
|
5676
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5677
|
+
.forEach(mutation => {
|
|
5678
|
+
const attributeName = mutation.attributeName;
|
|
5679
|
+
|
|
5680
|
+
// Find matchers that care about this attribute
|
|
5681
|
+
for (const matcher of config.matchers) {
|
|
5682
|
+
if (matcher(attributeName)) {
|
|
5683
|
+
// For each target that uses this matcher
|
|
5684
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5685
|
+
if (matcherConfigs.has(matcher)) {
|
|
5686
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5687
|
+
_transportAttributes({
|
|
5688
|
+
host,
|
|
5689
|
+
target,
|
|
5690
|
+
matcher,
|
|
5691
|
+
removeOriginal
|
|
5692
|
+
});
|
|
5693
|
+
}
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5696
|
+
}
|
|
5697
|
+
});
|
|
5698
|
+
});
|
|
5699
|
+
|
|
5700
|
+
// Start observing attribute changes
|
|
5701
|
+
observer.observe(host, { attributes: true });
|
|
5702
|
+
|
|
5703
|
+
// Store the observer
|
|
5704
|
+
_observers.set(host, observer);
|
|
5705
|
+
|
|
5706
|
+
return observer;
|
|
5707
|
+
};
|
|
5708
|
+
|
|
5709
|
+
/**
|
|
5710
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5711
|
+
*
|
|
5712
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5713
|
+
* @private
|
|
5714
|
+
*/
|
|
5715
|
+
const _detachObserver = (host) => {
|
|
5716
|
+
if (_observers.has(host)) {
|
|
5717
|
+
const observer = _observers.get(host);
|
|
5718
|
+
observer.disconnect();
|
|
5719
|
+
_observers.delete(host);
|
|
5720
|
+
}
|
|
5721
|
+
|
|
5722
|
+
// Clean up the transport config as well
|
|
5723
|
+
if (_transportConfig.has(host)) {
|
|
5724
|
+
_transportConfig.delete(host);
|
|
5725
|
+
}
|
|
5726
|
+
};
|
|
5727
|
+
|
|
5728
|
+
/**
|
|
5729
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5730
|
+
* @param {HTMLElement} host - The host element
|
|
5731
|
+
* @param {HTMLElement} target - The target element
|
|
5732
|
+
* @param {Function} matcher - The matcher function
|
|
5733
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5734
|
+
* @private
|
|
5735
|
+
*/
|
|
5736
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5737
|
+
const config = _transportConfig.get(host);
|
|
5738
|
+
if (!config) return undefined;
|
|
5739
|
+
|
|
5740
|
+
const targetMatchers = config.targets.get(target);
|
|
5741
|
+
if (!targetMatchers) return undefined;
|
|
5742
|
+
|
|
5743
|
+
return targetMatchers.get(matcher);
|
|
5744
|
+
};
|
|
5745
|
+
|
|
5746
|
+
/**
|
|
5747
|
+
* Sets an observed attribute value
|
|
5748
|
+
* @param {HTMLElement} host - The host element
|
|
5749
|
+
* @param {HTMLElement} target - The target element
|
|
5750
|
+
* @param {Function} matcher - The matcher function
|
|
5751
|
+
* @param {string} key - The attribute name
|
|
5752
|
+
* @param {string} value - The attribute value
|
|
5753
|
+
* @private
|
|
5754
|
+
*/
|
|
5755
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5756
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5757
|
+
if (matcherConfig) {
|
|
5758
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5759
|
+
}
|
|
5760
|
+
};
|
|
5761
|
+
|
|
5762
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5763
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5764
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5765
|
+
return undefined;
|
|
5766
|
+
};
|
|
5767
|
+
|
|
5768
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5769
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5770
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5771
|
+
return [];
|
|
5772
|
+
};
|
|
5773
|
+
|
|
5774
|
+
const _matchers = {
|
|
5775
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5776
|
+
'role': attr => attr.match(/^role$/)
|
|
5777
|
+
};
|
|
5778
|
+
|
|
5779
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5780
|
+
return transportAttributes({
|
|
5781
|
+
host,
|
|
5782
|
+
target,
|
|
5783
|
+
match: attr => {
|
|
5784
|
+
for (const key in _matchers) {
|
|
5785
|
+
if (_matchers[key](attr)) return true;
|
|
5786
|
+
}
|
|
5787
|
+
return false;
|
|
5788
|
+
},
|
|
5789
|
+
removeOriginal
|
|
5790
|
+
});
|
|
5791
|
+
};
|
|
5792
|
+
|
|
5793
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
5794
|
+
|
|
5795
|
+
/**
|
|
5796
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5797
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5798
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5799
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5800
|
+
* @private
|
|
5801
|
+
*/
|
|
5802
|
+
attributeWatcher;
|
|
5803
|
+
|
|
5804
|
+
static get properties() {
|
|
5805
|
+
return {
|
|
5806
|
+
|
|
5807
|
+
/**
|
|
5808
|
+
* Defines the layout of an element.
|
|
5809
|
+
* @default {'default'}
|
|
5810
|
+
*/
|
|
5811
|
+
layout: {
|
|
5812
|
+
type: String,
|
|
5813
|
+
attribute: "layout",
|
|
5814
|
+
reflect: true
|
|
5815
|
+
},
|
|
5816
|
+
|
|
5817
|
+
/**
|
|
5818
|
+
* Defines the shape of an element.
|
|
5819
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5820
|
+
* @default {'default'}
|
|
5821
|
+
*/
|
|
5822
|
+
shape: {
|
|
5823
|
+
type: String,
|
|
5824
|
+
attribute: "shape",
|
|
5825
|
+
reflect: true
|
|
5826
|
+
},
|
|
5827
|
+
|
|
5828
|
+
/**
|
|
5829
|
+
* Defines the size of an element.
|
|
5830
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5831
|
+
* @default {'md'}
|
|
5832
|
+
*/
|
|
5833
|
+
size: {
|
|
5834
|
+
type: String,
|
|
5835
|
+
attribute: "size",
|
|
5836
|
+
reflect: true
|
|
5837
|
+
},
|
|
5838
|
+
|
|
5839
|
+
/**
|
|
5840
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5841
|
+
* @default {false}
|
|
5842
|
+
*/
|
|
5843
|
+
onDark: {
|
|
5844
|
+
type: Boolean,
|
|
5845
|
+
attribute: "ondark",
|
|
5846
|
+
reflect: true
|
|
5847
|
+
},
|
|
5848
|
+
|
|
5849
|
+
/**
|
|
5850
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5851
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5852
|
+
* @type {HTMLElement|null}
|
|
5853
|
+
* @default {null}
|
|
5854
|
+
* @private
|
|
5855
|
+
*/
|
|
5856
|
+
wrapper: {
|
|
5857
|
+
attribute: false,
|
|
5858
|
+
reflect: false
|
|
5859
|
+
}
|
|
5860
|
+
};
|
|
5861
|
+
}
|
|
5862
|
+
|
|
5863
|
+
|
|
5864
|
+
|
|
5865
|
+
resetShapeClasses() {
|
|
5866
|
+
if (this.shape && this.size) {
|
|
5867
|
+
|
|
5868
|
+
if (this.wrapper) {
|
|
5869
|
+
this.wrapper.classList.forEach((className) => {
|
|
5870
|
+
if (className.startsWith('shape-')) {
|
|
5871
|
+
this.wrapper.classList.remove(className);
|
|
5872
|
+
}
|
|
5873
|
+
});
|
|
5874
|
+
|
|
5875
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5876
|
+
}
|
|
5877
|
+
}
|
|
5878
|
+
}
|
|
5879
|
+
|
|
5880
|
+
resetLayoutClasses() {
|
|
5881
|
+
if (this.layout) {
|
|
5882
|
+
if (this.wrapper) {
|
|
5883
|
+
this.wrapper.classList.forEach((className) => {
|
|
5884
|
+
if (className.startsWith('layout-')) {
|
|
5885
|
+
this.wrapper.classList.remove(className);
|
|
5886
|
+
}
|
|
5887
|
+
});
|
|
5888
|
+
|
|
5889
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
5890
|
+
}
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
|
|
5894
|
+
updateComponentArchitecture() {
|
|
5895
|
+
this.resetLayoutClasses();
|
|
5896
|
+
this.resetShapeClasses();
|
|
5897
|
+
}
|
|
5898
|
+
|
|
5899
|
+
updated(changedProperties) {
|
|
5900
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
5901
|
+
this.updateComponentArchitecture();
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
5904
|
+
|
|
5905
|
+
firstUpdated() {
|
|
5906
|
+
super.firstUpdated();
|
|
5907
|
+
|
|
5908
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
5909
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5910
|
+
|
|
5911
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
5912
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
5913
|
+
}
|
|
5914
|
+
|
|
5915
|
+
disconnectedCallback() {
|
|
5916
|
+
super.disconnectedCallback();
|
|
5917
|
+
|
|
5918
|
+
// Cleanup the ARIA observer if it exists
|
|
5919
|
+
if (this.attributeWatcher) {
|
|
5920
|
+
this.attributeWatcher.cleanup();
|
|
5921
|
+
this.attributeWatcher = null;
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
|
|
5925
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
5926
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
5927
|
+
render() {
|
|
5928
|
+
try {
|
|
5929
|
+
return this.renderLayout();
|
|
5930
|
+
} catch (error) {
|
|
5931
|
+
// failed to get the defined layout
|
|
5932
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
5933
|
+
|
|
5934
|
+
// fallback to the default layout
|
|
5935
|
+
return this.getLayout('default');
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
};
|
|
5939
|
+
|
|
5940
|
+
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}`;
|
|
5941
|
+
|
|
5942
|
+
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)}`;
|
|
5943
|
+
|
|
5944
|
+
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}`;
|
|
5945
|
+
|
|
5946
|
+
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}`;
|
|
5947
|
+
|
|
5948
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5949
|
+
// See LICENSE in the project root for license information.
|
|
5950
|
+
|
|
5951
|
+
// ---------------------------------------------------------------------
|
|
5952
|
+
|
|
5953
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5954
|
+
|
|
5955
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5956
|
+
|
|
5957
|
+
/* eslint-disable jsdoc/require-param */
|
|
5958
|
+
|
|
5959
|
+
/**
|
|
5960
|
+
* This will register a new custom element with the browser.
|
|
5961
|
+
* @param {String} name - The name of the custom element.
|
|
5962
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5963
|
+
* @returns {void}
|
|
5964
|
+
*/
|
|
5965
|
+
registerComponent(name, componentClass) {
|
|
5966
|
+
if (!customElements.get(name)) {
|
|
5967
|
+
customElements.define(name, class extends componentClass {});
|
|
5968
|
+
}
|
|
5969
|
+
}
|
|
5970
|
+
|
|
5971
|
+
/**
|
|
5972
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5973
|
+
* @returns {void}
|
|
5974
|
+
*/
|
|
5975
|
+
closestElement(
|
|
5976
|
+
selector, // selector like in .closest()
|
|
5977
|
+
base = this, // extra functionality to skip a parent
|
|
5978
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5979
|
+
!el || el === document || el === window
|
|
5980
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5981
|
+
: found
|
|
5982
|
+
? found // found a selector INside this element
|
|
5983
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5984
|
+
) {
|
|
5985
|
+
return __Closest(base);
|
|
5986
|
+
}
|
|
5987
|
+
/* eslint-enable jsdoc/require-param */
|
|
5988
|
+
|
|
5989
|
+
/**
|
|
5990
|
+
* 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.
|
|
5991
|
+
* @param {Object} elem - The element to check.
|
|
5992
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5993
|
+
* @returns {void}
|
|
5994
|
+
*/
|
|
5995
|
+
handleComponentTagRename(elem, tagName) {
|
|
5996
|
+
const tag = tagName.toLowerCase();
|
|
5997
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5998
|
+
|
|
5999
|
+
if (elemTag !== tag) {
|
|
6000
|
+
elem.setAttribute(tag, true);
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
|
|
6004
|
+
/**
|
|
6005
|
+
* Validates if an element is a specific Auro component.
|
|
6006
|
+
* @param {Object} elem - The element to validate.
|
|
6007
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6008
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6009
|
+
*/
|
|
6010
|
+
elementMatch(elem, tagName) {
|
|
6011
|
+
const tag = tagName.toLowerCase();
|
|
6012
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6013
|
+
|
|
6014
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6015
|
+
}
|
|
6016
|
+
};
|
|
6017
|
+
|
|
6018
|
+
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}}`;
|
|
6019
|
+
|
|
6020
|
+
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}`;
|
|
6021
|
+
|
|
6022
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6023
|
+
|
|
6024
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6025
|
+
// See LICENSE in the project root for license information.
|
|
6026
|
+
|
|
6027
|
+
|
|
6028
|
+
class AuroLoader extends LitElement {
|
|
6029
|
+
constructor() {
|
|
6030
|
+
super();
|
|
6031
|
+
|
|
6032
|
+
/**
|
|
6033
|
+
* @private
|
|
6034
|
+
*/
|
|
6035
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6036
|
+
|
|
6037
|
+
/**
|
|
6038
|
+
* @private
|
|
6039
|
+
*/
|
|
6040
|
+
this.mdCount = 3;
|
|
6041
|
+
|
|
6042
|
+
/**
|
|
6043
|
+
* @private
|
|
6044
|
+
*/
|
|
6045
|
+
this.smCount = 2;
|
|
6046
|
+
|
|
6047
|
+
/**
|
|
6048
|
+
* @private
|
|
6049
|
+
*/
|
|
6050
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6051
|
+
|
|
6052
|
+
this.orbit = false;
|
|
6053
|
+
this.ringworm = false;
|
|
6054
|
+
this.laser = false;
|
|
6055
|
+
this.pulse = false;
|
|
6056
|
+
}
|
|
6057
|
+
|
|
6058
|
+
// function to define props used within the scope of this component
|
|
6059
|
+
static get properties() {
|
|
6060
|
+
return {
|
|
6061
|
+
|
|
6062
|
+
/**
|
|
6063
|
+
* Sets loader to laser type.
|
|
6064
|
+
*/
|
|
6065
|
+
laser: {
|
|
6066
|
+
type: Boolean,
|
|
6067
|
+
reflect: true
|
|
6068
|
+
},
|
|
6069
|
+
|
|
6070
|
+
/**
|
|
6071
|
+
* Sets loader to orbit type.
|
|
6072
|
+
*/
|
|
6073
|
+
orbit: {
|
|
6074
|
+
type: Boolean,
|
|
6075
|
+
reflect: true
|
|
6076
|
+
},
|
|
6077
|
+
|
|
6078
|
+
/**
|
|
6079
|
+
* Sets loader to pulse type.
|
|
6080
|
+
*/
|
|
6081
|
+
pulse: {
|
|
6082
|
+
type: Boolean,
|
|
6083
|
+
reflect: true
|
|
6084
|
+
},
|
|
6085
|
+
|
|
6086
|
+
/**
|
|
6087
|
+
* Sets loader to ringworm type.
|
|
6088
|
+
*/
|
|
6089
|
+
ringworm: {
|
|
6090
|
+
type: Boolean,
|
|
6091
|
+
reflect: true
|
|
6092
|
+
}
|
|
6093
|
+
};
|
|
6094
|
+
}
|
|
6095
|
+
|
|
6096
|
+
static get styles() {
|
|
6097
|
+
return [
|
|
6098
|
+
css`${styleCss$2}`,
|
|
6099
|
+
css`${colorCss$1}`,
|
|
6100
|
+
css`${tokensCss$1}`
|
|
6101
|
+
];
|
|
6102
|
+
}
|
|
6103
|
+
|
|
6104
|
+
/**
|
|
6105
|
+
* This will register this element with the browser.
|
|
6106
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6107
|
+
*
|
|
6108
|
+
* @example
|
|
6109
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6110
|
+
*
|
|
6111
|
+
*/
|
|
6112
|
+
static register(name = "auro-loader") {
|
|
6113
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6114
|
+
}
|
|
6115
|
+
|
|
6116
|
+
firstUpdated() {
|
|
6117
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6118
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6119
|
+
}
|
|
6120
|
+
|
|
6121
|
+
connectedCallback() {
|
|
6122
|
+
super.connectedCallback();
|
|
6123
|
+
}
|
|
6124
|
+
|
|
6125
|
+
/**
|
|
6126
|
+
* @private
|
|
6127
|
+
* @returns {Array} Numbered array for template map.
|
|
6128
|
+
*/
|
|
6129
|
+
defineTemplate() {
|
|
6130
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6131
|
+
|
|
6132
|
+
if (this.orbit || this.laser) {
|
|
6133
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6134
|
+
} else if (this.ringworm) {
|
|
6135
|
+
nodes = Array.from(Array(0).keys());
|
|
6136
|
+
}
|
|
6137
|
+
|
|
6138
|
+
return nodes;
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6142
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6143
|
+
|
|
6144
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6145
|
+
render() {
|
|
6146
|
+
return html$1`
|
|
6147
|
+
${this.defineTemplate().map((idx) => html$1`
|
|
6148
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6149
|
+
`)}
|
|
6150
|
+
|
|
6151
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6152
|
+
|
|
6153
|
+
${this.ringworm ? html$1`
|
|
6154
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6155
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6156
|
+
</svg>`
|
|
6157
|
+
: ``
|
|
6158
|
+
}
|
|
6159
|
+
`;
|
|
6160
|
+
}
|
|
6161
|
+
}
|
|
6162
|
+
|
|
6163
|
+
var loaderVersion = '5.1.0';
|
|
6164
|
+
|
|
6165
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6166
|
+
// See LICENSE in the project root for license information.
|
|
6167
|
+
|
|
6168
|
+
|
|
6169
|
+
/**
|
|
6170
|
+
* @slot - Default slot for the text of the button.
|
|
6171
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6172
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6173
|
+
* @csspart text - Apply CSS to text slot.
|
|
6174
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6175
|
+
*/
|
|
6176
|
+
|
|
6177
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6178
|
+
|
|
6179
|
+
/**
|
|
6180
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6181
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6182
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6183
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6184
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6185
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6186
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6187
|
+
*/
|
|
6188
|
+
class AuroButton extends AuroElement$1 {
|
|
6189
|
+
|
|
6190
|
+
/**
|
|
6191
|
+
* Enables form association for this element.
|
|
6192
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6193
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6194
|
+
*/
|
|
6195
|
+
static get formAssociated() {
|
|
6196
|
+
return true;
|
|
6197
|
+
}
|
|
6198
|
+
|
|
6199
|
+
constructor() {
|
|
6200
|
+
super();
|
|
6201
|
+
this.autofocus = false;
|
|
6202
|
+
this.disabled = false;
|
|
6203
|
+
this.loading = false;
|
|
6204
|
+
this.size = "md";
|
|
6205
|
+
this.shape = "rounded";
|
|
6206
|
+
this.onDark = false;
|
|
6207
|
+
this.fluid = false;
|
|
6208
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6209
|
+
this.variant = 'primary';
|
|
6210
|
+
|
|
6211
|
+
// Support for HTML5 forms
|
|
6212
|
+
if (typeof this.attachInternals === 'function') {
|
|
6213
|
+
this.internals = this.attachInternals();
|
|
6214
|
+
} else {
|
|
6215
|
+
this.internals = null;
|
|
6216
|
+
|
|
6217
|
+
// eslint-disable-next-line no-console
|
|
6218
|
+
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.');
|
|
6219
|
+
}
|
|
6220
|
+
|
|
6221
|
+
/**
|
|
6222
|
+
* Generate unique names for dependency components.
|
|
6223
|
+
*/
|
|
6224
|
+
const versioning = new AuroDependencyVersioning();
|
|
6225
|
+
|
|
6226
|
+
/**
|
|
6227
|
+
* @private
|
|
6228
|
+
*/
|
|
6229
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6230
|
+
|
|
6231
|
+
/**
|
|
6232
|
+
* @private
|
|
6233
|
+
*/
|
|
6234
|
+
this.buttonHref = undefined;
|
|
6235
|
+
|
|
6236
|
+
/**
|
|
6237
|
+
* @private
|
|
6238
|
+
*/
|
|
6239
|
+
this.buttonTarget = undefined;
|
|
6240
|
+
|
|
6241
|
+
/**
|
|
6242
|
+
* @private
|
|
6243
|
+
*/
|
|
6244
|
+
this.buttonRel = undefined;
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6247
|
+
static get styles() {
|
|
6248
|
+
return [
|
|
6249
|
+
tokensCss$2,
|
|
6250
|
+
styleCss$3,
|
|
6251
|
+
colorCss$2,
|
|
6252
|
+
shapeSize
|
|
6253
|
+
];
|
|
6254
|
+
}
|
|
6255
|
+
|
|
6256
|
+
static get properties() {
|
|
6257
|
+
return {
|
|
6258
|
+
|
|
6259
|
+
...super.properties,
|
|
6260
|
+
|
|
6261
|
+
/**
|
|
6262
|
+
* Override layout since it isn't used in this component.
|
|
6263
|
+
* @private
|
|
6264
|
+
*/
|
|
6265
|
+
layout: {
|
|
6266
|
+
type: Boolean,
|
|
6267
|
+
attribute: false,
|
|
6268
|
+
reflect: false
|
|
6269
|
+
},
|
|
6270
|
+
|
|
6271
|
+
/**
|
|
6272
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6273
|
+
*/
|
|
6274
|
+
autofocus: {
|
|
6275
|
+
type: Boolean,
|
|
6276
|
+
reflect: true
|
|
6277
|
+
},
|
|
6278
|
+
|
|
6279
|
+
/**
|
|
6280
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6281
|
+
*/
|
|
6282
|
+
disabled: {
|
|
6283
|
+
type: Boolean,
|
|
6284
|
+
reflect: true
|
|
6285
|
+
},
|
|
6286
|
+
|
|
6287
|
+
/**
|
|
6288
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6289
|
+
*/
|
|
6290
|
+
fluid: {
|
|
6291
|
+
type: Boolean,
|
|
6292
|
+
reflect: true
|
|
6293
|
+
},
|
|
6294
|
+
|
|
6295
|
+
/**
|
|
6296
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6297
|
+
*/
|
|
6298
|
+
loading: {
|
|
6299
|
+
type: Boolean,
|
|
6300
|
+
reflect: true
|
|
6301
|
+
},
|
|
6302
|
+
|
|
6303
|
+
/**
|
|
6304
|
+
* 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.
|
|
6305
|
+
*/
|
|
6306
|
+
loadingText: {
|
|
6307
|
+
type: String
|
|
6308
|
+
},
|
|
6309
|
+
|
|
6310
|
+
/**
|
|
6311
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6312
|
+
*/
|
|
6313
|
+
tIndex: {
|
|
6314
|
+
type: String,
|
|
6315
|
+
reflect: true
|
|
6316
|
+
},
|
|
6317
|
+
|
|
6318
|
+
/**
|
|
6319
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6320
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6321
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6322
|
+
*/
|
|
6323
|
+
tabindex: {
|
|
6324
|
+
type: String,
|
|
6325
|
+
reflect: false
|
|
6326
|
+
},
|
|
6327
|
+
|
|
6328
|
+
/**
|
|
6329
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6330
|
+
*/
|
|
6331
|
+
title: {
|
|
6332
|
+
type: String,
|
|
6333
|
+
reflect: true
|
|
6334
|
+
},
|
|
6335
|
+
|
|
6336
|
+
/**
|
|
6337
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6338
|
+
*/
|
|
6339
|
+
type: {
|
|
6340
|
+
type: String,
|
|
6341
|
+
reflect: true
|
|
6342
|
+
},
|
|
6343
|
+
|
|
6344
|
+
/**
|
|
6345
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6346
|
+
*/
|
|
6347
|
+
value: {
|
|
6348
|
+
type: String,
|
|
6349
|
+
reflect: true
|
|
6350
|
+
},
|
|
6351
|
+
|
|
6352
|
+
/**
|
|
6353
|
+
* Sets button variant option.
|
|
6354
|
+
* @default primary
|
|
6355
|
+
*/
|
|
6356
|
+
variant: {
|
|
6357
|
+
type: String,
|
|
6358
|
+
reflect: true
|
|
6359
|
+
},
|
|
6360
|
+
|
|
6361
|
+
/**
|
|
6362
|
+
* @private
|
|
6363
|
+
*/
|
|
6364
|
+
buttonHref: {
|
|
6365
|
+
type: String,
|
|
6366
|
+
},
|
|
6367
|
+
|
|
6368
|
+
/**
|
|
6369
|
+
* @private
|
|
6370
|
+
*/
|
|
6371
|
+
buttonTarget: {
|
|
6372
|
+
type: String,
|
|
6373
|
+
},
|
|
6374
|
+
|
|
6375
|
+
/**
|
|
6376
|
+
* @private
|
|
6377
|
+
*/
|
|
6378
|
+
buttonRel: {
|
|
6379
|
+
type: String,
|
|
6380
|
+
},
|
|
6381
|
+
};
|
|
6382
|
+
}
|
|
6383
|
+
|
|
6384
|
+
/**
|
|
6385
|
+
* This will register this element with the browser.
|
|
6386
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6387
|
+
*
|
|
6388
|
+
* @example
|
|
6389
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6390
|
+
*
|
|
5094
6391
|
*/
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
'helpText': true,
|
|
5098
|
-
'leftIndent': true,
|
|
5099
|
-
'rightIndent': true
|
|
5100
|
-
};
|
|
5101
|
-
|
|
5102
|
-
return html`
|
|
5103
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
5104
|
-
`;
|
|
6392
|
+
static register(name = "auro-button") {
|
|
6393
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
5105
6394
|
}
|
|
5106
6395
|
|
|
5107
6396
|
/**
|
|
5108
|
-
*
|
|
6397
|
+
* Internal method to apply focus to the HTML5 button.
|
|
5109
6398
|
* @private
|
|
5110
|
-
* @returns {
|
|
6399
|
+
* @returns {void}
|
|
5111
6400
|
*/
|
|
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
|
-
`;
|
|
6401
|
+
focus() {
|
|
6402
|
+
this.renderRoot.querySelector('button').focus();
|
|
5122
6403
|
}
|
|
5123
6404
|
|
|
5124
6405
|
/**
|
|
5125
|
-
*
|
|
6406
|
+
* Submits the form that this button is associated with.
|
|
5126
6407
|
* @private
|
|
5127
|
-
* @
|
|
5128
|
-
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
6408
|
+
* @returns {void}
|
|
5129
6409
|
*/
|
|
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();
|
|
6410
|
+
surfaceSubmitEvent() {
|
|
6411
|
+
if (this.form) {
|
|
6412
|
+
this.form.requestSubmit();
|
|
5148
6413
|
}
|
|
5149
6414
|
}
|
|
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
6415
|
|
|
5171
6416
|
/**
|
|
5172
|
-
*
|
|
5173
|
-
* @
|
|
5174
|
-
* @
|
|
5175
|
-
* @returns {void}
|
|
6417
|
+
* Returns the form element that this button is associated with.
|
|
6418
|
+
* @private
|
|
6419
|
+
* @returns {HTMLFormElement | null}
|
|
5176
6420
|
*/
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
customElements.define(name, class extends componentClass {});
|
|
5180
|
-
}
|
|
6421
|
+
get form() {
|
|
6422
|
+
return this.internals ? this.internals.form : null;
|
|
5181
6423
|
}
|
|
5182
6424
|
|
|
5183
6425
|
/**
|
|
5184
|
-
*
|
|
5185
|
-
* @returns {
|
|
6426
|
+
* @private
|
|
6427
|
+
* @returns {Boolean}
|
|
5186
6428
|
*/
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
base = this, // extra functionality to skip a parent
|
|
5190
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5191
|
-
!el || el === document || el === window
|
|
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);
|
|
6429
|
+
get showText() {
|
|
6430
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
5198
6431
|
}
|
|
5199
|
-
/* eslint-enable jsdoc/require-param */
|
|
5200
6432
|
|
|
5201
6433
|
/**
|
|
5202
|
-
*
|
|
5203
|
-
* @
|
|
5204
|
-
* @
|
|
5205
|
-
* @returns {void}
|
|
6434
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6435
|
+
* @returns {string | undefined}
|
|
6436
|
+
* @private
|
|
5206
6437
|
*/
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6438
|
+
get currentAriaLabel() {
|
|
6439
|
+
if (!this.attributeWatcher) return undefined;
|
|
5210
6440
|
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
}
|
|
6441
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6442
|
+
return ariaLabel || undefined;
|
|
5214
6443
|
}
|
|
5215
6444
|
|
|
5216
6445
|
/**
|
|
5217
|
-
*
|
|
5218
|
-
* @
|
|
5219
|
-
* @
|
|
5220
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6446
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6447
|
+
* @returns {string | undefined}
|
|
6448
|
+
* @private
|
|
5221
6449
|
*/
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6450
|
+
get currentAriaLabelledBy() {
|
|
6451
|
+
if (!this.attributeWatcher) return undefined;
|
|
5225
6452
|
|
|
5226
|
-
|
|
6453
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6454
|
+
return ariaLabelledBy || undefined;
|
|
5227
6455
|
}
|
|
5228
|
-
};
|
|
5229
|
-
|
|
5230
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5231
|
-
// See LICENSE in the project root for license information.
|
|
5232
6456
|
|
|
5233
|
-
|
|
5234
|
-
|
|
6457
|
+
/**
|
|
6458
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6459
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6460
|
+
* @private
|
|
6461
|
+
*/
|
|
6462
|
+
get iconOnly() {
|
|
6463
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6464
|
+
}
|
|
5235
6465
|
|
|
5236
6466
|
/**
|
|
5237
|
-
*
|
|
6467
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6468
|
+
* @returns {string} - The font size class name.
|
|
5238
6469
|
* @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
6470
|
*/
|
|
5243
|
-
|
|
5244
|
-
let result = baseName;
|
|
6471
|
+
getFontSize() {
|
|
5245
6472
|
|
|
5246
|
-
|
|
5247
|
-
|
|
6473
|
+
// Size map for standard buttons
|
|
6474
|
+
const standardButtonSizeMap = {
|
|
6475
|
+
xs: 'body-xs',
|
|
6476
|
+
sm: 'body-sm',
|
|
6477
|
+
md: 'body-default',
|
|
6478
|
+
lg: 'body-lg',
|
|
6479
|
+
xl: 'body-lg'
|
|
6480
|
+
};
|
|
5248
6481
|
|
|
5249
|
-
|
|
6482
|
+
// Size map for icon-only buttons
|
|
6483
|
+
const iconOnlyButtonSizeMap = {
|
|
6484
|
+
xs: 'heading-xs',
|
|
6485
|
+
sm: 'heading-sm',
|
|
6486
|
+
md: 'heading-sm',
|
|
6487
|
+
lg: 'heading-md',
|
|
6488
|
+
xl: 'heading-lg'
|
|
6489
|
+
};
|
|
6490
|
+
|
|
6491
|
+
// Determine which map to use based on the shape
|
|
6492
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6493
|
+
|
|
6494
|
+
// Return the font size based on the button size and shape
|
|
6495
|
+
return sizeMap[this.size] || 'body-default';
|
|
5250
6496
|
}
|
|
5251
6497
|
|
|
5252
6498
|
/**
|
|
5253
|
-
*
|
|
5254
|
-
* @
|
|
5255
|
-
* @
|
|
5256
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6499
|
+
* Renders the default layout for the button.
|
|
6500
|
+
* @returns {TemplateResult}
|
|
6501
|
+
* @private
|
|
5257
6502
|
*/
|
|
5258
|
-
|
|
5259
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5260
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
6503
|
+
renderLayoutDefault() {
|
|
5261
6504
|
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
6505
|
+
const fontSize = this.getFontSize();
|
|
6506
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
6507
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5265
6508
|
|
|
5266
|
-
|
|
6509
|
+
const classes = {
|
|
6510
|
+
"auro-button": true,
|
|
6511
|
+
"inset": this.showText,
|
|
6512
|
+
wrapper: true,
|
|
6513
|
+
loading: this.loading,
|
|
6514
|
+
[`${fontSize}`]: true,
|
|
6515
|
+
|
|
6516
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6517
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6518
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6519
|
+
};
|
|
6520
|
+
|
|
6521
|
+
const contentClasses = {
|
|
6522
|
+
"contentWrapper": true,
|
|
6523
|
+
"util_displayHiddenVisually": this.loading
|
|
6524
|
+
};
|
|
6525
|
+
|
|
6526
|
+
return html`
|
|
6527
|
+
<${tag}
|
|
6528
|
+
part="${part}"
|
|
6529
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6530
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6531
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
6532
|
+
?autofocus="${this.autofocus}"
|
|
6533
|
+
class=${classMap(classes)}
|
|
6534
|
+
?disabled="${this.disabled || this.loading}"
|
|
6535
|
+
?onDark="${this.onDark}"
|
|
6536
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
6537
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
6538
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
6539
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6540
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6541
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6542
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
6543
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
6544
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
6545
|
+
>
|
|
6546
|
+
${ifDefined(this.loading ? html`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6547
|
+
|
|
6548
|
+
<span class="${classMap(contentClasses)}">
|
|
6549
|
+
<span class="textSlot" part="text">
|
|
6550
|
+
<slot></slot>
|
|
6551
|
+
</span>
|
|
6552
|
+
</span>
|
|
6553
|
+
</${tag}>
|
|
6554
|
+
`;
|
|
6555
|
+
}
|
|
6556
|
+
|
|
6557
|
+
/**
|
|
6558
|
+
* Renders the layout of the button.
|
|
6559
|
+
* @returns {TemplateResult}
|
|
6560
|
+
* @private
|
|
6561
|
+
*/
|
|
6562
|
+
renderLayout() {
|
|
6563
|
+
return this.renderLayoutDefault();
|
|
5267
6564
|
}
|
|
5268
6565
|
}
|
|
5269
6566
|
|
|
6567
|
+
var buttonVersion = '11.3.0';
|
|
6568
|
+
|
|
5270
6569
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5271
6570
|
// See LICENSE in the project root for license information.
|
|
5272
6571
|
|
|
@@ -5417,9 +6716,9 @@ class BaseIcon extends AuroElement {
|
|
|
5417
6716
|
}
|
|
5418
6717
|
}
|
|
5419
6718
|
|
|
5420
|
-
var tokensCss$
|
|
6719
|
+
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
6720
|
|
|
5422
|
-
var colorCss$
|
|
6721
|
+
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
6722
|
|
|
5424
6723
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5425
6724
|
// See LICENSE in the project root for license information.
|
|
@@ -5428,7 +6727,7 @@ var colorCss$2 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5428
6727
|
|
|
5429
6728
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5430
6729
|
|
|
5431
|
-
let AuroLibraryRuntimeUtils$
|
|
6730
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5432
6731
|
|
|
5433
6732
|
/* eslint-disable jsdoc/require-param */
|
|
5434
6733
|
|
|
@@ -5510,7 +6809,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5510
6809
|
*/
|
|
5511
6810
|
privateDefaults() {
|
|
5512
6811
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5513
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6812
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
5514
6813
|
}
|
|
5515
6814
|
|
|
5516
6815
|
// function to define props used within the scope of this component
|
|
@@ -5577,9 +6876,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5577
6876
|
static get styles() {
|
|
5578
6877
|
return [
|
|
5579
6878
|
super.styles,
|
|
5580
|
-
css`${tokensCss$
|
|
6879
|
+
css`${tokensCss$3}`,
|
|
5581
6880
|
css`${styleCss$1$1}`,
|
|
5582
|
-
css`${colorCss$
|
|
6881
|
+
css`${colorCss$4}`
|
|
5583
6882
|
];
|
|
5584
6883
|
}
|
|
5585
6884
|
|
|
@@ -5592,7 +6891,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5592
6891
|
*
|
|
5593
6892
|
*/
|
|
5594
6893
|
static register(name = "auro-icon") {
|
|
5595
|
-
AuroLibraryRuntimeUtils$
|
|
6894
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
5596
6895
|
}
|
|
5597
6896
|
|
|
5598
6897
|
connectedCallback() {
|
|
@@ -5613,8 +6912,12 @@ class AuroIcon extends BaseIcon {
|
|
|
5613
6912
|
async firstUpdated() {
|
|
5614
6913
|
await super.firstUpdated();
|
|
5615
6914
|
|
|
5616
|
-
|
|
5617
|
-
|
|
6915
|
+
/**
|
|
6916
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6917
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6918
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6919
|
+
*/
|
|
6920
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5618
6921
|
const svgDesc = this.svg.querySelector('desc');
|
|
5619
6922
|
|
|
5620
6923
|
if (svgDesc) {
|
|
@@ -5658,9 +6961,79 @@ class AuroIcon extends BaseIcon {
|
|
|
5658
6961
|
}
|
|
5659
6962
|
}
|
|
5660
6963
|
|
|
5661
|
-
var iconVersion = '8.0
|
|
6964
|
+
var iconVersion = '8.1.0';
|
|
6965
|
+
|
|
6966
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6967
|
+
// See LICENSE in the project root for license information.
|
|
6968
|
+
|
|
6969
|
+
// ---------------------------------------------------------------------
|
|
6970
|
+
|
|
6971
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6972
|
+
|
|
6973
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
6974
|
+
|
|
6975
|
+
/* eslint-disable jsdoc/require-param */
|
|
6976
|
+
|
|
6977
|
+
/**
|
|
6978
|
+
* This will register a new custom element with the browser.
|
|
6979
|
+
* @param {String} name - The name of the custom element.
|
|
6980
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6981
|
+
* @returns {void}
|
|
6982
|
+
*/
|
|
6983
|
+
registerComponent(name, componentClass) {
|
|
6984
|
+
if (!customElements.get(name)) {
|
|
6985
|
+
customElements.define(name, class extends componentClass {});
|
|
6986
|
+
}
|
|
6987
|
+
}
|
|
6988
|
+
|
|
6989
|
+
/**
|
|
6990
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6991
|
+
* @returns {void}
|
|
6992
|
+
*/
|
|
6993
|
+
closestElement(
|
|
6994
|
+
selector, // selector like in .closest()
|
|
6995
|
+
base = this, // extra functionality to skip a parent
|
|
6996
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6997
|
+
!el || el === document || el === window
|
|
6998
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6999
|
+
: found
|
|
7000
|
+
? found // found a selector INside this element
|
|
7001
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7002
|
+
) {
|
|
7003
|
+
return __Closest(base);
|
|
7004
|
+
}
|
|
7005
|
+
/* eslint-enable jsdoc/require-param */
|
|
7006
|
+
|
|
7007
|
+
/**
|
|
7008
|
+
* 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.
|
|
7009
|
+
* @param {Object} elem - The element to check.
|
|
7010
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7011
|
+
* @returns {void}
|
|
7012
|
+
*/
|
|
7013
|
+
handleComponentTagRename(elem, tagName) {
|
|
7014
|
+
const tag = tagName.toLowerCase();
|
|
7015
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7016
|
+
|
|
7017
|
+
if (elemTag !== tag) {
|
|
7018
|
+
elem.setAttribute(tag, true);
|
|
7019
|
+
}
|
|
7020
|
+
}
|
|
7021
|
+
|
|
7022
|
+
/**
|
|
7023
|
+
* Validates if an element is a specific Auro component.
|
|
7024
|
+
* @param {Object} elem - The element to validate.
|
|
7025
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7026
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7027
|
+
*/
|
|
7028
|
+
elementMatch(elem, tagName) {
|
|
7029
|
+
const tag = tagName.toLowerCase();
|
|
7030
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7031
|
+
|
|
7032
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7033
|
+
}
|
|
7034
|
+
};
|
|
5662
7035
|
|
|
5663
|
-
var styleCss$
|
|
7036
|
+
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
7037
|
|
|
5665
7038
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5666
7039
|
// See LICENSE in the project root for license information.
|
|
@@ -5689,7 +7062,7 @@ class AuroHeader extends LitElement {
|
|
|
5689
7062
|
/**
|
|
5690
7063
|
* @private
|
|
5691
7064
|
*/
|
|
5692
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7065
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5693
7066
|
}
|
|
5694
7067
|
|
|
5695
7068
|
// function to define props used within the scope of this component
|
|
@@ -5707,7 +7080,7 @@ class AuroHeader extends LitElement {
|
|
|
5707
7080
|
}
|
|
5708
7081
|
|
|
5709
7082
|
static get styles() {
|
|
5710
|
-
return [styleCss$
|
|
7083
|
+
return [styleCss$5];
|
|
5711
7084
|
}
|
|
5712
7085
|
|
|
5713
7086
|
/**
|
|
@@ -5719,7 +7092,7 @@ class AuroHeader extends LitElement {
|
|
|
5719
7092
|
*
|
|
5720
7093
|
*/
|
|
5721
7094
|
static register(name = "auro-header") {
|
|
5722
|
-
AuroLibraryRuntimeUtils$
|
|
7095
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5723
7096
|
}
|
|
5724
7097
|
|
|
5725
7098
|
firstUpdated() {
|
|
@@ -5815,17 +7188,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
5815
7188
|
|
|
5816
7189
|
this.large = false;
|
|
5817
7190
|
|
|
5818
|
-
AuroLibraryRuntimeUtils$
|
|
7191
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5819
7192
|
|
|
5820
7193
|
const versioning = new AuroDependencyVersioning();
|
|
7194
|
+
|
|
7195
|
+
/**
|
|
7196
|
+
* @private
|
|
7197
|
+
*/
|
|
5821
7198
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
7199
|
+
|
|
7200
|
+
/**
|
|
7201
|
+
* @private
|
|
7202
|
+
*/
|
|
5822
7203
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7204
|
+
|
|
7205
|
+
/**
|
|
7206
|
+
* @private
|
|
7207
|
+
*/
|
|
7208
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5823
7209
|
}
|
|
5824
7210
|
|
|
5825
7211
|
static get styles() {
|
|
5826
7212
|
return [
|
|
5827
|
-
colorCss$
|
|
5828
|
-
styleCss$
|
|
7213
|
+
colorCss$3,
|
|
7214
|
+
styleCss$4,
|
|
5829
7215
|
tokenCss
|
|
5830
7216
|
];
|
|
5831
7217
|
}
|
|
@@ -5854,7 +7240,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5854
7240
|
*
|
|
5855
7241
|
*/
|
|
5856
7242
|
static register(name = "auro-bibtemplate") {
|
|
5857
|
-
AuroLibraryRuntimeUtils$
|
|
7243
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
5858
7244
|
}
|
|
5859
7245
|
|
|
5860
7246
|
/**
|
|
@@ -5912,9 +7298,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
5912
7298
|
<div id="bibTemplate" part="bibtemplate">
|
|
5913
7299
|
${this.isFullscreen ? html`
|
|
5914
7300
|
<div id="headerContainer">
|
|
5915
|
-
|
|
7301
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
5916
7302
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
5917
|
-
|
|
7303
|
+
</${this.buttonTag}>
|
|
5918
7304
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
5919
7305
|
<slot name="header"></slot>
|
|
5920
7306
|
</${this.headerTag}>
|
|
@@ -5938,9 +7324,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
5938
7324
|
|
|
5939
7325
|
var bibTemplateVersion = '1.0.0';
|
|
5940
7326
|
|
|
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-
|
|
7327
|
+
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
7328
|
|
|
5943
|
-
var styleCss$1 = css`.
|
|
7329
|
+
var styleCss$1 = 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-2xl,.accent-xl{text-transform:uppercase}.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-lg,.accent-md{text-transform:uppercase}.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-sm,.accent-xs{text-transform:uppercase}.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);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.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
7330
|
|
|
5945
7331
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5946
7332
|
|
|
@@ -6020,8 +7406,6 @@ class AuroLibraryRuntimeUtils {
|
|
|
6020
7406
|
|
|
6021
7407
|
/**
|
|
6022
7408
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6023
|
-
*
|
|
6024
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6025
7409
|
*/
|
|
6026
7410
|
class AuroHelpText extends LitElement {
|
|
6027
7411
|
|
|
@@ -6137,7 +7521,7 @@ class AuroHelpText extends LitElement {
|
|
|
6137
7521
|
// function that renders the HTML and CSS into the scope of the component
|
|
6138
7522
|
render() {
|
|
6139
7523
|
return html$1`
|
|
6140
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
7524
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
6141
7525
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6142
7526
|
</div>
|
|
6143
7527
|
`;
|
|
@@ -6146,68 +7530,7 @@ class AuroHelpText extends LitElement {
|
|
|
6146
7530
|
|
|
6147
7531
|
var helpTextVersion = '1.0.0';
|
|
6148
7532
|
|
|
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}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-classic .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}`;
|
|
7533
|
+
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{display:inline-block}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.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
7534
|
|
|
6212
7535
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6213
7536
|
// See LICENSE in the project root for license information.
|
|
@@ -6220,9 +7543,10 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
|
|
|
6220
7543
|
* @slot - Default slot for the menu content.
|
|
6221
7544
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6222
7545
|
* @slot label - Defines the content of the label.
|
|
7546
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6223
7547
|
* @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
7548
|
* @slot valueText - Dropdown value text display.
|
|
7549
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6226
7550
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6227
7551
|
* @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
7552
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6240,11 +7564,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6240
7564
|
const idSubstrEnd = 8;
|
|
6241
7565
|
const idSubstrStart = 2;
|
|
6242
7566
|
|
|
6243
|
-
this.matchWidth =
|
|
7567
|
+
this.matchWidth = false;
|
|
6244
7568
|
|
|
6245
7569
|
// Layout Config
|
|
6246
|
-
this.layout = '
|
|
6247
|
-
this.shape = '
|
|
7570
|
+
this.layout = 'snowflake';
|
|
7571
|
+
this.shape = 'snowflake';
|
|
6248
7572
|
this.size = 'xl';
|
|
6249
7573
|
|
|
6250
7574
|
// floaterConfig
|
|
@@ -6255,6 +7579,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6255
7579
|
|
|
6256
7580
|
this.forceDisplayValue = false;
|
|
6257
7581
|
|
|
7582
|
+
this.layout = 'classic';
|
|
7583
|
+
this.shape = 'classic';
|
|
7584
|
+
this.size = 'xl';
|
|
7585
|
+
|
|
6258
7586
|
/**
|
|
6259
7587
|
* @private
|
|
6260
7588
|
*/
|
|
@@ -6270,7 +7598,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6270
7598
|
/**
|
|
6271
7599
|
* @private
|
|
6272
7600
|
*/
|
|
6273
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7601
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6274
7602
|
|
|
6275
7603
|
/**
|
|
6276
7604
|
* Generate unique names for dependency components.
|
|
@@ -6385,14 +7713,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6385
7713
|
reflect: true
|
|
6386
7714
|
},
|
|
6387
7715
|
|
|
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
7716
|
/**
|
|
6397
7717
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6398
7718
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6486,7 +7806,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6486
7806
|
* "top" | "right" | "bottom" | "left" |
|
|
6487
7807
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6488
7808
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6489
|
-
* "left-start" | "left-end"
|
|
7809
|
+
* "left-start" | "left-end".
|
|
6490
7810
|
* @default bottom-start
|
|
6491
7811
|
*/
|
|
6492
7812
|
placement: {
|
|
@@ -6494,6 +7814,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6494
7814
|
reflect: true
|
|
6495
7815
|
},
|
|
6496
7816
|
|
|
7817
|
+
/**
|
|
7818
|
+
* Define custom placeholder text.
|
|
7819
|
+
*/
|
|
7820
|
+
placeholder: {
|
|
7821
|
+
type: String,
|
|
7822
|
+
reflect: true
|
|
7823
|
+
},
|
|
7824
|
+
|
|
6497
7825
|
/**
|
|
6498
7826
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6499
7827
|
*/
|
|
@@ -6540,11 +7868,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6540
7868
|
},
|
|
6541
7869
|
|
|
6542
7870
|
/**
|
|
6543
|
-
* Value selected for the component.
|
|
6544
|
-
* @type {String|Array<String>}
|
|
7871
|
+
* Value selected for the component.
|
|
6545
7872
|
*/
|
|
6546
7873
|
value: {
|
|
6547
|
-
type:
|
|
7874
|
+
type: String,
|
|
7875
|
+
reflect: true,
|
|
7876
|
+
attribute: 'value'
|
|
6548
7877
|
},
|
|
6549
7878
|
|
|
6550
7879
|
/**
|
|
@@ -6591,15 +7920,47 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6591
7920
|
static get styles() {
|
|
6592
7921
|
return [
|
|
6593
7922
|
css`${shapeSizeCss$1}`,
|
|
6594
|
-
css`${tokensCss$
|
|
7923
|
+
css`${tokensCss$5}`,
|
|
6595
7924
|
css`${styleCss}`,
|
|
6596
7925
|
];
|
|
6597
7926
|
}
|
|
6598
7927
|
|
|
7928
|
+
/**
|
|
7929
|
+
* Formatted value based on `multiSelect` state.
|
|
7930
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
7931
|
+
* @private
|
|
7932
|
+
* @returns {String|Array<String>}
|
|
7933
|
+
*/
|
|
7934
|
+
get formattedValue() {
|
|
7935
|
+
if (this.multiSelect) {
|
|
7936
|
+
if (!this.value) {
|
|
7937
|
+
return undefined;
|
|
7938
|
+
}
|
|
7939
|
+
if (this.value.startsWith("[")) {
|
|
7940
|
+
return JSON.parse(this.value);
|
|
7941
|
+
}
|
|
7942
|
+
return [this.value];
|
|
7943
|
+
}
|
|
7944
|
+
return this.value;
|
|
7945
|
+
}
|
|
7946
|
+
|
|
7947
|
+
/**
|
|
7948
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7949
|
+
* @private
|
|
7950
|
+
* @returns {void}
|
|
7951
|
+
*/
|
|
7952
|
+
get commonLabelClasses() {
|
|
7953
|
+
return {
|
|
7954
|
+
'is-disabled': this.disabled,
|
|
7955
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7956
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7957
|
+
};
|
|
7958
|
+
}
|
|
7959
|
+
|
|
6599
7960
|
/**
|
|
6600
7961
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6601
7962
|
* @private
|
|
6602
|
-
* @
|
|
7963
|
+
* @returns {object} - Returns classmap.
|
|
6603
7964
|
*/
|
|
6604
7965
|
get commonWrapperClasses() {
|
|
6605
7966
|
return {
|
|
@@ -6617,10 +7978,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6617
7978
|
|
|
6618
7979
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6619
7980
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
7981
|
+
|
|
7982
|
+
if (this.dropdown.isPopoverVisible) {
|
|
7983
|
+
// wait til the bib gets fully rendered
|
|
7984
|
+
setTimeout(() => {
|
|
7985
|
+
if (this.dropdown.isBibFullscreen) {
|
|
7986
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
7987
|
+
this.dropdown.trigger.focus();
|
|
7988
|
+
|
|
7989
|
+
// default focus indicator on the first menu option
|
|
7990
|
+
if (this.menu.index < 0) {
|
|
7991
|
+
this.menu.navigateOptions('down');
|
|
7992
|
+
}
|
|
7993
|
+
}
|
|
7994
|
+
});
|
|
7995
|
+
}
|
|
6620
7996
|
});
|
|
6621
7997
|
|
|
6622
7998
|
// setting up bibtemplate
|
|
6623
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
7999
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6624
8000
|
|
|
6625
8001
|
if (this.customBibWidth) {
|
|
6626
8002
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6639,7 +8015,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6639
8015
|
*
|
|
6640
8016
|
*/
|
|
6641
8017
|
static register(name = "auro-select") {
|
|
6642
|
-
AuroLibraryRuntimeUtils$
|
|
8018
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6643
8019
|
}
|
|
6644
8020
|
|
|
6645
8021
|
/**
|
|
@@ -6699,6 +8075,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6699
8075
|
return;
|
|
6700
8076
|
}
|
|
6701
8077
|
|
|
8078
|
+
// set menu's default size if there it's not specified.
|
|
8079
|
+
if (!this.menu.getAttribute('size')) {
|
|
8080
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8081
|
+
}
|
|
8082
|
+
|
|
8083
|
+
if (!this.getAttribute('shape')) {
|
|
8084
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8085
|
+
}
|
|
8086
|
+
|
|
6702
8087
|
if (this.multiSelect) {
|
|
6703
8088
|
this.menu.multiSelect = this.multiSelect;
|
|
6704
8089
|
}
|
|
@@ -6758,46 +8143,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6758
8143
|
configureSelect() {
|
|
6759
8144
|
|
|
6760
8145
|
this.addEventListener('keydown', (evt) => {
|
|
6761
|
-
|
|
6762
|
-
|
|
8146
|
+
// when the focus is on trigger not on close button
|
|
8147
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8148
|
+
if (evt.key === 'ArrowUp') {
|
|
8149
|
+
evt.preventDefault();
|
|
6763
8150
|
|
|
6764
|
-
|
|
8151
|
+
this.dropdown.show();
|
|
8152
|
+
|
|
8153
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8154
|
+
this.menu.navigateOptions('up');
|
|
8155
|
+
}
|
|
6765
8156
|
|
|
6766
|
-
|
|
6767
|
-
this.menu.navigateOptions('up');
|
|
8157
|
+
return;
|
|
6768
8158
|
}
|
|
6769
8159
|
|
|
6770
|
-
|
|
6771
|
-
|
|
8160
|
+
if (evt.key === 'ArrowDown') {
|
|
8161
|
+
evt.preventDefault();
|
|
6772
8162
|
|
|
6773
|
-
|
|
6774
|
-
evt.preventDefault();
|
|
8163
|
+
this.dropdown.show();
|
|
6775
8164
|
|
|
6776
|
-
|
|
8165
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8166
|
+
this.menu.navigateOptions('down');
|
|
8167
|
+
}
|
|
6777
8168
|
|
|
6778
|
-
|
|
6779
|
-
this.menu.navigateOptions('down');
|
|
8169
|
+
return;
|
|
6780
8170
|
}
|
|
6781
8171
|
|
|
6782
|
-
|
|
6783
|
-
|
|
8172
|
+
if (evt.key === 'Enter') {
|
|
8173
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8174
|
+
evt.preventDefault();
|
|
8175
|
+
this.menu.makeSelection();
|
|
8176
|
+
}
|
|
6784
8177
|
|
|
6785
|
-
|
|
6786
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6787
|
-
evt.preventDefault();
|
|
6788
|
-
this.menu.makeSelection();
|
|
8178
|
+
return;
|
|
6789
8179
|
}
|
|
6790
|
-
|
|
6791
|
-
return;
|
|
6792
8180
|
}
|
|
6793
8181
|
|
|
6794
|
-
if (evt.key === 'Tab') {
|
|
8182
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6795
8183
|
if (this.dropdown.isBibFullscreen) {
|
|
6796
8184
|
evt.preventDefault();
|
|
8185
|
+
|
|
8186
|
+
// when the focus is on trigger not on close button
|
|
8187
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8188
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8189
|
+
// when bib it not open, it will focus onto trigger.
|
|
8190
|
+
this.dropdown.focus();
|
|
8191
|
+
} else {
|
|
8192
|
+
// when close button has the focus, move focus back to the trigger
|
|
8193
|
+
this.dropdown.trigger.focus();
|
|
8194
|
+
}
|
|
6797
8195
|
} else {
|
|
6798
8196
|
this.dropdown.hide();
|
|
6799
8197
|
}
|
|
6800
|
-
|
|
6801
8198
|
return;
|
|
6802
8199
|
}
|
|
6803
8200
|
|
|
@@ -6878,6 +8275,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6878
8275
|
}
|
|
6879
8276
|
}
|
|
6880
8277
|
|
|
8278
|
+
/**
|
|
8279
|
+
* Hides the dropdown bib if its open.
|
|
8280
|
+
* @returns {void}
|
|
8281
|
+
*/
|
|
8282
|
+
hideBib() {
|
|
8283
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8284
|
+
this.dropdown.hide();
|
|
8285
|
+
}
|
|
8286
|
+
}
|
|
8287
|
+
|
|
8288
|
+
/**
|
|
8289
|
+
* Shows the dropdown bib if there are options to show.
|
|
8290
|
+
* @returns {void}
|
|
8291
|
+
*/
|
|
8292
|
+
showBib() {
|
|
8293
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8294
|
+
this.dropdown.show();
|
|
8295
|
+
}
|
|
8296
|
+
}
|
|
8297
|
+
|
|
6881
8298
|
/**
|
|
6882
8299
|
* Function to support @focusin event.
|
|
6883
8300
|
* @private
|
|
@@ -6962,34 +8379,39 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6962
8379
|
// Add the tag name as an attribute if it is different than the component name
|
|
6963
8380
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
6964
8381
|
|
|
6965
|
-
this.configureMenu();
|
|
6966
8382
|
this.configureDropdown();
|
|
8383
|
+
this.configureMenu();
|
|
6967
8384
|
this.configureSelect();
|
|
8385
|
+
}
|
|
6968
8386
|
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
8387
|
+
/**
|
|
8388
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8389
|
+
* @param {string} value - The value to set in the menu.
|
|
8390
|
+
* @returns {void}
|
|
8391
|
+
* @private
|
|
8392
|
+
*/
|
|
8393
|
+
async updateMenuValue(value) {
|
|
8394
|
+
if (!this.menu) return;
|
|
8395
|
+
|
|
8396
|
+
this.menu.setAttribute('value', value);
|
|
8397
|
+
this.menu.value = value;
|
|
8398
|
+
await this.menu.updateComplete;
|
|
6974
8399
|
}
|
|
6975
8400
|
|
|
6976
8401
|
async updated(changedProperties) {
|
|
6977
|
-
if (changedProperties.has('multiSelect')) {
|
|
8402
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
6978
8403
|
this.clearSelection();
|
|
6979
8404
|
}
|
|
6980
8405
|
|
|
6981
8406
|
if (changedProperties.has('value')) {
|
|
6982
8407
|
if (this.value) {
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
this.menu.value = this.value;
|
|
8408
|
+
await this.updateMenuValue(this.value);
|
|
6986
8409
|
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8410
|
+
if (this.menu) {
|
|
8411
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8412
|
+
}
|
|
6991
8413
|
} else {
|
|
6992
|
-
this.
|
|
8414
|
+
await this.updateMenuValue(undefined);
|
|
6993
8415
|
}
|
|
6994
8416
|
|
|
6995
8417
|
this._updateNativeSelect();
|
|
@@ -7008,7 +8430,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7008
8430
|
composed: true,
|
|
7009
8431
|
detail: {
|
|
7010
8432
|
optionSelected: this.optionSelected,
|
|
7011
|
-
value: this.
|
|
8433
|
+
value: this.formattedValue
|
|
7012
8434
|
}
|
|
7013
8435
|
}));
|
|
7014
8436
|
}
|
|
@@ -7020,6 +8442,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7020
8442
|
if (changedProperties.has('error')) {
|
|
7021
8443
|
this.validate(true);
|
|
7022
8444
|
}
|
|
8445
|
+
|
|
8446
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8447
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8448
|
+
}
|
|
8449
|
+
|
|
8450
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8451
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8452
|
+
}
|
|
7023
8453
|
}
|
|
7024
8454
|
|
|
7025
8455
|
/**
|
|
@@ -7030,16 +8460,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7030
8460
|
this.validation.reset(this);
|
|
7031
8461
|
}
|
|
7032
8462
|
|
|
7033
|
-
/**
|
|
7034
|
-
* Hide dropdownbib.
|
|
7035
|
-
* @private
|
|
7036
|
-
*/
|
|
7037
|
-
hideBib() {
|
|
7038
|
-
if (this.dropdown) {
|
|
7039
|
-
this.dropdown.hide();
|
|
7040
|
-
}
|
|
7041
|
-
}
|
|
7042
|
-
|
|
7043
8463
|
/**
|
|
7044
8464
|
* Validates value.
|
|
7045
8465
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7059,13 +8479,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7059
8479
|
const selectedValue = selectedOption.value;
|
|
7060
8480
|
|
|
7061
8481
|
if (this.multiSelect) {
|
|
7062
|
-
const currentArray =
|
|
8482
|
+
const currentArray = this.formattedValue;
|
|
7063
8483
|
|
|
7064
8484
|
if (!currentArray.includes(selectedValue)) {
|
|
7065
|
-
this.value = [
|
|
8485
|
+
this.value = JSON.stringify([
|
|
7066
8486
|
...currentArray,
|
|
7067
8487
|
selectedValue
|
|
7068
|
-
];
|
|
8488
|
+
]);
|
|
7069
8489
|
}
|
|
7070
8490
|
} else {
|
|
7071
8491
|
const currentValue = this.value;
|
|
@@ -7088,12 +8508,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7088
8508
|
}
|
|
7089
8509
|
|
|
7090
8510
|
if (this.multiSelect) {
|
|
7091
|
-
nativeSelect.value = this.
|
|
8511
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7092
8512
|
} else {
|
|
7093
8513
|
nativeSelect.value = this.value || '';
|
|
7094
8514
|
}
|
|
7095
8515
|
}
|
|
7096
8516
|
|
|
8517
|
+
/**
|
|
8518
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8519
|
+
* @private
|
|
8520
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8521
|
+
*/
|
|
7097
8522
|
renderAriaHtml() {
|
|
7098
8523
|
return html`
|
|
7099
8524
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7114,9 +8539,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7114
8539
|
`;
|
|
7115
8540
|
}
|
|
7116
8541
|
|
|
8542
|
+
/**
|
|
8543
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8544
|
+
* @private
|
|
8545
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8546
|
+
*/
|
|
7117
8547
|
renderNativeSelect() {
|
|
7118
8548
|
return html`
|
|
7119
|
-
<div class="nativeSelectWrapper">
|
|
8549
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7120
8550
|
<select
|
|
7121
8551
|
tabindex="-1"
|
|
7122
8552
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7153,14 +8583,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7153
8583
|
? html`
|
|
7154
8584
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7155
8585
|
<p id="${this.uniqueId}" part="helpText">
|
|
7156
|
-
<slot name="
|
|
8586
|
+
<slot name="helpText"></slot>
|
|
7157
8587
|
</p>
|
|
7158
8588
|
</${this.helpTextTag}>
|
|
7159
8589
|
`
|
|
7160
8590
|
: html`
|
|
7161
8591
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7162
8592
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7163
|
-
|
|
8593
|
+
${this.errorMessage}
|
|
7164
8594
|
</p>
|
|
7165
8595
|
</${this.helpTextTag}>
|
|
7166
8596
|
`
|
|
@@ -7173,17 +8603,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7173
8603
|
* @private
|
|
7174
8604
|
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7175
8605
|
*/
|
|
7176
|
-
// TODO update to use util class
|
|
7177
8606
|
renderLayoutEmphasized() {
|
|
7178
8607
|
const placeholderClass = {
|
|
7179
|
-
|
|
8608
|
+
'util_displayHidden': this.value
|
|
7180
8609
|
};
|
|
7181
8610
|
|
|
7182
8611
|
const displayValueClasses = {
|
|
7183
8612
|
'displayValue': true,
|
|
7184
8613
|
'hasContent': this.hasDisplayValueContent,
|
|
7185
8614
|
'hasFocus': this.isPopoverVisible,
|
|
7186
|
-
'withValue': this.value && this.value.length > 0,
|
|
8615
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7187
8616
|
'force': this.forceDisplayValue,
|
|
7188
8617
|
};
|
|
7189
8618
|
|
|
@@ -7200,16 +8629,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7200
8629
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7201
8630
|
</div>
|
|
7202
8631
|
<${this.dropdownTag}
|
|
8632
|
+
a11yRole="select"
|
|
7203
8633
|
?autoPlacement="${this.autoPlacement}"
|
|
7204
8634
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7205
|
-
?matchWidth="${
|
|
8635
|
+
?matchWidth="${this.matchWidth}"
|
|
7206
8636
|
?noFlip="${this.noFlip}"
|
|
7207
8637
|
?onDark="${this.onDark}"
|
|
7208
8638
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7209
8639
|
.offset="${this.offset}"
|
|
7210
8640
|
.placement="${this.placement}"
|
|
7211
8641
|
chevron
|
|
7212
|
-
fluid
|
|
7213
8642
|
for="selectMenu"
|
|
7214
8643
|
layout="${this.layout}"
|
|
7215
8644
|
part="dropdown"
|
|
@@ -7221,15 +8650,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7221
8650
|
</div>
|
|
7222
8651
|
<div class="mainContent">
|
|
7223
8652
|
<div class="${classMap(valueContainerClasses)}">
|
|
7224
|
-
<label>
|
|
8653
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7225
8654
|
<slot name="label"></slot>
|
|
8655
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7226
8656
|
</label>
|
|
7227
8657
|
<div class="value" id="value"></div>
|
|
7228
|
-
${
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
</div>
|
|
7232
|
-
`}
|
|
8658
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8659
|
+
${this.placeholder}
|
|
8660
|
+
</div>
|
|
7233
8661
|
</div>
|
|
7234
8662
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7235
8663
|
<slot name="displayValue"></slot>
|
|
@@ -7256,14 +8684,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7256
8684
|
*/
|
|
7257
8685
|
renderLayoutSnowflake() {
|
|
7258
8686
|
const placeholderClass = {
|
|
7259
|
-
|
|
8687
|
+
'util_displayHidden': this.value
|
|
7260
8688
|
};
|
|
7261
8689
|
|
|
7262
8690
|
const displayValueClasses = {
|
|
7263
8691
|
'displayValue': true,
|
|
7264
8692
|
'hasContent': this.hasDisplayValueContent,
|
|
7265
8693
|
'hasFocus': this.isPopoverVisible,
|
|
7266
|
-
'withValue': this.value && this.value.length > 0,
|
|
8694
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7267
8695
|
'force': this.forceDisplayValue,
|
|
7268
8696
|
};
|
|
7269
8697
|
|
|
@@ -7282,14 +8710,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7282
8710
|
<${this.dropdownTag}
|
|
7283
8711
|
?autoPlacement="${this.autoPlacement}"
|
|
7284
8712
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7285
|
-
?matchWidth="${
|
|
8713
|
+
?matchWidth="${this.matchWidth}"
|
|
7286
8714
|
?noFlip="${this.noFlip}"
|
|
7287
8715
|
?onDark="${this.onDark}"
|
|
7288
8716
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7289
8717
|
.offset="${this.offset}"
|
|
7290
8718
|
.placement="${this.placement}"
|
|
7291
8719
|
chevron
|
|
7292
|
-
fluid
|
|
7293
8720
|
for="selectMenu"
|
|
7294
8721
|
layout="${this.layout}"
|
|
7295
8722
|
part="dropdown"
|
|
@@ -7301,15 +8728,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7301
8728
|
</div>
|
|
7302
8729
|
<div class="mainContent">
|
|
7303
8730
|
<div class="${classMap(valueContainerClasses)}">
|
|
7304
|
-
<label>
|
|
8731
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7305
8732
|
<slot name="label"></slot>
|
|
8733
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7306
8734
|
</label>
|
|
7307
8735
|
<div class="value" id="value"></div>
|
|
7308
|
-
${
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
</div>
|
|
7312
|
-
`}
|
|
8736
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8737
|
+
${this.placeholder}
|
|
8738
|
+
</div>
|
|
7313
8739
|
</div>
|
|
7314
8740
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7315
8741
|
<slot name="displayValue"></slot>
|
|
@@ -7325,6 +8751,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7325
8751
|
${this.renderHtmlHelpText()}
|
|
7326
8752
|
</div>
|
|
7327
8753
|
</${this.dropdownTag}>
|
|
8754
|
+
${this.renderNativeSelect()}
|
|
7328
8755
|
</div>
|
|
7329
8756
|
`;
|
|
7330
8757
|
}
|
|
@@ -7335,11 +8762,75 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7335
8762
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7336
8763
|
*/
|
|
7337
8764
|
renderLayoutClassic() {
|
|
8765
|
+
const placeholderClass = {
|
|
8766
|
+
'util_displayHidden': this.value
|
|
8767
|
+
};
|
|
8768
|
+
|
|
8769
|
+
const displayValueClasses = {
|
|
8770
|
+
'displayValue': true,
|
|
8771
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8772
|
+
'hasFocus': this.isPopoverVisible,
|
|
8773
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8774
|
+
'force': this.forceDisplayValue,
|
|
8775
|
+
};
|
|
8776
|
+
|
|
8777
|
+
const valueContainerClasses = {
|
|
8778
|
+
'valueContainer': true,
|
|
8779
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8780
|
+
};
|
|
8781
|
+
|
|
7338
8782
|
return html`
|
|
7339
8783
|
<div
|
|
7340
|
-
class="${classMap(this.commonWrapperClasses)}
|
|
8784
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7341
8785
|
part="wrapper">
|
|
7342
|
-
|
|
8786
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8787
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8788
|
+
</div>
|
|
8789
|
+
<${this.dropdownTag}
|
|
8790
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8791
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8792
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8793
|
+
?noFlip="${this.noFlip}"
|
|
8794
|
+
?onDark="${this.onDark}"
|
|
8795
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8796
|
+
.offset="${this.offset}"
|
|
8797
|
+
.placement="${this.placement}"
|
|
8798
|
+
chevron
|
|
8799
|
+
for="selectMenu"
|
|
8800
|
+
layout="${this.layout}"
|
|
8801
|
+
part="dropdown"
|
|
8802
|
+
shape="${this.shape}"
|
|
8803
|
+
size="${this.size}">
|
|
8804
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8805
|
+
<div class="accents left">
|
|
8806
|
+
<slot name="typeIcon"></slot>
|
|
8807
|
+
</div>
|
|
8808
|
+
<div class="mainContent">
|
|
8809
|
+
<div class="${classMap(valueContainerClasses)}">
|
|
8810
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
8811
|
+
<slot name="label"></slot>
|
|
8812
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8813
|
+
</label>
|
|
8814
|
+
<div class="value" id="value"></div>
|
|
8815
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8816
|
+
${this.placeholder}
|
|
8817
|
+
</div>
|
|
8818
|
+
</div>
|
|
8819
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8820
|
+
<slot name="displayValue"></slot>
|
|
8821
|
+
</div>
|
|
8822
|
+
</div>
|
|
8823
|
+
<div class="accents right"></div>
|
|
8824
|
+
</div>
|
|
8825
|
+
<div class="menuWrapper"></div>
|
|
8826
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8827
|
+
<slot></slot>
|
|
8828
|
+
</${this.bibtemplateTag}>
|
|
8829
|
+
<div slot="helpText">
|
|
8830
|
+
${this.renderHtmlHelpText()}
|
|
8831
|
+
</div>
|
|
8832
|
+
</${this.dropdownTag}>
|
|
8833
|
+
${this.renderNativeSelect()}
|
|
7343
8834
|
</div>
|
|
7344
8835
|
`;
|
|
7345
8836
|
}
|
|
@@ -7373,105 +8864,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7373
8864
|
|
|
7374
8865
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7375
8866
|
// 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
8867
|
}
|
|
7476
8868
|
|
|
7477
8869
|
AuroSelect.register();
|