@aurodesignsystem-dev/auro-formkit 0.0.0-pr622.1 → 0.0.0-pr624.1
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/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +2 -2
- package/components/bibtemplate/dist/registered.js +2 -2
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +14 -3
- package/components/checkbox/demo/index.min.js +14 -3
- 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 +5 -1
- package/components/checkbox/dist/index.js +14 -3
- package/components/checkbox/dist/registered.js +14 -3
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.md +3 -0
- package/components/combobox/demo/api.min.js +1479 -395
- package/components/combobox/demo/index.html +2 -0
- package/components/combobox/demo/index.md +75 -0
- package/components/combobox/demo/index.min.js +1479 -395
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +19 -9
- package/components/combobox/dist/index.js +1471 -387
- package/components/combobox/dist/registered.js +1471 -387
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +433 -104
- package/components/counter/demo/index.min.js +433 -104
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +433 -104
- package/components/counter/dist/registered.js +433 -104
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.min.js +1157 -376
- package/components/datepicker/demo/index.min.js +1157 -376
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/index.js +1156 -375
- package/components/datepicker/dist/registered.js +1156 -375
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.md +59 -35
- package/components/dropdown/demo/api.min.js +361 -88
- package/components/dropdown/demo/index.md +52 -0
- package/components/dropdown/demo/index.min.js +361 -88
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +70 -21
- package/components/dropdown/dist/index.js +331 -58
- package/components/dropdown/dist/registered.js +331 -58
- package/components/dropdown/dist/styles/default/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +2 -2
- package/components/input/demo/api.md +76 -64
- package/components/input/demo/api.min.js +747 -295
- package/components/input/demo/index.html +1 -1
- package/components/input/demo/index.md +49 -4
- package/components/input/demo/index.min.js +747 -295
- package/components/input/demo/readme.md +2 -2
- package/components/input/dist/auro-input.d.ts +97 -3
- package/components/input/dist/base-input.d.ts +36 -18
- package/components/input/dist/index.js +681 -229
- package/components/input/dist/registered.js +681 -229
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/dist/styles/default/borders-css.d.ts +2 -0
- package/components/input/dist/styles/default/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/input-css.d.ts +2 -0
- package/components/input/dist/styles/default/label-css.d.ts +2 -0
- package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
- package/components/input/dist/styles/default/style-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/layoutElement/dist/auroElement.d.ts +34 -0
- package/components/layoutElement/dist/index.d.ts +1 -0
- package/components/layoutElement/dist/index.js +1 -0
- package/components/layoutElement/dist/registered.js +1 -0
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.min.js +2 -2
- package/components/menu/demo/index.min.js +2 -2
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +2 -2
- package/components/menu/dist/registered.js +2 -2
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.md +8 -0
- package/components/radio/demo/api.min.js +13 -5
- package/components/radio/demo/index.min.js +13 -5
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/auro-radio.d.ts +4 -0
- package/components/radio/dist/index.js +13 -5
- package/components/radio/dist/registered.js +13 -5
- package/components/select/README.md +1 -1
- package/components/select/demo/api.html +15 -0
- package/components/select/demo/api.md +178 -0
- package/components/select/demo/api.min.js +403 -62
- package/components/select/demo/index.html +15 -0
- package/components/select/demo/index.md +177 -0
- package/components/select/demo/index.min.js +403 -62
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/auro-select.d.ts +27 -0
- package/components/select/dist/index.js +400 -58
- package/components/select/dist/registered.js +400 -58
- package/package.json +2 -2
- /package/components/{dropdown/dist/styles/bibColors-css.d.ts → combobox/dist/styles/emphasized/style-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/bibStyles-css.d.ts → combobox/dist/styles/snowflake/style-css.d.ts} +0 -0
- /package/components/{input/dist/styles/borders-css.d.ts → dropdown/dist/styles/default/bibColors-css.d.ts} +0 -0
- /package/components/{input/dist/styles/label-css.d.ts → dropdown/dist/styles/default/bibStyles-css.d.ts} +0 -0
- /package/components/{input/dist/styles/notificationIcons-css.d.ts → dropdown/dist/styles/default/color-css.d.ts} +0 -0
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
import { css, LitElement, html } from 'lit';
|
|
1
2
|
import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
|
|
2
3
|
import { repeat } from 'lit/directives/repeat.js';
|
|
3
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
var shapeSizeCss = css`.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:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl{min-height:72px;max-height:72px;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}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl{min-height:72px;max-height:72px;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}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-md{min-height:72px;max-height:72px;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}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md{min-height:72px;max-height:72px;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}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md{min-height:72px;max-height:72px;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}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}`;
|
|
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}`;
|
|
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}.layoutDefault label,:host(:not([layout])) label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.layoutDefault :host(:not([bordered])) label,:host(:not([layout])) :host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}.layoutDefault :host(:not([bordered])) label.withIcon,:host(:not([layout])) :host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([class=layoutDefault][bordered]) label,:host(:not([layout])[bordered]) label{top:50%;transform:translateY(-50%)}:host([class=layoutDefault][bordered]) label.withIcon,:host(:not([layout])[bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([class=layoutDefault][bordered]) label:not(label.withIcon),:host(:not([layout])[bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}.layoutDefault .wrapper:focus-within label,:host(:not([layout])) .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}.layoutDefault label.withValue,:host(:not([layout])) label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}:host([class=layoutDefault][activeLabel]) .wrapper label,:host(:not([layout])[activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}.layoutDefault input,:host(:not([layout])) input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:var(--ds-size-200, 1rem);max-height:var(--ds-size-200, 1rem);flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-basic-text-body-default-font-family, AS Circular);font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px);outline:none;text-overflow:ellipsis;white-space:nowrap}.layoutDefault input::-ms-reveal,.layoutDefault input::-ms-clear,:host(:not([layout])) input::-ms-reveal,:host(:not([layout])) input::-ms-clear{display:none}.layoutDefault input::-webkit-outer-spin-button,.layoutDefault input::-webkit-inner-spin-button,:host(:not([layout])) input::-webkit-outer-spin-button,:host(:not([layout])) input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.layoutDefault input[type=number],:host(:not([layout])) input[type=number]{-moz-appearance:textfield;appearance:textfield}.layoutDefault input:disabled,:host(:not([layout])) input:disabled{background:none;pointer-events:none}:host([class=layoutDefault][bordered]) input,:host(:not([layout])[bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}: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
|
+
|
|
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-text-color);caret-color:var(--ds-auro-input-caret-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-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
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)}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
16
|
+
|
|
17
|
+
var classicStyleCss = css`.layout-classic{display:flex;flex-direction:row}.layout-classic .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;flex:1;cursor:text}.layout-classic .mainContent label{cursor:text;padding-top:4px;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{font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);padding-bottom:8px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);height:auto}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{justify-self:flex-start;padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;line-height:0;padding-bottom:0}.layout-classic .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-classic .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-classic .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color);justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}.layout-classic .accents.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}`;
|
|
18
|
+
|
|
19
|
+
var classicColorCss = css`.layout-default label{color:var(--ds-auro-input-label-text-color)}`;
|
|
20
|
+
|
|
21
|
+
var emphasizedStyleCss = css`:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{background:unset;width:100%;padding:0;border:0;outline:none;overflow:hidden;text-overflow:ellipsis}: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 .accents,.layout-emphasized-left .accents,.layout-emphasized-right .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.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
|
+
|
|
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
|
+
|
|
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}`;
|
|
6
26
|
|
|
7
27
|
const watchedItems = new Set();
|
|
8
28
|
|
|
@@ -125,12 +145,6 @@ function stopNotifyingOnLangChange(element) {
|
|
|
125
145
|
watchedItems.delete(element);
|
|
126
146
|
}
|
|
127
147
|
|
|
128
|
-
var styleCss$4 = css`: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}.typeIcon{display:flex;flex-direction:row;align-items:center}.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)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.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))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.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}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .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(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(: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([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}:host{position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:var(--ds-size-200, 1rem);max-height:var(--ds-size-200, 1rem);flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-basic-text-body-default-font-family, "AS Circular");font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px);outline:none;text-overflow:ellipsis;white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
|
|
129
|
-
|
|
130
|
-
var colorCss$4 = css`.wrapper{border-color:transparent}input{background-color:transparent;caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}input::placeholder{color:transparent}input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}input:disabled{--ds-auro-input-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}label{color:var(--ds-auro-input-label-text-color)}.alertNotification{color:var(--ds-auro-input-error-icon-color)}:host(:not([bordered],[borderless])) .wrapper{border-bottom-color:var(--ds-auro-input-border-color)}:host([bordered]) .wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-container-color)}:host([bordered]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-advanced-color-state-focused, #01426a);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([disabled]){--ds-auro-input-border-color: var(--ds-basic-color-border-subtle, #dddddd);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark][bordered]){--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-muted, #ccd2db);--ds-auro-input-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-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([onDark][bordered]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([onDark][validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([onDark][disabled]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}`;
|
|
131
|
-
|
|
132
|
-
var tokensCss$4 = css`:host{--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--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)}`;
|
|
133
|
-
|
|
134
148
|
/** Checks if value is string */
|
|
135
149
|
function isString(str) {
|
|
136
150
|
return typeof str === 'string' || str instanceof String;
|
|
@@ -4817,6 +4831,98 @@ class AuroFormValidation {
|
|
|
4817
4831
|
}
|
|
4818
4832
|
}
|
|
4819
4833
|
|
|
4834
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
4835
|
+
static get properties() {
|
|
4836
|
+
return {
|
|
4837
|
+
|
|
4838
|
+
/**
|
|
4839
|
+
* Defines the language of an element.
|
|
4840
|
+
* @default {'default'}
|
|
4841
|
+
*/
|
|
4842
|
+
layout: {
|
|
4843
|
+
type: String,
|
|
4844
|
+
attribute: "layout",
|
|
4845
|
+
reflect: true
|
|
4846
|
+
},
|
|
4847
|
+
|
|
4848
|
+
shape: {
|
|
4849
|
+
type: String,
|
|
4850
|
+
attribute: "shape",
|
|
4851
|
+
reflect: true
|
|
4852
|
+
},
|
|
4853
|
+
|
|
4854
|
+
size: {
|
|
4855
|
+
type: String,
|
|
4856
|
+
attribute: "size",
|
|
4857
|
+
reflect: true
|
|
4858
|
+
},
|
|
4859
|
+
|
|
4860
|
+
onDark: {
|
|
4861
|
+
type: Boolean,
|
|
4862
|
+
attribute: "ondark",
|
|
4863
|
+
reflect: true
|
|
4864
|
+
}
|
|
4865
|
+
};
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4868
|
+
resetShapeClasses() {
|
|
4869
|
+
if (this.shape && this.size) {
|
|
4870
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4871
|
+
|
|
4872
|
+
if (wrapper) {
|
|
4873
|
+
wrapper.classList.forEach((className) => {
|
|
4874
|
+
if (className.startsWith('shape-')) {
|
|
4875
|
+
wrapper.classList.remove(className);
|
|
4876
|
+
}
|
|
4877
|
+
});
|
|
4878
|
+
|
|
4879
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4880
|
+
}
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
|
|
4884
|
+
resetLayoutClasses() {
|
|
4885
|
+
if (this.layout) {
|
|
4886
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4887
|
+
|
|
4888
|
+
if (wrapper) {
|
|
4889
|
+
wrapper.classList.forEach((className) => {
|
|
4890
|
+
if (className.startsWith('layout-')) {
|
|
4891
|
+
wrapper.classList.remove(className);
|
|
4892
|
+
}
|
|
4893
|
+
});
|
|
4894
|
+
|
|
4895
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
4896
|
+
}
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
updateComponentArchitecture() {
|
|
4901
|
+
this.resetLayoutClasses();
|
|
4902
|
+
this.resetShapeClasses();
|
|
4903
|
+
}
|
|
4904
|
+
|
|
4905
|
+
updated(changedProperties) {
|
|
4906
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
4907
|
+
this.updateComponentArchitecture();
|
|
4908
|
+
}
|
|
4909
|
+
}
|
|
4910
|
+
|
|
4911
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
4912
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
4913
|
+
render() {
|
|
4914
|
+
try {
|
|
4915
|
+
return this.renderLayout();
|
|
4916
|
+
} catch (error) {
|
|
4917
|
+
// failed to get the defined layout
|
|
4918
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
4919
|
+
|
|
4920
|
+
// fallback to the default layout
|
|
4921
|
+
return this.getLayout('default');
|
|
4922
|
+
}
|
|
4923
|
+
}
|
|
4924
|
+
};
|
|
4925
|
+
|
|
4820
4926
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4821
4927
|
// See LICENSE in the project root for license information.
|
|
4822
4928
|
|
|
@@ -4824,9 +4930,6 @@ class AuroFormValidation {
|
|
|
4824
4930
|
/**
|
|
4825
4931
|
* Auro-input provides users a way to enter data into a text field.
|
|
4826
4932
|
*
|
|
4827
|
-
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
4828
|
-
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
4829
|
-
*
|
|
4830
4933
|
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
4831
4934
|
* @attr id
|
|
4832
4935
|
*
|
|
@@ -4842,22 +4945,26 @@ class AuroFormValidation {
|
|
|
4842
4945
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
4843
4946
|
*/
|
|
4844
4947
|
|
|
4845
|
-
class BaseInput extends
|
|
4948
|
+
class BaseInput extends AuroElement$1 {
|
|
4846
4949
|
|
|
4847
4950
|
constructor() {
|
|
4848
4951
|
super();
|
|
4849
4952
|
|
|
4953
|
+
this.activeLabel = false;
|
|
4850
4954
|
this.icon = false;
|
|
4851
4955
|
this.disabled = false;
|
|
4852
|
-
this.required = false;
|
|
4853
|
-
this.noValidate = false;
|
|
4854
4956
|
this.max = undefined;
|
|
4855
|
-
this.min = undefined;
|
|
4856
4957
|
this.maxLength = undefined;
|
|
4958
|
+
this.min = undefined;
|
|
4857
4959
|
this.minLength = undefined;
|
|
4960
|
+
this.noValidate = false;
|
|
4858
4961
|
this.onDark = false;
|
|
4859
|
-
this.
|
|
4962
|
+
this.required = false;
|
|
4860
4963
|
this.setCustomValidityForType = undefined;
|
|
4964
|
+
|
|
4965
|
+
this.layout = 'classic';
|
|
4966
|
+
this.shape = 'rounded';
|
|
4967
|
+
this.size = 'lg';
|
|
4861
4968
|
}
|
|
4862
4969
|
|
|
4863
4970
|
/**
|
|
@@ -4874,6 +4981,7 @@ class BaseInput extends LitElement {
|
|
|
4874
4981
|
this.validationCCLength = undefined;
|
|
4875
4982
|
this.hasValue = false;
|
|
4876
4983
|
this.label = 'Input label is undefined';
|
|
4984
|
+
this.placeholderStr = '';
|
|
4877
4985
|
|
|
4878
4986
|
this.allowedInputTypes = [
|
|
4879
4987
|
"text",
|
|
@@ -4920,9 +5028,10 @@ class BaseInput extends LitElement {
|
|
|
4920
5028
|
.substring(idSubstrStart, idSubstrEnd);
|
|
4921
5029
|
}
|
|
4922
5030
|
|
|
4923
|
-
// function to define props used within the scope of this
|
|
5031
|
+
// function to define props used within the scope of this component
|
|
4924
5032
|
static get properties() {
|
|
4925
5033
|
return {
|
|
5034
|
+
...super.properties,
|
|
4926
5035
|
|
|
4927
5036
|
/**
|
|
4928
5037
|
* The value for the role attribute.
|
|
@@ -5254,15 +5363,6 @@ class BaseInput extends LitElement {
|
|
|
5254
5363
|
};
|
|
5255
5364
|
}
|
|
5256
5365
|
|
|
5257
|
-
|
|
5258
|
-
static get styles() {
|
|
5259
|
-
return [
|
|
5260
|
-
css`${colorCss$4}`,
|
|
5261
|
-
css`${styleCss$4}`,
|
|
5262
|
-
css`${tokensCss$4}`
|
|
5263
|
-
];
|
|
5264
|
-
}
|
|
5265
|
-
|
|
5266
5366
|
connectedCallback() {
|
|
5267
5367
|
super.connectedCallback();
|
|
5268
5368
|
|
|
@@ -5277,15 +5377,21 @@ class BaseInput extends LitElement {
|
|
|
5277
5377
|
}
|
|
5278
5378
|
|
|
5279
5379
|
firstUpdated() {
|
|
5380
|
+
// clicking anywhere in the main wrapper will focus the input. Clicking the helptext or label will not focus the input.
|
|
5381
|
+
this.wrapperElement = this.shadowRoot.querySelector('.wrapper');
|
|
5382
|
+
this.inputElement = this.renderRoot.querySelector('input');
|
|
5383
|
+
this.labelElement = this.shadowRoot.querySelector('label');
|
|
5384
|
+
|
|
5385
|
+
if (this.wrapperElement) {
|
|
5386
|
+
this.wrapperElement.addEventListener('click', this.handleClick);
|
|
5387
|
+
}
|
|
5388
|
+
|
|
5280
5389
|
// add attribute for query selectors when auro-input is registered under a custom name
|
|
5281
5390
|
if (this.tagName.toLowerCase() !== 'auro-input') {
|
|
5282
5391
|
this.setAttribute('auro-input', true);
|
|
5283
5392
|
}
|
|
5284
5393
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
5285
5394
|
|
|
5286
|
-
this.inputElement = this.renderRoot.querySelector('input');
|
|
5287
|
-
this.labelElement = this.shadowRoot.querySelector('label');
|
|
5288
|
-
|
|
5289
5395
|
if (this.format) {
|
|
5290
5396
|
this.format = this.format.toLowerCase();
|
|
5291
5397
|
}
|
|
@@ -5295,6 +5401,7 @@ class BaseInput extends LitElement {
|
|
|
5295
5401
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
5296
5402
|
}
|
|
5297
5403
|
|
|
5404
|
+
this.getPlaceholder();
|
|
5298
5405
|
this.setCustomHelpTextMessage();
|
|
5299
5406
|
this.configureAutoFormatting();
|
|
5300
5407
|
}
|
|
@@ -5331,6 +5438,8 @@ class BaseInput extends LitElement {
|
|
|
5331
5438
|
* @returns {void}
|
|
5332
5439
|
*/
|
|
5333
5440
|
updated(changedProperties) {
|
|
5441
|
+
super.updated(changedProperties);
|
|
5442
|
+
|
|
5334
5443
|
if (changedProperties.has('format')) {
|
|
5335
5444
|
this.configureAutoFormatting();
|
|
5336
5445
|
}
|
|
@@ -5451,15 +5560,6 @@ class BaseInput extends LitElement {
|
|
|
5451
5560
|
return this.pattern;
|
|
5452
5561
|
}
|
|
5453
5562
|
|
|
5454
|
-
/**
|
|
5455
|
-
* Function to set element focus.
|
|
5456
|
-
* @private
|
|
5457
|
-
* @return {void}
|
|
5458
|
-
*/
|
|
5459
|
-
focus() {
|
|
5460
|
-
this.inputElement.focus();
|
|
5461
|
-
}
|
|
5462
|
-
|
|
5463
5563
|
/**
|
|
5464
5564
|
* Required to convert SVG icons from data to HTML string.
|
|
5465
5565
|
* @private
|
|
@@ -5489,6 +5589,25 @@ class BaseInput extends LitElement {
|
|
|
5489
5589
|
this.dispatchEvent(inputEvent);
|
|
5490
5590
|
}
|
|
5491
5591
|
|
|
5592
|
+
|
|
5593
|
+
/**
|
|
5594
|
+
* Handles clicking on the auro-input anywhere outside of the HTML5 input and still moving focus in.
|
|
5595
|
+
* @private
|
|
5596
|
+
* @return {void}
|
|
5597
|
+
*/
|
|
5598
|
+
handleClick() {
|
|
5599
|
+
this.focus();
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
/**
|
|
5603
|
+
* Function to set element focus.
|
|
5604
|
+
* @private
|
|
5605
|
+
* @return {void}
|
|
5606
|
+
*/
|
|
5607
|
+
focus() {
|
|
5608
|
+
this.inputElement.focus();
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5492
5611
|
/**
|
|
5493
5612
|
* Handles event of clearing input content by clicking the X icon.
|
|
5494
5613
|
* @private
|
|
@@ -5536,10 +5655,23 @@ class BaseInput extends LitElement {
|
|
|
5536
5655
|
* @return {void}
|
|
5537
5656
|
*/
|
|
5538
5657
|
handleFocusin() {
|
|
5658
|
+
this.hasFocus = true;
|
|
5659
|
+
|
|
5660
|
+
this.getPlaceholder();
|
|
5539
5661
|
|
|
5540
5662
|
this.touched = true;
|
|
5541
5663
|
}
|
|
5542
5664
|
|
|
5665
|
+
/**
|
|
5666
|
+
* Function to support @focusout event.
|
|
5667
|
+
* @private
|
|
5668
|
+
* @return {void}
|
|
5669
|
+
*/
|
|
5670
|
+
handleFocusout() {
|
|
5671
|
+
this.hasFocus = false;
|
|
5672
|
+
this.getPlaceholder();
|
|
5673
|
+
}
|
|
5674
|
+
|
|
5543
5675
|
/**
|
|
5544
5676
|
* Function to support @blur event.
|
|
5545
5677
|
* @private
|
|
@@ -5664,16 +5796,31 @@ class BaseInput extends LitElement {
|
|
|
5664
5796
|
/**
|
|
5665
5797
|
* Support placeholder text.
|
|
5666
5798
|
* @private
|
|
5667
|
-
* @returns {
|
|
5799
|
+
* @returns {void}
|
|
5668
5800
|
*/
|
|
5669
5801
|
getPlaceholder() {
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5802
|
+
const isFocused = this.inputElement === this.getActiveElement();
|
|
5803
|
+
|
|
5804
|
+
// console.warn('isFocused', isFocused);
|
|
5805
|
+
// console.warn(this.inputElement);
|
|
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 = '';
|
|
5674
5818
|
}
|
|
5675
5819
|
|
|
5676
|
-
|
|
5820
|
+
this.requestUpdate();
|
|
5821
|
+
|
|
5822
|
+
// console.warn('this.placeholderStr', this.placeholderStr);
|
|
5823
|
+
// return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
|
|
5677
5824
|
}
|
|
5678
5825
|
|
|
5679
5826
|
/**
|
|
@@ -6028,7 +6175,7 @@ class BaseIcon extends AuroElement {
|
|
|
6028
6175
|
|
|
6029
6176
|
var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
6030
6177
|
|
|
6031
|
-
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)}`;
|
|
6178
|
+
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)}`;
|
|
6032
6179
|
|
|
6033
6180
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6034
6181
|
// See LICENSE in the project root for license information.
|
|
@@ -6199,7 +6346,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6199
6346
|
|
|
6200
6347
|
var iconVersion = '8.0.1';
|
|
6201
6348
|
|
|
6202
|
-
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;height:var(--ds-size-300, 1.5rem);width:var(--ds-size-300, 1.5rem)}:host([variant=flat]) .auro-button{height:100%;width:100%}::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);font-family:var(--ds-basic-text-body-default-font-family, AS Circular);font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight,
|
|
6349
|
+
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;height:var(--ds-size-300, 1.5rem);width:var(--ds-size-300, 1.5rem)}:host([variant=flat]) .auro-button{height:100%;width:100%}::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);font-family:var(--ds-basic-text-body-default-font-family, "AS Circular");font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);line-height:var(--ds-basic-text-body-default-line-height, 24px);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);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}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible{outline:none}.auro-button:focus-visible:not([variant=flat]){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=flat]):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=flat]{height:unset;width:unset;min-height:unset;max-height:unset;min-width:unset;max-width:unset;border:0;border-radius:unset;gap:unset;padding: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--slim{padding:var(--ds-size-100, 0.5rem) var(--ds-size-200, 1rem);font-family:var(--ds-basic-text-body-sm-font-family, "AS Circular");font-size:var(--ds-basic-text-body-sm-font-size, 14px);font-weight:var(--ds-basic-text-body-sm-font-weight, 450);line-height:var(--ds-basic-text-body-sm-line-height, 20px);letter-spacing:var(--ds-basic-text-body-sm-letter-spacing, 0);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]){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:all 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{border-radius:100px}: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}`;
|
|
6203
6350
|
|
|
6204
6351
|
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=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[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=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}`;
|
|
6205
6352
|
|
|
@@ -6358,27 +6505,6 @@ var loaderVersion = '5.0.0';
|
|
|
6358
6505
|
|
|
6359
6506
|
|
|
6360
6507
|
/**
|
|
6361
|
-
* @attr {Boolean} autofocus - This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user
|
|
6362
|
-
* @attr {Boolean} disabled - If set to true, button will become disabled and not allow for interactions
|
|
6363
|
-
* @attr {Boolean} iconOnly - If set to true, the button will contain an icon with no additional content
|
|
6364
|
-
* @attr {Boolean} loading - If set to true button text will be replaced with `auro-loader` and become disabled
|
|
6365
|
-
* @attr {String} loadingText - 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.
|
|
6366
|
-
* @attr {Boolean} onDark - Set value for on-dark version of auro-button
|
|
6367
|
-
* @attr {Boolean} rounded - If set to true, the button will have a rounded shape
|
|
6368
|
-
* @attr {Boolean} slim - Set value for slim version of auro-button
|
|
6369
|
-
* @attr {Boolean} fluid - Alters the shape of the button to be full width of its parent container
|
|
6370
|
-
* @attr {String} arialabel - Populates the `aria-label` attribute that is used to define a string that labels the current element. Use it in cases where a text label is not visible on the screen. If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
6371
|
-
* @attr {String} arialabelledby - Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s), and its value should be one or more element IDs, which refer to elements that have the text needed for labeling. List multiple element IDs in a space delimited fashion.
|
|
6372
|
-
* @attr {Boolean} ariaexpanded - Populates the `aria-expanded` attribute that indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. This is an optional attribute for buttons.
|
|
6373
|
-
* @attr {String} id - Set the unique ID of an element.
|
|
6374
|
-
* @attr {String} title - Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6375
|
-
* @attr {String} type - The type of the button. Possible values are: `submit`, `reset`, `button`
|
|
6376
|
-
* @attr {String} value - Defines the value associated with the button which is submitted with the form data.
|
|
6377
|
-
* @attr {String} variant - Sets button variant option. Possible values are: `secondary`, `tertiary`
|
|
6378
|
-
* @attr {Boolean} secondary - DEPRECATED
|
|
6379
|
-
* @attr {Boolean} tertiary - DEPRECATED
|
|
6380
|
-
* @prop {Boolean} ready - When false the component API should not be called.
|
|
6381
|
-
* @event auroButton-ready - Notifies that the component has finished initializing.
|
|
6382
6508
|
* @slot - Default slot for the text of the button.
|
|
6383
6509
|
* @slot icon - Slot to provide auro-icon for the button.
|
|
6384
6510
|
* @csspart button - Apply CSS to HTML5 button.
|
|
@@ -6402,13 +6528,11 @@ class AuroButton extends LitElement {
|
|
|
6402
6528
|
|
|
6403
6529
|
constructor() {
|
|
6404
6530
|
super();
|
|
6405
|
-
|
|
6406
6531
|
this.autofocus = false;
|
|
6407
6532
|
this.disabled = false;
|
|
6408
6533
|
this.iconOnly = false;
|
|
6409
6534
|
this.loading = false;
|
|
6410
6535
|
this.onDark = false;
|
|
6411
|
-
this.ready = false;
|
|
6412
6536
|
this.secondary = false;
|
|
6413
6537
|
this.tertiary = false;
|
|
6414
6538
|
this.rounded = false;
|
|
@@ -6447,73 +6571,169 @@ class AuroButton extends LitElement {
|
|
|
6447
6571
|
|
|
6448
6572
|
static get properties() {
|
|
6449
6573
|
return {
|
|
6574
|
+
|
|
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
|
+
*/
|
|
6450
6578
|
autofocus: {
|
|
6451
6579
|
type: Boolean,
|
|
6452
6580
|
reflect: true
|
|
6453
6581
|
},
|
|
6582
|
+
|
|
6583
|
+
/**
|
|
6584
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6585
|
+
*/
|
|
6454
6586
|
disabled: {
|
|
6455
6587
|
type: Boolean,
|
|
6456
6588
|
reflect: true
|
|
6457
6589
|
},
|
|
6590
|
+
|
|
6591
|
+
/**
|
|
6592
|
+
* DEPRECATED.
|
|
6593
|
+
* @deprecated
|
|
6594
|
+
*/
|
|
6458
6595
|
secondary: {
|
|
6459
6596
|
type: Boolean,
|
|
6460
6597
|
reflect: true
|
|
6461
6598
|
},
|
|
6599
|
+
|
|
6600
|
+
/**
|
|
6601
|
+
* DEPRECATED.
|
|
6602
|
+
* @deprecated
|
|
6603
|
+
*/
|
|
6462
6604
|
tertiary: {
|
|
6463
6605
|
type: Boolean,
|
|
6464
6606
|
reflect: true
|
|
6465
6607
|
},
|
|
6608
|
+
|
|
6609
|
+
/**
|
|
6610
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6611
|
+
*/
|
|
6466
6612
|
fluid: {
|
|
6467
6613
|
type: Boolean,
|
|
6468
6614
|
reflect: true
|
|
6469
6615
|
},
|
|
6616
|
+
|
|
6617
|
+
/**
|
|
6618
|
+
* If set to true, the button will contain an icon with no additional content.
|
|
6619
|
+
*/
|
|
6470
6620
|
iconOnly: {
|
|
6471
6621
|
type: Boolean,
|
|
6472
6622
|
reflect: true
|
|
6473
6623
|
},
|
|
6624
|
+
|
|
6625
|
+
/**
|
|
6626
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6627
|
+
*/
|
|
6474
6628
|
loading: {
|
|
6475
6629
|
type: Boolean,
|
|
6476
6630
|
reflect: true
|
|
6477
6631
|
},
|
|
6632
|
+
|
|
6633
|
+
/**
|
|
6634
|
+
* 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
|
+
*/
|
|
6478
6636
|
loadingText: {
|
|
6479
6637
|
type: String
|
|
6480
6638
|
},
|
|
6639
|
+
|
|
6640
|
+
/**
|
|
6641
|
+
* Set value for on-dark version of auro-button.
|
|
6642
|
+
*/
|
|
6481
6643
|
onDark: {
|
|
6482
6644
|
type: Boolean,
|
|
6483
6645
|
reflect: true
|
|
6484
6646
|
},
|
|
6647
|
+
|
|
6648
|
+
/**
|
|
6649
|
+
* If set to true, the button will have a rounded shape.
|
|
6650
|
+
*/
|
|
6485
6651
|
rounded: {
|
|
6486
6652
|
type: Boolean,
|
|
6487
6653
|
reflect: true
|
|
6488
6654
|
},
|
|
6655
|
+
|
|
6656
|
+
/**
|
|
6657
|
+
* Set value for slim version of auro-button.
|
|
6658
|
+
*/
|
|
6489
6659
|
slim: {
|
|
6490
6660
|
type: Boolean,
|
|
6491
6661
|
reflect: true
|
|
6492
6662
|
},
|
|
6663
|
+
|
|
6664
|
+
/**
|
|
6665
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
6666
|
+
*/
|
|
6667
|
+
tIndex: {
|
|
6668
|
+
type: String,
|
|
6669
|
+
reflect: true
|
|
6670
|
+
},
|
|
6671
|
+
|
|
6672
|
+
/**
|
|
6673
|
+
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
6674
|
+
*/
|
|
6675
|
+
ariahidden: {
|
|
6676
|
+
type: String,
|
|
6677
|
+
reflect: true,
|
|
6678
|
+
},
|
|
6679
|
+
|
|
6680
|
+
/**
|
|
6681
|
+
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
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.
|
|
6684
|
+
*/
|
|
6493
6685
|
arialabel: {
|
|
6494
6686
|
type: String,
|
|
6495
6687
|
reflect: true
|
|
6496
6688
|
},
|
|
6689
|
+
|
|
6690
|
+
/**
|
|
6691
|
+
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
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.
|
|
6694
|
+
*/
|
|
6497
6695
|
arialabelledby: {
|
|
6498
6696
|
type: String,
|
|
6499
6697
|
reflect: true
|
|
6500
6698
|
},
|
|
6699
|
+
|
|
6700
|
+
/**
|
|
6701
|
+
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
6702
|
+
* or another grouping element it controls, is currently expanded or collapsed.
|
|
6703
|
+
* This is an optional attribute for buttons.
|
|
6704
|
+
*/
|
|
6501
6705
|
ariaexpanded: {
|
|
6502
6706
|
type: Boolean,
|
|
6503
6707
|
reflect: true
|
|
6504
6708
|
},
|
|
6709
|
+
|
|
6710
|
+
/**
|
|
6711
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6712
|
+
*/
|
|
6505
6713
|
title: {
|
|
6506
6714
|
type: String,
|
|
6507
6715
|
reflect: true
|
|
6508
6716
|
},
|
|
6717
|
+
|
|
6718
|
+
/**
|
|
6719
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6720
|
+
*/
|
|
6509
6721
|
type: {
|
|
6510
6722
|
type: String,
|
|
6511
6723
|
reflect: true
|
|
6512
6724
|
},
|
|
6725
|
+
|
|
6726
|
+
/**
|
|
6727
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6728
|
+
*/
|
|
6513
6729
|
value: {
|
|
6514
6730
|
type: String,
|
|
6515
6731
|
reflect: true
|
|
6516
6732
|
},
|
|
6733
|
+
|
|
6734
|
+
/**
|
|
6735
|
+
* Sets button variant option. Possible values are: `secondary`, `tertiary`.
|
|
6736
|
+
*/
|
|
6517
6737
|
variant: {
|
|
6518
6738
|
type: String,
|
|
6519
6739
|
reflect: true
|
|
@@ -6543,21 +6763,6 @@ class AuroButton extends LitElement {
|
|
|
6543
6763
|
this.renderRoot.querySelector('button').focus();
|
|
6544
6764
|
}
|
|
6545
6765
|
|
|
6546
|
-
/**
|
|
6547
|
-
* Marks the component as ready and sends event.
|
|
6548
|
-
* @private
|
|
6549
|
-
* @returns {void}
|
|
6550
|
-
*/
|
|
6551
|
-
notifyReady() {
|
|
6552
|
-
this.ready = true;
|
|
6553
|
-
|
|
6554
|
-
this.dispatchEvent(new CustomEvent('auroButton-ready', {
|
|
6555
|
-
bubbles: true,
|
|
6556
|
-
cancelable: false,
|
|
6557
|
-
composed: true,
|
|
6558
|
-
}));
|
|
6559
|
-
}
|
|
6560
|
-
|
|
6561
6766
|
updated() {
|
|
6562
6767
|
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
6563
6768
|
if (this.secondary) {
|
|
@@ -6569,10 +6774,6 @@ class AuroButton extends LitElement {
|
|
|
6569
6774
|
}
|
|
6570
6775
|
}
|
|
6571
6776
|
|
|
6572
|
-
firstUpdated() {
|
|
6573
|
-
this.notifyReady();
|
|
6574
|
-
}
|
|
6575
|
-
|
|
6576
6777
|
/**
|
|
6577
6778
|
* Submits the form that this button is associated with.
|
|
6578
6779
|
* @private
|
|
@@ -6587,7 +6788,7 @@ class AuroButton extends LitElement {
|
|
|
6587
6788
|
/**
|
|
6588
6789
|
* Returns the form element that this button is associated with.
|
|
6589
6790
|
* @private
|
|
6590
|
-
* @returns {HTMLFormElement|null}
|
|
6791
|
+
* @returns {HTMLFormElement | null}
|
|
6591
6792
|
*/
|
|
6592
6793
|
get form() {
|
|
6593
6794
|
return this.internals ? this.internals.form : null;
|
|
@@ -6608,9 +6809,11 @@ class AuroButton extends LitElement {
|
|
|
6608
6809
|
return html$1`
|
|
6609
6810
|
<button
|
|
6610
6811
|
part="button"
|
|
6812
|
+
aria-hidden="${ifDefined(this.ariahidden || undefined)}"
|
|
6611
6813
|
aria-label="${ifDefined(this.loading ? this.loadingText : this.arialabel || undefined)}"
|
|
6612
6814
|
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
6613
6815
|
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
6816
|
+
tabIndex="${ifDefined(this.tIndex)}"
|
|
6614
6817
|
?autofocus="${this.autofocus}"
|
|
6615
6818
|
class="${classMap(classes)}"
|
|
6616
6819
|
?disabled="${this.disabled || this.loading}"
|
|
@@ -6866,19 +7069,78 @@ class AuroInput extends BaseInput {
|
|
|
6866
7069
|
/**
|
|
6867
7070
|
* @private
|
|
6868
7071
|
*/
|
|
6869
|
-
this.
|
|
7072
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
6870
7073
|
|
|
6871
7074
|
/**
|
|
6872
7075
|
* @private
|
|
6873
7076
|
*/
|
|
6874
|
-
this.
|
|
7077
|
+
this.hasDisplayValueContent = false;
|
|
6875
7078
|
|
|
6876
7079
|
/**
|
|
6877
7080
|
* @private
|
|
6878
7081
|
*/
|
|
6879
7082
|
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
7083
|
+
|
|
7084
|
+
/**
|
|
7085
|
+
* @private
|
|
7086
|
+
*/
|
|
7087
|
+
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
|
|
7088
|
+
}
|
|
7089
|
+
|
|
7090
|
+
static get styles() {
|
|
7091
|
+
return [
|
|
7092
|
+
css`${shapeSizeCss}`,
|
|
7093
|
+
css`${colorBaseCss}`,
|
|
7094
|
+
css`${styleCss$4}`,
|
|
7095
|
+
css`${styleDefaultCss}`,
|
|
7096
|
+
css`${tokensCss$4}`,
|
|
7097
|
+
css`${classicStyleCss}`,
|
|
7098
|
+
css`${classicColorCss}`,
|
|
7099
|
+
css`${emphasizedStyleCss}`,
|
|
7100
|
+
css`${emphasizedColorCss}`,
|
|
7101
|
+
css`${snowflakeStyleCss}`
|
|
7102
|
+
];
|
|
6880
7103
|
}
|
|
6881
7104
|
|
|
7105
|
+
/**
|
|
7106
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7107
|
+
* @private
|
|
7108
|
+
* @returns {void}
|
|
7109
|
+
*/
|
|
7110
|
+
get commonLabelClasses() {
|
|
7111
|
+
return {
|
|
7112
|
+
'withValue': this.value && this.value.length > 0,
|
|
7113
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7114
|
+
};
|
|
7115
|
+
}
|
|
7116
|
+
|
|
7117
|
+
/**
|
|
7118
|
+
* Returns classmap configuration for html5 inputs in all layouts.
|
|
7119
|
+
* @private
|
|
7120
|
+
* @returns {void}
|
|
7121
|
+
*/
|
|
7122
|
+
get commonInputClasses() {
|
|
7123
|
+
return {
|
|
7124
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
7125
|
+
};
|
|
7126
|
+
}
|
|
7127
|
+
|
|
7128
|
+
get commonWrapperClasses() {
|
|
7129
|
+
return {
|
|
7130
|
+
'wrapper': true,
|
|
7131
|
+
'withValue': this.value && this.value.length > 0,
|
|
7132
|
+
'hasFocus': this.hasFocus
|
|
7133
|
+
};
|
|
7134
|
+
}
|
|
7135
|
+
|
|
7136
|
+
get helpTextClasses() {
|
|
7137
|
+
return {
|
|
7138
|
+
'helpTextWrapper': true,
|
|
7139
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
7140
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
7141
|
+
};
|
|
7142
|
+
};
|
|
7143
|
+
|
|
6882
7144
|
/**
|
|
6883
7145
|
* This will register this element with the browser.
|
|
6884
7146
|
* @param {string} [name="auro-input"] - The name of element that you want to register to.
|
|
@@ -6904,160 +7166,350 @@ class AuroInput extends BaseInput {
|
|
|
6904
7166
|
return false;
|
|
6905
7167
|
}
|
|
6906
7168
|
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
7169
|
+
/**
|
|
7170
|
+
* Function to determine if there is any displayValue content to render.
|
|
7171
|
+
* @private
|
|
7172
|
+
* @returns {void}
|
|
7173
|
+
*/
|
|
7174
|
+
checkDisplayValueSlotChange() {
|
|
7175
|
+
const nodes = this.shadowRoot.querySelector('slot[name="displayValue"]').assignedNodes();
|
|
7176
|
+
|
|
7177
|
+
let hasContent = false;
|
|
7178
|
+
|
|
7179
|
+
if (nodes.length > 0) {
|
|
7180
|
+
hasContent = true;
|
|
7181
|
+
}
|
|
7182
|
+
|
|
7183
|
+
this.hasDisplayValueContent = hasContent;
|
|
7184
|
+
}
|
|
7185
|
+
|
|
7186
|
+
/**
|
|
7187
|
+
* Returns HTML for the validation error icon.
|
|
7188
|
+
* @private
|
|
7189
|
+
* @returns {html} - Returns HTML for the validation error icon.
|
|
7190
|
+
*/
|
|
7191
|
+
renderValidationErrorIconHtml() {
|
|
7192
|
+
return html$1`
|
|
7193
|
+
${this.validity && this.validity !== 'valid' ? html$1`
|
|
7194
|
+
<div class="notification alertNotification">
|
|
7195
|
+
<${this.iconTag}
|
|
7196
|
+
category="alert"
|
|
7197
|
+
name="error-stroke"
|
|
7198
|
+
variant="statusError"
|
|
7199
|
+
?ondark="${this.onDark}">
|
|
7200
|
+
</${this.iconTag}>
|
|
7201
|
+
</div>
|
|
7202
|
+
` : undefined}
|
|
7203
|
+
`;
|
|
7204
|
+
}
|
|
7205
|
+
|
|
7206
|
+
/**
|
|
7207
|
+
* Returns HTML for the HTML5 input element.
|
|
7208
|
+
* @private
|
|
7209
|
+
* @param {boolean} [hideInputWhenBlurred=false] - If true, the input will be visually hidden when not focused and has no value.
|
|
7210
|
+
* @returns {html} - Returns HTML for the HTML5 input element.
|
|
7211
|
+
*/
|
|
7212
|
+
renderHtmlInput(hideInputWhenBlurred = false) {
|
|
7213
|
+
const displayValueClasses = {
|
|
7214
|
+
'displayValue': true,
|
|
7215
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7216
|
+
'hasFocus': this.hasFocus,
|
|
7217
|
+
'withValue': this.value && this.value.length > 0,
|
|
7218
|
+
};
|
|
7219
|
+
|
|
7220
|
+
const inputClasses = {
|
|
7221
|
+
'util_displayHiddenVisually': hideInputWhenBlurred && !this.hasFocus && !this.value
|
|
6914
7222
|
};
|
|
6915
7223
|
|
|
6916
7224
|
return html$1`
|
|
6917
|
-
<
|
|
6918
|
-
<
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
7225
|
+
<label for=${this.id} class="${classMap(this.commonLabelClasses)}" part="label">
|
|
7226
|
+
<slot name="label">
|
|
7227
|
+
${this.label}
|
|
7228
|
+
</slot>
|
|
7229
|
+
</label>
|
|
7230
|
+
<input
|
|
7231
|
+
@blur="${this.handleBlur}"
|
|
7232
|
+
@focusin="${this.handleFocusin}"
|
|
7233
|
+
@focusout="${this.handleFocusout}"
|
|
7234
|
+
@input="${this.handleInput}"
|
|
7235
|
+
?activeLabel="${this.activeLabel}"
|
|
7236
|
+
?disabled="${this.disabled}"
|
|
7237
|
+
?required="${this.required}"
|
|
7238
|
+
.placeholder=${this.placeholderStr}
|
|
7239
|
+
aria-describedby="${this.uniqueId}"
|
|
7240
|
+
aria-invalid="${this.validity !== 'valid'}"
|
|
7241
|
+
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
7242
|
+
autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
|
|
7243
|
+
autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
|
|
7244
|
+
class="${classMap(inputClasses)}"
|
|
7245
|
+
id="${this.inputId}"
|
|
7246
|
+
inputMode="${ifDefined(this.inputMode ? this.inputMode : undefined)}"
|
|
7247
|
+
lang="${ifDefined(this.lang)}"
|
|
7248
|
+
maxlength="${ifDefined(this.maxLength ? this.maxLength : undefined)}"
|
|
7249
|
+
minlength="${ifDefined(this.minLength ? this.minLength : undefined)}"
|
|
7250
|
+
name="${ifDefined(this.name)}"
|
|
7251
|
+
part="input"
|
|
7252
|
+
pattern="${ifDefined(this.definePattern())}"
|
|
7253
|
+
spellcheck="${ifDefined(this.spellcheck ? this.spellcheck : undefined)}"
|
|
7254
|
+
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}" />
|
|
7255
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7256
|
+
<div class="displayValueWrapper">
|
|
7257
|
+
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
7258
|
+
</div>
|
|
7259
|
+
</div>
|
|
7260
|
+
`;
|
|
7261
|
+
}
|
|
6936
7262
|
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
7263
|
+
/**
|
|
7264
|
+
* Returns HTML for the clear action button.
|
|
7265
|
+
* @private
|
|
7266
|
+
* @returns {html} - Returns HTML for the clear action button.
|
|
7267
|
+
*/
|
|
7268
|
+
renderHtmlActionClear() {
|
|
7269
|
+
return html$1`
|
|
7270
|
+
<div class="notification clear">
|
|
7271
|
+
<${this.buttonTag}
|
|
7272
|
+
@click="${this.handleClickClear}"
|
|
7273
|
+
?onDark="${this.onDark}"
|
|
7274
|
+
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
7275
|
+
class="notificationBtn clearBtn"
|
|
7276
|
+
tabindex="-1"
|
|
7277
|
+
variant="flat">
|
|
7278
|
+
<${this.iconTag}
|
|
7279
|
+
category="interface"
|
|
7280
|
+
customColor
|
|
7281
|
+
name="x-lg"
|
|
7282
|
+
>
|
|
7283
|
+
</${this.iconTag}>
|
|
7284
|
+
</${this.buttonTag}>
|
|
7285
|
+
</div>
|
|
7286
|
+
`;
|
|
7287
|
+
}
|
|
7288
|
+
|
|
7289
|
+
/**
|
|
7290
|
+
* Returns HTML for the show password button.
|
|
7291
|
+
* @private
|
|
7292
|
+
* @returns {html} - Returns HTML for the show password button.
|
|
7293
|
+
*/
|
|
7294
|
+
renderHtmlNotificationPassword() {
|
|
7295
|
+
return html$1`
|
|
7296
|
+
<div class="notification">
|
|
7297
|
+
<${this.buttonTag}
|
|
7298
|
+
@click="${this.handleClickShowPassword}
|
|
7299
|
+
?onDark="${this.onDark}"
|
|
7300
|
+
aria-hidden="true"
|
|
7301
|
+
class="notificationBtn passwordBtn"
|
|
7302
|
+
tabindex="-1"
|
|
7303
|
+
variant="flat">
|
|
7304
|
+
<${this.iconTag}
|
|
7305
|
+
?hidden=${!this.showPassword}
|
|
7306
|
+
category="interface"
|
|
7307
|
+
customColor
|
|
7308
|
+
name="hide-password-stroke">
|
|
7309
|
+
</${this.iconTag}>
|
|
7310
|
+
<${this.iconTag}
|
|
7311
|
+
?hidden=${this.showPassword}
|
|
7312
|
+
category="interface"
|
|
7313
|
+
customColor
|
|
7314
|
+
name="view-password-stroke">
|
|
7315
|
+
</${this.iconTag}>
|
|
7316
|
+
</${this.buttonTag}>
|
|
7317
|
+
</div>
|
|
7318
|
+
`;
|
|
7319
|
+
}
|
|
7320
|
+
|
|
7321
|
+
/**
|
|
7322
|
+
* Returns HTML for the input type icon.
|
|
7323
|
+
* @private
|
|
7324
|
+
* @returns {html} - Returns HTML for the input type icon.
|
|
7325
|
+
*/
|
|
7326
|
+
renderHtmlTypeIcon() {
|
|
7327
|
+
return html$1`
|
|
7328
|
+
<div class="typeIcon">
|
|
7329
|
+
${this.type === 'credit-card' ? this.processCreditCard() : undefined}
|
|
7330
|
+
|
|
7331
|
+
<!-- The repeat() method is used below in order to force auro-icon to re-render when the name value is updated.
|
|
7332
|
+
This should be cleaned up when auro-icon issue #31 is resolved. -->
|
|
7333
|
+
${this.inputIconName
|
|
7334
|
+
? repeat([this.inputIconName], (val) => val, (name) => html$1`
|
|
7335
|
+
<${this.iconTag}
|
|
7336
|
+
?onDark="${this.onDark}"
|
|
7337
|
+
category="payment"
|
|
7338
|
+
class="accentIcon"
|
|
7339
|
+
name="${name}"
|
|
7340
|
+
part="accentIcon"
|
|
7341
|
+
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
7342
|
+
</${this.iconTag}>
|
|
7343
|
+
`) : undefined
|
|
7344
|
+
}
|
|
7345
|
+
${this.type === 'date'
|
|
7346
|
+
? html$1`
|
|
7347
|
+
<${this.iconTag}
|
|
7348
|
+
?onDark="${this.onDark}"
|
|
7349
|
+
category="interface"
|
|
7350
|
+
class="accentIcon"
|
|
7351
|
+
name="calendar"
|
|
7352
|
+
part="accentIcon"
|
|
7353
|
+
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
7354
|
+
</${this.iconTag}>`
|
|
7355
|
+
: undefined
|
|
7356
|
+
}
|
|
7357
|
+
</div>
|
|
7358
|
+
`;
|
|
7359
|
+
}
|
|
7360
|
+
|
|
7361
|
+
/**
|
|
7362
|
+
* Returns HTML for the help text and error message.
|
|
7363
|
+
* @private
|
|
7364
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
7365
|
+
*/
|
|
7366
|
+
renderHtmlHelpText() {
|
|
7367
|
+
return html$1`
|
|
7368
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7369
|
+
? html$1`
|
|
7370
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7371
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
7372
|
+
<slot name="helptext">${this.getHelpText()}</slot>
|
|
7373
|
+
</p>
|
|
7374
|
+
</${this.helpTextTag}>
|
|
7375
|
+
`
|
|
7376
|
+
: html$1`
|
|
7377
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7378
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7379
|
+
${this.errorMessage}
|
|
7380
|
+
</p>
|
|
7381
|
+
</${this.helpTextTag}>
|
|
7382
|
+
`
|
|
7383
|
+
}
|
|
7384
|
+
`;
|
|
7385
|
+
}
|
|
7386
|
+
|
|
7387
|
+
/**
|
|
7388
|
+
* Returns HTML for the default layout.
|
|
7389
|
+
* @private
|
|
7390
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the default layout.
|
|
7391
|
+
*/
|
|
7392
|
+
renderLayoutClassic() {
|
|
7393
|
+
return html$1`
|
|
7394
|
+
<div
|
|
7395
|
+
@click="${this.handleClick}"
|
|
7396
|
+
class="${classMap(this.commonWrapperClasses)} thin"
|
|
7397
|
+
part="wrapper">
|
|
7398
|
+
<div class="accents left">
|
|
7399
|
+
${this.renderHtmlTypeIcon()}
|
|
6983
7400
|
</div>
|
|
6984
|
-
<div
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
${this.
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
7401
|
+
<div class="mainContent">
|
|
7402
|
+
${this.renderHtmlInput(true)}
|
|
7403
|
+
</div>
|
|
7404
|
+
<div class="accents right">
|
|
7405
|
+
${this.renderValidationErrorIconHtml()}
|
|
7406
|
+
${this.hasValue ? html$1`
|
|
7407
|
+
${!this.disabled && !this.readonly ? html$1`
|
|
7408
|
+
${this.renderHtmlActionClear()}
|
|
7409
|
+
` : undefined}
|
|
7410
|
+
` : undefined}
|
|
7411
|
+
</div>
|
|
7412
|
+
</div>
|
|
7413
|
+
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
7414
|
+
${this.renderHtmlHelpText()}
|
|
7415
|
+
</div>
|
|
7416
|
+
`;
|
|
7417
|
+
}
|
|
7418
|
+
|
|
7419
|
+
/**
|
|
7420
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
7421
|
+
* @private
|
|
7422
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
7423
|
+
*/
|
|
7424
|
+
renderLayoutEmphasized() {
|
|
7425
|
+
return html$1`
|
|
7426
|
+
<div
|
|
7427
|
+
@click="${this.handleClick}"
|
|
7428
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7429
|
+
part="wrapper">
|
|
7430
|
+
<div class="accents left">
|
|
7431
|
+
${this.layout.includes('left') ? html$1`
|
|
7432
|
+
${this.renderValidationErrorIconHtml()}
|
|
7433
|
+
` : undefined}
|
|
7434
|
+
</div>
|
|
7435
|
+
<div class="mainContent">
|
|
7436
|
+
${this.renderHtmlInput()}
|
|
7437
|
+
</div>
|
|
7438
|
+
<div class="accents right">
|
|
7439
|
+
${this.layout.includes('right') || this.layout === "emphasized" ? html$1`
|
|
7440
|
+
${this.renderValidationErrorIconHtml()}
|
|
6996
7441
|
` : undefined}
|
|
6997
7442
|
${this.hasValue ? html$1`
|
|
6998
|
-
${this.
|
|
6999
|
-
|
|
7000
|
-
<${this.buttonTag}
|
|
7001
|
-
variant="flat"
|
|
7002
|
-
?onDark="${this.onDark}"
|
|
7003
|
-
aria-hidden="true"
|
|
7004
|
-
tabindex="-1"
|
|
7005
|
-
@click="${this.handleClickShowPassword}"
|
|
7006
|
-
class="notificationBtn passwordBtn">
|
|
7007
|
-
<${this.iconTag}
|
|
7008
|
-
category="interface"
|
|
7009
|
-
name="hide-password-stroke"
|
|
7010
|
-
customColor
|
|
7011
|
-
?hidden=${!this.showPassword}>
|
|
7012
|
-
</${this.iconTag}>
|
|
7013
|
-
<${this.iconTag}
|
|
7014
|
-
category="interface"
|
|
7015
|
-
name="view-password-stroke"
|
|
7016
|
-
customColor
|
|
7017
|
-
?hidden=${this.showPassword}>
|
|
7018
|
-
</${this.iconTag}>
|
|
7019
|
-
</${this.buttonTag}>
|
|
7020
|
-
</div>
|
|
7443
|
+
${!this.disabled && !this.readonly ? html$1`
|
|
7444
|
+
${this.renderHtmlActionClear()}
|
|
7021
7445
|
` : undefined}
|
|
7446
|
+
` : undefined}
|
|
7447
|
+
</div>
|
|
7448
|
+
</div>
|
|
7449
|
+
<div class="${classMap(this.helpTextClasses)}" part="inputHelpText">
|
|
7450
|
+
${this.renderHtmlHelpText()}
|
|
7451
|
+
</div>
|
|
7452
|
+
`;
|
|
7453
|
+
}
|
|
7454
|
+
|
|
7455
|
+
/**
|
|
7456
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
7457
|
+
* @private
|
|
7458
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
7459
|
+
*/
|
|
7460
|
+
renderLayoutSnowflake() {
|
|
7461
|
+
return html$1`
|
|
7462
|
+
<div
|
|
7463
|
+
@click="${this.handleClick}"
|
|
7464
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7465
|
+
part="wrapper">
|
|
7466
|
+
<div class="accents left">
|
|
7467
|
+
${this.renderHtmlTypeIcon()}
|
|
7468
|
+
</div>
|
|
7469
|
+
<div class="mainContent">
|
|
7470
|
+
${this.renderHtmlInput()}
|
|
7471
|
+
</div>
|
|
7472
|
+
<div class="accents right">
|
|
7473
|
+
${this.renderValidationErrorIconHtml()}
|
|
7474
|
+
${this.hasValue ? html$1`
|
|
7022
7475
|
${!this.disabled && !this.readonly ? html$1`
|
|
7023
|
-
|
|
7024
|
-
<${this.buttonTag}
|
|
7025
|
-
variant="flat"
|
|
7026
|
-
?onDark="${this.onDark}"
|
|
7027
|
-
class="notificationBtn clearBtn"
|
|
7028
|
-
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
7029
|
-
@click="${this.handleClickClear}">
|
|
7030
|
-
<${this.iconTag}
|
|
7031
|
-
customColor
|
|
7032
|
-
category="interface"
|
|
7033
|
-
name="x-lg"
|
|
7034
|
-
>
|
|
7035
|
-
</${this.iconTag}>
|
|
7036
|
-
</${this.buttonTag}>
|
|
7037
|
-
</div>
|
|
7476
|
+
${this.renderHtmlActionClear()}
|
|
7038
7477
|
` : undefined}
|
|
7039
7478
|
` : undefined}
|
|
7040
7479
|
</div>
|
|
7041
7480
|
</div>
|
|
7042
|
-
|
|
7043
|
-
${
|
|
7044
|
-
|
|
7045
|
-
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7046
|
-
<p id="${this.uniqueId}" part="helpText">
|
|
7047
|
-
<slot name="helptext">${this.getHelpText()}</slot>
|
|
7048
|
-
</p>
|
|
7049
|
-
</${this.helpTextTag}>
|
|
7050
|
-
`
|
|
7051
|
-
: html$1`
|
|
7052
|
-
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7053
|
-
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7054
|
-
${this.errorMessage}
|
|
7055
|
-
</p>
|
|
7056
|
-
</${this.helpTextTag}>
|
|
7057
|
-
`
|
|
7058
|
-
}
|
|
7481
|
+
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
7482
|
+
${this.renderHtmlHelpText()}
|
|
7483
|
+
</div>
|
|
7059
7484
|
`;
|
|
7060
7485
|
}
|
|
7486
|
+
|
|
7487
|
+
/**
|
|
7488
|
+
* Logic to determine the layout of the component.
|
|
7489
|
+
* @private
|
|
7490
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
7491
|
+
* @returns {void}
|
|
7492
|
+
*/
|
|
7493
|
+
renderLayout(ForcedLayout) {
|
|
7494
|
+
const layout = ForcedLayout || this.layout;
|
|
7495
|
+
|
|
7496
|
+
switch (layout) {
|
|
7497
|
+
case 'emphasized':
|
|
7498
|
+
return this.renderLayoutEmphasized();
|
|
7499
|
+
case 'emphasized-left':
|
|
7500
|
+
return this.renderLayoutEmphasized();
|
|
7501
|
+
case 'emphasized-right':
|
|
7502
|
+
return this.renderLayoutEmphasized();
|
|
7503
|
+
case 'snowflake':
|
|
7504
|
+
return this.renderLayoutSnowflake();
|
|
7505
|
+
case 'snowflake-left':
|
|
7506
|
+
return this.renderLayoutSnowflake();
|
|
7507
|
+
case 'snowflake-right':
|
|
7508
|
+
return this.renderLayoutSnowflake();
|
|
7509
|
+
default:
|
|
7510
|
+
return this.renderLayoutClassic();
|
|
7511
|
+
}
|
|
7512
|
+
}
|
|
7061
7513
|
}
|
|
7062
7514
|
|
|
7063
7515
|
AuroInput.register();
|