@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.14 → 0.0.0-pr624.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1022 -12
- package/components/bibtemplate/dist/registered.js +1022 -12
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +2 -2
- package/components/checkbox/demo/api.min.js +24 -19
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +24 -19
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +24 -19
- package/components/checkbox/dist/registered.js +24 -19
- package/components/combobox/demo/api.md +52 -0
- package/components/combobox/demo/api.min.js +2059 -651
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2059 -651
- package/components/combobox/dist/auro-combobox.d.ts +4 -4
- package/components/combobox/dist/index.js +1978 -629
- package/components/combobox/dist/registered.js +1978 -629
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +2326 -539
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +2326 -539
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +92 -1
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +2326 -539
- package/components/counter/dist/registered.js +2326 -539
- package/components/datepicker/demo/api.md +3 -1
- package/components/datepicker/demo/api.min.js +5402 -3158
- package/components/datepicker/demo/index.md +6 -1
- package/components/datepicker/demo/index.min.js +5402 -3158
- package/components/datepicker/dist/auro-datepicker.d.ts +17 -7
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +5402 -3158
- package/components/datepicker/dist/registered.js +5402 -3158
- package/components/dropdown/demo/api.md +3 -4
- package/components/dropdown/demo/api.min.js +69 -119
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +69 -119
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +69 -119
- package/components/dropdown/dist/registered.js +69 -119
- package/components/input/demo/api.md +12 -5
- package/components/input/demo/api.min.js +665 -285
- package/components/input/demo/index.min.js +665 -285
- package/components/input/dist/auro-input.d.ts +6 -0
- package/components/input/dist/base-input.d.ts +29 -6
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +665 -285
- package/components/input/dist/registered.js +665 -285
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +63 -2
- package/components/menu/demo/api.min.js +190 -36
- package/components/menu/demo/index.min.js +190 -36
- package/components/menu/dist/auro-menu.d.ts +22 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +190 -36
- package/components/menu/dist/registered.js +190 -36
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.min.js +4 -2
- package/components/radio/demo/index.min.js +4 -2
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +4 -2
- package/components/radio/dist/registered.js +4 -2
- package/components/select/demo/api.md +5 -5
- package/components/select/demo/api.min.js +1412 -293
- package/components/select/demo/index.md +42 -1
- package/components/select/demo/index.min.js +1412 -293
- package/components/select/dist/auro-select.d.ts +8 -8
- package/components/select/dist/index.js +1321 -261
- package/components/select/dist/registered.js +1321 -261
- package/package.json +2 -2
- /package/components/{menu/dist/styles/color-menu-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
|
@@ -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-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: transparent}`;
|
|
102
105
|
|
|
103
106
|
class DateFormatter {
|
|
104
107
|
|
|
@@ -516,7 +519,7 @@ const {
|
|
|
516
519
|
|
|
517
520
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
518
521
|
|
|
519
|
-
let AuroLibraryRuntimeUtils$
|
|
522
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
520
523
|
|
|
521
524
|
/* eslint-disable jsdoc/require-param */
|
|
522
525
|
|
|
@@ -586,7 +589,7 @@ let AuroLibraryRuntimeUtils$5 = 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
|
/**
|
|
@@ -865,7 +868,9 @@ class AuroFormValidation {
|
|
|
865
868
|
elem.validity = this.auroInputElements[0].validity;
|
|
866
869
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
867
870
|
|
|
868
|
-
|
|
871
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
872
|
+
// combobox's 2nd input will have noValidate set true.
|
|
873
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
869
874
|
elem.validity = this.auroInputElements[1].validity;
|
|
870
875
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
871
876
|
}
|
|
@@ -3272,7 +3277,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
3272
3277
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3273
3278
|
*/
|
|
3274
3279
|
|
|
3275
|
-
let AuroElement$1 = class AuroElement extends LitElement {
|
|
3280
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
3276
3281
|
|
|
3277
3282
|
// function to define props used within the scope of this component
|
|
3278
3283
|
static get properties() {
|
|
@@ -3340,7 +3345,7 @@ var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3340
3345
|
*/
|
|
3341
3346
|
|
|
3342
3347
|
// build the component class
|
|
3343
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
3348
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
3344
3349
|
constructor() {
|
|
3345
3350
|
super();
|
|
3346
3351
|
this.onDark = false;
|
|
@@ -3412,9 +3417,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3412
3417
|
}
|
|
3413
3418
|
};
|
|
3414
3419
|
|
|
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)}`;
|
|
3420
|
+
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
3421
|
|
|
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)}`;
|
|
3422
|
+
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
3423
|
|
|
3419
3424
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3420
3425
|
// See LICENSE in the project root for license information.
|
|
@@ -3572,9 +3577,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3572
3577
|
static get styles() {
|
|
3573
3578
|
return [
|
|
3574
3579
|
super.styles,
|
|
3575
|
-
css`${tokensCss$2}`,
|
|
3580
|
+
css`${tokensCss$2$1}`,
|
|
3576
3581
|
css`${styleCss$2$1}`,
|
|
3577
|
-
css`${colorCss$3}`
|
|
3582
|
+
css`${colorCss$3$1}`
|
|
3578
3583
|
];
|
|
3579
3584
|
}
|
|
3580
3585
|
|
|
@@ -3608,8 +3613,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3608
3613
|
async firstUpdated() {
|
|
3609
3614
|
await super.firstUpdated();
|
|
3610
3615
|
|
|
3611
|
-
|
|
3612
|
-
|
|
3616
|
+
/**
|
|
3617
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3618
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3619
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3620
|
+
*/
|
|
3621
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3613
3622
|
const svgDesc = this.svg.querySelector('desc');
|
|
3614
3623
|
|
|
3615
3624
|
if (svgDesc) {
|
|
@@ -3655,11 +3664,11 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3655
3664
|
|
|
3656
3665
|
var iconVersion$1 = '6.1.2';
|
|
3657
3666
|
|
|
3658
|
-
var styleCss$1$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{
|
|
3667
|
+
var styleCss$1$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
3659
3668
|
|
|
3660
3669
|
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
3670
|
|
|
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:
|
|
3671
|
+
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-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3663
3672
|
|
|
3664
3673
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3665
3674
|
// See LICENSE in the project root for license information.
|
|
@@ -3680,7 +3689,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3680
3689
|
*/
|
|
3681
3690
|
|
|
3682
3691
|
class AuroDropdownBib extends LitElement {
|
|
3683
|
-
|
|
3692
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3684
3693
|
constructor() {
|
|
3685
3694
|
super();
|
|
3686
3695
|
|
|
@@ -3690,6 +3699,9 @@ class AuroDropdownBib extends LitElement {
|
|
|
3690
3699
|
this._mobileBreakpointValue = undefined;
|
|
3691
3700
|
|
|
3692
3701
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3702
|
+
|
|
3703
|
+
this.shape = "rounded";
|
|
3704
|
+
this.matchWidth = false;
|
|
3693
3705
|
}
|
|
3694
3706
|
|
|
3695
3707
|
static get styles() {
|
|
@@ -3727,6 +3739,15 @@ class AuroDropdownBib extends LitElement {
|
|
|
3727
3739
|
reflect: true
|
|
3728
3740
|
},
|
|
3729
3741
|
|
|
3742
|
+
/**
|
|
3743
|
+
* If declared, the bib width will match the trigger width.
|
|
3744
|
+
* @private
|
|
3745
|
+
*/
|
|
3746
|
+
matchWidth: {
|
|
3747
|
+
type: Boolean,
|
|
3748
|
+
reflect: true
|
|
3749
|
+
},
|
|
3750
|
+
|
|
3730
3751
|
/**
|
|
3731
3752
|
* If declared, will apply border-radius to the bib.
|
|
3732
3753
|
*/
|
|
@@ -3740,6 +3761,11 @@ class AuroDropdownBib extends LitElement {
|
|
|
3740
3761
|
*/
|
|
3741
3762
|
bibTemplate: {
|
|
3742
3763
|
type: Object
|
|
3764
|
+
},
|
|
3765
|
+
|
|
3766
|
+
shape: {
|
|
3767
|
+
type: String,
|
|
3768
|
+
reflect: true
|
|
3743
3769
|
}
|
|
3744
3770
|
};
|
|
3745
3771
|
}
|
|
@@ -3819,8 +3845,16 @@ class AuroDropdownBib extends LitElement {
|
|
|
3819
3845
|
|
|
3820
3846
|
// function that renders the HTML and CSS into the scope of the component
|
|
3821
3847
|
render() {
|
|
3848
|
+
const classes = {
|
|
3849
|
+
container: true
|
|
3850
|
+
};
|
|
3851
|
+
|
|
3852
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
3853
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
3854
|
+
classes[`shape-${this.shape}`] = true;
|
|
3855
|
+
|
|
3822
3856
|
return html`
|
|
3823
|
-
<div class="
|
|
3857
|
+
<div class="${classMap(classes)}" part="bibContainer">
|
|
3824
3858
|
<slot></slot>
|
|
3825
3859
|
</div>
|
|
3826
3860
|
`;
|
|
@@ -3829,23 +3863,23 @@ class AuroDropdownBib extends LitElement {
|
|
|
3829
3863
|
|
|
3830
3864
|
var dropdownVersion$1 = '3.0.0';
|
|
3831
3865
|
|
|
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:
|
|
3866
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
3833
3867
|
|
|
3834
3868
|
var colorCss$1$1 = css`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
3835
3869
|
|
|
3836
|
-
var classicColorCss = css`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)
|
|
3870
|
+
var classicColorCss = css`:host([layout*=classic]:not([onDark])) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]:not([onDark])) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic]:not([onDark])) .trigger:focus-within,:host([layout*=classic]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][disabled]:not([onDark])){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic][error]:not([onDark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][error]:not([onDark])) .trigger:focus-within,:host([layout*=classic][error]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic][onDark]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic][onDark]) .trigger:focus-within,:host([layout*=classic][onDark]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic][onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([layout*=classic][onDark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][onDark][error]) .trigger:focus-within,:host([layout*=classic][onDark][error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
3837
3871
|
|
|
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]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;
|
|
3872
|
+
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]) .trigger{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic]:not([simple])) .triggerContentWrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}`;
|
|
3839
3873
|
|
|
3840
|
-
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
3874
|
+
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3841
3875
|
|
|
3842
|
-
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
3876
|
+
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3843
3877
|
|
|
3844
|
-
var colorCss$
|
|
3878
|
+
var colorCss$5 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3845
3879
|
|
|
3846
|
-
var styleCss$
|
|
3880
|
+
var styleCss$6 = css`.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
3881
|
|
|
3848
|
-
var tokensCss$
|
|
3882
|
+
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3849
3883
|
|
|
3850
3884
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3851
3885
|
// See LICENSE in the project root for license information.
|
|
@@ -3854,7 +3888,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3854
3888
|
|
|
3855
3889
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3856
3890
|
|
|
3857
|
-
let AuroLibraryRuntimeUtils$
|
|
3891
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
3858
3892
|
|
|
3859
3893
|
/* eslint-disable jsdoc/require-param */
|
|
3860
3894
|
|
|
@@ -3935,14 +3969,14 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3935
3969
|
this.onDark = false;
|
|
3936
3970
|
this.hasTextContent = false;
|
|
3937
3971
|
|
|
3938
|
-
AuroLibraryRuntimeUtils$
|
|
3972
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3939
3973
|
}
|
|
3940
3974
|
|
|
3941
3975
|
static get styles() {
|
|
3942
3976
|
return [
|
|
3943
|
-
colorCss$
|
|
3944
|
-
styleCss$
|
|
3945
|
-
tokensCss$
|
|
3977
|
+
colorCss$5,
|
|
3978
|
+
styleCss$6,
|
|
3979
|
+
tokensCss$4
|
|
3946
3980
|
];
|
|
3947
3981
|
}
|
|
3948
3982
|
|
|
@@ -3991,7 +4025,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3991
4025
|
*
|
|
3992
4026
|
*/
|
|
3993
4027
|
static register(name = "auro-helptext") {
|
|
3994
|
-
AuroLibraryRuntimeUtils$
|
|
4028
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
3995
4029
|
}
|
|
3996
4030
|
|
|
3997
4031
|
updated() {
|
|
@@ -4084,18 +4118,21 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4084
4118
|
}
|
|
4085
4119
|
|
|
4086
4120
|
resetShapeClasses() {
|
|
4087
|
-
|
|
4088
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4121
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4089
4122
|
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4123
|
+
if (wrapper) {
|
|
4124
|
+
wrapper.classList.forEach((className) => {
|
|
4125
|
+
if (className.startsWith('shape-')) {
|
|
4126
|
+
wrapper.classList.remove(className);
|
|
4127
|
+
}
|
|
4128
|
+
});
|
|
4096
4129
|
|
|
4097
|
-
|
|
4098
|
-
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
if (this.shape && this.size) {
|
|
4133
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4134
|
+
} else {
|
|
4135
|
+
wrapper.classList.add('shape-none');
|
|
4099
4136
|
}
|
|
4100
4137
|
}
|
|
4101
4138
|
|
|
@@ -4171,19 +4208,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4171
4208
|
|
|
4172
4209
|
// Layout Config
|
|
4173
4210
|
this.layout = 'classic';
|
|
4174
|
-
this.shape = '
|
|
4211
|
+
this.shape = 'classic';
|
|
4175
4212
|
this.size = 'xl';
|
|
4213
|
+
|
|
4176
4214
|
this.parentBorder = false;
|
|
4177
4215
|
|
|
4178
4216
|
this.privateDefaults();
|
|
4179
4217
|
}
|
|
4180
4218
|
|
|
4181
|
-
get commonLabelClasses() {
|
|
4182
|
-
return {
|
|
4183
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4184
|
-
};
|
|
4185
|
-
}
|
|
4186
|
-
|
|
4187
4219
|
get commonWrapperClasses() {
|
|
4188
4220
|
return {
|
|
4189
4221
|
'trigger': true,
|
|
@@ -4856,14 +4888,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4856
4888
|
* @returns {void}
|
|
4857
4889
|
*/
|
|
4858
4890
|
handleTriggerContentSlotChange(event) {
|
|
4859
|
-
|
|
4860
4891
|
this.floater.handleTriggerTabIndex();
|
|
4861
4892
|
|
|
4862
4893
|
// Get the trigger
|
|
4863
4894
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
4864
4895
|
|
|
4865
4896
|
// Get the trigger slot
|
|
4866
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
4897
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
4867
4898
|
|
|
4868
4899
|
// If there's a trigger slot
|
|
4869
4900
|
if (triggerSlot) {
|
|
@@ -4935,29 +4966,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4935
4966
|
}
|
|
4936
4967
|
}
|
|
4937
4968
|
|
|
4938
|
-
/**
|
|
4939
|
-
* @private
|
|
4940
|
-
* @method handleLabelSlotChange
|
|
4941
|
-
* @param {event} event - The event object representing the slot change.
|
|
4942
|
-
* @description Handles the slot change event for the label slot.
|
|
4943
|
-
*/
|
|
4944
|
-
handleLabelSlotChange (event) {
|
|
4945
|
-
|
|
4946
|
-
// Get the nodes from the event
|
|
4947
|
-
const nodes = event.target.assignedNodes();
|
|
4948
|
-
|
|
4949
|
-
// Guard clause for no nodes
|
|
4950
|
-
if (!nodes) {
|
|
4951
|
-
return;
|
|
4952
|
-
}
|
|
4953
|
-
|
|
4954
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
4955
|
-
const nodesArr = Array.from(nodes);
|
|
4956
|
-
|
|
4957
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
4958
|
-
this.labeled = nodesArr.length > 0;
|
|
4959
|
-
}
|
|
4960
|
-
|
|
4961
4969
|
/**
|
|
4962
4970
|
* Returns HTML for the common portion of the layouts.
|
|
4963
4971
|
* @private
|
|
@@ -4972,22 +4980,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4972
4980
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4973
4981
|
tabindex="${this.tabIndex}"
|
|
4974
4982
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4975
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4976
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4983
|
+
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4984
|
+
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4977
4985
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4978
4986
|
@focusin="${this.handleFocusin}"
|
|
4979
4987
|
@blur="${this.handleFocusOut}">
|
|
4980
|
-
<div class="triggerContentWrapper">
|
|
4981
|
-
<
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
<div class="triggerContent">
|
|
4985
|
-
<slot
|
|
4986
|
-
name="trigger"
|
|
4987
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4988
|
-
</div>
|
|
4988
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
4989
|
+
<slot
|
|
4990
|
+
name="trigger"
|
|
4991
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4989
4992
|
</div>
|
|
4990
|
-
${this.chevron
|
|
4993
|
+
${this.chevron ? html`
|
|
4991
4994
|
<div
|
|
4992
4995
|
id="showStateIcon"
|
|
4993
4996
|
class="chevron"
|
|
@@ -5008,6 +5011,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5008
5011
|
<div id="bibSizer" part="size"></div>
|
|
5009
5012
|
<${this.dropdownBibTag}
|
|
5010
5013
|
id="bib"
|
|
5014
|
+
shape="${this.shape}"
|
|
5011
5015
|
?data-show="${this.isPopoverVisible}"
|
|
5012
5016
|
?isfullscreen="${this.isBibFullscreen}"
|
|
5013
5017
|
?common="${this.common}"
|
|
@@ -5027,62 +5031,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5027
5031
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5028
5032
|
*/
|
|
5029
5033
|
renderLayoutClassic() {
|
|
5034
|
+
// TODO: check with Doug why this was never used?
|
|
5035
|
+
const helpTextClasses = {
|
|
5036
|
+
'helpText': true
|
|
5037
|
+
};
|
|
5030
5038
|
|
|
5031
5039
|
return html`
|
|
5032
|
-
|
|
5033
|
-
<div
|
|
5034
|
-
id="trigger"
|
|
5035
|
-
class="trigger"
|
|
5036
|
-
part="trigger"
|
|
5037
|
-
tabindex="${this.tabIndex}"
|
|
5038
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5039
|
-
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5040
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5041
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5042
|
-
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5043
|
-
>
|
|
5044
|
-
<div class="triggerContentWrapper">
|
|
5045
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5046
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5047
|
-
</label>
|
|
5048
|
-
<div class="triggerContent">
|
|
5049
|
-
<slot
|
|
5050
|
-
name="trigger"
|
|
5051
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5052
|
-
</div>
|
|
5053
|
-
</div>
|
|
5054
|
-
${this.chevron || this.common ? html`
|
|
5055
|
-
<div
|
|
5056
|
-
id="showStateIcon"
|
|
5057
|
-
part="chevron">
|
|
5058
|
-
<${this.iconTag}
|
|
5059
|
-
category="interface"
|
|
5060
|
-
name="chevron-down"
|
|
5061
|
-
?onDark="${this.onDark}"
|
|
5062
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5063
|
-
>
|
|
5064
|
-
</${this.iconTag}>
|
|
5065
|
-
</div>
|
|
5066
|
-
` : undefined }
|
|
5067
|
-
</div>
|
|
5068
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5069
|
-
<slot name="helpText"></slot>
|
|
5070
|
-
</${this.helpTextTag}>
|
|
5071
|
-
|
|
5072
|
-
<div id="bibSizer" part="size"></div>
|
|
5073
|
-
<${this.dropdownBibTag}
|
|
5074
|
-
id="bib"
|
|
5075
|
-
?data-show="${this.isPopoverVisible}"
|
|
5076
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5077
|
-
?common="${this.common}"
|
|
5078
|
-
?rounded="${this.common || this.rounded}"
|
|
5079
|
-
?inset="${this.common || this.inset}"
|
|
5080
|
-
>
|
|
5081
|
-
<div class="slotContent">
|
|
5082
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5083
|
-
</div>
|
|
5084
|
-
</${this.dropdownBibTag}>
|
|
5085
|
-
</div>
|
|
5040
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5086
5041
|
`;
|
|
5087
5042
|
}
|
|
5088
5043
|
|
|
@@ -5150,9 +5105,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5150
5105
|
|
|
5151
5106
|
var dropdownVersion = '3.0.0';
|
|
5152
5107
|
|
|
5153
|
-
var colorCss$
|
|
5108
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5154
5109
|
|
|
5155
|
-
var styleCss$
|
|
5110
|
+
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)}`;
|
|
5156
5111
|
|
|
5157
5112
|
var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-basic-color-surface-default, #ffffff)}`;
|
|
5158
5113
|
|
|
@@ -5163,7 +5118,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5163
5118
|
|
|
5164
5119
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5165
5120
|
|
|
5166
|
-
let AuroLibraryRuntimeUtils$
|
|
5121
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5167
5122
|
|
|
5168
5123
|
/* eslint-disable jsdoc/require-param */
|
|
5169
5124
|
|
|
@@ -5266,103 +5221,1096 @@ class AuroDependencyVersioning {
|
|
|
5266
5221
|
}
|
|
5267
5222
|
}
|
|
5268
5223
|
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5224
|
+
/**
|
|
5225
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5226
|
+
*/
|
|
5227
|
+
const _observers = new WeakMap();
|
|
5272
5228
|
|
|
5273
5229
|
/**
|
|
5274
|
-
*
|
|
5275
|
-
*
|
|
5276
|
-
*
|
|
5230
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5231
|
+
* Structure: {
|
|
5232
|
+
* host: {
|
|
5233
|
+
* matchers: Set<Function>,
|
|
5234
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5235
|
+
* }
|
|
5236
|
+
* }
|
|
5277
5237
|
*/
|
|
5238
|
+
const _transportConfig = new WeakMap();
|
|
5278
5239
|
|
|
5279
|
-
|
|
5240
|
+
/**
|
|
5241
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5242
|
+
*
|
|
5243
|
+
* @param {Object} params - The parameters for the function.
|
|
5244
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5245
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5246
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5247
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5248
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5249
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5250
|
+
*/
|
|
5251
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5252
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5253
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5254
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5255
|
+
}
|
|
5280
5256
|
|
|
5281
|
-
//
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
hidden: { type: Boolean,
|
|
5285
|
-
reflect: true },
|
|
5286
|
-
hiddenVisually: { type: Boolean,
|
|
5287
|
-
reflect: true },
|
|
5288
|
-
hiddenAudible: { type: Boolean,
|
|
5289
|
-
reflect: true },
|
|
5290
|
-
};
|
|
5257
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5258
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5259
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5291
5260
|
}
|
|
5292
5261
|
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
if (value) {
|
|
5298
|
-
return 'true'
|
|
5299
|
-
}
|
|
5262
|
+
// Guard Clause: Ensure match is a function
|
|
5263
|
+
if (typeof match !== 'function') {
|
|
5264
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5265
|
+
}
|
|
5300
5266
|
|
|
5301
|
-
|
|
5267
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5268
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5269
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5302
5270
|
}
|
|
5303
|
-
|
|
5271
|
+
|
|
5272
|
+
// Register this transport and get cleanup function
|
|
5273
|
+
return _registerTransport({
|
|
5274
|
+
host,
|
|
5275
|
+
target,
|
|
5276
|
+
matcher: match,
|
|
5277
|
+
removeOriginal
|
|
5278
|
+
});
|
|
5279
|
+
};
|
|
5304
5280
|
|
|
5305
|
-
|
|
5281
|
+
/**
|
|
5282
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5283
|
+
*
|
|
5284
|
+
* @param {Object} params - The parameters object.
|
|
5285
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5286
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5287
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5288
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5289
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5290
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5291
|
+
* @private
|
|
5292
|
+
*/
|
|
5293
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5294
|
+
// Initialize config for this host if it doesn't exist
|
|
5295
|
+
if (!_transportConfig.has(host)) {
|
|
5296
|
+
_transportConfig.set(host, {
|
|
5297
|
+
matchers: new Set(),
|
|
5298
|
+
targets: new Map()
|
|
5299
|
+
});
|
|
5300
|
+
}
|
|
5306
5301
|
|
|
5307
|
-
|
|
5302
|
+
const config = _transportConfig.get(host);
|
|
5303
|
+
|
|
5304
|
+
// Add the matcher to the set of matchers for this host
|
|
5305
|
+
config.matchers.add(matcher);
|
|
5306
|
+
|
|
5307
|
+
// Initialize target entry if it doesn't exist
|
|
5308
|
+
if (!config.targets.has(target)) {
|
|
5309
|
+
config.targets.set(target, new Map());
|
|
5310
|
+
}
|
|
5311
|
+
|
|
5312
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5313
|
+
config.targets.get(target).set(matcher, {
|
|
5314
|
+
removeOriginal,
|
|
5315
|
+
currentAttributes: new Map()
|
|
5316
|
+
});
|
|
5317
|
+
|
|
5318
|
+
// Perform initial attribute transport
|
|
5319
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5320
|
+
|
|
5321
|
+
// Attach observer
|
|
5322
|
+
_attachObserver(host);
|
|
5323
|
+
|
|
5324
|
+
// Return cleanup function and utility functions
|
|
5325
|
+
return {
|
|
5326
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5327
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5328
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5329
|
+
}
|
|
5330
|
+
};
|
|
5308
5331
|
|
|
5309
|
-
|
|
5332
|
+
/**
|
|
5333
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5334
|
+
*
|
|
5335
|
+
* @param {HTMLElement} host - The host element
|
|
5336
|
+
* @param {HTMLElement} target - The target element
|
|
5337
|
+
* @param {Function} matcher - The matcher function
|
|
5338
|
+
* @private
|
|
5339
|
+
*/
|
|
5340
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5341
|
+
const config = _transportConfig.get(host);
|
|
5342
|
+
if (!config) return;
|
|
5343
|
+
|
|
5344
|
+
// Remove this matcher from this target
|
|
5345
|
+
const targetMatchers = config.targets.get(target);
|
|
5346
|
+
if (targetMatchers) {
|
|
5347
|
+
targetMatchers.delete(matcher);
|
|
5348
|
+
|
|
5349
|
+
// If this target has no more matchers, remove it
|
|
5350
|
+
if (targetMatchers.size === 0) {
|
|
5351
|
+
config.targets.delete(target);
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
|
|
5355
|
+
// Check if this matcher is still used by any target
|
|
5356
|
+
let matcherStillUsed = false;
|
|
5357
|
+
for (const matcherMap of config.targets.values()) {
|
|
5358
|
+
if (matcherMap.has(matcher)) {
|
|
5359
|
+
matcherStillUsed = true;
|
|
5360
|
+
break;
|
|
5361
|
+
}
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5364
|
+
// If not used anymore, remove from matchers set
|
|
5365
|
+
if (!matcherStillUsed) {
|
|
5366
|
+
config.matchers.delete(matcher);
|
|
5367
|
+
}
|
|
5368
|
+
|
|
5369
|
+
// If no more targets or matchers, detach observer
|
|
5370
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5371
|
+
_detachObserver(host);
|
|
5372
|
+
}
|
|
5373
|
+
};
|
|
5310
5374
|
|
|
5311
5375
|
/**
|
|
5312
|
-
*
|
|
5313
|
-
*
|
|
5314
|
-
* @
|
|
5315
|
-
* @param {
|
|
5316
|
-
* @
|
|
5376
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5377
|
+
*
|
|
5378
|
+
* @param {Object} params - The parameters object.
|
|
5379
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5380
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5381
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5382
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5383
|
+
* @returns {void}
|
|
5384
|
+
* @private
|
|
5317
5385
|
*/
|
|
5386
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5387
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5388
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5389
|
+
.filter(attr => matcher(attr))
|
|
5390
|
+
.reduce((acc, attr) => {
|
|
5391
|
+
acc[attr] = host.getAttribute(attr);
|
|
5392
|
+
return acc;
|
|
5393
|
+
}, {});
|
|
5394
|
+
|
|
5395
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5396
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5397
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5398
|
+
target.setAttribute(key, value);
|
|
5399
|
+
if (removeOriginal) {
|
|
5400
|
+
host.removeAttribute(key);
|
|
5401
|
+
}
|
|
5402
|
+
});
|
|
5403
|
+
};
|
|
5318
5404
|
|
|
5319
5405
|
/**
|
|
5320
|
-
*
|
|
5321
|
-
*
|
|
5322
|
-
* @param {
|
|
5323
|
-
* @
|
|
5324
|
-
* @
|
|
5325
|
-
* @returns {Promise}
|
|
5406
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5407
|
+
*
|
|
5408
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5409
|
+
* @returns {MutationObserver} The observer instance.
|
|
5410
|
+
* @private
|
|
5326
5411
|
*/
|
|
5327
|
-
const
|
|
5328
|
-
|
|
5329
|
-
if (
|
|
5330
|
-
|
|
5412
|
+
const _attachObserver = (host) => {
|
|
5413
|
+
// If an observer for this host already exists, return it
|
|
5414
|
+
if (_observers.has(host)) {
|
|
5415
|
+
return _observers.get(host);
|
|
5331
5416
|
}
|
|
5332
|
-
return _fetchMap.get(uri);
|
|
5333
|
-
};
|
|
5334
5417
|
|
|
5335
|
-
|
|
5418
|
+
// Create a new MutationObserver
|
|
5419
|
+
const observer = new MutationObserver((mutations) => {
|
|
5420
|
+
const config = _transportConfig.get(host);
|
|
5421
|
+
if (!config) return;
|
|
5422
|
+
|
|
5423
|
+
// For each mutation affecting attributes
|
|
5424
|
+
mutations
|
|
5425
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5426
|
+
.forEach(mutation => {
|
|
5427
|
+
const attributeName = mutation.attributeName;
|
|
5428
|
+
|
|
5429
|
+
// Find matchers that care about this attribute
|
|
5430
|
+
for (const matcher of config.matchers) {
|
|
5431
|
+
if (matcher(attributeName)) {
|
|
5432
|
+
// For each target that uses this matcher
|
|
5433
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5434
|
+
if (matcherConfigs.has(matcher)) {
|
|
5435
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5436
|
+
_transportAttributes({
|
|
5437
|
+
host,
|
|
5438
|
+
target,
|
|
5439
|
+
matcher,
|
|
5440
|
+
removeOriginal
|
|
5441
|
+
});
|
|
5442
|
+
}
|
|
5443
|
+
}
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5446
|
+
});
|
|
5447
|
+
});
|
|
5336
5448
|
|
|
5337
|
-
//
|
|
5338
|
-
|
|
5449
|
+
// Start observing attribute changes
|
|
5450
|
+
observer.observe(host, { attributes: true });
|
|
5451
|
+
|
|
5452
|
+
// Store the observer
|
|
5453
|
+
_observers.set(host, observer);
|
|
5454
|
+
|
|
5455
|
+
return observer;
|
|
5456
|
+
};
|
|
5339
5457
|
|
|
5458
|
+
/**
|
|
5459
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5460
|
+
*
|
|
5461
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5462
|
+
* @private
|
|
5463
|
+
*/
|
|
5464
|
+
const _detachObserver = (host) => {
|
|
5465
|
+
if (_observers.has(host)) {
|
|
5466
|
+
const observer = _observers.get(host);
|
|
5467
|
+
observer.disconnect();
|
|
5468
|
+
_observers.delete(host);
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5471
|
+
// Clean up the transport config as well
|
|
5472
|
+
if (_transportConfig.has(host)) {
|
|
5473
|
+
_transportConfig.delete(host);
|
|
5474
|
+
}
|
|
5475
|
+
};
|
|
5340
5476
|
|
|
5341
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5342
5477
|
/**
|
|
5343
|
-
*
|
|
5478
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5479
|
+
* @param {HTMLElement} host - The host element
|
|
5480
|
+
* @param {HTMLElement} target - The target element
|
|
5481
|
+
* @param {Function} matcher - The matcher function
|
|
5482
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5483
|
+
* @private
|
|
5344
5484
|
*/
|
|
5485
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5486
|
+
const config = _transportConfig.get(host);
|
|
5487
|
+
if (!config) return undefined;
|
|
5488
|
+
|
|
5489
|
+
const targetMatchers = config.targets.get(target);
|
|
5490
|
+
if (!targetMatchers) return undefined;
|
|
5491
|
+
|
|
5492
|
+
return targetMatchers.get(matcher);
|
|
5493
|
+
};
|
|
5345
5494
|
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5495
|
+
/**
|
|
5496
|
+
* Sets an observed attribute value
|
|
5497
|
+
* @param {HTMLElement} host - The host element
|
|
5498
|
+
* @param {HTMLElement} target - The target element
|
|
5499
|
+
* @param {Function} matcher - The matcher function
|
|
5500
|
+
* @param {string} key - The attribute name
|
|
5501
|
+
* @param {string} value - The attribute value
|
|
5502
|
+
* @private
|
|
5503
|
+
*/
|
|
5504
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5505
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5506
|
+
if (matcherConfig) {
|
|
5507
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5351
5508
|
}
|
|
5509
|
+
};
|
|
5510
|
+
|
|
5511
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5512
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5513
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5514
|
+
return undefined;
|
|
5515
|
+
};
|
|
5516
|
+
|
|
5517
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5518
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5519
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5520
|
+
return [];
|
|
5521
|
+
};
|
|
5522
|
+
|
|
5523
|
+
const _matchers = {
|
|
5524
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5525
|
+
'role': attr => attr.match(/^role$/)
|
|
5526
|
+
};
|
|
5527
|
+
|
|
5528
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5529
|
+
return transportAttributes({
|
|
5530
|
+
host,
|
|
5531
|
+
target,
|
|
5532
|
+
match: attr => {
|
|
5533
|
+
for (const key in _matchers) {
|
|
5534
|
+
if (_matchers[key](attr)) return true;
|
|
5535
|
+
}
|
|
5536
|
+
return false;
|
|
5537
|
+
},
|
|
5538
|
+
removeOriginal
|
|
5539
|
+
});
|
|
5540
|
+
};
|
|
5541
|
+
|
|
5542
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5546
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5547
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5548
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5549
|
+
* @private
|
|
5550
|
+
*/
|
|
5551
|
+
attributeWatcher;
|
|
5352
5552
|
|
|
5353
|
-
// function to define props used within the scope of this component
|
|
5354
5553
|
static get properties() {
|
|
5355
5554
|
return {
|
|
5356
|
-
...super.properties,
|
|
5357
5555
|
|
|
5358
5556
|
/**
|
|
5359
|
-
*
|
|
5557
|
+
* Defines the layout of an element.
|
|
5558
|
+
* @default {'default'}
|
|
5360
5559
|
*/
|
|
5361
|
-
|
|
5362
|
-
type:
|
|
5560
|
+
layout: {
|
|
5561
|
+
type: String,
|
|
5562
|
+
attribute: "layout",
|
|
5363
5563
|
reflect: true
|
|
5364
5564
|
},
|
|
5365
|
-
|
|
5565
|
+
|
|
5566
|
+
/**
|
|
5567
|
+
* Defines the shape of an element.
|
|
5568
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5569
|
+
* @default {'default'}
|
|
5570
|
+
*/
|
|
5571
|
+
shape: {
|
|
5572
|
+
type: String,
|
|
5573
|
+
attribute: "shape",
|
|
5574
|
+
reflect: true
|
|
5575
|
+
},
|
|
5576
|
+
|
|
5577
|
+
/**
|
|
5578
|
+
* Defines the size of an element.
|
|
5579
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5580
|
+
* @default {'md'}
|
|
5581
|
+
*/
|
|
5582
|
+
size: {
|
|
5583
|
+
type: String,
|
|
5584
|
+
attribute: "size",
|
|
5585
|
+
reflect: true
|
|
5586
|
+
},
|
|
5587
|
+
|
|
5588
|
+
/**
|
|
5589
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5590
|
+
* @default {false}
|
|
5591
|
+
*/
|
|
5592
|
+
onDark: {
|
|
5593
|
+
type: Boolean,
|
|
5594
|
+
attribute: "ondark",
|
|
5595
|
+
reflect: true
|
|
5596
|
+
},
|
|
5597
|
+
|
|
5598
|
+
/**
|
|
5599
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5600
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5601
|
+
* @type {HTMLElement|null}
|
|
5602
|
+
* @default {null}
|
|
5603
|
+
* @private
|
|
5604
|
+
*/
|
|
5605
|
+
wrapper: {
|
|
5606
|
+
type: HTMLElement,
|
|
5607
|
+
attribute: false,
|
|
5608
|
+
reflect: false
|
|
5609
|
+
}
|
|
5610
|
+
};
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5613
|
+
|
|
5614
|
+
|
|
5615
|
+
resetShapeClasses() {
|
|
5616
|
+
if (this.shape && this.size) {
|
|
5617
|
+
|
|
5618
|
+
if (this.wrapper) {
|
|
5619
|
+
this.wrapper.classList.forEach((className) => {
|
|
5620
|
+
if (className.startsWith('shape-')) {
|
|
5621
|
+
this.wrapper.classList.remove(className);
|
|
5622
|
+
}
|
|
5623
|
+
});
|
|
5624
|
+
|
|
5625
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5626
|
+
}
|
|
5627
|
+
}
|
|
5628
|
+
}
|
|
5629
|
+
|
|
5630
|
+
resetLayoutClasses() {
|
|
5631
|
+
if (this.layout) {
|
|
5632
|
+
if (this.wrapper) {
|
|
5633
|
+
this.wrapper.classList.forEach((className) => {
|
|
5634
|
+
if (className.startsWith('layout-')) {
|
|
5635
|
+
this.wrapper.classList.remove(className);
|
|
5636
|
+
}
|
|
5637
|
+
});
|
|
5638
|
+
|
|
5639
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
5640
|
+
}
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
updateComponentArchitecture() {
|
|
5645
|
+
this.resetLayoutClasses();
|
|
5646
|
+
this.resetShapeClasses();
|
|
5647
|
+
}
|
|
5648
|
+
|
|
5649
|
+
updated(changedProperties) {
|
|
5650
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
5651
|
+
this.updateComponentArchitecture();
|
|
5652
|
+
}
|
|
5653
|
+
}
|
|
5654
|
+
|
|
5655
|
+
firstUpdated() {
|
|
5656
|
+
super.firstUpdated();
|
|
5657
|
+
|
|
5658
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
5659
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5660
|
+
|
|
5661
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
5662
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
5663
|
+
}
|
|
5664
|
+
|
|
5665
|
+
disconnectedCallback() {
|
|
5666
|
+
super.disconnectedCallback();
|
|
5667
|
+
|
|
5668
|
+
// Cleanup the ARIA observer if it exists
|
|
5669
|
+
if (this.attributeWatcher) {
|
|
5670
|
+
this.attributeWatcher.cleanup();
|
|
5671
|
+
this.attributeWatcher = null;
|
|
5672
|
+
}
|
|
5673
|
+
}
|
|
5674
|
+
|
|
5675
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
5676
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
5677
|
+
render() {
|
|
5678
|
+
try {
|
|
5679
|
+
return this.renderLayout();
|
|
5680
|
+
} catch (error) {
|
|
5681
|
+
// failed to get the defined layout
|
|
5682
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
5683
|
+
|
|
5684
|
+
// fallback to the default layout
|
|
5685
|
+
return this.getLayout('default');
|
|
5686
|
+
}
|
|
5687
|
+
}
|
|
5688
|
+
};
|
|
5689
|
+
|
|
5690
|
+
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}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
5691
|
+
|
|
5692
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
5693
|
+
|
|
5694
|
+
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}`;
|
|
5695
|
+
|
|
5696
|
+
var shapeSize = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
5697
|
+
|
|
5698
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5699
|
+
// See LICENSE in the project root for license information.
|
|
5700
|
+
|
|
5701
|
+
// ---------------------------------------------------------------------
|
|
5702
|
+
|
|
5703
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5704
|
+
|
|
5705
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5706
|
+
|
|
5707
|
+
/* eslint-disable jsdoc/require-param */
|
|
5708
|
+
|
|
5709
|
+
/**
|
|
5710
|
+
* This will register a new custom element with the browser.
|
|
5711
|
+
* @param {String} name - The name of the custom element.
|
|
5712
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5713
|
+
* @returns {void}
|
|
5714
|
+
*/
|
|
5715
|
+
registerComponent(name, componentClass) {
|
|
5716
|
+
if (!customElements.get(name)) {
|
|
5717
|
+
customElements.define(name, class extends componentClass {});
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5723
|
+
* @returns {void}
|
|
5724
|
+
*/
|
|
5725
|
+
closestElement(
|
|
5726
|
+
selector, // selector like in .closest()
|
|
5727
|
+
base = this, // extra functionality to skip a parent
|
|
5728
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5729
|
+
!el || el === document || el === window
|
|
5730
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5731
|
+
: found
|
|
5732
|
+
? found // found a selector INside this element
|
|
5733
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5734
|
+
) {
|
|
5735
|
+
return __Closest(base);
|
|
5736
|
+
}
|
|
5737
|
+
/* eslint-enable jsdoc/require-param */
|
|
5738
|
+
|
|
5739
|
+
/**
|
|
5740
|
+
* 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.
|
|
5741
|
+
* @param {Object} elem - The element to check.
|
|
5742
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5743
|
+
* @returns {void}
|
|
5744
|
+
*/
|
|
5745
|
+
handleComponentTagRename(elem, tagName) {
|
|
5746
|
+
const tag = tagName.toLowerCase();
|
|
5747
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5748
|
+
|
|
5749
|
+
if (elemTag !== tag) {
|
|
5750
|
+
elem.setAttribute(tag, true);
|
|
5751
|
+
}
|
|
5752
|
+
}
|
|
5753
|
+
|
|
5754
|
+
/**
|
|
5755
|
+
* Validates if an element is a specific Auro component.
|
|
5756
|
+
* @param {Object} elem - The element to validate.
|
|
5757
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5758
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5759
|
+
*/
|
|
5760
|
+
elementMatch(elem, tagName) {
|
|
5761
|
+
const tag = tagName.toLowerCase();
|
|
5762
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5763
|
+
|
|
5764
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5765
|
+
}
|
|
5766
|
+
};
|
|
5767
|
+
|
|
5768
|
+
var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
5769
|
+
|
|
5770
|
+
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}`;
|
|
5771
|
+
|
|
5772
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
5773
|
+
|
|
5774
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5775
|
+
// See LICENSE in the project root for license information.
|
|
5776
|
+
|
|
5777
|
+
|
|
5778
|
+
class AuroLoader extends LitElement {
|
|
5779
|
+
constructor() {
|
|
5780
|
+
super();
|
|
5781
|
+
|
|
5782
|
+
/**
|
|
5783
|
+
* @private
|
|
5784
|
+
*/
|
|
5785
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
5786
|
+
|
|
5787
|
+
/**
|
|
5788
|
+
* @private
|
|
5789
|
+
*/
|
|
5790
|
+
this.mdCount = 3;
|
|
5791
|
+
|
|
5792
|
+
/**
|
|
5793
|
+
* @private
|
|
5794
|
+
*/
|
|
5795
|
+
this.smCount = 2;
|
|
5796
|
+
|
|
5797
|
+
/**
|
|
5798
|
+
* @private
|
|
5799
|
+
*/
|
|
5800
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5801
|
+
|
|
5802
|
+
this.orbit = false;
|
|
5803
|
+
this.ringworm = false;
|
|
5804
|
+
this.laser = false;
|
|
5805
|
+
this.pulse = false;
|
|
5806
|
+
}
|
|
5807
|
+
|
|
5808
|
+
// function to define props used within the scope of this component
|
|
5809
|
+
static get properties() {
|
|
5810
|
+
return {
|
|
5811
|
+
|
|
5812
|
+
/**
|
|
5813
|
+
* Sets loader to laser type.
|
|
5814
|
+
*/
|
|
5815
|
+
laser: {
|
|
5816
|
+
type: Boolean,
|
|
5817
|
+
reflect: true
|
|
5818
|
+
},
|
|
5819
|
+
|
|
5820
|
+
/**
|
|
5821
|
+
* Sets loader to orbit type.
|
|
5822
|
+
*/
|
|
5823
|
+
orbit: {
|
|
5824
|
+
type: Boolean,
|
|
5825
|
+
reflect: true
|
|
5826
|
+
},
|
|
5827
|
+
|
|
5828
|
+
/**
|
|
5829
|
+
* Sets loader to pulse type.
|
|
5830
|
+
*/
|
|
5831
|
+
pulse: {
|
|
5832
|
+
type: Boolean,
|
|
5833
|
+
reflect: true
|
|
5834
|
+
},
|
|
5835
|
+
|
|
5836
|
+
/**
|
|
5837
|
+
* Sets loader to ringworm type.
|
|
5838
|
+
*/
|
|
5839
|
+
ringworm: {
|
|
5840
|
+
type: Boolean,
|
|
5841
|
+
reflect: true
|
|
5842
|
+
}
|
|
5843
|
+
};
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5846
|
+
static get styles() {
|
|
5847
|
+
return [
|
|
5848
|
+
css`${styleCss$2}`,
|
|
5849
|
+
css`${colorCss$1}`,
|
|
5850
|
+
css`${tokensCss$1}`
|
|
5851
|
+
];
|
|
5852
|
+
}
|
|
5853
|
+
|
|
5854
|
+
/**
|
|
5855
|
+
* This will register this element with the browser.
|
|
5856
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
5857
|
+
*
|
|
5858
|
+
* @example
|
|
5859
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
5860
|
+
*
|
|
5861
|
+
*/
|
|
5862
|
+
static register(name = "auro-loader") {
|
|
5863
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5866
|
+
firstUpdated() {
|
|
5867
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
5868
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5871
|
+
connectedCallback() {
|
|
5872
|
+
super.connectedCallback();
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
/**
|
|
5876
|
+
* @private
|
|
5877
|
+
* @returns {Array} Numbered array for template map.
|
|
5878
|
+
*/
|
|
5879
|
+
defineTemplate() {
|
|
5880
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
5881
|
+
|
|
5882
|
+
if (this.orbit || this.laser) {
|
|
5883
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
5884
|
+
} else if (this.ringworm) {
|
|
5885
|
+
nodes = Array.from(Array(0).keys());
|
|
5886
|
+
}
|
|
5887
|
+
|
|
5888
|
+
return nodes;
|
|
5889
|
+
}
|
|
5890
|
+
|
|
5891
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
5892
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
5893
|
+
|
|
5894
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
5895
|
+
render() {
|
|
5896
|
+
return html$1`
|
|
5897
|
+
${this.defineTemplate().map((idx) => html$1`
|
|
5898
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
5899
|
+
`)}
|
|
5900
|
+
|
|
5901
|
+
<div class="no-animation">Loading...</div>
|
|
5902
|
+
|
|
5903
|
+
${this.ringworm ? html$1`
|
|
5904
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
5905
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
5906
|
+
</svg>`
|
|
5907
|
+
: ``
|
|
5908
|
+
}
|
|
5909
|
+
`;
|
|
5910
|
+
}
|
|
5911
|
+
}
|
|
5912
|
+
|
|
5913
|
+
var loaderVersion = '5.0.0';
|
|
5914
|
+
|
|
5915
|
+
/* eslint-disable max-lines, curly */
|
|
5916
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5917
|
+
// See LICENSE in the project root for license information.
|
|
5918
|
+
|
|
5919
|
+
|
|
5920
|
+
/**
|
|
5921
|
+
* @slot - Default slot for the text of the button.
|
|
5922
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
5923
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
5924
|
+
* @csspart text - Apply CSS to text slot.
|
|
5925
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
5926
|
+
*/
|
|
5927
|
+
|
|
5928
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
5929
|
+
|
|
5930
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
5931
|
+
|
|
5932
|
+
/**
|
|
5933
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
5934
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
5935
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
5936
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
5937
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
5938
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
5939
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
5940
|
+
*/
|
|
5941
|
+
class AuroButton extends AuroElement$1 {
|
|
5942
|
+
|
|
5943
|
+
/**
|
|
5944
|
+
* Enables form association for this element.
|
|
5945
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
5946
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
5947
|
+
*/
|
|
5948
|
+
static get formAssociated() {
|
|
5949
|
+
return true;
|
|
5950
|
+
}
|
|
5951
|
+
|
|
5952
|
+
constructor() {
|
|
5953
|
+
super();
|
|
5954
|
+
this.autofocus = false;
|
|
5955
|
+
this.disabled = false;
|
|
5956
|
+
this.loading = false;
|
|
5957
|
+
this.size = "md";
|
|
5958
|
+
this.shape = "rounded";
|
|
5959
|
+
this.onDark = false;
|
|
5960
|
+
this.fluid = false;
|
|
5961
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
5962
|
+
|
|
5963
|
+
// Support for HTML5 forms
|
|
5964
|
+
if (typeof this.attachInternals === 'function') {
|
|
5965
|
+
this.internals = this.attachInternals();
|
|
5966
|
+
} else {
|
|
5967
|
+
this.internals = null;
|
|
5968
|
+
|
|
5969
|
+
// eslint-disable-next-line no-console
|
|
5970
|
+
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.');
|
|
5971
|
+
}
|
|
5972
|
+
|
|
5973
|
+
/**
|
|
5974
|
+
* Generate unique names for dependency components.
|
|
5975
|
+
*/
|
|
5976
|
+
const versioning = new AuroDependencyVersioning();
|
|
5977
|
+
|
|
5978
|
+
/**
|
|
5979
|
+
* @private
|
|
5980
|
+
*/
|
|
5981
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
5982
|
+
}
|
|
5983
|
+
|
|
5984
|
+
static get styles() {
|
|
5985
|
+
return [
|
|
5986
|
+
tokensCss$2,
|
|
5987
|
+
styleCss$3,
|
|
5988
|
+
colorCss$2,
|
|
5989
|
+
shapeSize
|
|
5990
|
+
];
|
|
5991
|
+
}
|
|
5992
|
+
|
|
5993
|
+
static get properties() {
|
|
5994
|
+
return {
|
|
5995
|
+
|
|
5996
|
+
...super.properties,
|
|
5997
|
+
|
|
5998
|
+
/**
|
|
5999
|
+
* Override layout since it isn't used in this component.
|
|
6000
|
+
* @private
|
|
6001
|
+
*/
|
|
6002
|
+
layout: {
|
|
6003
|
+
type: Boolean,
|
|
6004
|
+
attribute: false,
|
|
6005
|
+
reflect: false
|
|
6006
|
+
},
|
|
6007
|
+
|
|
6008
|
+
/**
|
|
6009
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6010
|
+
*/
|
|
6011
|
+
autofocus: {
|
|
6012
|
+
type: Boolean,
|
|
6013
|
+
reflect: true
|
|
6014
|
+
},
|
|
6015
|
+
|
|
6016
|
+
/**
|
|
6017
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6018
|
+
*/
|
|
6019
|
+
disabled: {
|
|
6020
|
+
type: Boolean,
|
|
6021
|
+
reflect: true
|
|
6022
|
+
},
|
|
6023
|
+
|
|
6024
|
+
/**
|
|
6025
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6026
|
+
*/
|
|
6027
|
+
fluid: {
|
|
6028
|
+
type: Boolean,
|
|
6029
|
+
reflect: true
|
|
6030
|
+
},
|
|
6031
|
+
|
|
6032
|
+
/**
|
|
6033
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6034
|
+
*/
|
|
6035
|
+
loading: {
|
|
6036
|
+
type: Boolean,
|
|
6037
|
+
reflect: true
|
|
6038
|
+
},
|
|
6039
|
+
|
|
6040
|
+
/**
|
|
6041
|
+
* 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.
|
|
6042
|
+
*/
|
|
6043
|
+
loadingText: {
|
|
6044
|
+
type: String
|
|
6045
|
+
},
|
|
6046
|
+
|
|
6047
|
+
/**
|
|
6048
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
6049
|
+
*/
|
|
6050
|
+
tIndex: {
|
|
6051
|
+
type: String,
|
|
6052
|
+
reflect: true
|
|
6053
|
+
},
|
|
6054
|
+
|
|
6055
|
+
/**
|
|
6056
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6057
|
+
*/
|
|
6058
|
+
title: {
|
|
6059
|
+
type: String,
|
|
6060
|
+
reflect: true
|
|
6061
|
+
},
|
|
6062
|
+
|
|
6063
|
+
/**
|
|
6064
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6065
|
+
*/
|
|
6066
|
+
type: {
|
|
6067
|
+
type: String,
|
|
6068
|
+
reflect: true
|
|
6069
|
+
},
|
|
6070
|
+
|
|
6071
|
+
/**
|
|
6072
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6073
|
+
*/
|
|
6074
|
+
value: {
|
|
6075
|
+
type: String,
|
|
6076
|
+
reflect: true
|
|
6077
|
+
},
|
|
6078
|
+
|
|
6079
|
+
/**
|
|
6080
|
+
* Sets button variant option.
|
|
6081
|
+
* @default primary
|
|
6082
|
+
*/
|
|
6083
|
+
variant: {
|
|
6084
|
+
type: String,
|
|
6085
|
+
reflect: true
|
|
6086
|
+
},
|
|
6087
|
+
};
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
/**
|
|
6091
|
+
* This will register this element with the browser.
|
|
6092
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6093
|
+
*
|
|
6094
|
+
* @example
|
|
6095
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6096
|
+
*
|
|
6097
|
+
*/
|
|
6098
|
+
static register(name = "auro-button") {
|
|
6099
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6100
|
+
}
|
|
6101
|
+
|
|
6102
|
+
/**
|
|
6103
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6104
|
+
* @private
|
|
6105
|
+
* @returns {void}
|
|
6106
|
+
*/
|
|
6107
|
+
focus() {
|
|
6108
|
+
this.renderRoot.querySelector('button').focus();
|
|
6109
|
+
}
|
|
6110
|
+
|
|
6111
|
+
/**
|
|
6112
|
+
* Submits the form that this button is associated with.
|
|
6113
|
+
* @private
|
|
6114
|
+
* @returns {void}
|
|
6115
|
+
*/
|
|
6116
|
+
surfaceSubmitEvent() {
|
|
6117
|
+
if (this.form) {
|
|
6118
|
+
this.form.requestSubmit();
|
|
6119
|
+
}
|
|
6120
|
+
}
|
|
6121
|
+
|
|
6122
|
+
/**
|
|
6123
|
+
* Returns the form element that this button is associated with.
|
|
6124
|
+
* @private
|
|
6125
|
+
* @returns {HTMLFormElement | null}
|
|
6126
|
+
*/
|
|
6127
|
+
get form() {
|
|
6128
|
+
return this.internals ? this.internals.form : null;
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
/**
|
|
6132
|
+
* @private
|
|
6133
|
+
* @returns {Boolean}
|
|
6134
|
+
*/
|
|
6135
|
+
get hideText() {
|
|
6136
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6137
|
+
}
|
|
6138
|
+
|
|
6139
|
+
/**
|
|
6140
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6141
|
+
* @returns {string | undefined}
|
|
6142
|
+
* @private
|
|
6143
|
+
*/
|
|
6144
|
+
get currentAriaLabel() {
|
|
6145
|
+
if (!this.attributeWatcher) return undefined;
|
|
6146
|
+
|
|
6147
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6148
|
+
return ariaLabel || undefined;
|
|
6149
|
+
}
|
|
6150
|
+
|
|
6151
|
+
/**
|
|
6152
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6153
|
+
* @returns {string | undefined}
|
|
6154
|
+
* @private
|
|
6155
|
+
*/
|
|
6156
|
+
get currentAriaLabelledBy() {
|
|
6157
|
+
if (!this.attributeWatcher) return undefined;
|
|
6158
|
+
|
|
6159
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6160
|
+
return ariaLabelledBy || undefined;
|
|
6161
|
+
}
|
|
6162
|
+
|
|
6163
|
+
/**
|
|
6164
|
+
* Renders the default layout for the button.
|
|
6165
|
+
* @returns {TemplateResult}
|
|
6166
|
+
* @private
|
|
6167
|
+
*/
|
|
6168
|
+
renderLayoutDefault() {
|
|
6169
|
+
const classes = {
|
|
6170
|
+
"util_insetLg--squish": true,
|
|
6171
|
+
"auro-button": true,
|
|
6172
|
+
"icon-only": this.hideText,
|
|
6173
|
+
wrapper: true,
|
|
6174
|
+
loading: this.loading,
|
|
6175
|
+
};
|
|
6176
|
+
|
|
6177
|
+
return html`
|
|
6178
|
+
<button
|
|
6179
|
+
part="button"
|
|
6180
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6181
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6182
|
+
tabIndex="${ifDefined(this.tIndex)}"
|
|
6183
|
+
?autofocus="${this.autofocus}"
|
|
6184
|
+
class="${classMap(classes)}"
|
|
6185
|
+
?disabled="${this.disabled || this.loading}"
|
|
6186
|
+
?onDark="${this.onDark}"
|
|
6187
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
6188
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
6189
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
6190
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6191
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6192
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6193
|
+
>
|
|
6194
|
+
${ifDefined(this.loading ? html`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6195
|
+
|
|
6196
|
+
<span class="contentWrapper">
|
|
6197
|
+
<span class="textSlot" part="text">
|
|
6198
|
+
<slot></slot>
|
|
6199
|
+
</span>
|
|
6200
|
+
</span>
|
|
6201
|
+
</button>
|
|
6202
|
+
`;
|
|
6203
|
+
}
|
|
6204
|
+
|
|
6205
|
+
/**
|
|
6206
|
+
* Renders the layout of the button
|
|
6207
|
+
* @returns {TemplateResult}
|
|
6208
|
+
* @private
|
|
6209
|
+
*/
|
|
6210
|
+
renderLayout() {
|
|
6211
|
+
return this.renderLayoutDefault();
|
|
6212
|
+
}
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
var buttonVersion = '11.0.0';
|
|
6216
|
+
|
|
6217
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6218
|
+
// See LICENSE in the project root for license information.
|
|
6219
|
+
|
|
6220
|
+
|
|
6221
|
+
/**
|
|
6222
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
6223
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
6224
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6225
|
+
*/
|
|
6226
|
+
|
|
6227
|
+
class AuroElement extends LitElement {
|
|
6228
|
+
|
|
6229
|
+
// function to define props used within the scope of this component
|
|
6230
|
+
static get properties() {
|
|
6231
|
+
return {
|
|
6232
|
+
hidden: { type: Boolean,
|
|
6233
|
+
reflect: true },
|
|
6234
|
+
hiddenVisually: { type: Boolean,
|
|
6235
|
+
reflect: true },
|
|
6236
|
+
hiddenAudible: { type: Boolean,
|
|
6237
|
+
reflect: true },
|
|
6238
|
+
};
|
|
6239
|
+
}
|
|
6240
|
+
|
|
6241
|
+
/**
|
|
6242
|
+
* @private Function that determines state of aria-hidden
|
|
6243
|
+
*/
|
|
6244
|
+
hideAudible(value) {
|
|
6245
|
+
if (value) {
|
|
6246
|
+
return 'true'
|
|
6247
|
+
}
|
|
6248
|
+
|
|
6249
|
+
return 'false'
|
|
6250
|
+
}
|
|
6251
|
+
}
|
|
6252
|
+
|
|
6253
|
+
var error = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
6254
|
+
|
|
6255
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
6256
|
+
|
|
6257
|
+
const _fetchMap = new Map();
|
|
6258
|
+
|
|
6259
|
+
/**
|
|
6260
|
+
* A callback to parse Response body.
|
|
6261
|
+
*
|
|
6262
|
+
* @callback ResponseParser
|
|
6263
|
+
* @param {Fetch.Response} response
|
|
6264
|
+
* @returns {Promise}
|
|
6265
|
+
*/
|
|
6266
|
+
|
|
6267
|
+
/**
|
|
6268
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
6269
|
+
*
|
|
6270
|
+
* @param {String} uri
|
|
6271
|
+
* @param {Object} [options={}]
|
|
6272
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
6273
|
+
* @returns {Promise}
|
|
6274
|
+
*/
|
|
6275
|
+
const cacheFetch = (uri, options = {}) => {
|
|
6276
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
6277
|
+
if (!_fetchMap.has(uri)) {
|
|
6278
|
+
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
6279
|
+
}
|
|
6280
|
+
return _fetchMap.get(uri);
|
|
6281
|
+
};
|
|
6282
|
+
|
|
6283
|
+
var styleCss$1$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}`;
|
|
6284
|
+
|
|
6285
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6286
|
+
// See LICENSE in the project root for license information.
|
|
6287
|
+
|
|
6288
|
+
|
|
6289
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
6290
|
+
/**
|
|
6291
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
6292
|
+
*/
|
|
6293
|
+
|
|
6294
|
+
// build the component class
|
|
6295
|
+
class BaseIcon extends AuroElement {
|
|
6296
|
+
constructor() {
|
|
6297
|
+
super();
|
|
6298
|
+
this.onDark = false;
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
// function to define props used within the scope of this component
|
|
6302
|
+
static get properties() {
|
|
6303
|
+
return {
|
|
6304
|
+
...super.properties,
|
|
6305
|
+
|
|
6306
|
+
/**
|
|
6307
|
+
* Set value for on-dark version of auro-icon.
|
|
6308
|
+
*/
|
|
6309
|
+
onDark: {
|
|
6310
|
+
type: Boolean,
|
|
6311
|
+
reflect: true
|
|
6312
|
+
},
|
|
6313
|
+
|
|
5366
6314
|
/**
|
|
5367
6315
|
* @private
|
|
5368
6316
|
*/
|
|
@@ -5416,9 +6364,9 @@ class BaseIcon extends AuroElement {
|
|
|
5416
6364
|
}
|
|
5417
6365
|
}
|
|
5418
6366
|
|
|
5419
|
-
var tokensCss$
|
|
6367
|
+
var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
5420
6368
|
|
|
5421
|
-
var colorCss$
|
|
6369
|
+
var colorCss$4 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5422
6370
|
|
|
5423
6371
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5424
6372
|
// See LICENSE in the project root for license information.
|
|
@@ -5576,9 +6524,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5576
6524
|
static get styles() {
|
|
5577
6525
|
return [
|
|
5578
6526
|
super.styles,
|
|
5579
|
-
css`${tokensCss$
|
|
6527
|
+
css`${tokensCss$3}`,
|
|
5580
6528
|
css`${styleCss$1$1}`,
|
|
5581
|
-
css`${colorCss$
|
|
6529
|
+
css`${colorCss$4}`
|
|
5582
6530
|
];
|
|
5583
6531
|
}
|
|
5584
6532
|
|
|
@@ -5612,8 +6560,12 @@ class AuroIcon extends BaseIcon {
|
|
|
5612
6560
|
async firstUpdated() {
|
|
5613
6561
|
await super.firstUpdated();
|
|
5614
6562
|
|
|
5615
|
-
|
|
5616
|
-
|
|
6563
|
+
/**
|
|
6564
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6565
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6566
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6567
|
+
*/
|
|
6568
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5617
6569
|
const svgDesc = this.svg.querySelector('desc');
|
|
5618
6570
|
|
|
5619
6571
|
if (svgDesc) {
|
|
@@ -5657,7 +6609,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5657
6609
|
}
|
|
5658
6610
|
}
|
|
5659
6611
|
|
|
5660
|
-
var iconVersion = '8.0.
|
|
6612
|
+
var iconVersion = '8.0.4';
|
|
5661
6613
|
|
|
5662
6614
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5663
6615
|
// See LICENSE in the project root for license information.
|
|
@@ -5666,7 +6618,7 @@ var iconVersion = '8.0.3';
|
|
|
5666
6618
|
|
|
5667
6619
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5668
6620
|
|
|
5669
|
-
let AuroLibraryRuntimeUtils$
|
|
6621
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5670
6622
|
|
|
5671
6623
|
/* eslint-disable jsdoc/require-param */
|
|
5672
6624
|
|
|
@@ -5729,7 +6681,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
5729
6681
|
}
|
|
5730
6682
|
};
|
|
5731
6683
|
|
|
5732
|
-
var styleCss$
|
|
6684
|
+
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)}`;
|
|
5733
6685
|
|
|
5734
6686
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5735
6687
|
// See LICENSE in the project root for license information.
|
|
@@ -5758,7 +6710,7 @@ class AuroHeader extends LitElement {
|
|
|
5758
6710
|
/**
|
|
5759
6711
|
* @private
|
|
5760
6712
|
*/
|
|
5761
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6713
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5762
6714
|
}
|
|
5763
6715
|
|
|
5764
6716
|
// function to define props used within the scope of this component
|
|
@@ -5776,7 +6728,7 @@ class AuroHeader extends LitElement {
|
|
|
5776
6728
|
}
|
|
5777
6729
|
|
|
5778
6730
|
static get styles() {
|
|
5779
|
-
return [styleCss$
|
|
6731
|
+
return [styleCss$5];
|
|
5780
6732
|
}
|
|
5781
6733
|
|
|
5782
6734
|
/**
|
|
@@ -5788,7 +6740,7 @@ class AuroHeader extends LitElement {
|
|
|
5788
6740
|
*
|
|
5789
6741
|
*/
|
|
5790
6742
|
static register(name = "auro-header") {
|
|
5791
|
-
AuroLibraryRuntimeUtils$
|
|
6743
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5792
6744
|
}
|
|
5793
6745
|
|
|
5794
6746
|
firstUpdated() {
|
|
@@ -5884,17 +6836,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
5884
6836
|
|
|
5885
6837
|
this.large = false;
|
|
5886
6838
|
|
|
5887
|
-
AuroLibraryRuntimeUtils$
|
|
6839
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5888
6840
|
|
|
5889
6841
|
const versioning = new AuroDependencyVersioning();
|
|
6842
|
+
|
|
6843
|
+
/**
|
|
6844
|
+
* @private
|
|
6845
|
+
*/
|
|
5890
6846
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
6847
|
+
|
|
6848
|
+
/**
|
|
6849
|
+
* @private
|
|
6850
|
+
*/
|
|
5891
6851
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
6852
|
+
|
|
6853
|
+
/**
|
|
6854
|
+
* @private
|
|
6855
|
+
*/
|
|
6856
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
5892
6857
|
}
|
|
5893
6858
|
|
|
5894
6859
|
static get styles() {
|
|
5895
6860
|
return [
|
|
5896
|
-
colorCss$
|
|
5897
|
-
styleCss$
|
|
6861
|
+
colorCss$3,
|
|
6862
|
+
styleCss$4,
|
|
5898
6863
|
tokenCss
|
|
5899
6864
|
];
|
|
5900
6865
|
}
|
|
@@ -5923,7 +6888,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5923
6888
|
*
|
|
5924
6889
|
*/
|
|
5925
6890
|
static register(name = "auro-bibtemplate") {
|
|
5926
|
-
AuroLibraryRuntimeUtils$
|
|
6891
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
5927
6892
|
}
|
|
5928
6893
|
|
|
5929
6894
|
/**
|
|
@@ -5981,9 +6946,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
5981
6946
|
<div id="bibTemplate" part="bibtemplate">
|
|
5982
6947
|
${this.isFullscreen ? html`
|
|
5983
6948
|
<div id="headerContainer">
|
|
5984
|
-
|
|
6949
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
5985
6950
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
5986
|
-
|
|
6951
|
+
</${this.buttonTag}>
|
|
5987
6952
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
5988
6953
|
<slot name="header"></slot>
|
|
5989
6954
|
</${this.headerTag}>
|
|
@@ -6215,11 +7180,11 @@ class AuroHelpText extends LitElement {
|
|
|
6215
7180
|
|
|
6216
7181
|
var helpTextVersion = '1.0.0';
|
|
6217
7182
|
|
|
6218
|
-
css`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:
|
|
7183
|
+
css`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;vertical-align:middle}:host .wrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .wrapper[class*=-lg]{padding:var(--ds-size-150, 0.75rem)}:host([root]) .wrapper[class*=-xl]{padding:var(--ds-size-200, 1rem)}`;
|
|
6219
7184
|
|
|
6220
7185
|
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)}`;
|
|
6221
7186
|
|
|
6222
|
-
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)}`;
|
|
7187
|
+
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-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
6223
7188
|
|
|
6224
7189
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6225
7190
|
// See LICENSE in the project root for license information.
|
|
@@ -6266,9 +7231,9 @@ function arrayConverter(value) {
|
|
|
6266
7231
|
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6267
7232
|
}
|
|
6268
7233
|
|
|
6269
|
-
css`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-
|
|
7234
|
+
css`:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);margin-bottom:var(--ds-size-50, 0.25rem)}:host .wrapper[class*=-xl]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);margin-bottom:var(--ds-size-100, 0.5rem)}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
6270
7235
|
|
|
6271
|
-
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)}`;
|
|
7236
|
+
css`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
6272
7237
|
|
|
6273
7238
|
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}`;
|
|
6274
7239
|
|
|
@@ -6276,7 +7241,7 @@ css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
|
|
|
6276
7241
|
|
|
6277
7242
|
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)}`;
|
|
6278
7243
|
|
|
6279
|
-
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center
|
|
7244
|
+
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 8px 0 24px}:host([layout*=classic]) .triggerContent{padding:0 8px}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}: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-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}`;
|
|
6280
7245
|
|
|
6281
7246
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6282
7247
|
// See LICENSE in the project root for license information.
|
|
@@ -6292,6 +7257,7 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
|
|
|
6292
7257
|
* @slot helpText - Defines the content of the helpText.
|
|
6293
7258
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6294
7259
|
* @slot valueText - Dropdown value text display.
|
|
7260
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6295
7261
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6296
7262
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6297
7263
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6309,11 +7275,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6309
7275
|
const idSubstrEnd = 8;
|
|
6310
7276
|
const idSubstrStart = 2;
|
|
6311
7277
|
|
|
6312
|
-
this.matchWidth =
|
|
7278
|
+
this.matchWidth = false;
|
|
6313
7279
|
|
|
6314
7280
|
// Layout Config
|
|
6315
|
-
this.layout = '
|
|
6316
|
-
this.shape = '
|
|
7281
|
+
this.layout = 'snowflake';
|
|
7282
|
+
this.shape = 'snowflake';
|
|
6317
7283
|
this.size = 'xl';
|
|
6318
7284
|
|
|
6319
7285
|
// floaterConfig
|
|
@@ -6324,6 +7290,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6324
7290
|
|
|
6325
7291
|
this.forceDisplayValue = false;
|
|
6326
7292
|
|
|
7293
|
+
this.layout = 'classic';
|
|
7294
|
+
this.shape = 'classic';
|
|
7295
|
+
this.size = 'xl';
|
|
7296
|
+
|
|
6327
7297
|
/**
|
|
6328
7298
|
* @private
|
|
6329
7299
|
*/
|
|
@@ -6339,7 +7309,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6339
7309
|
/**
|
|
6340
7310
|
* @private
|
|
6341
7311
|
*/
|
|
6342
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7312
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6343
7313
|
|
|
6344
7314
|
/**
|
|
6345
7315
|
* Generate unique names for dependency components.
|
|
@@ -6454,14 +7424,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6454
7424
|
reflect: true
|
|
6455
7425
|
},
|
|
6456
7426
|
|
|
6457
|
-
/**
|
|
6458
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6459
|
-
*/
|
|
6460
|
-
flexMenuWidth: {
|
|
6461
|
-
type: Boolean,
|
|
6462
|
-
reflect: true
|
|
6463
|
-
},
|
|
6464
|
-
|
|
6465
7427
|
/**
|
|
6466
7428
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6467
7429
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6555,7 +7517,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6555
7517
|
* "top" | "right" | "bottom" | "left" |
|
|
6556
7518
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6557
7519
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6558
|
-
* "left-start" | "left-end"
|
|
7520
|
+
* "left-start" | "left-end".
|
|
6559
7521
|
* @default bottom-start
|
|
6560
7522
|
*/
|
|
6561
7523
|
placement: {
|
|
@@ -6660,11 +7622,24 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6660
7622
|
static get styles() {
|
|
6661
7623
|
return [
|
|
6662
7624
|
css`${shapeSizeCss$1}`,
|
|
6663
|
-
css`${tokensCss$
|
|
7625
|
+
css`${tokensCss$5}`,
|
|
6664
7626
|
css`${styleCss}`,
|
|
6665
7627
|
];
|
|
6666
7628
|
}
|
|
6667
7629
|
|
|
7630
|
+
/**
|
|
7631
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7632
|
+
* @private
|
|
7633
|
+
* @returns {void}
|
|
7634
|
+
*/
|
|
7635
|
+
get commonLabelClasses() {
|
|
7636
|
+
return {
|
|
7637
|
+
'is-disabled': this.disabled,
|
|
7638
|
+
'withValue': this.value && this.value.length > 0,
|
|
7639
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7640
|
+
};
|
|
7641
|
+
}
|
|
7642
|
+
|
|
6668
7643
|
/**
|
|
6669
7644
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6670
7645
|
* @private
|
|
@@ -6708,7 +7683,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6708
7683
|
*
|
|
6709
7684
|
*/
|
|
6710
7685
|
static register(name = "auro-select") {
|
|
6711
|
-
AuroLibraryRuntimeUtils$
|
|
7686
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6712
7687
|
}
|
|
6713
7688
|
|
|
6714
7689
|
/**
|
|
@@ -6768,6 +7743,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6768
7743
|
return;
|
|
6769
7744
|
}
|
|
6770
7745
|
|
|
7746
|
+
// set menu's default size if there it's not specified.
|
|
7747
|
+
if (!this.menu.getAttribute('size')) {
|
|
7748
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
7749
|
+
}
|
|
7750
|
+
|
|
7751
|
+
if (!this.getAttribute('shape')) {
|
|
7752
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
7753
|
+
}
|
|
7754
|
+
|
|
6771
7755
|
if (this.multiSelect) {
|
|
6772
7756
|
this.menu.multiSelect = this.multiSelect;
|
|
6773
7757
|
}
|
|
@@ -7031,8 +8015,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7031
8015
|
// Add the tag name as an attribute if it is different than the component name
|
|
7032
8016
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7033
8017
|
|
|
7034
|
-
this.configureMenu();
|
|
7035
8018
|
this.configureDropdown();
|
|
8019
|
+
this.configureMenu();
|
|
7036
8020
|
this.configureSelect();
|
|
7037
8021
|
|
|
7038
8022
|
// Set the initial value in auro-menu if defined
|
|
@@ -7089,6 +8073,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7089
8073
|
if (changedProperties.has('error')) {
|
|
7090
8074
|
this.validate(true);
|
|
7091
8075
|
}
|
|
8076
|
+
|
|
8077
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8078
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8079
|
+
}
|
|
8080
|
+
|
|
8081
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8082
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8083
|
+
}
|
|
7092
8084
|
}
|
|
7093
8085
|
|
|
7094
8086
|
/**
|
|
@@ -7185,7 +8177,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7185
8177
|
|
|
7186
8178
|
renderNativeSelect() {
|
|
7187
8179
|
return html`
|
|
7188
|
-
<div class="nativeSelectWrapper">
|
|
8180
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7189
8181
|
<select
|
|
7190
8182
|
tabindex="-1"
|
|
7191
8183
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7268,9 +8260,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7268
8260
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7269
8261
|
</div>
|
|
7270
8262
|
<${this.dropdownTag}
|
|
8263
|
+
a11yRole="select"
|
|
7271
8264
|
?autoPlacement="${this.autoPlacement}"
|
|
7272
8265
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7273
|
-
?matchWidth="${
|
|
8266
|
+
?matchWidth="${this.matchWidth}"
|
|
7274
8267
|
?noFlip="${this.noFlip}"
|
|
7275
8268
|
?onDark="${this.onDark}"
|
|
7276
8269
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
@@ -7289,7 +8282,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7289
8282
|
</div>
|
|
7290
8283
|
<div class="mainContent">
|
|
7291
8284
|
<div class="${classMap(valueContainerClasses)}">
|
|
7292
|
-
<label>
|
|
8285
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7293
8286
|
<slot name="label"></slot>
|
|
7294
8287
|
</label>
|
|
7295
8288
|
<div class="value" id="value"></div>
|
|
@@ -7350,7 +8343,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7350
8343
|
<${this.dropdownTag}
|
|
7351
8344
|
?autoPlacement="${this.autoPlacement}"
|
|
7352
8345
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7353
|
-
?matchWidth="${
|
|
8346
|
+
?matchWidth="${this.matchWidth}"
|
|
7354
8347
|
?noFlip="${this.noFlip}"
|
|
7355
8348
|
?onDark="${this.onDark}"
|
|
7356
8349
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
@@ -7369,7 +8362,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7369
8362
|
</div>
|
|
7370
8363
|
<div class="mainContent">
|
|
7371
8364
|
<div class="${classMap(valueContainerClasses)}">
|
|
7372
|
-
<label>
|
|
8365
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
7373
8366
|
<slot name="label"></slot>
|
|
7374
8367
|
</label>
|
|
7375
8368
|
<div class="value" id="value"></div>
|
|
@@ -7393,6 +8386,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7393
8386
|
${this.renderHtmlHelpText()}
|
|
7394
8387
|
</div>
|
|
7395
8388
|
</${this.dropdownTag}>
|
|
8389
|
+
${this.renderNativeSelect()}
|
|
7396
8390
|
</div>
|
|
7397
8391
|
`;
|
|
7398
8392
|
}
|
|
@@ -7403,11 +8397,77 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7403
8397
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7404
8398
|
*/
|
|
7405
8399
|
renderLayoutClassic() {
|
|
8400
|
+
const placeholderClass = {
|
|
8401
|
+
hidden: this.value,
|
|
8402
|
+
};
|
|
8403
|
+
|
|
8404
|
+
const displayValueClasses = {
|
|
8405
|
+
'displayValue': true,
|
|
8406
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8407
|
+
'hasFocus': this.isPopoverVisible,
|
|
8408
|
+
'withValue': this.value && this.value.length > 0,
|
|
8409
|
+
'force': this.forceDisplayValue,
|
|
8410
|
+
};
|
|
8411
|
+
|
|
8412
|
+
const valueContainerClasses = {
|
|
8413
|
+
'valueContainer': true,
|
|
8414
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8415
|
+
};
|
|
8416
|
+
|
|
7406
8417
|
return html`
|
|
7407
8418
|
<div
|
|
7408
|
-
class="${classMap(this.commonWrapperClasses)}
|
|
8419
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7409
8420
|
part="wrapper">
|
|
7410
|
-
|
|
8421
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8422
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8423
|
+
</div>
|
|
8424
|
+
<${this.dropdownTag}
|
|
8425
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8426
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8427
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8428
|
+
?noFlip="${this.noFlip}"
|
|
8429
|
+
?onDark="${this.onDark}"
|
|
8430
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8431
|
+
.offset="${this.offset}"
|
|
8432
|
+
.placement="${this.placement}"
|
|
8433
|
+
chevron
|
|
8434
|
+
fluid
|
|
8435
|
+
for="selectMenu"
|
|
8436
|
+
layout="${this.layout}"
|
|
8437
|
+
part="dropdown"
|
|
8438
|
+
shape="${this.shape}"
|
|
8439
|
+
size="${this.size}">
|
|
8440
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8441
|
+
<div class="accents left">
|
|
8442
|
+
<slot name="typeIcon"></slot>
|
|
8443
|
+
</div>
|
|
8444
|
+
<div class="mainContent">
|
|
8445
|
+
<div class="${classMap(valueContainerClasses)}">
|
|
8446
|
+
<label class="${classMap(this.commonLabelClasses)}">
|
|
8447
|
+
<slot name="label"></slot>
|
|
8448
|
+
</label>
|
|
8449
|
+
<div class="value" id="value"></div>
|
|
8450
|
+
${this.value ? undefined : html`
|
|
8451
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
8452
|
+
<slot name="placeholder"></slot>
|
|
8453
|
+
</div>
|
|
8454
|
+
`}
|
|
8455
|
+
</div>
|
|
8456
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8457
|
+
<slot name="displayValue"></slot>
|
|
8458
|
+
</div>
|
|
8459
|
+
</div>
|
|
8460
|
+
<div class="accents right"></div>
|
|
8461
|
+
</div>
|
|
8462
|
+
<div class="menuWrapper"></div>
|
|
8463
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8464
|
+
<slot></slot>
|
|
8465
|
+
</${this.bibtemplateTag}>
|
|
8466
|
+
<div slot="helpText">
|
|
8467
|
+
${this.renderHtmlHelpText()}
|
|
8468
|
+
</div>
|
|
8469
|
+
</${this.dropdownTag}>
|
|
8470
|
+
${this.renderNativeSelect()}
|
|
7411
8471
|
</div>
|
|
7412
8472
|
`;
|
|
7413
8473
|
}
|
|
@@ -7472,7 +8532,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7472
8532
|
?autoPlacement="${this.autoPlacement}"
|
|
7473
8533
|
?disabled="${this.disabled}"
|
|
7474
8534
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7475
|
-
?matchWidth="${
|
|
8535
|
+
?matchWidth="${this.matchWidth}"
|
|
7476
8536
|
?noFlip="${this.noFlip}"
|
|
7477
8537
|
?onDark="${this.onDark}"
|
|
7478
8538
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|