@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.11 → 0.0.0-pr624.111
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/headerVersion.d.ts +1 -1
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1244 -95
- package/components/bibtemplate/dist/registered.js +1244 -95
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +54 -19
- package/components/checkbox/demo/api.min.js +70 -45
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +70 -45
- 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 +6 -3
- package/components/checkbox/dist/index.js +69 -44
- package/components/checkbox/dist/registered.js +69 -44
- package/components/combobox/README.md +2 -0
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +121 -8
- package/components/combobox/demo/api.min.js +3283 -963
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +20 -34
- package/components/combobox/demo/index.min.js +3283 -963
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +59 -14
- package/components/combobox/dist/index.js +3024 -848
- package/components/combobox/dist/registered.js +3024 -848
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +167 -21
- package/components/counter/demo/api.min.js +3428 -777
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +191 -34
- package/components/counter/demo/index.min.js +3428 -777
- 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 +162 -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 +3427 -776
- package/components/counter/dist/registered.js +3427 -776
- package/components/datepicker/README.md +2 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +70 -28
- package/components/datepicker/demo/api.min.js +7082 -3165
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +87 -8
- package/components/datepicker/demo/index.min.js +7082 -3165
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/demo/readme.md +2 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +152 -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 +14635 -10718
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +14635 -10718
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +89 -281
- package/components/dropdown/demo/api.min.js +452 -271
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +452 -271
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +43 -82
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +451 -270
- package/components/dropdown/dist/registered.js +451 -270
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.md +1 -1
- package/components/form/demo/api.min.js +3 -3
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +3 -3
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/auro-form.d.ts +1 -1
- package/components/form/dist/index.js +2 -2
- package/components/form/dist/registered.js +2 -2
- package/components/helptext/dist/auro-helptext.d.ts +0 -2
- package/components/helptext/dist/index.js +2 -4
- package/components/helptext/dist/registered.js +2 -4
- package/components/input/README.md +6 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +234 -136
- package/components/input/demo/api.min.js +1057 -299
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +55 -32
- package/components/input/demo/index.min.js +1071 -313
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +6 -2
- package/components/input/dist/auro-input.d.ts +36 -2
- package/components/input/dist/base-input.d.ts +47 -11
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +1070 -312
- package/components/input/dist/registered.js +1070 -312
- 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 +303 -64
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +303 -64
- 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 +288 -49
- package/components/menu/dist/registered.js +288 -49
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +41 -9
- package/components/radio/demo/api.min.js +93 -95
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +93 -95
- 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 +11 -12
- package/components/radio/dist/index.js +92 -94
- package/components/radio/dist/registered.js +92 -94
- package/components/select/README.md +1 -0
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +159 -125
- package/components/select/demo/api.min.js +2284 -729
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +1074 -259
- package/components/select/demo/index.min.js +2286 -719
- package/components/select/demo/readme.html +16 -9
- package/components/select/demo/readme.md +1 -0
- package/components/select/dist/auro-select.d.ts +86 -25
- package/components/select/dist/index.js +2178 -755
- package/components/select/dist/registered.js +2178 -755
- 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/datepicker/dist/styles/{emphasized/style-css.d.ts → classic/color-css.d.ts} +0 -0
- /package/components/{input/dist/styles/default/input-css.d.ts → datepicker/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{input/dist/styles/default/label-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{input/dist/styles/input-css.d.ts → datepicker/dist/styles/snowflake/style-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
|
@@ -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:
|
|
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:56px;max-height:56px;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:58px;max-height:58px;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:56px;max-height:56px;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:54px;max-height:54px}.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-muted, #ccd2db);--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-advanced-color-state-error-inverse, #f9a4a8);--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$5 = 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$5();
|
|
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
|
+
// multiple input in one components (datepicker)
|
|
883
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
884
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
|
|
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,22 +2901,16 @@ 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() {
|
|
2896
|
-
this.preventFocusLoseOnBibClick = (event) => {
|
|
2897
|
-
event.preventDefault();
|
|
2898
|
-
event.stopPropagation();
|
|
2899
|
-
};
|
|
2900
|
-
this.element.bib.addEventListener('mousedown', this.preventFocusLoseOnBibClick);
|
|
2901
|
-
|
|
2902
2914
|
// Define handlers & store references
|
|
2903
2915
|
this.focusHandler = () => this.handleFocusLoss();
|
|
2904
2916
|
|
|
@@ -2914,7 +2926,7 @@ class AuroFloatingUI {
|
|
|
2914
2926
|
document.expandedAuroFormkitDropdown = null;
|
|
2915
2927
|
document.expandedAuroFloater = this;
|
|
2916
2928
|
} else {
|
|
2917
|
-
this.hideBib();
|
|
2929
|
+
this.hideBib("click");
|
|
2918
2930
|
}
|
|
2919
2931
|
}
|
|
2920
2932
|
};
|
|
@@ -2927,7 +2939,7 @@ class AuroFloatingUI {
|
|
|
2927
2939
|
// if something else is open, let it handle itself
|
|
2928
2940
|
return;
|
|
2929
2941
|
}
|
|
2930
|
-
this.hideBib();
|
|
2942
|
+
this.hideBib("keydown");
|
|
2931
2943
|
}
|
|
2932
2944
|
};
|
|
2933
2945
|
|
|
@@ -2948,11 +2960,6 @@ class AuroFloatingUI {
|
|
|
2948
2960
|
cleanupHideHandlers() {
|
|
2949
2961
|
// Remove event listeners if they exist
|
|
2950
2962
|
|
|
2951
|
-
if (this.preventFocusLoseOnBibClick) {
|
|
2952
|
-
this.element.bib.removeEventListener('mousedown', this.preventFocusLoseOnBibClick);
|
|
2953
|
-
delete this.preventFocusLoseOnBibClick;
|
|
2954
|
-
}
|
|
2955
|
-
|
|
2956
2963
|
if (this.focusHandler) {
|
|
2957
2964
|
document.removeEventListener('focusin', this.focusHandler);
|
|
2958
2965
|
this.focusHandler = null;
|
|
@@ -3010,7 +3017,11 @@ class AuroFloatingUI {
|
|
|
3010
3017
|
}
|
|
3011
3018
|
}
|
|
3012
3019
|
|
|
3013
|
-
|
|
3020
|
+
/**
|
|
3021
|
+
* Hides the floating UI element.
|
|
3022
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3023
|
+
*/
|
|
3024
|
+
hideBib(eventType = "unknown") {
|
|
3014
3025
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3015
3026
|
this.lockScroll(false);
|
|
3016
3027
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3021,7 +3032,7 @@ class AuroFloatingUI {
|
|
|
3021
3032
|
if (this.showing) {
|
|
3022
3033
|
this.cleanupHideHandlers();
|
|
3023
3034
|
this.showing = false;
|
|
3024
|
-
this.dispatchEventDropdownToggle();
|
|
3035
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3025
3036
|
}
|
|
3026
3037
|
}
|
|
3027
3038
|
document.expandedAuroFloater = null;
|
|
@@ -3030,11 +3041,13 @@ class AuroFloatingUI {
|
|
|
3030
3041
|
/**
|
|
3031
3042
|
* @private
|
|
3032
3043
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3044
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3033
3045
|
*/
|
|
3034
|
-
dispatchEventDropdownToggle() {
|
|
3046
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3035
3047
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3036
3048
|
detail: {
|
|
3037
3049
|
expanded: this.showing,
|
|
3050
|
+
eventType: eventType || "unknown",
|
|
3038
3051
|
},
|
|
3039
3052
|
composed: true
|
|
3040
3053
|
});
|
|
@@ -3044,7 +3057,7 @@ class AuroFloatingUI {
|
|
|
3044
3057
|
|
|
3045
3058
|
handleClick() {
|
|
3046
3059
|
if (this.element.isPopoverVisible) {
|
|
3047
|
-
this.hideBib();
|
|
3060
|
+
this.hideBib("click");
|
|
3048
3061
|
} else {
|
|
3049
3062
|
this.showBib();
|
|
3050
3063
|
}
|
|
@@ -3067,8 +3080,9 @@ class AuroFloatingUI {
|
|
|
3067
3080
|
// Space is included as it's expected behavior for interactive elements
|
|
3068
3081
|
|
|
3069
3082
|
const origin = event.composedPath()[0];
|
|
3070
|
-
if (event.key === 'Enter' || (
|
|
3071
|
-
|
|
3083
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3084
|
+
|
|
3085
|
+
event.preventDefault();
|
|
3072
3086
|
this.handleClick();
|
|
3073
3087
|
}
|
|
3074
3088
|
break;
|
|
@@ -3079,7 +3093,7 @@ class AuroFloatingUI {
|
|
|
3079
3093
|
break;
|
|
3080
3094
|
case 'mouseleave':
|
|
3081
3095
|
if (this.element.hoverToggle) {
|
|
3082
|
-
this.hideBib();
|
|
3096
|
+
this.hideBib("mouseleave");
|
|
3083
3097
|
}
|
|
3084
3098
|
break;
|
|
3085
3099
|
case 'focus':
|
|
@@ -3222,6 +3236,267 @@ class AuroFloatingUI {
|
|
|
3222
3236
|
}
|
|
3223
3237
|
}
|
|
3224
3238
|
|
|
3239
|
+
// Selectors for focusable elements
|
|
3240
|
+
const FOCUSABLE_SELECTORS = [
|
|
3241
|
+
'a[href]',
|
|
3242
|
+
'button:not([disabled])',
|
|
3243
|
+
'textarea:not([disabled])',
|
|
3244
|
+
'input:not([disabled])',
|
|
3245
|
+
'select:not([disabled])',
|
|
3246
|
+
'[role="tab"]:not([disabled])',
|
|
3247
|
+
'[role="link"]:not([disabled])',
|
|
3248
|
+
'[role="button"]:not([disabled])',
|
|
3249
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3250
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3251
|
+
];
|
|
3252
|
+
|
|
3253
|
+
// List of custom components that are known to be focusable
|
|
3254
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3255
|
+
'auro-checkbox',
|
|
3256
|
+
'auro-radio',
|
|
3257
|
+
'auro-dropdown',
|
|
3258
|
+
'auro-button',
|
|
3259
|
+
'auro-combobox',
|
|
3260
|
+
'auro-input',
|
|
3261
|
+
'auro-counter',
|
|
3262
|
+
'auro-menu',
|
|
3263
|
+
'auro-select',
|
|
3264
|
+
'auro-datepicker',
|
|
3265
|
+
'auro-hyperlink',
|
|
3266
|
+
'auro-accordion',
|
|
3267
|
+
];
|
|
3268
|
+
|
|
3269
|
+
/**
|
|
3270
|
+
* Determines if a given element is a custom focusable component.
|
|
3271
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3272
|
+
*
|
|
3273
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3274
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3275
|
+
*/
|
|
3276
|
+
function isFocusableComponent(element) {
|
|
3277
|
+
const componentName = element.tagName.toLowerCase();
|
|
3278
|
+
|
|
3279
|
+
// Guard Clause: Element is a focusable component
|
|
3280
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3281
|
+
|
|
3282
|
+
// Guard Clause: Element is not disabled
|
|
3283
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3284
|
+
|
|
3285
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3286
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3287
|
+
|
|
3288
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3289
|
+
return true;
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
/**
|
|
3293
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3294
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3295
|
+
*
|
|
3296
|
+
* @param {HTMLElement} container The container to search within
|
|
3297
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3298
|
+
*/
|
|
3299
|
+
function getFocusableElements(container) {
|
|
3300
|
+
// Get elements in DOM order by walking the tree
|
|
3301
|
+
const orderedFocusableElements = [];
|
|
3302
|
+
|
|
3303
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3304
|
+
const collectFocusableElements = (root) => {
|
|
3305
|
+
// Check if current element is focusable
|
|
3306
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3307
|
+
// Check if this is a custom component that is focusable
|
|
3308
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3309
|
+
|
|
3310
|
+
if (isComponentFocusable) {
|
|
3311
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3312
|
+
orderedFocusableElements.push(root);
|
|
3313
|
+
return; // Skip traversing inside this component
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
// Check if the element itself matches any selector
|
|
3317
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3318
|
+
if (root.matches?.(selector)) {
|
|
3319
|
+
orderedFocusableElements.push(root);
|
|
3320
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
// Process shadow DOM only for non-Auro components
|
|
3325
|
+
if (root.shadowRoot) {
|
|
3326
|
+
// Process shadow DOM children in order
|
|
3327
|
+
if (root.shadowRoot.children) {
|
|
3328
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3329
|
+
collectFocusableElements(child);
|
|
3330
|
+
});
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
// Process slots and their assigned nodes in order
|
|
3335
|
+
if (root.tagName === 'SLOT') {
|
|
3336
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3337
|
+
for (const node of assignedNodes) {
|
|
3338
|
+
collectFocusableElements(node);
|
|
3339
|
+
}
|
|
3340
|
+
} else {
|
|
3341
|
+
// Process light DOM children in order
|
|
3342
|
+
if (root.children) {
|
|
3343
|
+
Array.from(root.children).forEach(child => {
|
|
3344
|
+
collectFocusableElements(child);
|
|
3345
|
+
});
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
};
|
|
3350
|
+
|
|
3351
|
+
// Start the traversal from the container
|
|
3352
|
+
collectFocusableElements(container);
|
|
3353
|
+
|
|
3354
|
+
// Remove duplicates that might have been collected through different paths
|
|
3355
|
+
// while preserving order
|
|
3356
|
+
const uniqueElements = [];
|
|
3357
|
+
const seen = new Set();
|
|
3358
|
+
|
|
3359
|
+
for (const element of orderedFocusableElements) {
|
|
3360
|
+
if (!seen.has(element)) {
|
|
3361
|
+
seen.add(element);
|
|
3362
|
+
uniqueElements.push(element);
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
return uniqueElements;
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
/**
|
|
3370
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3371
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3372
|
+
*/
|
|
3373
|
+
class FocusTrap {
|
|
3374
|
+
/**
|
|
3375
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3376
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3377
|
+
*
|
|
3378
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3379
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3380
|
+
*/
|
|
3381
|
+
constructor(container) {
|
|
3382
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3383
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
this.container = container;
|
|
3387
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3388
|
+
|
|
3389
|
+
this._init();
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3394
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3395
|
+
*
|
|
3396
|
+
* @private
|
|
3397
|
+
*/
|
|
3398
|
+
_init() {
|
|
3399
|
+
|
|
3400
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3401
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3402
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3403
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3406
|
+
// Track tab direction
|
|
3407
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
/**
|
|
3411
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3412
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3413
|
+
*
|
|
3414
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3415
|
+
* @private
|
|
3416
|
+
*/
|
|
3417
|
+
_onKeydown = (e) => {
|
|
3418
|
+
|
|
3419
|
+
if (e.key === 'Tab') {
|
|
3420
|
+
|
|
3421
|
+
// Set the tab direction based on the key pressed
|
|
3422
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3423
|
+
|
|
3424
|
+
// Get the active element(s) in the document and shadow root
|
|
3425
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3426
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3427
|
+
let activeElement = document.activeElement;
|
|
3428
|
+
const actives = [activeElement];
|
|
3429
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3430
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3431
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3434
|
+
// Update the focusable elements
|
|
3435
|
+
const focusables = this._getFocusableElements();
|
|
3436
|
+
|
|
3437
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3438
|
+
const focusIndex =
|
|
3439
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3440
|
+
? focusables.length - 1
|
|
3441
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3442
|
+
? 0
|
|
3443
|
+
: null;
|
|
3444
|
+
|
|
3445
|
+
if (focusIndex !== null) {
|
|
3446
|
+
focusables[focusIndex].focus();
|
|
3447
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3448
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
};
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3455
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3456
|
+
*
|
|
3457
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3458
|
+
* @private
|
|
3459
|
+
*/
|
|
3460
|
+
_getFocusableElements() {
|
|
3461
|
+
// Use the imported utility function to get focusable elements
|
|
3462
|
+
const elements = getFocusableElements(this.container);
|
|
3463
|
+
|
|
3464
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3465
|
+
return elements;
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
/**
|
|
3469
|
+
* Moves focus to the first focusable element within the container.
|
|
3470
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3471
|
+
*/
|
|
3472
|
+
focusFirstElement() {
|
|
3473
|
+
const focusables = this._getFocusableElements();
|
|
3474
|
+
if (focusables.length) focusables[0].focus();
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
/**
|
|
3478
|
+
* Moves focus to the last focusable element within the container.
|
|
3479
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3480
|
+
*/
|
|
3481
|
+
focusLastElement() {
|
|
3482
|
+
const focusables = this._getFocusableElements();
|
|
3483
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3488
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3489
|
+
*/
|
|
3490
|
+
disconnect() {
|
|
3491
|
+
|
|
3492
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3493
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3497
|
+
}
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3225
3500
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3226
3501
|
// See LICENSE in the project root for license information.
|
|
3227
3502
|
|
|
@@ -3272,7 +3547,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
3272
3547
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3273
3548
|
*/
|
|
3274
3549
|
|
|
3275
|
-
let AuroElement$1 = class AuroElement extends LitElement {
|
|
3550
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
3276
3551
|
|
|
3277
3552
|
// function to define props used within the scope of this component
|
|
3278
3553
|
static get properties() {
|
|
@@ -3328,7 +3603,7 @@ const cacheFetch$1 = (uri, options = {}) => {
|
|
|
3328
3603
|
return _fetchMap$1.get(uri);
|
|
3329
3604
|
};
|
|
3330
3605
|
|
|
3331
|
-
var styleCss$
|
|
3606
|
+
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
3607
|
|
|
3333
3608
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3334
3609
|
// See LICENSE in the project root for license information.
|
|
@@ -3340,7 +3615,7 @@ var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3340
3615
|
*/
|
|
3341
3616
|
|
|
3342
3617
|
// build the component class
|
|
3343
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
3618
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
3344
3619
|
constructor() {
|
|
3345
3620
|
super();
|
|
3346
3621
|
this.onDark = false;
|
|
@@ -3371,7 +3646,7 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3371
3646
|
|
|
3372
3647
|
static get styles() {
|
|
3373
3648
|
return css`
|
|
3374
|
-
${styleCss$
|
|
3649
|
+
${styleCss$3$1}
|
|
3375
3650
|
`;
|
|
3376
3651
|
}
|
|
3377
3652
|
|
|
@@ -3412,9 +3687,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3412
3687
|
}
|
|
3413
3688
|
};
|
|
3414
3689
|
|
|
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)}`;
|
|
3690
|
+
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
3691
|
|
|
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)}`;
|
|
3692
|
+
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
3693
|
|
|
3419
3694
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3420
3695
|
// See LICENSE in the project root for license information.
|
|
@@ -3533,7 +3808,8 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3533
3808
|
* Allows custom color to be set.
|
|
3534
3809
|
*/
|
|
3535
3810
|
customColor: {
|
|
3536
|
-
type: Boolean
|
|
3811
|
+
type: Boolean,
|
|
3812
|
+
reflect: true
|
|
3537
3813
|
},
|
|
3538
3814
|
|
|
3539
3815
|
/**
|
|
@@ -3572,9 +3848,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3572
3848
|
static get styles() {
|
|
3573
3849
|
return [
|
|
3574
3850
|
super.styles,
|
|
3575
|
-
css`${tokensCss$2}`,
|
|
3576
|
-
css`${styleCss$
|
|
3577
|
-
css`${colorCss$3}`
|
|
3851
|
+
css`${tokensCss$2$1}`,
|
|
3852
|
+
css`${styleCss$3$1}`,
|
|
3853
|
+
css`${colorCss$3$1}`
|
|
3578
3854
|
];
|
|
3579
3855
|
}
|
|
3580
3856
|
|
|
@@ -3608,8 +3884,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3608
3884
|
async firstUpdated() {
|
|
3609
3885
|
await super.firstUpdated();
|
|
3610
3886
|
|
|
3611
|
-
|
|
3612
|
-
|
|
3887
|
+
/**
|
|
3888
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3889
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3890
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3891
|
+
*/
|
|
3892
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3613
3893
|
const svgDesc = this.svg.querySelector('desc');
|
|
3614
3894
|
|
|
3615
3895
|
if (svgDesc) {
|
|
@@ -3655,11 +3935,11 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3655
3935
|
|
|
3656
3936
|
var iconVersion$1 = '6.1.2';
|
|
3657
3937
|
|
|
3658
|
-
var styleCss$1
|
|
3938
|
+
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
3939
|
|
|
3660
3940
|
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
3941
|
|
|
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:
|
|
3942
|
+
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
3943
|
|
|
3664
3944
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3665
3945
|
// See LICENSE in the project root for license information.
|
|
@@ -3680,7 +3960,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3680
3960
|
*/
|
|
3681
3961
|
|
|
3682
3962
|
class AuroDropdownBib extends LitElement {
|
|
3683
|
-
|
|
3963
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3684
3964
|
constructor() {
|
|
3685
3965
|
super();
|
|
3686
3966
|
|
|
@@ -3690,11 +3970,14 @@ class AuroDropdownBib extends LitElement {
|
|
|
3690
3970
|
this._mobileBreakpointValue = undefined;
|
|
3691
3971
|
|
|
3692
3972
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3973
|
+
|
|
3974
|
+
this.shape = "rounded";
|
|
3975
|
+
this.matchWidth = false;
|
|
3693
3976
|
}
|
|
3694
3977
|
|
|
3695
3978
|
static get styles() {
|
|
3696
3979
|
return [
|
|
3697
|
-
styleCss$1
|
|
3980
|
+
styleCss$2$1,
|
|
3698
3981
|
colorCss$2$1,
|
|
3699
3982
|
tokensCss$1$1
|
|
3700
3983
|
];
|
|
@@ -3727,6 +4010,15 @@ class AuroDropdownBib extends LitElement {
|
|
|
3727
4010
|
reflect: true
|
|
3728
4011
|
},
|
|
3729
4012
|
|
|
4013
|
+
/**
|
|
4014
|
+
* If declared, the bib width will match the trigger width.
|
|
4015
|
+
* @private
|
|
4016
|
+
*/
|
|
4017
|
+
matchWidth: {
|
|
4018
|
+
type: Boolean,
|
|
4019
|
+
reflect: true
|
|
4020
|
+
},
|
|
4021
|
+
|
|
3730
4022
|
/**
|
|
3731
4023
|
* If declared, will apply border-radius to the bib.
|
|
3732
4024
|
*/
|
|
@@ -3740,6 +4032,11 @@ class AuroDropdownBib extends LitElement {
|
|
|
3740
4032
|
*/
|
|
3741
4033
|
bibTemplate: {
|
|
3742
4034
|
type: Object
|
|
4035
|
+
},
|
|
4036
|
+
|
|
4037
|
+
shape: {
|
|
4038
|
+
type: String,
|
|
4039
|
+
reflect: true
|
|
3743
4040
|
}
|
|
3744
4041
|
};
|
|
3745
4042
|
}
|
|
@@ -3819,8 +4116,16 @@ class AuroDropdownBib extends LitElement {
|
|
|
3819
4116
|
|
|
3820
4117
|
// function that renders the HTML and CSS into the scope of the component
|
|
3821
4118
|
render() {
|
|
4119
|
+
const classes = {
|
|
4120
|
+
container: true
|
|
4121
|
+
};
|
|
4122
|
+
|
|
4123
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4124
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4125
|
+
classes[`shape-${this.shape}`] = true;
|
|
4126
|
+
|
|
3822
4127
|
return html`
|
|
3823
|
-
<div class="
|
|
4128
|
+
<div class="${classMap(classes)}" part="bibContainer">
|
|
3824
4129
|
<slot></slot>
|
|
3825
4130
|
</div>
|
|
3826
4131
|
`;
|
|
@@ -3829,23 +4134,25 @@ class AuroDropdownBib extends LitElement {
|
|
|
3829
4134
|
|
|
3830
4135
|
var dropdownVersion$1 = '3.0.0';
|
|
3831
4136
|
|
|
3832
|
-
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:
|
|
4137
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:56px;max-height:56px;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:58px;max-height:58px;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:56px;max-height:56px;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:54px;max-height:54px}.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}`;
|
|
4138
|
+
|
|
4139
|
+
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,:host([onDark]) .helpText{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-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3833
4140
|
|
|
3834
|
-
var
|
|
4141
|
+
var styleCss$1$2 = css`:host{position:relative;display:block}: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%}`;
|
|
3835
4142
|
|
|
3836
|
-
var classicColorCss = css
|
|
4143
|
+
var classicColorCss = css``;
|
|
3837
4144
|
|
|
3838
|
-
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic])
|
|
4145
|
+
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{transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}: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)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}`;
|
|
3839
4146
|
|
|
3840
|
-
var styleEmphasizedCss = css
|
|
4147
|
+
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)}`;
|
|
3841
4148
|
|
|
3842
|
-
var styleSnowflakeCss = css`:host
|
|
4149
|
+
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)}:host([layout*=snowflake]) .trigger,:host([layout*=snowflake]) .helpText{text-align:center}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3843
4150
|
|
|
3844
|
-
var colorCss$
|
|
4151
|
+
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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3845
4152
|
|
|
3846
|
-
var styleCss$
|
|
4153
|
+
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}`;
|
|
3847
4154
|
|
|
3848
|
-
var tokensCss$
|
|
4155
|
+
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3849
4156
|
|
|
3850
4157
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3851
4158
|
// See LICENSE in the project root for license information.
|
|
@@ -3854,7 +4161,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3854
4161
|
|
|
3855
4162
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3856
4163
|
|
|
3857
|
-
let AuroLibraryRuntimeUtils$
|
|
4164
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
3858
4165
|
|
|
3859
4166
|
/* eslint-disable jsdoc/require-param */
|
|
3860
4167
|
|
|
@@ -3923,8 +4230,6 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
3923
4230
|
|
|
3924
4231
|
/**
|
|
3925
4232
|
* 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
4233
|
*/
|
|
3929
4234
|
let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
3930
4235
|
|
|
@@ -3935,14 +4240,14 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3935
4240
|
this.onDark = false;
|
|
3936
4241
|
this.hasTextContent = false;
|
|
3937
4242
|
|
|
3938
|
-
AuroLibraryRuntimeUtils$
|
|
4243
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3939
4244
|
}
|
|
3940
4245
|
|
|
3941
4246
|
static get styles() {
|
|
3942
4247
|
return [
|
|
3943
|
-
colorCss$
|
|
3944
|
-
styleCss$
|
|
3945
|
-
tokensCss$
|
|
4248
|
+
colorCss$5,
|
|
4249
|
+
styleCss$6,
|
|
4250
|
+
tokensCss$4
|
|
3946
4251
|
];
|
|
3947
4252
|
}
|
|
3948
4253
|
|
|
@@ -3991,7 +4296,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3991
4296
|
*
|
|
3992
4297
|
*/
|
|
3993
4298
|
static register(name = "auro-helptext") {
|
|
3994
|
-
AuroLibraryRuntimeUtils$
|
|
4299
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
3995
4300
|
}
|
|
3996
4301
|
|
|
3997
4302
|
updated() {
|
|
@@ -4040,7 +4345,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
4040
4345
|
// function that renders the HTML and CSS into the scope of the component
|
|
4041
4346
|
render() {
|
|
4042
4347
|
return html$1`
|
|
4043
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
4348
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
4044
4349
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4045
4350
|
</div>
|
|
4046
4351
|
`;
|
|
@@ -4084,19 +4389,22 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4084
4389
|
}
|
|
4085
4390
|
|
|
4086
4391
|
resetShapeClasses() {
|
|
4087
|
-
|
|
4088
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4392
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4089
4393
|
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4394
|
+
if (wrapper) {
|
|
4395
|
+
wrapper.classList.forEach((className) => {
|
|
4396
|
+
if (className.startsWith('shape-')) {
|
|
4397
|
+
wrapper.classList.remove(className);
|
|
4398
|
+
}
|
|
4399
|
+
});
|
|
4096
4400
|
|
|
4401
|
+
if (this.shape && this.size) {
|
|
4097
4402
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4403
|
+
} else {
|
|
4404
|
+
wrapper.classList.add('shape-none');
|
|
4098
4405
|
}
|
|
4099
4406
|
}
|
|
4407
|
+
|
|
4100
4408
|
}
|
|
4101
4409
|
|
|
4102
4410
|
resetLayoutClasses() {
|
|
@@ -4145,14 +4453,14 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4145
4453
|
// See LICENSE in the project root for license information.
|
|
4146
4454
|
|
|
4147
4455
|
|
|
4148
|
-
|
|
4149
|
-
|
|
4456
|
+
|
|
4457
|
+
/*
|
|
4150
4458
|
* @slot - Default slot for the popover content.
|
|
4151
|
-
* @slot label - Defines the content of the label.
|
|
4152
4459
|
* @slot helpText - Defines the content of the helpText.
|
|
4153
4460
|
* @slot trigger - Defines the content of the trigger.
|
|
4154
4461
|
* @csspart trigger - The trigger content container.
|
|
4155
4462
|
* @csspart chevron - The collapsed/expanded state icon container.
|
|
4463
|
+
* @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
4156
4464
|
* @csspart helpText - The helpText content container.
|
|
4157
4465
|
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
4158
4466
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
@@ -4167,23 +4475,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4167
4475
|
this.matchWidth = false;
|
|
4168
4476
|
this.noHideOnThisFocusLoss = false;
|
|
4169
4477
|
|
|
4170
|
-
this.errorMessage =
|
|
4478
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4171
4479
|
|
|
4172
4480
|
// Layout Config
|
|
4173
|
-
this.layout =
|
|
4174
|
-
this.shape =
|
|
4175
|
-
this.size =
|
|
4481
|
+
this.layout = undefined;
|
|
4482
|
+
this.shape = undefined;
|
|
4483
|
+
this.size = undefined;
|
|
4484
|
+
|
|
4176
4485
|
this.parentBorder = false;
|
|
4177
4486
|
|
|
4178
|
-
|
|
4179
|
-
|
|
4487
|
+
/** @private */
|
|
4488
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4180
4489
|
|
|
4181
|
-
|
|
4182
|
-
return {
|
|
4183
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4184
|
-
};
|
|
4490
|
+
this.privateDefaults();
|
|
4185
4491
|
}
|
|
4186
4492
|
|
|
4493
|
+
/**
|
|
4494
|
+
* @private
|
|
4495
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4496
|
+
*/
|
|
4187
4497
|
get commonWrapperClasses() {
|
|
4188
4498
|
return {
|
|
4189
4499
|
'trigger': true,
|
|
@@ -4201,13 +4511,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4201
4511
|
privateDefaults() {
|
|
4202
4512
|
this.chevron = false;
|
|
4203
4513
|
this.disabled = false;
|
|
4514
|
+
this.disableFocusTrap = false;
|
|
4204
4515
|
this.error = false;
|
|
4205
|
-
this.inset = false;
|
|
4206
|
-
this.rounded = false;
|
|
4207
4516
|
this.tabIndex = 0;
|
|
4208
4517
|
this.noToggle = false;
|
|
4209
|
-
this.a11yAutocomplete = 'none';
|
|
4210
|
-
this.labeled = true;
|
|
4211
4518
|
this.a11yRole = 'button';
|
|
4212
4519
|
this.onDark = false;
|
|
4213
4520
|
this.showTriggerBorders = true;
|
|
@@ -4303,6 +4610,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4303
4610
|
this.floater.showBib();
|
|
4304
4611
|
}
|
|
4305
4612
|
|
|
4613
|
+
/**
|
|
4614
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4615
|
+
* If not, trigger element will get focus.
|
|
4616
|
+
*/
|
|
4617
|
+
focus() {
|
|
4618
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4619
|
+
this.focusTrap.focusFirstElement();
|
|
4620
|
+
} else {
|
|
4621
|
+
this.trigger.focus();
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4624
|
+
|
|
4306
4625
|
// function to define props used within the scope of this component
|
|
4307
4626
|
static get properties() {
|
|
4308
4627
|
return {
|
|
@@ -4316,6 +4635,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4635
|
reflect: true
|
|
4317
4636
|
},
|
|
4318
4637
|
|
|
4638
|
+
/**
|
|
4639
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4640
|
+
* @default false
|
|
4641
|
+
*/
|
|
4642
|
+
disableEventShow: {
|
|
4643
|
+
type: Boolean,
|
|
4644
|
+
reflect: true
|
|
4645
|
+
},
|
|
4646
|
+
|
|
4319
4647
|
/**
|
|
4320
4648
|
* If declared, applies a border around the trigger slot.
|
|
4321
4649
|
*/
|
|
@@ -4334,17 +4662,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4334
4662
|
},
|
|
4335
4663
|
|
|
4336
4664
|
/**
|
|
4337
|
-
* If declared, the dropdown
|
|
4665
|
+
* If declared, the dropdown is not interactive.
|
|
4338
4666
|
*/
|
|
4339
|
-
|
|
4667
|
+
disabled: {
|
|
4340
4668
|
type: Boolean,
|
|
4341
4669
|
reflect: true
|
|
4342
4670
|
},
|
|
4343
4671
|
|
|
4344
4672
|
/**
|
|
4345
|
-
* If declared, the
|
|
4673
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4346
4674
|
*/
|
|
4347
|
-
|
|
4675
|
+
disableFocusTrap: {
|
|
4348
4676
|
type: Boolean,
|
|
4349
4677
|
reflect: true
|
|
4350
4678
|
},
|
|
@@ -4389,27 +4717,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4389
4717
|
reflect: true
|
|
4390
4718
|
},
|
|
4391
4719
|
|
|
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
4720
|
/**
|
|
4409
4721
|
* If true, the dropdown bib is displayed.
|
|
4410
4722
|
*/
|
|
4411
4723
|
isPopoverVisible: {
|
|
4412
|
-
type: Boolean
|
|
4724
|
+
type: Boolean,
|
|
4725
|
+
reflect: true,
|
|
4726
|
+
attribute: 'open'
|
|
4413
4727
|
},
|
|
4414
4728
|
|
|
4415
4729
|
/**
|
|
@@ -4448,15 +4762,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4448
4762
|
reflect: true
|
|
4449
4763
|
},
|
|
4450
4764
|
|
|
4451
|
-
/**
|
|
4452
|
-
* Defines if there is a label preset.
|
|
4453
|
-
* @private
|
|
4454
|
-
*/
|
|
4455
|
-
labeled: {
|
|
4456
|
-
type: Boolean,
|
|
4457
|
-
reflect: true
|
|
4458
|
-
},
|
|
4459
|
-
|
|
4460
4765
|
/**
|
|
4461
4766
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4462
4767
|
* @private
|
|
@@ -4517,6 +4822,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4517
4822
|
reflect: true
|
|
4518
4823
|
},
|
|
4519
4824
|
|
|
4825
|
+
/**
|
|
4826
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4827
|
+
*/
|
|
4520
4828
|
onSlotChange: {
|
|
4521
4829
|
type: Function,
|
|
4522
4830
|
reflect: false
|
|
@@ -4531,14 +4839,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4531
4839
|
reflect: true
|
|
4532
4840
|
},
|
|
4533
4841
|
|
|
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
4842
|
/**
|
|
4543
4843
|
* @private
|
|
4544
4844
|
*/
|
|
@@ -4553,22 +4853,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4553
4853
|
type: String || undefined,
|
|
4554
4854
|
attribute: false,
|
|
4555
4855
|
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
4856
|
}
|
|
4565
4857
|
};
|
|
4566
4858
|
}
|
|
4567
4859
|
|
|
4568
4860
|
static get styles() {
|
|
4569
4861
|
return [
|
|
4570
|
-
|
|
4862
|
+
styleCss$1$2,
|
|
4571
4863
|
tokensCss$1$1,
|
|
4864
|
+
colorCss$1$1,
|
|
4572
4865
|
|
|
4573
4866
|
// default layout
|
|
4574
4867
|
classicColorCss,
|
|
@@ -4630,13 +4923,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4630
4923
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4631
4924
|
this.handleTriggerContentSlotChange();
|
|
4632
4925
|
}
|
|
4926
|
+
}
|
|
4633
4927
|
|
|
4928
|
+
/**
|
|
4929
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
4930
|
+
* @private
|
|
4931
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
4932
|
+
*/
|
|
4933
|
+
handleDropdownToggle(event) {
|
|
4934
|
+
this.updateFocusTrap();
|
|
4935
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4936
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4937
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4938
|
+
this.trigger.focus();
|
|
4939
|
+
}
|
|
4634
4940
|
}
|
|
4635
4941
|
|
|
4636
4942
|
firstUpdated() {
|
|
4637
4943
|
|
|
4638
4944
|
// Configure the floater to, this will generate the ID for the bib
|
|
4639
4945
|
this.floater.configure(this, 'auroDropdown');
|
|
4946
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4640
4947
|
|
|
4641
4948
|
/**
|
|
4642
4949
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4654,6 +4961,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4654
4961
|
|
|
4655
4962
|
// Add the tag name as an attribute if it is different than the component name
|
|
4656
4963
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
4964
|
+
|
|
4965
|
+
this.trigger.addEventListener('click', () => {
|
|
4966
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
4967
|
+
bubbles: true,
|
|
4968
|
+
composed: true
|
|
4969
|
+
}));
|
|
4970
|
+
});
|
|
4657
4971
|
}
|
|
4658
4972
|
|
|
4659
4973
|
/**
|
|
@@ -4697,70 +5011,33 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4697
5011
|
}
|
|
4698
5012
|
|
|
4699
5013
|
/**
|
|
4700
|
-
* Function to support @focusout event.
|
|
4701
5014
|
* @private
|
|
4702
|
-
* @return {void}
|
|
4703
5015
|
*/
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
5016
|
+
updateFocusTrap() {
|
|
5017
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5018
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5019
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5020
|
+
this.focusTrap.focusFirstElement();
|
|
5021
|
+
return;
|
|
5022
|
+
}
|
|
4707
5023
|
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
* @param {HTMLElement} element - Element to check.
|
|
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
|
-
});
|
|
5024
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5025
|
+
if (!this.focusTrap) {
|
|
5026
|
+
return;
|
|
4761
5027
|
}
|
|
4762
5028
|
|
|
4763
|
-
|
|
5029
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5030
|
+
this.focusTrap.disconnect();
|
|
5031
|
+
this.focusTrap = undefined;
|
|
5032
|
+
}
|
|
5033
|
+
|
|
5034
|
+
/**
|
|
5035
|
+
* Function to support @focusout event.
|
|
5036
|
+
* @private
|
|
5037
|
+
* @return {void}
|
|
5038
|
+
*/
|
|
5039
|
+
handleFocusout() {
|
|
5040
|
+
this.hasFocus = false;
|
|
4764
5041
|
}
|
|
4765
5042
|
|
|
4766
5043
|
/**
|
|
@@ -4856,14 +5133,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4856
5133
|
* @returns {void}
|
|
4857
5134
|
*/
|
|
4858
5135
|
handleTriggerContentSlotChange(event) {
|
|
4859
|
-
|
|
4860
5136
|
this.floater.handleTriggerTabIndex();
|
|
4861
5137
|
|
|
4862
5138
|
// Get the trigger
|
|
4863
5139
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
4864
5140
|
|
|
4865
5141
|
// Get the trigger slot
|
|
4866
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5142
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
4867
5143
|
|
|
4868
5144
|
// If there's a trigger slot
|
|
4869
5145
|
if (triggerSlot) {
|
|
@@ -4875,7 +5151,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4875
5151
|
if (triggerContentNodes) {
|
|
4876
5152
|
|
|
4877
5153
|
// See if any of them are focusable elements
|
|
4878
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5154
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4879
5155
|
|
|
4880
5156
|
// If any of them are focusable elements
|
|
4881
5157
|
if (this.triggerContentFocusable) {
|
|
@@ -4935,29 +5211,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4935
5211
|
}
|
|
4936
5212
|
}
|
|
4937
5213
|
|
|
4938
|
-
/**
|
|
4939
|
-
* @private
|
|
4940
|
-
* @method handleLabelSlotChange
|
|
4941
|
-
* @param {event} event - The event object representing the slot change.
|
|
4942
|
-
* @description Handles the slot change event for the label slot.
|
|
4943
|
-
*/
|
|
4944
|
-
handleLabelSlotChange (event) {
|
|
4945
|
-
|
|
4946
|
-
// Get the nodes from the event
|
|
4947
|
-
const nodes = event.target.assignedNodes();
|
|
4948
|
-
|
|
4949
|
-
// Guard clause for no nodes
|
|
4950
|
-
if (!nodes) {
|
|
4951
|
-
return;
|
|
4952
|
-
}
|
|
4953
|
-
|
|
4954
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
4955
|
-
const nodesArr = Array.from(nodes);
|
|
4956
|
-
|
|
4957
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
4958
|
-
this.labeled = nodesArr.length > 0;
|
|
4959
|
-
}
|
|
4960
|
-
|
|
4961
5214
|
/**
|
|
4962
5215
|
* Returns HTML for the common portion of the layouts.
|
|
4963
5216
|
* @private
|
|
@@ -4970,24 +5223,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4970
5223
|
<div
|
|
4971
5224
|
id="trigger"
|
|
4972
5225
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4973
|
-
tabindex="${this.tabIndex}"
|
|
5226
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4974
5227
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4975
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4976
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5228
|
+
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5229
|
+
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4977
5230
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4978
5231
|
@focusin="${this.handleFocusin}"
|
|
4979
5232
|
@blur="${this.handleFocusOut}">
|
|
4980
|
-
<div class="triggerContentWrapper">
|
|
4981
|
-
<
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
<div class="triggerContent">
|
|
4985
|
-
<slot
|
|
4986
|
-
name="trigger"
|
|
4987
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4988
|
-
</div>
|
|
5233
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5234
|
+
<slot
|
|
5235
|
+
name="trigger"
|
|
5236
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4989
5237
|
</div>
|
|
4990
|
-
${this.chevron
|
|
5238
|
+
${this.chevron ? html`
|
|
4991
5239
|
<div
|
|
4992
5240
|
id="showStateIcon"
|
|
4993
5241
|
class="chevron"
|
|
@@ -5008,11 +5256,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5008
5256
|
<div id="bibSizer" part="size"></div>
|
|
5009
5257
|
<${this.dropdownBibTag}
|
|
5010
5258
|
id="bib"
|
|
5259
|
+
shape="${this.shape}"
|
|
5011
5260
|
?data-show="${this.isPopoverVisible}"
|
|
5012
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5013
|
-
?common="${this.common}"
|
|
5014
|
-
?rounded="${this.common || this.rounded}"
|
|
5015
|
-
?inset="${this.common || this.inset}">
|
|
5261
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5016
5262
|
<div class="slotContent">
|
|
5017
5263
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5018
5264
|
</div>
|
|
@@ -5027,245 +5273,1290 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5027
5273
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5028
5274
|
*/
|
|
5029
5275
|
renderLayoutClassic() {
|
|
5276
|
+
// TODO: check with Doug why this was never used?
|
|
5277
|
+
const helpTextClasses = {
|
|
5278
|
+
'helpText': true
|
|
5279
|
+
};
|
|
5030
5280
|
|
|
5031
5281
|
return html`
|
|
5032
|
-
|
|
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
|
-
</div>
|
|
5068
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5069
|
-
<slot name="helpText"></slot>
|
|
5070
|
-
</${this.helpTextTag}>
|
|
5071
|
-
|
|
5072
|
-
<div id="bibSizer" part="size"></div>
|
|
5073
|
-
<${this.dropdownBibTag}
|
|
5074
|
-
id="bib"
|
|
5075
|
-
?data-show="${this.isPopoverVisible}"
|
|
5076
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5077
|
-
?common="${this.common}"
|
|
5078
|
-
?rounded="${this.common || this.rounded}"
|
|
5079
|
-
?inset="${this.common || this.inset}"
|
|
5080
|
-
>
|
|
5081
|
-
<div class="slotContent">
|
|
5082
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5083
|
-
</div>
|
|
5084
|
-
</${this.dropdownBibTag}>
|
|
5085
|
-
</div>
|
|
5282
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5283
|
+
`;
|
|
5284
|
+
}
|
|
5285
|
+
|
|
5286
|
+
/**
|
|
5287
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
5288
|
+
* @private
|
|
5289
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
5290
|
+
*/
|
|
5291
|
+
renderLayoutSnowflake() {
|
|
5292
|
+
const helpTextClasses = {
|
|
5293
|
+
'helpText': true,
|
|
5294
|
+
'leftIndent': true,
|
|
5295
|
+
'rightIndent': true
|
|
5296
|
+
};
|
|
5297
|
+
|
|
5298
|
+
return html`
|
|
5299
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5300
|
+
`;
|
|
5301
|
+
}
|
|
5302
|
+
|
|
5303
|
+
/**
|
|
5304
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
5305
|
+
* @private
|
|
5306
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
5307
|
+
*/
|
|
5308
|
+
renderLayoutEmphasized() {
|
|
5309
|
+
const helpTextClasses = {
|
|
5310
|
+
'helpText': true,
|
|
5311
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5312
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5313
|
+
};
|
|
5314
|
+
|
|
5315
|
+
return html`
|
|
5316
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5086
5317
|
`;
|
|
5087
5318
|
}
|
|
5088
5319
|
|
|
5089
5320
|
/**
|
|
5090
|
-
*
|
|
5091
|
-
* @private
|
|
5092
|
-
* @
|
|
5321
|
+
* Logic to determine the layout of the component.
|
|
5322
|
+
* @private
|
|
5323
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
5324
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
5325
|
+
*/
|
|
5326
|
+
renderLayout(ForcedLayout) {
|
|
5327
|
+
const layout = ForcedLayout || this.layout;
|
|
5328
|
+
|
|
5329
|
+
switch (layout) {
|
|
5330
|
+
case 'emphasized':
|
|
5331
|
+
return this.renderLayoutEmphasized();
|
|
5332
|
+
case 'emphasized-left':
|
|
5333
|
+
return this.renderLayoutEmphasized();
|
|
5334
|
+
case 'emphasized-right':
|
|
5335
|
+
return this.renderLayoutEmphasized();
|
|
5336
|
+
case 'snowflake':
|
|
5337
|
+
return this.renderLayoutSnowflake();
|
|
5338
|
+
case 'snowflake-left':
|
|
5339
|
+
return this.renderLayoutSnowflake();
|
|
5340
|
+
case 'snowflake-right':
|
|
5341
|
+
return this.renderLayoutSnowflake();
|
|
5342
|
+
default:
|
|
5343
|
+
return this.renderLayoutClassic();
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
|
|
5348
|
+
var dropdownVersion = '3.0.0';
|
|
5349
|
+
|
|
5350
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5351
|
+
|
|
5352
|
+
var styleCss$4 = css`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column;padding:var(--ds-size-200, 1rem);padding-top:var(--ds-size-400, 2rem);padding-bottom:0}#headerContainer .titleRow{display:flex;flex-direction:row;justify-content:space-between;gap:var(--ds-size-100, 0.5rem)}#headerContainer .header{max-width:calc(100vw - var(--ds-size-900, 4.5rem));padding-top:var(--ds-size-200, 1rem)}#headerContainer .subheader{width:100%}#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)}`;
|
|
5353
|
+
|
|
5354
|
+
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)}`;
|
|
5355
|
+
|
|
5356
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5357
|
+
// See LICENSE in the project root for license information.
|
|
5358
|
+
|
|
5359
|
+
// ---------------------------------------------------------------------
|
|
5360
|
+
|
|
5361
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5362
|
+
|
|
5363
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5364
|
+
|
|
5365
|
+
/* eslint-disable jsdoc/require-param */
|
|
5366
|
+
|
|
5367
|
+
/**
|
|
5368
|
+
* This will register a new custom element with the browser.
|
|
5369
|
+
* @param {String} name - The name of the custom element.
|
|
5370
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5371
|
+
* @returns {void}
|
|
5372
|
+
*/
|
|
5373
|
+
registerComponent(name, componentClass) {
|
|
5374
|
+
if (!customElements.get(name)) {
|
|
5375
|
+
customElements.define(name, class extends componentClass {});
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
|
|
5379
|
+
/**
|
|
5380
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5381
|
+
* @returns {void}
|
|
5382
|
+
*/
|
|
5383
|
+
closestElement(
|
|
5384
|
+
selector, // selector like in .closest()
|
|
5385
|
+
base = this, // extra functionality to skip a parent
|
|
5386
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5387
|
+
!el || el === document || el === window
|
|
5388
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5389
|
+
: found
|
|
5390
|
+
? found // found a selector INside this element
|
|
5391
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5392
|
+
) {
|
|
5393
|
+
return __Closest(base);
|
|
5394
|
+
}
|
|
5395
|
+
/* eslint-enable jsdoc/require-param */
|
|
5396
|
+
|
|
5397
|
+
/**
|
|
5398
|
+
* 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.
|
|
5399
|
+
* @param {Object} elem - The element to check.
|
|
5400
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5401
|
+
* @returns {void}
|
|
5402
|
+
*/
|
|
5403
|
+
handleComponentTagRename(elem, tagName) {
|
|
5404
|
+
const tag = tagName.toLowerCase();
|
|
5405
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5406
|
+
|
|
5407
|
+
if (elemTag !== tag) {
|
|
5408
|
+
elem.setAttribute(tag, true);
|
|
5409
|
+
}
|
|
5410
|
+
}
|
|
5411
|
+
|
|
5412
|
+
/**
|
|
5413
|
+
* Validates if an element is a specific Auro component.
|
|
5414
|
+
* @param {Object} elem - The element to validate.
|
|
5415
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5416
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5417
|
+
*/
|
|
5418
|
+
elementMatch(elem, tagName) {
|
|
5419
|
+
const tag = tagName.toLowerCase();
|
|
5420
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5421
|
+
|
|
5422
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5423
|
+
}
|
|
5424
|
+
};
|
|
5425
|
+
|
|
5426
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5427
|
+
// See LICENSE in the project root for license information.
|
|
5428
|
+
|
|
5429
|
+
|
|
5430
|
+
class AuroDependencyVersioning {
|
|
5431
|
+
|
|
5432
|
+
/**
|
|
5433
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5434
|
+
* @private
|
|
5435
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5436
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5437
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5438
|
+
*/
|
|
5439
|
+
generateElementName(baseName, version) {
|
|
5440
|
+
let result = baseName;
|
|
5441
|
+
|
|
5442
|
+
result += '-';
|
|
5443
|
+
result += version.replace(/[.]/g, '_');
|
|
5444
|
+
|
|
5445
|
+
return result;
|
|
5446
|
+
}
|
|
5447
|
+
|
|
5448
|
+
/**
|
|
5449
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5450
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5451
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5452
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5453
|
+
*/
|
|
5454
|
+
generateTag(baseName, version, tagClass) {
|
|
5455
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5456
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5457
|
+
|
|
5458
|
+
if (!customElements.get(elementName)) {
|
|
5459
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5460
|
+
}
|
|
5461
|
+
|
|
5462
|
+
return tag;
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
|
|
5466
|
+
/**
|
|
5467
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5468
|
+
*/
|
|
5469
|
+
const _observers = new WeakMap();
|
|
5470
|
+
|
|
5471
|
+
/**
|
|
5472
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5473
|
+
* Structure: {
|
|
5474
|
+
* host: {
|
|
5475
|
+
* matchers: Set<Function>,
|
|
5476
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5477
|
+
* }
|
|
5478
|
+
* }
|
|
5479
|
+
*/
|
|
5480
|
+
const _transportConfig = new WeakMap();
|
|
5481
|
+
|
|
5482
|
+
/**
|
|
5483
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5484
|
+
*
|
|
5485
|
+
* @param {Object} params - The parameters for the function.
|
|
5486
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5487
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5488
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5489
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5490
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5491
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5492
|
+
*/
|
|
5493
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5494
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5495
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5496
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5497
|
+
}
|
|
5498
|
+
|
|
5499
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5500
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5501
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5502
|
+
}
|
|
5503
|
+
|
|
5504
|
+
// Guard Clause: Ensure match is a function
|
|
5505
|
+
if (typeof match !== 'function') {
|
|
5506
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5507
|
+
}
|
|
5508
|
+
|
|
5509
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5510
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5511
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5514
|
+
// Register this transport and get cleanup function
|
|
5515
|
+
return _registerTransport({
|
|
5516
|
+
host,
|
|
5517
|
+
target,
|
|
5518
|
+
matcher: match,
|
|
5519
|
+
removeOriginal
|
|
5520
|
+
});
|
|
5521
|
+
};
|
|
5522
|
+
|
|
5523
|
+
/**
|
|
5524
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5525
|
+
*
|
|
5526
|
+
* @param {Object} params - The parameters object.
|
|
5527
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5528
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5529
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5530
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5531
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5532
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5533
|
+
* @private
|
|
5534
|
+
*/
|
|
5535
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5536
|
+
// Initialize config for this host if it doesn't exist
|
|
5537
|
+
if (!_transportConfig.has(host)) {
|
|
5538
|
+
_transportConfig.set(host, {
|
|
5539
|
+
matchers: new Set(),
|
|
5540
|
+
targets: new Map()
|
|
5541
|
+
});
|
|
5542
|
+
}
|
|
5543
|
+
|
|
5544
|
+
const config = _transportConfig.get(host);
|
|
5545
|
+
|
|
5546
|
+
// Add the matcher to the set of matchers for this host
|
|
5547
|
+
config.matchers.add(matcher);
|
|
5548
|
+
|
|
5549
|
+
// Initialize target entry if it doesn't exist
|
|
5550
|
+
if (!config.targets.has(target)) {
|
|
5551
|
+
config.targets.set(target, new Map());
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5554
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5555
|
+
config.targets.get(target).set(matcher, {
|
|
5556
|
+
removeOriginal,
|
|
5557
|
+
currentAttributes: new Map()
|
|
5558
|
+
});
|
|
5559
|
+
|
|
5560
|
+
// Perform initial attribute transport
|
|
5561
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5562
|
+
|
|
5563
|
+
// Attach observer
|
|
5564
|
+
_attachObserver(host);
|
|
5565
|
+
|
|
5566
|
+
// Return cleanup function and utility functions
|
|
5567
|
+
return {
|
|
5568
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5569
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5570
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5571
|
+
}
|
|
5572
|
+
};
|
|
5573
|
+
|
|
5574
|
+
/**
|
|
5575
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5576
|
+
*
|
|
5577
|
+
* @param {HTMLElement} host - The host element
|
|
5578
|
+
* @param {HTMLElement} target - The target element
|
|
5579
|
+
* @param {Function} matcher - The matcher function
|
|
5580
|
+
* @private
|
|
5581
|
+
*/
|
|
5582
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5583
|
+
const config = _transportConfig.get(host);
|
|
5584
|
+
if (!config) return;
|
|
5585
|
+
|
|
5586
|
+
// Remove this matcher from this target
|
|
5587
|
+
const targetMatchers = config.targets.get(target);
|
|
5588
|
+
if (targetMatchers) {
|
|
5589
|
+
targetMatchers.delete(matcher);
|
|
5590
|
+
|
|
5591
|
+
// If this target has no more matchers, remove it
|
|
5592
|
+
if (targetMatchers.size === 0) {
|
|
5593
|
+
config.targets.delete(target);
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
|
|
5597
|
+
// Check if this matcher is still used by any target
|
|
5598
|
+
let matcherStillUsed = false;
|
|
5599
|
+
for (const matcherMap of config.targets.values()) {
|
|
5600
|
+
if (matcherMap.has(matcher)) {
|
|
5601
|
+
matcherStillUsed = true;
|
|
5602
|
+
break;
|
|
5603
|
+
}
|
|
5604
|
+
}
|
|
5605
|
+
|
|
5606
|
+
// If not used anymore, remove from matchers set
|
|
5607
|
+
if (!matcherStillUsed) {
|
|
5608
|
+
config.matchers.delete(matcher);
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5611
|
+
// If no more targets or matchers, detach observer
|
|
5612
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5613
|
+
_detachObserver(host);
|
|
5614
|
+
}
|
|
5615
|
+
};
|
|
5616
|
+
|
|
5617
|
+
/**
|
|
5618
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5619
|
+
*
|
|
5620
|
+
* @param {Object} params - The parameters object.
|
|
5621
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5622
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5623
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5624
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5625
|
+
* @returns {void}
|
|
5626
|
+
* @private
|
|
5627
|
+
*/
|
|
5628
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5629
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5630
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5631
|
+
.filter(attr => matcher(attr))
|
|
5632
|
+
.reduce((acc, attr) => {
|
|
5633
|
+
acc[attr] = host.getAttribute(attr);
|
|
5634
|
+
return acc;
|
|
5635
|
+
}, {});
|
|
5636
|
+
|
|
5637
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5638
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5639
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5640
|
+
target.setAttribute(key, value);
|
|
5641
|
+
if (removeOriginal) {
|
|
5642
|
+
host.removeAttribute(key);
|
|
5643
|
+
}
|
|
5644
|
+
});
|
|
5645
|
+
};
|
|
5646
|
+
|
|
5647
|
+
/**
|
|
5648
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5649
|
+
*
|
|
5650
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5651
|
+
* @returns {MutationObserver} The observer instance.
|
|
5652
|
+
* @private
|
|
5653
|
+
*/
|
|
5654
|
+
const _attachObserver = (host) => {
|
|
5655
|
+
// If an observer for this host already exists, return it
|
|
5656
|
+
if (_observers.has(host)) {
|
|
5657
|
+
return _observers.get(host);
|
|
5658
|
+
}
|
|
5659
|
+
|
|
5660
|
+
// Create a new MutationObserver
|
|
5661
|
+
const observer = new MutationObserver((mutations) => {
|
|
5662
|
+
const config = _transportConfig.get(host);
|
|
5663
|
+
if (!config) return;
|
|
5664
|
+
|
|
5665
|
+
// For each mutation affecting attributes
|
|
5666
|
+
mutations
|
|
5667
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5668
|
+
.forEach(mutation => {
|
|
5669
|
+
const attributeName = mutation.attributeName;
|
|
5670
|
+
|
|
5671
|
+
// Find matchers that care about this attribute
|
|
5672
|
+
for (const matcher of config.matchers) {
|
|
5673
|
+
if (matcher(attributeName)) {
|
|
5674
|
+
// For each target that uses this matcher
|
|
5675
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5676
|
+
if (matcherConfigs.has(matcher)) {
|
|
5677
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5678
|
+
_transportAttributes({
|
|
5679
|
+
host,
|
|
5680
|
+
target,
|
|
5681
|
+
matcher,
|
|
5682
|
+
removeOriginal
|
|
5683
|
+
});
|
|
5684
|
+
}
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
}
|
|
5688
|
+
});
|
|
5689
|
+
});
|
|
5690
|
+
|
|
5691
|
+
// Start observing attribute changes
|
|
5692
|
+
observer.observe(host, { attributes: true });
|
|
5693
|
+
|
|
5694
|
+
// Store the observer
|
|
5695
|
+
_observers.set(host, observer);
|
|
5696
|
+
|
|
5697
|
+
return observer;
|
|
5698
|
+
};
|
|
5699
|
+
|
|
5700
|
+
/**
|
|
5701
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5702
|
+
*
|
|
5703
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5704
|
+
* @private
|
|
5705
|
+
*/
|
|
5706
|
+
const _detachObserver = (host) => {
|
|
5707
|
+
if (_observers.has(host)) {
|
|
5708
|
+
const observer = _observers.get(host);
|
|
5709
|
+
observer.disconnect();
|
|
5710
|
+
_observers.delete(host);
|
|
5711
|
+
}
|
|
5712
|
+
|
|
5713
|
+
// Clean up the transport config as well
|
|
5714
|
+
if (_transportConfig.has(host)) {
|
|
5715
|
+
_transportConfig.delete(host);
|
|
5716
|
+
}
|
|
5717
|
+
};
|
|
5718
|
+
|
|
5719
|
+
/**
|
|
5720
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5721
|
+
* @param {HTMLElement} host - The host element
|
|
5722
|
+
* @param {HTMLElement} target - The target element
|
|
5723
|
+
* @param {Function} matcher - The matcher function
|
|
5724
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5725
|
+
* @private
|
|
5726
|
+
*/
|
|
5727
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5728
|
+
const config = _transportConfig.get(host);
|
|
5729
|
+
if (!config) return undefined;
|
|
5730
|
+
|
|
5731
|
+
const targetMatchers = config.targets.get(target);
|
|
5732
|
+
if (!targetMatchers) return undefined;
|
|
5733
|
+
|
|
5734
|
+
return targetMatchers.get(matcher);
|
|
5735
|
+
};
|
|
5736
|
+
|
|
5737
|
+
/**
|
|
5738
|
+
* Sets an observed attribute value
|
|
5739
|
+
* @param {HTMLElement} host - The host element
|
|
5740
|
+
* @param {HTMLElement} target - The target element
|
|
5741
|
+
* @param {Function} matcher - The matcher function
|
|
5742
|
+
* @param {string} key - The attribute name
|
|
5743
|
+
* @param {string} value - The attribute value
|
|
5744
|
+
* @private
|
|
5745
|
+
*/
|
|
5746
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5747
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5748
|
+
if (matcherConfig) {
|
|
5749
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5750
|
+
}
|
|
5751
|
+
};
|
|
5752
|
+
|
|
5753
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5754
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5755
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5756
|
+
return undefined;
|
|
5757
|
+
};
|
|
5758
|
+
|
|
5759
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5760
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5761
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5762
|
+
return [];
|
|
5763
|
+
};
|
|
5764
|
+
|
|
5765
|
+
const _matchers = {
|
|
5766
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5767
|
+
'role': attr => attr.match(/^role$/)
|
|
5768
|
+
};
|
|
5769
|
+
|
|
5770
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5771
|
+
return transportAttributes({
|
|
5772
|
+
host,
|
|
5773
|
+
target,
|
|
5774
|
+
match: attr => {
|
|
5775
|
+
for (const key in _matchers) {
|
|
5776
|
+
if (_matchers[key](attr)) return true;
|
|
5777
|
+
}
|
|
5778
|
+
return false;
|
|
5779
|
+
},
|
|
5780
|
+
removeOriginal
|
|
5781
|
+
});
|
|
5782
|
+
};
|
|
5783
|
+
|
|
5784
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
5785
|
+
|
|
5786
|
+
/**
|
|
5787
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5788
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5789
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5790
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5791
|
+
* @private
|
|
5792
|
+
*/
|
|
5793
|
+
attributeWatcher;
|
|
5794
|
+
|
|
5795
|
+
static get properties() {
|
|
5796
|
+
return {
|
|
5797
|
+
|
|
5798
|
+
/**
|
|
5799
|
+
* Defines the layout of an element.
|
|
5800
|
+
* @default {'default'}
|
|
5801
|
+
*/
|
|
5802
|
+
layout: {
|
|
5803
|
+
type: String,
|
|
5804
|
+
attribute: "layout",
|
|
5805
|
+
reflect: true
|
|
5806
|
+
},
|
|
5807
|
+
|
|
5808
|
+
/**
|
|
5809
|
+
* Defines the shape of an element.
|
|
5810
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5811
|
+
* @default {'default'}
|
|
5812
|
+
*/
|
|
5813
|
+
shape: {
|
|
5814
|
+
type: String,
|
|
5815
|
+
attribute: "shape",
|
|
5816
|
+
reflect: true
|
|
5817
|
+
},
|
|
5818
|
+
|
|
5819
|
+
/**
|
|
5820
|
+
* Defines the size of an element.
|
|
5821
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5822
|
+
* @default {'md'}
|
|
5823
|
+
*/
|
|
5824
|
+
size: {
|
|
5825
|
+
type: String,
|
|
5826
|
+
attribute: "size",
|
|
5827
|
+
reflect: true
|
|
5828
|
+
},
|
|
5829
|
+
|
|
5830
|
+
/**
|
|
5831
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5832
|
+
* @default {false}
|
|
5833
|
+
*/
|
|
5834
|
+
onDark: {
|
|
5835
|
+
type: Boolean,
|
|
5836
|
+
attribute: "ondark",
|
|
5837
|
+
reflect: true
|
|
5838
|
+
},
|
|
5839
|
+
|
|
5840
|
+
/**
|
|
5841
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5842
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5843
|
+
* @type {HTMLElement|null}
|
|
5844
|
+
* @default {null}
|
|
5845
|
+
* @private
|
|
5846
|
+
*/
|
|
5847
|
+
wrapper: {
|
|
5848
|
+
attribute: false,
|
|
5849
|
+
reflect: false
|
|
5850
|
+
}
|
|
5851
|
+
};
|
|
5852
|
+
}
|
|
5853
|
+
|
|
5854
|
+
|
|
5855
|
+
|
|
5856
|
+
resetShapeClasses() {
|
|
5857
|
+
if (this.shape && this.size) {
|
|
5858
|
+
|
|
5859
|
+
if (this.wrapper) {
|
|
5860
|
+
this.wrapper.classList.forEach((className) => {
|
|
5861
|
+
if (className.startsWith('shape-')) {
|
|
5862
|
+
this.wrapper.classList.remove(className);
|
|
5863
|
+
}
|
|
5864
|
+
});
|
|
5865
|
+
|
|
5866
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5867
|
+
}
|
|
5868
|
+
}
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5871
|
+
resetLayoutClasses() {
|
|
5872
|
+
if (this.layout) {
|
|
5873
|
+
if (this.wrapper) {
|
|
5874
|
+
this.wrapper.classList.forEach((className) => {
|
|
5875
|
+
if (className.startsWith('layout-')) {
|
|
5876
|
+
this.wrapper.classList.remove(className);
|
|
5877
|
+
}
|
|
5878
|
+
});
|
|
5879
|
+
|
|
5880
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
5881
|
+
}
|
|
5882
|
+
}
|
|
5883
|
+
}
|
|
5884
|
+
|
|
5885
|
+
updateComponentArchitecture() {
|
|
5886
|
+
this.resetLayoutClasses();
|
|
5887
|
+
this.resetShapeClasses();
|
|
5888
|
+
}
|
|
5889
|
+
|
|
5890
|
+
updated(changedProperties) {
|
|
5891
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
5892
|
+
this.updateComponentArchitecture();
|
|
5893
|
+
}
|
|
5894
|
+
}
|
|
5895
|
+
|
|
5896
|
+
firstUpdated() {
|
|
5897
|
+
super.firstUpdated();
|
|
5898
|
+
|
|
5899
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
5900
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5901
|
+
|
|
5902
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
5903
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
5904
|
+
}
|
|
5905
|
+
|
|
5906
|
+
disconnectedCallback() {
|
|
5907
|
+
super.disconnectedCallback();
|
|
5908
|
+
|
|
5909
|
+
// Cleanup the ARIA observer if it exists
|
|
5910
|
+
if (this.attributeWatcher) {
|
|
5911
|
+
this.attributeWatcher.cleanup();
|
|
5912
|
+
this.attributeWatcher = null;
|
|
5913
|
+
}
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5916
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
5917
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
5918
|
+
render() {
|
|
5919
|
+
try {
|
|
5920
|
+
return this.renderLayout();
|
|
5921
|
+
} catch (error) {
|
|
5922
|
+
// failed to get the defined layout
|
|
5923
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
5924
|
+
|
|
5925
|
+
// fallback to the default layout
|
|
5926
|
+
return this.getLayout('default');
|
|
5927
|
+
}
|
|
5928
|
+
}
|
|
5929
|
+
};
|
|
5930
|
+
|
|
5931
|
+
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}`;
|
|
5932
|
+
|
|
5933
|
+
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)}`;
|
|
5934
|
+
|
|
5935
|
+
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}`;
|
|
5936
|
+
|
|
5937
|
+
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}`;
|
|
5938
|
+
|
|
5939
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5940
|
+
// See LICENSE in the project root for license information.
|
|
5941
|
+
|
|
5942
|
+
// ---------------------------------------------------------------------
|
|
5943
|
+
|
|
5944
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5945
|
+
|
|
5946
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5947
|
+
|
|
5948
|
+
/* eslint-disable jsdoc/require-param */
|
|
5949
|
+
|
|
5950
|
+
/**
|
|
5951
|
+
* This will register a new custom element with the browser.
|
|
5952
|
+
* @param {String} name - The name of the custom element.
|
|
5953
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5954
|
+
* @returns {void}
|
|
5955
|
+
*/
|
|
5956
|
+
registerComponent(name, componentClass) {
|
|
5957
|
+
if (!customElements.get(name)) {
|
|
5958
|
+
customElements.define(name, class extends componentClass {});
|
|
5959
|
+
}
|
|
5960
|
+
}
|
|
5961
|
+
|
|
5962
|
+
/**
|
|
5963
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5964
|
+
* @returns {void}
|
|
5965
|
+
*/
|
|
5966
|
+
closestElement(
|
|
5967
|
+
selector, // selector like in .closest()
|
|
5968
|
+
base = this, // extra functionality to skip a parent
|
|
5969
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5970
|
+
!el || el === document || el === window
|
|
5971
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5972
|
+
: found
|
|
5973
|
+
? found // found a selector INside this element
|
|
5974
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5975
|
+
) {
|
|
5976
|
+
return __Closest(base);
|
|
5977
|
+
}
|
|
5978
|
+
/* eslint-enable jsdoc/require-param */
|
|
5979
|
+
|
|
5980
|
+
/**
|
|
5981
|
+
* 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.
|
|
5982
|
+
* @param {Object} elem - The element to check.
|
|
5983
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5984
|
+
* @returns {void}
|
|
5985
|
+
*/
|
|
5986
|
+
handleComponentTagRename(elem, tagName) {
|
|
5987
|
+
const tag = tagName.toLowerCase();
|
|
5988
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5989
|
+
|
|
5990
|
+
if (elemTag !== tag) {
|
|
5991
|
+
elem.setAttribute(tag, true);
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
|
|
5995
|
+
/**
|
|
5996
|
+
* Validates if an element is a specific Auro component.
|
|
5997
|
+
* @param {Object} elem - The element to validate.
|
|
5998
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5999
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6000
|
+
*/
|
|
6001
|
+
elementMatch(elem, tagName) {
|
|
6002
|
+
const tag = tagName.toLowerCase();
|
|
6003
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6004
|
+
|
|
6005
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6006
|
+
}
|
|
6007
|
+
};
|
|
6008
|
+
|
|
6009
|
+
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}}`;
|
|
6010
|
+
|
|
6011
|
+
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}`;
|
|
6012
|
+
|
|
6013
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6014
|
+
|
|
6015
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6016
|
+
// See LICENSE in the project root for license information.
|
|
6017
|
+
|
|
6018
|
+
|
|
6019
|
+
class AuroLoader extends LitElement {
|
|
6020
|
+
constructor() {
|
|
6021
|
+
super();
|
|
6022
|
+
|
|
6023
|
+
/**
|
|
6024
|
+
* @private
|
|
6025
|
+
*/
|
|
6026
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6027
|
+
|
|
6028
|
+
/**
|
|
6029
|
+
* @private
|
|
6030
|
+
*/
|
|
6031
|
+
this.mdCount = 3;
|
|
6032
|
+
|
|
6033
|
+
/**
|
|
6034
|
+
* @private
|
|
6035
|
+
*/
|
|
6036
|
+
this.smCount = 2;
|
|
6037
|
+
|
|
6038
|
+
/**
|
|
6039
|
+
* @private
|
|
6040
|
+
*/
|
|
6041
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
6042
|
+
|
|
6043
|
+
this.orbit = false;
|
|
6044
|
+
this.ringworm = false;
|
|
6045
|
+
this.laser = false;
|
|
6046
|
+
this.pulse = false;
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
// function to define props used within the scope of this component
|
|
6050
|
+
static get properties() {
|
|
6051
|
+
return {
|
|
6052
|
+
|
|
6053
|
+
/**
|
|
6054
|
+
* Sets loader to laser type.
|
|
6055
|
+
*/
|
|
6056
|
+
laser: {
|
|
6057
|
+
type: Boolean,
|
|
6058
|
+
reflect: true
|
|
6059
|
+
},
|
|
6060
|
+
|
|
6061
|
+
/**
|
|
6062
|
+
* Sets loader to orbit type.
|
|
6063
|
+
*/
|
|
6064
|
+
orbit: {
|
|
6065
|
+
type: Boolean,
|
|
6066
|
+
reflect: true
|
|
6067
|
+
},
|
|
6068
|
+
|
|
6069
|
+
/**
|
|
6070
|
+
* Sets loader to pulse type.
|
|
6071
|
+
*/
|
|
6072
|
+
pulse: {
|
|
6073
|
+
type: Boolean,
|
|
6074
|
+
reflect: true
|
|
6075
|
+
},
|
|
6076
|
+
|
|
6077
|
+
/**
|
|
6078
|
+
* Sets loader to ringworm type.
|
|
6079
|
+
*/
|
|
6080
|
+
ringworm: {
|
|
6081
|
+
type: Boolean,
|
|
6082
|
+
reflect: true
|
|
6083
|
+
}
|
|
6084
|
+
};
|
|
6085
|
+
}
|
|
6086
|
+
|
|
6087
|
+
static get styles() {
|
|
6088
|
+
return [
|
|
6089
|
+
css`${styleCss$2}`,
|
|
6090
|
+
css`${colorCss$1}`,
|
|
6091
|
+
css`${tokensCss$1}`
|
|
6092
|
+
];
|
|
6093
|
+
}
|
|
6094
|
+
|
|
6095
|
+
/**
|
|
6096
|
+
* This will register this element with the browser.
|
|
6097
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6098
|
+
*
|
|
6099
|
+
* @example
|
|
6100
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6101
|
+
*
|
|
6102
|
+
*/
|
|
6103
|
+
static register(name = "auro-loader") {
|
|
6104
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroLoader);
|
|
6105
|
+
}
|
|
6106
|
+
|
|
6107
|
+
firstUpdated() {
|
|
6108
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6109
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6110
|
+
}
|
|
6111
|
+
|
|
6112
|
+
connectedCallback() {
|
|
6113
|
+
super.connectedCallback();
|
|
6114
|
+
}
|
|
6115
|
+
|
|
6116
|
+
/**
|
|
6117
|
+
* @private
|
|
6118
|
+
* @returns {Array} Numbered array for template map.
|
|
6119
|
+
*/
|
|
6120
|
+
defineTemplate() {
|
|
6121
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6122
|
+
|
|
6123
|
+
if (this.orbit || this.laser) {
|
|
6124
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6125
|
+
} else if (this.ringworm) {
|
|
6126
|
+
nodes = Array.from(Array(0).keys());
|
|
6127
|
+
}
|
|
6128
|
+
|
|
6129
|
+
return nodes;
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6132
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6133
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6134
|
+
|
|
6135
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6136
|
+
render() {
|
|
6137
|
+
return html$1`
|
|
6138
|
+
${this.defineTemplate().map((idx) => html$1`
|
|
6139
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6140
|
+
`)}
|
|
6141
|
+
|
|
6142
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6143
|
+
|
|
6144
|
+
${this.ringworm ? html$1`
|
|
6145
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6146
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6147
|
+
</svg>`
|
|
6148
|
+
: ``
|
|
6149
|
+
}
|
|
6150
|
+
`;
|
|
6151
|
+
}
|
|
6152
|
+
}
|
|
6153
|
+
|
|
6154
|
+
var loaderVersion = '5.1.0';
|
|
6155
|
+
|
|
6156
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6157
|
+
// See LICENSE in the project root for license information.
|
|
6158
|
+
|
|
6159
|
+
|
|
6160
|
+
/**
|
|
6161
|
+
* @slot - Default slot for the text of the button.
|
|
6162
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6163
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6164
|
+
* @csspart text - Apply CSS to text slot.
|
|
6165
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6166
|
+
*/
|
|
6167
|
+
|
|
6168
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6172
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6173
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6174
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6175
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6176
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6177
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6178
|
+
*/
|
|
6179
|
+
class AuroButton extends AuroElement$1 {
|
|
6180
|
+
|
|
6181
|
+
/**
|
|
6182
|
+
* Enables form association for this element.
|
|
6183
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6184
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6185
|
+
*/
|
|
6186
|
+
static get formAssociated() {
|
|
6187
|
+
return true;
|
|
6188
|
+
}
|
|
6189
|
+
|
|
6190
|
+
constructor() {
|
|
6191
|
+
super();
|
|
6192
|
+
this.autofocus = false;
|
|
6193
|
+
this.disabled = false;
|
|
6194
|
+
this.loading = false;
|
|
6195
|
+
this.size = "md";
|
|
6196
|
+
this.shape = "rounded";
|
|
6197
|
+
this.onDark = false;
|
|
6198
|
+
this.fluid = false;
|
|
6199
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6200
|
+
this.variant = 'primary';
|
|
6201
|
+
|
|
6202
|
+
// Support for HTML5 forms
|
|
6203
|
+
if (typeof this.attachInternals === 'function') {
|
|
6204
|
+
this.internals = this.attachInternals();
|
|
6205
|
+
} else {
|
|
6206
|
+
this.internals = null;
|
|
6207
|
+
|
|
6208
|
+
// eslint-disable-next-line no-console
|
|
6209
|
+
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.');
|
|
6210
|
+
}
|
|
6211
|
+
|
|
6212
|
+
/**
|
|
6213
|
+
* Generate unique names for dependency components.
|
|
6214
|
+
*/
|
|
6215
|
+
const versioning = new AuroDependencyVersioning();
|
|
6216
|
+
|
|
6217
|
+
/**
|
|
6218
|
+
* @private
|
|
6219
|
+
*/
|
|
6220
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6221
|
+
|
|
6222
|
+
/**
|
|
6223
|
+
* @private
|
|
6224
|
+
*/
|
|
6225
|
+
this.buttonHref = undefined;
|
|
6226
|
+
|
|
6227
|
+
/**
|
|
6228
|
+
* @private
|
|
6229
|
+
*/
|
|
6230
|
+
this.buttonTarget = undefined;
|
|
6231
|
+
|
|
6232
|
+
/**
|
|
6233
|
+
* @private
|
|
6234
|
+
*/
|
|
6235
|
+
this.buttonRel = undefined;
|
|
6236
|
+
}
|
|
6237
|
+
|
|
6238
|
+
static get styles() {
|
|
6239
|
+
return [
|
|
6240
|
+
tokensCss$2,
|
|
6241
|
+
styleCss$3,
|
|
6242
|
+
colorCss$2,
|
|
6243
|
+
shapeSize
|
|
6244
|
+
];
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6247
|
+
static get properties() {
|
|
6248
|
+
return {
|
|
6249
|
+
|
|
6250
|
+
...super.properties,
|
|
6251
|
+
|
|
6252
|
+
/**
|
|
6253
|
+
* Override layout since it isn't used in this component.
|
|
6254
|
+
* @private
|
|
6255
|
+
*/
|
|
6256
|
+
layout: {
|
|
6257
|
+
type: Boolean,
|
|
6258
|
+
attribute: false,
|
|
6259
|
+
reflect: false
|
|
6260
|
+
},
|
|
6261
|
+
|
|
6262
|
+
/**
|
|
6263
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6264
|
+
*/
|
|
6265
|
+
autofocus: {
|
|
6266
|
+
type: Boolean,
|
|
6267
|
+
reflect: true
|
|
6268
|
+
},
|
|
6269
|
+
|
|
6270
|
+
/**
|
|
6271
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6272
|
+
*/
|
|
6273
|
+
disabled: {
|
|
6274
|
+
type: Boolean,
|
|
6275
|
+
reflect: true
|
|
6276
|
+
},
|
|
6277
|
+
|
|
6278
|
+
/**
|
|
6279
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6280
|
+
*/
|
|
6281
|
+
fluid: {
|
|
6282
|
+
type: Boolean,
|
|
6283
|
+
reflect: true
|
|
6284
|
+
},
|
|
6285
|
+
|
|
6286
|
+
/**
|
|
6287
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6288
|
+
*/
|
|
6289
|
+
loading: {
|
|
6290
|
+
type: Boolean,
|
|
6291
|
+
reflect: true
|
|
6292
|
+
},
|
|
6293
|
+
|
|
6294
|
+
/**
|
|
6295
|
+
* 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.
|
|
6296
|
+
*/
|
|
6297
|
+
loadingText: {
|
|
6298
|
+
type: String
|
|
6299
|
+
},
|
|
6300
|
+
|
|
6301
|
+
/**
|
|
6302
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6303
|
+
*/
|
|
6304
|
+
tIndex: {
|
|
6305
|
+
type: String,
|
|
6306
|
+
reflect: true
|
|
6307
|
+
},
|
|
6308
|
+
|
|
6309
|
+
/**
|
|
6310
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6311
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6312
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6313
|
+
*/
|
|
6314
|
+
tabindex: {
|
|
6315
|
+
type: String,
|
|
6316
|
+
reflect: false
|
|
6317
|
+
},
|
|
6318
|
+
|
|
6319
|
+
/**
|
|
6320
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6321
|
+
*/
|
|
6322
|
+
title: {
|
|
6323
|
+
type: String,
|
|
6324
|
+
reflect: true
|
|
6325
|
+
},
|
|
6326
|
+
|
|
6327
|
+
/**
|
|
6328
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6329
|
+
*/
|
|
6330
|
+
type: {
|
|
6331
|
+
type: String,
|
|
6332
|
+
reflect: true
|
|
6333
|
+
},
|
|
6334
|
+
|
|
6335
|
+
/**
|
|
6336
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6337
|
+
*/
|
|
6338
|
+
value: {
|
|
6339
|
+
type: String,
|
|
6340
|
+
reflect: true
|
|
6341
|
+
},
|
|
6342
|
+
|
|
6343
|
+
/**
|
|
6344
|
+
* Sets button variant option.
|
|
6345
|
+
* @default primary
|
|
6346
|
+
*/
|
|
6347
|
+
variant: {
|
|
6348
|
+
type: String,
|
|
6349
|
+
reflect: true
|
|
6350
|
+
},
|
|
6351
|
+
|
|
6352
|
+
/**
|
|
6353
|
+
* @private
|
|
6354
|
+
*/
|
|
6355
|
+
buttonHref: {
|
|
6356
|
+
type: String,
|
|
6357
|
+
},
|
|
6358
|
+
|
|
6359
|
+
/**
|
|
6360
|
+
* @private
|
|
6361
|
+
*/
|
|
6362
|
+
buttonTarget: {
|
|
6363
|
+
type: String,
|
|
6364
|
+
},
|
|
6365
|
+
|
|
6366
|
+
/**
|
|
6367
|
+
* @private
|
|
6368
|
+
*/
|
|
6369
|
+
buttonRel: {
|
|
6370
|
+
type: String,
|
|
6371
|
+
},
|
|
6372
|
+
};
|
|
6373
|
+
}
|
|
6374
|
+
|
|
6375
|
+
/**
|
|
6376
|
+
* This will register this element with the browser.
|
|
6377
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6378
|
+
*
|
|
6379
|
+
* @example
|
|
6380
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6381
|
+
*
|
|
5093
6382
|
*/
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
'helpText': true,
|
|
5097
|
-
'leftIndent': true,
|
|
5098
|
-
'rightIndent': true
|
|
5099
|
-
};
|
|
5100
|
-
|
|
5101
|
-
return html`
|
|
5102
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
5103
|
-
`;
|
|
6383
|
+
static register(name = "auro-button") {
|
|
6384
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
5104
6385
|
}
|
|
5105
6386
|
|
|
5106
6387
|
/**
|
|
5107
|
-
*
|
|
6388
|
+
* Internal method to apply focus to the HTML5 button.
|
|
5108
6389
|
* @private
|
|
5109
|
-
* @returns {
|
|
6390
|
+
* @returns {void}
|
|
5110
6391
|
*/
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
'helpText': true,
|
|
5114
|
-
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5115
|
-
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5116
|
-
};
|
|
5117
|
-
|
|
5118
|
-
return html`
|
|
5119
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
5120
|
-
`;
|
|
6392
|
+
focus() {
|
|
6393
|
+
this.renderRoot.querySelector('button').focus();
|
|
5121
6394
|
}
|
|
5122
6395
|
|
|
5123
6396
|
/**
|
|
5124
|
-
*
|
|
6397
|
+
* Submits the form that this button is associated with.
|
|
5125
6398
|
* @private
|
|
5126
|
-
* @
|
|
5127
|
-
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
6399
|
+
* @returns {void}
|
|
5128
6400
|
*/
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
switch (layout) {
|
|
5133
|
-
case 'emphasized':
|
|
5134
|
-
return this.renderLayoutEmphasized();
|
|
5135
|
-
case 'emphasized-left':
|
|
5136
|
-
return this.renderLayoutEmphasized();
|
|
5137
|
-
case 'emphasized-right':
|
|
5138
|
-
return this.renderLayoutEmphasized();
|
|
5139
|
-
case 'snowflake':
|
|
5140
|
-
return this.renderLayoutSnowflake();
|
|
5141
|
-
case 'snowflake-left':
|
|
5142
|
-
return this.renderLayoutSnowflake();
|
|
5143
|
-
case 'snowflake-right':
|
|
5144
|
-
return this.renderLayoutSnowflake();
|
|
5145
|
-
default:
|
|
5146
|
-
return this.renderLayoutClassic();
|
|
6401
|
+
surfaceSubmitEvent() {
|
|
6402
|
+
if (this.form) {
|
|
6403
|
+
this.form.requestSubmit();
|
|
5147
6404
|
}
|
|
5148
6405
|
}
|
|
5149
|
-
}
|
|
5150
|
-
|
|
5151
|
-
var dropdownVersion = '3.0.0';
|
|
5152
|
-
|
|
5153
|
-
var colorCss$1 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5154
|
-
|
|
5155
|
-
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)}`;
|
|
5156
|
-
|
|
5157
|
-
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)}`;
|
|
5158
|
-
|
|
5159
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5160
|
-
// See LICENSE in the project root for license information.
|
|
5161
|
-
|
|
5162
|
-
// ---------------------------------------------------------------------
|
|
5163
|
-
|
|
5164
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5165
|
-
|
|
5166
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5167
|
-
|
|
5168
|
-
/* eslint-disable jsdoc/require-param */
|
|
5169
6406
|
|
|
5170
6407
|
/**
|
|
5171
|
-
*
|
|
5172
|
-
* @
|
|
5173
|
-
* @
|
|
5174
|
-
* @returns {void}
|
|
6408
|
+
* Returns the form element that this button is associated with.
|
|
6409
|
+
* @private
|
|
6410
|
+
* @returns {HTMLFormElement | null}
|
|
5175
6411
|
*/
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
customElements.define(name, class extends componentClass {});
|
|
5179
|
-
}
|
|
6412
|
+
get form() {
|
|
6413
|
+
return this.internals ? this.internals.form : null;
|
|
5180
6414
|
}
|
|
5181
6415
|
|
|
5182
6416
|
/**
|
|
5183
|
-
*
|
|
5184
|
-
* @returns {
|
|
6417
|
+
* @private
|
|
6418
|
+
* @returns {Boolean}
|
|
5185
6419
|
*/
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
base = this, // extra functionality to skip a parent
|
|
5189
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5190
|
-
!el || el === document || el === window
|
|
5191
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
5192
|
-
: found
|
|
5193
|
-
? found // found a selector INside this element
|
|
5194
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5195
|
-
) {
|
|
5196
|
-
return __Closest(base);
|
|
6420
|
+
get showText() {
|
|
6421
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
5197
6422
|
}
|
|
5198
|
-
/* eslint-enable jsdoc/require-param */
|
|
5199
6423
|
|
|
5200
6424
|
/**
|
|
5201
|
-
*
|
|
5202
|
-
* @
|
|
5203
|
-
* @
|
|
5204
|
-
* @returns {void}
|
|
6425
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6426
|
+
* @returns {string | undefined}
|
|
6427
|
+
* @private
|
|
5205
6428
|
*/
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6429
|
+
get currentAriaLabel() {
|
|
6430
|
+
if (!this.attributeWatcher) return undefined;
|
|
5209
6431
|
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
}
|
|
6432
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6433
|
+
return ariaLabel || undefined;
|
|
5213
6434
|
}
|
|
5214
6435
|
|
|
5215
6436
|
/**
|
|
5216
|
-
*
|
|
5217
|
-
* @
|
|
5218
|
-
* @
|
|
5219
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6437
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6438
|
+
* @returns {string | undefined}
|
|
6439
|
+
* @private
|
|
5220
6440
|
*/
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6441
|
+
get currentAriaLabelledBy() {
|
|
6442
|
+
if (!this.attributeWatcher) return undefined;
|
|
5224
6443
|
|
|
5225
|
-
|
|
6444
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6445
|
+
return ariaLabelledBy || undefined;
|
|
5226
6446
|
}
|
|
5227
|
-
};
|
|
5228
|
-
|
|
5229
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5230
|
-
// See LICENSE in the project root for license information.
|
|
5231
6447
|
|
|
5232
|
-
|
|
5233
|
-
|
|
6448
|
+
/**
|
|
6449
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6450
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6451
|
+
* @private
|
|
6452
|
+
*/
|
|
6453
|
+
get iconOnly() {
|
|
6454
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6455
|
+
}
|
|
5234
6456
|
|
|
5235
6457
|
/**
|
|
5236
|
-
*
|
|
6458
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6459
|
+
* @returns {string} - The font size class name.
|
|
5237
6460
|
* @private
|
|
5238
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5239
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5240
|
-
* @returns {string} - Unique string to be used for naming.
|
|
5241
6461
|
*/
|
|
5242
|
-
|
|
5243
|
-
let result = baseName;
|
|
6462
|
+
getFontSize() {
|
|
5244
6463
|
|
|
5245
|
-
|
|
5246
|
-
|
|
6464
|
+
// Size map for standard buttons
|
|
6465
|
+
const standardButtonSizeMap = {
|
|
6466
|
+
xs: 'body-xs',
|
|
6467
|
+
sm: 'body-sm',
|
|
6468
|
+
md: 'body-default',
|
|
6469
|
+
lg: 'body-lg',
|
|
6470
|
+
xl: 'body-lg'
|
|
6471
|
+
};
|
|
5247
6472
|
|
|
5248
|
-
|
|
6473
|
+
// Size map for icon-only buttons
|
|
6474
|
+
const iconOnlyButtonSizeMap = {
|
|
6475
|
+
xs: 'heading-xs',
|
|
6476
|
+
sm: 'heading-sm',
|
|
6477
|
+
md: 'heading-sm',
|
|
6478
|
+
lg: 'heading-md',
|
|
6479
|
+
xl: 'heading-lg'
|
|
6480
|
+
};
|
|
6481
|
+
|
|
6482
|
+
// Determine which map to use based on the shape
|
|
6483
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6484
|
+
|
|
6485
|
+
// Return the font size based on the button size and shape
|
|
6486
|
+
return sizeMap[this.size] || 'body-default';
|
|
5249
6487
|
}
|
|
5250
6488
|
|
|
5251
6489
|
/**
|
|
5252
|
-
*
|
|
5253
|
-
* @
|
|
5254
|
-
* @
|
|
5255
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6490
|
+
* Renders the default layout for the button.
|
|
6491
|
+
* @returns {TemplateResult}
|
|
6492
|
+
* @private
|
|
5256
6493
|
*/
|
|
5257
|
-
|
|
5258
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5259
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
6494
|
+
renderLayoutDefault() {
|
|
5260
6495
|
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
6496
|
+
const fontSize = this.getFontSize();
|
|
6497
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
6498
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5264
6499
|
|
|
5265
|
-
|
|
6500
|
+
const classes = {
|
|
6501
|
+
"auro-button": true,
|
|
6502
|
+
"inset": this.showText,
|
|
6503
|
+
wrapper: true,
|
|
6504
|
+
loading: this.loading,
|
|
6505
|
+
[`${fontSize}`]: true,
|
|
6506
|
+
|
|
6507
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6508
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6509
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6510
|
+
};
|
|
6511
|
+
|
|
6512
|
+
const contentClasses = {
|
|
6513
|
+
"contentWrapper": true,
|
|
6514
|
+
"util_displayHiddenVisually": this.loading
|
|
6515
|
+
};
|
|
6516
|
+
|
|
6517
|
+
return html`
|
|
6518
|
+
<${tag}
|
|
6519
|
+
part="${part}"
|
|
6520
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6521
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6522
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
6523
|
+
?autofocus="${this.autofocus}"
|
|
6524
|
+
class=${classMap(classes)}
|
|
6525
|
+
?disabled="${this.disabled || this.loading}"
|
|
6526
|
+
?onDark="${this.onDark}"
|
|
6527
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
6528
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
6529
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
6530
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6531
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6532
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6533
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
6534
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
6535
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
6536
|
+
>
|
|
6537
|
+
${ifDefined(this.loading ? html`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6538
|
+
|
|
6539
|
+
<span class="${classMap(contentClasses)}">
|
|
6540
|
+
<span class="textSlot" part="text">
|
|
6541
|
+
<slot></slot>
|
|
6542
|
+
</span>
|
|
6543
|
+
</span>
|
|
6544
|
+
</${tag}>
|
|
6545
|
+
`;
|
|
6546
|
+
}
|
|
6547
|
+
|
|
6548
|
+
/**
|
|
6549
|
+
* Renders the layout of the button.
|
|
6550
|
+
* @returns {TemplateResult}
|
|
6551
|
+
* @private
|
|
6552
|
+
*/
|
|
6553
|
+
renderLayout() {
|
|
6554
|
+
return this.renderLayoutDefault();
|
|
5266
6555
|
}
|
|
5267
6556
|
}
|
|
5268
6557
|
|
|
6558
|
+
var buttonVersion = '11.3.0';
|
|
6559
|
+
|
|
5269
6560
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5270
6561
|
// See LICENSE in the project root for license information.
|
|
5271
6562
|
|
|
@@ -5416,9 +6707,9 @@ class BaseIcon extends AuroElement {
|
|
|
5416
6707
|
}
|
|
5417
6708
|
}
|
|
5418
6709
|
|
|
5419
|
-
var tokensCss$
|
|
6710
|
+
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)}`;
|
|
5420
6711
|
|
|
5421
|
-
var colorCss$
|
|
6712
|
+
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)}`;
|
|
5422
6713
|
|
|
5423
6714
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5424
6715
|
// See LICENSE in the project root for license information.
|
|
@@ -5427,7 +6718,7 @@ var colorCss$2 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5427
6718
|
|
|
5428
6719
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5429
6720
|
|
|
5430
|
-
let AuroLibraryRuntimeUtils$
|
|
6721
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5431
6722
|
|
|
5432
6723
|
/* eslint-disable jsdoc/require-param */
|
|
5433
6724
|
|
|
@@ -5509,7 +6800,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5509
6800
|
*/
|
|
5510
6801
|
privateDefaults() {
|
|
5511
6802
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5512
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6803
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
5513
6804
|
}
|
|
5514
6805
|
|
|
5515
6806
|
// function to define props used within the scope of this component
|
|
@@ -5537,7 +6828,8 @@ class AuroIcon extends BaseIcon {
|
|
|
5537
6828
|
* Allows custom color to be set.
|
|
5538
6829
|
*/
|
|
5539
6830
|
customColor: {
|
|
5540
|
-
type: Boolean
|
|
6831
|
+
type: Boolean,
|
|
6832
|
+
reflect: true
|
|
5541
6833
|
},
|
|
5542
6834
|
|
|
5543
6835
|
/**
|
|
@@ -5576,9 +6868,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5576
6868
|
static get styles() {
|
|
5577
6869
|
return [
|
|
5578
6870
|
super.styles,
|
|
5579
|
-
css`${tokensCss$
|
|
6871
|
+
css`${tokensCss$3}`,
|
|
5580
6872
|
css`${styleCss$1$1}`,
|
|
5581
|
-
css`${colorCss$
|
|
6873
|
+
css`${colorCss$4}`
|
|
5582
6874
|
];
|
|
5583
6875
|
}
|
|
5584
6876
|
|
|
@@ -5591,7 +6883,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5591
6883
|
*
|
|
5592
6884
|
*/
|
|
5593
6885
|
static register(name = "auro-icon") {
|
|
5594
|
-
AuroLibraryRuntimeUtils$
|
|
6886
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroIcon);
|
|
5595
6887
|
}
|
|
5596
6888
|
|
|
5597
6889
|
connectedCallback() {
|
|
@@ -5612,8 +6904,12 @@ class AuroIcon extends BaseIcon {
|
|
|
5612
6904
|
async firstUpdated() {
|
|
5613
6905
|
await super.firstUpdated();
|
|
5614
6906
|
|
|
5615
|
-
|
|
5616
|
-
|
|
6907
|
+
/**
|
|
6908
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6909
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6910
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6911
|
+
*/
|
|
6912
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5617
6913
|
const svgDesc = this.svg.querySelector('desc');
|
|
5618
6914
|
|
|
5619
6915
|
if (svgDesc) {
|
|
@@ -5657,9 +6953,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5657
6953
|
}
|
|
5658
6954
|
}
|
|
5659
6955
|
|
|
5660
|
-
var iconVersion = '8.
|
|
6956
|
+
var iconVersion = '8.1.1';
|
|
5661
6957
|
|
|
5662
|
-
var styleCss$3 = 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)}`;
|
|
6958
|
+
var styleCss$5 = 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)}: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)}`;
|
|
5663
6959
|
|
|
5664
6960
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5665
6961
|
// See LICENSE in the project root for license information.
|
|
@@ -5669,13 +6965,12 @@ var styleCss$3 = css`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-head
|
|
|
5669
6965
|
* The auro-header component is a custom element to make using headers with the Auro Design System seamless and easy.
|
|
5670
6966
|
*
|
|
5671
6967
|
* @attr {Boolean} no-margin-block - if declared, margin-block will be set to `0`
|
|
5672
|
-
* @attr {String} level - Determines heading level for HTML element. Options are `1` - `6`
|
|
5673
|
-
* @attr {String} display - Determines presentation of header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
5674
6968
|
* @attr {String} color - Allows user to pass in CSS custom property or direct hex value to change the color of the header
|
|
6969
|
+
* @attr {String} display - Determines the visual appearance of the header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
6970
|
+
* @attr {String} level - Determines the semantic heading level of the HTML element. Options are `1` - `6`
|
|
5675
6971
|
* @attr {String} margin - Specify the margin(s) to be altered. Options are `top`, `bottom`, or `both`.
|
|
5676
6972
|
* @attr {String} size - Specify size of margin adjustment, either `none`, `25`, `50`, `100`, `150`, `200`, `300`, `400`, `600` or `800`.
|
|
5677
6973
|
*/
|
|
5678
|
-
|
|
5679
6974
|
/* eslint complexity: ["error", 21] */
|
|
5680
6975
|
|
|
5681
6976
|
// build the component class
|
|
@@ -5688,7 +6983,7 @@ class AuroHeader extends LitElement {
|
|
|
5688
6983
|
/**
|
|
5689
6984
|
* @private
|
|
5690
6985
|
*/
|
|
5691
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6986
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5692
6987
|
}
|
|
5693
6988
|
|
|
5694
6989
|
// function to define props used within the scope of this component
|
|
@@ -5706,7 +7001,23 @@ class AuroHeader extends LitElement {
|
|
|
5706
7001
|
}
|
|
5707
7002
|
|
|
5708
7003
|
static get styles() {
|
|
5709
|
-
return [styleCss$
|
|
7004
|
+
return [styleCss$5];
|
|
7005
|
+
}
|
|
7006
|
+
|
|
7007
|
+
/**
|
|
7008
|
+
* Mapping of display values to their corresponding CSS classes
|
|
7009
|
+
* @private
|
|
7010
|
+
*/
|
|
7011
|
+
static get displayClassMap() {
|
|
7012
|
+
return {
|
|
7013
|
+
'display': 'heading-xl',
|
|
7014
|
+
'800': 'heading-xl',
|
|
7015
|
+
'700': 'heading-lg',
|
|
7016
|
+
'600': 'heading-md',
|
|
7017
|
+
'500': 'heading-sm',
|
|
7018
|
+
'400': 'heading-xs',
|
|
7019
|
+
'300': 'heading-2xs'
|
|
7020
|
+
};
|
|
5710
7021
|
}
|
|
5711
7022
|
|
|
5712
7023
|
/**
|
|
@@ -5718,7 +7029,7 @@ class AuroHeader extends LitElement {
|
|
|
5718
7029
|
*
|
|
5719
7030
|
*/
|
|
5720
7031
|
static register(name = "auro-header") {
|
|
5721
|
-
AuroLibraryRuntimeUtils$
|
|
7032
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroHeader);
|
|
5722
7033
|
}
|
|
5723
7034
|
|
|
5724
7035
|
firstUpdated() {
|
|
@@ -5785,23 +7096,42 @@ class AuroHeader extends LitElement {
|
|
|
5785
7096
|
this.display = 'display';
|
|
5786
7097
|
}
|
|
5787
7098
|
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
7099
|
+
const headingLevel = level || '1';
|
|
7100
|
+
const spacingClasses = this.spacingDecision(this.size);
|
|
7101
|
+
|
|
7102
|
+
// Get the CSS class based on the display prop
|
|
7103
|
+
const headingClass = AuroHeader.displayClassMap[this.display];
|
|
7104
|
+
|
|
7105
|
+
const classObject = {
|
|
7106
|
+
'heading': true,
|
|
7107
|
+
[`heading--${this.display}`]: true,
|
|
7108
|
+
[headingClass]: true
|
|
7109
|
+
};
|
|
7110
|
+
|
|
7111
|
+
// Add spacing classes to the class object if they exist
|
|
7112
|
+
if (spacingClasses) {
|
|
7113
|
+
const spacingClassArray = spacingClasses.split(' ');
|
|
7114
|
+
spacingClassArray.forEach(cls => {
|
|
7115
|
+
if (cls.trim()) {
|
|
7116
|
+
classObject[cls.trim()] = true;
|
|
7117
|
+
}
|
|
7118
|
+
});
|
|
5795
7119
|
}
|
|
7120
|
+
|
|
7121
|
+
const headerClasses = classMap(classObject);
|
|
7122
|
+
|
|
7123
|
+
// unsafeStatic dynamically creates tag names at runtime
|
|
7124
|
+
const tag = unsafeStatic(`h${headingLevel}`);
|
|
7125
|
+
return html`<${tag} class="${headerClasses}" style="color: ${ifDefined(this.color ? this.color : undefined)}"><slot></slot></${tag}>`;
|
|
5796
7126
|
}
|
|
7127
|
+
|
|
5797
7128
|
// function that renders the HTML and CSS into the scope of the component
|
|
5798
|
-
|
|
5799
7129
|
render() {
|
|
5800
7130
|
return this.template(this.level);
|
|
5801
7131
|
}
|
|
5802
7132
|
}
|
|
5803
7133
|
|
|
5804
|
-
var headerVersion = '4.0.
|
|
7134
|
+
var headerVersion = '4.0.2';
|
|
5805
7135
|
|
|
5806
7136
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5807
7137
|
// See LICENSE in the project root for license information.
|
|
@@ -5814,17 +7144,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
5814
7144
|
|
|
5815
7145
|
this.large = false;
|
|
5816
7146
|
|
|
5817
|
-
AuroLibraryRuntimeUtils$
|
|
7147
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5818
7148
|
|
|
5819
7149
|
const versioning = new AuroDependencyVersioning();
|
|
7150
|
+
|
|
7151
|
+
/**
|
|
7152
|
+
* @private
|
|
7153
|
+
*/
|
|
5820
7154
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
7155
|
+
|
|
7156
|
+
/**
|
|
7157
|
+
* @private
|
|
7158
|
+
*/
|
|
5821
7159
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7160
|
+
|
|
7161
|
+
/**
|
|
7162
|
+
* @private
|
|
7163
|
+
*/
|
|
7164
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5822
7165
|
}
|
|
5823
7166
|
|
|
5824
7167
|
static get styles() {
|
|
5825
7168
|
return [
|
|
5826
|
-
colorCss$
|
|
5827
|
-
styleCss$
|
|
7169
|
+
colorCss$3,
|
|
7170
|
+
styleCss$4,
|
|
5828
7171
|
tokenCss
|
|
5829
7172
|
];
|
|
5830
7173
|
}
|
|
@@ -5853,7 +7196,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5853
7196
|
*
|
|
5854
7197
|
*/
|
|
5855
7198
|
static register(name = "auro-bibtemplate") {
|
|
5856
|
-
AuroLibraryRuntimeUtils$
|
|
7199
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
5857
7200
|
}
|
|
5858
7201
|
|
|
5859
7202
|
/**
|
|
@@ -5911,13 +7254,16 @@ class AuroBibtemplate extends LitElement {
|
|
|
5911
7254
|
<div id="bibTemplate" part="bibtemplate">
|
|
5912
7255
|
${this.isFullscreen ? html`
|
|
5913
7256
|
<div id="headerContainer">
|
|
5914
|
-
<
|
|
5915
|
-
<${this.
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
7257
|
+
<div class="titleRow">
|
|
7258
|
+
<${this.headerTag} class="header" display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7259
|
+
<slot name="header"></slot>
|
|
7260
|
+
</${this.headerTag}>
|
|
7261
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7262
|
+
<span><slot name="ariaLabel.close">Close</slot></span>
|
|
7263
|
+
<${this.iconTag} aria-hidden="true" category="interface" name="x-lg"></${this.iconTag}>
|
|
7264
|
+
</${this.buttonTag}>
|
|
7265
|
+
</div>
|
|
7266
|
+
<span class="subheader">
|
|
5921
7267
|
<slot name="subheader"></slot>
|
|
5922
7268
|
</span>
|
|
5923
7269
|
</div>` : null}
|
|
@@ -5939,7 +7285,7 @@ var bibTemplateVersion = '1.0.0';
|
|
|
5939
7285
|
|
|
5940
7286
|
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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
5941
7287
|
|
|
5942
|
-
var styleCss$1 = css`.
|
|
7288
|
+
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}`;
|
|
5943
7289
|
|
|
5944
7290
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5945
7291
|
|
|
@@ -6019,8 +7365,6 @@ class AuroLibraryRuntimeUtils {
|
|
|
6019
7365
|
|
|
6020
7366
|
/**
|
|
6021
7367
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6022
|
-
*
|
|
6023
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6024
7368
|
*/
|
|
6025
7369
|
class AuroHelpText extends LitElement {
|
|
6026
7370
|
|
|
@@ -6136,7 +7480,7 @@ class AuroHelpText extends LitElement {
|
|
|
6136
7480
|
// function that renders the HTML and CSS into the scope of the component
|
|
6137
7481
|
render() {
|
|
6138
7482
|
return html$1`
|
|
6139
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
7483
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
6140
7484
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6141
7485
|
</div>
|
|
6142
7486
|
`;
|
|
@@ -6145,68 +7489,7 @@ class AuroHelpText extends LitElement {
|
|
|
6145
7489
|
|
|
6146
7490
|
var helpTextVersion = '1.0.0';
|
|
6147
7491
|
|
|
6148
|
-
css`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
|
|
6149
|
-
|
|
6150
|
-
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)}`;
|
|
6151
|
-
|
|
6152
|
-
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)}`;
|
|
6153
|
-
|
|
6154
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6155
|
-
// See LICENSE in the project root for license information.
|
|
6156
|
-
|
|
6157
|
-
// ---------------------------------------------------------------------
|
|
6158
|
-
|
|
6159
|
-
/**
|
|
6160
|
-
* Converts value to an array.
|
|
6161
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6162
|
-
* If the value is already an array, it is returned.
|
|
6163
|
-
* If the value is undefined, it returns undefined.
|
|
6164
|
-
* @private
|
|
6165
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6166
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6167
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6168
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6169
|
-
*/
|
|
6170
|
-
function arrayConverter(value) {
|
|
6171
|
-
// Allow undefined
|
|
6172
|
-
if (value === undefined) {
|
|
6173
|
-
return undefined;
|
|
6174
|
-
}
|
|
6175
|
-
|
|
6176
|
-
// Return the value if it is already an array
|
|
6177
|
-
if (Array.isArray(value)) {
|
|
6178
|
-
return value;
|
|
6179
|
-
}
|
|
6180
|
-
|
|
6181
|
-
try {
|
|
6182
|
-
// If value is a JSON string, parse it
|
|
6183
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6184
|
-
|
|
6185
|
-
// Check if the parsed value is an array
|
|
6186
|
-
if (Array.isArray(parsed)) {
|
|
6187
|
-
return parsed;
|
|
6188
|
-
}
|
|
6189
|
-
} catch (error) {
|
|
6190
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6191
|
-
/* eslint-disable no-console */
|
|
6192
|
-
console.error('JSON parsing failed:', error);
|
|
6193
|
-
}
|
|
6194
|
-
|
|
6195
|
-
// Throw error if the input is not an array or undefined
|
|
6196
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6197
|
-
}
|
|
6198
|
-
|
|
6199
|
-
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}`;
|
|
6200
|
-
|
|
6201
|
-
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)}`;
|
|
6202
|
-
|
|
6203
|
-
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}`;
|
|
6204
|
-
|
|
6205
|
-
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)}`;
|
|
6206
|
-
|
|
6207
|
-
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)}`;
|
|
6208
|
-
|
|
6209
|
-
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: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:8px}.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;padding:0 8px 0 24px}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;width:100%;align-items:center;justify-content:center;padding:0 8px 0 24px}.layout-classic .triggerContent{display:flex;width:100%;align-items:center;justify-content:center;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}`;
|
|
7492
|
+
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}.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}[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*=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;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}: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([fluid]){width:100%}: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}`;
|
|
6210
7493
|
|
|
6211
7494
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6212
7495
|
// See LICENSE in the project root for license information.
|
|
@@ -6217,14 +7500,20 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
|
|
|
6217
7500
|
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
6218
7501
|
*
|
|
6219
7502
|
* @slot - Default slot for the menu content.
|
|
7503
|
+
* @slot ariaLabel.bib.close - Sets aria-label on close button in fullscreen bib
|
|
6220
7504
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6221
7505
|
* @slot label - Defines the content of the label.
|
|
7506
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6222
7507
|
* @slot helpText - Defines the content of the helpText.
|
|
6223
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6224
7508
|
* @slot valueText - Dropdown value text display.
|
|
7509
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6225
7510
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6226
7511
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6227
7512
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
7513
|
+
*
|
|
7514
|
+
* @csspart dropdownTrigger - Apply CSS to the trigger content container.
|
|
7515
|
+
* @csspart dropdownChevron - Apply CSS to the collapsed/expanded state icon container.
|
|
7516
|
+
* @csspart dropdownSize - Apply size styles to the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
6228
7517
|
* @csspart helpText - Apply CSS to the help text.
|
|
6229
7518
|
*/
|
|
6230
7519
|
|
|
@@ -6239,12 +7528,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6239
7528
|
const idSubstrEnd = 8;
|
|
6240
7529
|
const idSubstrStart = 2;
|
|
6241
7530
|
|
|
6242
|
-
this.matchWidth =
|
|
6243
|
-
|
|
6244
|
-
// Layout Config
|
|
6245
|
-
this.layout = 'classic';
|
|
6246
|
-
this.shape = 'classic';
|
|
6247
|
-
this.size = 'xl';
|
|
7531
|
+
this.matchWidth = false;
|
|
6248
7532
|
|
|
6249
7533
|
// floaterConfig
|
|
6250
7534
|
this.placement = 'bottom-start';
|
|
@@ -6269,7 +7553,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6269
7553
|
/**
|
|
6270
7554
|
* @private
|
|
6271
7555
|
*/
|
|
6272
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7556
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
6273
7557
|
|
|
6274
7558
|
/**
|
|
6275
7559
|
* Generate unique names for dependency components.
|
|
@@ -6319,6 +7603,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6319
7603
|
this.fullscreenBreakpoint = 'sm';
|
|
6320
7604
|
this.onDark = false;
|
|
6321
7605
|
this.isPopoverVisible = false;
|
|
7606
|
+
|
|
7607
|
+
// Layout Config
|
|
7608
|
+
this.layout = 'classic';
|
|
7609
|
+
this.shape = 'classic';
|
|
7610
|
+
this.size = 'lg';
|
|
6322
7611
|
}
|
|
6323
7612
|
|
|
6324
7613
|
// This function is to define props used within the scope of this component
|
|
@@ -6360,6 +7649,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6360
7649
|
reflect: true
|
|
6361
7650
|
},
|
|
6362
7651
|
|
|
7652
|
+
/**
|
|
7653
|
+
* When attribute is present, element will be 100% width of container element.
|
|
7654
|
+
*/
|
|
7655
|
+
fluid: {
|
|
7656
|
+
type: Boolean,
|
|
7657
|
+
reflect: true
|
|
7658
|
+
},
|
|
7659
|
+
|
|
6363
7660
|
/**
|
|
6364
7661
|
* @private
|
|
6365
7662
|
*/
|
|
@@ -6384,14 +7681,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6384
7681
|
reflect: true
|
|
6385
7682
|
},
|
|
6386
7683
|
|
|
6387
|
-
/**
|
|
6388
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6389
|
-
*/
|
|
6390
|
-
flexMenuWidth: {
|
|
6391
|
-
type: Boolean,
|
|
6392
|
-
reflect: true
|
|
6393
|
-
},
|
|
6394
|
-
|
|
6395
7684
|
/**
|
|
6396
7685
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6397
7686
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6485,7 +7774,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6485
7774
|
* "top" | "right" | "bottom" | "left" |
|
|
6486
7775
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6487
7776
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6488
|
-
* "left-start" | "left-end"
|
|
7777
|
+
* "left-start" | "left-end".
|
|
6489
7778
|
* @default bottom-start
|
|
6490
7779
|
*/
|
|
6491
7780
|
placement: {
|
|
@@ -6493,6 +7782,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6493
7782
|
reflect: true
|
|
6494
7783
|
},
|
|
6495
7784
|
|
|
7785
|
+
/**
|
|
7786
|
+
* Define custom placeholder text.
|
|
7787
|
+
*/
|
|
7788
|
+
placeholder: {
|
|
7789
|
+
type: String,
|
|
7790
|
+
reflect: true
|
|
7791
|
+
},
|
|
7792
|
+
|
|
6496
7793
|
/**
|
|
6497
7794
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6498
7795
|
*/
|
|
@@ -6539,11 +7836,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6539
7836
|
},
|
|
6540
7837
|
|
|
6541
7838
|
/**
|
|
6542
|
-
* Value selected for the component.
|
|
6543
|
-
* @type {String|Array<String>}
|
|
7839
|
+
* Value selected for the component.
|
|
6544
7840
|
*/
|
|
6545
7841
|
value: {
|
|
6546
|
-
type:
|
|
7842
|
+
type: String,
|
|
7843
|
+
reflect: true,
|
|
7844
|
+
attribute: 'value'
|
|
6547
7845
|
},
|
|
6548
7846
|
|
|
6549
7847
|
/**
|
|
@@ -6590,20 +7888,82 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6590
7888
|
static get styles() {
|
|
6591
7889
|
return [
|
|
6592
7890
|
css`${shapeSizeCss$1}`,
|
|
6593
|
-
css`${tokensCss$
|
|
7891
|
+
css`${tokensCss$5}`,
|
|
6594
7892
|
css`${styleCss}`,
|
|
6595
7893
|
];
|
|
6596
7894
|
}
|
|
6597
7895
|
|
|
6598
7896
|
/**
|
|
6599
|
-
*
|
|
7897
|
+
* Formatted value based on `multiSelect` state.
|
|
7898
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
6600
7899
|
* @private
|
|
6601
|
-
* @returns {
|
|
7900
|
+
* @returns {String|Array<String>}
|
|
6602
7901
|
*/
|
|
6603
|
-
get
|
|
6604
|
-
|
|
6605
|
-
|
|
7902
|
+
get formattedValue() {
|
|
7903
|
+
if (this.multiSelect) {
|
|
7904
|
+
if (!this.value) {
|
|
7905
|
+
return undefined;
|
|
7906
|
+
}
|
|
7907
|
+
if (this.value.startsWith("[")) {
|
|
7908
|
+
return JSON.parse(this.value);
|
|
7909
|
+
}
|
|
7910
|
+
return [this.value];
|
|
7911
|
+
}
|
|
7912
|
+
return this.value;
|
|
7913
|
+
}
|
|
7914
|
+
|
|
7915
|
+
/**
|
|
7916
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7917
|
+
* @private
|
|
7918
|
+
* @returns {Record<string, boolean>}
|
|
7919
|
+
*/
|
|
7920
|
+
get commonLabelClasses() {
|
|
7921
|
+
const obj = {
|
|
7922
|
+
'is-disabled': this.disabled,
|
|
7923
|
+
'withValue': false,
|
|
7924
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0,
|
|
7925
|
+
[this.labelFontClass]: true
|
|
6606
7926
|
};
|
|
7927
|
+
|
|
7928
|
+
if (this.placeholder) {
|
|
7929
|
+
obj.withValue = true;
|
|
7930
|
+
} else if (this.optionSelected) {
|
|
7931
|
+
if (Array.isArray(this.optionSelected)) {
|
|
7932
|
+
obj.withValue = this.optionSelected.length > 0;
|
|
7933
|
+
} else {
|
|
7934
|
+
obj.withValue = true;
|
|
7935
|
+
}
|
|
7936
|
+
}
|
|
7937
|
+
return obj;
|
|
7938
|
+
}
|
|
7939
|
+
|
|
7940
|
+
/**
|
|
7941
|
+
* Returns the label font class based on layout and selection state.
|
|
7942
|
+
* @private
|
|
7943
|
+
* @returns {string} - The font class for the label.
|
|
7944
|
+
*/
|
|
7945
|
+
get labelFontClass() {
|
|
7946
|
+
const isSelected = this.hasValue;
|
|
7947
|
+
|
|
7948
|
+
if (this.layout.startsWith('emphasized')) {
|
|
7949
|
+
return isSelected ? 'body-sm' : 'accent-xl';
|
|
7950
|
+
}
|
|
7951
|
+
|
|
7952
|
+
if (this.layout === 'snowflake') {
|
|
7953
|
+
return isSelected ? 'body-xs' : 'body-lg';
|
|
7954
|
+
}
|
|
7955
|
+
|
|
7956
|
+
// classic layout (default)
|
|
7957
|
+
return isSelected ? 'body-xs' : 'body-default';
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7960
|
+
/**
|
|
7961
|
+
* Whether or not the component has a value.
|
|
7962
|
+
* @returns {boolean} - Returns true if the component has a value or placeholder.
|
|
7963
|
+
* @private
|
|
7964
|
+
*/
|
|
7965
|
+
get hasValue() {
|
|
7966
|
+
return this.placeholder || (this.value && this.value.length > 0); // eslint-disable-line no-extra-parens
|
|
6607
7967
|
}
|
|
6608
7968
|
|
|
6609
7969
|
/**
|
|
@@ -6616,6 +7976,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6616
7976
|
|
|
6617
7977
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6618
7978
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
7979
|
+
|
|
7980
|
+
if (this.dropdown.isPopoverVisible) {
|
|
7981
|
+
this.updateMenuShapeSize();
|
|
7982
|
+
// wait til the bib gets fully rendered
|
|
7983
|
+
setTimeout(() => {
|
|
7984
|
+
if (this.dropdown.isBibFullscreen) {
|
|
7985
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
7986
|
+
this.dropdown.trigger.focus();
|
|
7987
|
+
|
|
7988
|
+
// default focus indicator on the first menu option
|
|
7989
|
+
if (this.menu.index < 0) {
|
|
7990
|
+
this.menu.navigateOptions('down');
|
|
7991
|
+
}
|
|
7992
|
+
}
|
|
7993
|
+
});
|
|
7994
|
+
}
|
|
7995
|
+
});
|
|
7996
|
+
|
|
7997
|
+
this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
|
|
7998
|
+
this.updateMenuShapeSize();
|
|
6619
7999
|
});
|
|
6620
8000
|
|
|
6621
8001
|
// setting up bibtemplate
|
|
@@ -6638,7 +8018,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6638
8018
|
*
|
|
6639
8019
|
*/
|
|
6640
8020
|
static register(name = "auro-select") {
|
|
6641
|
-
AuroLibraryRuntimeUtils$
|
|
8021
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroSelect);
|
|
6642
8022
|
}
|
|
6643
8023
|
|
|
6644
8024
|
/**
|
|
@@ -6682,6 +8062,30 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6682
8062
|
this.dropdown.requestUpdate();
|
|
6683
8063
|
}
|
|
6684
8064
|
|
|
8065
|
+
/**
|
|
8066
|
+
* Update menu to default for fullscreen bib, otherwise to this.size and this.shape.
|
|
8067
|
+
* @private
|
|
8068
|
+
*/
|
|
8069
|
+
updateMenuShapeSize() {
|
|
8070
|
+
if (!this.menu) {
|
|
8071
|
+
return;
|
|
8072
|
+
}
|
|
8073
|
+
|
|
8074
|
+
if (this.dropdown && this.dropdown.isBibFullscreen) {
|
|
8075
|
+
this.menu.setAttribute('size', 'md');
|
|
8076
|
+
this.menu.setAttribute('shape', 'box');
|
|
8077
|
+
} else {
|
|
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
|
+
}
|
|
8087
|
+
}
|
|
8088
|
+
|
|
6685
8089
|
/**
|
|
6686
8090
|
* Binds all behavior needed to the menu after rendering.
|
|
6687
8091
|
* @private
|
|
@@ -6698,6 +8102,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6698
8102
|
return;
|
|
6699
8103
|
}
|
|
6700
8104
|
|
|
8105
|
+
this.updateMenuShapeSize();
|
|
8106
|
+
|
|
6701
8107
|
if (this.multiSelect) {
|
|
6702
8108
|
this.menu.multiSelect = this.multiSelect;
|
|
6703
8109
|
}
|
|
@@ -6735,7 +8141,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6735
8141
|
|
|
6736
8142
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
6737
8143
|
this.optionSelected = this.menu.optionSelected;
|
|
6738
|
-
this.
|
|
8144
|
+
this.validate(this);
|
|
6739
8145
|
});
|
|
6740
8146
|
|
|
6741
8147
|
this.menu.addEventListener('auroMenu-activatedOption', (evt) => {
|
|
@@ -6757,46 +8163,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6757
8163
|
configureSelect() {
|
|
6758
8164
|
|
|
6759
8165
|
this.addEventListener('keydown', (evt) => {
|
|
6760
|
-
|
|
6761
|
-
|
|
8166
|
+
// when the focus is on trigger not on close button
|
|
8167
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8168
|
+
if (evt.key === 'ArrowUp') {
|
|
8169
|
+
evt.preventDefault();
|
|
6762
8170
|
|
|
6763
|
-
|
|
8171
|
+
this.dropdown.show();
|
|
8172
|
+
|
|
8173
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8174
|
+
this.menu.navigateOptions('up');
|
|
8175
|
+
}
|
|
6764
8176
|
|
|
6765
|
-
|
|
6766
|
-
this.menu.navigateOptions('up');
|
|
8177
|
+
return;
|
|
6767
8178
|
}
|
|
6768
8179
|
|
|
6769
|
-
|
|
6770
|
-
|
|
8180
|
+
if (evt.key === 'ArrowDown') {
|
|
8181
|
+
evt.preventDefault();
|
|
6771
8182
|
|
|
6772
|
-
|
|
6773
|
-
evt.preventDefault();
|
|
8183
|
+
this.dropdown.show();
|
|
6774
8184
|
|
|
6775
|
-
|
|
8185
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8186
|
+
this.menu.navigateOptions('down');
|
|
8187
|
+
}
|
|
6776
8188
|
|
|
6777
|
-
|
|
6778
|
-
this.menu.navigateOptions('down');
|
|
8189
|
+
return;
|
|
6779
8190
|
}
|
|
6780
8191
|
|
|
6781
|
-
|
|
6782
|
-
|
|
8192
|
+
if (evt.key === 'Enter') {
|
|
8193
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8194
|
+
evt.preventDefault();
|
|
8195
|
+
this.menu.makeSelection();
|
|
8196
|
+
}
|
|
6783
8197
|
|
|
6784
|
-
|
|
6785
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6786
|
-
evt.preventDefault();
|
|
6787
|
-
this.menu.makeSelection();
|
|
8198
|
+
return;
|
|
6788
8199
|
}
|
|
6789
|
-
|
|
6790
|
-
return;
|
|
6791
8200
|
}
|
|
6792
8201
|
|
|
6793
|
-
if (evt.key === 'Tab') {
|
|
8202
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6794
8203
|
if (this.dropdown.isBibFullscreen) {
|
|
6795
8204
|
evt.preventDefault();
|
|
8205
|
+
|
|
8206
|
+
// when the focus is on trigger not on close button
|
|
8207
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8208
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8209
|
+
// when bib it not open, it will focus onto trigger.
|
|
8210
|
+
this.dropdown.focus();
|
|
8211
|
+
} else {
|
|
8212
|
+
// when close button has the focus, move focus back to the trigger
|
|
8213
|
+
this.dropdown.trigger.focus();
|
|
8214
|
+
}
|
|
6796
8215
|
} else {
|
|
6797
8216
|
this.dropdown.hide();
|
|
6798
8217
|
}
|
|
6799
|
-
|
|
6800
8218
|
return;
|
|
6801
8219
|
}
|
|
6802
8220
|
|
|
@@ -6807,7 +8225,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6807
8225
|
this.addEventListener('focusin', this.handleFocusin);
|
|
6808
8226
|
|
|
6809
8227
|
this.addEventListener('blur', () => {
|
|
6810
|
-
this.
|
|
8228
|
+
this.validate();
|
|
6811
8229
|
this.hasFocus = false;
|
|
6812
8230
|
});
|
|
6813
8231
|
}
|
|
@@ -6877,6 +8295,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6877
8295
|
}
|
|
6878
8296
|
}
|
|
6879
8297
|
|
|
8298
|
+
/**
|
|
8299
|
+
* Hides the dropdown bib if its open.
|
|
8300
|
+
* @returns {void}
|
|
8301
|
+
*/
|
|
8302
|
+
hideBib() {
|
|
8303
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8304
|
+
this.dropdown.hide();
|
|
8305
|
+
}
|
|
8306
|
+
}
|
|
8307
|
+
|
|
8308
|
+
/**
|
|
8309
|
+
* Shows the dropdown bib if there are options to show.
|
|
8310
|
+
* @returns {void}
|
|
8311
|
+
*/
|
|
8312
|
+
showBib() {
|
|
8313
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8314
|
+
this.dropdown.show();
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8317
|
+
|
|
6880
8318
|
/**
|
|
6881
8319
|
* Function to support @focusin event.
|
|
6882
8320
|
* @private
|
|
@@ -6961,38 +8399,47 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6961
8399
|
// Add the tag name as an attribute if it is different than the component name
|
|
6962
8400
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
6963
8401
|
|
|
6964
|
-
this.configureMenu();
|
|
6965
8402
|
this.configureDropdown();
|
|
8403
|
+
this.configureMenu();
|
|
6966
8404
|
this.configureSelect();
|
|
8405
|
+
}
|
|
6967
8406
|
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
8407
|
+
/**
|
|
8408
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8409
|
+
* @param {string} value - The value to set in the menu.
|
|
8410
|
+
* @returns {void}
|
|
8411
|
+
* @private
|
|
8412
|
+
*/
|
|
8413
|
+
async updateMenuValue(value) {
|
|
8414
|
+
if (!this.menu) return;
|
|
8415
|
+
|
|
8416
|
+
this.menu.setAttribute('value', value);
|
|
8417
|
+
if (value) {
|
|
8418
|
+
this.menu.value = value;
|
|
8419
|
+
} else {
|
|
8420
|
+
this.menu.reset();
|
|
6972
8421
|
}
|
|
8422
|
+
await this.menu.updateComplete;
|
|
6973
8423
|
}
|
|
6974
8424
|
|
|
6975
8425
|
async updated(changedProperties) {
|
|
6976
|
-
if (changedProperties.has('multiSelect')) {
|
|
8426
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
6977
8427
|
this.clearSelection();
|
|
6978
8428
|
}
|
|
6979
8429
|
|
|
6980
8430
|
if (changedProperties.has('value')) {
|
|
6981
8431
|
if (this.value) {
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
this.menu.value = this.value;
|
|
8432
|
+
await this.updateMenuValue(this.value);
|
|
6985
8433
|
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8434
|
+
if (this.menu) {
|
|
8435
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8436
|
+
}
|
|
6990
8437
|
} else {
|
|
6991
|
-
this.
|
|
8438
|
+
await this.updateMenuValue(undefined);
|
|
6992
8439
|
}
|
|
6993
8440
|
|
|
6994
8441
|
this._updateNativeSelect();
|
|
6995
|
-
this.
|
|
8442
|
+
this.validate();
|
|
6996
8443
|
|
|
6997
8444
|
// LEGACY EVENT
|
|
6998
8445
|
this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
|
|
@@ -7007,7 +8454,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7007
8454
|
composed: true,
|
|
7008
8455
|
detail: {
|
|
7009
8456
|
optionSelected: this.optionSelected,
|
|
7010
|
-
value: this.
|
|
8457
|
+
value: this.formattedValue
|
|
7011
8458
|
}
|
|
7012
8459
|
}));
|
|
7013
8460
|
}
|
|
@@ -7019,6 +8466,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7019
8466
|
if (changedProperties.has('error')) {
|
|
7020
8467
|
this.validate(true);
|
|
7021
8468
|
}
|
|
8469
|
+
|
|
8470
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8471
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8472
|
+
}
|
|
8473
|
+
|
|
8474
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8475
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8476
|
+
}
|
|
7022
8477
|
}
|
|
7023
8478
|
|
|
7024
8479
|
/**
|
|
@@ -7029,16 +8484,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7029
8484
|
this.validation.reset(this);
|
|
7030
8485
|
}
|
|
7031
8486
|
|
|
7032
|
-
/**
|
|
7033
|
-
* Hide dropdownbib.
|
|
7034
|
-
* @private
|
|
7035
|
-
*/
|
|
7036
|
-
hideBib() {
|
|
7037
|
-
if (this.dropdown) {
|
|
7038
|
-
this.dropdown.hide();
|
|
7039
|
-
}
|
|
7040
|
-
}
|
|
7041
|
-
|
|
7042
8487
|
/**
|
|
7043
8488
|
* Validates value.
|
|
7044
8489
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7058,13 +8503,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7058
8503
|
const selectedValue = selectedOption.value;
|
|
7059
8504
|
|
|
7060
8505
|
if (this.multiSelect) {
|
|
7061
|
-
const currentArray =
|
|
8506
|
+
const currentArray = this.formattedValue;
|
|
7062
8507
|
|
|
7063
8508
|
if (!currentArray.includes(selectedValue)) {
|
|
7064
|
-
this.value = [
|
|
8509
|
+
this.value = JSON.stringify([
|
|
7065
8510
|
...currentArray,
|
|
7066
8511
|
selectedValue
|
|
7067
|
-
];
|
|
8512
|
+
]);
|
|
7068
8513
|
}
|
|
7069
8514
|
} else {
|
|
7070
8515
|
const currentValue = this.value;
|
|
@@ -7087,12 +8532,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7087
8532
|
}
|
|
7088
8533
|
|
|
7089
8534
|
if (this.multiSelect) {
|
|
7090
|
-
nativeSelect.value = this.
|
|
8535
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7091
8536
|
} else {
|
|
7092
8537
|
nativeSelect.value = this.value || '';
|
|
7093
8538
|
}
|
|
7094
8539
|
}
|
|
7095
8540
|
|
|
8541
|
+
/**
|
|
8542
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8543
|
+
* @private
|
|
8544
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8545
|
+
*/
|
|
7096
8546
|
renderAriaHtml() {
|
|
7097
8547
|
return html`
|
|
7098
8548
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7113,10 +8563,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7113
8563
|
`;
|
|
7114
8564
|
}
|
|
7115
8565
|
|
|
8566
|
+
/**
|
|
8567
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8568
|
+
* @private
|
|
8569
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8570
|
+
*/
|
|
7116
8571
|
renderNativeSelect() {
|
|
7117
8572
|
return html`
|
|
7118
|
-
<div class="nativeSelectWrapper">
|
|
7119
|
-
<select
|
|
8573
|
+
<div class="nativeSelectWrapper util_displayHiddenVisually">
|
|
8574
|
+
<select
|
|
7120
8575
|
tabindex="-1"
|
|
7121
8576
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7122
8577
|
name="${this.name || ''}"
|
|
@@ -7129,8 +8584,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7129
8584
|
${this.options.map((option) => {
|
|
7130
8585
|
const optionValue = option.value || option.textContent;
|
|
7131
8586
|
return html`
|
|
7132
|
-
<option
|
|
7133
|
-
value="${optionValue}"
|
|
8587
|
+
<option
|
|
8588
|
+
value="${optionValue}"
|
|
7134
8589
|
?selected="${this.value === optionValue}">
|
|
7135
8590
|
${option.textContent}
|
|
7136
8591
|
</option>
|
|
@@ -7152,14 +8607,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7152
8607
|
? html`
|
|
7153
8608
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7154
8609
|
<p id="${this.uniqueId}" part="helpText">
|
|
7155
|
-
<slot name="
|
|
8610
|
+
<slot name="helpText"></slot>
|
|
7156
8611
|
</p>
|
|
7157
8612
|
</${this.helpTextTag}>
|
|
7158
8613
|
`
|
|
7159
8614
|
: html`
|
|
7160
8615
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7161
8616
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7162
|
-
|
|
8617
|
+
${this.errorMessage}
|
|
7163
8618
|
</p>
|
|
7164
8619
|
</${this.helpTextTag}>
|
|
7165
8620
|
`
|
|
@@ -7174,14 +8629,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7174
8629
|
*/
|
|
7175
8630
|
renderLayoutEmphasized() {
|
|
7176
8631
|
const placeholderClass = {
|
|
7177
|
-
|
|
8632
|
+
'util_displayHidden': this.value
|
|
7178
8633
|
};
|
|
7179
8634
|
|
|
7180
8635
|
const displayValueClasses = {
|
|
7181
8636
|
'displayValue': true,
|
|
7182
8637
|
'hasContent': this.hasDisplayValueContent,
|
|
7183
8638
|
'hasFocus': this.isPopoverVisible,
|
|
7184
|
-
'withValue': this.
|
|
8639
|
+
'withValue': this.commonLabelClasses.withValue,
|
|
7185
8640
|
'force': this.forceDisplayValue,
|
|
7186
8641
|
};
|
|
7187
8642
|
|
|
@@ -7192,22 +8647,21 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7192
8647
|
|
|
7193
8648
|
return html`
|
|
7194
8649
|
<div
|
|
7195
|
-
class="${classMap(this.commonWrapperClasses)}"
|
|
7196
8650
|
part="wrapper">
|
|
7197
8651
|
<div id="slotHolder" aria-hidden="true">
|
|
7198
8652
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7199
8653
|
</div>
|
|
7200
8654
|
<${this.dropdownTag}
|
|
8655
|
+
a11yRole="select"
|
|
7201
8656
|
?autoPlacement="${this.autoPlacement}"
|
|
7202
8657
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7203
|
-
?matchWidth="${
|
|
8658
|
+
?matchWidth="${this.matchWidth}"
|
|
7204
8659
|
?noFlip="${this.noFlip}"
|
|
7205
8660
|
?onDark="${this.onDark}"
|
|
7206
8661
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7207
8662
|
.offset="${this.offset}"
|
|
7208
8663
|
.placement="${this.placement}"
|
|
7209
8664
|
chevron
|
|
7210
|
-
fluid
|
|
7211
8665
|
for="selectMenu"
|
|
7212
8666
|
layout="${this.layout}"
|
|
7213
8667
|
part="dropdown"
|
|
@@ -7219,15 +8673,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7219
8673
|
</div>
|
|
7220
8674
|
<div class="mainContent">
|
|
7221
8675
|
<div class="${classMap(valueContainerClasses)}">
|
|
7222
|
-
<label>
|
|
8676
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7223
8677
|
<slot name="label"></slot>
|
|
8678
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7224
8679
|
</label>
|
|
7225
8680
|
<div class="value" id="value"></div>
|
|
7226
|
-
${
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
</div>
|
|
7230
|
-
`}
|
|
8681
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8682
|
+
${this.placeholder}
|
|
8683
|
+
</div>
|
|
7231
8684
|
</div>
|
|
7232
8685
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7233
8686
|
<slot name="displayValue"></slot>
|
|
@@ -7237,6 +8690,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7237
8690
|
</div>
|
|
7238
8691
|
<div class="menuWrapper"></div>
|
|
7239
8692
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8693
|
+
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
7240
8694
|
<slot></slot>
|
|
7241
8695
|
</${this.bibtemplateTag}>
|
|
7242
8696
|
<div slot="helpText">
|
|
@@ -7254,14 +8708,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7254
8708
|
*/
|
|
7255
8709
|
renderLayoutSnowflake() {
|
|
7256
8710
|
const placeholderClass = {
|
|
7257
|
-
|
|
8711
|
+
'util_displayHidden': this.value
|
|
7258
8712
|
};
|
|
7259
8713
|
|
|
7260
8714
|
const displayValueClasses = {
|
|
7261
8715
|
'displayValue': true,
|
|
7262
8716
|
'hasContent': this.hasDisplayValueContent,
|
|
7263
8717
|
'hasFocus': this.isPopoverVisible,
|
|
7264
|
-
'withValue': this.
|
|
8718
|
+
'withValue': this.commonLabelClasses.withValue,
|
|
7265
8719
|
'force': this.forceDisplayValue,
|
|
7266
8720
|
};
|
|
7267
8721
|
|
|
@@ -7272,7 +8726,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7272
8726
|
|
|
7273
8727
|
return html`
|
|
7274
8728
|
<div
|
|
7275
|
-
class="${classMap(this.commonWrapperClasses)}"
|
|
7276
8729
|
part="wrapper">
|
|
7277
8730
|
<div id="slotHolder" aria-hidden="true">
|
|
7278
8731
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
@@ -7280,14 +8733,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7280
8733
|
<${this.dropdownTag}
|
|
7281
8734
|
?autoPlacement="${this.autoPlacement}"
|
|
7282
8735
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7283
|
-
?matchWidth="${
|
|
8736
|
+
?matchWidth="${this.matchWidth}"
|
|
7284
8737
|
?noFlip="${this.noFlip}"
|
|
7285
8738
|
?onDark="${this.onDark}"
|
|
7286
8739
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7287
8740
|
.offset="${this.offset}"
|
|
7288
8741
|
.placement="${this.placement}"
|
|
7289
8742
|
chevron
|
|
7290
|
-
fluid
|
|
7291
8743
|
for="selectMenu"
|
|
7292
8744
|
layout="${this.layout}"
|
|
7293
8745
|
part="dropdown"
|
|
@@ -7299,15 +8751,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7299
8751
|
</div>
|
|
7300
8752
|
<div class="mainContent">
|
|
7301
8753
|
<div class="${classMap(valueContainerClasses)}">
|
|
7302
|
-
<label>
|
|
8754
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7303
8755
|
<slot name="label"></slot>
|
|
8756
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7304
8757
|
</label>
|
|
7305
8758
|
<div class="value" id="value"></div>
|
|
7306
|
-
${
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
</div>
|
|
7310
|
-
`}
|
|
8759
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8760
|
+
${this.placeholder}
|
|
8761
|
+
</div>
|
|
7311
8762
|
</div>
|
|
7312
8763
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7313
8764
|
<slot name="displayValue"></slot>
|
|
@@ -7317,12 +8768,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7317
8768
|
</div>
|
|
7318
8769
|
<div class="menuWrapper"></div>
|
|
7319
8770
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8771
|
+
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
7320
8772
|
<slot></slot>
|
|
7321
8773
|
</${this.bibtemplateTag}>
|
|
7322
8774
|
<div slot="helpText">
|
|
7323
8775
|
${this.renderHtmlHelpText()}
|
|
7324
8776
|
</div>
|
|
7325
8777
|
</${this.dropdownTag}>
|
|
8778
|
+
${this.renderNativeSelect()}
|
|
7326
8779
|
</div>
|
|
7327
8780
|
`;
|
|
7328
8781
|
}
|
|
@@ -7333,11 +8786,80 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7333
8786
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7334
8787
|
*/
|
|
7335
8788
|
renderLayoutClassic() {
|
|
8789
|
+
const placeholderClass = {
|
|
8790
|
+
'util_displayHidden': this.value
|
|
8791
|
+
};
|
|
8792
|
+
|
|
8793
|
+
const displayValueClasses = {
|
|
8794
|
+
'displayValue': true,
|
|
8795
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8796
|
+
'hasFocus': this.isPopoverVisible,
|
|
8797
|
+
'withValue': this.commonLabelClasses.withValue,
|
|
8798
|
+
'force': this.forceDisplayValue,
|
|
8799
|
+
};
|
|
8800
|
+
|
|
8801
|
+
const valueContainerClasses = {
|
|
8802
|
+
'valueContainer': true,
|
|
8803
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8804
|
+
};
|
|
8805
|
+
|
|
8806
|
+
const valueClasses = {
|
|
8807
|
+
'value': true,
|
|
8808
|
+
'body-default': true
|
|
8809
|
+
};
|
|
8810
|
+
|
|
7336
8811
|
return html`
|
|
7337
8812
|
<div
|
|
7338
|
-
class="${classMap(this.commonWrapperClasses)} thin"
|
|
7339
8813
|
part="wrapper">
|
|
7340
|
-
|
|
8814
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8815
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8816
|
+
</div>
|
|
8817
|
+
<${this.dropdownTag}
|
|
8818
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8819
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8820
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8821
|
+
?noFlip="${this.noFlip}"
|
|
8822
|
+
?onDark="${this.onDark}"
|
|
8823
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8824
|
+
.offset="${this.offset}"
|
|
8825
|
+
.placement="${this.placement}"
|
|
8826
|
+
chevron
|
|
8827
|
+
for="selectMenu"
|
|
8828
|
+
layout="${this.layout}"
|
|
8829
|
+
part="dropdown"
|
|
8830
|
+
shape="${this.shape}"
|
|
8831
|
+
size="${this.size}">
|
|
8832
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8833
|
+
<div class="accents left">
|
|
8834
|
+
<slot name="typeIcon"></slot>
|
|
8835
|
+
</div>
|
|
8836
|
+
<div class="mainContent">
|
|
8837
|
+
<div class="${classMap(valueContainerClasses)}">
|
|
8838
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
8839
|
+
<slot name="label"></slot>
|
|
8840
|
+
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8841
|
+
</label>
|
|
8842
|
+
<div class="${classMap(valueClasses)}" id="value"></div>
|
|
8843
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8844
|
+
${this.placeholder}
|
|
8845
|
+
</div>
|
|
8846
|
+
</div>
|
|
8847
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8848
|
+
<slot name="displayValue"></slot>
|
|
8849
|
+
</div>
|
|
8850
|
+
</div>
|
|
8851
|
+
<div class="accents right"></div>
|
|
8852
|
+
</div>
|
|
8853
|
+
<div class="menuWrapper"></div>
|
|
8854
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8855
|
+
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
8856
|
+
<slot></slot>
|
|
8857
|
+
</${this.bibtemplateTag}>
|
|
8858
|
+
<div slot="helpText">
|
|
8859
|
+
${this.renderHtmlHelpText()}
|
|
8860
|
+
</div>
|
|
8861
|
+
</${this.dropdownTag}>
|
|
8862
|
+
${this.renderNativeSelect()}
|
|
7341
8863
|
</div>
|
|
7342
8864
|
`;
|
|
7343
8865
|
}
|
|
@@ -7371,105 +8893,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7371
8893
|
|
|
7372
8894
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7373
8895
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7374
|
-
|
|
7375
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
7376
|
-
renderBACKUP() {
|
|
7377
|
-
const placeholderClass = {
|
|
7378
|
-
hidden: this.value,
|
|
7379
|
-
};
|
|
7380
|
-
|
|
7381
|
-
return html`
|
|
7382
|
-
<div class="outerWrapper">
|
|
7383
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7384
|
-
${this.optionActive && this.options.length > 0
|
|
7385
|
-
? html`
|
|
7386
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7387
|
-
`
|
|
7388
|
-
: undefined
|
|
7389
|
-
};
|
|
7390
|
-
|
|
7391
|
-
${this.optionSelected && this.options.length > 0
|
|
7392
|
-
? html`
|
|
7393
|
-
${`${this.optionSelected.innerText} selected`}
|
|
7394
|
-
`
|
|
7395
|
-
: undefined
|
|
7396
|
-
};
|
|
7397
|
-
</div>
|
|
7398
|
-
<div id="slotHolder" aria-hidden="true">
|
|
7399
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7400
|
-
</div>
|
|
7401
|
-
<${this.dropdownTag}
|
|
7402
|
-
?autoPlacement="${this.autoPlacement}"
|
|
7403
|
-
?disabled="${this.disabled}"
|
|
7404
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7405
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
7406
|
-
?noFlip="${this.noFlip}"
|
|
7407
|
-
?onDark="${this.onDark}"
|
|
7408
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7409
|
-
.offset="${this.offset}"
|
|
7410
|
-
.placement="${this.placement}"
|
|
7411
|
-
chevron
|
|
7412
|
-
fluid
|
|
7413
|
-
for="selectMenu"
|
|
7414
|
-
layout="${this.layout}"
|
|
7415
|
-
part="dropdown"
|
|
7416
|
-
shape="${this.shape}"
|
|
7417
|
-
size="${this.size}">
|
|
7418
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
7419
|
-
<span id="placeholder"
|
|
7420
|
-
class="${classMap(placeholderClass)}"
|
|
7421
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7422
|
-
>
|
|
7423
|
-
<slot name="placeholder"></slot>
|
|
7424
|
-
</span>
|
|
7425
|
-
<slot name="valueText" id="valueText"></slot>
|
|
7426
|
-
</span>
|
|
7427
|
-
|
|
7428
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7429
|
-
<slot></slot>
|
|
7430
|
-
</${this.bibtemplateTag}>
|
|
7431
|
-
<slot name="label" slot="label"></slot>
|
|
7432
|
-
<p slot="helpText">
|
|
7433
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7434
|
-
? html`
|
|
7435
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
7436
|
-
<slot name="helpText"></slot>
|
|
7437
|
-
</span>`
|
|
7438
|
-
: html`
|
|
7439
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7440
|
-
${this.errorMessage}
|
|
7441
|
-
</span>`
|
|
7442
|
-
}
|
|
7443
|
-
</p>
|
|
7444
|
-
</${this.dropdownTag}>
|
|
7445
|
-
<div class="nativeSelectWrapper">
|
|
7446
|
-
<select
|
|
7447
|
-
tabindex="-1"
|
|
7448
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7449
|
-
name="${this.name || ''}"
|
|
7450
|
-
?disabled="${this.disabled}"
|
|
7451
|
-
?required="${this.required}"
|
|
7452
|
-
aria-hidden="true"
|
|
7453
|
-
autocomplete="${ifDefined$1(this.autocomplete)}"
|
|
7454
|
-
@change="${this._handleNativeSelectChange}">
|
|
7455
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
7456
|
-
${this.options.map((option) => {
|
|
7457
|
-
const optionValue = option.value || option.textContent;
|
|
7458
|
-
return html`
|
|
7459
|
-
<option
|
|
7460
|
-
value="${optionValue}"
|
|
7461
|
-
?selected="${this.value === optionValue}">
|
|
7462
|
-
${option.textContent}
|
|
7463
|
-
</option>
|
|
7464
|
-
`;
|
|
7465
|
-
})}
|
|
7466
|
-
</select>
|
|
7467
|
-
</div>
|
|
7468
|
-
<!-- Help text and error message template -->
|
|
7469
|
-
${this.renderHtmlHelpText()}
|
|
7470
|
-
</div>
|
|
7471
|
-
`;
|
|
7472
|
-
}
|
|
7473
8896
|
}
|
|
7474
8897
|
|
|
7475
8898
|
export { AuroSelect };
|