@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.2 → 0.0.0-pr624.21
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 +13 -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 +1292 -79
- package/components/bibtemplate/dist/registered.js +1292 -79
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +8 -9
- package/components/checkbox/demo/api.min.js +30 -24
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +30 -24
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +30 -24
- package/components/checkbox/dist/registered.js +30 -24
- package/components/combobox/demo/api.md +53 -0
- package/components/combobox/demo/api.min.js +2898 -753
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2898 -753
- package/components/combobox/dist/auro-combobox.d.ts +12 -12
- package/components/combobox/dist/index.js +2646 -642
- package/components/combobox/dist/registered.js +2646 -642
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +3648 -929
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +3648 -929
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +105 -6
- package/components/counter/dist/auro-counter.d.ts +6 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +3648 -929
- package/components/counter/dist/registered.js +3648 -929
- package/components/datepicker/demo/api.md +36 -19
- package/components/datepicker/demo/api.min.js +11437 -7744
- package/components/datepicker/demo/index.md +80 -0
- package/components/datepicker/demo/index.min.js +11437 -7744
- package/components/datepicker/dist/auro-datepicker.d.ts +71 -3
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +13847 -10154
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +13847 -10154
- package/components/dropdown/demo/api.md +6 -7
- package/components/dropdown/demo/api.min.js +238 -144
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +238 -144
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -9
- package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
- package/components/dropdown/dist/index.js +238 -144
- package/components/dropdown/dist/registered.js +238 -144
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/index.min.js +1 -1
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/index.js +2 -2
- package/components/helptext/dist/registered.js +2 -2
- package/components/input/demo/api.md +63 -56
- package/components/input/demo/api.min.js +983 -269
- package/components/input/demo/index.min.js +982 -268
- package/components/input/dist/auro-input.d.ts +202 -14
- package/components/input/dist/base-input.d.ts +30 -7
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +982 -268
- package/components/input/dist/registered.js +982 -268
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +68 -7
- package/components/menu/demo/api.min.js +278 -42
- package/components/menu/demo/index.min.js +278 -42
- package/components/menu/dist/auro-menu.d.ts +28 -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 +278 -42
- package/components/menu/dist/registered.js +278 -42
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.md +2 -2
- package/components/radio/demo/api.min.js +10 -7
- package/components/radio/demo/index.min.js +10 -7
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +10 -7
- package/components/radio/dist/registered.js +10 -7
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +78 -12
- package/components/select/demo/api.min.js +2797 -538
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +325 -763
- package/components/select/demo/index.min.js +2790 -543
- package/components/select/dist/auro-select.d.ts +111 -11
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +2533 -427
- package/components/select/dist/registered.js +2533 -427
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +6 -4
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibStyles-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default/style-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
|
@@ -4,25 +4,25 @@ 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`.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-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-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-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-pill-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
|
-
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}
|
|
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
|
|
|
13
|
-
var colorBaseCss = css`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{color:var(--ds-auro-input-
|
|
13
|
+
var colorBaseCss = css`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}.wrapper input::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper .displayValue{background-color:var(--ds-auro-input-background-color)}:host(:not([ondark])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host(:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
14
14
|
|
|
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-
|
|
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-basic-color-status-error-subtle, #fbc6c6);--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-direction:column;justify-content:center;
|
|
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
|
-
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-
|
|
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-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-input-outline-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
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`: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
|
/**
|
|
@@ -4043,9 +4047,10 @@ class DateFormatter {
|
|
|
4043
4047
|
/**
|
|
4044
4048
|
* Convert a date object to string format.
|
|
4045
4049
|
* @param {Object} date - Date to convert to string.
|
|
4046
|
-
* @
|
|
4050
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
4051
|
+
* @returns {String} Returns the date as a string.
|
|
4047
4052
|
*/
|
|
4048
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
4053
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
4049
4054
|
year: "numeric",
|
|
4050
4055
|
month: "2-digit",
|
|
4051
4056
|
day: "2-digit",
|
|
@@ -4237,7 +4242,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
4237
4242
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
4238
4243
|
|
|
4239
4244
|
// Get the date string of the date object we created from the string date
|
|
4240
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
4245
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
4241
4246
|
|
|
4242
4247
|
// Guard Clause: Generated date matches date string input
|
|
4243
4248
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -4402,7 +4407,7 @@ const {
|
|
|
4402
4407
|
|
|
4403
4408
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4404
4409
|
|
|
4405
|
-
let AuroLibraryRuntimeUtils$
|
|
4410
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
4406
4411
|
|
|
4407
4412
|
/* eslint-disable jsdoc/require-param */
|
|
4408
4413
|
|
|
@@ -4472,7 +4477,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
4472
4477
|
class AuroFormValidation {
|
|
4473
4478
|
|
|
4474
4479
|
constructor() {
|
|
4475
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4480
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
4476
4481
|
}
|
|
4477
4482
|
|
|
4478
4483
|
/**
|
|
@@ -4751,7 +4756,9 @@ class AuroFormValidation {
|
|
|
4751
4756
|
elem.validity = this.auroInputElements[0].validity;
|
|
4752
4757
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
4753
4758
|
|
|
4754
|
-
|
|
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) {
|
|
4755
4762
|
elem.validity = this.auroInputElements[1].validity;
|
|
4756
4763
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
4757
4764
|
}
|
|
@@ -4831,7 +4838,7 @@ class AuroFormValidation {
|
|
|
4831
4838
|
}
|
|
4832
4839
|
}
|
|
4833
4840
|
|
|
4834
|
-
let AuroElement$
|
|
4841
|
+
let AuroElement$2 = class AuroElement extends LitElement {
|
|
4835
4842
|
static get properties() {
|
|
4836
4843
|
return {
|
|
4837
4844
|
|
|
@@ -4866,18 +4873,21 @@ let AuroElement$1 = class AuroElement extends LitElement {
|
|
|
4866
4873
|
}
|
|
4867
4874
|
|
|
4868
4875
|
resetShapeClasses() {
|
|
4869
|
-
|
|
4870
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4876
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4871
4877
|
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
+
if (wrapper) {
|
|
4879
|
+
wrapper.classList.forEach((className) => {
|
|
4880
|
+
if (className.startsWith('shape-')) {
|
|
4881
|
+
wrapper.classList.remove(className);
|
|
4882
|
+
}
|
|
4883
|
+
});
|
|
4878
4884
|
|
|
4879
|
-
|
|
4880
|
-
|
|
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');
|
|
4881
4891
|
}
|
|
4882
4892
|
}
|
|
4883
4893
|
|
|
@@ -4935,17 +4945,21 @@ let AuroElement$1 = class AuroElement extends LitElement {
|
|
|
4935
4945
|
*
|
|
4936
4946
|
* @slot helptext - Sets the help text displayed below the input.
|
|
4937
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.
|
|
4938
4949
|
*
|
|
4939
4950
|
* @csspart wrapper - Use for customizing the style of the root element
|
|
4940
4951
|
* @csspart label - Use for customizing the style of the label element
|
|
4941
4952
|
* @csspart helpText - Use for customizing the style of the helpText element
|
|
4953
|
+
* @csspart input - Use for customizing the style of the input element
|
|
4942
4954
|
* @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
|
|
4943
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)
|
|
4944
4958
|
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
4945
4959
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
4946
4960
|
*/
|
|
4947
4961
|
|
|
4948
|
-
class BaseInput extends AuroElement$
|
|
4962
|
+
class BaseInput extends AuroElement$2 {
|
|
4949
4963
|
|
|
4950
4964
|
constructor() {
|
|
4951
4965
|
super();
|
|
@@ -5038,7 +5052,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5038
5052
|
*/
|
|
5039
5053
|
a11yRole: {
|
|
5040
5054
|
type: String,
|
|
5041
|
-
attribute: true,
|
|
5042
5055
|
reflect: true
|
|
5043
5056
|
},
|
|
5044
5057
|
|
|
@@ -5047,7 +5060,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5047
5060
|
*/
|
|
5048
5061
|
a11yExpanded: {
|
|
5049
5062
|
type: Boolean,
|
|
5050
|
-
attribute: true,
|
|
5051
5063
|
reflect: true
|
|
5052
5064
|
},
|
|
5053
5065
|
|
|
@@ -5056,7 +5068,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5056
5068
|
*/
|
|
5057
5069
|
a11yControls: {
|
|
5058
5070
|
type: String,
|
|
5059
|
-
attribute: true,
|
|
5060
5071
|
reflect: true
|
|
5061
5072
|
},
|
|
5062
5073
|
|
|
@@ -5072,7 +5083,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5072
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].
|
|
5073
5084
|
*/
|
|
5074
5085
|
autocapitalize: {
|
|
5075
|
-
type: String
|
|
5086
|
+
type: String,
|
|
5087
|
+
reflect: true
|
|
5076
5088
|
},
|
|
5077
5089
|
|
|
5078
5090
|
/**
|
|
@@ -5087,7 +5099,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5087
5099
|
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
5088
5100
|
*/
|
|
5089
5101
|
autocorrect: {
|
|
5090
|
-
type: String
|
|
5102
|
+
type: String,
|
|
5103
|
+
reflect: true
|
|
5091
5104
|
},
|
|
5092
5105
|
|
|
5093
5106
|
/**
|
|
@@ -5132,7 +5145,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5132
5145
|
/** Exposes inputmode attribute for input. */
|
|
5133
5146
|
inputmode: {
|
|
5134
5147
|
type: String,
|
|
5135
|
-
attribute: true,
|
|
5136
5148
|
reflect: true
|
|
5137
5149
|
},
|
|
5138
5150
|
|
|
@@ -5140,7 +5152,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5140
5152
|
* Defines the language of an element.
|
|
5141
5153
|
*/
|
|
5142
5154
|
lang: {
|
|
5143
|
-
type: String
|
|
5155
|
+
type: String,
|
|
5156
|
+
reflect: true
|
|
5144
5157
|
},
|
|
5145
5158
|
|
|
5146
5159
|
/**
|
|
@@ -5154,7 +5167,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5154
5167
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5155
5168
|
*/
|
|
5156
5169
|
maxLength: {
|
|
5157
|
-
type: Number
|
|
5170
|
+
type: Number,
|
|
5171
|
+
reflect: true
|
|
5158
5172
|
},
|
|
5159
5173
|
|
|
5160
5174
|
/**
|
|
@@ -5168,14 +5182,25 @@ class BaseInput extends AuroElement$1 {
|
|
|
5168
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`.
|
|
5169
5183
|
*/
|
|
5170
5184
|
minLength: {
|
|
5171
|
-
type: Number
|
|
5185
|
+
type: Number,
|
|
5186
|
+
reflect: true
|
|
5172
5187
|
},
|
|
5173
5188
|
|
|
5174
5189
|
/**
|
|
5175
5190
|
* Populates the `name` attribute on the input.
|
|
5176
5191
|
*/
|
|
5177
5192
|
name: {
|
|
5178
|
-
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
|
|
5179
5204
|
},
|
|
5180
5205
|
|
|
5181
5206
|
/**
|
|
@@ -5206,7 +5231,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5206
5231
|
* Define custom placeholder text, only supported by date input formats.
|
|
5207
5232
|
*/
|
|
5208
5233
|
placeholder: {
|
|
5209
|
-
type: String
|
|
5234
|
+
type: String,
|
|
5235
|
+
reflect: true
|
|
5210
5236
|
},
|
|
5211
5237
|
|
|
5212
5238
|
/**
|
|
@@ -5295,6 +5321,14 @@ class BaseInput extends AuroElement$1 {
|
|
|
5295
5321
|
type: String
|
|
5296
5322
|
},
|
|
5297
5323
|
|
|
5324
|
+
/**
|
|
5325
|
+
* Simple makes the input render without a border.
|
|
5326
|
+
*/
|
|
5327
|
+
simple: {
|
|
5328
|
+
type: Boolean,
|
|
5329
|
+
reflect: true
|
|
5330
|
+
},
|
|
5331
|
+
|
|
5298
5332
|
/**
|
|
5299
5333
|
* Custom help text message for email type validity.
|
|
5300
5334
|
*/
|
|
@@ -5306,7 +5340,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5306
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`.
|
|
5307
5341
|
*/
|
|
5308
5342
|
spellcheck: {
|
|
5309
|
-
type: String
|
|
5343
|
+
type: String,
|
|
5344
|
+
reflect: true
|
|
5310
5345
|
},
|
|
5311
5346
|
|
|
5312
5347
|
/**
|
|
@@ -5321,7 +5356,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5321
5356
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5322
5357
|
*/
|
|
5323
5358
|
value: {
|
|
5324
|
-
type: String
|
|
5359
|
+
type: String,
|
|
5360
|
+
reflect: true
|
|
5325
5361
|
},
|
|
5326
5362
|
|
|
5327
5363
|
/**
|
|
@@ -5352,8 +5388,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5352
5388
|
},
|
|
5353
5389
|
|
|
5354
5390
|
/**
|
|
5391
|
+
* The id for input node.
|
|
5355
5392
|
* @private
|
|
5356
|
-
* id for input node
|
|
5357
5393
|
*/
|
|
5358
5394
|
inputId: {
|
|
5359
5395
|
type: String,
|
|
@@ -5601,7 +5637,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5601
5637
|
|
|
5602
5638
|
/**
|
|
5603
5639
|
* Function to set element focus.
|
|
5604
|
-
* @private
|
|
5605
5640
|
* @return {void}
|
|
5606
5641
|
*/
|
|
5607
5642
|
focus() {
|
|
@@ -5799,28 +5834,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
5799
5834
|
* @returns {void}
|
|
5800
5835
|
*/
|
|
5801
5836
|
getPlaceholder() {
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
// console.warn(this.getActiveElement());
|
|
5807
|
-
|
|
5808
|
-
if (!isFocused) {
|
|
5809
|
-
if (this.placeholder) {
|
|
5810
|
-
this.placeholderStr = this.placeholder;
|
|
5811
|
-
// return this.placeholder;
|
|
5812
|
-
} else if (this.type === 'date') {
|
|
5813
|
-
this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5814
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5815
|
-
}
|
|
5816
|
-
} else {
|
|
5817
|
-
this.placeholderStr = '';
|
|
5837
|
+
if (this.placeholder) {
|
|
5838
|
+
this.placeholderStr = this.placeholder;
|
|
5839
|
+
} else if (this.type === 'date') {
|
|
5840
|
+
this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5818
5841
|
}
|
|
5819
5842
|
|
|
5820
5843
|
this.requestUpdate();
|
|
5821
5844
|
|
|
5822
|
-
|
|
5823
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5845
|
+
return this.placeholderStr;
|
|
5824
5846
|
}
|
|
5825
5847
|
|
|
5826
5848
|
/**
|
|
@@ -6033,7 +6055,7 @@ class AuroDependencyVersioning {
|
|
|
6033
6055
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6034
6056
|
*/
|
|
6035
6057
|
|
|
6036
|
-
class AuroElement extends LitElement {
|
|
6058
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
6037
6059
|
|
|
6038
6060
|
// function to define props used within the scope of this component
|
|
6039
6061
|
static get properties() {
|
|
@@ -6057,7 +6079,7 @@ class AuroElement extends LitElement {
|
|
|
6057
6079
|
|
|
6058
6080
|
return 'false'
|
|
6059
6081
|
}
|
|
6060
|
-
}
|
|
6082
|
+
};
|
|
6061
6083
|
|
|
6062
6084
|
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>"};
|
|
6063
6085
|
|
|
@@ -6101,7 +6123,7 @@ var styleCss$3 = css`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
6101
6123
|
*/
|
|
6102
6124
|
|
|
6103
6125
|
// build the component class
|
|
6104
|
-
class BaseIcon extends AuroElement {
|
|
6126
|
+
class BaseIcon extends AuroElement$1 {
|
|
6105
6127
|
constructor() {
|
|
6106
6128
|
super();
|
|
6107
6129
|
this.onDark = false;
|
|
@@ -6177,6 +6199,76 @@ var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
6177
6199
|
|
|
6178
6200
|
var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
6179
6201
|
|
|
6202
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6203
|
+
// See LICENSE in the project root for license information.
|
|
6204
|
+
|
|
6205
|
+
// ---------------------------------------------------------------------
|
|
6206
|
+
|
|
6207
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6208
|
+
|
|
6209
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6210
|
+
|
|
6211
|
+
/* eslint-disable jsdoc/require-param */
|
|
6212
|
+
|
|
6213
|
+
/**
|
|
6214
|
+
* This will register a new custom element with the browser.
|
|
6215
|
+
* @param {String} name - The name of the custom element.
|
|
6216
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6217
|
+
* @returns {void}
|
|
6218
|
+
*/
|
|
6219
|
+
registerComponent(name, componentClass) {
|
|
6220
|
+
if (!customElements.get(name)) {
|
|
6221
|
+
customElements.define(name, class extends componentClass {});
|
|
6222
|
+
}
|
|
6223
|
+
}
|
|
6224
|
+
|
|
6225
|
+
/**
|
|
6226
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6227
|
+
* @returns {void}
|
|
6228
|
+
*/
|
|
6229
|
+
closestElement(
|
|
6230
|
+
selector, // selector like in .closest()
|
|
6231
|
+
base = this, // extra functionality to skip a parent
|
|
6232
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6233
|
+
!el || el === document || el === window
|
|
6234
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6235
|
+
: found
|
|
6236
|
+
? found // found a selector INside this element
|
|
6237
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6238
|
+
) {
|
|
6239
|
+
return __Closest(base);
|
|
6240
|
+
}
|
|
6241
|
+
/* eslint-enable jsdoc/require-param */
|
|
6242
|
+
|
|
6243
|
+
/**
|
|
6244
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
6245
|
+
* @param {Object} elem - The element to check.
|
|
6246
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6247
|
+
* @returns {void}
|
|
6248
|
+
*/
|
|
6249
|
+
handleComponentTagRename(elem, tagName) {
|
|
6250
|
+
const tag = tagName.toLowerCase();
|
|
6251
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6252
|
+
|
|
6253
|
+
if (elemTag !== tag) {
|
|
6254
|
+
elem.setAttribute(tag, true);
|
|
6255
|
+
}
|
|
6256
|
+
}
|
|
6257
|
+
|
|
6258
|
+
/**
|
|
6259
|
+
* Validates if an element is a specific Auro component.
|
|
6260
|
+
* @param {Object} elem - The element to validate.
|
|
6261
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6262
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6263
|
+
*/
|
|
6264
|
+
elementMatch(elem, tagName) {
|
|
6265
|
+
const tag = tagName.toLowerCase();
|
|
6266
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6267
|
+
|
|
6268
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6269
|
+
}
|
|
6270
|
+
};
|
|
6271
|
+
|
|
6180
6272
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6181
6273
|
// See LICENSE in the project root for license information.
|
|
6182
6274
|
|
|
@@ -6196,7 +6288,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6196
6288
|
*/
|
|
6197
6289
|
privateDefaults() {
|
|
6198
6290
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
6199
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6291
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6200
6292
|
}
|
|
6201
6293
|
|
|
6202
6294
|
// function to define props used within the scope of this component
|
|
@@ -6278,7 +6370,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6278
6370
|
*
|
|
6279
6371
|
*/
|
|
6280
6372
|
static register(name = "auro-icon") {
|
|
6281
|
-
AuroLibraryRuntimeUtils$
|
|
6373
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
6282
6374
|
}
|
|
6283
6375
|
|
|
6284
6376
|
connectedCallback() {
|
|
@@ -6299,8 +6391,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6299
6391
|
async firstUpdated() {
|
|
6300
6392
|
await super.firstUpdated();
|
|
6301
6393
|
|
|
6302
|
-
|
|
6303
|
-
|
|
6394
|
+
/**
|
|
6395
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6396
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6397
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6398
|
+
*/
|
|
6399
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6304
6400
|
const svgDesc = this.svg.querySelector('desc');
|
|
6305
6401
|
|
|
6306
6402
|
if (svgDesc) {
|
|
@@ -6344,80 +6440,617 @@ class AuroIcon extends BaseIcon {
|
|
|
6344
6440
|
}
|
|
6345
6441
|
}
|
|
6346
6442
|
|
|
6347
|
-
var iconVersion = '8.0.
|
|
6443
|
+
var iconVersion = '8.0.4';
|
|
6348
6444
|
|
|
6349
|
-
|
|
6445
|
+
/**
|
|
6446
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6447
|
+
*/
|
|
6448
|
+
const _observers = new WeakMap();
|
|
6350
6449
|
|
|
6351
|
-
|
|
6450
|
+
/**
|
|
6451
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6452
|
+
* Structure: {
|
|
6453
|
+
* host: {
|
|
6454
|
+
* matchers: Set<Function>,
|
|
6455
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6456
|
+
* }
|
|
6457
|
+
* }
|
|
6458
|
+
*/
|
|
6459
|
+
const _transportConfig = new WeakMap();
|
|
6352
6460
|
|
|
6353
|
-
|
|
6461
|
+
/**
|
|
6462
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6463
|
+
*
|
|
6464
|
+
* @param {Object} params - The parameters for the function.
|
|
6465
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6466
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6467
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6468
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6469
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6470
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6471
|
+
*/
|
|
6472
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
6473
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
6474
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
6475
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
6476
|
+
}
|
|
6354
6477
|
|
|
6355
|
-
|
|
6478
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
6479
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
6480
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
6481
|
+
}
|
|
6356
6482
|
|
|
6357
|
-
|
|
6483
|
+
// Guard Clause: Ensure match is a function
|
|
6484
|
+
if (typeof match !== 'function') {
|
|
6485
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
6486
|
+
}
|
|
6358
6487
|
|
|
6359
|
-
|
|
6488
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
6489
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
6490
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
6491
|
+
}
|
|
6492
|
+
|
|
6493
|
+
// Register this transport and get cleanup function
|
|
6494
|
+
return _registerTransport({
|
|
6495
|
+
host,
|
|
6496
|
+
target,
|
|
6497
|
+
matcher: match,
|
|
6498
|
+
removeOriginal
|
|
6499
|
+
});
|
|
6500
|
+
};
|
|
6360
6501
|
|
|
6361
|
-
|
|
6362
|
-
|
|
6502
|
+
/**
|
|
6503
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
6504
|
+
*
|
|
6505
|
+
* @param {Object} params - The parameters object.
|
|
6506
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
6507
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
6508
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
6509
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
6510
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
6511
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
6512
|
+
* @private
|
|
6513
|
+
*/
|
|
6514
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6515
|
+
// Initialize config for this host if it doesn't exist
|
|
6516
|
+
if (!_transportConfig.has(host)) {
|
|
6517
|
+
_transportConfig.set(host, {
|
|
6518
|
+
matchers: new Set(),
|
|
6519
|
+
targets: new Map()
|
|
6520
|
+
});
|
|
6521
|
+
}
|
|
6363
6522
|
|
|
6523
|
+
const config = _transportConfig.get(host);
|
|
6524
|
+
|
|
6525
|
+
// Add the matcher to the set of matchers for this host
|
|
6526
|
+
config.matchers.add(matcher);
|
|
6527
|
+
|
|
6528
|
+
// Initialize target entry if it doesn't exist
|
|
6529
|
+
if (!config.targets.has(target)) {
|
|
6530
|
+
config.targets.set(target, new Map());
|
|
6531
|
+
}
|
|
6532
|
+
|
|
6533
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
6534
|
+
config.targets.get(target).set(matcher, {
|
|
6535
|
+
removeOriginal,
|
|
6536
|
+
currentAttributes: new Map()
|
|
6537
|
+
});
|
|
6538
|
+
|
|
6539
|
+
// Perform initial attribute transport
|
|
6540
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
6541
|
+
|
|
6542
|
+
// Attach observer
|
|
6543
|
+
_attachObserver(host);
|
|
6544
|
+
|
|
6545
|
+
// Return cleanup function and utility functions
|
|
6546
|
+
return {
|
|
6547
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
6548
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
6549
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
6550
|
+
}
|
|
6551
|
+
};
|
|
6364
6552
|
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6553
|
+
/**
|
|
6554
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
6555
|
+
*
|
|
6556
|
+
* @param {HTMLElement} host - The host element
|
|
6557
|
+
* @param {HTMLElement} target - The target element
|
|
6558
|
+
* @param {Function} matcher - The matcher function
|
|
6559
|
+
* @private
|
|
6560
|
+
*/
|
|
6561
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
6562
|
+
const config = _transportConfig.get(host);
|
|
6563
|
+
if (!config) return;
|
|
6564
|
+
|
|
6565
|
+
// Remove this matcher from this target
|
|
6566
|
+
const targetMatchers = config.targets.get(target);
|
|
6567
|
+
if (targetMatchers) {
|
|
6568
|
+
targetMatchers.delete(matcher);
|
|
6569
|
+
|
|
6570
|
+
// If this target has no more matchers, remove it
|
|
6571
|
+
if (targetMatchers.size === 0) {
|
|
6572
|
+
config.targets.delete(target);
|
|
6573
|
+
}
|
|
6574
|
+
}
|
|
6575
|
+
|
|
6576
|
+
// Check if this matcher is still used by any target
|
|
6577
|
+
let matcherStillUsed = false;
|
|
6578
|
+
for (const matcherMap of config.targets.values()) {
|
|
6579
|
+
if (matcherMap.has(matcher)) {
|
|
6580
|
+
matcherStillUsed = true;
|
|
6581
|
+
break;
|
|
6582
|
+
}
|
|
6583
|
+
}
|
|
6584
|
+
|
|
6585
|
+
// If not used anymore, remove from matchers set
|
|
6586
|
+
if (!matcherStillUsed) {
|
|
6587
|
+
config.matchers.delete(matcher);
|
|
6588
|
+
}
|
|
6589
|
+
|
|
6590
|
+
// If no more targets or matchers, detach observer
|
|
6591
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
6592
|
+
_detachObserver(host);
|
|
6593
|
+
}
|
|
6594
|
+
};
|
|
6368
6595
|
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6596
|
+
/**
|
|
6597
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
6598
|
+
*
|
|
6599
|
+
* @param {Object} params - The parameters object.
|
|
6600
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
6601
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6602
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
6603
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
6604
|
+
* @returns {void}
|
|
6605
|
+
* @private
|
|
6606
|
+
*/
|
|
6607
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6608
|
+
// Get a list of all matching attributes on the host element and their values
|
|
6609
|
+
const matchingAttributes = host.getAttributeNames()
|
|
6610
|
+
.filter(attr => matcher(attr))
|
|
6611
|
+
.reduce((acc, attr) => {
|
|
6612
|
+
acc[attr] = host.getAttribute(attr);
|
|
6613
|
+
return acc;
|
|
6614
|
+
}, {});
|
|
6615
|
+
|
|
6616
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
6617
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
6618
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
6619
|
+
target.setAttribute(key, value);
|
|
6620
|
+
if (removeOriginal) {
|
|
6621
|
+
host.removeAttribute(key);
|
|
6622
|
+
}
|
|
6623
|
+
});
|
|
6624
|
+
};
|
|
6373
6625
|
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6626
|
+
/**
|
|
6627
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
6628
|
+
*
|
|
6629
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
6630
|
+
* @returns {MutationObserver} The observer instance.
|
|
6631
|
+
* @private
|
|
6632
|
+
*/
|
|
6633
|
+
const _attachObserver = (host) => {
|
|
6634
|
+
// If an observer for this host already exists, return it
|
|
6635
|
+
if (_observers.has(host)) {
|
|
6636
|
+
return _observers.get(host);
|
|
6637
|
+
}
|
|
6638
|
+
|
|
6639
|
+
// Create a new MutationObserver
|
|
6640
|
+
const observer = new MutationObserver((mutations) => {
|
|
6641
|
+
const config = _transportConfig.get(host);
|
|
6642
|
+
if (!config) return;
|
|
6643
|
+
|
|
6644
|
+
// For each mutation affecting attributes
|
|
6645
|
+
mutations
|
|
6646
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
6647
|
+
.forEach(mutation => {
|
|
6648
|
+
const attributeName = mutation.attributeName;
|
|
6649
|
+
|
|
6650
|
+
// Find matchers that care about this attribute
|
|
6651
|
+
for (const matcher of config.matchers) {
|
|
6652
|
+
if (matcher(attributeName)) {
|
|
6653
|
+
// For each target that uses this matcher
|
|
6654
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
6655
|
+
if (matcherConfigs.has(matcher)) {
|
|
6656
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
6657
|
+
_transportAttributes({
|
|
6658
|
+
host,
|
|
6659
|
+
target,
|
|
6660
|
+
matcher,
|
|
6661
|
+
removeOriginal
|
|
6662
|
+
});
|
|
6663
|
+
}
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
});
|
|
6668
|
+
});
|
|
6378
6669
|
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6670
|
+
// Start observing attribute changes
|
|
6671
|
+
observer.observe(host, { attributes: true });
|
|
6672
|
+
|
|
6673
|
+
// Store the observer
|
|
6674
|
+
_observers.set(host, observer);
|
|
6675
|
+
|
|
6676
|
+
return observer;
|
|
6677
|
+
};
|
|
6383
6678
|
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6679
|
+
/**
|
|
6680
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
6681
|
+
*
|
|
6682
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
6683
|
+
* @private
|
|
6684
|
+
*/
|
|
6685
|
+
const _detachObserver = (host) => {
|
|
6686
|
+
if (_observers.has(host)) {
|
|
6687
|
+
const observer = _observers.get(host);
|
|
6688
|
+
observer.disconnect();
|
|
6689
|
+
_observers.delete(host);
|
|
6690
|
+
}
|
|
6691
|
+
|
|
6692
|
+
// Clean up the transport config as well
|
|
6693
|
+
if (_transportConfig.has(host)) {
|
|
6694
|
+
_transportConfig.delete(host);
|
|
6695
|
+
}
|
|
6696
|
+
};
|
|
6388
6697
|
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6698
|
+
/**
|
|
6699
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
6700
|
+
* @param {HTMLElement} host - The host element
|
|
6701
|
+
* @param {HTMLElement} target - The target element
|
|
6702
|
+
* @param {Function} matcher - The matcher function
|
|
6703
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
6704
|
+
* @private
|
|
6705
|
+
*/
|
|
6706
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
6707
|
+
const config = _transportConfig.get(host);
|
|
6708
|
+
if (!config) return undefined;
|
|
6709
|
+
|
|
6710
|
+
const targetMatchers = config.targets.get(target);
|
|
6711
|
+
if (!targetMatchers) return undefined;
|
|
6712
|
+
|
|
6713
|
+
return targetMatchers.get(matcher);
|
|
6714
|
+
};
|
|
6715
|
+
|
|
6716
|
+
/**
|
|
6717
|
+
* Sets an observed attribute value
|
|
6718
|
+
* @param {HTMLElement} host - The host element
|
|
6719
|
+
* @param {HTMLElement} target - The target element
|
|
6720
|
+
* @param {Function} matcher - The matcher function
|
|
6721
|
+
* @param {string} key - The attribute name
|
|
6722
|
+
* @param {string} value - The attribute value
|
|
6723
|
+
* @private
|
|
6724
|
+
*/
|
|
6725
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
6726
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6727
|
+
if (matcherConfig) {
|
|
6728
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
6393
6729
|
}
|
|
6730
|
+
};
|
|
6731
|
+
|
|
6732
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
6733
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6734
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
6735
|
+
return undefined;
|
|
6736
|
+
};
|
|
6737
|
+
|
|
6738
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
6739
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6740
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
6741
|
+
return [];
|
|
6742
|
+
};
|
|
6743
|
+
|
|
6744
|
+
const _matchers = {
|
|
6745
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
6746
|
+
'role': attr => attr.match(/^role$/)
|
|
6747
|
+
};
|
|
6748
|
+
|
|
6749
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
6750
|
+
return transportAttributes({
|
|
6751
|
+
host,
|
|
6752
|
+
target,
|
|
6753
|
+
match: attr => {
|
|
6754
|
+
for (const key in _matchers) {
|
|
6755
|
+
if (_matchers[key](attr)) return true;
|
|
6756
|
+
}
|
|
6757
|
+
return false;
|
|
6758
|
+
},
|
|
6759
|
+
removeOriginal
|
|
6760
|
+
});
|
|
6761
|
+
};
|
|
6762
|
+
|
|
6763
|
+
class AuroElement extends LitElement {
|
|
6764
|
+
|
|
6765
|
+
/**
|
|
6766
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
6767
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
6768
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
6769
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
6770
|
+
* @private
|
|
6771
|
+
*/
|
|
6772
|
+
attributeWatcher;
|
|
6394
6773
|
|
|
6395
|
-
// function to define props used within the scope of this component
|
|
6396
6774
|
static get properties() {
|
|
6397
6775
|
return {
|
|
6398
6776
|
|
|
6399
6777
|
/**
|
|
6400
|
-
*
|
|
6778
|
+
* Defines the layout of an element.
|
|
6779
|
+
* @default {'default'}
|
|
6401
6780
|
*/
|
|
6402
|
-
|
|
6403
|
-
type:
|
|
6781
|
+
layout: {
|
|
6782
|
+
type: String,
|
|
6783
|
+
attribute: "layout",
|
|
6404
6784
|
reflect: true
|
|
6405
6785
|
},
|
|
6406
|
-
|
|
6786
|
+
|
|
6407
6787
|
/**
|
|
6408
|
-
*
|
|
6788
|
+
* Defines the shape of an element.
|
|
6789
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
6790
|
+
* @default {'default'}
|
|
6409
6791
|
*/
|
|
6410
|
-
|
|
6411
|
-
type:
|
|
6792
|
+
shape: {
|
|
6793
|
+
type: String,
|
|
6794
|
+
attribute: "shape",
|
|
6412
6795
|
reflect: true
|
|
6413
6796
|
},
|
|
6414
6797
|
|
|
6415
6798
|
/**
|
|
6416
|
-
*
|
|
6799
|
+
* Defines the size of an element.
|
|
6800
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
6801
|
+
* @default {'md'}
|
|
6417
6802
|
*/
|
|
6418
|
-
|
|
6419
|
-
type:
|
|
6420
|
-
|
|
6803
|
+
size: {
|
|
6804
|
+
type: String,
|
|
6805
|
+
attribute: "size",
|
|
6806
|
+
reflect: true
|
|
6807
|
+
},
|
|
6808
|
+
|
|
6809
|
+
/**
|
|
6810
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
6811
|
+
* @default {false}
|
|
6812
|
+
*/
|
|
6813
|
+
onDark: {
|
|
6814
|
+
type: Boolean,
|
|
6815
|
+
attribute: "ondark",
|
|
6816
|
+
reflect: true
|
|
6817
|
+
},
|
|
6818
|
+
|
|
6819
|
+
/**
|
|
6820
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
6821
|
+
* This is used to apply layout and shape classes dynamically.
|
|
6822
|
+
* @type {HTMLElement|null}
|
|
6823
|
+
* @default {null}
|
|
6824
|
+
* @private
|
|
6825
|
+
*/
|
|
6826
|
+
wrapper: {
|
|
6827
|
+
attribute: false,
|
|
6828
|
+
reflect: false
|
|
6829
|
+
}
|
|
6830
|
+
};
|
|
6831
|
+
}
|
|
6832
|
+
|
|
6833
|
+
|
|
6834
|
+
|
|
6835
|
+
resetShapeClasses() {
|
|
6836
|
+
if (this.shape && this.size) {
|
|
6837
|
+
|
|
6838
|
+
if (this.wrapper) {
|
|
6839
|
+
this.wrapper.classList.forEach((className) => {
|
|
6840
|
+
if (className.startsWith('shape-')) {
|
|
6841
|
+
this.wrapper.classList.remove(className);
|
|
6842
|
+
}
|
|
6843
|
+
});
|
|
6844
|
+
|
|
6845
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6846
|
+
}
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6849
|
+
|
|
6850
|
+
resetLayoutClasses() {
|
|
6851
|
+
if (this.layout) {
|
|
6852
|
+
if (this.wrapper) {
|
|
6853
|
+
this.wrapper.classList.forEach((className) => {
|
|
6854
|
+
if (className.startsWith('layout-')) {
|
|
6855
|
+
this.wrapper.classList.remove(className);
|
|
6856
|
+
}
|
|
6857
|
+
});
|
|
6858
|
+
|
|
6859
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6860
|
+
}
|
|
6861
|
+
}
|
|
6862
|
+
}
|
|
6863
|
+
|
|
6864
|
+
updateComponentArchitecture() {
|
|
6865
|
+
this.resetLayoutClasses();
|
|
6866
|
+
this.resetShapeClasses();
|
|
6867
|
+
}
|
|
6868
|
+
|
|
6869
|
+
updated(changedProperties) {
|
|
6870
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6871
|
+
this.updateComponentArchitecture();
|
|
6872
|
+
}
|
|
6873
|
+
}
|
|
6874
|
+
|
|
6875
|
+
firstUpdated() {
|
|
6876
|
+
super.firstUpdated();
|
|
6877
|
+
|
|
6878
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6879
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6880
|
+
|
|
6881
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6882
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6883
|
+
}
|
|
6884
|
+
|
|
6885
|
+
disconnectedCallback() {
|
|
6886
|
+
super.disconnectedCallback();
|
|
6887
|
+
|
|
6888
|
+
// Cleanup the ARIA observer if it exists
|
|
6889
|
+
if (this.attributeWatcher) {
|
|
6890
|
+
this.attributeWatcher.cleanup();
|
|
6891
|
+
this.attributeWatcher = null;
|
|
6892
|
+
}
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6896
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6897
|
+
render() {
|
|
6898
|
+
try {
|
|
6899
|
+
return this.renderLayout();
|
|
6900
|
+
} catch (error) {
|
|
6901
|
+
// failed to get the defined layout
|
|
6902
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6903
|
+
|
|
6904
|
+
// fallback to the default layout
|
|
6905
|
+
return this.getLayout('default');
|
|
6906
|
+
}
|
|
6907
|
+
}
|
|
6908
|
+
}
|
|
6909
|
+
|
|
6910
|
+
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}`;
|
|
6911
|
+
|
|
6912
|
+
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)}`;
|
|
6913
|
+
|
|
6914
|
+
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}`;
|
|
6915
|
+
|
|
6916
|
+
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}`;
|
|
6917
|
+
|
|
6918
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6919
|
+
// See LICENSE in the project root for license information.
|
|
6920
|
+
|
|
6921
|
+
// ---------------------------------------------------------------------
|
|
6922
|
+
|
|
6923
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6924
|
+
|
|
6925
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6926
|
+
|
|
6927
|
+
/* eslint-disable jsdoc/require-param */
|
|
6928
|
+
|
|
6929
|
+
/**
|
|
6930
|
+
* This will register a new custom element with the browser.
|
|
6931
|
+
* @param {String} name - The name of the custom element.
|
|
6932
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6933
|
+
* @returns {void}
|
|
6934
|
+
*/
|
|
6935
|
+
registerComponent(name, componentClass) {
|
|
6936
|
+
if (!customElements.get(name)) {
|
|
6937
|
+
customElements.define(name, class extends componentClass {});
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6941
|
+
/**
|
|
6942
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6943
|
+
* @returns {void}
|
|
6944
|
+
*/
|
|
6945
|
+
closestElement(
|
|
6946
|
+
selector, // selector like in .closest()
|
|
6947
|
+
base = this, // extra functionality to skip a parent
|
|
6948
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6949
|
+
!el || el === document || el === window
|
|
6950
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6951
|
+
: found
|
|
6952
|
+
? found // found a selector INside this element
|
|
6953
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6954
|
+
) {
|
|
6955
|
+
return __Closest(base);
|
|
6956
|
+
}
|
|
6957
|
+
/* eslint-enable jsdoc/require-param */
|
|
6958
|
+
|
|
6959
|
+
/**
|
|
6960
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
6961
|
+
* @param {Object} elem - The element to check.
|
|
6962
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6963
|
+
* @returns {void}
|
|
6964
|
+
*/
|
|
6965
|
+
handleComponentTagRename(elem, tagName) {
|
|
6966
|
+
const tag = tagName.toLowerCase();
|
|
6967
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6968
|
+
|
|
6969
|
+
if (elemTag !== tag) {
|
|
6970
|
+
elem.setAttribute(tag, true);
|
|
6971
|
+
}
|
|
6972
|
+
}
|
|
6973
|
+
|
|
6974
|
+
/**
|
|
6975
|
+
* Validates if an element is a specific Auro component.
|
|
6976
|
+
* @param {Object} elem - The element to validate.
|
|
6977
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6978
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6979
|
+
*/
|
|
6980
|
+
elementMatch(elem, tagName) {
|
|
6981
|
+
const tag = tagName.toLowerCase();
|
|
6982
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6983
|
+
|
|
6984
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6985
|
+
}
|
|
6986
|
+
};
|
|
6987
|
+
|
|
6988
|
+
var styleCss$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
6989
|
+
|
|
6990
|
+
var colorCss$1 = css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
6991
|
+
|
|
6992
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6993
|
+
|
|
6994
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6995
|
+
// See LICENSE in the project root for license information.
|
|
6996
|
+
|
|
6997
|
+
|
|
6998
|
+
class AuroLoader extends LitElement {
|
|
6999
|
+
constructor() {
|
|
7000
|
+
super();
|
|
7001
|
+
|
|
7002
|
+
/**
|
|
7003
|
+
* @private
|
|
7004
|
+
*/
|
|
7005
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7006
|
+
|
|
7007
|
+
/**
|
|
7008
|
+
* @private
|
|
7009
|
+
*/
|
|
7010
|
+
this.mdCount = 3;
|
|
7011
|
+
|
|
7012
|
+
/**
|
|
7013
|
+
* @private
|
|
7014
|
+
*/
|
|
7015
|
+
this.smCount = 2;
|
|
7016
|
+
|
|
7017
|
+
/**
|
|
7018
|
+
* @private
|
|
7019
|
+
*/
|
|
7020
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
7021
|
+
|
|
7022
|
+
this.orbit = false;
|
|
7023
|
+
this.ringworm = false;
|
|
7024
|
+
this.laser = false;
|
|
7025
|
+
this.pulse = false;
|
|
7026
|
+
}
|
|
7027
|
+
|
|
7028
|
+
// function to define props used within the scope of this component
|
|
7029
|
+
static get properties() {
|
|
7030
|
+
return {
|
|
7031
|
+
|
|
7032
|
+
/**
|
|
7033
|
+
* Sets loader to laser type.
|
|
7034
|
+
*/
|
|
7035
|
+
laser: {
|
|
7036
|
+
type: Boolean,
|
|
7037
|
+
reflect: true
|
|
7038
|
+
},
|
|
7039
|
+
|
|
7040
|
+
/**
|
|
7041
|
+
* Sets loader to orbit type.
|
|
7042
|
+
*/
|
|
7043
|
+
orbit: {
|
|
7044
|
+
type: Boolean,
|
|
7045
|
+
reflect: true
|
|
7046
|
+
},
|
|
7047
|
+
|
|
7048
|
+
/**
|
|
7049
|
+
* Sets loader to pulse type.
|
|
7050
|
+
*/
|
|
7051
|
+
pulse: {
|
|
7052
|
+
type: Boolean,
|
|
7053
|
+
reflect: true
|
|
6421
7054
|
},
|
|
6422
7055
|
|
|
6423
7056
|
/**
|
|
@@ -6499,14 +7132,13 @@ class AuroLoader extends LitElement {
|
|
|
6499
7132
|
|
|
6500
7133
|
var loaderVersion = '5.0.0';
|
|
6501
7134
|
|
|
6502
|
-
/* eslint-disable max-lines */
|
|
7135
|
+
/* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
|
|
6503
7136
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6504
7137
|
// See LICENSE in the project root for license information.
|
|
6505
7138
|
|
|
6506
7139
|
|
|
6507
7140
|
/**
|
|
6508
7141
|
* @slot - Default slot for the text of the button.
|
|
6509
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
6510
7142
|
* @csspart button - Apply CSS to HTML5 button.
|
|
6511
7143
|
* @csspart loader - Apply CSS to auro-loader.
|
|
6512
7144
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -6515,7 +7147,18 @@ var loaderVersion = '5.0.0';
|
|
|
6515
7147
|
|
|
6516
7148
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
6517
7149
|
|
|
6518
|
-
|
|
7150
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7151
|
+
|
|
7152
|
+
/**
|
|
7153
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7154
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7155
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7156
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7157
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7158
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7159
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7160
|
+
*/
|
|
7161
|
+
class AuroButton extends AuroElement {
|
|
6519
7162
|
|
|
6520
7163
|
/**
|
|
6521
7164
|
* Enables form association for this element.
|
|
@@ -6530,13 +7173,10 @@ class AuroButton extends LitElement {
|
|
|
6530
7173
|
super();
|
|
6531
7174
|
this.autofocus = false;
|
|
6532
7175
|
this.disabled = false;
|
|
6533
|
-
this.iconOnly = false;
|
|
6534
7176
|
this.loading = false;
|
|
7177
|
+
this.size = "md";
|
|
7178
|
+
this.shape = "rounded";
|
|
6535
7179
|
this.onDark = false;
|
|
6536
|
-
this.secondary = false;
|
|
6537
|
-
this.tertiary = false;
|
|
6538
|
-
this.rounded = false;
|
|
6539
|
-
this.slim = false;
|
|
6540
7180
|
this.fluid = false;
|
|
6541
7181
|
this.loadingText = this.loadingText || 'Loading...';
|
|
6542
7182
|
|
|
@@ -6559,49 +7199,59 @@ class AuroButton extends LitElement {
|
|
|
6559
7199
|
* @private
|
|
6560
7200
|
*/
|
|
6561
7201
|
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7202
|
+
|
|
7203
|
+
/**
|
|
7204
|
+
* @private
|
|
7205
|
+
*/
|
|
7206
|
+
this.buttonHref = undefined;
|
|
7207
|
+
|
|
7208
|
+
/**
|
|
7209
|
+
* @private
|
|
7210
|
+
*/
|
|
7211
|
+
this.buttonTarget = undefined;
|
|
7212
|
+
|
|
7213
|
+
/**
|
|
7214
|
+
* @private
|
|
7215
|
+
*/
|
|
7216
|
+
this.buttonRel = undefined;
|
|
6562
7217
|
}
|
|
6563
7218
|
|
|
6564
7219
|
static get styles() {
|
|
6565
7220
|
return [
|
|
6566
7221
|
tokensCss$2,
|
|
6567
7222
|
styleCss$2,
|
|
6568
|
-
colorCss$2
|
|
7223
|
+
colorCss$2,
|
|
7224
|
+
shapeSize
|
|
6569
7225
|
];
|
|
6570
7226
|
}
|
|
6571
7227
|
|
|
6572
7228
|
static get properties() {
|
|
6573
7229
|
return {
|
|
6574
7230
|
|
|
6575
|
-
|
|
6576
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6577
|
-
*/
|
|
6578
|
-
autofocus: {
|
|
6579
|
-
type: Boolean,
|
|
6580
|
-
reflect: true
|
|
6581
|
-
},
|
|
7231
|
+
...super.properties,
|
|
6582
7232
|
|
|
6583
7233
|
/**
|
|
6584
|
-
*
|
|
7234
|
+
* Override layout since it isn't used in this component.
|
|
7235
|
+
* @private
|
|
6585
7236
|
*/
|
|
6586
|
-
|
|
7237
|
+
layout: {
|
|
6587
7238
|
type: Boolean,
|
|
6588
|
-
|
|
7239
|
+
attribute: false,
|
|
7240
|
+
reflect: false
|
|
6589
7241
|
},
|
|
6590
7242
|
|
|
6591
7243
|
/**
|
|
6592
|
-
*
|
|
6593
|
-
* @deprecated
|
|
7244
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6594
7245
|
*/
|
|
6595
|
-
|
|
7246
|
+
autofocus: {
|
|
6596
7247
|
type: Boolean,
|
|
6597
7248
|
reflect: true
|
|
6598
7249
|
},
|
|
6599
7250
|
|
|
6600
7251
|
/**
|
|
6601
|
-
*
|
|
6602
|
-
* @deprecated
|
|
7252
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6603
7253
|
*/
|
|
6604
|
-
|
|
7254
|
+
disabled: {
|
|
6605
7255
|
type: Boolean,
|
|
6606
7256
|
reflect: true
|
|
6607
7257
|
},
|
|
@@ -6609,15 +7259,7 @@ class AuroButton extends LitElement {
|
|
|
6609
7259
|
/**
|
|
6610
7260
|
* Alters the shape of the button to be full width of its parent container.
|
|
6611
7261
|
*/
|
|
6612
|
-
fluid:
|
|
6613
|
-
type: Boolean,
|
|
6614
|
-
reflect: true
|
|
6615
|
-
},
|
|
6616
|
-
|
|
6617
|
-
/**
|
|
6618
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
6619
|
-
*/
|
|
6620
|
-
iconOnly: {
|
|
7262
|
+
fluid: {
|
|
6621
7263
|
type: Boolean,
|
|
6622
7264
|
reflect: true
|
|
6623
7265
|
},
|
|
@@ -6625,7 +7267,7 @@ class AuroButton extends LitElement {
|
|
|
6625
7267
|
/**
|
|
6626
7268
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6627
7269
|
*/
|
|
6628
|
-
loading:
|
|
7270
|
+
loading: {
|
|
6629
7271
|
type: Boolean,
|
|
6630
7272
|
reflect: true
|
|
6631
7273
|
},
|
|
@@ -6633,36 +7275,12 @@ class AuroButton extends LitElement {
|
|
|
6633
7275
|
/**
|
|
6634
7276
|
* 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.
|
|
6635
7277
|
*/
|
|
6636
|
-
loadingText:
|
|
7278
|
+
loadingText: {
|
|
6637
7279
|
type: String
|
|
6638
7280
|
},
|
|
6639
7281
|
|
|
6640
7282
|
/**
|
|
6641
|
-
*
|
|
6642
|
-
*/
|
|
6643
|
-
onDark: {
|
|
6644
|
-
type: Boolean,
|
|
6645
|
-
reflect: true
|
|
6646
|
-
},
|
|
6647
|
-
|
|
6648
|
-
/**
|
|
6649
|
-
* If set to true, the button will have a rounded shape.
|
|
6650
|
-
*/
|
|
6651
|
-
rounded: {
|
|
6652
|
-
type: Boolean,
|
|
6653
|
-
reflect: true
|
|
6654
|
-
},
|
|
6655
|
-
|
|
6656
|
-
/**
|
|
6657
|
-
* Set value for slim version of auro-button.
|
|
6658
|
-
*/
|
|
6659
|
-
slim: {
|
|
6660
|
-
type: Boolean,
|
|
6661
|
-
reflect: true
|
|
6662
|
-
},
|
|
6663
|
-
|
|
6664
|
-
/**
|
|
6665
|
-
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
7283
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6666
7284
|
*/
|
|
6667
7285
|
tIndex: {
|
|
6668
7286
|
type: String,
|
|
@@ -6670,75 +7288,68 @@ class AuroButton extends LitElement {
|
|
|
6670
7288
|
},
|
|
6671
7289
|
|
|
6672
7290
|
/**
|
|
6673
|
-
* Populates
|
|
7291
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7292
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
7293
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
6674
7294
|
*/
|
|
6675
|
-
|
|
7295
|
+
tabindex: {
|
|
6676
7296
|
type: String,
|
|
6677
|
-
reflect:
|
|
7297
|
+
reflect: false
|
|
6678
7298
|
},
|
|
6679
7299
|
|
|
6680
7300
|
/**
|
|
6681
|
-
*
|
|
6682
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
6683
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
7301
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6684
7302
|
*/
|
|
6685
|
-
|
|
7303
|
+
title: {
|
|
6686
7304
|
type: String,
|
|
6687
7305
|
reflect: true
|
|
6688
7306
|
},
|
|
6689
7307
|
|
|
6690
7308
|
/**
|
|
6691
|
-
*
|
|
6692
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
6693
|
-
* List multiple element IDs in a space delimited fashion.
|
|
7309
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6694
7310
|
*/
|
|
6695
|
-
|
|
7311
|
+
type: {
|
|
6696
7312
|
type: String,
|
|
6697
7313
|
reflect: true
|
|
6698
7314
|
},
|
|
6699
7315
|
|
|
6700
7316
|
/**
|
|
6701
|
-
*
|
|
6702
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
6703
|
-
* This is an optional attribute for buttons.
|
|
7317
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6704
7318
|
*/
|
|
6705
|
-
|
|
6706
|
-
type:
|
|
7319
|
+
value: {
|
|
7320
|
+
type: String,
|
|
6707
7321
|
reflect: true
|
|
6708
7322
|
},
|
|
6709
7323
|
|
|
6710
7324
|
/**
|
|
6711
|
-
* Sets
|
|
7325
|
+
* Sets button variant option.
|
|
7326
|
+
* @default primary
|
|
6712
7327
|
*/
|
|
6713
|
-
|
|
7328
|
+
variant: {
|
|
6714
7329
|
type: String,
|
|
6715
7330
|
reflect: true
|
|
6716
7331
|
},
|
|
6717
7332
|
|
|
6718
7333
|
/**
|
|
6719
|
-
*
|
|
7334
|
+
* @private
|
|
6720
7335
|
*/
|
|
6721
|
-
|
|
7336
|
+
buttonHref: {
|
|
6722
7337
|
type: String,
|
|
6723
|
-
reflect: true
|
|
6724
7338
|
},
|
|
6725
7339
|
|
|
6726
7340
|
/**
|
|
6727
|
-
*
|
|
7341
|
+
* @private
|
|
6728
7342
|
*/
|
|
6729
|
-
|
|
7343
|
+
buttonTarget: {
|
|
6730
7344
|
type: String,
|
|
6731
|
-
reflect: true
|
|
6732
7345
|
},
|
|
6733
7346
|
|
|
6734
7347
|
/**
|
|
6735
|
-
*
|
|
7348
|
+
* @private
|
|
6736
7349
|
*/
|
|
6737
|
-
|
|
7350
|
+
buttonRel: {
|
|
6738
7351
|
type: String,
|
|
6739
|
-
reflect: true
|
|
6740
7352
|
},
|
|
6741
|
-
ready: { type: Boolean },
|
|
6742
7353
|
};
|
|
6743
7354
|
}
|
|
6744
7355
|
|
|
@@ -6751,7 +7362,7 @@ class AuroButton extends LitElement {
|
|
|
6751
7362
|
*
|
|
6752
7363
|
*/
|
|
6753
7364
|
static register(name = "auro-button") {
|
|
6754
|
-
AuroLibraryRuntimeUtils$
|
|
7365
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6755
7366
|
}
|
|
6756
7367
|
|
|
6757
7368
|
/**
|
|
@@ -6763,17 +7374,6 @@ class AuroButton extends LitElement {
|
|
|
6763
7374
|
this.renderRoot.querySelector('button').focus();
|
|
6764
7375
|
}
|
|
6765
7376
|
|
|
6766
|
-
updated() {
|
|
6767
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
6768
|
-
if (this.secondary) {
|
|
6769
|
-
this.setAttribute('variant', 'secondary');
|
|
6770
|
-
}
|
|
6771
|
-
|
|
6772
|
-
if (this.tertiary) {
|
|
6773
|
-
this.setAttribute('variant', 'tertiary');
|
|
6774
|
-
}
|
|
6775
|
-
}
|
|
6776
|
-
|
|
6777
7377
|
/**
|
|
6778
7378
|
* Submits the form that this button is associated with.
|
|
6779
7379
|
* @private
|
|
@@ -6794,28 +7394,63 @@ class AuroButton extends LitElement {
|
|
|
6794
7394
|
return this.internals ? this.internals.form : null;
|
|
6795
7395
|
}
|
|
6796
7396
|
|
|
6797
|
-
|
|
7397
|
+
/**
|
|
7398
|
+
* @private
|
|
7399
|
+
* @returns {Boolean}
|
|
7400
|
+
*/
|
|
7401
|
+
get hideText() {
|
|
7402
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
7403
|
+
}
|
|
7404
|
+
|
|
7405
|
+
/**
|
|
7406
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7407
|
+
* @returns {string | undefined}
|
|
7408
|
+
* @private
|
|
7409
|
+
*/
|
|
7410
|
+
get currentAriaLabel() {
|
|
7411
|
+
if (!this.attributeWatcher) return undefined;
|
|
7412
|
+
|
|
7413
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7414
|
+
return ariaLabel || undefined;
|
|
7415
|
+
}
|
|
7416
|
+
|
|
7417
|
+
/**
|
|
7418
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7419
|
+
* @returns {string | undefined}
|
|
7420
|
+
* @private
|
|
7421
|
+
*/
|
|
7422
|
+
get currentAriaLabelledBy() {
|
|
7423
|
+
if (!this.attributeWatcher) return undefined;
|
|
7424
|
+
|
|
7425
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7426
|
+
return ariaLabelledBy || undefined;
|
|
7427
|
+
}
|
|
7428
|
+
|
|
7429
|
+
/**
|
|
7430
|
+
* Renders the default layout for the button.
|
|
7431
|
+
* @returns {TemplateResult}
|
|
7432
|
+
* @private
|
|
7433
|
+
*/
|
|
7434
|
+
renderLayoutDefault() {
|
|
6798
7435
|
const classes = {
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
6805
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
6806
|
-
'loading': this.loading
|
|
7436
|
+
"util_insetLg--squish": true,
|
|
7437
|
+
"auro-button": true,
|
|
7438
|
+
"icon-only": this.hideText,
|
|
7439
|
+
wrapper: true,
|
|
7440
|
+
loading: this.loading,
|
|
6807
7441
|
};
|
|
6808
7442
|
|
|
7443
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
7444
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
7445
|
+
|
|
6809
7446
|
return html$1`
|
|
6810
|
-
|
|
6811
|
-
part="
|
|
6812
|
-
aria-
|
|
6813
|
-
aria-
|
|
6814
|
-
|
|
6815
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
6816
|
-
tabIndex="${ifDefined(this.tIndex)}"
|
|
7447
|
+
<${tag}
|
|
7448
|
+
part="${part}"
|
|
7449
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7450
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7451
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
6817
7452
|
?autofocus="${this.autofocus}"
|
|
6818
|
-
class
|
|
7453
|
+
class=${classMap(classes)}
|
|
6819
7454
|
?disabled="${this.disabled || this.loading}"
|
|
6820
7455
|
?onDark="${this.onDark}"
|
|
6821
7456
|
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
@@ -6824,28 +7459,36 @@ class AuroButton extends LitElement {
|
|
|
6824
7459
|
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6825
7460
|
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6826
7461
|
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7462
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
7463
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
7464
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
6827
7465
|
>
|
|
6828
7466
|
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6829
7467
|
|
|
6830
7468
|
<span class="contentWrapper">
|
|
6831
7469
|
<span class="textSlot" part="text">
|
|
6832
|
-
|
|
6833
|
-
</span>
|
|
6834
|
-
|
|
6835
|
-
<span part="icon">
|
|
6836
|
-
<slot name="icon"></slot>
|
|
7470
|
+
<slot></slot>
|
|
6837
7471
|
</span>
|
|
6838
7472
|
</span>
|
|
6839
|
-
|
|
7473
|
+
</${tag}>
|
|
6840
7474
|
`;
|
|
6841
7475
|
}
|
|
7476
|
+
|
|
7477
|
+
/**
|
|
7478
|
+
* Renders the layout of the button.
|
|
7479
|
+
* @returns {TemplateResult}
|
|
7480
|
+
* @private
|
|
7481
|
+
*/
|
|
7482
|
+
renderLayout() {
|
|
7483
|
+
return this.renderLayoutDefault();
|
|
7484
|
+
}
|
|
6842
7485
|
}
|
|
6843
7486
|
|
|
6844
|
-
var buttonVersion = '
|
|
7487
|
+
var buttonVersion = '11.0.0';
|
|
6845
7488
|
|
|
6846
|
-
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-
|
|
7489
|
+
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6847
7490
|
|
|
6848
|
-
var styleCss = css`.helptext-wrapper{display:none;font-size:
|
|
7491
|
+
var styleCss = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
6849
7492
|
|
|
6850
7493
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6851
7494
|
|
|
@@ -7087,6 +7730,20 @@ class AuroInput extends BaseInput {
|
|
|
7087
7730
|
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
|
|
7088
7731
|
}
|
|
7089
7732
|
|
|
7733
|
+
static get properties() {
|
|
7734
|
+
return {
|
|
7735
|
+
...super.properties,
|
|
7736
|
+
|
|
7737
|
+
/**
|
|
7738
|
+
* @type {boolean}
|
|
7739
|
+
*/
|
|
7740
|
+
hideInputVisually: {
|
|
7741
|
+
type: Boolean,
|
|
7742
|
+
reflect: true,
|
|
7743
|
+
}
|
|
7744
|
+
};
|
|
7745
|
+
}
|
|
7746
|
+
|
|
7090
7747
|
static get styles() {
|
|
7091
7748
|
return [
|
|
7092
7749
|
css`${classicStyleCss}`,
|
|
@@ -7109,6 +7766,7 @@ class AuroInput extends BaseInput {
|
|
|
7109
7766
|
*/
|
|
7110
7767
|
get commonLabelClasses() {
|
|
7111
7768
|
return {
|
|
7769
|
+
'is-disabled': this.disabled,
|
|
7112
7770
|
'withValue': this.value && this.value.length > 0,
|
|
7113
7771
|
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7114
7772
|
};
|
|
@@ -7117,22 +7775,63 @@ class AuroInput extends BaseInput {
|
|
|
7117
7775
|
/**
|
|
7118
7776
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
7119
7777
|
* @private
|
|
7120
|
-
* @returns {
|
|
7778
|
+
* @returns {object} - Returns classmap.
|
|
7121
7779
|
*/
|
|
7122
7780
|
get commonInputClasses() {
|
|
7123
7781
|
return {
|
|
7124
|
-
'util_displayHiddenVisually': this.
|
|
7782
|
+
'util_displayHiddenVisually': this.hideInputVisually !== undefined
|
|
7783
|
+
? this.hideInputVisually
|
|
7784
|
+
// eslint-disable-next-line no-warning-comments
|
|
7785
|
+
// TODO: refactor this to use a less brittle/forced solution.
|
|
7786
|
+
: this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7125
7787
|
};
|
|
7126
7788
|
}
|
|
7127
7789
|
|
|
7790
|
+
/**
|
|
7791
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
7792
|
+
* @private
|
|
7793
|
+
* @returns {object} - Returns classmap.
|
|
7794
|
+
*/
|
|
7795
|
+
get legacyInputClasses() {
|
|
7796
|
+
return {
|
|
7797
|
+
...this.commonInputClasses,
|
|
7798
|
+
'util_displayHiddenVisually':
|
|
7799
|
+
this.hideInputVisually !== undefined
|
|
7800
|
+
? this.hideInputVisually
|
|
7801
|
+
: !this.hasFocus && !this.value
|
|
7802
|
+
};
|
|
7803
|
+
}
|
|
7804
|
+
|
|
7805
|
+
/**
|
|
7806
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
7807
|
+
* @private
|
|
7808
|
+
* @returns {object} - Returns classmap.
|
|
7809
|
+
*/
|
|
7128
7810
|
get commonWrapperClasses() {
|
|
7129
7811
|
return {
|
|
7130
7812
|
'wrapper': true,
|
|
7813
|
+
'simple': this.simple,
|
|
7131
7814
|
'withValue': this.value && this.value.length > 0,
|
|
7132
7815
|
'hasFocus': this.hasFocus
|
|
7133
7816
|
};
|
|
7134
7817
|
}
|
|
7135
7818
|
|
|
7819
|
+
/**
|
|
7820
|
+
* Returns classmap configuration for accent elements in each layout.
|
|
7821
|
+
* @private
|
|
7822
|
+
* @returns {object} - Returns classmap.
|
|
7823
|
+
*/
|
|
7824
|
+
get commonAccentClasses() {
|
|
7825
|
+
return {
|
|
7826
|
+
'util_displayHidden': false
|
|
7827
|
+
};
|
|
7828
|
+
}
|
|
7829
|
+
|
|
7830
|
+
/**
|
|
7831
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
7832
|
+
* @private
|
|
7833
|
+
* @returns {object} - Returns classmap.
|
|
7834
|
+
*/
|
|
7136
7835
|
get helpTextClasses() {
|
|
7137
7836
|
return {
|
|
7138
7837
|
'helpTextWrapper': true,
|
|
@@ -7150,7 +7849,7 @@ class AuroInput extends BaseInput {
|
|
|
7150
7849
|
*
|
|
7151
7850
|
*/
|
|
7152
7851
|
static register(name = "auro-input") {
|
|
7153
|
-
AuroLibraryRuntimeUtils$
|
|
7852
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroInput);
|
|
7154
7853
|
}
|
|
7155
7854
|
|
|
7156
7855
|
/**
|
|
@@ -7206,10 +7905,10 @@ class AuroInput extends BaseInput {
|
|
|
7206
7905
|
/**
|
|
7207
7906
|
* Returns HTML for the HTML5 input element.
|
|
7208
7907
|
* @private
|
|
7209
|
-
* @param {boolean} [
|
|
7908
|
+
* @param {boolean} [useLegacyHiddenState=false] - If true, the input will be visually hidden when not focused and has no value.
|
|
7210
7909
|
* @returns {html} - Returns HTML for the HTML5 input element.
|
|
7211
7910
|
*/
|
|
7212
|
-
renderHtmlInput(
|
|
7911
|
+
renderHtmlInput(useLegacyHiddenState = false) {
|
|
7213
7912
|
const displayValueClasses = {
|
|
7214
7913
|
'displayValue': true,
|
|
7215
7914
|
'hasContent': this.hasDisplayValueContent,
|
|
@@ -7217,33 +7916,39 @@ class AuroInput extends BaseInput {
|
|
|
7217
7916
|
'withValue': this.value && this.value.length > 0,
|
|
7218
7917
|
};
|
|
7219
7918
|
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7919
|
+
// Remove this when the classic layout is sunset.
|
|
7920
|
+
const inputOverrideClasses = useLegacyHiddenState
|
|
7921
|
+
? this.legacyInputClasses
|
|
7922
|
+
: this.commonInputClasses;
|
|
7223
7923
|
|
|
7224
7924
|
return html$1`
|
|
7225
|
-
<label for=${this.
|
|
7925
|
+
<label for=${this.inputId} class="${classMap(this.commonLabelClasses)}" part="label">
|
|
7226
7926
|
<slot name="label">
|
|
7227
7927
|
${this.label}
|
|
7228
7928
|
</slot>
|
|
7229
7929
|
</label>
|
|
7930
|
+
|
|
7931
|
+
<!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
|
|
7230
7932
|
<input
|
|
7231
7933
|
@blur="${this.handleBlur}"
|
|
7232
7934
|
@focusin="${this.handleFocusin}"
|
|
7233
7935
|
@focusout="${this.handleFocusout}"
|
|
7234
7936
|
@input="${this.handleInput}"
|
|
7937
|
+
.placeholder=${this.placeholderStr}
|
|
7938
|
+
.role=${this.a11yRole}
|
|
7235
7939
|
?activeLabel="${this.activeLabel}"
|
|
7236
7940
|
?disabled="${this.disabled}"
|
|
7237
7941
|
?required="${this.required}"
|
|
7238
|
-
|
|
7942
|
+
aria-controls=${ifDefined(this.a11yControls)}
|
|
7239
7943
|
aria-describedby="${this.uniqueId}"
|
|
7944
|
+
aria-expanded=${ifDefined(this.a11yExpanded)}
|
|
7240
7945
|
aria-invalid="${this.validity !== 'valid'}"
|
|
7241
|
-
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7242
7946
|
autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
|
|
7947
|
+
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7243
7948
|
autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
|
|
7244
|
-
class="${classMap(
|
|
7949
|
+
class="${classMap(inputOverrideClasses)}"
|
|
7245
7950
|
id="${this.inputId}"
|
|
7246
|
-
|
|
7951
|
+
inputmode="${ifDefined(this.inputmode ? this.inputmode : undefined)}"
|
|
7247
7952
|
lang="${ifDefined(this.lang)}"
|
|
7248
7953
|
maxlength="${ifDefined(this.maxLength ? this.maxLength : undefined)}"
|
|
7249
7954
|
minlength="${ifDefined(this.minLength ? this.minLength : undefined)}"
|
|
@@ -7251,7 +7956,8 @@ class AuroInput extends BaseInput {
|
|
|
7251
7956
|
part="input"
|
|
7252
7957
|
pattern="${ifDefined(this.definePattern())}"
|
|
7253
7958
|
spellcheck="${ifDefined(this.spellcheck ? this.spellcheck : undefined)}"
|
|
7254
|
-
type="${this.type ===
|
|
7959
|
+
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
7960
|
+
/>
|
|
7255
7961
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7256
7962
|
<div class="displayValueWrapper">
|
|
7257
7963
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
@@ -7273,11 +7979,12 @@ class AuroInput extends BaseInput {
|
|
|
7273
7979
|
?onDark="${this.onDark}"
|
|
7274
7980
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
7275
7981
|
class="notificationBtn clearBtn"
|
|
7276
|
-
|
|
7277
|
-
|
|
7982
|
+
shape="circle"
|
|
7983
|
+
size="sm"
|
|
7984
|
+
variant="ghost">
|
|
7278
7985
|
<${this.iconTag}
|
|
7986
|
+
?customColor="${this.onDark}"
|
|
7279
7987
|
category="interface"
|
|
7280
|
-
customColor
|
|
7281
7988
|
name="x-lg"
|
|
7282
7989
|
>
|
|
7283
7990
|
</${this.iconTag}>
|
|
@@ -7295,22 +8002,23 @@ class AuroInput extends BaseInput {
|
|
|
7295
8002
|
return html$1`
|
|
7296
8003
|
<div class="notification">
|
|
7297
8004
|
<${this.buttonTag}
|
|
7298
|
-
@click="${this.handleClickShowPassword}
|
|
8005
|
+
@click="${this.handleClickShowPassword}"
|
|
7299
8006
|
?onDark="${this.onDark}"
|
|
7300
|
-
aria-hidden="true"
|
|
7301
8007
|
class="notificationBtn passwordBtn"
|
|
7302
|
-
|
|
7303
|
-
|
|
8008
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
8009
|
+
shape="circle"
|
|
8010
|
+
size="sm"
|
|
8011
|
+
variant="ghost">
|
|
7304
8012
|
<${this.iconTag}
|
|
8013
|
+
?customColor="${this.onDark}"
|
|
7305
8014
|
?hidden=${!this.showPassword}
|
|
7306
8015
|
category="interface"
|
|
7307
|
-
customColor
|
|
7308
8016
|
name="hide-password-stroke">
|
|
7309
8017
|
</${this.iconTag}>
|
|
7310
8018
|
<${this.iconTag}
|
|
8019
|
+
?customColor="${this.onDark}"
|
|
7311
8020
|
?hidden=${this.showPassword}
|
|
7312
8021
|
category="interface"
|
|
7313
|
-
customColor
|
|
7314
8022
|
name="view-password-stroke">
|
|
7315
8023
|
</${this.iconTag}>
|
|
7316
8024
|
</${this.buttonTag}>
|
|
@@ -7385,24 +8093,30 @@ class AuroInput extends BaseInput {
|
|
|
7385
8093
|
}
|
|
7386
8094
|
|
|
7387
8095
|
/**
|
|
7388
|
-
* Returns HTML for the
|
|
8096
|
+
* Returns HTML for the classic layout.
|
|
7389
8097
|
* @private
|
|
7390
|
-
* @returns {import("lit").TemplateResult} - Returns HTML for the
|
|
8098
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7391
8099
|
*/
|
|
7392
8100
|
renderLayoutClassic() {
|
|
8101
|
+
const classicClassMap = {
|
|
8102
|
+
...this.commonWrapperClasses,
|
|
8103
|
+
'thin': !this.simple
|
|
8104
|
+
};
|
|
8105
|
+
|
|
7393
8106
|
return html$1`
|
|
7394
8107
|
<div
|
|
7395
8108
|
@click="${this.handleClick}"
|
|
7396
|
-
class="${classMap(
|
|
8109
|
+
class="${classMap(classicClassMap)}"
|
|
7397
8110
|
part="wrapper">
|
|
7398
|
-
<div class="accents left">
|
|
8111
|
+
<div part="accent-left" class="accents left ${classMap(this.commonAccentClasses)}">
|
|
7399
8112
|
${this.renderHtmlTypeIcon()}
|
|
7400
8113
|
</div>
|
|
7401
8114
|
<div class="mainContent">
|
|
7402
8115
|
${this.renderHtmlInput(true)}
|
|
7403
8116
|
</div>
|
|
7404
|
-
<div class="accents right">
|
|
8117
|
+
<div part="accent-right" class="accents right ${classMap(this.commonAccentClasses)}">
|
|
7405
8118
|
${this.renderValidationErrorIconHtml()}
|
|
8119
|
+
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
7406
8120
|
${this.hasValue ? html$1`
|
|
7407
8121
|
${!this.disabled && !this.readonly ? html$1`
|
|
7408
8122
|
${this.renderHtmlActionClear()}
|
|
@@ -7427,7 +8141,7 @@ class AuroInput extends BaseInput {
|
|
|
7427
8141
|
@click="${this.handleClick}"
|
|
7428
8142
|
class="${classMap(this.commonWrapperClasses)}"
|
|
7429
8143
|
part="wrapper">
|
|
7430
|
-
<div class="accents left">
|
|
8144
|
+
<div class="accents left ${this.commonAccentClasses}">
|
|
7431
8145
|
${this.layout.includes('left') ? html$1`
|
|
7432
8146
|
${this.renderValidationErrorIconHtml()}
|
|
7433
8147
|
` : undefined}
|
|
@@ -7435,7 +8149,7 @@ class AuroInput extends BaseInput {
|
|
|
7435
8149
|
<div class="mainContent">
|
|
7436
8150
|
${this.renderHtmlInput()}
|
|
7437
8151
|
</div>
|
|
7438
|
-
<div class="accents right">
|
|
8152
|
+
<div class="accents right ${this.commonAccentClasses}">
|
|
7439
8153
|
${this.layout.includes('right') || this.layout === "emphasized" ? html$1`
|
|
7440
8154
|
${this.renderValidationErrorIconHtml()}
|
|
7441
8155
|
` : undefined}
|