@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.14 → 0.0.0-pr624.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1022 -12
- package/components/bibtemplate/dist/registered.js +1022 -12
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +2 -2
- package/components/checkbox/demo/api.min.js +24 -19
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +24 -19
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +24 -19
- package/components/checkbox/dist/registered.js +24 -19
- package/components/combobox/demo/api.md +52 -0
- package/components/combobox/demo/api.min.js +2059 -651
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2059 -651
- package/components/combobox/dist/auro-combobox.d.ts +4 -4
- package/components/combobox/dist/index.js +1978 -629
- package/components/combobox/dist/registered.js +1978 -629
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +2326 -539
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +2326 -539
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +92 -1
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +2326 -539
- package/components/counter/dist/registered.js +2326 -539
- package/components/datepicker/demo/api.md +3 -1
- package/components/datepicker/demo/api.min.js +5402 -3158
- package/components/datepicker/demo/index.md +6 -1
- package/components/datepicker/demo/index.min.js +5402 -3158
- package/components/datepicker/dist/auro-datepicker.d.ts +17 -7
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +5402 -3158
- package/components/datepicker/dist/registered.js +5402 -3158
- package/components/dropdown/demo/api.md +3 -4
- package/components/dropdown/demo/api.min.js +69 -119
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +69 -119
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +69 -119
- package/components/dropdown/dist/registered.js +69 -119
- package/components/input/demo/api.md +12 -5
- package/components/input/demo/api.min.js +665 -285
- package/components/input/demo/index.min.js +665 -285
- package/components/input/dist/auro-input.d.ts +6 -0
- package/components/input/dist/base-input.d.ts +29 -6
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +665 -285
- package/components/input/dist/registered.js +665 -285
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +63 -2
- package/components/menu/demo/api.min.js +190 -36
- package/components/menu/demo/index.min.js +190 -36
- package/components/menu/dist/auro-menu.d.ts +22 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +190 -36
- package/components/menu/dist/registered.js +190 -36
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.min.js +4 -2
- package/components/radio/demo/index.min.js +4 -2
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +4 -2
- package/components/radio/dist/registered.js +4 -2
- package/components/select/demo/api.md +5 -5
- package/components/select/demo/api.min.js +1412 -293
- package/components/select/demo/index.md +42 -1
- package/components/select/demo/index.min.js +1412 -293
- package/components/select/dist/auro-select.d.ts +8 -8
- package/components/select/dist/index.js +1321 -261
- package/components/select/dist/registered.js +1321 -261
- package/package.json +2 -2
- /package/components/{menu/dist/styles/color-menu-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
|
@@ -4,9 +4,9 @@ import { repeat } from 'lit/directives/repeat.js';
|
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
|
|
7
|
-
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
7
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
8
8
|
|
|
9
|
-
var styleCss$4 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}`;
|
|
9
|
+
var styleCss$4 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{overflow:hidden;width:100%;padding:0;border:0;background:unset;outline:none;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}`;
|
|
10
10
|
|
|
11
11
|
var styleDefaultCss = css`.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}`;
|
|
12
12
|
|
|
@@ -14,15 +14,15 @@ var colorBaseCss = css`.wrapper{border-color:var(--ds-auro-input-border-color);b
|
|
|
14
14
|
|
|
15
15
|
var tokensCss$4 = css`: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-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: transparent}`;
|
|
16
16
|
|
|
17
|
-
var classicStyleCss = css`.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{padding-top:4px;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;padding-bottom:8px;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 .
|
|
17
|
+
var classicStyleCss = css`.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{padding-top:4px;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;padding-bottom:8px;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.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}`;
|
|
18
18
|
|
|
19
19
|
var classicColorCss = css`.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-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
20
20
|
|
|
21
|
-
var emphasizedStyleCss = css`:host
|
|
21
|
+
var emphasizedStyleCss = css`:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.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:24px}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:24px}.layout-emphasized-left .alertNotification{margin-right:8px}.layout-emphasized-left .clear{margin-left:8px}.layout-emphasized-right .alertNotification{margin-left:8px}.layout-emphasized-right .clear{margin-right:8px}`;
|
|
22
22
|
|
|
23
23
|
var emphasizedColorCss = css`.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)}`;
|
|
24
24
|
|
|
25
|
-
var snowflakeStyleCss = css`: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: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}`;
|
|
25
|
+
var snowflakeStyleCss = css`: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: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.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}`;
|
|
26
26
|
|
|
27
27
|
const watchedItems = new Set();
|
|
28
28
|
|
|
@@ -85,6 +85,8 @@ const stringsES = {
|
|
|
85
85
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
86
86
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
87
87
|
'clearInput': 'Borrar campo de entrada',
|
|
88
|
+
'showPassword': 'Mostrar contraseña',
|
|
89
|
+
'hidePassword': 'Ocultar contraseña'
|
|
88
90
|
};
|
|
89
91
|
|
|
90
92
|
const stringsEN = {
|
|
@@ -109,6 +111,8 @@ const stringsEN = {
|
|
|
109
111
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
110
112
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
111
113
|
'clearInput': 'Clear input field',
|
|
114
|
+
'showPassword': 'Show password',
|
|
115
|
+
'hidePassword': 'Hide password'
|
|
112
116
|
};
|
|
113
117
|
|
|
114
118
|
/**
|
|
@@ -4403,7 +4407,7 @@ const {
|
|
|
4403
4407
|
|
|
4404
4408
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4405
4409
|
|
|
4406
|
-
let AuroLibraryRuntimeUtils$
|
|
4410
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
4407
4411
|
|
|
4408
4412
|
/* eslint-disable jsdoc/require-param */
|
|
4409
4413
|
|
|
@@ -4473,7 +4477,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
4473
4477
|
class AuroFormValidation {
|
|
4474
4478
|
|
|
4475
4479
|
constructor() {
|
|
4476
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4480
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
4477
4481
|
}
|
|
4478
4482
|
|
|
4479
4483
|
/**
|
|
@@ -4752,7 +4756,9 @@ class AuroFormValidation {
|
|
|
4752
4756
|
elem.validity = this.auroInputElements[0].validity;
|
|
4753
4757
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
4754
4758
|
|
|
4755
|
-
|
|
4759
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
4760
|
+
// combobox's 2nd input will have noValidate set true.
|
|
4761
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
4756
4762
|
elem.validity = this.auroInputElements[1].validity;
|
|
4757
4763
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
4758
4764
|
}
|
|
@@ -4832,7 +4838,7 @@ class AuroFormValidation {
|
|
|
4832
4838
|
}
|
|
4833
4839
|
}
|
|
4834
4840
|
|
|
4835
|
-
let AuroElement$
|
|
4841
|
+
let AuroElement$2 = class AuroElement extends LitElement {
|
|
4836
4842
|
static get properties() {
|
|
4837
4843
|
return {
|
|
4838
4844
|
|
|
@@ -4867,18 +4873,21 @@ let AuroElement$1 = class AuroElement extends LitElement {
|
|
|
4867
4873
|
}
|
|
4868
4874
|
|
|
4869
4875
|
resetShapeClasses() {
|
|
4870
|
-
|
|
4871
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4876
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4872
4877
|
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4878
|
+
if (wrapper) {
|
|
4879
|
+
wrapper.classList.forEach((className) => {
|
|
4880
|
+
if (className.startsWith('shape-')) {
|
|
4881
|
+
wrapper.classList.remove(className);
|
|
4882
|
+
}
|
|
4883
|
+
});
|
|
4879
4884
|
|
|
4880
|
-
|
|
4881
|
-
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4887
|
+
if (this.shape && this.size) {
|
|
4888
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4889
|
+
} else {
|
|
4890
|
+
wrapper.classList.add('shape-none');
|
|
4882
4891
|
}
|
|
4883
4892
|
}
|
|
4884
4893
|
|
|
@@ -4936,17 +4945,21 @@ let AuroElement$1 = class AuroElement extends LitElement {
|
|
|
4936
4945
|
*
|
|
4937
4946
|
* @slot helptext - Sets the help text displayed below the input.
|
|
4938
4947
|
* @slot label - Sets the label text for the input.
|
|
4948
|
+
* @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
|
|
4939
4949
|
*
|
|
4940
4950
|
* @csspart wrapper - Use for customizing the style of the root element
|
|
4941
4951
|
* @csspart label - Use for customizing the style of the label element
|
|
4942
4952
|
* @csspart helpText - Use for customizing the style of the helpText element
|
|
4953
|
+
* @csspart input - Use for customizing the style of the input element
|
|
4943
4954
|
* @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
|
|
4944
4955
|
* @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
|
|
4956
|
+
* @csspart accent-left - Use for customizing the style of the left accent element (e.g. padding, margin)
|
|
4957
|
+
* @csspart accent-right - Use for customizing the style of the right accent element (e.g. padding, margin)
|
|
4945
4958
|
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
4946
4959
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
4947
4960
|
*/
|
|
4948
4961
|
|
|
4949
|
-
class BaseInput extends AuroElement$
|
|
4962
|
+
class BaseInput extends AuroElement$2 {
|
|
4950
4963
|
|
|
4951
4964
|
constructor() {
|
|
4952
4965
|
super();
|
|
@@ -5039,7 +5052,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5039
5052
|
*/
|
|
5040
5053
|
a11yRole: {
|
|
5041
5054
|
type: String,
|
|
5042
|
-
attribute: true,
|
|
5043
5055
|
reflect: true
|
|
5044
5056
|
},
|
|
5045
5057
|
|
|
@@ -5048,7 +5060,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5048
5060
|
*/
|
|
5049
5061
|
a11yExpanded: {
|
|
5050
5062
|
type: Boolean,
|
|
5051
|
-
attribute: true,
|
|
5052
5063
|
reflect: true
|
|
5053
5064
|
},
|
|
5054
5065
|
|
|
@@ -5057,7 +5068,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5057
5068
|
*/
|
|
5058
5069
|
a11yControls: {
|
|
5059
5070
|
type: String,
|
|
5060
|
-
attribute: true,
|
|
5061
5071
|
reflect: true
|
|
5062
5072
|
},
|
|
5063
5073
|
|
|
@@ -5073,7 +5083,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5073
5083
|
* 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].
|
|
5074
5084
|
*/
|
|
5075
5085
|
autocapitalize: {
|
|
5076
|
-
type: String
|
|
5086
|
+
type: String,
|
|
5087
|
+
reflect: true
|
|
5077
5088
|
},
|
|
5078
5089
|
|
|
5079
5090
|
/**
|
|
@@ -5088,7 +5099,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5088
5099
|
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
5089
5100
|
*/
|
|
5090
5101
|
autocorrect: {
|
|
5091
|
-
type: String
|
|
5102
|
+
type: String,
|
|
5103
|
+
reflect: true
|
|
5092
5104
|
},
|
|
5093
5105
|
|
|
5094
5106
|
/**
|
|
@@ -5133,7 +5145,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5133
5145
|
/** Exposes inputmode attribute for input. */
|
|
5134
5146
|
inputmode: {
|
|
5135
5147
|
type: String,
|
|
5136
|
-
attribute: true,
|
|
5137
5148
|
reflect: true
|
|
5138
5149
|
},
|
|
5139
5150
|
|
|
@@ -5141,7 +5152,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5141
5152
|
* Defines the language of an element.
|
|
5142
5153
|
*/
|
|
5143
5154
|
lang: {
|
|
5144
|
-
type: String
|
|
5155
|
+
type: String,
|
|
5156
|
+
reflect: true
|
|
5145
5157
|
},
|
|
5146
5158
|
|
|
5147
5159
|
/**
|
|
@@ -5155,7 +5167,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5155
5167
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5156
5168
|
*/
|
|
5157
5169
|
maxLength: {
|
|
5158
|
-
type: Number
|
|
5170
|
+
type: Number,
|
|
5171
|
+
reflect: true
|
|
5159
5172
|
},
|
|
5160
5173
|
|
|
5161
5174
|
/**
|
|
@@ -5169,14 +5182,25 @@ class BaseInput extends AuroElement$1 {
|
|
|
5169
5182
|
* 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`.
|
|
5170
5183
|
*/
|
|
5171
5184
|
minLength: {
|
|
5172
|
-
type: Number
|
|
5185
|
+
type: Number,
|
|
5186
|
+
reflect: true
|
|
5173
5187
|
},
|
|
5174
5188
|
|
|
5175
5189
|
/**
|
|
5176
5190
|
* Populates the `name` attribute on the input.
|
|
5177
5191
|
*/
|
|
5178
5192
|
name: {
|
|
5179
|
-
type: String
|
|
5193
|
+
type: String,
|
|
5194
|
+
reflect: true
|
|
5195
|
+
},
|
|
5196
|
+
|
|
5197
|
+
/**
|
|
5198
|
+
* Sets styles for nested operation - removes borders, hides help + error text, and
|
|
5199
|
+
* hides accents.
|
|
5200
|
+
*/
|
|
5201
|
+
nested: {
|
|
5202
|
+
type: Boolean,
|
|
5203
|
+
reflect: true
|
|
5180
5204
|
},
|
|
5181
5205
|
|
|
5182
5206
|
/**
|
|
@@ -5207,7 +5231,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5207
5231
|
* Define custom placeholder text, only supported by date input formats.
|
|
5208
5232
|
*/
|
|
5209
5233
|
placeholder: {
|
|
5210
|
-
type: String
|
|
5234
|
+
type: String,
|
|
5235
|
+
reflect: true
|
|
5211
5236
|
},
|
|
5212
5237
|
|
|
5213
5238
|
/**
|
|
@@ -5296,6 +5321,14 @@ class BaseInput extends AuroElement$1 {
|
|
|
5296
5321
|
type: String
|
|
5297
5322
|
},
|
|
5298
5323
|
|
|
5324
|
+
/**
|
|
5325
|
+
* borderless
|
|
5326
|
+
*/
|
|
5327
|
+
simple: {
|
|
5328
|
+
type: Boolean,
|
|
5329
|
+
reflect: true
|
|
5330
|
+
},
|
|
5331
|
+
|
|
5299
5332
|
/**
|
|
5300
5333
|
* Custom help text message for email type validity.
|
|
5301
5334
|
*/
|
|
@@ -5307,7 +5340,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5307
5340
|
* 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`.
|
|
5308
5341
|
*/
|
|
5309
5342
|
spellcheck: {
|
|
5310
|
-
type: String
|
|
5343
|
+
type: String,
|
|
5344
|
+
reflect: true
|
|
5311
5345
|
},
|
|
5312
5346
|
|
|
5313
5347
|
/**
|
|
@@ -5322,7 +5356,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5322
5356
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5323
5357
|
*/
|
|
5324
5358
|
value: {
|
|
5325
|
-
type: String
|
|
5359
|
+
type: String,
|
|
5360
|
+
reflect: true
|
|
5326
5361
|
},
|
|
5327
5362
|
|
|
5328
5363
|
/**
|
|
@@ -5602,7 +5637,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5602
5637
|
|
|
5603
5638
|
/**
|
|
5604
5639
|
* Function to set element focus.
|
|
5605
|
-
* @private
|
|
5606
5640
|
* @return {void}
|
|
5607
5641
|
*/
|
|
5608
5642
|
focus() {
|
|
@@ -5820,8 +5854,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
5820
5854
|
|
|
5821
5855
|
this.requestUpdate();
|
|
5822
5856
|
|
|
5823
|
-
|
|
5824
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5857
|
+
return this.placeholderStr;
|
|
5825
5858
|
}
|
|
5826
5859
|
|
|
5827
5860
|
/**
|
|
@@ -5988,7 +6021,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
5988
6021
|
// See LICENSE in the project root for license information.
|
|
5989
6022
|
|
|
5990
6023
|
|
|
5991
|
-
|
|
6024
|
+
class AuroDependencyVersioning {
|
|
5992
6025
|
|
|
5993
6026
|
/**
|
|
5994
6027
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -6022,7 +6055,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
6022
6055
|
|
|
6023
6056
|
return tag;
|
|
6024
6057
|
}
|
|
6025
|
-
}
|
|
6058
|
+
}
|
|
6026
6059
|
|
|
6027
6060
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6028
6061
|
// See LICENSE in the project root for license information.
|
|
@@ -6034,7 +6067,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
6034
6067
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6035
6068
|
*/
|
|
6036
6069
|
|
|
6037
|
-
class AuroElement extends LitElement {
|
|
6070
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
6038
6071
|
|
|
6039
6072
|
// function to define props used within the scope of this component
|
|
6040
6073
|
static get properties() {
|
|
@@ -6058,7 +6091,7 @@ class AuroElement extends LitElement {
|
|
|
6058
6091
|
|
|
6059
6092
|
return 'false'
|
|
6060
6093
|
}
|
|
6061
|
-
}
|
|
6094
|
+
};
|
|
6062
6095
|
|
|
6063
6096
|
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>"};
|
|
6064
6097
|
|
|
@@ -6102,7 +6135,7 @@ var styleCss$3 = css`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
6102
6135
|
*/
|
|
6103
6136
|
|
|
6104
6137
|
// build the component class
|
|
6105
|
-
class BaseIcon extends AuroElement {
|
|
6138
|
+
class BaseIcon extends AuroElement$1 {
|
|
6106
6139
|
constructor() {
|
|
6107
6140
|
super();
|
|
6108
6141
|
this.onDark = false;
|
|
@@ -6185,7 +6218,7 @@ var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
6185
6218
|
|
|
6186
6219
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6187
6220
|
|
|
6188
|
-
let AuroLibraryRuntimeUtils$
|
|
6221
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6189
6222
|
|
|
6190
6223
|
/* eslint-disable jsdoc/require-param */
|
|
6191
6224
|
|
|
@@ -6267,7 +6300,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6267
6300
|
*/
|
|
6268
6301
|
privateDefaults() {
|
|
6269
6302
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
6270
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6303
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6271
6304
|
}
|
|
6272
6305
|
|
|
6273
6306
|
// function to define props used within the scope of this component
|
|
@@ -6349,7 +6382,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6349
6382
|
*
|
|
6350
6383
|
*/
|
|
6351
6384
|
static register(name = "auro-icon") {
|
|
6352
|
-
AuroLibraryRuntimeUtils$
|
|
6385
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
6353
6386
|
}
|
|
6354
6387
|
|
|
6355
6388
|
connectedCallback() {
|
|
@@ -6370,8 +6403,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6370
6403
|
async firstUpdated() {
|
|
6371
6404
|
await super.firstUpdated();
|
|
6372
6405
|
|
|
6373
|
-
|
|
6374
|
-
|
|
6406
|
+
/**
|
|
6407
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6408
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6409
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6410
|
+
*/
|
|
6411
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6375
6412
|
const svgDesc = this.svg.querySelector('desc');
|
|
6376
6413
|
|
|
6377
6414
|
if (svgDesc) {
|
|
@@ -6415,123 +6452,481 @@ class AuroIcon extends BaseIcon {
|
|
|
6415
6452
|
}
|
|
6416
6453
|
}
|
|
6417
6454
|
|
|
6418
|
-
var iconVersion = '8.0.
|
|
6455
|
+
var iconVersion = '8.0.4';
|
|
6419
6456
|
|
|
6420
|
-
|
|
6421
|
-
|
|
6457
|
+
/**
|
|
6458
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6459
|
+
*/
|
|
6460
|
+
const _observers = new WeakMap();
|
|
6422
6461
|
|
|
6462
|
+
/**
|
|
6463
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6464
|
+
* Structure: {
|
|
6465
|
+
* host: {
|
|
6466
|
+
* matchers: Set<Function>,
|
|
6467
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6468
|
+
* }
|
|
6469
|
+
* }
|
|
6470
|
+
*/
|
|
6471
|
+
const _transportConfig = new WeakMap();
|
|
6423
6472
|
|
|
6424
|
-
|
|
6473
|
+
/**
|
|
6474
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6475
|
+
*
|
|
6476
|
+
* @param {Object} params - The parameters for the function.
|
|
6477
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6478
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6479
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6480
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6481
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6482
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6483
|
+
*/
|
|
6484
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
6485
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
6486
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
6487
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
6488
|
+
}
|
|
6425
6489
|
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6431
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6432
|
-
*/
|
|
6433
|
-
generateElementName(baseName, version) {
|
|
6434
|
-
let result = baseName;
|
|
6490
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
6491
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
6492
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
6493
|
+
}
|
|
6435
6494
|
|
|
6436
|
-
|
|
6437
|
-
|
|
6495
|
+
// Guard Clause: Ensure match is a function
|
|
6496
|
+
if (typeof match !== 'function') {
|
|
6497
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
6498
|
+
}
|
|
6438
6499
|
|
|
6439
|
-
|
|
6500
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
6501
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
6502
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
6440
6503
|
}
|
|
6504
|
+
|
|
6505
|
+
// Register this transport and get cleanup function
|
|
6506
|
+
return _registerTransport({
|
|
6507
|
+
host,
|
|
6508
|
+
target,
|
|
6509
|
+
matcher: match,
|
|
6510
|
+
removeOriginal
|
|
6511
|
+
});
|
|
6512
|
+
};
|
|
6441
6513
|
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6514
|
+
/**
|
|
6515
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
6516
|
+
*
|
|
6517
|
+
* @param {Object} params - The parameters object.
|
|
6518
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
6519
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
6520
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
6521
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
6522
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
6523
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
6524
|
+
* @private
|
|
6525
|
+
*/
|
|
6526
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6527
|
+
// Initialize config for this host if it doesn't exist
|
|
6528
|
+
if (!_transportConfig.has(host)) {
|
|
6529
|
+
_transportConfig.set(host, {
|
|
6530
|
+
matchers: new Set(),
|
|
6531
|
+
targets: new Map()
|
|
6532
|
+
});
|
|
6533
|
+
}
|
|
6451
6534
|
|
|
6452
|
-
|
|
6453
|
-
|
|
6535
|
+
const config = _transportConfig.get(host);
|
|
6536
|
+
|
|
6537
|
+
// Add the matcher to the set of matchers for this host
|
|
6538
|
+
config.matchers.add(matcher);
|
|
6539
|
+
|
|
6540
|
+
// Initialize target entry if it doesn't exist
|
|
6541
|
+
if (!config.targets.has(target)) {
|
|
6542
|
+
config.targets.set(target, new Map());
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
6546
|
+
config.targets.get(target).set(matcher, {
|
|
6547
|
+
removeOriginal,
|
|
6548
|
+
currentAttributes: new Map()
|
|
6549
|
+
});
|
|
6550
|
+
|
|
6551
|
+
// Perform initial attribute transport
|
|
6552
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
6553
|
+
|
|
6554
|
+
// Attach observer
|
|
6555
|
+
_attachObserver(host);
|
|
6556
|
+
|
|
6557
|
+
// Return cleanup function and utility functions
|
|
6558
|
+
return {
|
|
6559
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
6560
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
6561
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
6562
|
+
}
|
|
6563
|
+
};
|
|
6564
|
+
|
|
6565
|
+
/**
|
|
6566
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
6567
|
+
*
|
|
6568
|
+
* @param {HTMLElement} host - The host element
|
|
6569
|
+
* @param {HTMLElement} target - The target element
|
|
6570
|
+
* @param {Function} matcher - The matcher function
|
|
6571
|
+
* @private
|
|
6572
|
+
*/
|
|
6573
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
6574
|
+
const config = _transportConfig.get(host);
|
|
6575
|
+
if (!config) return;
|
|
6576
|
+
|
|
6577
|
+
// Remove this matcher from this target
|
|
6578
|
+
const targetMatchers = config.targets.get(target);
|
|
6579
|
+
if (targetMatchers) {
|
|
6580
|
+
targetMatchers.delete(matcher);
|
|
6581
|
+
|
|
6582
|
+
// If this target has no more matchers, remove it
|
|
6583
|
+
if (targetMatchers.size === 0) {
|
|
6584
|
+
config.targets.delete(target);
|
|
6585
|
+
}
|
|
6586
|
+
}
|
|
6587
|
+
|
|
6588
|
+
// Check if this matcher is still used by any target
|
|
6589
|
+
let matcherStillUsed = false;
|
|
6590
|
+
for (const matcherMap of config.targets.values()) {
|
|
6591
|
+
if (matcherMap.has(matcher)) {
|
|
6592
|
+
matcherStillUsed = true;
|
|
6593
|
+
break;
|
|
6594
|
+
}
|
|
6595
|
+
}
|
|
6596
|
+
|
|
6597
|
+
// If not used anymore, remove from matchers set
|
|
6598
|
+
if (!matcherStillUsed) {
|
|
6599
|
+
config.matchers.delete(matcher);
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6602
|
+
// If no more targets or matchers, detach observer
|
|
6603
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
6604
|
+
_detachObserver(host);
|
|
6605
|
+
}
|
|
6606
|
+
};
|
|
6607
|
+
|
|
6608
|
+
/**
|
|
6609
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
6610
|
+
*
|
|
6611
|
+
* @param {Object} params - The parameters object.
|
|
6612
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
6613
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6614
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
6615
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
6616
|
+
* @returns {void}
|
|
6617
|
+
* @private
|
|
6618
|
+
*/
|
|
6619
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6620
|
+
// Get a list of all matching attributes on the host element and their values
|
|
6621
|
+
const matchingAttributes = host.getAttributeNames()
|
|
6622
|
+
.filter(attr => matcher(attr))
|
|
6623
|
+
.reduce((acc, attr) => {
|
|
6624
|
+
acc[attr] = host.getAttribute(attr);
|
|
6625
|
+
return acc;
|
|
6626
|
+
}, {});
|
|
6627
|
+
|
|
6628
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
6629
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
6630
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
6631
|
+
target.setAttribute(key, value);
|
|
6632
|
+
if (removeOriginal) {
|
|
6633
|
+
host.removeAttribute(key);
|
|
6454
6634
|
}
|
|
6635
|
+
});
|
|
6636
|
+
};
|
|
6455
6637
|
|
|
6456
|
-
|
|
6638
|
+
/**
|
|
6639
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
6640
|
+
*
|
|
6641
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
6642
|
+
* @returns {MutationObserver} The observer instance.
|
|
6643
|
+
* @private
|
|
6644
|
+
*/
|
|
6645
|
+
const _attachObserver = (host) => {
|
|
6646
|
+
// If an observer for this host already exists, return it
|
|
6647
|
+
if (_observers.has(host)) {
|
|
6648
|
+
return _observers.get(host);
|
|
6649
|
+
}
|
|
6650
|
+
|
|
6651
|
+
// Create a new MutationObserver
|
|
6652
|
+
const observer = new MutationObserver((mutations) => {
|
|
6653
|
+
const config = _transportConfig.get(host);
|
|
6654
|
+
if (!config) return;
|
|
6655
|
+
|
|
6656
|
+
// For each mutation affecting attributes
|
|
6657
|
+
mutations
|
|
6658
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
6659
|
+
.forEach(mutation => {
|
|
6660
|
+
const attributeName = mutation.attributeName;
|
|
6661
|
+
|
|
6662
|
+
// Find matchers that care about this attribute
|
|
6663
|
+
for (const matcher of config.matchers) {
|
|
6664
|
+
if (matcher(attributeName)) {
|
|
6665
|
+
// For each target that uses this matcher
|
|
6666
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
6667
|
+
if (matcherConfigs.has(matcher)) {
|
|
6668
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
6669
|
+
_transportAttributes({
|
|
6670
|
+
host,
|
|
6671
|
+
target,
|
|
6672
|
+
matcher,
|
|
6673
|
+
removeOriginal
|
|
6674
|
+
});
|
|
6675
|
+
}
|
|
6676
|
+
}
|
|
6677
|
+
}
|
|
6678
|
+
}
|
|
6679
|
+
});
|
|
6680
|
+
});
|
|
6681
|
+
|
|
6682
|
+
// Start observing attribute changes
|
|
6683
|
+
observer.observe(host, { attributes: true });
|
|
6684
|
+
|
|
6685
|
+
// Store the observer
|
|
6686
|
+
_observers.set(host, observer);
|
|
6687
|
+
|
|
6688
|
+
return observer;
|
|
6689
|
+
};
|
|
6690
|
+
|
|
6691
|
+
/**
|
|
6692
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
6693
|
+
*
|
|
6694
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
6695
|
+
* @private
|
|
6696
|
+
*/
|
|
6697
|
+
const _detachObserver = (host) => {
|
|
6698
|
+
if (_observers.has(host)) {
|
|
6699
|
+
const observer = _observers.get(host);
|
|
6700
|
+
observer.disconnect();
|
|
6701
|
+
_observers.delete(host);
|
|
6457
6702
|
}
|
|
6458
|
-
|
|
6703
|
+
|
|
6704
|
+
// Clean up the transport config as well
|
|
6705
|
+
if (_transportConfig.has(host)) {
|
|
6706
|
+
_transportConfig.delete(host);
|
|
6707
|
+
}
|
|
6708
|
+
};
|
|
6459
6709
|
|
|
6460
|
-
|
|
6461
|
-
|
|
6710
|
+
/**
|
|
6711
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
6712
|
+
* @param {HTMLElement} host - The host element
|
|
6713
|
+
* @param {HTMLElement} target - The target element
|
|
6714
|
+
* @param {Function} matcher - The matcher function
|
|
6715
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
6716
|
+
* @private
|
|
6717
|
+
*/
|
|
6718
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
6719
|
+
const config = _transportConfig.get(host);
|
|
6720
|
+
if (!config) return undefined;
|
|
6721
|
+
|
|
6722
|
+
const targetMatchers = config.targets.get(target);
|
|
6723
|
+
if (!targetMatchers) return undefined;
|
|
6724
|
+
|
|
6725
|
+
return targetMatchers.get(matcher);
|
|
6726
|
+
};
|
|
6462
6727
|
|
|
6463
|
-
|
|
6728
|
+
/**
|
|
6729
|
+
* Sets an observed attribute value
|
|
6730
|
+
* @param {HTMLElement} host - The host element
|
|
6731
|
+
* @param {HTMLElement} target - The target element
|
|
6732
|
+
* @param {Function} matcher - The matcher function
|
|
6733
|
+
* @param {string} key - The attribute name
|
|
6734
|
+
* @param {string} value - The attribute value
|
|
6735
|
+
* @private
|
|
6736
|
+
*/
|
|
6737
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
6738
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6739
|
+
if (matcherConfig) {
|
|
6740
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
6741
|
+
}
|
|
6742
|
+
};
|
|
6464
6743
|
|
|
6465
|
-
|
|
6744
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
6745
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6746
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
6747
|
+
return undefined;
|
|
6748
|
+
};
|
|
6466
6749
|
|
|
6467
|
-
|
|
6750
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
6751
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6752
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
6753
|
+
return [];
|
|
6754
|
+
};
|
|
6468
6755
|
|
|
6469
|
-
|
|
6756
|
+
const _matchers = {
|
|
6757
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
6758
|
+
'role': attr => attr.match(/^role$/)
|
|
6759
|
+
};
|
|
6760
|
+
|
|
6761
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
6762
|
+
return transportAttributes({
|
|
6763
|
+
host,
|
|
6764
|
+
target,
|
|
6765
|
+
match: attr => {
|
|
6766
|
+
for (const key in _matchers) {
|
|
6767
|
+
if (_matchers[key](attr)) return true;
|
|
6768
|
+
}
|
|
6769
|
+
return false;
|
|
6770
|
+
},
|
|
6771
|
+
removeOriginal
|
|
6772
|
+
});
|
|
6773
|
+
};
|
|
6774
|
+
|
|
6775
|
+
class AuroElement extends LitElement {
|
|
6470
6776
|
|
|
6471
6777
|
/**
|
|
6472
|
-
*
|
|
6473
|
-
* @
|
|
6474
|
-
* @
|
|
6475
|
-
* @
|
|
6778
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
6779
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
6780
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
6781
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
6782
|
+
* @private
|
|
6476
6783
|
*/
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6784
|
+
attributeWatcher;
|
|
6785
|
+
|
|
6786
|
+
static get properties() {
|
|
6787
|
+
return {
|
|
6788
|
+
|
|
6789
|
+
/**
|
|
6790
|
+
* Defines the layout of an element.
|
|
6791
|
+
* @default {'default'}
|
|
6792
|
+
*/
|
|
6793
|
+
layout: {
|
|
6794
|
+
type: String,
|
|
6795
|
+
attribute: "layout",
|
|
6796
|
+
reflect: true
|
|
6797
|
+
},
|
|
6798
|
+
|
|
6799
|
+
/**
|
|
6800
|
+
* Defines the shape of an element.
|
|
6801
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
6802
|
+
* @default {'default'}
|
|
6803
|
+
*/
|
|
6804
|
+
shape: {
|
|
6805
|
+
type: String,
|
|
6806
|
+
attribute: "shape",
|
|
6807
|
+
reflect: true
|
|
6808
|
+
},
|
|
6809
|
+
|
|
6810
|
+
/**
|
|
6811
|
+
* Defines the size of an element.
|
|
6812
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
6813
|
+
* @default {'md'}
|
|
6814
|
+
*/
|
|
6815
|
+
size: {
|
|
6816
|
+
type: String,
|
|
6817
|
+
attribute: "size",
|
|
6818
|
+
reflect: true
|
|
6819
|
+
},
|
|
6820
|
+
|
|
6821
|
+
/**
|
|
6822
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
6823
|
+
* @default {false}
|
|
6824
|
+
*/
|
|
6825
|
+
onDark: {
|
|
6826
|
+
type: Boolean,
|
|
6827
|
+
attribute: "ondark",
|
|
6828
|
+
reflect: true
|
|
6829
|
+
},
|
|
6830
|
+
|
|
6831
|
+
/**
|
|
6832
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
6833
|
+
* This is used to apply layout and shape classes dynamically.
|
|
6834
|
+
* @type {HTMLElement|null}
|
|
6835
|
+
* @default {null}
|
|
6836
|
+
* @private
|
|
6837
|
+
*/
|
|
6838
|
+
wrapper: {
|
|
6839
|
+
type: HTMLElement,
|
|
6840
|
+
attribute: false,
|
|
6841
|
+
reflect: false
|
|
6842
|
+
}
|
|
6843
|
+
};
|
|
6844
|
+
}
|
|
6845
|
+
|
|
6846
|
+
|
|
6847
|
+
|
|
6848
|
+
resetShapeClasses() {
|
|
6849
|
+
if (this.shape && this.size) {
|
|
6850
|
+
|
|
6851
|
+
if (this.wrapper) {
|
|
6852
|
+
this.wrapper.classList.forEach((className) => {
|
|
6853
|
+
if (className.startsWith('shape-')) {
|
|
6854
|
+
this.wrapper.classList.remove(className);
|
|
6855
|
+
}
|
|
6856
|
+
});
|
|
6857
|
+
|
|
6858
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6859
|
+
}
|
|
6480
6860
|
}
|
|
6481
6861
|
}
|
|
6482
6862
|
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6496
|
-
) {
|
|
6497
|
-
return __Closest(base);
|
|
6863
|
+
resetLayoutClasses() {
|
|
6864
|
+
if (this.layout) {
|
|
6865
|
+
if (this.wrapper) {
|
|
6866
|
+
this.wrapper.classList.forEach((className) => {
|
|
6867
|
+
if (className.startsWith('layout-')) {
|
|
6868
|
+
this.wrapper.classList.remove(className);
|
|
6869
|
+
}
|
|
6870
|
+
});
|
|
6871
|
+
|
|
6872
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6873
|
+
}
|
|
6874
|
+
}
|
|
6498
6875
|
}
|
|
6499
|
-
/* eslint-enable jsdoc/require-param */
|
|
6500
6876
|
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
* @returns {void}
|
|
6506
|
-
*/
|
|
6507
|
-
handleComponentTagRename(elem, tagName) {
|
|
6508
|
-
const tag = tagName.toLowerCase();
|
|
6509
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6877
|
+
updateComponentArchitecture() {
|
|
6878
|
+
this.resetLayoutClasses();
|
|
6879
|
+
this.resetShapeClasses();
|
|
6880
|
+
}
|
|
6510
6881
|
|
|
6511
|
-
|
|
6512
|
-
|
|
6882
|
+
updated(changedProperties) {
|
|
6883
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6884
|
+
this.updateComponentArchitecture();
|
|
6513
6885
|
}
|
|
6514
6886
|
}
|
|
6515
6887
|
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
* @param {Object} elem - The element to validate.
|
|
6519
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
6520
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6521
|
-
*/
|
|
6522
|
-
elementMatch(elem, tagName) {
|
|
6523
|
-
const tag = tagName.toLowerCase();
|
|
6524
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6888
|
+
firstUpdated() {
|
|
6889
|
+
super.firstUpdated();
|
|
6525
6890
|
|
|
6526
|
-
|
|
6891
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6892
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6893
|
+
|
|
6894
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6895
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6527
6896
|
}
|
|
6528
|
-
};
|
|
6529
6897
|
|
|
6530
|
-
|
|
6898
|
+
disconnectedCallback() {
|
|
6899
|
+
super.disconnectedCallback();
|
|
6900
|
+
|
|
6901
|
+
// Cleanup the ARIA observer if it exists
|
|
6902
|
+
if (this.attributeWatcher) {
|
|
6903
|
+
this.attributeWatcher.cleanup();
|
|
6904
|
+
this.attributeWatcher = null;
|
|
6905
|
+
}
|
|
6906
|
+
}
|
|
6907
|
+
|
|
6908
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6909
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6910
|
+
render() {
|
|
6911
|
+
try {
|
|
6912
|
+
return this.renderLayout();
|
|
6913
|
+
} catch (error) {
|
|
6914
|
+
// failed to get the defined layout
|
|
6915
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6916
|
+
|
|
6917
|
+
// fallback to the default layout
|
|
6918
|
+
return this.getLayout('default');
|
|
6919
|
+
}
|
|
6920
|
+
}
|
|
6921
|
+
}
|
|
6922
|
+
|
|
6923
|
+
var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
6924
|
+
|
|
6925
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
6531
6926
|
|
|
6532
|
-
var
|
|
6927
|
+
var tokensCss$2 = css`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
6533
6928
|
|
|
6534
|
-
var
|
|
6929
|
+
var shapeSize = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
6535
6930
|
|
|
6536
6931
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6537
6932
|
// See LICENSE in the project root for license information.
|
|
@@ -6750,14 +7145,13 @@ class AuroLoader extends LitElement {
|
|
|
6750
7145
|
|
|
6751
7146
|
var loaderVersion = '5.0.0';
|
|
6752
7147
|
|
|
6753
|
-
/* eslint-disable max-lines */
|
|
7148
|
+
/* eslint-disable max-lines, curly */
|
|
6754
7149
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6755
7150
|
// See LICENSE in the project root for license information.
|
|
6756
7151
|
|
|
6757
7152
|
|
|
6758
7153
|
/**
|
|
6759
7154
|
* @slot - Default slot for the text of the button.
|
|
6760
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
6761
7155
|
* @csspart button - Apply CSS to HTML5 button.
|
|
6762
7156
|
* @csspart loader - Apply CSS to auro-loader.
|
|
6763
7157
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -6766,7 +7160,18 @@ var loaderVersion = '5.0.0';
|
|
|
6766
7160
|
|
|
6767
7161
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
6768
7162
|
|
|
6769
|
-
|
|
7163
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7164
|
+
|
|
7165
|
+
/**
|
|
7166
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7167
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7168
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7169
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7170
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7171
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7172
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7173
|
+
*/
|
|
7174
|
+
class AuroButton extends AuroElement {
|
|
6770
7175
|
|
|
6771
7176
|
/**
|
|
6772
7177
|
* Enables form association for this element.
|
|
@@ -6781,13 +7186,10 @@ class AuroButton extends LitElement {
|
|
|
6781
7186
|
super();
|
|
6782
7187
|
this.autofocus = false;
|
|
6783
7188
|
this.disabled = false;
|
|
6784
|
-
this.iconOnly = false;
|
|
6785
7189
|
this.loading = false;
|
|
7190
|
+
this.size = "md";
|
|
7191
|
+
this.shape = "rounded";
|
|
6786
7192
|
this.onDark = false;
|
|
6787
|
-
this.secondary = false;
|
|
6788
|
-
this.tertiary = false;
|
|
6789
|
-
this.rounded = false;
|
|
6790
|
-
this.slim = false;
|
|
6791
7193
|
this.fluid = false;
|
|
6792
7194
|
this.loadingText = this.loadingText || 'Loading...';
|
|
6793
7195
|
|
|
@@ -6816,43 +7218,38 @@ class AuroButton extends LitElement {
|
|
|
6816
7218
|
return [
|
|
6817
7219
|
tokensCss$2,
|
|
6818
7220
|
styleCss$2,
|
|
6819
|
-
colorCss$2
|
|
7221
|
+
colorCss$2,
|
|
7222
|
+
shapeSize
|
|
6820
7223
|
];
|
|
6821
7224
|
}
|
|
6822
7225
|
|
|
6823
7226
|
static get properties() {
|
|
6824
7227
|
return {
|
|
6825
7228
|
|
|
6826
|
-
|
|
6827
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6828
|
-
*/
|
|
6829
|
-
autofocus: {
|
|
6830
|
-
type: Boolean,
|
|
6831
|
-
reflect: true
|
|
6832
|
-
},
|
|
7229
|
+
...super.properties,
|
|
6833
7230
|
|
|
6834
7231
|
/**
|
|
6835
|
-
*
|
|
7232
|
+
* Override layout since it isn't used in this component.
|
|
7233
|
+
* @private
|
|
6836
7234
|
*/
|
|
6837
|
-
|
|
7235
|
+
layout: {
|
|
6838
7236
|
type: Boolean,
|
|
6839
|
-
|
|
7237
|
+
attribute: false,
|
|
7238
|
+
reflect: false
|
|
6840
7239
|
},
|
|
6841
7240
|
|
|
6842
7241
|
/**
|
|
6843
|
-
*
|
|
6844
|
-
* @deprecated
|
|
7242
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6845
7243
|
*/
|
|
6846
|
-
|
|
7244
|
+
autofocus: {
|
|
6847
7245
|
type: Boolean,
|
|
6848
7246
|
reflect: true
|
|
6849
7247
|
},
|
|
6850
7248
|
|
|
6851
7249
|
/**
|
|
6852
|
-
*
|
|
6853
|
-
* @deprecated
|
|
7250
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6854
7251
|
*/
|
|
6855
|
-
|
|
7252
|
+
disabled: {
|
|
6856
7253
|
type: Boolean,
|
|
6857
7254
|
reflect: true
|
|
6858
7255
|
},
|
|
@@ -6860,15 +7257,7 @@ class AuroButton extends LitElement {
|
|
|
6860
7257
|
/**
|
|
6861
7258
|
* Alters the shape of the button to be full width of its parent container.
|
|
6862
7259
|
*/
|
|
6863
|
-
fluid:
|
|
6864
|
-
type: Boolean,
|
|
6865
|
-
reflect: true
|
|
6866
|
-
},
|
|
6867
|
-
|
|
6868
|
-
/**
|
|
6869
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
6870
|
-
*/
|
|
6871
|
-
iconOnly: {
|
|
7260
|
+
fluid: {
|
|
6872
7261
|
type: Boolean,
|
|
6873
7262
|
reflect: true
|
|
6874
7263
|
},
|
|
@@ -6876,7 +7265,7 @@ class AuroButton extends LitElement {
|
|
|
6876
7265
|
/**
|
|
6877
7266
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6878
7267
|
*/
|
|
6879
|
-
loading:
|
|
7268
|
+
loading: {
|
|
6880
7269
|
type: Boolean,
|
|
6881
7270
|
reflect: true
|
|
6882
7271
|
},
|
|
@@ -6884,34 +7273,10 @@ class AuroButton extends LitElement {
|
|
|
6884
7273
|
/**
|
|
6885
7274
|
* 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.
|
|
6886
7275
|
*/
|
|
6887
|
-
loadingText:
|
|
7276
|
+
loadingText: {
|
|
6888
7277
|
type: String
|
|
6889
7278
|
},
|
|
6890
7279
|
|
|
6891
|
-
/**
|
|
6892
|
-
* Set value for on-dark version of auro-button.
|
|
6893
|
-
*/
|
|
6894
|
-
onDark: {
|
|
6895
|
-
type: Boolean,
|
|
6896
|
-
reflect: true
|
|
6897
|
-
},
|
|
6898
|
-
|
|
6899
|
-
/**
|
|
6900
|
-
* If set to true, the button will have a rounded shape.
|
|
6901
|
-
*/
|
|
6902
|
-
rounded: {
|
|
6903
|
-
type: Boolean,
|
|
6904
|
-
reflect: true
|
|
6905
|
-
},
|
|
6906
|
-
|
|
6907
|
-
/**
|
|
6908
|
-
* Set value for slim version of auro-button.
|
|
6909
|
-
*/
|
|
6910
|
-
slim: {
|
|
6911
|
-
type: Boolean,
|
|
6912
|
-
reflect: true
|
|
6913
|
-
},
|
|
6914
|
-
|
|
6915
7280
|
/**
|
|
6916
7281
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
6917
7282
|
*/
|
|
@@ -6920,48 +7285,10 @@ class AuroButton extends LitElement {
|
|
|
6920
7285
|
reflect: true
|
|
6921
7286
|
},
|
|
6922
7287
|
|
|
6923
|
-
/**
|
|
6924
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
6925
|
-
*/
|
|
6926
|
-
ariahidden: {
|
|
6927
|
-
type: String,
|
|
6928
|
-
reflect: true,
|
|
6929
|
-
},
|
|
6930
|
-
|
|
6931
|
-
/**
|
|
6932
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
6933
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
6934
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
6935
|
-
*/
|
|
6936
|
-
arialabel: {
|
|
6937
|
-
type: String,
|
|
6938
|
-
reflect: true
|
|
6939
|
-
},
|
|
6940
|
-
|
|
6941
|
-
/**
|
|
6942
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
6943
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
6944
|
-
* List multiple element IDs in a space delimited fashion.
|
|
6945
|
-
*/
|
|
6946
|
-
arialabelledby: {
|
|
6947
|
-
type: String,
|
|
6948
|
-
reflect: true
|
|
6949
|
-
},
|
|
6950
|
-
|
|
6951
|
-
/**
|
|
6952
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
6953
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
6954
|
-
* This is an optional attribute for buttons.
|
|
6955
|
-
*/
|
|
6956
|
-
ariaexpanded: {
|
|
6957
|
-
type: Boolean,
|
|
6958
|
-
reflect: true
|
|
6959
|
-
},
|
|
6960
|
-
|
|
6961
7288
|
/**
|
|
6962
7289
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6963
7290
|
*/
|
|
6964
|
-
title:
|
|
7291
|
+
title: {
|
|
6965
7292
|
type: String,
|
|
6966
7293
|
reflect: true
|
|
6967
7294
|
},
|
|
@@ -6969,7 +7296,7 @@ class AuroButton extends LitElement {
|
|
|
6969
7296
|
/**
|
|
6970
7297
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6971
7298
|
*/
|
|
6972
|
-
type:
|
|
7299
|
+
type: {
|
|
6973
7300
|
type: String,
|
|
6974
7301
|
reflect: true
|
|
6975
7302
|
},
|
|
@@ -6977,19 +7304,19 @@ class AuroButton extends LitElement {
|
|
|
6977
7304
|
/**
|
|
6978
7305
|
* Defines the value associated with the button which is submitted with the form data.
|
|
6979
7306
|
*/
|
|
6980
|
-
value:
|
|
7307
|
+
value: {
|
|
6981
7308
|
type: String,
|
|
6982
7309
|
reflect: true
|
|
6983
7310
|
},
|
|
6984
7311
|
|
|
6985
7312
|
/**
|
|
6986
|
-
* Sets button variant option.
|
|
7313
|
+
* Sets button variant option.
|
|
7314
|
+
* @default primary
|
|
6987
7315
|
*/
|
|
6988
|
-
variant:
|
|
7316
|
+
variant: {
|
|
6989
7317
|
type: String,
|
|
6990
7318
|
reflect: true
|
|
6991
7319
|
},
|
|
6992
|
-
ready: { type: Boolean },
|
|
6993
7320
|
};
|
|
6994
7321
|
}
|
|
6995
7322
|
|
|
@@ -7002,7 +7329,7 @@ class AuroButton extends LitElement {
|
|
|
7002
7329
|
*
|
|
7003
7330
|
*/
|
|
7004
7331
|
static register(name = "auro-button") {
|
|
7005
|
-
AuroLibraryRuntimeUtils$
|
|
7332
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
7006
7333
|
}
|
|
7007
7334
|
|
|
7008
7335
|
/**
|
|
@@ -7014,17 +7341,6 @@ class AuroButton extends LitElement {
|
|
|
7014
7341
|
this.renderRoot.querySelector('button').focus();
|
|
7015
7342
|
}
|
|
7016
7343
|
|
|
7017
|
-
updated() {
|
|
7018
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
7019
|
-
if (this.secondary) {
|
|
7020
|
-
this.setAttribute('variant', 'secondary');
|
|
7021
|
-
}
|
|
7022
|
-
|
|
7023
|
-
if (this.tertiary) {
|
|
7024
|
-
this.setAttribute('variant', 'tertiary');
|
|
7025
|
-
}
|
|
7026
|
-
}
|
|
7027
|
-
|
|
7028
7344
|
/**
|
|
7029
7345
|
* Submits the form that this button is associated with.
|
|
7030
7346
|
* @private
|
|
@@ -7045,25 +7361,57 @@ class AuroButton extends LitElement {
|
|
|
7045
7361
|
return this.internals ? this.internals.form : null;
|
|
7046
7362
|
}
|
|
7047
7363
|
|
|
7048
|
-
|
|
7364
|
+
/**
|
|
7365
|
+
* @private
|
|
7366
|
+
* @returns {Boolean}
|
|
7367
|
+
*/
|
|
7368
|
+
get hideText() {
|
|
7369
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
7370
|
+
}
|
|
7371
|
+
|
|
7372
|
+
/**
|
|
7373
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7374
|
+
* @returns {string | undefined}
|
|
7375
|
+
* @private
|
|
7376
|
+
*/
|
|
7377
|
+
get currentAriaLabel() {
|
|
7378
|
+
if (!this.attributeWatcher) return undefined;
|
|
7379
|
+
|
|
7380
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7381
|
+
return ariaLabel || undefined;
|
|
7382
|
+
}
|
|
7383
|
+
|
|
7384
|
+
/**
|
|
7385
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7386
|
+
* @returns {string | undefined}
|
|
7387
|
+
* @private
|
|
7388
|
+
*/
|
|
7389
|
+
get currentAriaLabelledBy() {
|
|
7390
|
+
if (!this.attributeWatcher) return undefined;
|
|
7391
|
+
|
|
7392
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7393
|
+
return ariaLabelledBy || undefined;
|
|
7394
|
+
}
|
|
7395
|
+
|
|
7396
|
+
/**
|
|
7397
|
+
* Renders the default layout for the button.
|
|
7398
|
+
* @returns {TemplateResult}
|
|
7399
|
+
* @private
|
|
7400
|
+
*/
|
|
7401
|
+
renderLayoutDefault() {
|
|
7049
7402
|
const classes = {
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
7056
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
7057
|
-
'loading': this.loading
|
|
7403
|
+
"util_insetLg--squish": true,
|
|
7404
|
+
"auro-button": true,
|
|
7405
|
+
"icon-only": this.hideText,
|
|
7406
|
+
wrapper: true,
|
|
7407
|
+
loading: this.loading,
|
|
7058
7408
|
};
|
|
7059
7409
|
|
|
7060
7410
|
return html$1`
|
|
7061
7411
|
<button
|
|
7062
7412
|
part="button"
|
|
7063
|
-
aria-
|
|
7064
|
-
aria-
|
|
7065
|
-
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
7066
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
7413
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7414
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7067
7415
|
tabIndex="${ifDefined(this.tIndex)}"
|
|
7068
7416
|
?autofocus="${this.autofocus}"
|
|
7069
7417
|
class="${classMap(classes)}"
|
|
@@ -7080,19 +7428,24 @@ class AuroButton extends LitElement {
|
|
|
7080
7428
|
|
|
7081
7429
|
<span class="contentWrapper">
|
|
7082
7430
|
<span class="textSlot" part="text">
|
|
7083
|
-
|
|
7084
|
-
</span>
|
|
7085
|
-
|
|
7086
|
-
<span part="icon">
|
|
7087
|
-
<slot name="icon"></slot>
|
|
7431
|
+
<slot></slot>
|
|
7088
7432
|
</span>
|
|
7089
7433
|
</span>
|
|
7090
7434
|
</button>
|
|
7091
7435
|
`;
|
|
7092
7436
|
}
|
|
7437
|
+
|
|
7438
|
+
/**
|
|
7439
|
+
* Renders the layout of the button
|
|
7440
|
+
* @returns {TemplateResult}
|
|
7441
|
+
* @private
|
|
7442
|
+
*/
|
|
7443
|
+
renderLayout() {
|
|
7444
|
+
return this.renderLayoutDefault();
|
|
7445
|
+
}
|
|
7093
7446
|
}
|
|
7094
7447
|
|
|
7095
|
-
var buttonVersion = '
|
|
7448
|
+
var buttonVersion = '11.0.0';
|
|
7096
7449
|
|
|
7097
7450
|
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
7098
7451
|
|
|
@@ -7315,7 +7668,7 @@ class AuroInput extends BaseInput {
|
|
|
7315
7668
|
/**
|
|
7316
7669
|
* Generate unique names for dependency components.
|
|
7317
7670
|
*/
|
|
7318
|
-
const versioning = new AuroDependencyVersioning
|
|
7671
|
+
const versioning = new AuroDependencyVersioning();
|
|
7319
7672
|
|
|
7320
7673
|
/**
|
|
7321
7674
|
* @private
|
|
@@ -7360,6 +7713,7 @@ class AuroInput extends BaseInput {
|
|
|
7360
7713
|
*/
|
|
7361
7714
|
get commonLabelClasses() {
|
|
7362
7715
|
return {
|
|
7716
|
+
'is-disabled': this.disabled,
|
|
7363
7717
|
'withValue': this.value && this.value.length > 0,
|
|
7364
7718
|
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7365
7719
|
};
|
|
@@ -7396,11 +7750,23 @@ class AuroInput extends BaseInput {
|
|
|
7396
7750
|
get commonWrapperClasses() {
|
|
7397
7751
|
return {
|
|
7398
7752
|
'wrapper': true,
|
|
7753
|
+
'simple': this.simple,
|
|
7399
7754
|
'withValue': this.value && this.value.length > 0,
|
|
7400
7755
|
'hasFocus': this.hasFocus
|
|
7401
7756
|
};
|
|
7402
7757
|
}
|
|
7403
7758
|
|
|
7759
|
+
/**
|
|
7760
|
+
* Returns classmap configuration for accent elements in each layout.
|
|
7761
|
+
* @private
|
|
7762
|
+
* @returns {object} - Returns classmap.
|
|
7763
|
+
*/
|
|
7764
|
+
get commonAccentClasses() {
|
|
7765
|
+
return {
|
|
7766
|
+
'util_displayHidden': false
|
|
7767
|
+
};
|
|
7768
|
+
}
|
|
7769
|
+
|
|
7404
7770
|
/**
|
|
7405
7771
|
* Returns classmap configuration for helpText elements in each layout.
|
|
7406
7772
|
* @private
|
|
@@ -7423,7 +7789,7 @@ class AuroInput extends BaseInput {
|
|
|
7423
7789
|
*
|
|
7424
7790
|
*/
|
|
7425
7791
|
static register(name = "auro-input") {
|
|
7426
|
-
AuroLibraryRuntimeUtils$
|
|
7792
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroInput);
|
|
7427
7793
|
}
|
|
7428
7794
|
|
|
7429
7795
|
/**
|
|
@@ -7496,28 +7862,33 @@ class AuroInput extends BaseInput {
|
|
|
7496
7862
|
: this.commonInputClasses;
|
|
7497
7863
|
|
|
7498
7864
|
return html$1`
|
|
7499
|
-
<label for=${this.
|
|
7865
|
+
<label for=${this.inputId} class="${classMap(this.commonLabelClasses)}" part="label">
|
|
7500
7866
|
<slot name="label">
|
|
7501
7867
|
${this.label}
|
|
7502
7868
|
</slot>
|
|
7503
7869
|
</label>
|
|
7870
|
+
|
|
7871
|
+
<!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
|
|
7504
7872
|
<input
|
|
7505
7873
|
@blur="${this.handleBlur}"
|
|
7506
7874
|
@focusin="${this.handleFocusin}"
|
|
7507
7875
|
@focusout="${this.handleFocusout}"
|
|
7508
7876
|
@input="${this.handleInput}"
|
|
7877
|
+
.placeholder=${this.placeholderStr}
|
|
7878
|
+
.role=${this.a11yRole}
|
|
7509
7879
|
?activeLabel="${this.activeLabel}"
|
|
7510
7880
|
?disabled="${this.disabled}"
|
|
7511
7881
|
?required="${this.required}"
|
|
7512
|
-
|
|
7882
|
+
aria-controls=${ifDefined(this.a11yControls)}
|
|
7513
7883
|
aria-describedby="${this.uniqueId}"
|
|
7884
|
+
aria-expanded=${ifDefined(this.a11yExpanded)}
|
|
7514
7885
|
aria-invalid="${this.validity !== 'valid'}"
|
|
7515
|
-
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7516
7886
|
autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
|
|
7887
|
+
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7517
7888
|
autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
|
|
7518
7889
|
class="${classMap(inputOverrideClasses)}"
|
|
7519
7890
|
id="${this.inputId}"
|
|
7520
|
-
|
|
7891
|
+
inputmode="${ifDefined(this.inputmode ? this.inputmode : undefined)}"
|
|
7521
7892
|
lang="${ifDefined(this.lang)}"
|
|
7522
7893
|
maxlength="${ifDefined(this.maxLength ? this.maxLength : undefined)}"
|
|
7523
7894
|
minlength="${ifDefined(this.minLength ? this.minLength : undefined)}"
|
|
@@ -7525,7 +7896,8 @@ class AuroInput extends BaseInput {
|
|
|
7525
7896
|
part="input"
|
|
7526
7897
|
pattern="${ifDefined(this.definePattern())}"
|
|
7527
7898
|
spellcheck="${ifDefined(this.spellcheck ? this.spellcheck : undefined)}"
|
|
7528
|
-
type="${this.type ===
|
|
7899
|
+
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
7900
|
+
/>
|
|
7529
7901
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7530
7902
|
<div class="displayValueWrapper">
|
|
7531
7903
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
@@ -7547,11 +7919,12 @@ class AuroInput extends BaseInput {
|
|
|
7547
7919
|
?onDark="${this.onDark}"
|
|
7548
7920
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
7549
7921
|
class="notificationBtn clearBtn"
|
|
7550
|
-
|
|
7551
|
-
|
|
7922
|
+
shape="circle"
|
|
7923
|
+
size="sm"
|
|
7924
|
+
variant="ghost">
|
|
7552
7925
|
<${this.iconTag}
|
|
7926
|
+
?customColor="${this.onDark}"
|
|
7553
7927
|
category="interface"
|
|
7554
|
-
customColor
|
|
7555
7928
|
name="x-lg"
|
|
7556
7929
|
>
|
|
7557
7930
|
</${this.iconTag}>
|
|
@@ -7569,22 +7942,23 @@ class AuroInput extends BaseInput {
|
|
|
7569
7942
|
return html$1`
|
|
7570
7943
|
<div class="notification">
|
|
7571
7944
|
<${this.buttonTag}
|
|
7572
|
-
@click="${this.handleClickShowPassword}
|
|
7945
|
+
@click="${this.handleClickShowPassword}"
|
|
7573
7946
|
?onDark="${this.onDark}"
|
|
7574
|
-
aria-hidden="true"
|
|
7575
7947
|
class="notificationBtn passwordBtn"
|
|
7576
|
-
|
|
7577
|
-
|
|
7948
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
7949
|
+
shape="circle"
|
|
7950
|
+
size="sm"
|
|
7951
|
+
variant="ghost">
|
|
7578
7952
|
<${this.iconTag}
|
|
7953
|
+
?customColor="${this.onDark}"
|
|
7579
7954
|
?hidden=${!this.showPassword}
|
|
7580
7955
|
category="interface"
|
|
7581
|
-
customColor
|
|
7582
7956
|
name="hide-password-stroke">
|
|
7583
7957
|
</${this.iconTag}>
|
|
7584
7958
|
<${this.iconTag}
|
|
7959
|
+
?customColor="${this.onDark}"
|
|
7585
7960
|
?hidden=${this.showPassword}
|
|
7586
7961
|
category="interface"
|
|
7587
|
-
customColor
|
|
7588
7962
|
name="view-password-stroke">
|
|
7589
7963
|
</${this.iconTag}>
|
|
7590
7964
|
</${this.buttonTag}>
|
|
@@ -7664,19 +8038,25 @@ class AuroInput extends BaseInput {
|
|
|
7664
8038
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7665
8039
|
*/
|
|
7666
8040
|
renderLayoutClassic() {
|
|
8041
|
+
const classicClassMap = {
|
|
8042
|
+
...this.commonWrapperClasses,
|
|
8043
|
+
'thin': !this.simple
|
|
8044
|
+
};
|
|
8045
|
+
|
|
7667
8046
|
return html$1`
|
|
7668
8047
|
<div
|
|
7669
8048
|
@click="${this.handleClick}"
|
|
7670
|
-
class="${classMap(
|
|
8049
|
+
class="${classMap(classicClassMap)}"
|
|
7671
8050
|
part="wrapper">
|
|
7672
|
-
<div class="accents left">
|
|
8051
|
+
<div part="accent-left" class="accents left ${classMap(this.commonAccentClasses)}">
|
|
7673
8052
|
${this.renderHtmlTypeIcon()}
|
|
7674
8053
|
</div>
|
|
7675
8054
|
<div class="mainContent">
|
|
7676
8055
|
${this.renderHtmlInput(true)}
|
|
7677
8056
|
</div>
|
|
7678
|
-
<div class="accents right">
|
|
8057
|
+
<div part="accent-right" class="accents right ${classMap(this.commonAccentClasses)}">
|
|
7679
8058
|
${this.renderValidationErrorIconHtml()}
|
|
8059
|
+
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
7680
8060
|
${this.hasValue ? html$1`
|
|
7681
8061
|
${!this.disabled && !this.readonly ? html$1`
|
|
7682
8062
|
${this.renderHtmlActionClear()}
|
|
@@ -7701,7 +8081,7 @@ class AuroInput extends BaseInput {
|
|
|
7701
8081
|
@click="${this.handleClick}"
|
|
7702
8082
|
class="${classMap(this.commonWrapperClasses)}"
|
|
7703
8083
|
part="wrapper">
|
|
7704
|
-
<div class="accents left">
|
|
8084
|
+
<div class="accents left ${this.commonAccentClasses}">
|
|
7705
8085
|
${this.layout.includes('left') ? html$1`
|
|
7706
8086
|
${this.renderValidationErrorIconHtml()}
|
|
7707
8087
|
` : undefined}
|
|
@@ -7709,7 +8089,7 @@ class AuroInput extends BaseInput {
|
|
|
7709
8089
|
<div class="mainContent">
|
|
7710
8090
|
${this.renderHtmlInput()}
|
|
7711
8091
|
</div>
|
|
7712
|
-
<div class="accents right">
|
|
8092
|
+
<div class="accents right ${this.commonAccentClasses}">
|
|
7713
8093
|
${this.layout.includes('right') || this.layout === "emphasized" ? html$1`
|
|
7714
8094
|
${this.renderValidationErrorIconHtml()}
|
|
7715
8095
|
` : undefined}
|