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