@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
|
@@ -147,7 +147,7 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
147
147
|
*/
|
|
148
148
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
149
149
|
|
|
150
|
-
let AuroElement$
|
|
150
|
+
let AuroElement$4 = class AuroElement extends i$2 {
|
|
151
151
|
static get properties() {
|
|
152
152
|
return {
|
|
153
153
|
|
|
@@ -182,18 +182,21 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
resetShapeClasses() {
|
|
185
|
-
|
|
186
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
185
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
187
186
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
187
|
+
if (wrapper) {
|
|
188
|
+
wrapper.classList.forEach((className) => {
|
|
189
|
+
if (className.startsWith('shape-')) {
|
|
190
|
+
wrapper.classList.remove(className);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
194
193
|
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (this.shape && this.size) {
|
|
197
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
198
|
+
} else {
|
|
199
|
+
wrapper.classList.add('shape-none');
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
|
|
@@ -239,7 +242,7 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
239
242
|
}
|
|
240
243
|
};
|
|
241
244
|
|
|
242
|
-
var shapeSizeCss$1 = i$5`.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:
|
|
245
|
+
var shapeSizeCss$1 = i$5`.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}`;
|
|
243
246
|
|
|
244
247
|
var tokensCss$5 = i$5`: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}`;
|
|
245
248
|
|
|
@@ -659,7 +662,7 @@ const {
|
|
|
659
662
|
|
|
660
663
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
661
664
|
|
|
662
|
-
let AuroLibraryRuntimeUtils$
|
|
665
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
663
666
|
|
|
664
667
|
/* eslint-disable jsdoc/require-param */
|
|
665
668
|
|
|
@@ -729,7 +732,7 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
729
732
|
class AuroFormValidation {
|
|
730
733
|
|
|
731
734
|
constructor() {
|
|
732
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
735
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
733
736
|
}
|
|
734
737
|
|
|
735
738
|
/**
|
|
@@ -1008,7 +1011,9 @@ class AuroFormValidation {
|
|
|
1008
1011
|
elem.validity = this.auroInputElements[0].validity;
|
|
1009
1012
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1010
1013
|
|
|
1011
|
-
|
|
1014
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1015
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1016
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1012
1017
|
elem.validity = this.auroInputElements[1].validity;
|
|
1013
1018
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1014
1019
|
}
|
|
@@ -3561,9 +3566,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3561
3566
|
}
|
|
3562
3567
|
};
|
|
3563
3568
|
|
|
3564
|
-
var tokensCss$2$
|
|
3569
|
+
var tokensCss$2$2 = i$5`: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)}`;
|
|
3565
3570
|
|
|
3566
|
-
var colorCss$3$
|
|
3571
|
+
var colorCss$3$2 = i$5`: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)}`;
|
|
3567
3572
|
|
|
3568
3573
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3569
3574
|
// See LICENSE in the project root for license information.
|
|
@@ -3721,9 +3726,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3721
3726
|
static get styles() {
|
|
3722
3727
|
return [
|
|
3723
3728
|
super.styles,
|
|
3724
|
-
i$5`${tokensCss$2$
|
|
3729
|
+
i$5`${tokensCss$2$2}`,
|
|
3725
3730
|
i$5`${styleCss$2$2}`,
|
|
3726
|
-
i$5`${colorCss$3$
|
|
3731
|
+
i$5`${colorCss$3$2}`
|
|
3727
3732
|
];
|
|
3728
3733
|
}
|
|
3729
3734
|
|
|
@@ -3757,8 +3762,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3757
3762
|
async firstUpdated() {
|
|
3758
3763
|
await super.firstUpdated();
|
|
3759
3764
|
|
|
3760
|
-
|
|
3761
|
-
|
|
3765
|
+
/**
|
|
3766
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3767
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3768
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3769
|
+
*/
|
|
3770
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3762
3771
|
const svgDesc = this.svg.querySelector('desc');
|
|
3763
3772
|
|
|
3764
3773
|
if (svgDesc) {
|
|
@@ -3804,11 +3813,11 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3804
3813
|
|
|
3805
3814
|
var iconVersion$2 = '6.1.2';
|
|
3806
3815
|
|
|
3807
|
-
var styleCss$1$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{
|
|
3816
|
+
var styleCss$1$2 = i$5`: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}`;
|
|
3808
3817
|
|
|
3809
|
-
var colorCss$2$
|
|
3818
|
+
var colorCss$2$2 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3810
3819
|
|
|
3811
|
-
var tokensCss$1$
|
|
3820
|
+
var tokensCss$1$2 = i$5`: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)}`;
|
|
3812
3821
|
|
|
3813
3822
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3814
3823
|
// See LICENSE in the project root for license information.
|
|
@@ -3829,7 +3838,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3829
3838
|
*/
|
|
3830
3839
|
|
|
3831
3840
|
class AuroDropdownBib extends i$2 {
|
|
3832
|
-
|
|
3841
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3833
3842
|
constructor() {
|
|
3834
3843
|
super();
|
|
3835
3844
|
|
|
@@ -3839,13 +3848,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3839
3848
|
this._mobileBreakpointValue = undefined;
|
|
3840
3849
|
|
|
3841
3850
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3851
|
+
|
|
3852
|
+
this.shape = "rounded";
|
|
3853
|
+
this.matchWidth = false;
|
|
3842
3854
|
}
|
|
3843
3855
|
|
|
3844
3856
|
static get styles() {
|
|
3845
3857
|
return [
|
|
3846
3858
|
styleCss$1$2,
|
|
3847
|
-
colorCss$2$
|
|
3848
|
-
tokensCss$1$
|
|
3859
|
+
colorCss$2$2,
|
|
3860
|
+
tokensCss$1$2
|
|
3849
3861
|
];
|
|
3850
3862
|
}
|
|
3851
3863
|
|
|
@@ -3876,6 +3888,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
3876
3888
|
reflect: true
|
|
3877
3889
|
},
|
|
3878
3890
|
|
|
3891
|
+
/**
|
|
3892
|
+
* If declared, the bib width will match the trigger width.
|
|
3893
|
+
* @private
|
|
3894
|
+
*/
|
|
3895
|
+
matchWidth: {
|
|
3896
|
+
type: Boolean,
|
|
3897
|
+
reflect: true
|
|
3898
|
+
},
|
|
3899
|
+
|
|
3879
3900
|
/**
|
|
3880
3901
|
* If declared, will apply border-radius to the bib.
|
|
3881
3902
|
*/
|
|
@@ -3889,6 +3910,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
3889
3910
|
*/
|
|
3890
3911
|
bibTemplate: {
|
|
3891
3912
|
type: Object
|
|
3913
|
+
},
|
|
3914
|
+
|
|
3915
|
+
shape: {
|
|
3916
|
+
type: String,
|
|
3917
|
+
reflect: true
|
|
3892
3918
|
}
|
|
3893
3919
|
};
|
|
3894
3920
|
}
|
|
@@ -3968,8 +3994,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3968
3994
|
|
|
3969
3995
|
// function that renders the HTML and CSS into the scope of the component
|
|
3970
3996
|
render() {
|
|
3997
|
+
const classes = {
|
|
3998
|
+
container: true
|
|
3999
|
+
};
|
|
4000
|
+
|
|
4001
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4002
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4003
|
+
classes[`shape-${this.shape}`] = true;
|
|
4004
|
+
|
|
3971
4005
|
return u`
|
|
3972
|
-
<div class="
|
|
4006
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
3973
4007
|
<slot></slot>
|
|
3974
4008
|
</div>
|
|
3975
4009
|
`;
|
|
@@ -3978,17 +4012,17 @@ class AuroDropdownBib extends i$2 {
|
|
|
3978
4012
|
|
|
3979
4013
|
var dropdownVersion$1 = '3.0.0';
|
|
3980
4014
|
|
|
3981
|
-
var shapeSizeCss = i$5`.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:
|
|
4015
|
+
var shapeSizeCss = i$5`.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}`;
|
|
3982
4016
|
|
|
3983
4017
|
var colorCss$1$2 = i$5`: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)}`;
|
|
3984
4018
|
|
|
3985
|
-
var classicColorCss = i$5`: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)
|
|
4019
|
+
var classicColorCss = i$5`: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)}`;
|
|
3986
4020
|
|
|
3987
|
-
var classicLayoutCss = i$5`: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;
|
|
4021
|
+
var classicLayoutCss = i$5`: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}`;
|
|
3988
4022
|
|
|
3989
|
-
var styleEmphasizedCss = i$5`: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;
|
|
4023
|
+
var styleEmphasizedCss = i$5`: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)}`;
|
|
3990
4024
|
|
|
3991
|
-
var styleSnowflakeCss = i$5`: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;
|
|
4025
|
+
var styleSnowflakeCss = i$5`: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)}`;
|
|
3992
4026
|
|
|
3993
4027
|
var colorCss$5 = i$5`: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)}`;
|
|
3994
4028
|
|
|
@@ -4003,7 +4037,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
4003
4037
|
|
|
4004
4038
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4005
4039
|
|
|
4006
|
-
let AuroLibraryRuntimeUtils$
|
|
4040
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
4007
4041
|
|
|
4008
4042
|
/* eslint-disable jsdoc/require-param */
|
|
4009
4043
|
|
|
@@ -4084,7 +4118,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4084
4118
|
this.onDark = false;
|
|
4085
4119
|
this.hasTextContent = false;
|
|
4086
4120
|
|
|
4087
|
-
AuroLibraryRuntimeUtils$
|
|
4121
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4088
4122
|
}
|
|
4089
4123
|
|
|
4090
4124
|
static get styles() {
|
|
@@ -4140,7 +4174,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4140
4174
|
*
|
|
4141
4175
|
*/
|
|
4142
4176
|
static register(name = "auro-helptext") {
|
|
4143
|
-
AuroLibraryRuntimeUtils$
|
|
4177
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
4144
4178
|
}
|
|
4145
4179
|
|
|
4146
4180
|
updated() {
|
|
@@ -4198,7 +4232,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4198
4232
|
|
|
4199
4233
|
var helpTextVersion$1 = '1.0.0';
|
|
4200
4234
|
|
|
4201
|
-
let AuroElement$
|
|
4235
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
4202
4236
|
static get properties() {
|
|
4203
4237
|
return {
|
|
4204
4238
|
|
|
@@ -4233,18 +4267,21 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4233
4267
|
}
|
|
4234
4268
|
|
|
4235
4269
|
resetShapeClasses() {
|
|
4236
|
-
|
|
4237
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4270
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4238
4271
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4272
|
+
if (wrapper) {
|
|
4273
|
+
wrapper.classList.forEach((className) => {
|
|
4274
|
+
if (className.startsWith('shape-')) {
|
|
4275
|
+
wrapper.classList.remove(className);
|
|
4276
|
+
}
|
|
4277
|
+
});
|
|
4245
4278
|
|
|
4246
|
-
|
|
4247
|
-
|
|
4279
|
+
}
|
|
4280
|
+
|
|
4281
|
+
if (this.shape && this.size) {
|
|
4282
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4283
|
+
} else {
|
|
4284
|
+
wrapper.classList.add('shape-none');
|
|
4248
4285
|
}
|
|
4249
4286
|
}
|
|
4250
4287
|
|
|
@@ -4307,7 +4344,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4307
4344
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4308
4345
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4309
4346
|
*/
|
|
4310
|
-
class AuroDropdown extends AuroElement$
|
|
4347
|
+
class AuroDropdown extends AuroElement$3 {
|
|
4311
4348
|
constructor() {
|
|
4312
4349
|
super();
|
|
4313
4350
|
|
|
@@ -4320,19 +4357,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4320
4357
|
|
|
4321
4358
|
// Layout Config
|
|
4322
4359
|
this.layout = 'classic';
|
|
4323
|
-
this.shape = '
|
|
4360
|
+
this.shape = 'classic';
|
|
4324
4361
|
this.size = 'xl';
|
|
4362
|
+
|
|
4325
4363
|
this.parentBorder = false;
|
|
4326
4364
|
|
|
4327
4365
|
this.privateDefaults();
|
|
4328
4366
|
}
|
|
4329
4367
|
|
|
4330
|
-
get commonLabelClasses() {
|
|
4331
|
-
return {
|
|
4332
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4333
|
-
};
|
|
4334
|
-
}
|
|
4335
|
-
|
|
4336
4368
|
get commonWrapperClasses() {
|
|
4337
4369
|
return {
|
|
4338
4370
|
'trigger': true,
|
|
@@ -4717,7 +4749,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4717
4749
|
static get styles() {
|
|
4718
4750
|
return [
|
|
4719
4751
|
colorCss$1$2,
|
|
4720
|
-
tokensCss$1$
|
|
4752
|
+
tokensCss$1$2,
|
|
4721
4753
|
|
|
4722
4754
|
// default layout
|
|
4723
4755
|
classicColorCss,
|
|
@@ -5005,14 +5037,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5005
5037
|
* @returns {void}
|
|
5006
5038
|
*/
|
|
5007
5039
|
handleTriggerContentSlotChange(event) {
|
|
5008
|
-
|
|
5009
5040
|
this.floater.handleTriggerTabIndex();
|
|
5010
5041
|
|
|
5011
5042
|
// Get the trigger
|
|
5012
5043
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5013
5044
|
|
|
5014
5045
|
// Get the trigger slot
|
|
5015
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5046
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
5016
5047
|
|
|
5017
5048
|
// If there's a trigger slot
|
|
5018
5049
|
if (triggerSlot) {
|
|
@@ -5084,29 +5115,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5084
5115
|
}
|
|
5085
5116
|
}
|
|
5086
5117
|
|
|
5087
|
-
/**
|
|
5088
|
-
* @private
|
|
5089
|
-
* @method handleLabelSlotChange
|
|
5090
|
-
* @param {event} event - The event object representing the slot change.
|
|
5091
|
-
* @description Handles the slot change event for the label slot.
|
|
5092
|
-
*/
|
|
5093
|
-
handleLabelSlotChange (event) {
|
|
5094
|
-
|
|
5095
|
-
// Get the nodes from the event
|
|
5096
|
-
const nodes = event.target.assignedNodes();
|
|
5097
|
-
|
|
5098
|
-
// Guard clause for no nodes
|
|
5099
|
-
if (!nodes) {
|
|
5100
|
-
return;
|
|
5101
|
-
}
|
|
5102
|
-
|
|
5103
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
5104
|
-
const nodesArr = Array.from(nodes);
|
|
5105
|
-
|
|
5106
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
5107
|
-
this.labeled = nodesArr.length > 0;
|
|
5108
|
-
}
|
|
5109
|
-
|
|
5110
5118
|
/**
|
|
5111
5119
|
* Returns HTML for the common portion of the layouts.
|
|
5112
5120
|
* @private
|
|
@@ -5121,22 +5129,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5121
5129
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5122
5130
|
tabindex="${this.tabIndex}"
|
|
5123
5131
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5124
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5125
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5132
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5133
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5126
5134
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5127
5135
|
@focusin="${this.handleFocusin}"
|
|
5128
5136
|
@blur="${this.handleFocusOut}">
|
|
5129
|
-
<div class="triggerContentWrapper">
|
|
5130
|
-
<
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
<div class="triggerContent">
|
|
5134
|
-
<slot
|
|
5135
|
-
name="trigger"
|
|
5136
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5137
|
-
</div>
|
|
5137
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5138
|
+
<slot
|
|
5139
|
+
name="trigger"
|
|
5140
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5138
5141
|
</div>
|
|
5139
|
-
${this.chevron
|
|
5142
|
+
${this.chevron ? u`
|
|
5140
5143
|
<div
|
|
5141
5144
|
id="showStateIcon"
|
|
5142
5145
|
class="chevron"
|
|
@@ -5157,6 +5160,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5157
5160
|
<div id="bibSizer" part="size"></div>
|
|
5158
5161
|
<${this.dropdownBibTag}
|
|
5159
5162
|
id="bib"
|
|
5163
|
+
shape="${this.shape}"
|
|
5160
5164
|
?data-show="${this.isPopoverVisible}"
|
|
5161
5165
|
?isfullscreen="${this.isBibFullscreen}"
|
|
5162
5166
|
?common="${this.common}"
|
|
@@ -5176,62 +5180,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5176
5180
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5177
5181
|
*/
|
|
5178
5182
|
renderLayoutClassic() {
|
|
5183
|
+
// TODO: check with Doug why this was never used?
|
|
5184
|
+
const helpTextClasses = {
|
|
5185
|
+
'helpText': true
|
|
5186
|
+
};
|
|
5179
5187
|
|
|
5180
5188
|
return u`
|
|
5181
|
-
|
|
5182
|
-
<div
|
|
5183
|
-
id="trigger"
|
|
5184
|
-
class="trigger"
|
|
5185
|
-
part="trigger"
|
|
5186
|
-
tabindex="${this.tabIndex}"
|
|
5187
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5188
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5189
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5190
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5191
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5192
|
-
>
|
|
5193
|
-
<div class="triggerContentWrapper">
|
|
5194
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5195
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5196
|
-
</label>
|
|
5197
|
-
<div class="triggerContent">
|
|
5198
|
-
<slot
|
|
5199
|
-
name="trigger"
|
|
5200
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5201
|
-
</div>
|
|
5202
|
-
</div>
|
|
5203
|
-
${this.chevron || this.common ? u`
|
|
5204
|
-
<div
|
|
5205
|
-
id="showStateIcon"
|
|
5206
|
-
part="chevron">
|
|
5207
|
-
<${this.iconTag}
|
|
5208
|
-
category="interface"
|
|
5209
|
-
name="chevron-down"
|
|
5210
|
-
?onDark="${this.onDark}"
|
|
5211
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5212
|
-
>
|
|
5213
|
-
</${this.iconTag}>
|
|
5214
|
-
</div>
|
|
5215
|
-
` : undefined }
|
|
5216
|
-
</div>
|
|
5217
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5218
|
-
<slot name="helpText"></slot>
|
|
5219
|
-
</${this.helpTextTag}>
|
|
5220
|
-
|
|
5221
|
-
<div id="bibSizer" part="size"></div>
|
|
5222
|
-
<${this.dropdownBibTag}
|
|
5223
|
-
id="bib"
|
|
5224
|
-
?data-show="${this.isPopoverVisible}"
|
|
5225
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5226
|
-
?common="${this.common}"
|
|
5227
|
-
?rounded="${this.common || this.rounded}"
|
|
5228
|
-
?inset="${this.common || this.inset}"
|
|
5229
|
-
>
|
|
5230
|
-
<div class="slotContent">
|
|
5231
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5232
|
-
</div>
|
|
5233
|
-
</${this.dropdownBibTag}>
|
|
5234
|
-
</div>
|
|
5189
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5235
5190
|
`;
|
|
5236
5191
|
}
|
|
5237
5192
|
|
|
@@ -5299,9 +5254,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5299
5254
|
|
|
5300
5255
|
var dropdownVersion = '3.0.0';
|
|
5301
5256
|
|
|
5302
|
-
var colorCss$
|
|
5257
|
+
var colorCss$3$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5303
5258
|
|
|
5304
|
-
var styleCss$
|
|
5259
|
+
var styleCss$4$1 = i$5`#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)}`;
|
|
5305
5260
|
|
|
5306
5261
|
var tokenCss = i$5`: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)}`;
|
|
5307
5262
|
|
|
@@ -5312,7 +5267,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5312
5267
|
|
|
5313
5268
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5314
5269
|
|
|
5315
|
-
let AuroLibraryRuntimeUtils$
|
|
5270
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5316
5271
|
|
|
5317
5272
|
/* eslint-disable jsdoc/require-param */
|
|
5318
5273
|
|
|
@@ -5415,105 +5370,1098 @@ class AuroDependencyVersioning {
|
|
|
5415
5370
|
}
|
|
5416
5371
|
}
|
|
5417
5372
|
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5373
|
+
/**
|
|
5374
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5375
|
+
*/
|
|
5376
|
+
const _observers = new WeakMap();
|
|
5421
5377
|
|
|
5422
5378
|
/**
|
|
5423
|
-
*
|
|
5424
|
-
*
|
|
5425
|
-
*
|
|
5379
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5380
|
+
* Structure: {
|
|
5381
|
+
* host: {
|
|
5382
|
+
* matchers: Set<Function>,
|
|
5383
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5384
|
+
* }
|
|
5385
|
+
* }
|
|
5426
5386
|
*/
|
|
5387
|
+
const _transportConfig = new WeakMap();
|
|
5427
5388
|
|
|
5428
|
-
|
|
5389
|
+
/**
|
|
5390
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5391
|
+
*
|
|
5392
|
+
* @param {Object} params - The parameters for the function.
|
|
5393
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5394
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5395
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5396
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5397
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5398
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5399
|
+
*/
|
|
5400
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5401
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5402
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5403
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5404
|
+
}
|
|
5429
5405
|
|
|
5430
|
-
//
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
hidden: { type: Boolean,
|
|
5434
|
-
reflect: true },
|
|
5435
|
-
hiddenVisually: { type: Boolean,
|
|
5436
|
-
reflect: true },
|
|
5437
|
-
hiddenAudible: { type: Boolean,
|
|
5438
|
-
reflect: true },
|
|
5439
|
-
};
|
|
5406
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5407
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5408
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5440
5409
|
}
|
|
5441
5410
|
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
if (value) {
|
|
5447
|
-
return 'true'
|
|
5448
|
-
}
|
|
5411
|
+
// Guard Clause: Ensure match is a function
|
|
5412
|
+
if (typeof match !== 'function') {
|
|
5413
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5414
|
+
}
|
|
5449
5415
|
|
|
5450
|
-
|
|
5416
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5417
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5418
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5451
5419
|
}
|
|
5420
|
+
|
|
5421
|
+
// Register this transport and get cleanup function
|
|
5422
|
+
return _registerTransport({
|
|
5423
|
+
host,
|
|
5424
|
+
target,
|
|
5425
|
+
matcher: match,
|
|
5426
|
+
removeOriginal
|
|
5427
|
+
});
|
|
5452
5428
|
};
|
|
5453
5429
|
|
|
5454
|
-
|
|
5430
|
+
/**
|
|
5431
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5432
|
+
*
|
|
5433
|
+
* @param {Object} params - The parameters object.
|
|
5434
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5435
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5436
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5437
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5438
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5439
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5440
|
+
* @private
|
|
5441
|
+
*/
|
|
5442
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5443
|
+
// Initialize config for this host if it doesn't exist
|
|
5444
|
+
if (!_transportConfig.has(host)) {
|
|
5445
|
+
_transportConfig.set(host, {
|
|
5446
|
+
matchers: new Set(),
|
|
5447
|
+
targets: new Map()
|
|
5448
|
+
});
|
|
5449
|
+
}
|
|
5455
5450
|
|
|
5456
|
-
|
|
5451
|
+
const config = _transportConfig.get(host);
|
|
5452
|
+
|
|
5453
|
+
// Add the matcher to the set of matchers for this host
|
|
5454
|
+
config.matchers.add(matcher);
|
|
5455
|
+
|
|
5456
|
+
// Initialize target entry if it doesn't exist
|
|
5457
|
+
if (!config.targets.has(target)) {
|
|
5458
|
+
config.targets.set(target, new Map());
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5462
|
+
config.targets.get(target).set(matcher, {
|
|
5463
|
+
removeOriginal,
|
|
5464
|
+
currentAttributes: new Map()
|
|
5465
|
+
});
|
|
5466
|
+
|
|
5467
|
+
// Perform initial attribute transport
|
|
5468
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5469
|
+
|
|
5470
|
+
// Attach observer
|
|
5471
|
+
_attachObserver(host);
|
|
5472
|
+
|
|
5473
|
+
// Return cleanup function and utility functions
|
|
5474
|
+
return {
|
|
5475
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5476
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5477
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5478
|
+
}
|
|
5479
|
+
};
|
|
5457
5480
|
|
|
5458
|
-
|
|
5481
|
+
/**
|
|
5482
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5483
|
+
*
|
|
5484
|
+
* @param {HTMLElement} host - The host element
|
|
5485
|
+
* @param {HTMLElement} target - The target element
|
|
5486
|
+
* @param {Function} matcher - The matcher function
|
|
5487
|
+
* @private
|
|
5488
|
+
*/
|
|
5489
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5490
|
+
const config = _transportConfig.get(host);
|
|
5491
|
+
if (!config) return;
|
|
5492
|
+
|
|
5493
|
+
// Remove this matcher from this target
|
|
5494
|
+
const targetMatchers = config.targets.get(target);
|
|
5495
|
+
if (targetMatchers) {
|
|
5496
|
+
targetMatchers.delete(matcher);
|
|
5497
|
+
|
|
5498
|
+
// If this target has no more matchers, remove it
|
|
5499
|
+
if (targetMatchers.size === 0) {
|
|
5500
|
+
config.targets.delete(target);
|
|
5501
|
+
}
|
|
5502
|
+
}
|
|
5503
|
+
|
|
5504
|
+
// Check if this matcher is still used by any target
|
|
5505
|
+
let matcherStillUsed = false;
|
|
5506
|
+
for (const matcherMap of config.targets.values()) {
|
|
5507
|
+
if (matcherMap.has(matcher)) {
|
|
5508
|
+
matcherStillUsed = true;
|
|
5509
|
+
break;
|
|
5510
|
+
}
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
// If not used anymore, remove from matchers set
|
|
5514
|
+
if (!matcherStillUsed) {
|
|
5515
|
+
config.matchers.delete(matcher);
|
|
5516
|
+
}
|
|
5517
|
+
|
|
5518
|
+
// If no more targets or matchers, detach observer
|
|
5519
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5520
|
+
_detachObserver(host);
|
|
5521
|
+
}
|
|
5522
|
+
};
|
|
5459
5523
|
|
|
5460
5524
|
/**
|
|
5461
|
-
*
|
|
5462
|
-
*
|
|
5463
|
-
* @
|
|
5464
|
-
* @param {
|
|
5465
|
-
* @
|
|
5525
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5526
|
+
*
|
|
5527
|
+
* @param {Object} params - The parameters object.
|
|
5528
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5529
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5530
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5531
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5532
|
+
* @returns {void}
|
|
5533
|
+
* @private
|
|
5466
5534
|
*/
|
|
5535
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5536
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5537
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5538
|
+
.filter(attr => matcher(attr))
|
|
5539
|
+
.reduce((acc, attr) => {
|
|
5540
|
+
acc[attr] = host.getAttribute(attr);
|
|
5541
|
+
return acc;
|
|
5542
|
+
}, {});
|
|
5543
|
+
|
|
5544
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5545
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5546
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5547
|
+
target.setAttribute(key, value);
|
|
5548
|
+
if (removeOriginal) {
|
|
5549
|
+
host.removeAttribute(key);
|
|
5550
|
+
}
|
|
5551
|
+
});
|
|
5552
|
+
};
|
|
5467
5553
|
|
|
5468
5554
|
/**
|
|
5469
|
-
*
|
|
5470
|
-
*
|
|
5471
|
-
* @param {
|
|
5472
|
-
* @
|
|
5473
|
-
* @
|
|
5474
|
-
* @returns {Promise}
|
|
5555
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5556
|
+
*
|
|
5557
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5558
|
+
* @returns {MutationObserver} The observer instance.
|
|
5559
|
+
* @private
|
|
5475
5560
|
*/
|
|
5476
|
-
const
|
|
5477
|
-
|
|
5478
|
-
if (
|
|
5479
|
-
|
|
5561
|
+
const _attachObserver = (host) => {
|
|
5562
|
+
// If an observer for this host already exists, return it
|
|
5563
|
+
if (_observers.has(host)) {
|
|
5564
|
+
return _observers.get(host);
|
|
5480
5565
|
}
|
|
5481
|
-
return _fetchMap$1.get(uri);
|
|
5482
|
-
};
|
|
5483
5566
|
|
|
5484
|
-
|
|
5567
|
+
// Create a new MutationObserver
|
|
5568
|
+
const observer = new MutationObserver((mutations) => {
|
|
5569
|
+
const config = _transportConfig.get(host);
|
|
5570
|
+
if (!config) return;
|
|
5571
|
+
|
|
5572
|
+
// For each mutation affecting attributes
|
|
5573
|
+
mutations
|
|
5574
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5575
|
+
.forEach(mutation => {
|
|
5576
|
+
const attributeName = mutation.attributeName;
|
|
5577
|
+
|
|
5578
|
+
// Find matchers that care about this attribute
|
|
5579
|
+
for (const matcher of config.matchers) {
|
|
5580
|
+
if (matcher(attributeName)) {
|
|
5581
|
+
// For each target that uses this matcher
|
|
5582
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5583
|
+
if (matcherConfigs.has(matcher)) {
|
|
5584
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5585
|
+
_transportAttributes({
|
|
5586
|
+
host,
|
|
5587
|
+
target,
|
|
5588
|
+
matcher,
|
|
5589
|
+
removeOriginal
|
|
5590
|
+
});
|
|
5591
|
+
}
|
|
5592
|
+
}
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5595
|
+
});
|
|
5596
|
+
});
|
|
5485
5597
|
|
|
5486
|
-
//
|
|
5487
|
-
|
|
5598
|
+
// Start observing attribute changes
|
|
5599
|
+
observer.observe(host, { attributes: true });
|
|
5600
|
+
|
|
5601
|
+
// Store the observer
|
|
5602
|
+
_observers.set(host, observer);
|
|
5603
|
+
|
|
5604
|
+
return observer;
|
|
5605
|
+
};
|
|
5488
5606
|
|
|
5607
|
+
/**
|
|
5608
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5609
|
+
*
|
|
5610
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5611
|
+
* @private
|
|
5612
|
+
*/
|
|
5613
|
+
const _detachObserver = (host) => {
|
|
5614
|
+
if (_observers.has(host)) {
|
|
5615
|
+
const observer = _observers.get(host);
|
|
5616
|
+
observer.disconnect();
|
|
5617
|
+
_observers.delete(host);
|
|
5618
|
+
}
|
|
5619
|
+
|
|
5620
|
+
// Clean up the transport config as well
|
|
5621
|
+
if (_transportConfig.has(host)) {
|
|
5622
|
+
_transportConfig.delete(host);
|
|
5623
|
+
}
|
|
5624
|
+
};
|
|
5489
5625
|
|
|
5490
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5491
5626
|
/**
|
|
5492
|
-
*
|
|
5627
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5628
|
+
* @param {HTMLElement} host - The host element
|
|
5629
|
+
* @param {HTMLElement} target - The target element
|
|
5630
|
+
* @param {Function} matcher - The matcher function
|
|
5631
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5632
|
+
* @private
|
|
5493
5633
|
*/
|
|
5634
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5635
|
+
const config = _transportConfig.get(host);
|
|
5636
|
+
if (!config) return undefined;
|
|
5637
|
+
|
|
5638
|
+
const targetMatchers = config.targets.get(target);
|
|
5639
|
+
if (!targetMatchers) return undefined;
|
|
5640
|
+
|
|
5641
|
+
return targetMatchers.get(matcher);
|
|
5642
|
+
};
|
|
5494
5643
|
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5644
|
+
/**
|
|
5645
|
+
* Sets an observed attribute value
|
|
5646
|
+
* @param {HTMLElement} host - The host element
|
|
5647
|
+
* @param {HTMLElement} target - The target element
|
|
5648
|
+
* @param {Function} matcher - The matcher function
|
|
5649
|
+
* @param {string} key - The attribute name
|
|
5650
|
+
* @param {string} value - The attribute value
|
|
5651
|
+
* @private
|
|
5652
|
+
*/
|
|
5653
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5654
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5655
|
+
if (matcherConfig) {
|
|
5656
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5500
5657
|
}
|
|
5658
|
+
};
|
|
5659
|
+
|
|
5660
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5661
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5662
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5663
|
+
return undefined;
|
|
5664
|
+
};
|
|
5665
|
+
|
|
5666
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5667
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5668
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5669
|
+
return [];
|
|
5670
|
+
};
|
|
5671
|
+
|
|
5672
|
+
const _matchers = {
|
|
5673
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5674
|
+
'role': attr => attr.match(/^role$/)
|
|
5675
|
+
};
|
|
5676
|
+
|
|
5677
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5678
|
+
return transportAttributes({
|
|
5679
|
+
host,
|
|
5680
|
+
target,
|
|
5681
|
+
match: attr => {
|
|
5682
|
+
for (const key in _matchers) {
|
|
5683
|
+
if (_matchers[key](attr)) return true;
|
|
5684
|
+
}
|
|
5685
|
+
return false;
|
|
5686
|
+
},
|
|
5687
|
+
removeOriginal
|
|
5688
|
+
});
|
|
5689
|
+
};
|
|
5690
|
+
|
|
5691
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5692
|
+
|
|
5693
|
+
/**
|
|
5694
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5695
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5696
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5697
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5698
|
+
* @private
|
|
5699
|
+
*/
|
|
5700
|
+
attributeWatcher;
|
|
5501
5701
|
|
|
5502
|
-
// function to define props used within the scope of this component
|
|
5503
5702
|
static get properties() {
|
|
5504
5703
|
return {
|
|
5505
|
-
...super.properties,
|
|
5506
5704
|
|
|
5507
5705
|
/**
|
|
5508
|
-
*
|
|
5706
|
+
* Defines the layout of an element.
|
|
5707
|
+
* @default {'default'}
|
|
5509
5708
|
*/
|
|
5510
|
-
|
|
5511
|
-
type:
|
|
5709
|
+
layout: {
|
|
5710
|
+
type: String,
|
|
5711
|
+
attribute: "layout",
|
|
5512
5712
|
reflect: true
|
|
5513
5713
|
},
|
|
5514
|
-
|
|
5714
|
+
|
|
5515
5715
|
/**
|
|
5516
|
-
*
|
|
5716
|
+
* Defines the shape of an element.
|
|
5717
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5718
|
+
* @default {'default'}
|
|
5719
|
+
*/
|
|
5720
|
+
shape: {
|
|
5721
|
+
type: String,
|
|
5722
|
+
attribute: "shape",
|
|
5723
|
+
reflect: true
|
|
5724
|
+
},
|
|
5725
|
+
|
|
5726
|
+
/**
|
|
5727
|
+
* Defines the size of an element.
|
|
5728
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5729
|
+
* @default {'md'}
|
|
5730
|
+
*/
|
|
5731
|
+
size: {
|
|
5732
|
+
type: String,
|
|
5733
|
+
attribute: "size",
|
|
5734
|
+
reflect: true
|
|
5735
|
+
},
|
|
5736
|
+
|
|
5737
|
+
/**
|
|
5738
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5739
|
+
* @default {false}
|
|
5740
|
+
*/
|
|
5741
|
+
onDark: {
|
|
5742
|
+
type: Boolean,
|
|
5743
|
+
attribute: "ondark",
|
|
5744
|
+
reflect: true
|
|
5745
|
+
},
|
|
5746
|
+
|
|
5747
|
+
/**
|
|
5748
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5749
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5750
|
+
* @type {HTMLElement|null}
|
|
5751
|
+
* @default {null}
|
|
5752
|
+
* @private
|
|
5753
|
+
*/
|
|
5754
|
+
wrapper: {
|
|
5755
|
+
type: HTMLElement,
|
|
5756
|
+
attribute: false,
|
|
5757
|
+
reflect: false
|
|
5758
|
+
}
|
|
5759
|
+
};
|
|
5760
|
+
}
|
|
5761
|
+
|
|
5762
|
+
|
|
5763
|
+
|
|
5764
|
+
resetShapeClasses() {
|
|
5765
|
+
if (this.shape && this.size) {
|
|
5766
|
+
|
|
5767
|
+
if (this.wrapper) {
|
|
5768
|
+
this.wrapper.classList.forEach((className) => {
|
|
5769
|
+
if (className.startsWith('shape-')) {
|
|
5770
|
+
this.wrapper.classList.remove(className);
|
|
5771
|
+
}
|
|
5772
|
+
});
|
|
5773
|
+
|
|
5774
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5775
|
+
}
|
|
5776
|
+
}
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5779
|
+
resetLayoutClasses() {
|
|
5780
|
+
if (this.layout) {
|
|
5781
|
+
if (this.wrapper) {
|
|
5782
|
+
this.wrapper.classList.forEach((className) => {
|
|
5783
|
+
if (className.startsWith('layout-')) {
|
|
5784
|
+
this.wrapper.classList.remove(className);
|
|
5785
|
+
}
|
|
5786
|
+
});
|
|
5787
|
+
|
|
5788
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
5789
|
+
}
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
|
|
5793
|
+
updateComponentArchitecture() {
|
|
5794
|
+
this.resetLayoutClasses();
|
|
5795
|
+
this.resetShapeClasses();
|
|
5796
|
+
}
|
|
5797
|
+
|
|
5798
|
+
updated(changedProperties) {
|
|
5799
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
5800
|
+
this.updateComponentArchitecture();
|
|
5801
|
+
}
|
|
5802
|
+
}
|
|
5803
|
+
|
|
5804
|
+
firstUpdated() {
|
|
5805
|
+
super.firstUpdated();
|
|
5806
|
+
|
|
5807
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
5808
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5809
|
+
|
|
5810
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
5811
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
5812
|
+
}
|
|
5813
|
+
|
|
5814
|
+
disconnectedCallback() {
|
|
5815
|
+
super.disconnectedCallback();
|
|
5816
|
+
|
|
5817
|
+
// Cleanup the ARIA observer if it exists
|
|
5818
|
+
if (this.attributeWatcher) {
|
|
5819
|
+
this.attributeWatcher.cleanup();
|
|
5820
|
+
this.attributeWatcher = null;
|
|
5821
|
+
}
|
|
5822
|
+
}
|
|
5823
|
+
|
|
5824
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
5825
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
5826
|
+
render() {
|
|
5827
|
+
try {
|
|
5828
|
+
return this.renderLayout();
|
|
5829
|
+
} catch (error) {
|
|
5830
|
+
// failed to get the defined layout
|
|
5831
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
5832
|
+
|
|
5833
|
+
// fallback to the default layout
|
|
5834
|
+
return this.getLayout('default');
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
};
|
|
5838
|
+
|
|
5839
|
+
var styleCss$3$1 = i$5`: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}`;
|
|
5840
|
+
|
|
5841
|
+
var colorCss$2$1 = i$5`[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)}`;
|
|
5842
|
+
|
|
5843
|
+
var tokensCss$2$1 = i$5`: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}`;
|
|
5844
|
+
|
|
5845
|
+
var shapeSize = i$5`.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}`;
|
|
5846
|
+
|
|
5847
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5848
|
+
// See LICENSE in the project root for license information.
|
|
5849
|
+
|
|
5850
|
+
// ---------------------------------------------------------------------
|
|
5851
|
+
|
|
5852
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5853
|
+
|
|
5854
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5855
|
+
|
|
5856
|
+
/* eslint-disable jsdoc/require-param */
|
|
5857
|
+
|
|
5858
|
+
/**
|
|
5859
|
+
* This will register a new custom element with the browser.
|
|
5860
|
+
* @param {String} name - The name of the custom element.
|
|
5861
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5862
|
+
* @returns {void}
|
|
5863
|
+
*/
|
|
5864
|
+
registerComponent(name, componentClass) {
|
|
5865
|
+
if (!customElements.get(name)) {
|
|
5866
|
+
customElements.define(name, class extends componentClass {});
|
|
5867
|
+
}
|
|
5868
|
+
}
|
|
5869
|
+
|
|
5870
|
+
/**
|
|
5871
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5872
|
+
* @returns {void}
|
|
5873
|
+
*/
|
|
5874
|
+
closestElement(
|
|
5875
|
+
selector, // selector like in .closest()
|
|
5876
|
+
base = this, // extra functionality to skip a parent
|
|
5877
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5878
|
+
!el || el === document || el === window
|
|
5879
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5880
|
+
: found
|
|
5881
|
+
? found // found a selector INside this element
|
|
5882
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5883
|
+
) {
|
|
5884
|
+
return __Closest(base);
|
|
5885
|
+
}
|
|
5886
|
+
/* eslint-enable jsdoc/require-param */
|
|
5887
|
+
|
|
5888
|
+
/**
|
|
5889
|
+
* 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.
|
|
5890
|
+
* @param {Object} elem - The element to check.
|
|
5891
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5892
|
+
* @returns {void}
|
|
5893
|
+
*/
|
|
5894
|
+
handleComponentTagRename(elem, tagName) {
|
|
5895
|
+
const tag = tagName.toLowerCase();
|
|
5896
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5897
|
+
|
|
5898
|
+
if (elemTag !== tag) {
|
|
5899
|
+
elem.setAttribute(tag, true);
|
|
5900
|
+
}
|
|
5901
|
+
}
|
|
5902
|
+
|
|
5903
|
+
/**
|
|
5904
|
+
* Validates if an element is a specific Auro component.
|
|
5905
|
+
* @param {Object} elem - The element to validate.
|
|
5906
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5907
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5908
|
+
*/
|
|
5909
|
+
elementMatch(elem, tagName) {
|
|
5910
|
+
const tag = tagName.toLowerCase();
|
|
5911
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5912
|
+
|
|
5913
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5914
|
+
}
|
|
5915
|
+
};
|
|
5916
|
+
|
|
5917
|
+
var styleCss$2$1 = i$5`: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}}`;
|
|
5918
|
+
|
|
5919
|
+
var colorCss$1$1 = i$5`: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}`;
|
|
5920
|
+
|
|
5921
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
5922
|
+
|
|
5923
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5924
|
+
// See LICENSE in the project root for license information.
|
|
5925
|
+
|
|
5926
|
+
|
|
5927
|
+
class AuroLoader extends i$2 {
|
|
5928
|
+
constructor() {
|
|
5929
|
+
super();
|
|
5930
|
+
|
|
5931
|
+
/**
|
|
5932
|
+
* @private
|
|
5933
|
+
*/
|
|
5934
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
5935
|
+
|
|
5936
|
+
/**
|
|
5937
|
+
* @private
|
|
5938
|
+
*/
|
|
5939
|
+
this.mdCount = 3;
|
|
5940
|
+
|
|
5941
|
+
/**
|
|
5942
|
+
* @private
|
|
5943
|
+
*/
|
|
5944
|
+
this.smCount = 2;
|
|
5945
|
+
|
|
5946
|
+
/**
|
|
5947
|
+
* @private
|
|
5948
|
+
*/
|
|
5949
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5950
|
+
|
|
5951
|
+
this.orbit = false;
|
|
5952
|
+
this.ringworm = false;
|
|
5953
|
+
this.laser = false;
|
|
5954
|
+
this.pulse = false;
|
|
5955
|
+
}
|
|
5956
|
+
|
|
5957
|
+
// function to define props used within the scope of this component
|
|
5958
|
+
static get properties() {
|
|
5959
|
+
return {
|
|
5960
|
+
|
|
5961
|
+
/**
|
|
5962
|
+
* Sets loader to laser type.
|
|
5963
|
+
*/
|
|
5964
|
+
laser: {
|
|
5965
|
+
type: Boolean,
|
|
5966
|
+
reflect: true
|
|
5967
|
+
},
|
|
5968
|
+
|
|
5969
|
+
/**
|
|
5970
|
+
* Sets loader to orbit type.
|
|
5971
|
+
*/
|
|
5972
|
+
orbit: {
|
|
5973
|
+
type: Boolean,
|
|
5974
|
+
reflect: true
|
|
5975
|
+
},
|
|
5976
|
+
|
|
5977
|
+
/**
|
|
5978
|
+
* Sets loader to pulse type.
|
|
5979
|
+
*/
|
|
5980
|
+
pulse: {
|
|
5981
|
+
type: Boolean,
|
|
5982
|
+
reflect: true
|
|
5983
|
+
},
|
|
5984
|
+
|
|
5985
|
+
/**
|
|
5986
|
+
* Sets loader to ringworm type.
|
|
5987
|
+
*/
|
|
5988
|
+
ringworm: {
|
|
5989
|
+
type: Boolean,
|
|
5990
|
+
reflect: true
|
|
5991
|
+
}
|
|
5992
|
+
};
|
|
5993
|
+
}
|
|
5994
|
+
|
|
5995
|
+
static get styles() {
|
|
5996
|
+
return [
|
|
5997
|
+
i$5`${styleCss$2$1}`,
|
|
5998
|
+
i$5`${colorCss$1$1}`,
|
|
5999
|
+
i$5`${tokensCss$1$1}`
|
|
6000
|
+
];
|
|
6001
|
+
}
|
|
6002
|
+
|
|
6003
|
+
/**
|
|
6004
|
+
* This will register this element with the browser.
|
|
6005
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6006
|
+
*
|
|
6007
|
+
* @example
|
|
6008
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6009
|
+
*
|
|
6010
|
+
*/
|
|
6011
|
+
static register(name = "auro-loader") {
|
|
6012
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6013
|
+
}
|
|
6014
|
+
|
|
6015
|
+
firstUpdated() {
|
|
6016
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6017
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6018
|
+
}
|
|
6019
|
+
|
|
6020
|
+
connectedCallback() {
|
|
6021
|
+
super.connectedCallback();
|
|
6022
|
+
}
|
|
6023
|
+
|
|
6024
|
+
/**
|
|
6025
|
+
* @private
|
|
6026
|
+
* @returns {Array} Numbered array for template map.
|
|
6027
|
+
*/
|
|
6028
|
+
defineTemplate() {
|
|
6029
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6030
|
+
|
|
6031
|
+
if (this.orbit || this.laser) {
|
|
6032
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6033
|
+
} else if (this.ringworm) {
|
|
6034
|
+
nodes = Array.from(Array(0).keys());
|
|
6035
|
+
}
|
|
6036
|
+
|
|
6037
|
+
return nodes;
|
|
6038
|
+
}
|
|
6039
|
+
|
|
6040
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6041
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6042
|
+
|
|
6043
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6044
|
+
render() {
|
|
6045
|
+
return x`
|
|
6046
|
+
${this.defineTemplate().map((idx) => x`
|
|
6047
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6048
|
+
`)}
|
|
6049
|
+
|
|
6050
|
+
<div class="no-animation">Loading...</div>
|
|
6051
|
+
|
|
6052
|
+
${this.ringworm ? x`
|
|
6053
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6054
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6055
|
+
</svg>`
|
|
6056
|
+
: ``
|
|
6057
|
+
}
|
|
6058
|
+
`;
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
|
|
6062
|
+
var loaderVersion = '5.0.0';
|
|
6063
|
+
|
|
6064
|
+
/* eslint-disable max-lines, curly */
|
|
6065
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6066
|
+
// See LICENSE in the project root for license information.
|
|
6067
|
+
|
|
6068
|
+
|
|
6069
|
+
/**
|
|
6070
|
+
* @slot - Default slot for the text of the button.
|
|
6071
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6072
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6073
|
+
* @csspart text - Apply CSS to text slot.
|
|
6074
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6075
|
+
*/
|
|
6076
|
+
|
|
6077
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
6078
|
+
|
|
6079
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
6080
|
+
|
|
6081
|
+
/**
|
|
6082
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6083
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6084
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
6085
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6086
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6087
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6088
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6089
|
+
*/
|
|
6090
|
+
class AuroButton extends AuroElement$1 {
|
|
6091
|
+
|
|
6092
|
+
/**
|
|
6093
|
+
* Enables form association for this element.
|
|
6094
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6095
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6096
|
+
*/
|
|
6097
|
+
static get formAssociated() {
|
|
6098
|
+
return true;
|
|
6099
|
+
}
|
|
6100
|
+
|
|
6101
|
+
constructor() {
|
|
6102
|
+
super();
|
|
6103
|
+
this.autofocus = false;
|
|
6104
|
+
this.disabled = false;
|
|
6105
|
+
this.loading = false;
|
|
6106
|
+
this.size = "md";
|
|
6107
|
+
this.shape = "rounded";
|
|
6108
|
+
this.onDark = false;
|
|
6109
|
+
this.fluid = false;
|
|
6110
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6111
|
+
|
|
6112
|
+
// Support for HTML5 forms
|
|
6113
|
+
if (typeof this.attachInternals === 'function') {
|
|
6114
|
+
this.internals = this.attachInternals();
|
|
6115
|
+
} else {
|
|
6116
|
+
this.internals = null;
|
|
6117
|
+
|
|
6118
|
+
// eslint-disable-next-line no-console
|
|
6119
|
+
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.');
|
|
6120
|
+
}
|
|
6121
|
+
|
|
6122
|
+
/**
|
|
6123
|
+
* Generate unique names for dependency components.
|
|
6124
|
+
*/
|
|
6125
|
+
const versioning = new AuroDependencyVersioning();
|
|
6126
|
+
|
|
6127
|
+
/**
|
|
6128
|
+
* @private
|
|
6129
|
+
*/
|
|
6130
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6131
|
+
}
|
|
6132
|
+
|
|
6133
|
+
static get styles() {
|
|
6134
|
+
return [
|
|
6135
|
+
tokensCss$2$1,
|
|
6136
|
+
styleCss$3$1,
|
|
6137
|
+
colorCss$2$1,
|
|
6138
|
+
shapeSize
|
|
6139
|
+
];
|
|
6140
|
+
}
|
|
6141
|
+
|
|
6142
|
+
static get properties() {
|
|
6143
|
+
return {
|
|
6144
|
+
|
|
6145
|
+
...super.properties,
|
|
6146
|
+
|
|
6147
|
+
/**
|
|
6148
|
+
* Override layout since it isn't used in this component.
|
|
6149
|
+
* @private
|
|
6150
|
+
*/
|
|
6151
|
+
layout: {
|
|
6152
|
+
type: Boolean,
|
|
6153
|
+
attribute: false,
|
|
6154
|
+
reflect: false
|
|
6155
|
+
},
|
|
6156
|
+
|
|
6157
|
+
/**
|
|
6158
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6159
|
+
*/
|
|
6160
|
+
autofocus: {
|
|
6161
|
+
type: Boolean,
|
|
6162
|
+
reflect: true
|
|
6163
|
+
},
|
|
6164
|
+
|
|
6165
|
+
/**
|
|
6166
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6167
|
+
*/
|
|
6168
|
+
disabled: {
|
|
6169
|
+
type: Boolean,
|
|
6170
|
+
reflect: true
|
|
6171
|
+
},
|
|
6172
|
+
|
|
6173
|
+
/**
|
|
6174
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6175
|
+
*/
|
|
6176
|
+
fluid: {
|
|
6177
|
+
type: Boolean,
|
|
6178
|
+
reflect: true
|
|
6179
|
+
},
|
|
6180
|
+
|
|
6181
|
+
/**
|
|
6182
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6183
|
+
*/
|
|
6184
|
+
loading: {
|
|
6185
|
+
type: Boolean,
|
|
6186
|
+
reflect: true
|
|
6187
|
+
},
|
|
6188
|
+
|
|
6189
|
+
/**
|
|
6190
|
+
* 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.
|
|
6191
|
+
*/
|
|
6192
|
+
loadingText: {
|
|
6193
|
+
type: String
|
|
6194
|
+
},
|
|
6195
|
+
|
|
6196
|
+
/**
|
|
6197
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
6198
|
+
*/
|
|
6199
|
+
tIndex: {
|
|
6200
|
+
type: String,
|
|
6201
|
+
reflect: true
|
|
6202
|
+
},
|
|
6203
|
+
|
|
6204
|
+
/**
|
|
6205
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6206
|
+
*/
|
|
6207
|
+
title: {
|
|
6208
|
+
type: String,
|
|
6209
|
+
reflect: true
|
|
6210
|
+
},
|
|
6211
|
+
|
|
6212
|
+
/**
|
|
6213
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6214
|
+
*/
|
|
6215
|
+
type: {
|
|
6216
|
+
type: String,
|
|
6217
|
+
reflect: true
|
|
6218
|
+
},
|
|
6219
|
+
|
|
6220
|
+
/**
|
|
6221
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6222
|
+
*/
|
|
6223
|
+
value: {
|
|
6224
|
+
type: String,
|
|
6225
|
+
reflect: true
|
|
6226
|
+
},
|
|
6227
|
+
|
|
6228
|
+
/**
|
|
6229
|
+
* Sets button variant option.
|
|
6230
|
+
* @default primary
|
|
6231
|
+
*/
|
|
6232
|
+
variant: {
|
|
6233
|
+
type: String,
|
|
6234
|
+
reflect: true
|
|
6235
|
+
},
|
|
6236
|
+
};
|
|
6237
|
+
}
|
|
6238
|
+
|
|
6239
|
+
/**
|
|
6240
|
+
* This will register this element with the browser.
|
|
6241
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6242
|
+
*
|
|
6243
|
+
* @example
|
|
6244
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6245
|
+
*
|
|
6246
|
+
*/
|
|
6247
|
+
static register(name = "auro-button") {
|
|
6248
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6249
|
+
}
|
|
6250
|
+
|
|
6251
|
+
/**
|
|
6252
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6253
|
+
* @private
|
|
6254
|
+
* @returns {void}
|
|
6255
|
+
*/
|
|
6256
|
+
focus() {
|
|
6257
|
+
this.renderRoot.querySelector('button').focus();
|
|
6258
|
+
}
|
|
6259
|
+
|
|
6260
|
+
/**
|
|
6261
|
+
* Submits the form that this button is associated with.
|
|
6262
|
+
* @private
|
|
6263
|
+
* @returns {void}
|
|
6264
|
+
*/
|
|
6265
|
+
surfaceSubmitEvent() {
|
|
6266
|
+
if (this.form) {
|
|
6267
|
+
this.form.requestSubmit();
|
|
6268
|
+
}
|
|
6269
|
+
}
|
|
6270
|
+
|
|
6271
|
+
/**
|
|
6272
|
+
* Returns the form element that this button is associated with.
|
|
6273
|
+
* @private
|
|
6274
|
+
* @returns {HTMLFormElement | null}
|
|
6275
|
+
*/
|
|
6276
|
+
get form() {
|
|
6277
|
+
return this.internals ? this.internals.form : null;
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
/**
|
|
6281
|
+
* @private
|
|
6282
|
+
* @returns {Boolean}
|
|
6283
|
+
*/
|
|
6284
|
+
get hideText() {
|
|
6285
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6286
|
+
}
|
|
6287
|
+
|
|
6288
|
+
/**
|
|
6289
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6290
|
+
* @returns {string | undefined}
|
|
6291
|
+
* @private
|
|
6292
|
+
*/
|
|
6293
|
+
get currentAriaLabel() {
|
|
6294
|
+
if (!this.attributeWatcher) return undefined;
|
|
6295
|
+
|
|
6296
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6297
|
+
return ariaLabel || undefined;
|
|
6298
|
+
}
|
|
6299
|
+
|
|
6300
|
+
/**
|
|
6301
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6302
|
+
* @returns {string | undefined}
|
|
6303
|
+
* @private
|
|
6304
|
+
*/
|
|
6305
|
+
get currentAriaLabelledBy() {
|
|
6306
|
+
if (!this.attributeWatcher) return undefined;
|
|
6307
|
+
|
|
6308
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6309
|
+
return ariaLabelledBy || undefined;
|
|
6310
|
+
}
|
|
6311
|
+
|
|
6312
|
+
/**
|
|
6313
|
+
* Renders the default layout for the button.
|
|
6314
|
+
* @returns {TemplateResult}
|
|
6315
|
+
* @private
|
|
6316
|
+
*/
|
|
6317
|
+
renderLayoutDefault() {
|
|
6318
|
+
const classes = {
|
|
6319
|
+
"util_insetLg--squish": true,
|
|
6320
|
+
"auro-button": true,
|
|
6321
|
+
"icon-only": this.hideText,
|
|
6322
|
+
wrapper: true,
|
|
6323
|
+
loading: this.loading,
|
|
6324
|
+
};
|
|
6325
|
+
|
|
6326
|
+
return u`
|
|
6327
|
+
<button
|
|
6328
|
+
part="button"
|
|
6329
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6330
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6331
|
+
tabIndex="${o(this.tIndex)}"
|
|
6332
|
+
?autofocus="${this.autofocus}"
|
|
6333
|
+
class="${e(classes)}"
|
|
6334
|
+
?disabled="${this.disabled || this.loading}"
|
|
6335
|
+
?onDark="${this.onDark}"
|
|
6336
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
6337
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
6338
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
6339
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6340
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
6341
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6342
|
+
>
|
|
6343
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6344
|
+
|
|
6345
|
+
<span class="contentWrapper">
|
|
6346
|
+
<span class="textSlot" part="text">
|
|
6347
|
+
<slot></slot>
|
|
6348
|
+
</span>
|
|
6349
|
+
</span>
|
|
6350
|
+
</button>
|
|
6351
|
+
`;
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6354
|
+
/**
|
|
6355
|
+
* Renders the layout of the button
|
|
6356
|
+
* @returns {TemplateResult}
|
|
6357
|
+
* @private
|
|
6358
|
+
*/
|
|
6359
|
+
renderLayout() {
|
|
6360
|
+
return this.renderLayoutDefault();
|
|
6361
|
+
}
|
|
6362
|
+
}
|
|
6363
|
+
|
|
6364
|
+
var buttonVersion = '11.0.0';
|
|
6365
|
+
|
|
6366
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6367
|
+
// See LICENSE in the project root for license information.
|
|
6368
|
+
|
|
6369
|
+
|
|
6370
|
+
/**
|
|
6371
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
6372
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
6373
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6374
|
+
*/
|
|
6375
|
+
|
|
6376
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
6377
|
+
|
|
6378
|
+
// function to define props used within the scope of this component
|
|
6379
|
+
static get properties() {
|
|
6380
|
+
return {
|
|
6381
|
+
hidden: { type: Boolean,
|
|
6382
|
+
reflect: true },
|
|
6383
|
+
hiddenVisually: { type: Boolean,
|
|
6384
|
+
reflect: true },
|
|
6385
|
+
hiddenAudible: { type: Boolean,
|
|
6386
|
+
reflect: true },
|
|
6387
|
+
};
|
|
6388
|
+
}
|
|
6389
|
+
|
|
6390
|
+
/**
|
|
6391
|
+
* @private Function that determines state of aria-hidden
|
|
6392
|
+
*/
|
|
6393
|
+
hideAudible(value) {
|
|
6394
|
+
if (value) {
|
|
6395
|
+
return 'true'
|
|
6396
|
+
}
|
|
6397
|
+
|
|
6398
|
+
return 'false'
|
|
6399
|
+
}
|
|
6400
|
+
};
|
|
6401
|
+
|
|
6402
|
+
var error$1 = {"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>"};
|
|
6403
|
+
|
|
6404
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
6405
|
+
|
|
6406
|
+
const _fetchMap$1 = new Map();
|
|
6407
|
+
|
|
6408
|
+
/**
|
|
6409
|
+
* A callback to parse Response body.
|
|
6410
|
+
*
|
|
6411
|
+
* @callback ResponseParser
|
|
6412
|
+
* @param {Fetch.Response} response
|
|
6413
|
+
* @returns {Promise}
|
|
6414
|
+
*/
|
|
6415
|
+
|
|
6416
|
+
/**
|
|
6417
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
6418
|
+
*
|
|
6419
|
+
* @param {String} uri
|
|
6420
|
+
* @param {Object} [options={}]
|
|
6421
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
6422
|
+
* @returns {Promise}
|
|
6423
|
+
*/
|
|
6424
|
+
const cacheFetch$1 = (uri, options = {}) => {
|
|
6425
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
6426
|
+
if (!_fetchMap$1.has(uri)) {
|
|
6427
|
+
_fetchMap$1.set(uri, fetch(uri).then(responseParser));
|
|
6428
|
+
}
|
|
6429
|
+
return _fetchMap$1.get(uri);
|
|
6430
|
+
};
|
|
6431
|
+
|
|
6432
|
+
var styleCss$1$1 = i$5`: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}`;
|
|
6433
|
+
|
|
6434
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6435
|
+
// See LICENSE in the project root for license information.
|
|
6436
|
+
|
|
6437
|
+
|
|
6438
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
6439
|
+
/**
|
|
6440
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
6441
|
+
*/
|
|
6442
|
+
|
|
6443
|
+
// build the component class
|
|
6444
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
6445
|
+
constructor() {
|
|
6446
|
+
super();
|
|
6447
|
+
this.onDark = false;
|
|
6448
|
+
}
|
|
6449
|
+
|
|
6450
|
+
// function to define props used within the scope of this component
|
|
6451
|
+
static get properties() {
|
|
6452
|
+
return {
|
|
6453
|
+
...super.properties,
|
|
6454
|
+
|
|
6455
|
+
/**
|
|
6456
|
+
* Set value for on-dark version of auro-icon.
|
|
6457
|
+
*/
|
|
6458
|
+
onDark: {
|
|
6459
|
+
type: Boolean,
|
|
6460
|
+
reflect: true
|
|
6461
|
+
},
|
|
6462
|
+
|
|
6463
|
+
/**
|
|
6464
|
+
* @private
|
|
5517
6465
|
*/
|
|
5518
6466
|
svg: {
|
|
5519
6467
|
attribute: false,
|
|
@@ -5761,8 +6709,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5761
6709
|
async firstUpdated() {
|
|
5762
6710
|
await super.firstUpdated();
|
|
5763
6711
|
|
|
5764
|
-
|
|
5765
|
-
|
|
6712
|
+
/**
|
|
6713
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6714
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6715
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6716
|
+
*/
|
|
6717
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5766
6718
|
const svgDesc = this.svg.querySelector('desc');
|
|
5767
6719
|
|
|
5768
6720
|
if (svgDesc) {
|
|
@@ -5806,7 +6758,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5806
6758
|
}
|
|
5807
6759
|
};
|
|
5808
6760
|
|
|
5809
|
-
var iconVersion$1 = '8.0.
|
|
6761
|
+
var iconVersion$1 = '8.0.4';
|
|
5810
6762
|
|
|
5811
6763
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5812
6764
|
// See LICENSE in the project root for license information.
|
|
@@ -5815,7 +6767,7 @@ var iconVersion$1 = '8.0.3';
|
|
|
5815
6767
|
|
|
5816
6768
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5817
6769
|
|
|
5818
|
-
let AuroLibraryRuntimeUtils$
|
|
6770
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5819
6771
|
|
|
5820
6772
|
/* eslint-disable jsdoc/require-param */
|
|
5821
6773
|
|
|
@@ -5907,7 +6859,7 @@ class AuroHeader extends i$2 {
|
|
|
5907
6859
|
/**
|
|
5908
6860
|
* @private
|
|
5909
6861
|
*/
|
|
5910
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6862
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5911
6863
|
}
|
|
5912
6864
|
|
|
5913
6865
|
// function to define props used within the scope of this component
|
|
@@ -5937,7 +6889,7 @@ class AuroHeader extends i$2 {
|
|
|
5937
6889
|
*
|
|
5938
6890
|
*/
|
|
5939
6891
|
static register(name = "auro-header") {
|
|
5940
|
-
AuroLibraryRuntimeUtils$
|
|
6892
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5941
6893
|
}
|
|
5942
6894
|
|
|
5943
6895
|
firstUpdated() {
|
|
@@ -6033,17 +6985,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
6033
6985
|
|
|
6034
6986
|
this.large = false;
|
|
6035
6987
|
|
|
6036
|
-
AuroLibraryRuntimeUtils$
|
|
6988
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
6037
6989
|
|
|
6038
6990
|
const versioning = new AuroDependencyVersioning();
|
|
6991
|
+
|
|
6992
|
+
/**
|
|
6993
|
+
* @private
|
|
6994
|
+
*/
|
|
6039
6995
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
6996
|
+
|
|
6997
|
+
/**
|
|
6998
|
+
* @private
|
|
6999
|
+
*/
|
|
6040
7000
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7001
|
+
|
|
7002
|
+
/**
|
|
7003
|
+
* @private
|
|
7004
|
+
*/
|
|
7005
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
6041
7006
|
}
|
|
6042
7007
|
|
|
6043
7008
|
static get styles() {
|
|
6044
7009
|
return [
|
|
6045
|
-
colorCss$
|
|
6046
|
-
styleCss$
|
|
7010
|
+
colorCss$3$1,
|
|
7011
|
+
styleCss$4$1,
|
|
6047
7012
|
tokenCss
|
|
6048
7013
|
];
|
|
6049
7014
|
}
|
|
@@ -6072,7 +7037,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
6072
7037
|
*
|
|
6073
7038
|
*/
|
|
6074
7039
|
static register(name = "auro-bibtemplate") {
|
|
6075
|
-
AuroLibraryRuntimeUtils$
|
|
7040
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
6076
7041
|
}
|
|
6077
7042
|
|
|
6078
7043
|
/**
|
|
@@ -6130,9 +7095,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
6130
7095
|
<div id="bibTemplate" part="bibtemplate">
|
|
6131
7096
|
${this.isFullscreen ? u`
|
|
6132
7097
|
<div id="headerContainer">
|
|
6133
|
-
|
|
7098
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
6134
7099
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
6135
|
-
|
|
7100
|
+
</${this.buttonTag}>
|
|
6136
7101
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
6137
7102
|
<slot name="header"></slot>
|
|
6138
7103
|
</${this.headerTag}>
|
|
@@ -6364,11 +7329,11 @@ class AuroHelpText extends i$2 {
|
|
|
6364
7329
|
|
|
6365
7330
|
var helpTextVersion = '1.0.0';
|
|
6366
7331
|
|
|
6367
|
-
i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:
|
|
7332
|
+
i$5`: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)}`;
|
|
6368
7333
|
|
|
6369
7334
|
i$5`: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)}`;
|
|
6370
7335
|
|
|
6371
|
-
i$5`: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)}`;
|
|
7336
|
+
i$5`: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)}`;
|
|
6372
7337
|
|
|
6373
7338
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6374
7339
|
// See LICENSE in the project root for license information.
|
|
@@ -6415,9 +7380,9 @@ function arrayConverter(value) {
|
|
|
6415
7380
|
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6416
7381
|
}
|
|
6417
7382
|
|
|
6418
|
-
i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-
|
|
7383
|
+
i$5`: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}`;
|
|
6419
7384
|
|
|
6420
|
-
i$5`: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)}`;
|
|
7385
|
+
i$5`: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)}`;
|
|
6421
7386
|
|
|
6422
7387
|
i$5`: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}`;
|
|
6423
7388
|
|
|
@@ -6425,7 +7390,7 @@ i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
|
|
|
6425
7390
|
|
|
6426
7391
|
i$5`: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)}`;
|
|
6427
7392
|
|
|
6428
|
-
var styleCss$3 = i$5`.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
|
|
7393
|
+
var styleCss$3 = i$5`.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}`;
|
|
6429
7394
|
|
|
6430
7395
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6431
7396
|
// See LICENSE in the project root for license information.
|
|
@@ -6441,6 +7406,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6441
7406
|
* @slot helpText - Defines the content of the helpText.
|
|
6442
7407
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6443
7408
|
* @slot valueText - Dropdown value text display.
|
|
7409
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6444
7410
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6445
7411
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6446
7412
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6448,7 +7414,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6448
7414
|
*/
|
|
6449
7415
|
|
|
6450
7416
|
// build the component class
|
|
6451
|
-
class AuroSelect extends AuroElement$
|
|
7417
|
+
class AuroSelect extends AuroElement$4 {
|
|
6452
7418
|
constructor() {
|
|
6453
7419
|
super();
|
|
6454
7420
|
|
|
@@ -6458,11 +7424,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6458
7424
|
const idSubstrEnd = 8;
|
|
6459
7425
|
const idSubstrStart = 2;
|
|
6460
7426
|
|
|
6461
|
-
this.matchWidth =
|
|
7427
|
+
this.matchWidth = false;
|
|
6462
7428
|
|
|
6463
7429
|
// Layout Config
|
|
6464
|
-
this.layout = '
|
|
6465
|
-
this.shape = '
|
|
7430
|
+
this.layout = 'snowflake';
|
|
7431
|
+
this.shape = 'snowflake';
|
|
6466
7432
|
this.size = 'xl';
|
|
6467
7433
|
|
|
6468
7434
|
// floaterConfig
|
|
@@ -6473,6 +7439,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6473
7439
|
|
|
6474
7440
|
this.forceDisplayValue = false;
|
|
6475
7441
|
|
|
7442
|
+
this.layout = 'classic';
|
|
7443
|
+
this.shape = 'classic';
|
|
7444
|
+
this.size = 'xl';
|
|
7445
|
+
|
|
6476
7446
|
/**
|
|
6477
7447
|
* @private
|
|
6478
7448
|
*/
|
|
@@ -6488,7 +7458,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6488
7458
|
/**
|
|
6489
7459
|
* @private
|
|
6490
7460
|
*/
|
|
6491
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7461
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6492
7462
|
|
|
6493
7463
|
/**
|
|
6494
7464
|
* Generate unique names for dependency components.
|
|
@@ -6603,14 +7573,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6603
7573
|
reflect: true
|
|
6604
7574
|
},
|
|
6605
7575
|
|
|
6606
|
-
/**
|
|
6607
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6608
|
-
*/
|
|
6609
|
-
flexMenuWidth: {
|
|
6610
|
-
type: Boolean,
|
|
6611
|
-
reflect: true
|
|
6612
|
-
},
|
|
6613
|
-
|
|
6614
7576
|
/**
|
|
6615
7577
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6616
7578
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6704,7 +7666,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6704
7666
|
* "top" | "right" | "bottom" | "left" |
|
|
6705
7667
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6706
7668
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6707
|
-
* "left-start" | "left-end"
|
|
7669
|
+
* "left-start" | "left-end".
|
|
6708
7670
|
* @default bottom-start
|
|
6709
7671
|
*/
|
|
6710
7672
|
placement: {
|
|
@@ -6814,6 +7776,19 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6814
7776
|
];
|
|
6815
7777
|
}
|
|
6816
7778
|
|
|
7779
|
+
/**
|
|
7780
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7781
|
+
* @private
|
|
7782
|
+
* @returns {void}
|
|
7783
|
+
*/
|
|
7784
|
+
get commonLabelClasses() {
|
|
7785
|
+
return {
|
|
7786
|
+
'is-disabled': this.disabled,
|
|
7787
|
+
'withValue': this.value && this.value.length > 0,
|
|
7788
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7789
|
+
};
|
|
7790
|
+
}
|
|
7791
|
+
|
|
6817
7792
|
/**
|
|
6818
7793
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6819
7794
|
* @private
|
|
@@ -6857,7 +7832,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6857
7832
|
*
|
|
6858
7833
|
*/
|
|
6859
7834
|
static register(name = "auro-select") {
|
|
6860
|
-
AuroLibraryRuntimeUtils$
|
|
7835
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6861
7836
|
}
|
|
6862
7837
|
|
|
6863
7838
|
/**
|
|
@@ -6917,6 +7892,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6917
7892
|
return;
|
|
6918
7893
|
}
|
|
6919
7894
|
|
|
7895
|
+
// set menu's default size if there it's not specified.
|
|
7896
|
+
if (!this.menu.getAttribute('size')) {
|
|
7897
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
7898
|
+
}
|
|
7899
|
+
|
|
7900
|
+
if (!this.getAttribute('shape')) {
|
|
7901
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
7902
|
+
}
|
|
7903
|
+
|
|
6920
7904
|
if (this.multiSelect) {
|
|
6921
7905
|
this.menu.multiSelect = this.multiSelect;
|
|
6922
7906
|
}
|
|
@@ -7180,8 +8164,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7180
8164
|
// Add the tag name as an attribute if it is different than the component name
|
|
7181
8165
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7182
8166
|
|
|
7183
|
-
this.configureMenu();
|
|
7184
8167
|
this.configureDropdown();
|
|
8168
|
+
this.configureMenu();
|
|
7185
8169
|
this.configureSelect();
|
|
7186
8170
|
|
|
7187
8171
|
// Set the initial value in auro-menu if defined
|
|
@@ -7238,6 +8222,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7238
8222
|
if (changedProperties.has('error')) {
|
|
7239
8223
|
this.validate(true);
|
|
7240
8224
|
}
|
|
8225
|
+
|
|
8226
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8227
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8228
|
+
}
|
|
8229
|
+
|
|
8230
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8231
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8232
|
+
}
|
|
7241
8233
|
}
|
|
7242
8234
|
|
|
7243
8235
|
/**
|
|
@@ -7334,7 +8326,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7334
8326
|
|
|
7335
8327
|
renderNativeSelect() {
|
|
7336
8328
|
return u`
|
|
7337
|
-
<div class="nativeSelectWrapper">
|
|
8329
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7338
8330
|
<select
|
|
7339
8331
|
tabindex="-1"
|
|
7340
8332
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7417,9 +8409,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7417
8409
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7418
8410
|
</div>
|
|
7419
8411
|
<${this.dropdownTag}
|
|
8412
|
+
a11yRole="select"
|
|
7420
8413
|
?autoPlacement="${this.autoPlacement}"
|
|
7421
8414
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7422
|
-
?matchWidth="${
|
|
8415
|
+
?matchWidth="${this.matchWidth}"
|
|
7423
8416
|
?noFlip="${this.noFlip}"
|
|
7424
8417
|
?onDark="${this.onDark}"
|
|
7425
8418
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
@@ -7438,7 +8431,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7438
8431
|
</div>
|
|
7439
8432
|
<div class="mainContent">
|
|
7440
8433
|
<div class="${e(valueContainerClasses)}">
|
|
7441
|
-
<label>
|
|
8434
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7442
8435
|
<slot name="label"></slot>
|
|
7443
8436
|
</label>
|
|
7444
8437
|
<div class="value" id="value"></div>
|
|
@@ -7499,7 +8492,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7499
8492
|
<${this.dropdownTag}
|
|
7500
8493
|
?autoPlacement="${this.autoPlacement}"
|
|
7501
8494
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7502
|
-
?matchWidth="${
|
|
8495
|
+
?matchWidth="${this.matchWidth}"
|
|
7503
8496
|
?noFlip="${this.noFlip}"
|
|
7504
8497
|
?onDark="${this.onDark}"
|
|
7505
8498
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
@@ -7518,7 +8511,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7518
8511
|
</div>
|
|
7519
8512
|
<div class="mainContent">
|
|
7520
8513
|
<div class="${e(valueContainerClasses)}">
|
|
7521
|
-
<label>
|
|
8514
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7522
8515
|
<slot name="label"></slot>
|
|
7523
8516
|
</label>
|
|
7524
8517
|
<div class="value" id="value"></div>
|
|
@@ -7542,6 +8535,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7542
8535
|
${this.renderHtmlHelpText()}
|
|
7543
8536
|
</div>
|
|
7544
8537
|
</${this.dropdownTag}>
|
|
8538
|
+
${this.renderNativeSelect()}
|
|
7545
8539
|
</div>
|
|
7546
8540
|
`;
|
|
7547
8541
|
}
|
|
@@ -7552,11 +8546,77 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7552
8546
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7553
8547
|
*/
|
|
7554
8548
|
renderLayoutClassic() {
|
|
8549
|
+
const placeholderClass = {
|
|
8550
|
+
hidden: this.value,
|
|
8551
|
+
};
|
|
8552
|
+
|
|
8553
|
+
const displayValueClasses = {
|
|
8554
|
+
'displayValue': true,
|
|
8555
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8556
|
+
'hasFocus': this.isPopoverVisible,
|
|
8557
|
+
'withValue': this.value && this.value.length > 0,
|
|
8558
|
+
'force': this.forceDisplayValue,
|
|
8559
|
+
};
|
|
8560
|
+
|
|
8561
|
+
const valueContainerClasses = {
|
|
8562
|
+
'valueContainer': true,
|
|
8563
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8564
|
+
};
|
|
8565
|
+
|
|
7555
8566
|
return u`
|
|
7556
8567
|
<div
|
|
7557
|
-
class="${e(this.commonWrapperClasses)}
|
|
8568
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7558
8569
|
part="wrapper">
|
|
7559
|
-
|
|
8570
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8571
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8572
|
+
</div>
|
|
8573
|
+
<${this.dropdownTag}
|
|
8574
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8575
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8576
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8577
|
+
?noFlip="${this.noFlip}"
|
|
8578
|
+
?onDark="${this.onDark}"
|
|
8579
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8580
|
+
.offset="${this.offset}"
|
|
8581
|
+
.placement="${this.placement}"
|
|
8582
|
+
chevron
|
|
8583
|
+
fluid
|
|
8584
|
+
for="selectMenu"
|
|
8585
|
+
layout="${this.layout}"
|
|
8586
|
+
part="dropdown"
|
|
8587
|
+
shape="${this.shape}"
|
|
8588
|
+
size="${this.size}">
|
|
8589
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8590
|
+
<div class="accents left">
|
|
8591
|
+
<slot name="typeIcon"></slot>
|
|
8592
|
+
</div>
|
|
8593
|
+
<div class="mainContent">
|
|
8594
|
+
<div class="${e(valueContainerClasses)}">
|
|
8595
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
8596
|
+
<slot name="label"></slot>
|
|
8597
|
+
</label>
|
|
8598
|
+
<div class="value" id="value"></div>
|
|
8599
|
+
${this.value ? undefined : u`
|
|
8600
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8601
|
+
<slot name="placeholder"></slot>
|
|
8602
|
+
</div>
|
|
8603
|
+
`}
|
|
8604
|
+
</div>
|
|
8605
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8606
|
+
<slot name="displayValue"></slot>
|
|
8607
|
+
</div>
|
|
8608
|
+
</div>
|
|
8609
|
+
<div class="accents right"></div>
|
|
8610
|
+
</div>
|
|
8611
|
+
<div class="menuWrapper"></div>
|
|
8612
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8613
|
+
<slot></slot>
|
|
8614
|
+
</${this.bibtemplateTag}>
|
|
8615
|
+
<div slot="helpText">
|
|
8616
|
+
${this.renderHtmlHelpText()}
|
|
8617
|
+
</div>
|
|
8618
|
+
</${this.dropdownTag}>
|
|
8619
|
+
${this.renderNativeSelect()}
|
|
7560
8620
|
</div>
|
|
7561
8621
|
`;
|
|
7562
8622
|
}
|
|
@@ -7621,7 +8681,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7621
8681
|
?autoPlacement="${this.autoPlacement}"
|
|
7622
8682
|
?disabled="${this.disabled}"
|
|
7623
8683
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7624
|
-
?matchWidth="${
|
|
8684
|
+
?matchWidth="${this.matchWidth}"
|
|
7625
8685
|
?noFlip="${this.noFlip}"
|
|
7626
8686
|
?onDark="${this.onDark}"
|
|
7627
8687
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
@@ -7691,11 +8751,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7691
8751
|
}
|
|
7692
8752
|
}
|
|
7693
8753
|
|
|
7694
|
-
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:
|
|
8754
|
+
var styleCss$2 = i$5`: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)}`;
|
|
7695
8755
|
|
|
7696
8756
|
var colorCss$2 = i$5`: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)}`;
|
|
7697
8757
|
|
|
7698
|
-
var tokensCss$1 = i$5`: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)}`;
|
|
8758
|
+
var tokensCss$1 = i$5`: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)}`;
|
|
7699
8759
|
|
|
7700
8760
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7701
8761
|
// See LICENSE in the project root for license information.
|
|
@@ -7761,14 +8821,17 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7761
8821
|
* @slot - Slot for insertion of menu options.
|
|
7762
8822
|
*/
|
|
7763
8823
|
|
|
7764
|
-
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
8824
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens, no-inline-comments, line-comment-position */
|
|
7765
8825
|
|
|
7766
|
-
class AuroMenu extends
|
|
8826
|
+
class AuroMenu extends AuroElement$4 {
|
|
7767
8827
|
constructor() {
|
|
7768
8828
|
super();
|
|
7769
8829
|
|
|
7770
8830
|
// State properties (reactive)
|
|
7771
8831
|
|
|
8832
|
+
this.shape = ""; // box, rounded, pill
|
|
8833
|
+
this.size = ""; // md, lg, xl
|
|
8834
|
+
|
|
7772
8835
|
// Value of the selected options
|
|
7773
8836
|
this.value = undefined;
|
|
7774
8837
|
// Currently selected option
|
|
@@ -7827,6 +8890,7 @@ class AuroMenu extends i$2 {
|
|
|
7827
8890
|
|
|
7828
8891
|
static get properties() {
|
|
7829
8892
|
return {
|
|
8893
|
+
...super.properties,
|
|
7830
8894
|
noCheckmark: {
|
|
7831
8895
|
type: Boolean,
|
|
7832
8896
|
reflect: true,
|
|
@@ -7860,6 +8924,16 @@ class AuroMenu extends i$2 {
|
|
|
7860
8924
|
value: {
|
|
7861
8925
|
// Allow string, string[] arrays and undefined
|
|
7862
8926
|
type: Object
|
|
8927
|
+
},
|
|
8928
|
+
|
|
8929
|
+
/**
|
|
8930
|
+
* Indent level for submenus.
|
|
8931
|
+
* @private
|
|
8932
|
+
*/
|
|
8933
|
+
level: {
|
|
8934
|
+
type: Number,
|
|
8935
|
+
reflect: false,
|
|
8936
|
+
attribute: false
|
|
7863
8937
|
}
|
|
7864
8938
|
};
|
|
7865
8939
|
}
|
|
@@ -7881,7 +8955,7 @@ class AuroMenu extends i$2 {
|
|
|
7881
8955
|
*
|
|
7882
8956
|
*/
|
|
7883
8957
|
static register(name = "auro-menu") {
|
|
7884
|
-
AuroLibraryRuntimeUtils$
|
|
8958
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenu);
|
|
7885
8959
|
}
|
|
7886
8960
|
|
|
7887
8961
|
// Lifecycle Methods
|
|
@@ -7905,19 +8979,22 @@ class AuroMenu extends i$2 {
|
|
|
7905
8979
|
}
|
|
7906
8980
|
|
|
7907
8981
|
firstUpdated() {
|
|
7908
|
-
AuroLibraryRuntimeUtils$
|
|
8982
|
+
AuroLibraryRuntimeUtils$6.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
7909
8983
|
|
|
7910
8984
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
7911
8985
|
this.initializeMenu();
|
|
7912
8986
|
}
|
|
7913
8987
|
|
|
7914
8988
|
updated(changedProperties) {
|
|
8989
|
+
super.updated(changedProperties);
|
|
8990
|
+
|
|
7915
8991
|
if (changedProperties.has('multiSelect')) {
|
|
7916
8992
|
// Reset selection if multiSelect mode changes
|
|
7917
8993
|
this.clearSelection();
|
|
7918
8994
|
}
|
|
7919
8995
|
|
|
7920
|
-
|
|
8996
|
+
|
|
8997
|
+
if (changedProperties.has("value")) {
|
|
7921
8998
|
// Handle null/undefined case
|
|
7922
8999
|
if (this.value === undefined || this.value === null) {
|
|
7923
9000
|
this.optionSelected = undefined;
|
|
@@ -7985,6 +9062,19 @@ class AuroMenu extends i$2 {
|
|
|
7985
9062
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
7986
9063
|
}
|
|
7987
9064
|
|
|
9065
|
+
// Handle layout propagation to all menus and options
|
|
9066
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
9067
|
+
[
|
|
9068
|
+
'size',
|
|
9069
|
+
'shape'
|
|
9070
|
+
].forEach((prop) => {
|
|
9071
|
+
if (changedProperties.has(prop)) {
|
|
9072
|
+
propagationTargets.forEach((el) => {
|
|
9073
|
+
el.setAttribute(prop, this[prop]);
|
|
9074
|
+
});
|
|
9075
|
+
}
|
|
9076
|
+
});
|
|
9077
|
+
|
|
7988
9078
|
// Regex for matchWord if needed
|
|
7989
9079
|
let regexWord = null;
|
|
7990
9080
|
|
|
@@ -8181,21 +9271,20 @@ class AuroMenu extends i$2 {
|
|
|
8181
9271
|
* @param {HTMLElement} menu - Root menu element.
|
|
8182
9272
|
*/
|
|
8183
9273
|
handleNestedMenus(menu) {
|
|
8184
|
-
|
|
9274
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
8185
9275
|
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
if (!
|
|
8190
|
-
|
|
9276
|
+
if (menu.level > 0) {
|
|
9277
|
+
menu.setAttribute('role', 'group');
|
|
9278
|
+
menu.removeAttribute("root");
|
|
9279
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
9280
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
8191
9281
|
}
|
|
9282
|
+
}
|
|
8192
9283
|
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
this.handleNestedMenus(nestedMenu);
|
|
9284
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
9285
|
+
options.forEach((option) => {
|
|
9286
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
9287
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
8199
9288
|
});
|
|
8200
9289
|
}
|
|
8201
9290
|
|
|
@@ -8437,28 +9526,39 @@ class AuroMenu extends i$2 {
|
|
|
8437
9526
|
}
|
|
8438
9527
|
|
|
8439
9528
|
/**
|
|
8440
|
-
*
|
|
8441
|
-
* @
|
|
9529
|
+
* Logic to determine the layout of the component.
|
|
9530
|
+
* @protected
|
|
9531
|
+
* @returns {void}
|
|
8442
9532
|
*/
|
|
8443
|
-
|
|
9533
|
+
renderLayout() {
|
|
8444
9534
|
if (this.loading) {
|
|
8445
9535
|
return x`
|
|
8446
|
-
<
|
|
8447
|
-
<
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
9536
|
+
<div class="wrapper">
|
|
9537
|
+
<auro-menuoption
|
|
9538
|
+
disabled
|
|
9539
|
+
loadingplaceholder
|
|
9540
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
9541
|
+
>
|
|
9542
|
+
<div>
|
|
9543
|
+
<slot name="loadingIcon"></slot>
|
|
9544
|
+
<slot name="loadingText"></slot>
|
|
9545
|
+
</div>
|
|
9546
|
+
</auro-menuoption>
|
|
9547
|
+
</div>
|
|
8452
9548
|
`;
|
|
8453
9549
|
}
|
|
8454
9550
|
|
|
8455
|
-
return x
|
|
9551
|
+
return x`
|
|
9552
|
+
<div class="wrapper">
|
|
9553
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9554
|
+
</div>
|
|
9555
|
+
`;
|
|
8456
9556
|
}
|
|
8457
9557
|
}
|
|
8458
9558
|
|
|
8459
|
-
var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-
|
|
9559
|
+
var styleCss$1 = i$5`: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}`;
|
|
8460
9560
|
|
|
8461
|
-
var colorCss$1 = i$5`: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)}`;
|
|
9561
|
+
var colorCss$1 = i$5`: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)}`;
|
|
8462
9562
|
|
|
8463
9563
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8464
9564
|
// See LICENSE in the project root for license information.
|
|
@@ -8806,8 +9906,12 @@ class AuroIcon extends BaseIcon {
|
|
|
8806
9906
|
async firstUpdated() {
|
|
8807
9907
|
await super.firstUpdated();
|
|
8808
9908
|
|
|
8809
|
-
|
|
8810
|
-
|
|
9909
|
+
/**
|
|
9910
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
9911
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
9912
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
9913
|
+
*/
|
|
9914
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
8811
9915
|
const svgDesc = this.svg.querySelector('desc');
|
|
8812
9916
|
|
|
8813
9917
|
if (svgDesc) {
|
|
@@ -8851,7 +9955,7 @@ class AuroIcon extends BaseIcon {
|
|
|
8851
9955
|
}
|
|
8852
9956
|
}
|
|
8853
9957
|
|
|
8854
|
-
var iconVersion = '8.0.
|
|
9958
|
+
var iconVersion = '8.0.4';
|
|
8855
9959
|
|
|
8856
9960
|
var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" 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=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
8857
9961
|
|
|
@@ -8869,10 +9973,13 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
8869
9973
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8870
9974
|
* @slot - Specifies text for an option, but is not the value.
|
|
8871
9975
|
*/
|
|
8872
|
-
class AuroMenuOption extends
|
|
9976
|
+
class AuroMenuOption extends AuroElement$4 {
|
|
8873
9977
|
constructor() {
|
|
8874
9978
|
super();
|
|
8875
9979
|
|
|
9980
|
+
this.size = ""; // md, lg, xl
|
|
9981
|
+
this.shape = ""; // box, rounded, pill
|
|
9982
|
+
|
|
8876
9983
|
/**
|
|
8877
9984
|
* Generate unique names for dependency components.
|
|
8878
9985
|
*/
|
|
@@ -8891,11 +9998,12 @@ class AuroMenuOption extends i$2 {
|
|
|
8891
9998
|
/**
|
|
8892
9999
|
* @private
|
|
8893
10000
|
*/
|
|
8894
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10001
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
8895
10002
|
}
|
|
8896
10003
|
|
|
8897
10004
|
static get properties() {
|
|
8898
10005
|
return {
|
|
10006
|
+
...super.properties,
|
|
8899
10007
|
nocheckmark: {
|
|
8900
10008
|
type: Boolean,
|
|
8901
10009
|
reflect: true
|
|
@@ -8935,7 +10043,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8935
10043
|
*
|
|
8936
10044
|
*/
|
|
8937
10045
|
static register(name = "auro-menuoption") {
|
|
8938
|
-
AuroLibraryRuntimeUtils$
|
|
10046
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenuOption);
|
|
8939
10047
|
}
|
|
8940
10048
|
|
|
8941
10049
|
firstUpdated() {
|
|
@@ -8957,6 +10065,8 @@ class AuroMenuOption extends i$2 {
|
|
|
8957
10065
|
|
|
8958
10066
|
// observer for selected property changes
|
|
8959
10067
|
updated(changedProperties) {
|
|
10068
|
+
super.updated(changedProperties);
|
|
10069
|
+
|
|
8960
10070
|
if (changedProperties.has('selected')) {
|
|
8961
10071
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8962
10072
|
}
|
|
@@ -8978,10 +10088,19 @@ class AuroMenuOption extends i$2 {
|
|
|
8978
10088
|
return u`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
|
|
8979
10089
|
}
|
|
8980
10090
|
|
|
8981
|
-
|
|
10091
|
+
/**
|
|
10092
|
+
* Logic to determine the layout of the component.
|
|
10093
|
+
* @protected
|
|
10094
|
+
* @returns {void}
|
|
10095
|
+
*/
|
|
10096
|
+
renderLayout() {
|
|
8982
10097
|
return u`
|
|
8983
|
-
|
|
8984
|
-
|
|
10098
|
+
<div class="wrapper">
|
|
10099
|
+
${this.selected && !this.nocheckmark
|
|
10100
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
10101
|
+
: undefined}
|
|
10102
|
+
<slot></slot>
|
|
10103
|
+
</div>
|
|
8985
10104
|
`;
|
|
8986
10105
|
}
|
|
8987
10106
|
}
|