@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.6 → 0.0.0-pr624.60
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 +1214 -83
- package/components/bibtemplate/dist/registered.js +1214 -83
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +47 -14
- package/components/checkbox/demo/api.min.js +49 -37
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +49 -37
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +49 -37
- package/components/checkbox/dist/registered.js +49 -37
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +112 -8
- package/components/combobox/demo/api.min.js +2941 -851
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +2941 -851
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/auro-combobox.d.ts +37 -8
- package/components/combobox/dist/index.js +2730 -736
- package/components/combobox/dist/registered.js +2730 -736
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +156 -21
- package/components/counter/demo/api.min.js +6696 -4097
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +185 -34
- package/components/counter/demo/index.min.js +6696 -4097
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +151 -11
- package/components/counter/dist/auro-counter.d.ts +16 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +6696 -4097
- package/components/counter/dist/registered.js +6696 -4097
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +24 -16
- package/components/datepicker/demo/api.min.js +11749 -8230
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +71 -4
- package/components/datepicker/demo/index.min.js +11749 -8230
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/auro-datepicker.d.ts +84 -11
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +6531 -3012
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +6531 -3012
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +81 -274
- package/components/dropdown/demo/api.min.js +429 -195
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +429 -195
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +41 -76
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +429 -195
- package/components/dropdown/dist/registered.js +429 -195
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +1 -1
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/index.js +2 -2
- package/components/helptext/dist/registered.js +2 -2
- package/components/input/README.md +5 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +226 -129
- package/components/input/demo/api.min.js +828 -234
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +828 -234
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +5 -2
- package/components/input/dist/auro-input.d.ts +3 -3
- package/components/input/dist/base-input.d.ts +33 -9
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +828 -234
- package/components/input/dist/registered.js +828 -234
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +32 -10
- package/components/menu/demo/api.md +69 -8
- package/components/menu/demo/api.min.js +238 -47
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +238 -47
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +41 -7
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +238 -47
- package/components/menu/dist/registered.js +238 -47
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +7 -8
- package/components/radio/demo/api.min.js +72 -85
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +72 -85
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +9 -12
- package/components/radio/dist/index.js +72 -85
- package/components/radio/dist/registered.js +72 -85
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +104 -57
- package/components/select/demo/api.min.js +2107 -639
- package/components/select/demo/index.html +16 -11
- package/components/select/demo/index.md +45 -158
- package/components/select/demo/index.min.js +2104 -624
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +57 -16
- package/components/select/dist/index.js +2028 -644
- package/components/select/dist/registered.js +2028 -644
- package/package.json +29 -26
- /package/components/{datepicker/dist/styles/emphasized/style-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/dropdown/dist/styles/{default → classic}/bibColors-css.d.ts +0 -0
- /package/components/dropdown/dist/styles/{default → classic}/bibStyles-css.d.ts +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menu-css.d.ts} +0 -0
|
@@ -41,25 +41,25 @@ const t$2=globalThis,i$3=t$2.trustedTypes,s$3=i$3?i$3.createPolicy("lit-html",{c
|
|
|
41
41
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
42
|
*/const s$2=globalThis;let i$2 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$2._$litElement$=true,i$2["finalized"]=true,s$2.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$2.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$2.litElementVersions??=[]).push("4.2.0");
|
|
43
43
|
|
|
44
|
-
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:
|
|
44
|
+
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}`;
|
|
45
45
|
|
|
46
|
-
var styleCss$4 = 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}`;
|
|
46
|
+
var styleCss$4 = 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}:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{overflow:clip !important;width:100%;padding:0;border:0;background:unset;outline:none;overflow-clip-margin:0 !important;text-overflow:ellipsis}.displayValue{display:none}.displayValue.hasContent:is(.withValue):not(.hasFocus){display:flex;align-items:center}.accents:not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}`;
|
|
47
47
|
|
|
48
|
-
var styleDefaultCss = i$5`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}
|
|
48
|
+
var styleDefaultCss = i$5`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}: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}.layoutDefault :host,:host(:not([layout])) :host{position:relative;display:block}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{display:flex;flex-direction:row}.layoutDefault .main,:host(:not([layout])) .main{display:flex;flex-direction:row;position:relative;flex:1}`;
|
|
49
49
|
|
|
50
|
-
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{color:var(--ds-auro-input-
|
|
50
|
+
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}.wrapper input::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper .displayValue{background-color:var(--ds-auro-input-background-color)}:host(:not([ondark])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host(:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([ondark])[disabled]){--ds-auro-input-border-color: var(--ds-basic-color-border-subtle, #dddddd);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([ondark][disabled]){--ds-auro-input-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
51
51
|
|
|
52
|
-
var tokensCss$4 = i$5`:host(:not([ondark])){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: transparent}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-
|
|
52
|
+
var tokensCss$4 = i$5`:host(:not([ondark])){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: transparent}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: transparent}`;
|
|
53
53
|
|
|
54
|
-
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-input-outline-color)}.layout-classic .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;
|
|
54
|
+
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-input-outline-color)}.layout-classic .mainContent{position:relative;display:flex;flex:1;flex-direction:column;justify-content:center;cursor:text}.layout-classic .mainContent label{cursor:text;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{height:auto;font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);justify-self:flex-start;line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;padding-bottom:0;line-height:0}.layout-classic .accents .typeIcon>*{margin-left:var(--ds-size-100, 0.5rem)}.layout-classic .accents.left{padding-right:var(--ds-size-100, 0.5rem)}.layout-classic .accents.right{padding-left:var(--ds-size-100, 0.5rem)}.layout-classic .accents.right .notification{margin-right:var(--ds-size-100, 0.5rem)}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}`;
|
|
55
55
|
|
|
56
|
-
var classicColorCss = i$5`.layout-classic label{color:var(--ds-auro-input-label-text-color)}.layout-classic:focus-within{--ds-auro-input-outline-color: var(--ds-auro-input-border-color)}:host(:not([ondark])) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a);--ds-auro-input-outline-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-outline-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-
|
|
56
|
+
var classicColorCss = i$5`.layout-classic label{color:var(--ds-auro-input-label-text-color)}.layout-classic:focus-within{--ds-auro-input-outline-color: var(--ds-auro-input-border-color)}:host(:not([ondark])) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a);--ds-auro-input-outline-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-outline-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
57
57
|
|
|
58
|
-
var emphasizedStyleCss = i$5`:host
|
|
58
|
+
var emphasizedStyleCss = i$5`:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}.layout-emphasized,.layout-emphasized-left,.layout-emphasized-right{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-emphasized label,.layout-emphasized-left label,.layout-emphasized-right label{text-transform:uppercase;font-size:32px;line-height:38px}.layout-emphasized input,.layout-emphasized-left input,.layout-emphasized-right input{text-align:center;font-size:14px;line-height:20px}.layout-emphasized .mainContent,.layout-emphasized-left .mainContent,.layout-emphasized-right .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-emphasized .displayValue,.layout-emphasized-left .displayValue,.layout-emphasized-right .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-emphasized .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-left .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-right .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-emphasized .displayValueWrapper,.layout-emphasized-left .displayValueWrapper,.layout-emphasized-right .displayValueWrapper{transform:translateY(-50%)}.layout-emphasized.withValue,.layout-emphasized-left.withValue,.layout-emphasized-right.withValue{justify-content:flex-start}.layout-emphasized.withValue label,.layout-emphasized-left.withValue label,.layout-emphasized-right.withValue label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized.withValue input,.layout-emphasized-left.withValue input,.layout-emphasized-right.withValue input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-left:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-right:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{justify-content:flex-start}.layout-emphasized:focus-within label,.layout-emphasized-left:focus-within label,.layout-emphasized-right:focus-within label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized:focus-within input,.layout-emphasized-left:focus-within input,.layout-emphasized-right:focus-within input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:focus-within .alertNotification,.layout-emphasized-left:focus-within .alertNotification,.layout-emphasized-right:focus-within .alertNotification{display:none}.layout-emphasized .accents.left,.layout-emphasized-left .accents.left,.layout-emphasized-right .accents.left{padding-left:var(--ds-size-300, 1.5rem)}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:var(--ds-size-300, 1.5rem)}.layout-emphasized-left .alertNotification{margin-right:var(--ds-size-100, 0.5rem)}.layout-emphasized-left .clear{margin-left:var(--ds-size-100, 0.5rem)}.layout-emphasized .alertNotification,.layout-emphasized-right .alertNotification{margin-left:var(--ds-size-100, 0.5rem)}.layout-emphasized .clear,.layout-emphasized-right .clear{margin-right:var(--ds-size-100, 0.5rem)}`;
|
|
59
59
|
|
|
60
60
|
var emphasizedColorCss = i$5`.layout-emphasized:focus-within,.layout-emphasized.withValue,.layout-emphasized-left:focus-within,.layout-emphasized-left.withValue,.layout-emphasized-right:focus-within,.layout-emphasized-right.withValue{--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{--auro-input-border-color: var(--ds-auro-input-border-color)}`;
|
|
61
61
|
|
|
62
|
-
var snowflakeStyleCss = i$5`:host([layout*=snowflake]) .leftIndent{margin-left:24px;width:calc(100% - 48px)}:host([layout*=snowflake]) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.layout-snowflake{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-snowflake label{font-size:var(--ds-text-body-size-xs);line-height:20px}.layout-snowflake input{text-align:center;font-size:18px;line-height:26px}.layout-snowflake .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-snowflake .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-snowflake .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-snowflake .displayValueWrapper{transform:translateY(-50%)}.layout-snowflake .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-snowflake.withValue{justify-content:flex-start}.layout-snowflake:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-snowflake:focus-within{justify-content:flex-start}.layout-snowflake:focus-within .alertNotification{display:none}.layout-snowflake .accents{width:24px}.layout-snowflake .accents.left{padding-left:24px}.layout-snowflake .accents.right{padding-right:24px}.helpTextWrapper{text-align:center}`;
|
|
62
|
+
var snowflakeStyleCss = i$5`:root{--ds-advanced-color-button-flat-text: #676767;--ds-advanced-color-button-flat-text-disabled: #d0d0d0;--ds-advanced-color-button-flat-text-hover: #525252;--ds-advanced-color-button-flat-text-inverse: #ffffff;--ds-advanced-color-button-flat-text-inverse-disabled: #7e8894;--ds-advanced-color-button-flat-text-inverse-hover: #adadad;--ds-advanced-color-button-ghost-background-hover: rgba(0, 0, 0, 0.05);--ds-advanced-color-button-ghost-background-inverse-hover: rgba(255, 255, 255, 0.05);--ds-advanced-color-button-ghost-text: #01426a;--ds-advanced-color-button-ghost-text-disabled: #d0d0d0;--ds-advanced-color-button-ghost-text-inverse: #ffffff;--ds-advanced-color-button-ghost-text-inverse-disabled: #7e8894;--ds-advanced-color-button-primary-background: #01426a;--ds-advanced-color-button-primary-background-disabled: #acc9e2;--ds-advanced-color-button-primary-background-hover: #00274a;--ds-advanced-color-button-primary-background-inactive: #cfe0ef;--ds-advanced-color-button-primary-background-inactive-hover: #89b2d4;--ds-advanced-color-button-primary-background-inverse: #ffffff;--ds-advanced-color-button-primary-background-inverse-disabled: rgba(255, 255, 255, 0.75);--ds-advanced-color-button-primary-background-inverse-hover: #ebf3f9;--ds-advanced-color-button-primary-border: #01426a;--ds-advanced-color-button-primary-border-disabled: #acc9e2;--ds-advanced-color-button-primary-border-hover: #00274a;--ds-advanced-color-button-primary-border-inverse: #ffffff;--ds-advanced-color-button-primary-border-inverse-disabled: rgba(255, 255, 255, 0.75);--ds-advanced-color-button-primary-border-inverse-hover: #ebf3f9;--ds-advanced-color-button-primary-text: #ffffff;--ds-advanced-color-button-primary-text-disabled: #ffffff;--ds-advanced-color-button-primary-text-inverse: #01426a;--ds-advanced-color-button-secondary-background: #ffffff;--ds-advanced-color-button-secondary-background-disabled: #f7f7f7;--ds-advanced-color-button-secondary-background-hover: #f2f2f2;--ds-advanced-color-button-secondary-background-inverse-hover: rgba(255, 255, 255, 0.1);--ds-advanced-color-button-secondary-border: #01426a;--ds-advanced-color-button-secondary-border-hover: #00274a;--ds-advanced-color-button-secondary-border-disabled: #cfe0ef;--ds-advanced-color-button-secondary-border-inverse: #ffffff;--ds-advanced-color-button-secondary-border-inverse-disabled: #dddddd;--ds-advanced-color-button-secondary-text: #01426a;--ds-advanced-color-button-secondary-text-hover: #00274a;--ds-advanced-color-button-secondary-text-inverse: #ffffff;--ds-advanced-color-button-tertiary-background: rgba(0, 0, 0, 0.05);--ds-advanced-color-button-tertiary-background-hover: rgba(0, 0, 0, 0.1);--ds-advanced-color-button-tertiary-background-inverse: rgba(255, 255, 255, 0.05);--ds-advanced-color-button-tertiary-background-inverse-hover: rgba(255, 255, 255, 0.1);--ds-advanced-color-button-tertiary-text: #01426a;--ds-advanced-color-button-tertiary-text-hover: #00274a;--ds-advanced-color-button-tertiary-text-inverse: #ffffff;--ds-advanced-color-accents-accent1: #b2d583;--ds-advanced-color-accents-accent1-bold: #92c450;--ds-advanced-color-accents-accent1-muted: #deedca;--ds-advanced-color-accents-accent2: #fad362;--ds-advanced-color-accents-accent2-bold: #f2ba14;--ds-advanced-color-accents-accent2-muted: #fde398;--ds-advanced-color-accents-accent3: #63beff;--ds-advanced-color-accents-accent3-bold: #0074ca;--ds-advanced-color-accents-accent3-muted: #aedeff;--ds-advanced-color-accents-accent4: #feb17a;--ds-advanced-color-accents-accent4-bold: #fb7f24;--ds-advanced-color-accents-accent4-muted: #ffe2cf;--ds-advanced-color-accents-transparency: rgba(0, 0, 0, 0.1);--ds-advanced-color-accents-transparency-inverse: rgba(255, 255, 255, 0.2);--ds-advanced-color-avatar-gradient-bottom: #cfe0ef;--ds-advanced-color-avatar-gradient-top: #6899c6;--ds-advanced-color-boolean-disabled-inverse: #7e8894;--ds-advanced-color-boolean-error: #e31f26;--ds-advanced-color-boolean-error-hover: #b1161c;--ds-advanced-color-boolean-error-inverse: #f9a4a8;--ds-advanced-color-boolean-error-inverse-hover: #f15f65;--ds-advanced-color-boolean-indicator: #ffffff;--ds-advanced-color-boolean-indicator-inverse: #00274a;--ds-advanced-color-boolean-isfalse: #ffffff;--ds-advanced-color-boolean-isfalse-border: #585e67;--ds-advanced-color-boolean-isfalse-border-inverse: #ffffff;--ds-advanced-color-boolean-isfalse-hover: #f2f2f2;--ds-advanced-color-boolean-isfalse-inverse: rgba(255, 255, 255, 0.15);--ds-advanced-color-boolean-isfalse-inverse-hover: rgba(255, 255, 255, 0.2);--ds-advanced-color-boolean-istrue: #01426a;--ds-advanced-color-boolean-istrue-hover: #00274a;--ds-advanced-color-boolean-istrue-inverse: #ffffff;--ds-advanced-color-boolean-istrue-inverse-hover: rgba(255, 255, 255, 0.7);--ds-advanced-color-flightline-indicator: #00274a;--ds-advanced-color-flightline-line: #00274a;--ds-advanced-color-hyperlink-text: #2875b5;--ds-advanced-color-hyperlink-text-hover: #01426a;--ds-advanced-color-hyperlink-text-inverse: #ffffff;--ds-advanced-color-hyperlink-text-inverse-hover: #ebf3f9;--ds-advanced-color-shared-background: #ffffff;--ds-advanced-color-shared-background-inverse: rgba(255, 255, 255, 0.15);--ds-advanced-color-shared-background-inverse-disabled: rgba(255, 255, 255, 0.1);--ds-advanced-color-shared-background-inverse-hover: rgba(255, 255, 255, 0.2);--ds-advanced-color-shared-background-muted: #f7f7f7;--ds-advanced-color-shared-background-strong: #7e7e7e;--ds-advanced-color-shared-scrim: rgba(0, 0, 0, 0.5);--ds-advanced-color-shared-text-accent: #2875b5;--ds-advanced-color-skeleton-background: #f7f8fa;--ds-advanced-color-skeleton-wave: #e4e8ec;--ds-advanced-color-state-background-disabled: #dddddd;--ds-advanced-color-state-background-hover: #f2f2f2;--ds-advanced-color-state-background-inverse-disabled: #7e8894;--ds-advanced-color-state-error-inverse: #f9a4a8;--ds-advanced-color-state-focused: #01426a;--ds-advanced-color-state-focused-inverse: #ffffff;--ds-advanced-color-state-selected: #01426a;--ds-advanced-color-state-selected-hover: #00274a;--ds-basic-color-border-bold: #585e67;--ds-basic-color-border-brand: #00274a;--ds-basic-color-border-default: #959595;--ds-basic-color-border-divider: rgba(0, 0, 0, 0.15);--ds-basic-color-border-divider-inverse: rgba(255, 255, 255, 0.4);--ds-basic-color-border-inverse: #ffffff;--ds-basic-color-border-subtle: #dddddd;--ds-basic-color-brand-primary: #01426a;--ds-basic-color-brand-primary-bold: #00274a;--ds-basic-color-brand-primary-muted: #ebf3f9;--ds-basic-color-brand-primary-subtle: #2875b5;--ds-basic-color-brand-secondary: #5de3f7;--ds-basic-color-brand-secondary-bold: #18c3dd;--ds-basic-color-brand-secondary-muted: #ebfafd;--ds-basic-color-brand-secondary-subtle: #b4eff9;--ds-basic-color-brand-tertiary: #a3cd6a;--ds-basic-color-brand-tertiary-bold: #7daf3b;--ds-basic-color-brand-tertiary-muted: #eaf3dd;--ds-basic-color-brand-tertiary-subtle: #c9e1a7;--ds-basic-color-fare-basiceconomy: #97eaf8;--ds-basic-color-fare-business: #01426a;--ds-basic-color-fare-economy: #0074ca;--ds-basic-color-fare-first: #00274a;--ds-basic-color-fare-premiumeconomy: #005154;--ds-basic-color-page-background-default: #ebfafd;--ds-basic-color-page-background-utility: #ffffff;--ds-basic-color-status-default: #afb9c6;--ds-basic-color-status-error: #e31f26;--ds-basic-color-status-error-subtle: #fbc6c6;--ds-basic-color-status-info: #01426a;--ds-basic-color-status-info-subtle: #ebf3f9;--ds-basic-color-status-success: #447a1f;--ds-basic-color-status-success-subtle: #d6eac7;--ds-basic-color-status-warning: #fac200;--ds-basic-color-status-warning-subtle: #fff0b2;--ds-basic-color-surface-accent1: #5de3f7;--ds-basic-color-surface-accent1-muted: #ebfafd;--ds-basic-color-surface-accent1-subtle: #b4eff9;--ds-basic-color-surface-accent2: #a3cd6a;--ds-basic-color-surface-accent2-muted: #eaf3dd;--ds-basic-color-surface-default: #ffffff;--ds-basic-color-surface-inverse: #00274a;--ds-basic-color-surface-inverse-subtle: #2875b5;--ds-basic-color-surface-neutral-medium: #c5c5c5;--ds-basic-color-surface-neutral-subtle: #f7f7f7;--ds-basic-color-texticon-accent1: #265688;--ds-basic-color-texticon-default: #2a2a2a;--ds-basic-color-texticon-disabled: #d0d0d0;--ds-basic-color-texticon-inverse: #ffffff;--ds-basic-color-texticon-inverse-disabled: #7e8894;--ds-basic-color-texticon-inverse-muted: #ccd2db;--ds-basic-color-texticon-muted: #676767;--ds-basic-color-tier-program-loungetier-lounge: #01426a;--ds-basic-color-tier-program-loungetier-loungeplus: #53b390;--ds-basic-color-tier-program-loyaltytier-bronze: #d99f6d;--ds-basic-color-tier-program-loyaltytier-bronze-muted: #eed4be;--ds-basic-color-tier-program-loyaltytier-cobalt: #030772;--ds-basic-color-tier-program-loyaltytier-cobalt-muted: #a9b6d6;--ds-basic-color-tier-program-loyaltytier-copper: #cb7457;--ds-basic-color-tier-program-loyaltytier-copper-muted: #e7bfb1;--ds-basic-color-tier-program-loyaltytier-gold: #fbdc7a;--ds-basic-color-tier-program-loyaltytier-gold-muted: #fdefc4;--ds-basic-color-tier-program-loyaltytier-nickel: #abaab1;--ds-basic-color-tier-program-loyaltytier-nickel-muted: #e5e4e7;--ds-basic-color-tier-program-loyaltytier-platinum: #bcb8a4;--ds-basic-color-tier-program-loyaltytier-platinum-muted: #dad8cd;--ds-basic-color-tier-program-loyaltytier-silver: #e4e9ec;--ds-basic-color-tier-program-loyaltytier-silver-muted: #f9fafb;--ds-basic-color-tier-program-loyaltytier-titanium: #282828;--ds-basic-color-tier-program-loyaltytier-titanium-muted: #545454;--ds-basic-color-tier-program-oneworld-emerald: #139142;--ds-basic-color-tier-program-oneworld-ruby: #a41d4a;--ds-basic-color-tier-program-oneworld-sapphire: #015daa;--ds-basic-type-brand-family-primary: "AS Circular";--ds-basic-type-brand-family-secondary: "Good OT";--ds-basic-type-brand-line-height-primary: 1.3;--ds-basic-type-brand-line-height-secondary: 1;--ds-basic-type-brand-letter-spacing-primary: 0;--ds-basic-type-brand-letter-spacing-secondary: 0.05em;--ds-basic-type-brand-letter-spacing-tertiary: 0.10em;--ds-basic-type-family-accent: "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-body: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-display: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-family-heading: "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--ds-basic-type-letter-spacing-accent: 0.05em;--ds-basic-type-letter-spacing-accent2: 0.10em;--ds-basic-type-letter-spacing-body: 0;--ds-basic-type-letter-spacing-display: 0;--ds-basic-type-letter-spacing-heading: 0;--ds-basic-type-line-height-accent: 1.3;--ds-basic-type-line-height-accent2: 1;--ds-basic-type-line-height-body: 1.63;--ds-basic-type-line-height-body2: 1.5;--ds-basic-type-line-height-body3: 1.25;--ds-basic-type-line-height-body4: 1;--ds-basic-type-line-height-body5: 0.88;--ds-basic-type-line-height-display: 1.3;--ds-basic-type-line-height-heading: 1.3;--ds-basic-type-weight-accent: 450;--ds-basic-type-weight-accent2: 500;--ds-basic-type-weight-body: 450;--ds-basic-type-weight-display: 300;--ds-basic-type-weight-heading: 300;--ds-basic-type-weight-heading2: 450}:host([layout*=snowflake]) .leftIndent{margin-left:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}:host([layout*=snowflake]) .rightIndent{margin-right:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}.layout-snowflake{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-snowflake label{font-size:var(--ds-text-body-size-xs);line-height:20px}.layout-snowflake input{text-align:center;font-size:18px;line-height:26px}.layout-snowflake .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-snowflake .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-snowflake .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-snowflake .displayValueWrapper{transform:translateY(-50%)}.layout-snowflake.withValue{justify-content:flex-start}.layout-snowflake:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-snowflake:focus-within{justify-content:flex-start}.layout-snowflake:focus-within .alertNotification{display:none}.layout-snowflake .accents{width:var(--ds-size-300, 1.5rem)}.layout-snowflake .accents.left{padding-left:var(--ds-size-300, 1.5rem)}.layout-snowflake .accents.right{padding-right:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .helpTextWrapper{text-align:center}`;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
@@ -161,6 +161,8 @@ const stringsES = {
|
|
|
161
161
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
162
162
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
163
163
|
'clearInput': 'Borrar campo de entrada',
|
|
164
|
+
'showPassword': 'Mostrar contraseña',
|
|
165
|
+
'hidePassword': 'Ocultar contraseña'
|
|
164
166
|
};
|
|
165
167
|
|
|
166
168
|
const stringsEN = {
|
|
@@ -185,6 +187,8 @@ const stringsEN = {
|
|
|
185
187
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
186
188
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
187
189
|
'clearInput': 'Clear input field',
|
|
190
|
+
'showPassword': 'Show password',
|
|
191
|
+
'hidePassword': 'Hide password'
|
|
188
192
|
};
|
|
189
193
|
|
|
190
194
|
/**
|
|
@@ -4479,7 +4483,7 @@ const {
|
|
|
4479
4483
|
|
|
4480
4484
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4481
4485
|
|
|
4482
|
-
let AuroLibraryRuntimeUtils$
|
|
4486
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
4483
4487
|
|
|
4484
4488
|
/* eslint-disable jsdoc/require-param */
|
|
4485
4489
|
|
|
@@ -4549,7 +4553,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
4549
4553
|
class AuroFormValidation {
|
|
4550
4554
|
|
|
4551
4555
|
constructor() {
|
|
4552
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4556
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
4553
4557
|
}
|
|
4554
4558
|
|
|
4555
4559
|
/**
|
|
@@ -4609,19 +4613,19 @@ class AuroFormValidation {
|
|
|
4609
4613
|
{
|
|
4610
4614
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
4611
4615
|
validity: 'tooShort',
|
|
4612
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
4616
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
4613
4617
|
},
|
|
4614
4618
|
{
|
|
4615
4619
|
check: (e) => e.value?.length > e.maxLength,
|
|
4616
4620
|
validity: 'tooLong',
|
|
4617
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
4621
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
4618
4622
|
}
|
|
4619
4623
|
],
|
|
4620
4624
|
pattern: [
|
|
4621
4625
|
{
|
|
4622
4626
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
4623
4627
|
validity: 'patternMismatch',
|
|
4624
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
4628
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
4625
4629
|
}
|
|
4626
4630
|
]
|
|
4627
4631
|
},
|
|
@@ -4816,10 +4820,10 @@ class AuroFormValidation {
|
|
|
4816
4820
|
if (!hasValue && elem.required && elem.touched) {
|
|
4817
4821
|
elem.validity = 'valueMissing';
|
|
4818
4822
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
4819
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
4823
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
4820
4824
|
this.validateType(elem);
|
|
4821
4825
|
this.validateElementAttributes(elem);
|
|
4822
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
4826
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
4823
4827
|
this.validateElementAttributes(elem);
|
|
4824
4828
|
}
|
|
4825
4829
|
}
|
|
@@ -4828,7 +4832,9 @@ class AuroFormValidation {
|
|
|
4828
4832
|
elem.validity = this.auroInputElements[0].validity;
|
|
4829
4833
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
4830
4834
|
|
|
4831
|
-
|
|
4835
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
4836
|
+
// combobox's 2nd input will have noValidate set true.
|
|
4837
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
4832
4838
|
elem.validity = this.auroInputElements[1].validity;
|
|
4833
4839
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
4834
4840
|
}
|
|
@@ -4908,7 +4914,7 @@ class AuroFormValidation {
|
|
|
4908
4914
|
}
|
|
4909
4915
|
}
|
|
4910
4916
|
|
|
4911
|
-
let AuroElement$
|
|
4917
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
4912
4918
|
static get properties() {
|
|
4913
4919
|
return {
|
|
4914
4920
|
|
|
@@ -4943,18 +4949,21 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
4943
4949
|
}
|
|
4944
4950
|
|
|
4945
4951
|
resetShapeClasses() {
|
|
4946
|
-
|
|
4947
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4952
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4948
4953
|
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4954
|
+
if (wrapper) {
|
|
4955
|
+
wrapper.classList.forEach((className) => {
|
|
4956
|
+
if (className.startsWith('shape-')) {
|
|
4957
|
+
wrapper.classList.remove(className);
|
|
4958
|
+
}
|
|
4959
|
+
});
|
|
4955
4960
|
|
|
4956
|
-
|
|
4957
|
-
|
|
4961
|
+
}
|
|
4962
|
+
|
|
4963
|
+
if (this.shape && this.size) {
|
|
4964
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4965
|
+
} else {
|
|
4966
|
+
wrapper.classList.add('shape-none');
|
|
4958
4967
|
}
|
|
4959
4968
|
}
|
|
4960
4969
|
|
|
@@ -5010,19 +5019,24 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
5010
5019
|
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
5011
5020
|
* @attr id
|
|
5012
5021
|
*
|
|
5013
|
-
* @slot
|
|
5022
|
+
* @slot helpText - Sets the help text displayed below the input.
|
|
5014
5023
|
* @slot label - Sets the label text for the input.
|
|
5024
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
5025
|
+
* @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
|
|
5015
5026
|
*
|
|
5016
5027
|
* @csspart wrapper - Use for customizing the style of the root element
|
|
5017
5028
|
* @csspart label - Use for customizing the style of the label element
|
|
5018
5029
|
* @csspart helpText - Use for customizing the style of the helpText element
|
|
5030
|
+
* @csspart input - Use for customizing the style of the input element
|
|
5019
5031
|
* @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
|
|
5020
5032
|
* @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
|
|
5033
|
+
* @csspart accent-left - Use for customizing the style of the left accent element (e.g. padding, margin)
|
|
5034
|
+
* @csspart accent-right - Use for customizing the style of the right accent element (e.g. padding, margin)
|
|
5021
5035
|
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
5022
5036
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
5023
5037
|
*/
|
|
5024
5038
|
|
|
5025
|
-
class BaseInput extends AuroElement$
|
|
5039
|
+
class BaseInput extends AuroElement$2 {
|
|
5026
5040
|
|
|
5027
5041
|
constructor() {
|
|
5028
5042
|
super();
|
|
@@ -5115,7 +5129,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5115
5129
|
*/
|
|
5116
5130
|
a11yRole: {
|
|
5117
5131
|
type: String,
|
|
5118
|
-
attribute: true,
|
|
5119
5132
|
reflect: true
|
|
5120
5133
|
},
|
|
5121
5134
|
|
|
@@ -5124,7 +5137,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5124
5137
|
*/
|
|
5125
5138
|
a11yExpanded: {
|
|
5126
5139
|
type: Boolean,
|
|
5127
|
-
attribute: true,
|
|
5128
5140
|
reflect: true
|
|
5129
5141
|
},
|
|
5130
5142
|
|
|
@@ -5133,7 +5145,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5133
5145
|
*/
|
|
5134
5146
|
a11yControls: {
|
|
5135
5147
|
type: String,
|
|
5136
|
-
attribute: true,
|
|
5137
5148
|
reflect: true
|
|
5138
5149
|
},
|
|
5139
5150
|
|
|
@@ -5149,7 +5160,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5149
5160
|
* An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters].
|
|
5150
5161
|
*/
|
|
5151
5162
|
autocapitalize: {
|
|
5152
|
-
type: String
|
|
5163
|
+
type: String,
|
|
5164
|
+
reflect: true
|
|
5153
5165
|
},
|
|
5154
5166
|
|
|
5155
5167
|
/**
|
|
@@ -5164,7 +5176,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5164
5176
|
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
5165
5177
|
*/
|
|
5166
5178
|
autocorrect: {
|
|
5167
|
-
type: String
|
|
5179
|
+
type: String,
|
|
5180
|
+
reflect: true
|
|
5168
5181
|
},
|
|
5169
5182
|
|
|
5170
5183
|
/**
|
|
@@ -5209,7 +5222,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5209
5222
|
/** Exposes inputmode attribute for input. */
|
|
5210
5223
|
inputmode: {
|
|
5211
5224
|
type: String,
|
|
5212
|
-
attribute: true,
|
|
5213
5225
|
reflect: true
|
|
5214
5226
|
},
|
|
5215
5227
|
|
|
@@ -5217,7 +5229,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5217
5229
|
* Defines the language of an element.
|
|
5218
5230
|
*/
|
|
5219
5231
|
lang: {
|
|
5220
|
-
type: String
|
|
5232
|
+
type: String,
|
|
5233
|
+
reflect: true
|
|
5221
5234
|
},
|
|
5222
5235
|
|
|
5223
5236
|
/**
|
|
@@ -5231,7 +5244,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5231
5244
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5232
5245
|
*/
|
|
5233
5246
|
maxLength: {
|
|
5234
|
-
type: Number
|
|
5247
|
+
type: Number,
|
|
5248
|
+
reflect: true
|
|
5235
5249
|
},
|
|
5236
5250
|
|
|
5237
5251
|
/**
|
|
@@ -5245,14 +5259,25 @@ class BaseInput extends AuroElement$1 {
|
|
|
5245
5259
|
* The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
5246
5260
|
*/
|
|
5247
5261
|
minLength: {
|
|
5248
|
-
type: Number
|
|
5262
|
+
type: Number,
|
|
5263
|
+
reflect: true
|
|
5249
5264
|
},
|
|
5250
5265
|
|
|
5251
5266
|
/**
|
|
5252
5267
|
* Populates the `name` attribute on the input.
|
|
5253
5268
|
*/
|
|
5254
5269
|
name: {
|
|
5255
|
-
type: String
|
|
5270
|
+
type: String,
|
|
5271
|
+
reflect: true
|
|
5272
|
+
},
|
|
5273
|
+
|
|
5274
|
+
/**
|
|
5275
|
+
* Sets styles for nested operation - removes borders, hides help + error text, and
|
|
5276
|
+
* hides accents.
|
|
5277
|
+
*/
|
|
5278
|
+
nested: {
|
|
5279
|
+
type: Boolean,
|
|
5280
|
+
reflect: true
|
|
5256
5281
|
},
|
|
5257
5282
|
|
|
5258
5283
|
/**
|
|
@@ -5280,10 +5305,11 @@ class BaseInput extends AuroElement$1 {
|
|
|
5280
5305
|
},
|
|
5281
5306
|
|
|
5282
5307
|
/**
|
|
5283
|
-
* Define custom placeholder text
|
|
5308
|
+
* Define custom placeholder text.
|
|
5284
5309
|
*/
|
|
5285
5310
|
placeholder: {
|
|
5286
|
-
type: String
|
|
5311
|
+
type: String,
|
|
5312
|
+
reflect: true
|
|
5287
5313
|
},
|
|
5288
5314
|
|
|
5289
5315
|
/**
|
|
@@ -5372,6 +5398,14 @@ class BaseInput extends AuroElement$1 {
|
|
|
5372
5398
|
type: String
|
|
5373
5399
|
},
|
|
5374
5400
|
|
|
5401
|
+
/**
|
|
5402
|
+
* Simple makes the input render without a border.
|
|
5403
|
+
*/
|
|
5404
|
+
simple: {
|
|
5405
|
+
type: Boolean,
|
|
5406
|
+
reflect: true
|
|
5407
|
+
},
|
|
5408
|
+
|
|
5375
5409
|
/**
|
|
5376
5410
|
* Custom help text message for email type validity.
|
|
5377
5411
|
*/
|
|
@@ -5383,7 +5417,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5383
5417
|
* An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
|
|
5384
5418
|
*/
|
|
5385
5419
|
spellcheck: {
|
|
5386
|
-
type: String
|
|
5420
|
+
type: String,
|
|
5421
|
+
reflect: true
|
|
5387
5422
|
},
|
|
5388
5423
|
|
|
5389
5424
|
/**
|
|
@@ -5398,7 +5433,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5398
5433
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5399
5434
|
*/
|
|
5400
5435
|
value: {
|
|
5401
|
-
type: String
|
|
5436
|
+
type: String,
|
|
5437
|
+
reflect: true
|
|
5402
5438
|
},
|
|
5403
5439
|
|
|
5404
5440
|
/**
|
|
@@ -5429,8 +5465,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5429
5465
|
},
|
|
5430
5466
|
|
|
5431
5467
|
/**
|
|
5468
|
+
* The id for input node.
|
|
5432
5469
|
* @private
|
|
5433
|
-
* id for input node
|
|
5434
5470
|
*/
|
|
5435
5471
|
inputId: {
|
|
5436
5472
|
type: String,
|
|
@@ -5454,7 +5490,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
5454
5490
|
}
|
|
5455
5491
|
|
|
5456
5492
|
firstUpdated() {
|
|
5457
|
-
// clicking anywhere in the main wrapper will focus the input. Clicking the
|
|
5493
|
+
// clicking anywhere in the main wrapper will focus the input. Clicking the helpText or label will not focus the input.
|
|
5458
5494
|
this.wrapperElement = this.shadowRoot.querySelector('.wrapper');
|
|
5459
5495
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
5460
5496
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
@@ -5566,9 +5602,9 @@ class BaseInput extends AuroElement$1 {
|
|
|
5566
5602
|
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
5567
5603
|
this.validation.validate(this);
|
|
5568
5604
|
}
|
|
5569
|
-
|
|
5570
|
-
this.notifyValueChanged();
|
|
5571
5605
|
}
|
|
5606
|
+
|
|
5607
|
+
this.notifyValueChanged();
|
|
5572
5608
|
}
|
|
5573
5609
|
|
|
5574
5610
|
if (changedProperties.has('error')) {
|
|
@@ -5678,7 +5714,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5678
5714
|
|
|
5679
5715
|
/**
|
|
5680
5716
|
* Function to set element focus.
|
|
5681
|
-
* @private
|
|
5682
5717
|
* @return {void}
|
|
5683
5718
|
*/
|
|
5684
5719
|
focus() {
|
|
@@ -5876,28 +5911,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
5876
5911
|
* @returns {void}
|
|
5877
5912
|
*/
|
|
5878
5913
|
getPlaceholder() {
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
// console.warn(this.getActiveElement());
|
|
5884
|
-
|
|
5885
|
-
if (!isFocused) {
|
|
5886
|
-
if (this.placeholder) {
|
|
5887
|
-
this.placeholderStr = this.placeholder;
|
|
5888
|
-
// return this.placeholder;
|
|
5889
|
-
} else if (this.type === 'date') {
|
|
5890
|
-
this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5891
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5892
|
-
}
|
|
5893
|
-
} else {
|
|
5894
|
-
this.placeholderStr = '';
|
|
5914
|
+
if (this.placeholder) {
|
|
5915
|
+
this.placeholderStr = this.placeholder;
|
|
5916
|
+
} else if (this.type === 'date') {
|
|
5917
|
+
this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5895
5918
|
}
|
|
5896
5919
|
|
|
5897
5920
|
this.requestUpdate();
|
|
5898
5921
|
|
|
5899
|
-
|
|
5900
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5922
|
+
return this.placeholderStr;
|
|
5901
5923
|
}
|
|
5902
5924
|
|
|
5903
5925
|
/**
|
|
@@ -6110,7 +6132,7 @@ class AuroDependencyVersioning {
|
|
|
6110
6132
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6111
6133
|
*/
|
|
6112
6134
|
|
|
6113
|
-
class AuroElement extends i$2 {
|
|
6135
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
6114
6136
|
|
|
6115
6137
|
// function to define props used within the scope of this component
|
|
6116
6138
|
static get properties() {
|
|
@@ -6134,7 +6156,7 @@ class AuroElement extends i$2 {
|
|
|
6134
6156
|
|
|
6135
6157
|
return 'false'
|
|
6136
6158
|
}
|
|
6137
|
-
}
|
|
6159
|
+
};
|
|
6138
6160
|
|
|
6139
6161
|
var error = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
6140
6162
|
|
|
@@ -6178,7 +6200,7 @@ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
6178
6200
|
*/
|
|
6179
6201
|
|
|
6180
6202
|
// build the component class
|
|
6181
|
-
class BaseIcon extends AuroElement {
|
|
6203
|
+
class BaseIcon extends AuroElement$1 {
|
|
6182
6204
|
constructor() {
|
|
6183
6205
|
super();
|
|
6184
6206
|
this.onDark = false;
|
|
@@ -6261,7 +6283,7 @@ var colorCss$3 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
6261
6283
|
|
|
6262
6284
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6263
6285
|
|
|
6264
|
-
let AuroLibraryRuntimeUtils$
|
|
6286
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6265
6287
|
|
|
6266
6288
|
/* eslint-disable jsdoc/require-param */
|
|
6267
6289
|
|
|
@@ -6343,7 +6365,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6343
6365
|
*/
|
|
6344
6366
|
privateDefaults() {
|
|
6345
6367
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
6346
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6368
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6347
6369
|
}
|
|
6348
6370
|
|
|
6349
6371
|
// function to define props used within the scope of this component
|
|
@@ -6425,7 +6447,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6425
6447
|
*
|
|
6426
6448
|
*/
|
|
6427
6449
|
static register(name = "auro-icon") {
|
|
6428
|
-
AuroLibraryRuntimeUtils$
|
|
6450
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
6429
6451
|
}
|
|
6430
6452
|
|
|
6431
6453
|
connectedCallback() {
|
|
@@ -6446,8 +6468,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6446
6468
|
async firstUpdated() {
|
|
6447
6469
|
await super.firstUpdated();
|
|
6448
6470
|
|
|
6449
|
-
|
|
6450
|
-
|
|
6471
|
+
/**
|
|
6472
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6473
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6474
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6475
|
+
*/
|
|
6476
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6451
6477
|
const svgDesc = this.svg.querySelector('desc');
|
|
6452
6478
|
|
|
6453
6479
|
if (svgDesc) {
|
|
@@ -6491,13 +6517,550 @@ class AuroIcon extends BaseIcon {
|
|
|
6491
6517
|
}
|
|
6492
6518
|
}
|
|
6493
6519
|
|
|
6494
|
-
var iconVersion = '8.0.
|
|
6520
|
+
var iconVersion = '8.0.4';
|
|
6495
6521
|
|
|
6496
|
-
|
|
6522
|
+
/**
|
|
6523
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6524
|
+
*/
|
|
6525
|
+
const _observers = new WeakMap();
|
|
6497
6526
|
|
|
6498
|
-
|
|
6527
|
+
/**
|
|
6528
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6529
|
+
* Structure: {
|
|
6530
|
+
* host: {
|
|
6531
|
+
* matchers: Set<Function>,
|
|
6532
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6533
|
+
* }
|
|
6534
|
+
* }
|
|
6535
|
+
*/
|
|
6536
|
+
const _transportConfig = new WeakMap();
|
|
6537
|
+
|
|
6538
|
+
/**
|
|
6539
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6540
|
+
*
|
|
6541
|
+
* @param {Object} params - The parameters for the function.
|
|
6542
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6543
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6544
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6545
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6546
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6547
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6548
|
+
*/
|
|
6549
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
6550
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
6551
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
6552
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
6553
|
+
}
|
|
6554
|
+
|
|
6555
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
6556
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
6557
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
6558
|
+
}
|
|
6499
6559
|
|
|
6500
|
-
|
|
6560
|
+
// Guard Clause: Ensure match is a function
|
|
6561
|
+
if (typeof match !== 'function') {
|
|
6562
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
6563
|
+
}
|
|
6564
|
+
|
|
6565
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
6566
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
6567
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
6568
|
+
}
|
|
6569
|
+
|
|
6570
|
+
// Register this transport and get cleanup function
|
|
6571
|
+
return _registerTransport({
|
|
6572
|
+
host,
|
|
6573
|
+
target,
|
|
6574
|
+
matcher: match,
|
|
6575
|
+
removeOriginal
|
|
6576
|
+
});
|
|
6577
|
+
};
|
|
6578
|
+
|
|
6579
|
+
/**
|
|
6580
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
6581
|
+
*
|
|
6582
|
+
* @param {Object} params - The parameters object.
|
|
6583
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
6584
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
6585
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
6586
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
6587
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
6588
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
6589
|
+
* @private
|
|
6590
|
+
*/
|
|
6591
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6592
|
+
// Initialize config for this host if it doesn't exist
|
|
6593
|
+
if (!_transportConfig.has(host)) {
|
|
6594
|
+
_transportConfig.set(host, {
|
|
6595
|
+
matchers: new Set(),
|
|
6596
|
+
targets: new Map()
|
|
6597
|
+
});
|
|
6598
|
+
}
|
|
6599
|
+
|
|
6600
|
+
const config = _transportConfig.get(host);
|
|
6601
|
+
|
|
6602
|
+
// Add the matcher to the set of matchers for this host
|
|
6603
|
+
config.matchers.add(matcher);
|
|
6604
|
+
|
|
6605
|
+
// Initialize target entry if it doesn't exist
|
|
6606
|
+
if (!config.targets.has(target)) {
|
|
6607
|
+
config.targets.set(target, new Map());
|
|
6608
|
+
}
|
|
6609
|
+
|
|
6610
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
6611
|
+
config.targets.get(target).set(matcher, {
|
|
6612
|
+
removeOriginal,
|
|
6613
|
+
currentAttributes: new Map()
|
|
6614
|
+
});
|
|
6615
|
+
|
|
6616
|
+
// Perform initial attribute transport
|
|
6617
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
6618
|
+
|
|
6619
|
+
// Attach observer
|
|
6620
|
+
_attachObserver(host);
|
|
6621
|
+
|
|
6622
|
+
// Return cleanup function and utility functions
|
|
6623
|
+
return {
|
|
6624
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
6625
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
6626
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
6627
|
+
}
|
|
6628
|
+
};
|
|
6629
|
+
|
|
6630
|
+
/**
|
|
6631
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
6632
|
+
*
|
|
6633
|
+
* @param {HTMLElement} host - The host element
|
|
6634
|
+
* @param {HTMLElement} target - The target element
|
|
6635
|
+
* @param {Function} matcher - The matcher function
|
|
6636
|
+
* @private
|
|
6637
|
+
*/
|
|
6638
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
6639
|
+
const config = _transportConfig.get(host);
|
|
6640
|
+
if (!config) return;
|
|
6641
|
+
|
|
6642
|
+
// Remove this matcher from this target
|
|
6643
|
+
const targetMatchers = config.targets.get(target);
|
|
6644
|
+
if (targetMatchers) {
|
|
6645
|
+
targetMatchers.delete(matcher);
|
|
6646
|
+
|
|
6647
|
+
// If this target has no more matchers, remove it
|
|
6648
|
+
if (targetMatchers.size === 0) {
|
|
6649
|
+
config.targets.delete(target);
|
|
6650
|
+
}
|
|
6651
|
+
}
|
|
6652
|
+
|
|
6653
|
+
// Check if this matcher is still used by any target
|
|
6654
|
+
let matcherStillUsed = false;
|
|
6655
|
+
for (const matcherMap of config.targets.values()) {
|
|
6656
|
+
if (matcherMap.has(matcher)) {
|
|
6657
|
+
matcherStillUsed = true;
|
|
6658
|
+
break;
|
|
6659
|
+
}
|
|
6660
|
+
}
|
|
6661
|
+
|
|
6662
|
+
// If not used anymore, remove from matchers set
|
|
6663
|
+
if (!matcherStillUsed) {
|
|
6664
|
+
config.matchers.delete(matcher);
|
|
6665
|
+
}
|
|
6666
|
+
|
|
6667
|
+
// If no more targets or matchers, detach observer
|
|
6668
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
6669
|
+
_detachObserver(host);
|
|
6670
|
+
}
|
|
6671
|
+
};
|
|
6672
|
+
|
|
6673
|
+
/**
|
|
6674
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
6675
|
+
*
|
|
6676
|
+
* @param {Object} params - The parameters object.
|
|
6677
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
6678
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6679
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
6680
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
6681
|
+
* @returns {void}
|
|
6682
|
+
* @private
|
|
6683
|
+
*/
|
|
6684
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6685
|
+
// Get a list of all matching attributes on the host element and their values
|
|
6686
|
+
const matchingAttributes = host.getAttributeNames()
|
|
6687
|
+
.filter(attr => matcher(attr))
|
|
6688
|
+
.reduce((acc, attr) => {
|
|
6689
|
+
acc[attr] = host.getAttribute(attr);
|
|
6690
|
+
return acc;
|
|
6691
|
+
}, {});
|
|
6692
|
+
|
|
6693
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
6694
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
6695
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
6696
|
+
target.setAttribute(key, value);
|
|
6697
|
+
if (removeOriginal) {
|
|
6698
|
+
host.removeAttribute(key);
|
|
6699
|
+
}
|
|
6700
|
+
});
|
|
6701
|
+
};
|
|
6702
|
+
|
|
6703
|
+
/**
|
|
6704
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
6705
|
+
*
|
|
6706
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
6707
|
+
* @returns {MutationObserver} The observer instance.
|
|
6708
|
+
* @private
|
|
6709
|
+
*/
|
|
6710
|
+
const _attachObserver = (host) => {
|
|
6711
|
+
// If an observer for this host already exists, return it
|
|
6712
|
+
if (_observers.has(host)) {
|
|
6713
|
+
return _observers.get(host);
|
|
6714
|
+
}
|
|
6715
|
+
|
|
6716
|
+
// Create a new MutationObserver
|
|
6717
|
+
const observer = new MutationObserver((mutations) => {
|
|
6718
|
+
const config = _transportConfig.get(host);
|
|
6719
|
+
if (!config) return;
|
|
6720
|
+
|
|
6721
|
+
// For each mutation affecting attributes
|
|
6722
|
+
mutations
|
|
6723
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
6724
|
+
.forEach(mutation => {
|
|
6725
|
+
const attributeName = mutation.attributeName;
|
|
6726
|
+
|
|
6727
|
+
// Find matchers that care about this attribute
|
|
6728
|
+
for (const matcher of config.matchers) {
|
|
6729
|
+
if (matcher(attributeName)) {
|
|
6730
|
+
// For each target that uses this matcher
|
|
6731
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
6732
|
+
if (matcherConfigs.has(matcher)) {
|
|
6733
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
6734
|
+
_transportAttributes({
|
|
6735
|
+
host,
|
|
6736
|
+
target,
|
|
6737
|
+
matcher,
|
|
6738
|
+
removeOriginal
|
|
6739
|
+
});
|
|
6740
|
+
}
|
|
6741
|
+
}
|
|
6742
|
+
}
|
|
6743
|
+
}
|
|
6744
|
+
});
|
|
6745
|
+
});
|
|
6746
|
+
|
|
6747
|
+
// Start observing attribute changes
|
|
6748
|
+
observer.observe(host, { attributes: true });
|
|
6749
|
+
|
|
6750
|
+
// Store the observer
|
|
6751
|
+
_observers.set(host, observer);
|
|
6752
|
+
|
|
6753
|
+
return observer;
|
|
6754
|
+
};
|
|
6755
|
+
|
|
6756
|
+
/**
|
|
6757
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
6758
|
+
*
|
|
6759
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
6760
|
+
* @private
|
|
6761
|
+
*/
|
|
6762
|
+
const _detachObserver = (host) => {
|
|
6763
|
+
if (_observers.has(host)) {
|
|
6764
|
+
const observer = _observers.get(host);
|
|
6765
|
+
observer.disconnect();
|
|
6766
|
+
_observers.delete(host);
|
|
6767
|
+
}
|
|
6768
|
+
|
|
6769
|
+
// Clean up the transport config as well
|
|
6770
|
+
if (_transportConfig.has(host)) {
|
|
6771
|
+
_transportConfig.delete(host);
|
|
6772
|
+
}
|
|
6773
|
+
};
|
|
6774
|
+
|
|
6775
|
+
/**
|
|
6776
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
6777
|
+
* @param {HTMLElement} host - The host element
|
|
6778
|
+
* @param {HTMLElement} target - The target element
|
|
6779
|
+
* @param {Function} matcher - The matcher function
|
|
6780
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
6781
|
+
* @private
|
|
6782
|
+
*/
|
|
6783
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
6784
|
+
const config = _transportConfig.get(host);
|
|
6785
|
+
if (!config) return undefined;
|
|
6786
|
+
|
|
6787
|
+
const targetMatchers = config.targets.get(target);
|
|
6788
|
+
if (!targetMatchers) return undefined;
|
|
6789
|
+
|
|
6790
|
+
return targetMatchers.get(matcher);
|
|
6791
|
+
};
|
|
6792
|
+
|
|
6793
|
+
/**
|
|
6794
|
+
* Sets an observed attribute value
|
|
6795
|
+
* @param {HTMLElement} host - The host element
|
|
6796
|
+
* @param {HTMLElement} target - The target element
|
|
6797
|
+
* @param {Function} matcher - The matcher function
|
|
6798
|
+
* @param {string} key - The attribute name
|
|
6799
|
+
* @param {string} value - The attribute value
|
|
6800
|
+
* @private
|
|
6801
|
+
*/
|
|
6802
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
6803
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6804
|
+
if (matcherConfig) {
|
|
6805
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
6806
|
+
}
|
|
6807
|
+
};
|
|
6808
|
+
|
|
6809
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
6810
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6811
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
6812
|
+
return undefined;
|
|
6813
|
+
};
|
|
6814
|
+
|
|
6815
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
6816
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6817
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
6818
|
+
return [];
|
|
6819
|
+
};
|
|
6820
|
+
|
|
6821
|
+
const _matchers = {
|
|
6822
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
6823
|
+
'role': attr => attr.match(/^role$/)
|
|
6824
|
+
};
|
|
6825
|
+
|
|
6826
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
6827
|
+
return transportAttributes({
|
|
6828
|
+
host,
|
|
6829
|
+
target,
|
|
6830
|
+
match: attr => {
|
|
6831
|
+
for (const key in _matchers) {
|
|
6832
|
+
if (_matchers[key](attr)) return true;
|
|
6833
|
+
}
|
|
6834
|
+
return false;
|
|
6835
|
+
},
|
|
6836
|
+
removeOriginal
|
|
6837
|
+
});
|
|
6838
|
+
};
|
|
6839
|
+
|
|
6840
|
+
class AuroElement extends i$2 {
|
|
6841
|
+
|
|
6842
|
+
/**
|
|
6843
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
6844
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
6845
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
6846
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
6847
|
+
* @private
|
|
6848
|
+
*/
|
|
6849
|
+
attributeWatcher;
|
|
6850
|
+
|
|
6851
|
+
static get properties() {
|
|
6852
|
+
return {
|
|
6853
|
+
|
|
6854
|
+
/**
|
|
6855
|
+
* Defines the layout of an element.
|
|
6856
|
+
* @default {'default'}
|
|
6857
|
+
*/
|
|
6858
|
+
layout: {
|
|
6859
|
+
type: String,
|
|
6860
|
+
attribute: "layout",
|
|
6861
|
+
reflect: true
|
|
6862
|
+
},
|
|
6863
|
+
|
|
6864
|
+
/**
|
|
6865
|
+
* Defines the shape of an element.
|
|
6866
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
6867
|
+
* @default {'default'}
|
|
6868
|
+
*/
|
|
6869
|
+
shape: {
|
|
6870
|
+
type: String,
|
|
6871
|
+
attribute: "shape",
|
|
6872
|
+
reflect: true
|
|
6873
|
+
},
|
|
6874
|
+
|
|
6875
|
+
/**
|
|
6876
|
+
* Defines the size of an element.
|
|
6877
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
6878
|
+
* @default {'md'}
|
|
6879
|
+
*/
|
|
6880
|
+
size: {
|
|
6881
|
+
type: String,
|
|
6882
|
+
attribute: "size",
|
|
6883
|
+
reflect: true
|
|
6884
|
+
},
|
|
6885
|
+
|
|
6886
|
+
/**
|
|
6887
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
6888
|
+
* @default {false}
|
|
6889
|
+
*/
|
|
6890
|
+
onDark: {
|
|
6891
|
+
type: Boolean,
|
|
6892
|
+
attribute: "ondark",
|
|
6893
|
+
reflect: true
|
|
6894
|
+
},
|
|
6895
|
+
|
|
6896
|
+
/**
|
|
6897
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
6898
|
+
* This is used to apply layout and shape classes dynamically.
|
|
6899
|
+
* @type {HTMLElement|null}
|
|
6900
|
+
* @default {null}
|
|
6901
|
+
* @private
|
|
6902
|
+
*/
|
|
6903
|
+
wrapper: {
|
|
6904
|
+
attribute: false,
|
|
6905
|
+
reflect: false
|
|
6906
|
+
}
|
|
6907
|
+
};
|
|
6908
|
+
}
|
|
6909
|
+
|
|
6910
|
+
|
|
6911
|
+
|
|
6912
|
+
resetShapeClasses() {
|
|
6913
|
+
if (this.shape && this.size) {
|
|
6914
|
+
|
|
6915
|
+
if (this.wrapper) {
|
|
6916
|
+
this.wrapper.classList.forEach((className) => {
|
|
6917
|
+
if (className.startsWith('shape-')) {
|
|
6918
|
+
this.wrapper.classList.remove(className);
|
|
6919
|
+
}
|
|
6920
|
+
});
|
|
6921
|
+
|
|
6922
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6923
|
+
}
|
|
6924
|
+
}
|
|
6925
|
+
}
|
|
6926
|
+
|
|
6927
|
+
resetLayoutClasses() {
|
|
6928
|
+
if (this.layout) {
|
|
6929
|
+
if (this.wrapper) {
|
|
6930
|
+
this.wrapper.classList.forEach((className) => {
|
|
6931
|
+
if (className.startsWith('layout-')) {
|
|
6932
|
+
this.wrapper.classList.remove(className);
|
|
6933
|
+
}
|
|
6934
|
+
});
|
|
6935
|
+
|
|
6936
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6937
|
+
}
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6941
|
+
updateComponentArchitecture() {
|
|
6942
|
+
this.resetLayoutClasses();
|
|
6943
|
+
this.resetShapeClasses();
|
|
6944
|
+
}
|
|
6945
|
+
|
|
6946
|
+
updated(changedProperties) {
|
|
6947
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6948
|
+
this.updateComponentArchitecture();
|
|
6949
|
+
}
|
|
6950
|
+
}
|
|
6951
|
+
|
|
6952
|
+
firstUpdated() {
|
|
6953
|
+
super.firstUpdated();
|
|
6954
|
+
|
|
6955
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6956
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6957
|
+
|
|
6958
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6959
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6960
|
+
}
|
|
6961
|
+
|
|
6962
|
+
disconnectedCallback() {
|
|
6963
|
+
super.disconnectedCallback();
|
|
6964
|
+
|
|
6965
|
+
// Cleanup the ARIA observer if it exists
|
|
6966
|
+
if (this.attributeWatcher) {
|
|
6967
|
+
this.attributeWatcher.cleanup();
|
|
6968
|
+
this.attributeWatcher = null;
|
|
6969
|
+
}
|
|
6970
|
+
}
|
|
6971
|
+
|
|
6972
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6973
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6974
|
+
render() {
|
|
6975
|
+
try {
|
|
6976
|
+
return this.renderLayout();
|
|
6977
|
+
} catch (error) {
|
|
6978
|
+
// failed to get the defined layout
|
|
6979
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6980
|
+
|
|
6981
|
+
// fallback to the default layout
|
|
6982
|
+
return this.getLayout('default');
|
|
6983
|
+
}
|
|
6984
|
+
}
|
|
6985
|
+
}
|
|
6986
|
+
|
|
6987
|
+
var styleCss$2 = 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}`;
|
|
6988
|
+
|
|
6989
|
+
var colorCss$2 = 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)}`;
|
|
6990
|
+
|
|
6991
|
+
var tokensCss$2 = 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}`;
|
|
6992
|
+
|
|
6993
|
+
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}`;
|
|
6994
|
+
|
|
6995
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6996
|
+
// See LICENSE in the project root for license information.
|
|
6997
|
+
|
|
6998
|
+
// ---------------------------------------------------------------------
|
|
6999
|
+
|
|
7000
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7001
|
+
|
|
7002
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
7003
|
+
|
|
7004
|
+
/* eslint-disable jsdoc/require-param */
|
|
7005
|
+
|
|
7006
|
+
/**
|
|
7007
|
+
* This will register a new custom element with the browser.
|
|
7008
|
+
* @param {String} name - The name of the custom element.
|
|
7009
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7010
|
+
* @returns {void}
|
|
7011
|
+
*/
|
|
7012
|
+
registerComponent(name, componentClass) {
|
|
7013
|
+
if (!customElements.get(name)) {
|
|
7014
|
+
customElements.define(name, class extends componentClass {});
|
|
7015
|
+
}
|
|
7016
|
+
}
|
|
7017
|
+
|
|
7018
|
+
/**
|
|
7019
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7020
|
+
* @returns {void}
|
|
7021
|
+
*/
|
|
7022
|
+
closestElement(
|
|
7023
|
+
selector, // selector like in .closest()
|
|
7024
|
+
base = this, // extra functionality to skip a parent
|
|
7025
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7026
|
+
!el || el === document || el === window
|
|
7027
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7028
|
+
: found
|
|
7029
|
+
? found // found a selector INside this element
|
|
7030
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7031
|
+
) {
|
|
7032
|
+
return __Closest(base);
|
|
7033
|
+
}
|
|
7034
|
+
/* eslint-enable jsdoc/require-param */
|
|
7035
|
+
|
|
7036
|
+
/**
|
|
7037
|
+
* 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.
|
|
7038
|
+
* @param {Object} elem - The element to check.
|
|
7039
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7040
|
+
* @returns {void}
|
|
7041
|
+
*/
|
|
7042
|
+
handleComponentTagRename(elem, tagName) {
|
|
7043
|
+
const tag = tagName.toLowerCase();
|
|
7044
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7045
|
+
|
|
7046
|
+
if (elemTag !== tag) {
|
|
7047
|
+
elem.setAttribute(tag, true);
|
|
7048
|
+
}
|
|
7049
|
+
}
|
|
7050
|
+
|
|
7051
|
+
/**
|
|
7052
|
+
* Validates if an element is a specific Auro component.
|
|
7053
|
+
* @param {Object} elem - The element to validate.
|
|
7054
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7055
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7056
|
+
*/
|
|
7057
|
+
elementMatch(elem, tagName) {
|
|
7058
|
+
const tag = tagName.toLowerCase();
|
|
7059
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7060
|
+
|
|
7061
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7062
|
+
}
|
|
7063
|
+
};
|
|
6501
7064
|
|
|
6502
7065
|
var styleCss$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}}`;
|
|
6503
7066
|
|
|
@@ -6531,7 +7094,7 @@ class AuroLoader extends i$2 {
|
|
|
6531
7094
|
/**
|
|
6532
7095
|
* @private
|
|
6533
7096
|
*/
|
|
6534
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7097
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
6535
7098
|
|
|
6536
7099
|
this.orbit = false;
|
|
6537
7100
|
this.ringworm = false;
|
|
@@ -6594,7 +7157,7 @@ class AuroLoader extends i$2 {
|
|
|
6594
7157
|
*
|
|
6595
7158
|
*/
|
|
6596
7159
|
static register(name = "auro-loader") {
|
|
6597
|
-
AuroLibraryRuntimeUtils$
|
|
7160
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroLoader);
|
|
6598
7161
|
}
|
|
6599
7162
|
|
|
6600
7163
|
firstUpdated() {
|
|
@@ -6646,14 +7209,13 @@ class AuroLoader extends i$2 {
|
|
|
6646
7209
|
|
|
6647
7210
|
var loaderVersion = '5.0.0';
|
|
6648
7211
|
|
|
6649
|
-
/* eslint-disable max-lines */
|
|
7212
|
+
/* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
|
|
6650
7213
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6651
7214
|
// See LICENSE in the project root for license information.
|
|
6652
7215
|
|
|
6653
7216
|
|
|
6654
7217
|
/**
|
|
6655
7218
|
* @slot - Default slot for the text of the button.
|
|
6656
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
6657
7219
|
* @csspart button - Apply CSS to HTML5 button.
|
|
6658
7220
|
* @csspart loader - Apply CSS to auro-loader.
|
|
6659
7221
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -6662,7 +7224,18 @@ var loaderVersion = '5.0.0';
|
|
|
6662
7224
|
|
|
6663
7225
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
6664
7226
|
|
|
6665
|
-
|
|
7227
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7228
|
+
|
|
7229
|
+
/**
|
|
7230
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7231
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7232
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7233
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7234
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7235
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7236
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7237
|
+
*/
|
|
7238
|
+
class AuroButton extends AuroElement {
|
|
6666
7239
|
|
|
6667
7240
|
/**
|
|
6668
7241
|
* Enables form association for this element.
|
|
@@ -6677,13 +7250,10 @@ class AuroButton extends i$2 {
|
|
|
6677
7250
|
super();
|
|
6678
7251
|
this.autofocus = false;
|
|
6679
7252
|
this.disabled = false;
|
|
6680
|
-
this.iconOnly = false;
|
|
6681
7253
|
this.loading = false;
|
|
7254
|
+
this.size = "md";
|
|
7255
|
+
this.shape = "rounded";
|
|
6682
7256
|
this.onDark = false;
|
|
6683
|
-
this.secondary = false;
|
|
6684
|
-
this.tertiary = false;
|
|
6685
|
-
this.rounded = false;
|
|
6686
|
-
this.slim = false;
|
|
6687
7257
|
this.fluid = false;
|
|
6688
7258
|
this.loadingText = this.loadingText || 'Loading...';
|
|
6689
7259
|
|
|
@@ -6706,49 +7276,59 @@ class AuroButton extends i$2 {
|
|
|
6706
7276
|
* @private
|
|
6707
7277
|
*/
|
|
6708
7278
|
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7279
|
+
|
|
7280
|
+
/**
|
|
7281
|
+
* @private
|
|
7282
|
+
*/
|
|
7283
|
+
this.buttonHref = undefined;
|
|
7284
|
+
|
|
7285
|
+
/**
|
|
7286
|
+
* @private
|
|
7287
|
+
*/
|
|
7288
|
+
this.buttonTarget = undefined;
|
|
7289
|
+
|
|
7290
|
+
/**
|
|
7291
|
+
* @private
|
|
7292
|
+
*/
|
|
7293
|
+
this.buttonRel = undefined;
|
|
6709
7294
|
}
|
|
6710
7295
|
|
|
6711
7296
|
static get styles() {
|
|
6712
7297
|
return [
|
|
6713
7298
|
tokensCss$2,
|
|
6714
7299
|
styleCss$2,
|
|
6715
|
-
colorCss$2
|
|
7300
|
+
colorCss$2,
|
|
7301
|
+
shapeSize
|
|
6716
7302
|
];
|
|
6717
7303
|
}
|
|
6718
7304
|
|
|
6719
7305
|
static get properties() {
|
|
6720
7306
|
return {
|
|
6721
7307
|
|
|
6722
|
-
|
|
6723
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6724
|
-
*/
|
|
6725
|
-
autofocus: {
|
|
6726
|
-
type: Boolean,
|
|
6727
|
-
reflect: true
|
|
6728
|
-
},
|
|
7308
|
+
...super.properties,
|
|
6729
7309
|
|
|
6730
7310
|
/**
|
|
6731
|
-
*
|
|
7311
|
+
* Override layout since it isn't used in this component.
|
|
7312
|
+
* @private
|
|
6732
7313
|
*/
|
|
6733
|
-
|
|
7314
|
+
layout: {
|
|
6734
7315
|
type: Boolean,
|
|
6735
|
-
|
|
7316
|
+
attribute: false,
|
|
7317
|
+
reflect: false
|
|
6736
7318
|
},
|
|
6737
7319
|
|
|
6738
7320
|
/**
|
|
6739
|
-
*
|
|
6740
|
-
* @deprecated
|
|
7321
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6741
7322
|
*/
|
|
6742
|
-
|
|
7323
|
+
autofocus: {
|
|
6743
7324
|
type: Boolean,
|
|
6744
7325
|
reflect: true
|
|
6745
7326
|
},
|
|
6746
7327
|
|
|
6747
7328
|
/**
|
|
6748
|
-
*
|
|
6749
|
-
* @deprecated
|
|
7329
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6750
7330
|
*/
|
|
6751
|
-
|
|
7331
|
+
disabled: {
|
|
6752
7332
|
type: Boolean,
|
|
6753
7333
|
reflect: true
|
|
6754
7334
|
},
|
|
@@ -6756,15 +7336,7 @@ class AuroButton extends i$2 {
|
|
|
6756
7336
|
/**
|
|
6757
7337
|
* Alters the shape of the button to be full width of its parent container.
|
|
6758
7338
|
*/
|
|
6759
|
-
fluid:
|
|
6760
|
-
type: Boolean,
|
|
6761
|
-
reflect: true
|
|
6762
|
-
},
|
|
6763
|
-
|
|
6764
|
-
/**
|
|
6765
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
6766
|
-
*/
|
|
6767
|
-
iconOnly: {
|
|
7339
|
+
fluid: {
|
|
6768
7340
|
type: Boolean,
|
|
6769
7341
|
reflect: true
|
|
6770
7342
|
},
|
|
@@ -6772,7 +7344,7 @@ class AuroButton extends i$2 {
|
|
|
6772
7344
|
/**
|
|
6773
7345
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6774
7346
|
*/
|
|
6775
|
-
loading:
|
|
7347
|
+
loading: {
|
|
6776
7348
|
type: Boolean,
|
|
6777
7349
|
reflect: true
|
|
6778
7350
|
},
|
|
@@ -6780,36 +7352,12 @@ class AuroButton extends i$2 {
|
|
|
6780
7352
|
/**
|
|
6781
7353
|
* 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.
|
|
6782
7354
|
*/
|
|
6783
|
-
loadingText:
|
|
7355
|
+
loadingText: {
|
|
6784
7356
|
type: String
|
|
6785
7357
|
},
|
|
6786
7358
|
|
|
6787
7359
|
/**
|
|
6788
|
-
*
|
|
6789
|
-
*/
|
|
6790
|
-
onDark: {
|
|
6791
|
-
type: Boolean,
|
|
6792
|
-
reflect: true
|
|
6793
|
-
},
|
|
6794
|
-
|
|
6795
|
-
/**
|
|
6796
|
-
* If set to true, the button will have a rounded shape.
|
|
6797
|
-
*/
|
|
6798
|
-
rounded: {
|
|
6799
|
-
type: Boolean,
|
|
6800
|
-
reflect: true
|
|
6801
|
-
},
|
|
6802
|
-
|
|
6803
|
-
/**
|
|
6804
|
-
* Set value for slim version of auro-button.
|
|
6805
|
-
*/
|
|
6806
|
-
slim: {
|
|
6807
|
-
type: Boolean,
|
|
6808
|
-
reflect: true
|
|
6809
|
-
},
|
|
6810
|
-
|
|
6811
|
-
/**
|
|
6812
|
-
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
7360
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6813
7361
|
*/
|
|
6814
7362
|
tIndex: {
|
|
6815
7363
|
type: String,
|
|
@@ -6817,75 +7365,68 @@ class AuroButton extends i$2 {
|
|
|
6817
7365
|
},
|
|
6818
7366
|
|
|
6819
7367
|
/**
|
|
6820
|
-
* Populates
|
|
7368
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7369
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
7370
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
6821
7371
|
*/
|
|
6822
|
-
|
|
7372
|
+
tabindex: {
|
|
6823
7373
|
type: String,
|
|
6824
|
-
reflect:
|
|
7374
|
+
reflect: false
|
|
6825
7375
|
},
|
|
6826
7376
|
|
|
6827
7377
|
/**
|
|
6828
|
-
*
|
|
6829
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
6830
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
7378
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6831
7379
|
*/
|
|
6832
|
-
|
|
7380
|
+
title: {
|
|
6833
7381
|
type: String,
|
|
6834
7382
|
reflect: true
|
|
6835
7383
|
},
|
|
6836
7384
|
|
|
6837
7385
|
/**
|
|
6838
|
-
*
|
|
6839
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
6840
|
-
* List multiple element IDs in a space delimited fashion.
|
|
7386
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6841
7387
|
*/
|
|
6842
|
-
|
|
7388
|
+
type: {
|
|
6843
7389
|
type: String,
|
|
6844
7390
|
reflect: true
|
|
6845
7391
|
},
|
|
6846
7392
|
|
|
6847
7393
|
/**
|
|
6848
|
-
*
|
|
6849
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
6850
|
-
* This is an optional attribute for buttons.
|
|
7394
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6851
7395
|
*/
|
|
6852
|
-
|
|
6853
|
-
type:
|
|
7396
|
+
value: {
|
|
7397
|
+
type: String,
|
|
6854
7398
|
reflect: true
|
|
6855
7399
|
},
|
|
6856
7400
|
|
|
6857
7401
|
/**
|
|
6858
|
-
* Sets
|
|
7402
|
+
* Sets button variant option.
|
|
7403
|
+
* @default primary
|
|
6859
7404
|
*/
|
|
6860
|
-
|
|
7405
|
+
variant: {
|
|
6861
7406
|
type: String,
|
|
6862
7407
|
reflect: true
|
|
6863
7408
|
},
|
|
6864
7409
|
|
|
6865
7410
|
/**
|
|
6866
|
-
*
|
|
7411
|
+
* @private
|
|
6867
7412
|
*/
|
|
6868
|
-
|
|
7413
|
+
buttonHref: {
|
|
6869
7414
|
type: String,
|
|
6870
|
-
reflect: true
|
|
6871
7415
|
},
|
|
6872
7416
|
|
|
6873
7417
|
/**
|
|
6874
|
-
*
|
|
7418
|
+
* @private
|
|
6875
7419
|
*/
|
|
6876
|
-
|
|
7420
|
+
buttonTarget: {
|
|
6877
7421
|
type: String,
|
|
6878
|
-
reflect: true
|
|
6879
7422
|
},
|
|
6880
7423
|
|
|
6881
7424
|
/**
|
|
6882
|
-
*
|
|
7425
|
+
* @private
|
|
6883
7426
|
*/
|
|
6884
|
-
|
|
7427
|
+
buttonRel: {
|
|
6885
7428
|
type: String,
|
|
6886
|
-
reflect: true
|
|
6887
7429
|
},
|
|
6888
|
-
ready: { type: Boolean },
|
|
6889
7430
|
};
|
|
6890
7431
|
}
|
|
6891
7432
|
|
|
@@ -6898,7 +7439,7 @@ class AuroButton extends i$2 {
|
|
|
6898
7439
|
*
|
|
6899
7440
|
*/
|
|
6900
7441
|
static register(name = "auro-button") {
|
|
6901
|
-
AuroLibraryRuntimeUtils$
|
|
7442
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6902
7443
|
}
|
|
6903
7444
|
|
|
6904
7445
|
/**
|
|
@@ -6910,17 +7451,6 @@ class AuroButton extends i$2 {
|
|
|
6910
7451
|
this.renderRoot.querySelector('button').focus();
|
|
6911
7452
|
}
|
|
6912
7453
|
|
|
6913
|
-
updated() {
|
|
6914
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
6915
|
-
if (this.secondary) {
|
|
6916
|
-
this.setAttribute('variant', 'secondary');
|
|
6917
|
-
}
|
|
6918
|
-
|
|
6919
|
-
if (this.tertiary) {
|
|
6920
|
-
this.setAttribute('variant', 'tertiary');
|
|
6921
|
-
}
|
|
6922
|
-
}
|
|
6923
|
-
|
|
6924
7454
|
/**
|
|
6925
7455
|
* Submits the form that this button is associated with.
|
|
6926
7456
|
* @private
|
|
@@ -6941,28 +7471,63 @@ class AuroButton extends i$2 {
|
|
|
6941
7471
|
return this.internals ? this.internals.form : null;
|
|
6942
7472
|
}
|
|
6943
7473
|
|
|
6944
|
-
|
|
7474
|
+
/**
|
|
7475
|
+
* @private
|
|
7476
|
+
* @returns {Boolean}
|
|
7477
|
+
*/
|
|
7478
|
+
get hideText() {
|
|
7479
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
7480
|
+
}
|
|
7481
|
+
|
|
7482
|
+
/**
|
|
7483
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7484
|
+
* @returns {string | undefined}
|
|
7485
|
+
* @private
|
|
7486
|
+
*/
|
|
7487
|
+
get currentAriaLabel() {
|
|
7488
|
+
if (!this.attributeWatcher) return undefined;
|
|
7489
|
+
|
|
7490
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7491
|
+
return ariaLabel || undefined;
|
|
7492
|
+
}
|
|
7493
|
+
|
|
7494
|
+
/**
|
|
7495
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7496
|
+
* @returns {string | undefined}
|
|
7497
|
+
* @private
|
|
7498
|
+
*/
|
|
7499
|
+
get currentAriaLabelledBy() {
|
|
7500
|
+
if (!this.attributeWatcher) return undefined;
|
|
7501
|
+
|
|
7502
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7503
|
+
return ariaLabelledBy || undefined;
|
|
7504
|
+
}
|
|
7505
|
+
|
|
7506
|
+
/**
|
|
7507
|
+
* Renders the default layout for the button.
|
|
7508
|
+
* @returns {TemplateResult}
|
|
7509
|
+
* @private
|
|
7510
|
+
*/
|
|
7511
|
+
renderLayoutDefault() {
|
|
6945
7512
|
const classes = {
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
6952
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
6953
|
-
'loading': this.loading
|
|
7513
|
+
"util_insetLg--squish": true,
|
|
7514
|
+
"auro-button": true,
|
|
7515
|
+
"icon-only": this.hideText,
|
|
7516
|
+
wrapper: true,
|
|
7517
|
+
loading: this.loading,
|
|
6954
7518
|
};
|
|
6955
7519
|
|
|
7520
|
+
const tag = this.buttonHref ? i$1`a` : i$1`button`;
|
|
7521
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
7522
|
+
|
|
6956
7523
|
return u$2`
|
|
6957
|
-
|
|
6958
|
-
part="
|
|
6959
|
-
aria-
|
|
6960
|
-
aria-
|
|
6961
|
-
|
|
6962
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
6963
|
-
tabIndex="${o(this.tIndex)}"
|
|
7524
|
+
<${tag}
|
|
7525
|
+
part="${part}"
|
|
7526
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7527
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7528
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6964
7529
|
?autofocus="${this.autofocus}"
|
|
6965
|
-
class
|
|
7530
|
+
class=${e(classes)}
|
|
6966
7531
|
?disabled="${this.disabled || this.loading}"
|
|
6967
7532
|
?onDark="${this.onDark}"
|
|
6968
7533
|
title="${o(this.title ? this.title : undefined)}"
|
|
@@ -6971,28 +7536,36 @@ class AuroButton extends i$2 {
|
|
|
6971
7536
|
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6972
7537
|
.value="${o(this.value ? this.value : undefined)}"
|
|
6973
7538
|
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7539
|
+
href="${o(this.buttonHref || undefined)}"
|
|
7540
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
7541
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6974
7542
|
>
|
|
6975
7543
|
${o(this.loading ? u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6976
7544
|
|
|
6977
7545
|
<span class="contentWrapper">
|
|
6978
7546
|
<span class="textSlot" part="text">
|
|
6979
|
-
|
|
6980
|
-
</span>
|
|
6981
|
-
|
|
6982
|
-
<span part="icon">
|
|
6983
|
-
<slot name="icon"></slot>
|
|
7547
|
+
<slot></slot>
|
|
6984
7548
|
</span>
|
|
6985
7549
|
</span>
|
|
6986
|
-
|
|
7550
|
+
</${tag}>
|
|
6987
7551
|
`;
|
|
6988
7552
|
}
|
|
7553
|
+
|
|
7554
|
+
/**
|
|
7555
|
+
* Renders the layout of the button.
|
|
7556
|
+
* @returns {TemplateResult}
|
|
7557
|
+
* @private
|
|
7558
|
+
*/
|
|
7559
|
+
renderLayout() {
|
|
7560
|
+
return this.renderLayoutDefault();
|
|
7561
|
+
}
|
|
6989
7562
|
}
|
|
6990
7563
|
|
|
6991
|
-
var buttonVersion = '
|
|
7564
|
+
var buttonVersion = '11.0.0';
|
|
6992
7565
|
|
|
6993
|
-
var colorCss = 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-
|
|
7566
|
+
var colorCss = 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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6994
7567
|
|
|
6995
|
-
var styleCss = i$5
|
|
7568
|
+
var styleCss = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
6996
7569
|
|
|
6997
7570
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6998
7571
|
|
|
@@ -7256,6 +7829,7 @@ class AuroInput extends BaseInput {
|
|
|
7256
7829
|
*/
|
|
7257
7830
|
get commonLabelClasses() {
|
|
7258
7831
|
return {
|
|
7832
|
+
'is-disabled': this.disabled,
|
|
7259
7833
|
'withValue': this.value && this.value.length > 0,
|
|
7260
7834
|
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7261
7835
|
};
|
|
@@ -7268,30 +7842,30 @@ class AuroInput extends BaseInput {
|
|
|
7268
7842
|
*/
|
|
7269
7843
|
get commonInputClasses() {
|
|
7270
7844
|
return {
|
|
7271
|
-
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7845
|
+
'util_displayHiddenVisually': (this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0) || ((!this.value || this.value.length === 0) && !this.hasFocus && (!this.placeholder || this.placeholder === '')),
|
|
7272
7846
|
};
|
|
7273
7847
|
}
|
|
7274
7848
|
|
|
7275
7849
|
/**
|
|
7276
7850
|
* Returns classmap configuration for html5 inputs in each layout.
|
|
7277
7851
|
* @private
|
|
7278
|
-
* @
|
|
7852
|
+
* @returns {object} - Returns classmap.
|
|
7279
7853
|
*/
|
|
7280
7854
|
get legacyInputClasses() {
|
|
7281
7855
|
return {
|
|
7282
|
-
...this.commonInputClasses
|
|
7283
|
-
'util_displayHiddenVisually': !this.hasFocus && !this.value
|
|
7856
|
+
...this.commonInputClasses
|
|
7284
7857
|
};
|
|
7285
7858
|
}
|
|
7286
7859
|
|
|
7287
7860
|
/**
|
|
7288
7861
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
7289
7862
|
* @private
|
|
7290
|
-
* @
|
|
7863
|
+
* @returns {object} - Returns classmap.
|
|
7291
7864
|
*/
|
|
7292
7865
|
get commonWrapperClasses() {
|
|
7293
7866
|
return {
|
|
7294
7867
|
'wrapper': true,
|
|
7868
|
+
'simple': this.simple,
|
|
7295
7869
|
'withValue': this.value && this.value.length > 0,
|
|
7296
7870
|
'hasFocus': this.hasFocus
|
|
7297
7871
|
};
|
|
@@ -7300,7 +7874,7 @@ class AuroInput extends BaseInput {
|
|
|
7300
7874
|
/**
|
|
7301
7875
|
* Returns classmap configuration for helpText elements in each layout.
|
|
7302
7876
|
* @private
|
|
7303
|
-
* @
|
|
7877
|
+
* @returns {object} - Returns classmap.
|
|
7304
7878
|
*/
|
|
7305
7879
|
get helpTextClasses() {
|
|
7306
7880
|
return {
|
|
@@ -7319,7 +7893,7 @@ class AuroInput extends BaseInput {
|
|
|
7319
7893
|
*
|
|
7320
7894
|
*/
|
|
7321
7895
|
static register(name = "auro-input") {
|
|
7322
|
-
AuroLibraryRuntimeUtils$
|
|
7896
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroInput);
|
|
7323
7897
|
}
|
|
7324
7898
|
|
|
7325
7899
|
/**
|
|
@@ -7341,7 +7915,12 @@ class AuroInput extends BaseInput {
|
|
|
7341
7915
|
* @returns {void}
|
|
7342
7916
|
*/
|
|
7343
7917
|
checkDisplayValueSlotChange() {
|
|
7344
|
-
|
|
7918
|
+
let nodes = this.shadowRoot.querySelector('slot[name="displayValue"]').assignedNodes();
|
|
7919
|
+
|
|
7920
|
+
// Handle when DisplayValue is multi-level slot content (e.g. combobox passing displayValue to input)
|
|
7921
|
+
if (nodes[0].tagName === 'SLOT') {
|
|
7922
|
+
nodes = nodes[0].assignedNodes();
|
|
7923
|
+
}
|
|
7345
7924
|
|
|
7346
7925
|
let hasContent = false;
|
|
7347
7926
|
|
|
@@ -7392,28 +7971,34 @@ class AuroInput extends BaseInput {
|
|
|
7392
7971
|
: this.commonInputClasses;
|
|
7393
7972
|
|
|
7394
7973
|
return u$2`
|
|
7395
|
-
<label for=${this.
|
|
7974
|
+
<label for=${this.inputId} class="${e(this.commonLabelClasses)}" part="label">
|
|
7396
7975
|
<slot name="label">
|
|
7397
7976
|
${this.label}
|
|
7398
7977
|
</slot>
|
|
7978
|
+
${this.required ? undefined : u$2`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7399
7979
|
</label>
|
|
7980
|
+
|
|
7981
|
+
<!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
|
|
7400
7982
|
<input
|
|
7401
7983
|
@blur="${this.handleBlur}"
|
|
7402
7984
|
@focusin="${this.handleFocusin}"
|
|
7403
7985
|
@focusout="${this.handleFocusout}"
|
|
7404
7986
|
@input="${this.handleInput}"
|
|
7987
|
+
.placeholder=${this.placeholderStr}
|
|
7988
|
+
.role=${this.a11yRole}
|
|
7405
7989
|
?activeLabel="${this.activeLabel}"
|
|
7406
7990
|
?disabled="${this.disabled}"
|
|
7407
7991
|
?required="${this.required}"
|
|
7408
|
-
|
|
7992
|
+
aria-controls=${o(this.a11yControls)}
|
|
7409
7993
|
aria-describedby="${this.uniqueId}"
|
|
7994
|
+
aria-expanded=${o(this.a11yExpanded)}
|
|
7410
7995
|
aria-invalid="${this.validity !== 'valid'}"
|
|
7411
|
-
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7412
7996
|
autocomplete="${o(this.autocomplete ? this.autocomplete : undefined)}"
|
|
7997
|
+
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7413
7998
|
autocorrect="${o(this.autocorrect ? this.autocorrect : undefined)}"
|
|
7414
7999
|
class="${e(inputOverrideClasses)}"
|
|
7415
8000
|
id="${this.inputId}"
|
|
7416
|
-
|
|
8001
|
+
inputmode="${o(this.inputmode ? this.inputmode : undefined)}"
|
|
7417
8002
|
lang="${o(this.lang)}"
|
|
7418
8003
|
maxlength="${o(this.maxLength ? this.maxLength : undefined)}"
|
|
7419
8004
|
minlength="${o(this.minLength ? this.minLength : undefined)}"
|
|
@@ -7421,7 +8006,8 @@ class AuroInput extends BaseInput {
|
|
|
7421
8006
|
part="input"
|
|
7422
8007
|
pattern="${o(this.definePattern())}"
|
|
7423
8008
|
spellcheck="${o(this.spellcheck ? this.spellcheck : undefined)}"
|
|
7424
|
-
type="${this.type ===
|
|
8009
|
+
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
8010
|
+
/>
|
|
7425
8011
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7426
8012
|
<div class="displayValueWrapper">
|
|
7427
8013
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
@@ -7443,11 +8029,12 @@ class AuroInput extends BaseInput {
|
|
|
7443
8029
|
?onDark="${this.onDark}"
|
|
7444
8030
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
7445
8031
|
class="notificationBtn clearBtn"
|
|
7446
|
-
|
|
7447
|
-
|
|
8032
|
+
shape="circle"
|
|
8033
|
+
size="sm"
|
|
8034
|
+
variant="ghost">
|
|
7448
8035
|
<${this.iconTag}
|
|
8036
|
+
?customColor="${this.onDark}"
|
|
7449
8037
|
category="interface"
|
|
7450
|
-
customColor
|
|
7451
8038
|
name="x-lg"
|
|
7452
8039
|
>
|
|
7453
8040
|
</${this.iconTag}>
|
|
@@ -7465,22 +8052,23 @@ class AuroInput extends BaseInput {
|
|
|
7465
8052
|
return u$2`
|
|
7466
8053
|
<div class="notification">
|
|
7467
8054
|
<${this.buttonTag}
|
|
7468
|
-
@click="${this.handleClickShowPassword}
|
|
8055
|
+
@click="${this.handleClickShowPassword}"
|
|
7469
8056
|
?onDark="${this.onDark}"
|
|
7470
|
-
aria-hidden="true"
|
|
7471
8057
|
class="notificationBtn passwordBtn"
|
|
7472
|
-
|
|
7473
|
-
|
|
8058
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
8059
|
+
shape="circle"
|
|
8060
|
+
size="sm"
|
|
8061
|
+
variant="ghost">
|
|
7474
8062
|
<${this.iconTag}
|
|
8063
|
+
?customColor="${this.onDark}"
|
|
7475
8064
|
?hidden=${!this.showPassword}
|
|
7476
8065
|
category="interface"
|
|
7477
|
-
customColor
|
|
7478
8066
|
name="hide-password-stroke">
|
|
7479
8067
|
</${this.iconTag}>
|
|
7480
8068
|
<${this.iconTag}
|
|
8069
|
+
?customColor="${this.onDark}"
|
|
7481
8070
|
?hidden=${this.showPassword}
|
|
7482
8071
|
category="interface"
|
|
7483
|
-
customColor
|
|
7484
8072
|
name="view-password-stroke">
|
|
7485
8073
|
</${this.iconTag}>
|
|
7486
8074
|
</${this.buttonTag}>
|
|
@@ -7539,7 +8127,7 @@ class AuroInput extends BaseInput {
|
|
|
7539
8127
|
? u$2`
|
|
7540
8128
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7541
8129
|
<p id="${this.uniqueId}" part="helpText">
|
|
7542
|
-
<slot name="
|
|
8130
|
+
<slot name="helpText">${this.getHelpText()}</slot>
|
|
7543
8131
|
</p>
|
|
7544
8132
|
</${this.helpTextTag}>
|
|
7545
8133
|
`
|
|
@@ -7560,19 +8148,25 @@ class AuroInput extends BaseInput {
|
|
|
7560
8148
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7561
8149
|
*/
|
|
7562
8150
|
renderLayoutClassic() {
|
|
8151
|
+
const classicClassMap = {
|
|
8152
|
+
...this.commonWrapperClasses,
|
|
8153
|
+
'thin': !this.simple
|
|
8154
|
+
};
|
|
8155
|
+
|
|
7563
8156
|
return u$2`
|
|
7564
8157
|
<div
|
|
7565
8158
|
@click="${this.handleClick}"
|
|
7566
|
-
class="${e(
|
|
8159
|
+
class="${e(classicClassMap)}"
|
|
7567
8160
|
part="wrapper">
|
|
7568
|
-
<div class="accents left">
|
|
8161
|
+
<div part="accent-left" class="accents left">
|
|
7569
8162
|
${this.renderHtmlTypeIcon()}
|
|
7570
8163
|
</div>
|
|
7571
8164
|
<div class="mainContent">
|
|
7572
8165
|
${this.renderHtmlInput(true)}
|
|
7573
8166
|
</div>
|
|
7574
|
-
<div class="accents right">
|
|
8167
|
+
<div part="accent-right" class="accents right">
|
|
7575
8168
|
${this.renderValidationErrorIconHtml()}
|
|
8169
|
+
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
7576
8170
|
${this.hasValue ? u$2`
|
|
7577
8171
|
${!this.disabled && !this.readonly ? u$2`
|
|
7578
8172
|
${this.renderHtmlActionClear()}
|