@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.4 → 0.0.0-pr624.40
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 +47 -14
- package/components/checkbox/demo/api.min.js +44 -31
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +44 -31
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +44 -31
- package/components/checkbox/dist/registered.js +44 -31
- package/components/combobox/demo/api.md +100 -2
- package/components/combobox/demo/api.min.js +3202 -759
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +3202 -759
- package/components/combobox/dist/auro-combobox.d.ts +37 -16
- package/components/combobox/dist/index.js +3091 -789
- package/components/combobox/dist/registered.js +3091 -789
- package/components/counter/demo/api.html +1 -0
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +3324 -614
- package/components/counter/demo/index.html +1 -0
- package/components/counter/demo/index.md +103 -34
- package/components/counter/demo/index.min.js +3324 -614
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +89 -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 +3324 -614
- package/components/counter/dist/registered.js +3324 -614
- package/components/datepicker/demo/api.md +36 -19
- package/components/datepicker/demo/api.min.js +11976 -8000
- package/components/datepicker/demo/index.md +80 -0
- package/components/datepicker/demo/index.min.js +11976 -8000
- 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 +12238 -8262
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +12238 -8262
- package/components/dropdown/demo/api.md +8 -9
- package/components/dropdown/demo/api.min.js +551 -147
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +551 -147
- package/components/dropdown/dist/auro-dropdown.d.ts +28 -9
- package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
- package/components/dropdown/dist/index.js +551 -147
- package/components/dropdown/dist/registered.js +551 -147
- 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/README.md +5 -2
- package/components/input/demo/api.md +271 -176
- package/components/input/demo/api.min.js +956 -270
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +955 -269
- package/components/input/demo/readme.md +5 -2
- package/components/input/dist/auro-input.d.ts +23 -15
- package/components/input/dist/base-input.d.ts +32 -8
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +955 -269
- package/components/input/dist/registered.js +955 -269
- 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 +7 -8
- package/components/radio/demo/api.min.js +68 -80
- package/components/radio/demo/index.min.js +68 -80
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +9 -12
- package/components/radio/dist/index.js +68 -80
- package/components/radio/dist/registered.js +68 -80
- package/components/select/demo/api.md +123 -13
- package/components/select/demo/api.min.js +3045 -456
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +323 -763
- package/components/select/demo/index.min.js +3045 -456
- package/components/select/dist/auro-select.d.ts +112 -11
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +2925 -477
- package/components/select/dist/registered.js +2925 -477
- 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:clip !important;width:100%;padding:0;border:0;background:unset;outline:none;overflow-clip-margin:0 !important;text-overflow:ellipsis}.displayValue{display:none}.displayValue.hasContent:is(.withValue):not(.hasFocus){display:flex;align-items:center}.accents:not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}`;
|
|
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)}:host(:not([ondark])[disabled]){--ds-auro-input-border-color: var(--ds-advanced-color-button-primary-border-disabled, #acc9e2);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([ondark][disabled]){--ds-auro-input-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
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{cursor:text;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{height:auto;font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);justify-self:flex-start;line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;padding-bottom:0;line-height:0}.layout-classic .accents{padding:0 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}:host([layout*=snowflake]) .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
|
|
|
@@ -4933,19 +4943,24 @@ let AuroElement$1 = class AuroElement extends LitElement {
|
|
|
4933
4943
|
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
4934
4944
|
* @attr id
|
|
4935
4945
|
*
|
|
4936
|
-
* @slot
|
|
4946
|
+
* @slot helpText - Sets the help text displayed below the input.
|
|
4937
4947
|
* @slot label - Sets the label text for the input.
|
|
4948
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
4949
|
+
* @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
|
|
4938
4950
|
*
|
|
4939
4951
|
* @csspart wrapper - Use for customizing the style of the root element
|
|
4940
4952
|
* @csspart label - Use for customizing the style of the label element
|
|
4941
4953
|
* @csspart helpText - Use for customizing the style of the helpText element
|
|
4954
|
+
* @csspart input - Use for customizing the style of the input element
|
|
4942
4955
|
* @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
|
|
4943
4956
|
* @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
|
|
4957
|
+
* @csspart accent-left - Use for customizing the style of the left accent element (e.g. padding, margin)
|
|
4958
|
+
* @csspart accent-right - Use for customizing the style of the right accent element (e.g. padding, margin)
|
|
4944
4959
|
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
4945
4960
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
4946
4961
|
*/
|
|
4947
4962
|
|
|
4948
|
-
class BaseInput extends AuroElement$
|
|
4963
|
+
class BaseInput extends AuroElement$2 {
|
|
4949
4964
|
|
|
4950
4965
|
constructor() {
|
|
4951
4966
|
super();
|
|
@@ -5038,7 +5053,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5038
5053
|
*/
|
|
5039
5054
|
a11yRole: {
|
|
5040
5055
|
type: String,
|
|
5041
|
-
attribute: true,
|
|
5042
5056
|
reflect: true
|
|
5043
5057
|
},
|
|
5044
5058
|
|
|
@@ -5047,7 +5061,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5047
5061
|
*/
|
|
5048
5062
|
a11yExpanded: {
|
|
5049
5063
|
type: Boolean,
|
|
5050
|
-
attribute: true,
|
|
5051
5064
|
reflect: true
|
|
5052
5065
|
},
|
|
5053
5066
|
|
|
@@ -5056,7 +5069,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5056
5069
|
*/
|
|
5057
5070
|
a11yControls: {
|
|
5058
5071
|
type: String,
|
|
5059
|
-
attribute: true,
|
|
5060
5072
|
reflect: true
|
|
5061
5073
|
},
|
|
5062
5074
|
|
|
@@ -5072,7 +5084,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5072
5084
|
* 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
5085
|
*/
|
|
5074
5086
|
autocapitalize: {
|
|
5075
|
-
type: String
|
|
5087
|
+
type: String,
|
|
5088
|
+
reflect: true
|
|
5076
5089
|
},
|
|
5077
5090
|
|
|
5078
5091
|
/**
|
|
@@ -5087,7 +5100,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5087
5100
|
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
5088
5101
|
*/
|
|
5089
5102
|
autocorrect: {
|
|
5090
|
-
type: String
|
|
5103
|
+
type: String,
|
|
5104
|
+
reflect: true
|
|
5091
5105
|
},
|
|
5092
5106
|
|
|
5093
5107
|
/**
|
|
@@ -5132,7 +5146,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5132
5146
|
/** Exposes inputmode attribute for input. */
|
|
5133
5147
|
inputmode: {
|
|
5134
5148
|
type: String,
|
|
5135
|
-
attribute: true,
|
|
5136
5149
|
reflect: true
|
|
5137
5150
|
},
|
|
5138
5151
|
|
|
@@ -5140,7 +5153,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5140
5153
|
* Defines the language of an element.
|
|
5141
5154
|
*/
|
|
5142
5155
|
lang: {
|
|
5143
|
-
type: String
|
|
5156
|
+
type: String,
|
|
5157
|
+
reflect: true
|
|
5144
5158
|
},
|
|
5145
5159
|
|
|
5146
5160
|
/**
|
|
@@ -5154,7 +5168,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5154
5168
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5155
5169
|
*/
|
|
5156
5170
|
maxLength: {
|
|
5157
|
-
type: Number
|
|
5171
|
+
type: Number,
|
|
5172
|
+
reflect: true
|
|
5158
5173
|
},
|
|
5159
5174
|
|
|
5160
5175
|
/**
|
|
@@ -5168,14 +5183,25 @@ class BaseInput extends AuroElement$1 {
|
|
|
5168
5183
|
* 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
5184
|
*/
|
|
5170
5185
|
minLength: {
|
|
5171
|
-
type: Number
|
|
5186
|
+
type: Number,
|
|
5187
|
+
reflect: true
|
|
5172
5188
|
},
|
|
5173
5189
|
|
|
5174
5190
|
/**
|
|
5175
5191
|
* Populates the `name` attribute on the input.
|
|
5176
5192
|
*/
|
|
5177
5193
|
name: {
|
|
5178
|
-
type: String
|
|
5194
|
+
type: String,
|
|
5195
|
+
reflect: true
|
|
5196
|
+
},
|
|
5197
|
+
|
|
5198
|
+
/**
|
|
5199
|
+
* Sets styles for nested operation - removes borders, hides help + error text, and
|
|
5200
|
+
* hides accents.
|
|
5201
|
+
*/
|
|
5202
|
+
nested: {
|
|
5203
|
+
type: Boolean,
|
|
5204
|
+
reflect: true
|
|
5179
5205
|
},
|
|
5180
5206
|
|
|
5181
5207
|
/**
|
|
@@ -5206,7 +5232,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5206
5232
|
* Define custom placeholder text, only supported by date input formats.
|
|
5207
5233
|
*/
|
|
5208
5234
|
placeholder: {
|
|
5209
|
-
type: String
|
|
5235
|
+
type: String,
|
|
5236
|
+
reflect: true
|
|
5210
5237
|
},
|
|
5211
5238
|
|
|
5212
5239
|
/**
|
|
@@ -5295,6 +5322,14 @@ class BaseInput extends AuroElement$1 {
|
|
|
5295
5322
|
type: String
|
|
5296
5323
|
},
|
|
5297
5324
|
|
|
5325
|
+
/**
|
|
5326
|
+
* Simple makes the input render without a border.
|
|
5327
|
+
*/
|
|
5328
|
+
simple: {
|
|
5329
|
+
type: Boolean,
|
|
5330
|
+
reflect: true
|
|
5331
|
+
},
|
|
5332
|
+
|
|
5298
5333
|
/**
|
|
5299
5334
|
* Custom help text message for email type validity.
|
|
5300
5335
|
*/
|
|
@@ -5306,7 +5341,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5306
5341
|
* 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
5342
|
*/
|
|
5308
5343
|
spellcheck: {
|
|
5309
|
-
type: String
|
|
5344
|
+
type: String,
|
|
5345
|
+
reflect: true
|
|
5310
5346
|
},
|
|
5311
5347
|
|
|
5312
5348
|
/**
|
|
@@ -5321,7 +5357,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5321
5357
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
5322
5358
|
*/
|
|
5323
5359
|
value: {
|
|
5324
|
-
type: String
|
|
5360
|
+
type: String,
|
|
5361
|
+
reflect: true
|
|
5325
5362
|
},
|
|
5326
5363
|
|
|
5327
5364
|
/**
|
|
@@ -5352,8 +5389,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
5352
5389
|
},
|
|
5353
5390
|
|
|
5354
5391
|
/**
|
|
5392
|
+
* The id for input node.
|
|
5355
5393
|
* @private
|
|
5356
|
-
* id for input node
|
|
5357
5394
|
*/
|
|
5358
5395
|
inputId: {
|
|
5359
5396
|
type: String,
|
|
@@ -5377,7 +5414,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
5377
5414
|
}
|
|
5378
5415
|
|
|
5379
5416
|
firstUpdated() {
|
|
5380
|
-
// clicking anywhere in the main wrapper will focus the input. Clicking the
|
|
5417
|
+
// clicking anywhere in the main wrapper will focus the input. Clicking the helpText or label will not focus the input.
|
|
5381
5418
|
this.wrapperElement = this.shadowRoot.querySelector('.wrapper');
|
|
5382
5419
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
5383
5420
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
@@ -5601,7 +5638,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
5601
5638
|
|
|
5602
5639
|
/**
|
|
5603
5640
|
* Function to set element focus.
|
|
5604
|
-
* @private
|
|
5605
5641
|
* @return {void}
|
|
5606
5642
|
*/
|
|
5607
5643
|
focus() {
|
|
@@ -5799,28 +5835,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
5799
5835
|
* @returns {void}
|
|
5800
5836
|
*/
|
|
5801
5837
|
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 = '';
|
|
5838
|
+
if (this.placeholder) {
|
|
5839
|
+
this.placeholderStr = this.placeholder;
|
|
5840
|
+
} else if (this.type === 'date') {
|
|
5841
|
+
this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5818
5842
|
}
|
|
5819
5843
|
|
|
5820
5844
|
this.requestUpdate();
|
|
5821
5845
|
|
|
5822
|
-
|
|
5823
|
-
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5846
|
+
return this.placeholderStr;
|
|
5824
5847
|
}
|
|
5825
5848
|
|
|
5826
5849
|
/**
|
|
@@ -6033,7 +6056,7 @@ class AuroDependencyVersioning {
|
|
|
6033
6056
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6034
6057
|
*/
|
|
6035
6058
|
|
|
6036
|
-
class AuroElement extends LitElement {
|
|
6059
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
6037
6060
|
|
|
6038
6061
|
// function to define props used within the scope of this component
|
|
6039
6062
|
static get properties() {
|
|
@@ -6057,7 +6080,7 @@ class AuroElement extends LitElement {
|
|
|
6057
6080
|
|
|
6058
6081
|
return 'false'
|
|
6059
6082
|
}
|
|
6060
|
-
}
|
|
6083
|
+
};
|
|
6061
6084
|
|
|
6062
6085
|
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
6086
|
|
|
@@ -6101,7 +6124,7 @@ var styleCss$3 = css`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
6101
6124
|
*/
|
|
6102
6125
|
|
|
6103
6126
|
// build the component class
|
|
6104
|
-
class BaseIcon extends AuroElement {
|
|
6127
|
+
class BaseIcon extends AuroElement$1 {
|
|
6105
6128
|
constructor() {
|
|
6106
6129
|
super();
|
|
6107
6130
|
this.onDark = false;
|
|
@@ -6177,6 +6200,76 @@ var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
6177
6200
|
|
|
6178
6201
|
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
6202
|
|
|
6203
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6204
|
+
// See LICENSE in the project root for license information.
|
|
6205
|
+
|
|
6206
|
+
// ---------------------------------------------------------------------
|
|
6207
|
+
|
|
6208
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6209
|
+
|
|
6210
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6211
|
+
|
|
6212
|
+
/* eslint-disable jsdoc/require-param */
|
|
6213
|
+
|
|
6214
|
+
/**
|
|
6215
|
+
* This will register a new custom element with the browser.
|
|
6216
|
+
* @param {String} name - The name of the custom element.
|
|
6217
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6218
|
+
* @returns {void}
|
|
6219
|
+
*/
|
|
6220
|
+
registerComponent(name, componentClass) {
|
|
6221
|
+
if (!customElements.get(name)) {
|
|
6222
|
+
customElements.define(name, class extends componentClass {});
|
|
6223
|
+
}
|
|
6224
|
+
}
|
|
6225
|
+
|
|
6226
|
+
/**
|
|
6227
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6228
|
+
* @returns {void}
|
|
6229
|
+
*/
|
|
6230
|
+
closestElement(
|
|
6231
|
+
selector, // selector like in .closest()
|
|
6232
|
+
base = this, // extra functionality to skip a parent
|
|
6233
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6234
|
+
!el || el === document || el === window
|
|
6235
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6236
|
+
: found
|
|
6237
|
+
? found // found a selector INside this element
|
|
6238
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6239
|
+
) {
|
|
6240
|
+
return __Closest(base);
|
|
6241
|
+
}
|
|
6242
|
+
/* eslint-enable jsdoc/require-param */
|
|
6243
|
+
|
|
6244
|
+
/**
|
|
6245
|
+
* 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.
|
|
6246
|
+
* @param {Object} elem - The element to check.
|
|
6247
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6248
|
+
* @returns {void}
|
|
6249
|
+
*/
|
|
6250
|
+
handleComponentTagRename(elem, tagName) {
|
|
6251
|
+
const tag = tagName.toLowerCase();
|
|
6252
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6253
|
+
|
|
6254
|
+
if (elemTag !== tag) {
|
|
6255
|
+
elem.setAttribute(tag, true);
|
|
6256
|
+
}
|
|
6257
|
+
}
|
|
6258
|
+
|
|
6259
|
+
/**
|
|
6260
|
+
* Validates if an element is a specific Auro component.
|
|
6261
|
+
* @param {Object} elem - The element to validate.
|
|
6262
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6263
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6264
|
+
*/
|
|
6265
|
+
elementMatch(elem, tagName) {
|
|
6266
|
+
const tag = tagName.toLowerCase();
|
|
6267
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6268
|
+
|
|
6269
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6270
|
+
}
|
|
6271
|
+
};
|
|
6272
|
+
|
|
6180
6273
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6181
6274
|
// See LICENSE in the project root for license information.
|
|
6182
6275
|
|
|
@@ -6196,7 +6289,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6196
6289
|
*/
|
|
6197
6290
|
privateDefaults() {
|
|
6198
6291
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
6199
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6292
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6200
6293
|
}
|
|
6201
6294
|
|
|
6202
6295
|
// function to define props used within the scope of this component
|
|
@@ -6278,7 +6371,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6278
6371
|
*
|
|
6279
6372
|
*/
|
|
6280
6373
|
static register(name = "auro-icon") {
|
|
6281
|
-
AuroLibraryRuntimeUtils$
|
|
6374
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
6282
6375
|
}
|
|
6283
6376
|
|
|
6284
6377
|
connectedCallback() {
|
|
@@ -6299,8 +6392,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6299
6392
|
async firstUpdated() {
|
|
6300
6393
|
await super.firstUpdated();
|
|
6301
6394
|
|
|
6302
|
-
|
|
6303
|
-
|
|
6395
|
+
/**
|
|
6396
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6397
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6398
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6399
|
+
*/
|
|
6400
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6304
6401
|
const svgDesc = this.svg.querySelector('desc');
|
|
6305
6402
|
|
|
6306
6403
|
if (svgDesc) {
|
|
@@ -6344,80 +6441,617 @@ class AuroIcon extends BaseIcon {
|
|
|
6344
6441
|
}
|
|
6345
6442
|
}
|
|
6346
6443
|
|
|
6347
|
-
var iconVersion = '8.0.
|
|
6444
|
+
var iconVersion = '8.0.4';
|
|
6348
6445
|
|
|
6349
|
-
|
|
6446
|
+
/**
|
|
6447
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6448
|
+
*/
|
|
6449
|
+
const _observers = new WeakMap();
|
|
6350
6450
|
|
|
6351
|
-
|
|
6451
|
+
/**
|
|
6452
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6453
|
+
* Structure: {
|
|
6454
|
+
* host: {
|
|
6455
|
+
* matchers: Set<Function>,
|
|
6456
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6457
|
+
* }
|
|
6458
|
+
* }
|
|
6459
|
+
*/
|
|
6460
|
+
const _transportConfig = new WeakMap();
|
|
6352
6461
|
|
|
6353
|
-
|
|
6462
|
+
/**
|
|
6463
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6464
|
+
*
|
|
6465
|
+
* @param {Object} params - The parameters for the function.
|
|
6466
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6467
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6468
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6469
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6470
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6471
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6472
|
+
*/
|
|
6473
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
6474
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
6475
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
6476
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
6477
|
+
}
|
|
6354
6478
|
|
|
6355
|
-
|
|
6479
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
6480
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
6481
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
6482
|
+
}
|
|
6356
6483
|
|
|
6357
|
-
|
|
6484
|
+
// Guard Clause: Ensure match is a function
|
|
6485
|
+
if (typeof match !== 'function') {
|
|
6486
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
6487
|
+
}
|
|
6358
6488
|
|
|
6359
|
-
|
|
6489
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
6490
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
6491
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
6492
|
+
}
|
|
6493
|
+
|
|
6494
|
+
// Register this transport and get cleanup function
|
|
6495
|
+
return _registerTransport({
|
|
6496
|
+
host,
|
|
6497
|
+
target,
|
|
6498
|
+
matcher: match,
|
|
6499
|
+
removeOriginal
|
|
6500
|
+
});
|
|
6501
|
+
};
|
|
6360
6502
|
|
|
6361
|
-
|
|
6362
|
-
|
|
6503
|
+
/**
|
|
6504
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
6505
|
+
*
|
|
6506
|
+
* @param {Object} params - The parameters object.
|
|
6507
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
6508
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
6509
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
6510
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
6511
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
6512
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
6513
|
+
* @private
|
|
6514
|
+
*/
|
|
6515
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6516
|
+
// Initialize config for this host if it doesn't exist
|
|
6517
|
+
if (!_transportConfig.has(host)) {
|
|
6518
|
+
_transportConfig.set(host, {
|
|
6519
|
+
matchers: new Set(),
|
|
6520
|
+
targets: new Map()
|
|
6521
|
+
});
|
|
6522
|
+
}
|
|
6363
6523
|
|
|
6524
|
+
const config = _transportConfig.get(host);
|
|
6525
|
+
|
|
6526
|
+
// Add the matcher to the set of matchers for this host
|
|
6527
|
+
config.matchers.add(matcher);
|
|
6528
|
+
|
|
6529
|
+
// Initialize target entry if it doesn't exist
|
|
6530
|
+
if (!config.targets.has(target)) {
|
|
6531
|
+
config.targets.set(target, new Map());
|
|
6532
|
+
}
|
|
6533
|
+
|
|
6534
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
6535
|
+
config.targets.get(target).set(matcher, {
|
|
6536
|
+
removeOriginal,
|
|
6537
|
+
currentAttributes: new Map()
|
|
6538
|
+
});
|
|
6539
|
+
|
|
6540
|
+
// Perform initial attribute transport
|
|
6541
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
6542
|
+
|
|
6543
|
+
// Attach observer
|
|
6544
|
+
_attachObserver(host);
|
|
6545
|
+
|
|
6546
|
+
// Return cleanup function and utility functions
|
|
6547
|
+
return {
|
|
6548
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
6549
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
6550
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
6551
|
+
}
|
|
6552
|
+
};
|
|
6364
6553
|
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6554
|
+
/**
|
|
6555
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
6556
|
+
*
|
|
6557
|
+
* @param {HTMLElement} host - The host element
|
|
6558
|
+
* @param {HTMLElement} target - The target element
|
|
6559
|
+
* @param {Function} matcher - The matcher function
|
|
6560
|
+
* @private
|
|
6561
|
+
*/
|
|
6562
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
6563
|
+
const config = _transportConfig.get(host);
|
|
6564
|
+
if (!config) return;
|
|
6565
|
+
|
|
6566
|
+
// Remove this matcher from this target
|
|
6567
|
+
const targetMatchers = config.targets.get(target);
|
|
6568
|
+
if (targetMatchers) {
|
|
6569
|
+
targetMatchers.delete(matcher);
|
|
6570
|
+
|
|
6571
|
+
// If this target has no more matchers, remove it
|
|
6572
|
+
if (targetMatchers.size === 0) {
|
|
6573
|
+
config.targets.delete(target);
|
|
6574
|
+
}
|
|
6575
|
+
}
|
|
6576
|
+
|
|
6577
|
+
// Check if this matcher is still used by any target
|
|
6578
|
+
let matcherStillUsed = false;
|
|
6579
|
+
for (const matcherMap of config.targets.values()) {
|
|
6580
|
+
if (matcherMap.has(matcher)) {
|
|
6581
|
+
matcherStillUsed = true;
|
|
6582
|
+
break;
|
|
6583
|
+
}
|
|
6584
|
+
}
|
|
6585
|
+
|
|
6586
|
+
// If not used anymore, remove from matchers set
|
|
6587
|
+
if (!matcherStillUsed) {
|
|
6588
|
+
config.matchers.delete(matcher);
|
|
6589
|
+
}
|
|
6590
|
+
|
|
6591
|
+
// If no more targets or matchers, detach observer
|
|
6592
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
6593
|
+
_detachObserver(host);
|
|
6594
|
+
}
|
|
6595
|
+
};
|
|
6368
6596
|
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6597
|
+
/**
|
|
6598
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
6599
|
+
*
|
|
6600
|
+
* @param {Object} params - The parameters object.
|
|
6601
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
6602
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6603
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
6604
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
6605
|
+
* @returns {void}
|
|
6606
|
+
* @private
|
|
6607
|
+
*/
|
|
6608
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6609
|
+
// Get a list of all matching attributes on the host element and their values
|
|
6610
|
+
const matchingAttributes = host.getAttributeNames()
|
|
6611
|
+
.filter(attr => matcher(attr))
|
|
6612
|
+
.reduce((acc, attr) => {
|
|
6613
|
+
acc[attr] = host.getAttribute(attr);
|
|
6614
|
+
return acc;
|
|
6615
|
+
}, {});
|
|
6616
|
+
|
|
6617
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
6618
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
6619
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
6620
|
+
target.setAttribute(key, value);
|
|
6621
|
+
if (removeOriginal) {
|
|
6622
|
+
host.removeAttribute(key);
|
|
6623
|
+
}
|
|
6624
|
+
});
|
|
6625
|
+
};
|
|
6373
6626
|
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6627
|
+
/**
|
|
6628
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
6629
|
+
*
|
|
6630
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
6631
|
+
* @returns {MutationObserver} The observer instance.
|
|
6632
|
+
* @private
|
|
6633
|
+
*/
|
|
6634
|
+
const _attachObserver = (host) => {
|
|
6635
|
+
// If an observer for this host already exists, return it
|
|
6636
|
+
if (_observers.has(host)) {
|
|
6637
|
+
return _observers.get(host);
|
|
6638
|
+
}
|
|
6639
|
+
|
|
6640
|
+
// Create a new MutationObserver
|
|
6641
|
+
const observer = new MutationObserver((mutations) => {
|
|
6642
|
+
const config = _transportConfig.get(host);
|
|
6643
|
+
if (!config) return;
|
|
6644
|
+
|
|
6645
|
+
// For each mutation affecting attributes
|
|
6646
|
+
mutations
|
|
6647
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
6648
|
+
.forEach(mutation => {
|
|
6649
|
+
const attributeName = mutation.attributeName;
|
|
6650
|
+
|
|
6651
|
+
// Find matchers that care about this attribute
|
|
6652
|
+
for (const matcher of config.matchers) {
|
|
6653
|
+
if (matcher(attributeName)) {
|
|
6654
|
+
// For each target that uses this matcher
|
|
6655
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
6656
|
+
if (matcherConfigs.has(matcher)) {
|
|
6657
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
6658
|
+
_transportAttributes({
|
|
6659
|
+
host,
|
|
6660
|
+
target,
|
|
6661
|
+
matcher,
|
|
6662
|
+
removeOriginal
|
|
6663
|
+
});
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
}
|
|
6668
|
+
});
|
|
6669
|
+
});
|
|
6378
6670
|
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6671
|
+
// Start observing attribute changes
|
|
6672
|
+
observer.observe(host, { attributes: true });
|
|
6673
|
+
|
|
6674
|
+
// Store the observer
|
|
6675
|
+
_observers.set(host, observer);
|
|
6676
|
+
|
|
6677
|
+
return observer;
|
|
6678
|
+
};
|
|
6383
6679
|
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6680
|
+
/**
|
|
6681
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
6682
|
+
*
|
|
6683
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
6684
|
+
* @private
|
|
6685
|
+
*/
|
|
6686
|
+
const _detachObserver = (host) => {
|
|
6687
|
+
if (_observers.has(host)) {
|
|
6688
|
+
const observer = _observers.get(host);
|
|
6689
|
+
observer.disconnect();
|
|
6690
|
+
_observers.delete(host);
|
|
6691
|
+
}
|
|
6692
|
+
|
|
6693
|
+
// Clean up the transport config as well
|
|
6694
|
+
if (_transportConfig.has(host)) {
|
|
6695
|
+
_transportConfig.delete(host);
|
|
6696
|
+
}
|
|
6697
|
+
};
|
|
6388
6698
|
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6699
|
+
/**
|
|
6700
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
6701
|
+
* @param {HTMLElement} host - The host element
|
|
6702
|
+
* @param {HTMLElement} target - The target element
|
|
6703
|
+
* @param {Function} matcher - The matcher function
|
|
6704
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
6705
|
+
* @private
|
|
6706
|
+
*/
|
|
6707
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
6708
|
+
const config = _transportConfig.get(host);
|
|
6709
|
+
if (!config) return undefined;
|
|
6710
|
+
|
|
6711
|
+
const targetMatchers = config.targets.get(target);
|
|
6712
|
+
if (!targetMatchers) return undefined;
|
|
6713
|
+
|
|
6714
|
+
return targetMatchers.get(matcher);
|
|
6715
|
+
};
|
|
6716
|
+
|
|
6717
|
+
/**
|
|
6718
|
+
* Sets an observed attribute value
|
|
6719
|
+
* @param {HTMLElement} host - The host element
|
|
6720
|
+
* @param {HTMLElement} target - The target element
|
|
6721
|
+
* @param {Function} matcher - The matcher function
|
|
6722
|
+
* @param {string} key - The attribute name
|
|
6723
|
+
* @param {string} value - The attribute value
|
|
6724
|
+
* @private
|
|
6725
|
+
*/
|
|
6726
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
6727
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6728
|
+
if (matcherConfig) {
|
|
6729
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
6393
6730
|
}
|
|
6731
|
+
};
|
|
6732
|
+
|
|
6733
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
6734
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6735
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
6736
|
+
return undefined;
|
|
6737
|
+
};
|
|
6738
|
+
|
|
6739
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
6740
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
6741
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
6742
|
+
return [];
|
|
6743
|
+
};
|
|
6744
|
+
|
|
6745
|
+
const _matchers = {
|
|
6746
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
6747
|
+
'role': attr => attr.match(/^role$/)
|
|
6748
|
+
};
|
|
6749
|
+
|
|
6750
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
6751
|
+
return transportAttributes({
|
|
6752
|
+
host,
|
|
6753
|
+
target,
|
|
6754
|
+
match: attr => {
|
|
6755
|
+
for (const key in _matchers) {
|
|
6756
|
+
if (_matchers[key](attr)) return true;
|
|
6757
|
+
}
|
|
6758
|
+
return false;
|
|
6759
|
+
},
|
|
6760
|
+
removeOriginal
|
|
6761
|
+
});
|
|
6762
|
+
};
|
|
6763
|
+
|
|
6764
|
+
class AuroElement extends LitElement {
|
|
6765
|
+
|
|
6766
|
+
/**
|
|
6767
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
6768
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
6769
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
6770
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
6771
|
+
* @private
|
|
6772
|
+
*/
|
|
6773
|
+
attributeWatcher;
|
|
6394
6774
|
|
|
6395
|
-
// function to define props used within the scope of this component
|
|
6396
6775
|
static get properties() {
|
|
6397
6776
|
return {
|
|
6398
6777
|
|
|
6399
6778
|
/**
|
|
6400
|
-
*
|
|
6779
|
+
* Defines the layout of an element.
|
|
6780
|
+
* @default {'default'}
|
|
6401
6781
|
*/
|
|
6402
|
-
|
|
6403
|
-
type:
|
|
6782
|
+
layout: {
|
|
6783
|
+
type: String,
|
|
6784
|
+
attribute: "layout",
|
|
6404
6785
|
reflect: true
|
|
6405
6786
|
},
|
|
6406
|
-
|
|
6787
|
+
|
|
6407
6788
|
/**
|
|
6408
|
-
*
|
|
6789
|
+
* Defines the shape of an element.
|
|
6790
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
6791
|
+
* @default {'default'}
|
|
6409
6792
|
*/
|
|
6410
|
-
|
|
6411
|
-
type:
|
|
6793
|
+
shape: {
|
|
6794
|
+
type: String,
|
|
6795
|
+
attribute: "shape",
|
|
6412
6796
|
reflect: true
|
|
6413
6797
|
},
|
|
6414
6798
|
|
|
6415
6799
|
/**
|
|
6416
|
-
*
|
|
6800
|
+
* Defines the size of an element.
|
|
6801
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
6802
|
+
* @default {'md'}
|
|
6417
6803
|
*/
|
|
6418
|
-
|
|
6419
|
-
type:
|
|
6420
|
-
|
|
6804
|
+
size: {
|
|
6805
|
+
type: String,
|
|
6806
|
+
attribute: "size",
|
|
6807
|
+
reflect: true
|
|
6808
|
+
},
|
|
6809
|
+
|
|
6810
|
+
/**
|
|
6811
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
6812
|
+
* @default {false}
|
|
6813
|
+
*/
|
|
6814
|
+
onDark: {
|
|
6815
|
+
type: Boolean,
|
|
6816
|
+
attribute: "ondark",
|
|
6817
|
+
reflect: true
|
|
6818
|
+
},
|
|
6819
|
+
|
|
6820
|
+
/**
|
|
6821
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
6822
|
+
* This is used to apply layout and shape classes dynamically.
|
|
6823
|
+
* @type {HTMLElement|null}
|
|
6824
|
+
* @default {null}
|
|
6825
|
+
* @private
|
|
6826
|
+
*/
|
|
6827
|
+
wrapper: {
|
|
6828
|
+
attribute: false,
|
|
6829
|
+
reflect: false
|
|
6830
|
+
}
|
|
6831
|
+
};
|
|
6832
|
+
}
|
|
6833
|
+
|
|
6834
|
+
|
|
6835
|
+
|
|
6836
|
+
resetShapeClasses() {
|
|
6837
|
+
if (this.shape && this.size) {
|
|
6838
|
+
|
|
6839
|
+
if (this.wrapper) {
|
|
6840
|
+
this.wrapper.classList.forEach((className) => {
|
|
6841
|
+
if (className.startsWith('shape-')) {
|
|
6842
|
+
this.wrapper.classList.remove(className);
|
|
6843
|
+
}
|
|
6844
|
+
});
|
|
6845
|
+
|
|
6846
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6849
|
+
}
|
|
6850
|
+
|
|
6851
|
+
resetLayoutClasses() {
|
|
6852
|
+
if (this.layout) {
|
|
6853
|
+
if (this.wrapper) {
|
|
6854
|
+
this.wrapper.classList.forEach((className) => {
|
|
6855
|
+
if (className.startsWith('layout-')) {
|
|
6856
|
+
this.wrapper.classList.remove(className);
|
|
6857
|
+
}
|
|
6858
|
+
});
|
|
6859
|
+
|
|
6860
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6861
|
+
}
|
|
6862
|
+
}
|
|
6863
|
+
}
|
|
6864
|
+
|
|
6865
|
+
updateComponentArchitecture() {
|
|
6866
|
+
this.resetLayoutClasses();
|
|
6867
|
+
this.resetShapeClasses();
|
|
6868
|
+
}
|
|
6869
|
+
|
|
6870
|
+
updated(changedProperties) {
|
|
6871
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6872
|
+
this.updateComponentArchitecture();
|
|
6873
|
+
}
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6876
|
+
firstUpdated() {
|
|
6877
|
+
super.firstUpdated();
|
|
6878
|
+
|
|
6879
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6880
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6881
|
+
|
|
6882
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6883
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6884
|
+
}
|
|
6885
|
+
|
|
6886
|
+
disconnectedCallback() {
|
|
6887
|
+
super.disconnectedCallback();
|
|
6888
|
+
|
|
6889
|
+
// Cleanup the ARIA observer if it exists
|
|
6890
|
+
if (this.attributeWatcher) {
|
|
6891
|
+
this.attributeWatcher.cleanup();
|
|
6892
|
+
this.attributeWatcher = null;
|
|
6893
|
+
}
|
|
6894
|
+
}
|
|
6895
|
+
|
|
6896
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6897
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6898
|
+
render() {
|
|
6899
|
+
try {
|
|
6900
|
+
return this.renderLayout();
|
|
6901
|
+
} catch (error) {
|
|
6902
|
+
// failed to get the defined layout
|
|
6903
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6904
|
+
|
|
6905
|
+
// fallback to the default layout
|
|
6906
|
+
return this.getLayout('default');
|
|
6907
|
+
}
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6910
|
+
|
|
6911
|
+
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}`;
|
|
6912
|
+
|
|
6913
|
+
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)}`;
|
|
6914
|
+
|
|
6915
|
+
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}`;
|
|
6916
|
+
|
|
6917
|
+
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}`;
|
|
6918
|
+
|
|
6919
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6920
|
+
// See LICENSE in the project root for license information.
|
|
6921
|
+
|
|
6922
|
+
// ---------------------------------------------------------------------
|
|
6923
|
+
|
|
6924
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6925
|
+
|
|
6926
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6927
|
+
|
|
6928
|
+
/* eslint-disable jsdoc/require-param */
|
|
6929
|
+
|
|
6930
|
+
/**
|
|
6931
|
+
* This will register a new custom element with the browser.
|
|
6932
|
+
* @param {String} name - The name of the custom element.
|
|
6933
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6934
|
+
* @returns {void}
|
|
6935
|
+
*/
|
|
6936
|
+
registerComponent(name, componentClass) {
|
|
6937
|
+
if (!customElements.get(name)) {
|
|
6938
|
+
customElements.define(name, class extends componentClass {});
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6941
|
+
|
|
6942
|
+
/**
|
|
6943
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6944
|
+
* @returns {void}
|
|
6945
|
+
*/
|
|
6946
|
+
closestElement(
|
|
6947
|
+
selector, // selector like in .closest()
|
|
6948
|
+
base = this, // extra functionality to skip a parent
|
|
6949
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6950
|
+
!el || el === document || el === window
|
|
6951
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6952
|
+
: found
|
|
6953
|
+
? found // found a selector INside this element
|
|
6954
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6955
|
+
) {
|
|
6956
|
+
return __Closest(base);
|
|
6957
|
+
}
|
|
6958
|
+
/* eslint-enable jsdoc/require-param */
|
|
6959
|
+
|
|
6960
|
+
/**
|
|
6961
|
+
* 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.
|
|
6962
|
+
* @param {Object} elem - The element to check.
|
|
6963
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6964
|
+
* @returns {void}
|
|
6965
|
+
*/
|
|
6966
|
+
handleComponentTagRename(elem, tagName) {
|
|
6967
|
+
const tag = tagName.toLowerCase();
|
|
6968
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6969
|
+
|
|
6970
|
+
if (elemTag !== tag) {
|
|
6971
|
+
elem.setAttribute(tag, true);
|
|
6972
|
+
}
|
|
6973
|
+
}
|
|
6974
|
+
|
|
6975
|
+
/**
|
|
6976
|
+
* Validates if an element is a specific Auro component.
|
|
6977
|
+
* @param {Object} elem - The element to validate.
|
|
6978
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6979
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6980
|
+
*/
|
|
6981
|
+
elementMatch(elem, tagName) {
|
|
6982
|
+
const tag = tagName.toLowerCase();
|
|
6983
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6984
|
+
|
|
6985
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6986
|
+
}
|
|
6987
|
+
};
|
|
6988
|
+
|
|
6989
|
+
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}}`;
|
|
6990
|
+
|
|
6991
|
+
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}`;
|
|
6992
|
+
|
|
6993
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6994
|
+
|
|
6995
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6996
|
+
// See LICENSE in the project root for license information.
|
|
6997
|
+
|
|
6998
|
+
|
|
6999
|
+
class AuroLoader extends LitElement {
|
|
7000
|
+
constructor() {
|
|
7001
|
+
super();
|
|
7002
|
+
|
|
7003
|
+
/**
|
|
7004
|
+
* @private
|
|
7005
|
+
*/
|
|
7006
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7007
|
+
|
|
7008
|
+
/**
|
|
7009
|
+
* @private
|
|
7010
|
+
*/
|
|
7011
|
+
this.mdCount = 3;
|
|
7012
|
+
|
|
7013
|
+
/**
|
|
7014
|
+
* @private
|
|
7015
|
+
*/
|
|
7016
|
+
this.smCount = 2;
|
|
7017
|
+
|
|
7018
|
+
/**
|
|
7019
|
+
* @private
|
|
7020
|
+
*/
|
|
7021
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
7022
|
+
|
|
7023
|
+
this.orbit = false;
|
|
7024
|
+
this.ringworm = false;
|
|
7025
|
+
this.laser = false;
|
|
7026
|
+
this.pulse = false;
|
|
7027
|
+
}
|
|
7028
|
+
|
|
7029
|
+
// function to define props used within the scope of this component
|
|
7030
|
+
static get properties() {
|
|
7031
|
+
return {
|
|
7032
|
+
|
|
7033
|
+
/**
|
|
7034
|
+
* Sets loader to laser type.
|
|
7035
|
+
*/
|
|
7036
|
+
laser: {
|
|
7037
|
+
type: Boolean,
|
|
7038
|
+
reflect: true
|
|
7039
|
+
},
|
|
7040
|
+
|
|
7041
|
+
/**
|
|
7042
|
+
* Sets loader to orbit type.
|
|
7043
|
+
*/
|
|
7044
|
+
orbit: {
|
|
7045
|
+
type: Boolean,
|
|
7046
|
+
reflect: true
|
|
7047
|
+
},
|
|
7048
|
+
|
|
7049
|
+
/**
|
|
7050
|
+
* Sets loader to pulse type.
|
|
7051
|
+
*/
|
|
7052
|
+
pulse: {
|
|
7053
|
+
type: Boolean,
|
|
7054
|
+
reflect: true
|
|
6421
7055
|
},
|
|
6422
7056
|
|
|
6423
7057
|
/**
|
|
@@ -6499,14 +7133,13 @@ class AuroLoader extends LitElement {
|
|
|
6499
7133
|
|
|
6500
7134
|
var loaderVersion = '5.0.0';
|
|
6501
7135
|
|
|
6502
|
-
/* eslint-disable max-lines */
|
|
7136
|
+
/* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
|
|
6503
7137
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6504
7138
|
// See LICENSE in the project root for license information.
|
|
6505
7139
|
|
|
6506
7140
|
|
|
6507
7141
|
/**
|
|
6508
7142
|
* @slot - Default slot for the text of the button.
|
|
6509
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
6510
7143
|
* @csspart button - Apply CSS to HTML5 button.
|
|
6511
7144
|
* @csspart loader - Apply CSS to auro-loader.
|
|
6512
7145
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -6515,7 +7148,18 @@ var loaderVersion = '5.0.0';
|
|
|
6515
7148
|
|
|
6516
7149
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
6517
7150
|
|
|
6518
|
-
|
|
7151
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7152
|
+
|
|
7153
|
+
/**
|
|
7154
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7155
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7156
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7157
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7158
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7159
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7160
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7161
|
+
*/
|
|
7162
|
+
class AuroButton extends AuroElement {
|
|
6519
7163
|
|
|
6520
7164
|
/**
|
|
6521
7165
|
* Enables form association for this element.
|
|
@@ -6530,13 +7174,10 @@ class AuroButton extends LitElement {
|
|
|
6530
7174
|
super();
|
|
6531
7175
|
this.autofocus = false;
|
|
6532
7176
|
this.disabled = false;
|
|
6533
|
-
this.iconOnly = false;
|
|
6534
7177
|
this.loading = false;
|
|
7178
|
+
this.size = "md";
|
|
7179
|
+
this.shape = "rounded";
|
|
6535
7180
|
this.onDark = false;
|
|
6536
|
-
this.secondary = false;
|
|
6537
|
-
this.tertiary = false;
|
|
6538
|
-
this.rounded = false;
|
|
6539
|
-
this.slim = false;
|
|
6540
7181
|
this.fluid = false;
|
|
6541
7182
|
this.loadingText = this.loadingText || 'Loading...';
|
|
6542
7183
|
|
|
@@ -6559,49 +7200,59 @@ class AuroButton extends LitElement {
|
|
|
6559
7200
|
* @private
|
|
6560
7201
|
*/
|
|
6561
7202
|
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7203
|
+
|
|
7204
|
+
/**
|
|
7205
|
+
* @private
|
|
7206
|
+
*/
|
|
7207
|
+
this.buttonHref = undefined;
|
|
7208
|
+
|
|
7209
|
+
/**
|
|
7210
|
+
* @private
|
|
7211
|
+
*/
|
|
7212
|
+
this.buttonTarget = undefined;
|
|
7213
|
+
|
|
7214
|
+
/**
|
|
7215
|
+
* @private
|
|
7216
|
+
*/
|
|
7217
|
+
this.buttonRel = undefined;
|
|
6562
7218
|
}
|
|
6563
7219
|
|
|
6564
7220
|
static get styles() {
|
|
6565
7221
|
return [
|
|
6566
7222
|
tokensCss$2,
|
|
6567
7223
|
styleCss$2,
|
|
6568
|
-
colorCss$2
|
|
7224
|
+
colorCss$2,
|
|
7225
|
+
shapeSize
|
|
6569
7226
|
];
|
|
6570
7227
|
}
|
|
6571
7228
|
|
|
6572
7229
|
static get properties() {
|
|
6573
7230
|
return {
|
|
6574
7231
|
|
|
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
|
-
},
|
|
7232
|
+
...super.properties,
|
|
6582
7233
|
|
|
6583
7234
|
/**
|
|
6584
|
-
*
|
|
7235
|
+
* Override layout since it isn't used in this component.
|
|
7236
|
+
* @private
|
|
6585
7237
|
*/
|
|
6586
|
-
|
|
7238
|
+
layout: {
|
|
6587
7239
|
type: Boolean,
|
|
6588
|
-
|
|
7240
|
+
attribute: false,
|
|
7241
|
+
reflect: false
|
|
6589
7242
|
},
|
|
6590
7243
|
|
|
6591
7244
|
/**
|
|
6592
|
-
*
|
|
6593
|
-
* @deprecated
|
|
7245
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6594
7246
|
*/
|
|
6595
|
-
|
|
7247
|
+
autofocus: {
|
|
6596
7248
|
type: Boolean,
|
|
6597
7249
|
reflect: true
|
|
6598
7250
|
},
|
|
6599
7251
|
|
|
6600
7252
|
/**
|
|
6601
|
-
*
|
|
6602
|
-
* @deprecated
|
|
7253
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6603
7254
|
*/
|
|
6604
|
-
|
|
7255
|
+
disabled: {
|
|
6605
7256
|
type: Boolean,
|
|
6606
7257
|
reflect: true
|
|
6607
7258
|
},
|
|
@@ -6609,15 +7260,7 @@ class AuroButton extends LitElement {
|
|
|
6609
7260
|
/**
|
|
6610
7261
|
* Alters the shape of the button to be full width of its parent container.
|
|
6611
7262
|
*/
|
|
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: {
|
|
7263
|
+
fluid: {
|
|
6621
7264
|
type: Boolean,
|
|
6622
7265
|
reflect: true
|
|
6623
7266
|
},
|
|
@@ -6625,7 +7268,7 @@ class AuroButton extends LitElement {
|
|
|
6625
7268
|
/**
|
|
6626
7269
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6627
7270
|
*/
|
|
6628
|
-
loading:
|
|
7271
|
+
loading: {
|
|
6629
7272
|
type: Boolean,
|
|
6630
7273
|
reflect: true
|
|
6631
7274
|
},
|
|
@@ -6633,36 +7276,12 @@ class AuroButton extends LitElement {
|
|
|
6633
7276
|
/**
|
|
6634
7277
|
* 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
7278
|
*/
|
|
6636
|
-
loadingText:
|
|
7279
|
+
loadingText: {
|
|
6637
7280
|
type: String
|
|
6638
7281
|
},
|
|
6639
7282
|
|
|
6640
7283
|
/**
|
|
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.
|
|
7284
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6666
7285
|
*/
|
|
6667
7286
|
tIndex: {
|
|
6668
7287
|
type: String,
|
|
@@ -6670,75 +7289,68 @@ class AuroButton extends LitElement {
|
|
|
6670
7289
|
},
|
|
6671
7290
|
|
|
6672
7291
|
/**
|
|
6673
|
-
* Populates
|
|
7292
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7293
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
7294
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
6674
7295
|
*/
|
|
6675
|
-
|
|
7296
|
+
tabindex: {
|
|
6676
7297
|
type: String,
|
|
6677
|
-
reflect:
|
|
7298
|
+
reflect: false
|
|
6678
7299
|
},
|
|
6679
7300
|
|
|
6680
7301
|
/**
|
|
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.
|
|
7302
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6684
7303
|
*/
|
|
6685
|
-
|
|
7304
|
+
title: {
|
|
6686
7305
|
type: String,
|
|
6687
7306
|
reflect: true
|
|
6688
7307
|
},
|
|
6689
7308
|
|
|
6690
7309
|
/**
|
|
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.
|
|
7310
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6694
7311
|
*/
|
|
6695
|
-
|
|
7312
|
+
type: {
|
|
6696
7313
|
type: String,
|
|
6697
7314
|
reflect: true
|
|
6698
7315
|
},
|
|
6699
7316
|
|
|
6700
7317
|
/**
|
|
6701
|
-
*
|
|
6702
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
6703
|
-
* This is an optional attribute for buttons.
|
|
7318
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6704
7319
|
*/
|
|
6705
|
-
|
|
6706
|
-
type:
|
|
7320
|
+
value: {
|
|
7321
|
+
type: String,
|
|
6707
7322
|
reflect: true
|
|
6708
7323
|
},
|
|
6709
7324
|
|
|
6710
7325
|
/**
|
|
6711
|
-
* Sets
|
|
7326
|
+
* Sets button variant option.
|
|
7327
|
+
* @default primary
|
|
6712
7328
|
*/
|
|
6713
|
-
|
|
7329
|
+
variant: {
|
|
6714
7330
|
type: String,
|
|
6715
7331
|
reflect: true
|
|
6716
7332
|
},
|
|
6717
7333
|
|
|
6718
7334
|
/**
|
|
6719
|
-
*
|
|
7335
|
+
* @private
|
|
6720
7336
|
*/
|
|
6721
|
-
|
|
7337
|
+
buttonHref: {
|
|
6722
7338
|
type: String,
|
|
6723
|
-
reflect: true
|
|
6724
7339
|
},
|
|
6725
7340
|
|
|
6726
7341
|
/**
|
|
6727
|
-
*
|
|
7342
|
+
* @private
|
|
6728
7343
|
*/
|
|
6729
|
-
|
|
7344
|
+
buttonTarget: {
|
|
6730
7345
|
type: String,
|
|
6731
|
-
reflect: true
|
|
6732
7346
|
},
|
|
6733
7347
|
|
|
6734
7348
|
/**
|
|
6735
|
-
*
|
|
7349
|
+
* @private
|
|
6736
7350
|
*/
|
|
6737
|
-
|
|
7351
|
+
buttonRel: {
|
|
6738
7352
|
type: String,
|
|
6739
|
-
reflect: true
|
|
6740
7353
|
},
|
|
6741
|
-
ready: { type: Boolean },
|
|
6742
7354
|
};
|
|
6743
7355
|
}
|
|
6744
7356
|
|
|
@@ -6751,7 +7363,7 @@ class AuroButton extends LitElement {
|
|
|
6751
7363
|
*
|
|
6752
7364
|
*/
|
|
6753
7365
|
static register(name = "auro-button") {
|
|
6754
|
-
AuroLibraryRuntimeUtils$
|
|
7366
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6755
7367
|
}
|
|
6756
7368
|
|
|
6757
7369
|
/**
|
|
@@ -6763,17 +7375,6 @@ class AuroButton extends LitElement {
|
|
|
6763
7375
|
this.renderRoot.querySelector('button').focus();
|
|
6764
7376
|
}
|
|
6765
7377
|
|
|
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
7378
|
/**
|
|
6778
7379
|
* Submits the form that this button is associated with.
|
|
6779
7380
|
* @private
|
|
@@ -6794,28 +7395,63 @@ class AuroButton extends LitElement {
|
|
|
6794
7395
|
return this.internals ? this.internals.form : null;
|
|
6795
7396
|
}
|
|
6796
7397
|
|
|
6797
|
-
|
|
7398
|
+
/**
|
|
7399
|
+
* @private
|
|
7400
|
+
* @returns {Boolean}
|
|
7401
|
+
*/
|
|
7402
|
+
get hideText() {
|
|
7403
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
7404
|
+
}
|
|
7405
|
+
|
|
7406
|
+
/**
|
|
7407
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7408
|
+
* @returns {string | undefined}
|
|
7409
|
+
* @private
|
|
7410
|
+
*/
|
|
7411
|
+
get currentAriaLabel() {
|
|
7412
|
+
if (!this.attributeWatcher) return undefined;
|
|
7413
|
+
|
|
7414
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7415
|
+
return ariaLabel || undefined;
|
|
7416
|
+
}
|
|
7417
|
+
|
|
7418
|
+
/**
|
|
7419
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7420
|
+
* @returns {string | undefined}
|
|
7421
|
+
* @private
|
|
7422
|
+
*/
|
|
7423
|
+
get currentAriaLabelledBy() {
|
|
7424
|
+
if (!this.attributeWatcher) return undefined;
|
|
7425
|
+
|
|
7426
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7427
|
+
return ariaLabelledBy || undefined;
|
|
7428
|
+
}
|
|
7429
|
+
|
|
7430
|
+
/**
|
|
7431
|
+
* Renders the default layout for the button.
|
|
7432
|
+
* @returns {TemplateResult}
|
|
7433
|
+
* @private
|
|
7434
|
+
*/
|
|
7435
|
+
renderLayoutDefault() {
|
|
6798
7436
|
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
|
|
7437
|
+
"util_insetLg--squish": true,
|
|
7438
|
+
"auro-button": true,
|
|
7439
|
+
"icon-only": this.hideText,
|
|
7440
|
+
wrapper: true,
|
|
7441
|
+
loading: this.loading,
|
|
6807
7442
|
};
|
|
6808
7443
|
|
|
7444
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
7445
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
7446
|
+
|
|
6809
7447
|
return html$1`
|
|
6810
|
-
|
|
6811
|
-
part="
|
|
6812
|
-
aria-
|
|
6813
|
-
aria-
|
|
6814
|
-
|
|
6815
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
6816
|
-
tabIndex="${ifDefined(this.tIndex)}"
|
|
7448
|
+
<${tag}
|
|
7449
|
+
part="${part}"
|
|
7450
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7451
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7452
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
6817
7453
|
?autofocus="${this.autofocus}"
|
|
6818
|
-
class
|
|
7454
|
+
class=${classMap(classes)}
|
|
6819
7455
|
?disabled="${this.disabled || this.loading}"
|
|
6820
7456
|
?onDark="${this.onDark}"
|
|
6821
7457
|
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
@@ -6824,28 +7460,36 @@ class AuroButton extends LitElement {
|
|
|
6824
7460
|
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6825
7461
|
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6826
7462
|
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7463
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
7464
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
7465
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
6827
7466
|
>
|
|
6828
7467
|
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6829
7468
|
|
|
6830
7469
|
<span class="contentWrapper">
|
|
6831
7470
|
<span class="textSlot" part="text">
|
|
6832
|
-
|
|
6833
|
-
</span>
|
|
6834
|
-
|
|
6835
|
-
<span part="icon">
|
|
6836
|
-
<slot name="icon"></slot>
|
|
7471
|
+
<slot></slot>
|
|
6837
7472
|
</span>
|
|
6838
7473
|
</span>
|
|
6839
|
-
|
|
7474
|
+
</${tag}>
|
|
6840
7475
|
`;
|
|
6841
7476
|
}
|
|
7477
|
+
|
|
7478
|
+
/**
|
|
7479
|
+
* Renders the layout of the button.
|
|
7480
|
+
* @returns {TemplateResult}
|
|
7481
|
+
* @private
|
|
7482
|
+
*/
|
|
7483
|
+
renderLayout() {
|
|
7484
|
+
return this.renderLayoutDefault();
|
|
7485
|
+
}
|
|
6842
7486
|
}
|
|
6843
7487
|
|
|
6844
|
-
var buttonVersion = '
|
|
7488
|
+
var buttonVersion = '11.0.0';
|
|
6845
7489
|
|
|
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-
|
|
7490
|
+
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
7491
|
|
|
6848
|
-
var styleCss = css`.helptext-wrapper{display:none;font-size:
|
|
7492
|
+
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
7493
|
|
|
6850
7494
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6851
7495
|
|
|
@@ -7109,6 +7753,7 @@ class AuroInput extends BaseInput {
|
|
|
7109
7753
|
*/
|
|
7110
7754
|
get commonLabelClasses() {
|
|
7111
7755
|
return {
|
|
7756
|
+
'is-disabled': this.disabled,
|
|
7112
7757
|
'withValue': this.value && this.value.length > 0,
|
|
7113
7758
|
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7114
7759
|
};
|
|
@@ -7117,7 +7762,7 @@ class AuroInput extends BaseInput {
|
|
|
7117
7762
|
/**
|
|
7118
7763
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
7119
7764
|
* @private
|
|
7120
|
-
* @returns {object} - Returns classmap
|
|
7765
|
+
* @returns {object} - Returns classmap.
|
|
7121
7766
|
*/
|
|
7122
7767
|
get commonInputClasses() {
|
|
7123
7768
|
return {
|
|
@@ -7126,25 +7771,46 @@ class AuroInput extends BaseInput {
|
|
|
7126
7771
|
}
|
|
7127
7772
|
|
|
7128
7773
|
/**
|
|
7129
|
-
* Returns classmap configuration for html5 inputs in
|
|
7774
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
7130
7775
|
* @private
|
|
7131
|
-
* @
|
|
7776
|
+
* @returns {object} - Returns classmap.
|
|
7132
7777
|
*/
|
|
7133
7778
|
get legacyInputClasses() {
|
|
7134
7779
|
return {
|
|
7135
|
-
...this.commonInputClasses
|
|
7136
|
-
'util_displayHiddenVisually': !this.hasFocus && !this.value
|
|
7780
|
+
...this.commonInputClasses
|
|
7137
7781
|
};
|
|
7138
7782
|
}
|
|
7139
7783
|
|
|
7784
|
+
/**
|
|
7785
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
7786
|
+
* @private
|
|
7787
|
+
* @returns {object} - Returns classmap.
|
|
7788
|
+
*/
|
|
7140
7789
|
get commonWrapperClasses() {
|
|
7141
7790
|
return {
|
|
7142
7791
|
'wrapper': true,
|
|
7792
|
+
'simple': this.simple,
|
|
7143
7793
|
'withValue': this.value && this.value.length > 0,
|
|
7144
7794
|
'hasFocus': this.hasFocus
|
|
7145
7795
|
};
|
|
7146
7796
|
}
|
|
7147
7797
|
|
|
7798
|
+
/**
|
|
7799
|
+
* Returns classmap configuration for accent elements in each layout.
|
|
7800
|
+
* @private
|
|
7801
|
+
* @returns {object} - Returns classmap.
|
|
7802
|
+
*/
|
|
7803
|
+
get commonAccentClasses() {
|
|
7804
|
+
return {
|
|
7805
|
+
'util_displayHidden': false
|
|
7806
|
+
};
|
|
7807
|
+
}
|
|
7808
|
+
|
|
7809
|
+
/**
|
|
7810
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
7811
|
+
* @private
|
|
7812
|
+
* @returns {object} - Returns classmap.
|
|
7813
|
+
*/
|
|
7148
7814
|
get helpTextClasses() {
|
|
7149
7815
|
return {
|
|
7150
7816
|
'helpTextWrapper': true,
|
|
@@ -7162,7 +7828,7 @@ class AuroInput extends BaseInput {
|
|
|
7162
7828
|
*
|
|
7163
7829
|
*/
|
|
7164
7830
|
static register(name = "auro-input") {
|
|
7165
|
-
AuroLibraryRuntimeUtils$
|
|
7831
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroInput);
|
|
7166
7832
|
}
|
|
7167
7833
|
|
|
7168
7834
|
/**
|
|
@@ -7184,7 +7850,12 @@ class AuroInput extends BaseInput {
|
|
|
7184
7850
|
* @returns {void}
|
|
7185
7851
|
*/
|
|
7186
7852
|
checkDisplayValueSlotChange() {
|
|
7187
|
-
|
|
7853
|
+
let nodes = this.shadowRoot.querySelector('slot[name="displayValue"]').assignedNodes();
|
|
7854
|
+
|
|
7855
|
+
// Handle when DisplayValue is multi-level slot content (e.g. combobox passing displayValue to input)
|
|
7856
|
+
if (nodes[0].tagName === 'SLOT') {
|
|
7857
|
+
nodes = nodes[0].assignedNodes();
|
|
7858
|
+
}
|
|
7188
7859
|
|
|
7189
7860
|
let hasContent = false;
|
|
7190
7861
|
|
|
@@ -7235,28 +7906,34 @@ class AuroInput extends BaseInput {
|
|
|
7235
7906
|
: this.commonInputClasses;
|
|
7236
7907
|
|
|
7237
7908
|
return html$1`
|
|
7238
|
-
<label for=${this.
|
|
7909
|
+
<label for=${this.inputId} class="${classMap(this.commonLabelClasses)}" part="label">
|
|
7239
7910
|
<slot name="label">
|
|
7240
7911
|
${this.label}
|
|
7241
7912
|
</slot>
|
|
7913
|
+
${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7242
7914
|
</label>
|
|
7915
|
+
|
|
7916
|
+
<!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
|
|
7243
7917
|
<input
|
|
7244
7918
|
@blur="${this.handleBlur}"
|
|
7245
7919
|
@focusin="${this.handleFocusin}"
|
|
7246
7920
|
@focusout="${this.handleFocusout}"
|
|
7247
7921
|
@input="${this.handleInput}"
|
|
7922
|
+
.placeholder=${this.placeholderStr}
|
|
7923
|
+
.role=${this.a11yRole}
|
|
7248
7924
|
?activeLabel="${this.activeLabel}"
|
|
7249
7925
|
?disabled="${this.disabled}"
|
|
7250
7926
|
?required="${this.required}"
|
|
7251
|
-
|
|
7927
|
+
aria-controls=${ifDefined(this.a11yControls)}
|
|
7252
7928
|
aria-describedby="${this.uniqueId}"
|
|
7929
|
+
aria-expanded=${ifDefined(this.a11yExpanded)}
|
|
7253
7930
|
aria-invalid="${this.validity !== 'valid'}"
|
|
7254
|
-
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7255
7931
|
autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
|
|
7932
|
+
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7256
7933
|
autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
|
|
7257
7934
|
class="${classMap(inputOverrideClasses)}"
|
|
7258
7935
|
id="${this.inputId}"
|
|
7259
|
-
|
|
7936
|
+
inputmode="${ifDefined(this.inputmode ? this.inputmode : undefined)}"
|
|
7260
7937
|
lang="${ifDefined(this.lang)}"
|
|
7261
7938
|
maxlength="${ifDefined(this.maxLength ? this.maxLength : undefined)}"
|
|
7262
7939
|
minlength="${ifDefined(this.minLength ? this.minLength : undefined)}"
|
|
@@ -7264,7 +7941,8 @@ class AuroInput extends BaseInput {
|
|
|
7264
7941
|
part="input"
|
|
7265
7942
|
pattern="${ifDefined(this.definePattern())}"
|
|
7266
7943
|
spellcheck="${ifDefined(this.spellcheck ? this.spellcheck : undefined)}"
|
|
7267
|
-
type="${this.type ===
|
|
7944
|
+
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
7945
|
+
/>
|
|
7268
7946
|
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7269
7947
|
<div class="displayValueWrapper">
|
|
7270
7948
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
@@ -7286,11 +7964,12 @@ class AuroInput extends BaseInput {
|
|
|
7286
7964
|
?onDark="${this.onDark}"
|
|
7287
7965
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
7288
7966
|
class="notificationBtn clearBtn"
|
|
7289
|
-
|
|
7290
|
-
|
|
7967
|
+
shape="circle"
|
|
7968
|
+
size="sm"
|
|
7969
|
+
variant="ghost">
|
|
7291
7970
|
<${this.iconTag}
|
|
7971
|
+
?customColor="${this.onDark}"
|
|
7292
7972
|
category="interface"
|
|
7293
|
-
customColor
|
|
7294
7973
|
name="x-lg"
|
|
7295
7974
|
>
|
|
7296
7975
|
</${this.iconTag}>
|
|
@@ -7308,22 +7987,23 @@ class AuroInput extends BaseInput {
|
|
|
7308
7987
|
return html$1`
|
|
7309
7988
|
<div class="notification">
|
|
7310
7989
|
<${this.buttonTag}
|
|
7311
|
-
@click="${this.handleClickShowPassword}
|
|
7990
|
+
@click="${this.handleClickShowPassword}"
|
|
7312
7991
|
?onDark="${this.onDark}"
|
|
7313
|
-
aria-hidden="true"
|
|
7314
7992
|
class="notificationBtn passwordBtn"
|
|
7315
|
-
|
|
7316
|
-
|
|
7993
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
7994
|
+
shape="circle"
|
|
7995
|
+
size="sm"
|
|
7996
|
+
variant="ghost">
|
|
7317
7997
|
<${this.iconTag}
|
|
7998
|
+
?customColor="${this.onDark}"
|
|
7318
7999
|
?hidden=${!this.showPassword}
|
|
7319
8000
|
category="interface"
|
|
7320
|
-
customColor
|
|
7321
8001
|
name="hide-password-stroke">
|
|
7322
8002
|
</${this.iconTag}>
|
|
7323
8003
|
<${this.iconTag}
|
|
8004
|
+
?customColor="${this.onDark}"
|
|
7324
8005
|
?hidden=${this.showPassword}
|
|
7325
8006
|
category="interface"
|
|
7326
|
-
customColor
|
|
7327
8007
|
name="view-password-stroke">
|
|
7328
8008
|
</${this.iconTag}>
|
|
7329
8009
|
</${this.buttonTag}>
|
|
@@ -7382,7 +8062,7 @@ class AuroInput extends BaseInput {
|
|
|
7382
8062
|
? html$1`
|
|
7383
8063
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7384
8064
|
<p id="${this.uniqueId}" part="helpText">
|
|
7385
|
-
<slot name="
|
|
8065
|
+
<slot name="helpText">${this.getHelpText()}</slot>
|
|
7386
8066
|
</p>
|
|
7387
8067
|
</${this.helpTextTag}>
|
|
7388
8068
|
`
|
|
@@ -7398,24 +8078,30 @@ class AuroInput extends BaseInput {
|
|
|
7398
8078
|
}
|
|
7399
8079
|
|
|
7400
8080
|
/**
|
|
7401
|
-
* Returns HTML for the
|
|
8081
|
+
* Returns HTML for the classic layout.
|
|
7402
8082
|
* @private
|
|
7403
|
-
* @returns {import("lit").TemplateResult} - Returns HTML for the
|
|
8083
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7404
8084
|
*/
|
|
7405
8085
|
renderLayoutClassic() {
|
|
8086
|
+
const classicClassMap = {
|
|
8087
|
+
...this.commonWrapperClasses,
|
|
8088
|
+
'thin': !this.simple
|
|
8089
|
+
};
|
|
8090
|
+
|
|
7406
8091
|
return html$1`
|
|
7407
8092
|
<div
|
|
7408
8093
|
@click="${this.handleClick}"
|
|
7409
|
-
class="${classMap(
|
|
8094
|
+
class="${classMap(classicClassMap)}"
|
|
7410
8095
|
part="wrapper">
|
|
7411
|
-
<div class="accents left">
|
|
8096
|
+
<div part="accent-left" class="accents left ${classMap(this.commonAccentClasses)}">
|
|
7412
8097
|
${this.renderHtmlTypeIcon()}
|
|
7413
8098
|
</div>
|
|
7414
8099
|
<div class="mainContent">
|
|
7415
8100
|
${this.renderHtmlInput(true)}
|
|
7416
8101
|
</div>
|
|
7417
|
-
<div class="accents right">
|
|
8102
|
+
<div part="accent-right" class="accents right ${classMap(this.commonAccentClasses)}">
|
|
7418
8103
|
${this.renderValidationErrorIconHtml()}
|
|
8104
|
+
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
7419
8105
|
${this.hasValue ? html$1`
|
|
7420
8106
|
${!this.disabled && !this.readonly ? html$1`
|
|
7421
8107
|
${this.renderHtmlActionClear()}
|
|
@@ -7440,7 +8126,7 @@ class AuroInput extends BaseInput {
|
|
|
7440
8126
|
@click="${this.handleClick}"
|
|
7441
8127
|
class="${classMap(this.commonWrapperClasses)}"
|
|
7442
8128
|
part="wrapper">
|
|
7443
|
-
<div class="accents left">
|
|
8129
|
+
<div class="accents left ${this.commonAccentClasses}">
|
|
7444
8130
|
${this.layout.includes('left') ? html$1`
|
|
7445
8131
|
${this.renderValidationErrorIconHtml()}
|
|
7446
8132
|
` : undefined}
|
|
@@ -7448,7 +8134,7 @@ class AuroInput extends BaseInput {
|
|
|
7448
8134
|
<div class="mainContent">
|
|
7449
8135
|
${this.renderHtmlInput()}
|
|
7450
8136
|
</div>
|
|
7451
|
-
<div class="accents right">
|
|
8137
|
+
<div class="accents right ${this.commonAccentClasses}">
|
|
7452
8138
|
${this.layout.includes('right') || this.layout === "emphasized" ? html$1`
|
|
7453
8139
|
${this.renderValidationErrorIconHtml()}
|
|
7454
8140
|
` : undefined}
|