@aurodesignsystem/auro-formkit 2.0.0-beta.1 → 2.0.0-beta.3
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/.turbo/cache/013a48308b893dac-meta.json +1 -1
- package/.turbo/cache/02244170c798a2bd-meta.json +1 -0
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- package/.turbo/cache/1ab37ce15d9be440-meta.json +1 -0
- package/.turbo/cache/1ab37ce15d9be440.tar.zst +0 -0
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
- package/.turbo/cache/1de15d89eed2d760-meta.json +1 -1
- package/.turbo/cache/2110a4d14e0d11b2-meta.json +1 -0
- package/.turbo/cache/2110a4d14e0d11b2.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/2fd056afdf4eb39d-meta.json +1 -0
- package/.turbo/cache/2fd056afdf4eb39d.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/3e12285c614db539-meta.json +1 -0
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +1 -1
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
- package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
- package/.turbo/cache/691a74627ec57993-meta.json +1 -1
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
- package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
- package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
- package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
- package/.turbo/cache/784c03fe9fd5ac05-meta.json +1 -1
- package/.turbo/cache/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +1 -0
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/993dff2edb7b6766-meta.json +1 -1
- package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
- package/.turbo/cache/a63cbfecf0f78586-meta.json +1 -0
- package/.turbo/cache/a63cbfecf0f78586.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/b2c66328fdd78093-meta.json +1 -0
- package/.turbo/cache/b2c66328fdd78093.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
- package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
- package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
- package/.turbo/cache/d39e6ef95ebc4cc0-meta.json +1 -0
- package/.turbo/cache/d39e6ef95ebc4cc0.tar.zst +0 -0
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +1 -0
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
- package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f411e2deb0676959-meta.json +1 -0
- package/.turbo/cache/f411e2deb0676959.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
- package/CHANGELOG.md +34 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/README.md +8 -8
- package/components/checkbox/demo/api.md +53 -51
- package/components/checkbox/demo/api.min.js +32 -37
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +32 -37
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +1 -1
- package/components/checkbox/dist/index.js +32 -37
- package/components/checkbox/src/auro-checkbox-group.js +2 -2
- package/components/checkbox/src/auro-checkbox.js +1 -1
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +104 -116
- package/components/combobox/demo/index.min.js +104 -116
- package/components/combobox/dist/auro-combobox.d.ts +11 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +103 -115
- package/components/combobox/src/auro-combobox.js +22 -20
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/datepicker/.turbo/turbo-build.log +9 -8
- package/components/datepicker/demo/api.md +107 -87
- package/components/datepicker/demo/api.min.js +96 -130
- package/components/datepicker/demo/index.min.js +96 -130
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +96 -130
- package/components/datepicker/src/auro-datepicker.js +15 -35
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +2 -2
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
- package/components/input/.turbo/turbo-build.log +56 -6
- package/components/input/.turbo/turbo-bundler.log +2 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
- package/components/input/demo/api.md +83 -83
- package/components/input/demo/api.min.js +52 -61
- package/components/input/demo/index.md +6 -6
- package/components/input/demo/index.min.js +52 -61
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +5 -12
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +52 -61
- package/components/input/dist/styles/mixins-css.d.ts +3 -0
- package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +22 -25
- package/components/input/src/styles/borders.scss +3 -19
- package/components/input/src/styles/color.css +1 -2
- package/components/input/src/styles/color.scss +3 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +1 -1
- package/components/input/src/styles/input.scss +4 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +1 -1
- package/components/input/src/styles/label.scss +4 -7
- package/components/input/src/styles/mixins-css.js +2 -0
- package/components/input/src/styles/mixins.css +1 -0
- package/components/input/src/styles/mixins.scss +45 -0
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +13 -12
- package/components/input/src/styles/notificationIcons.scss +17 -25
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +15 -17
- package/components/input/src/styles/style.scss +0 -4
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +30 -35
- package/components/radio/demo/index.min.js +30 -35
- package/components/radio/dist/index.js +30 -35
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build.log +3 -3
- package/components/select/demo/api.md +7 -11
- package/components/select/demo/api.min.js +33 -60
- package/components/select/demo/index.min.js +33 -56
- package/components/select/dist/auro-select.d.ts +2 -2
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +32 -55
- package/components/select/src/auro-select.js +3 -21
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +29 -34
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
- package/.turbo/cache/141bb7d9a95e288b-meta.json +0 -1
- package/.turbo/cache/141bb7d9a95e288b.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
- package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
- package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
- package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
- package/.turbo/cache/bb8b41cd0ade3986-meta.json +0 -1
- package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
- package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
- package/.turbo/cache/cd845bb6102c589a-meta.json +0 -1
- package/.turbo/cache/cd845bb6102c589a.tar.zst +0 -0
- package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
- /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
|
@@ -166,7 +166,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
|
|
|
166
166
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
167
167
|
*/class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}}r._$litElement$=!0,r["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
168
168
|
|
|
169
|
-
var styleCss$3 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.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))}.
|
|
169
|
+
var styleCss$3 = i$2`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.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}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}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-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);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:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);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)}`;
|
|
170
170
|
|
|
171
171
|
var colorCss$3 = i$2`.wrapper{border-color:transparent}.inputElement-helpText{color:var(--ds-auro-input-help-text-color)}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-input-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}label{color:var(--ds-auro-input-label-text-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-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host(:not([borderless])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host(:not([borderless])) .wrapper:focus-within:before{border-bottom-color:transparent}:host([validity]:not([validity=valid])){--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);--ds-auro-input-help-text-color: var(--ds-color-text-error-default, #cc1816)}:host([validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([disabled]){--ds-auro-input-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-input-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}`;
|
|
172
172
|
|
|
@@ -1843,20 +1843,20 @@ class AuroFormValidation {
|
|
|
1843
1843
|
const pattern = new RegExp(`^${elem.pattern}$`, 'u');
|
|
1844
1844
|
|
|
1845
1845
|
if (!pattern.test(elem.value)) {
|
|
1846
|
-
elem.validity = '
|
|
1847
|
-
elem.
|
|
1846
|
+
elem.validity = 'patternMismatch';
|
|
1847
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
1850
|
|
|
1851
1851
|
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
1852
1852
|
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
1853
1853
|
elem.validity = 'tooShort';
|
|
1854
|
-
elem.
|
|
1854
|
+
elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
|
|
1855
1855
|
}
|
|
1856
1856
|
|
|
1857
1857
|
if (elem.value?.length > elem.maxLength) {
|
|
1858
1858
|
elem.validity = 'tooLong';
|
|
1859
|
-
elem.
|
|
1859
|
+
elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
|
|
@@ -1872,33 +1872,32 @@ class AuroFormValidation {
|
|
|
1872
1872
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
1873
1873
|
|
|
1874
1874
|
if (!elem.value.match(emailRegex)) {
|
|
1875
|
-
elem.validity = '
|
|
1876
|
-
elem.
|
|
1875
|
+
elem.validity = 'patternMismatch';
|
|
1876
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
1877
1877
|
}
|
|
1878
1878
|
} else if (elem.type === 'credit-card') {
|
|
1879
1879
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
1880
1880
|
elem.validity = 'tooShort';
|
|
1881
|
-
elem.
|
|
1881
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
1882
1882
|
}
|
|
1883
1883
|
} else if (elem.type === 'number') {
|
|
1884
1884
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
1885
1885
|
elem.validity = 'rangeOverflow';
|
|
1886
|
-
elem.
|
|
1886
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
1889
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
1890
1890
|
elem.validity = 'rangeUnderflow';
|
|
1891
|
-
elem.
|
|
1891
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
1892
1892
|
}
|
|
1893
|
-
|
|
1894
1893
|
} else if (elem.type === 'month-day-year' ||
|
|
1895
1894
|
elem.type === 'month-year' ||
|
|
1896
1895
|
elem.type === 'month-fullYear' ||
|
|
1897
1896
|
elem.type === 'year-month-day'
|
|
1898
1897
|
) {
|
|
1899
|
-
if (elem.value
|
|
1898
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
1900
1899
|
elem.validity = 'tooShort';
|
|
1901
|
-
elem.
|
|
1900
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
1902
1901
|
} else {
|
|
1903
1902
|
const valueDate = new Date(elem.value);
|
|
1904
1903
|
|
|
@@ -1908,7 +1907,7 @@ class AuroFormValidation {
|
|
|
1908
1907
|
|
|
1909
1908
|
if (valueDate > maxDate) {
|
|
1910
1909
|
elem.validity = 'rangeOverflow';
|
|
1911
|
-
elem.
|
|
1910
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
1912
1911
|
}
|
|
1913
1912
|
}
|
|
1914
1913
|
|
|
@@ -1918,7 +1917,7 @@ class AuroFormValidation {
|
|
|
1918
1917
|
|
|
1919
1918
|
if (valueDate < minDate) {
|
|
1920
1919
|
elem.validity = 'rangeUnderflow';
|
|
1921
|
-
elem.
|
|
1920
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
1922
1921
|
}
|
|
1923
1922
|
}
|
|
1924
1923
|
}
|
|
@@ -1941,10 +1940,10 @@ class AuroFormValidation {
|
|
|
1941
1940
|
|
|
1942
1941
|
if (elem.hasAttribute('error')) {
|
|
1943
1942
|
elem.validity = 'customError';
|
|
1944
|
-
elem.
|
|
1943
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
1945
1944
|
} else if (validationShouldRun) {
|
|
1946
1945
|
elem.validity = 'valid';
|
|
1947
|
-
elem.
|
|
1946
|
+
elem.errorMessage = '';
|
|
1948
1947
|
|
|
1949
1948
|
/**
|
|
1950
1949
|
* Only validate once we interact with the datepicker
|
|
@@ -1956,7 +1955,7 @@ class AuroFormValidation {
|
|
|
1956
1955
|
let hasValue = elem.value && elem.value.length > 0;
|
|
1957
1956
|
|
|
1958
1957
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
1959
|
-
if (this.auroInputElements
|
|
1958
|
+
if (this.auroInputElements?.length === 2) {
|
|
1960
1959
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
1961
1960
|
hasValue = false;
|
|
1962
1961
|
}
|
|
@@ -1964,31 +1963,27 @@ class AuroFormValidation {
|
|
|
1964
1963
|
|
|
1965
1964
|
if (!hasValue && elem.required) {
|
|
1966
1965
|
elem.validity = 'valueMissing';
|
|
1967
|
-
elem.
|
|
1966
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1968
1967
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1969
1968
|
this.validateType(elem);
|
|
1970
1969
|
this.validateAttributes(elem);
|
|
1971
1970
|
}
|
|
1972
1971
|
}
|
|
1973
1972
|
|
|
1974
|
-
if (this.auroInputElements
|
|
1973
|
+
if (this.auroInputElements?.length > 0) {
|
|
1975
1974
|
elem.validity = this.auroInputElements[0].validity;
|
|
1976
|
-
elem.
|
|
1975
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1977
1976
|
|
|
1978
|
-
if (elem.validity === 'valid') {
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
1982
|
-
}
|
|
1977
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
1978
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
1979
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1983
1980
|
}
|
|
1984
1981
|
}
|
|
1985
1982
|
|
|
1986
1983
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
1991
|
-
}
|
|
1984
|
+
// Use the validity message override if it is declared
|
|
1985
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
1986
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
1992
1987
|
}
|
|
1993
1988
|
|
|
1994
1989
|
this.getErrorMessage(elem);
|
|
@@ -2034,18 +2029,18 @@ class AuroFormValidation {
|
|
|
2034
2029
|
if (elem.validity !== 'valid') {
|
|
2035
2030
|
if (elem.setCustomValidity) {
|
|
2036
2031
|
elem.errorMessage = elem.setCustomValidity;
|
|
2037
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
2032
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
2038
2033
|
const input = elem.renderRoot.querySelector('input');
|
|
2039
2034
|
|
|
2040
2035
|
if (input.validationMessage.length > 0) {
|
|
2041
2036
|
elem.errorMessage = input.validationMessage;
|
|
2042
2037
|
}
|
|
2043
|
-
} else if (this.inputElements &&
|
|
2038
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
2044
2039
|
const firstInput = this.inputElements[0];
|
|
2045
2040
|
|
|
2046
2041
|
if (firstInput.validationMessage.length > 0) {
|
|
2047
2042
|
elem.errorMessage = firstInput.validationMessage;
|
|
2048
|
-
} else if (this.inputElements
|
|
2043
|
+
} else if (this.inputElements?.length === 2) {
|
|
2049
2044
|
const secondInput = this.inputElements[1];
|
|
2050
2045
|
|
|
2051
2046
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -2073,8 +2068,7 @@ class AuroFormValidation {
|
|
|
2073
2068
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
2074
2069
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
2075
2070
|
* @attr {Boolean} disabled - If set, disables the input.
|
|
2076
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets
|
|
2077
|
-
* @prop {String} errorMessage - Contains the help text message for the current validity error.
|
|
2071
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
2078
2072
|
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
2079
2073
|
* @attr {String} id - Sets the unique ID of the element.
|
|
2080
2074
|
* @attr {String} lang - defines the language of an element.
|
|
@@ -2088,10 +2082,10 @@ class AuroFormValidation {
|
|
|
2088
2082
|
* @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
|
|
2089
2083
|
* @attr {String} pattern - Specifies a regular expression the form control's value should match.
|
|
2090
2084
|
* @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
|
|
2091
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all
|
|
2085
|
+
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validity states.
|
|
2092
2086
|
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
2093
2087
|
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
2094
|
-
* @attr {String}
|
|
2088
|
+
* @attr {String} setCustomValidityPatternMismatch - Custom help text message to display when validity = `patternMismatch`.
|
|
2095
2089
|
* @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
|
|
2096
2090
|
* @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
|
|
2097
2091
|
* @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
|
|
@@ -2237,20 +2231,18 @@ class BaseInput extends r {
|
|
|
2237
2231
|
type: String,
|
|
2238
2232
|
reflect: true
|
|
2239
2233
|
},
|
|
2240
|
-
errorMessage: { type: String },
|
|
2241
2234
|
validity: {
|
|
2242
2235
|
type: String,
|
|
2243
2236
|
reflect: true
|
|
2244
2237
|
},
|
|
2245
|
-
setCustomValidity:
|
|
2246
|
-
setCustomValidityCustomError:
|
|
2247
|
-
setCustomValidityValueMissing:
|
|
2248
|
-
|
|
2249
|
-
setCustomValidityTooShort:
|
|
2250
|
-
setCustomValidityTooLong:
|
|
2251
|
-
setCustomValidityRangeOverflow:
|
|
2252
|
-
setCustomValidityRangeUnderflow:
|
|
2253
|
-
customValidityTypeEmail: { type: String }
|
|
2238
|
+
setCustomValidity: { type: String },
|
|
2239
|
+
setCustomValidityCustomError: { type: String },
|
|
2240
|
+
setCustomValidityValueMissing: { type: String },
|
|
2241
|
+
setCustomValidityPatternMismatch: { type: String },
|
|
2242
|
+
setCustomValidityTooShort: { type: String },
|
|
2243
|
+
setCustomValidityTooLong: { type: String },
|
|
2244
|
+
setCustomValidityRangeOverflow: { type: String },
|
|
2245
|
+
setCustomValidityRangeUnderflow: { type: String }
|
|
2254
2246
|
};
|
|
2255
2247
|
}
|
|
2256
2248
|
|
|
@@ -2878,7 +2870,7 @@ class BaseInput extends r {
|
|
|
2878
2870
|
this.maxLength = card.formatLength;
|
|
2879
2871
|
this.minLength = card.formatMinLength;
|
|
2880
2872
|
|
|
2881
|
-
this.
|
|
2873
|
+
this.errorMessage = card.errorMessage;
|
|
2882
2874
|
|
|
2883
2875
|
if (this.icon) {
|
|
2884
2876
|
this.inputIconName = card.cardIcon;
|
|
@@ -2898,63 +2890,63 @@ class BaseInput extends r {
|
|
|
2898
2890
|
name: 'Airlines',
|
|
2899
2891
|
regex: /^(?<num>1|2)\d{0}/u,
|
|
2900
2892
|
formatMinLength: 17,
|
|
2901
|
-
|
|
2893
|
+
errorMessage: CreditCardValidationMessage,
|
|
2902
2894
|
cardIcon: 'credit-card'
|
|
2903
2895
|
},
|
|
2904
2896
|
{
|
|
2905
2897
|
name: 'Commercial',
|
|
2906
2898
|
regex: /^(?<num>2)\d{0}/u,
|
|
2907
2899
|
formatMinLength: 8,
|
|
2908
|
-
|
|
2900
|
+
errorMessage: CreditCardValidationMessage,
|
|
2909
2901
|
cardIcon: 'credit-card'
|
|
2910
2902
|
},
|
|
2911
2903
|
{
|
|
2912
2904
|
name: 'Alaska Commercial',
|
|
2913
2905
|
regex: /^(?<num>27)\d{0}/u,
|
|
2914
2906
|
formatMinLength: 8,
|
|
2915
|
-
|
|
2907
|
+
errorMessage: CreditCardValidationMessage,
|
|
2916
2908
|
cardIcon: 'cc-alaska'
|
|
2917
2909
|
},
|
|
2918
2910
|
{
|
|
2919
2911
|
name: 'American Express',
|
|
2920
2912
|
regex: /^(?<num>34|37)\d{0}/u,
|
|
2921
2913
|
formatLength: 17,
|
|
2922
|
-
|
|
2914
|
+
errorMessage: CreditCardValidationMessage,
|
|
2923
2915
|
cardIcon: 'cc-amex'
|
|
2924
2916
|
},
|
|
2925
2917
|
{
|
|
2926
2918
|
name: 'Diners club',
|
|
2927
2919
|
regex: /^(?<num>36|38)\d{0}/u,
|
|
2928
2920
|
formatLength: 16,
|
|
2929
|
-
|
|
2921
|
+
errorMessage: CreditCardValidationMessage,
|
|
2930
2922
|
cardIcon: 'credit-card'
|
|
2931
2923
|
},
|
|
2932
2924
|
{
|
|
2933
2925
|
name: 'Visa',
|
|
2934
2926
|
regex: /^(?<num>4)\d{0}/u,
|
|
2935
2927
|
formatLength: 19,
|
|
2936
|
-
|
|
2928
|
+
errorMessage: CreditCardValidationMessage,
|
|
2937
2929
|
cardIcon: 'cc-visa'
|
|
2938
2930
|
},
|
|
2939
2931
|
{
|
|
2940
2932
|
name: 'Alaska Airlines Visa',
|
|
2941
2933
|
regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
|
|
2942
2934
|
formatLength: 19,
|
|
2943
|
-
|
|
2935
|
+
errorMessage: CreditCardValidationMessage,
|
|
2944
2936
|
cardIcon: 'cc-alaska'
|
|
2945
2937
|
},
|
|
2946
2938
|
{
|
|
2947
2939
|
name: 'Master Card',
|
|
2948
2940
|
regex: /^(?<num>5)\d{0}/u,
|
|
2949
2941
|
formatLength: 19,
|
|
2950
|
-
|
|
2942
|
+
errorMessage: CreditCardValidationMessage,
|
|
2951
2943
|
cardIcon: 'cc-mastercard'
|
|
2952
2944
|
},
|
|
2953
2945
|
{
|
|
2954
2946
|
name: 'Discover Card',
|
|
2955
2947
|
regex: /^(?<num>6)\d{0}/u,
|
|
2956
2948
|
formatLength: 19,
|
|
2957
|
-
|
|
2949
|
+
errorMessage: CreditCardValidationMessage,
|
|
2958
2950
|
cardIcon: 'cc-discover'
|
|
2959
2951
|
}
|
|
2960
2952
|
];
|
|
@@ -2962,7 +2954,7 @@ class BaseInput extends r {
|
|
|
2962
2954
|
let type = {
|
|
2963
2955
|
name: 'Default Card',
|
|
2964
2956
|
formatLength: 19,
|
|
2965
|
-
|
|
2957
|
+
errorMessage: CreditCardValidationMessage,
|
|
2966
2958
|
cardIcon: 'credit-card'
|
|
2967
2959
|
};
|
|
2968
2960
|
|
|
@@ -3987,7 +3979,6 @@ class AuroInput extends BaseInput {
|
|
|
3987
3979
|
<p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
3988
3980
|
${this.errorMessage}
|
|
3989
3981
|
</p>`
|
|
3990
|
-
|
|
3991
3982
|
}
|
|
3992
3983
|
`;
|
|
3993
3984
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mixins-css.d.ts","sourceRoot":"","sources":["../../src/styles/mixins-css.js"],"names":[],"mappings":""}
|
|
@@ -28,8 +28,7 @@ import AuroFormValidation from '@auro-formkit/form-validation';
|
|
|
28
28
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
29
29
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
30
30
|
* @attr {Boolean} disabled - If set, disables the input.
|
|
31
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets
|
|
32
|
-
* @prop {String} errorMessage - Contains the help text message for the current validity error.
|
|
31
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
33
32
|
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
34
33
|
* @attr {String} id - Sets the unique ID of the element.
|
|
35
34
|
* @attr {String} lang - defines the language of an element.
|
|
@@ -43,10 +42,10 @@ import AuroFormValidation from '@auro-formkit/form-validation';
|
|
|
43
42
|
* @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
|
|
44
43
|
* @attr {String} pattern - Specifies a regular expression the form control's value should match.
|
|
45
44
|
* @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
|
|
46
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all
|
|
45
|
+
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validity states.
|
|
47
46
|
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
48
47
|
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
49
|
-
* @attr {String}
|
|
48
|
+
* @attr {String} setCustomValidityPatternMismatch - Custom help text message to display when validity = `patternMismatch`.
|
|
50
49
|
* @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
|
|
51
50
|
* @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
|
|
52
51
|
* @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
|
|
@@ -192,20 +191,18 @@ export default class BaseInput extends LitElement {
|
|
|
192
191
|
type: String,
|
|
193
192
|
reflect: true
|
|
194
193
|
},
|
|
195
|
-
errorMessage: { type: String },
|
|
196
194
|
validity: {
|
|
197
195
|
type: String,
|
|
198
196
|
reflect: true
|
|
199
197
|
},
|
|
200
|
-
setCustomValidity:
|
|
201
|
-
setCustomValidityCustomError:
|
|
202
|
-
setCustomValidityValueMissing:
|
|
203
|
-
|
|
204
|
-
setCustomValidityTooShort:
|
|
205
|
-
setCustomValidityTooLong:
|
|
206
|
-
setCustomValidityRangeOverflow:
|
|
207
|
-
setCustomValidityRangeUnderflow:
|
|
208
|
-
customValidityTypeEmail: { type: String }
|
|
198
|
+
setCustomValidity: { type: String },
|
|
199
|
+
setCustomValidityCustomError: { type: String },
|
|
200
|
+
setCustomValidityValueMissing: { type: String },
|
|
201
|
+
setCustomValidityPatternMismatch: { type: String },
|
|
202
|
+
setCustomValidityTooShort: { type: String },
|
|
203
|
+
setCustomValidityTooLong: { type: String },
|
|
204
|
+
setCustomValidityRangeOverflow: { type: String },
|
|
205
|
+
setCustomValidityRangeUnderflow: { type: String }
|
|
209
206
|
};
|
|
210
207
|
}
|
|
211
208
|
|
|
@@ -835,7 +832,7 @@ export default class BaseInput extends LitElement {
|
|
|
835
832
|
this.maxLength = card.formatLength;
|
|
836
833
|
this.minLength = card.formatMinLength;
|
|
837
834
|
|
|
838
|
-
this.
|
|
835
|
+
this.errorMessage = card.errorMessage;
|
|
839
836
|
|
|
840
837
|
if (this.icon) {
|
|
841
838
|
this.inputIconName = card.cardIcon;
|
|
@@ -855,63 +852,63 @@ export default class BaseInput extends LitElement {
|
|
|
855
852
|
name: 'Airlines',
|
|
856
853
|
regex: /^(?<num>1|2)\d{0}/u,
|
|
857
854
|
formatMinLength: 17,
|
|
858
|
-
|
|
855
|
+
errorMessage: CreditCardValidationMessage,
|
|
859
856
|
cardIcon: 'credit-card'
|
|
860
857
|
},
|
|
861
858
|
{
|
|
862
859
|
name: 'Commercial',
|
|
863
860
|
regex: /^(?<num>2)\d{0}/u,
|
|
864
861
|
formatMinLength: 8,
|
|
865
|
-
|
|
862
|
+
errorMessage: CreditCardValidationMessage,
|
|
866
863
|
cardIcon: 'credit-card'
|
|
867
864
|
},
|
|
868
865
|
{
|
|
869
866
|
name: 'Alaska Commercial',
|
|
870
867
|
regex: /^(?<num>27)\d{0}/u,
|
|
871
868
|
formatMinLength: 8,
|
|
872
|
-
|
|
869
|
+
errorMessage: CreditCardValidationMessage,
|
|
873
870
|
cardIcon: 'cc-alaska'
|
|
874
871
|
},
|
|
875
872
|
{
|
|
876
873
|
name: 'American Express',
|
|
877
874
|
regex: /^(?<num>34|37)\d{0}/u,
|
|
878
875
|
formatLength: 17,
|
|
879
|
-
|
|
876
|
+
errorMessage: CreditCardValidationMessage,
|
|
880
877
|
cardIcon: 'cc-amex'
|
|
881
878
|
},
|
|
882
879
|
{
|
|
883
880
|
name: 'Diners club',
|
|
884
881
|
regex: /^(?<num>36|38)\d{0}/u,
|
|
885
882
|
formatLength: 16,
|
|
886
|
-
|
|
883
|
+
errorMessage: CreditCardValidationMessage,
|
|
887
884
|
cardIcon: 'credit-card'
|
|
888
885
|
},
|
|
889
886
|
{
|
|
890
887
|
name: 'Visa',
|
|
891
888
|
regex: /^(?<num>4)\d{0}/u,
|
|
892
889
|
formatLength: 19,
|
|
893
|
-
|
|
890
|
+
errorMessage: CreditCardValidationMessage,
|
|
894
891
|
cardIcon: 'cc-visa'
|
|
895
892
|
},
|
|
896
893
|
{
|
|
897
894
|
name: 'Alaska Airlines Visa',
|
|
898
895
|
regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
|
|
899
896
|
formatLength: 19,
|
|
900
|
-
|
|
897
|
+
errorMessage: CreditCardValidationMessage,
|
|
901
898
|
cardIcon: 'cc-alaska'
|
|
902
899
|
},
|
|
903
900
|
{
|
|
904
901
|
name: 'Master Card',
|
|
905
902
|
regex: /^(?<num>5)\d{0}/u,
|
|
906
903
|
formatLength: 19,
|
|
907
|
-
|
|
904
|
+
errorMessage: CreditCardValidationMessage,
|
|
908
905
|
cardIcon: 'cc-mastercard'
|
|
909
906
|
},
|
|
910
907
|
{
|
|
911
908
|
name: 'Discover Card',
|
|
912
909
|
regex: /^(?<num>6)\d{0}/u,
|
|
913
910
|
formatLength: 19,
|
|
914
|
-
|
|
911
|
+
errorMessage: CreditCardValidationMessage,
|
|
915
912
|
cardIcon: 'cc-discover'
|
|
916
913
|
}
|
|
917
914
|
];
|
|
@@ -919,7 +916,7 @@ export default class BaseInput extends LitElement {
|
|
|
919
916
|
let type = {
|
|
920
917
|
name: 'Default Card',
|
|
921
918
|
formatLength: 19,
|
|
922
|
-
|
|
919
|
+
errorMessage: CreditCardValidationMessage,
|
|
923
920
|
cardIcon: 'credit-card'
|
|
924
921
|
};
|
|
925
922
|
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
@import '@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';
|
|
4
4
|
@import '@aurodesignsystem/webcorestylesheets/src/breakpoints';
|
|
5
5
|
|
|
6
|
+
@import 'mixins';
|
|
7
|
+
|
|
6
8
|
input {
|
|
7
9
|
border: unset;
|
|
8
10
|
}
|
|
@@ -26,30 +28,12 @@ input {
|
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
// Handle highlighting the border during focus and invalid stat
|
|
30
|
-
|
|
31
|
-
@mixin border-highlight {
|
|
32
|
-
&:before {
|
|
33
|
-
position: absolute;
|
|
34
|
-
display: block;
|
|
35
|
-
|
|
36
|
-
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
37
|
-
border-bottom-width: 1px;
|
|
38
|
-
border-bottom-style: solid;
|
|
39
|
-
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
40
|
-
|
|
41
|
-
content: '';
|
|
42
|
-
inset: 0;
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
31
|
// FOCUS STATE
|
|
48
32
|
|
|
49
33
|
:host(:not([borderless])) {
|
|
50
34
|
.wrapper {
|
|
51
35
|
&:focus-within {
|
|
52
|
-
@include border-highlight;
|
|
36
|
+
@include border-highlight-style;
|
|
53
37
|
}
|
|
54
38
|
}
|
|
55
39
|
}
|
|
@@ -5,16 +5,9 @@
|
|
|
5
5
|
// Support for fallback values
|
|
6
6
|
@import '@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
@import 'mixins';
|
|
9
9
|
|
|
10
|
-
/* stylelint-disable no-descending-specificity */
|
|
11
|
-
|
|
12
|
-
// Handle highlighting the border during focus and invalid state
|
|
13
|
-
@mixin border-highlight {
|
|
14
|
-
&:before {
|
|
15
|
-
border-bottom-color: transparent;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
10
|
+
/* stylelint-disable no-descending-specificity, selector-class-pattern */
|
|
18
11
|
|
|
19
12
|
.wrapper {
|
|
20
13
|
border-color: transparent;
|
|
@@ -72,7 +65,7 @@ label {
|
|
|
72
65
|
&:focus-within {
|
|
73
66
|
--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #{$ds-color-border-ui-focus-default});
|
|
74
67
|
|
|
75
|
-
@include border-highlight;
|
|
68
|
+
@include border-highlight-color;
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
71
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export default css`input{position:relative;overflow:hidden;min-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;
|
|
2
|
+
export default css`input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);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)}`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type */
|
|
2
2
|
input {
|
|
3
|
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
3
4
|
position: relative;
|
|
4
5
|
overflow: hidden;
|
|
5
6
|
min-height: calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));
|
|
@@ -11,7 +12,6 @@ input {
|
|
|
11
12
|
font-size: var(--ds-size-200, 1rem);
|
|
12
13
|
outline: none;
|
|
13
14
|
text-overflow: ellipsis;
|
|
14
|
-
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
15
15
|
white-space: nowrap;
|
|
16
16
|
}
|
|
17
17
|
input::-ms-reveal, input::-ms-clear {
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
// Support for fallback values
|
|
4
4
|
@import '@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';
|
|
5
5
|
|
|
6
|
+
@import 'mixins';
|
|
7
|
+
|
|
6
8
|
input {
|
|
9
|
+
@include transition-animation;
|
|
10
|
+
|
|
7
11
|
position: relative;
|
|
8
12
|
overflow: hidden;
|
|
9
13
|
min-height: calc(var(--ds-size-700, $ds-size-700) + var(--ds-size-25, $ds-size-25));
|
|
@@ -15,7 +19,6 @@ input {
|
|
|
15
19
|
font-size: var(--ds-size-200, $ds-size-200);
|
|
16
20
|
outline: none;
|
|
17
21
|
text-overflow: ellipsis;
|
|
18
|
-
transition: all .3s cubic-bezier(.215, .61, .355, 1);
|
|
19
22
|
white-space: nowrap;
|
|
20
23
|
|
|
21
24
|
// this is to disable the toggle-password feature in MS Edge only
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export default css`label{
|
|
2
|
+
export default css`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-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}`;
|