@aurodesignsystem/auro-formkit 2.0.0-beta.2 → 2.0.0-beta.4
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/051ff97a20add0e2-meta.json +1 -0
- package/.turbo/cache/051ff97a20add0e2.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/0ea853339c064fa1-meta.json +1 -0
- package/.turbo/cache/0ea853339c064fa1.tar.zst +0 -0
- package/.turbo/cache/16658beec9f4a809-meta.json +1 -0
- package/.turbo/cache/16658beec9f4a809.tar.zst +0 -0
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- 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/1df4710eef8ed00d-meta.json +1 -0
- package/.turbo/cache/1df4710eef8ed00d.tar.zst +0 -0
- package/.turbo/cache/204b66d1b253e9cc-meta.json +1 -0
- package/.turbo/cache/204b66d1b253e9cc.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/2a5d0939d6fc1052-meta.json +1 -0
- package/.turbo/cache/2a5d0939d6fc1052.tar.zst +0 -0
- package/.turbo/cache/2e3b829fcf75c836-meta.json +1 -0
- package/.turbo/cache/2e3b829fcf75c836.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/3d380d0d40404cac-meta.json +1 -0
- package/.turbo/cache/3d380d0d40404cac.tar.zst +0 -0
- 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/5bf2d3f7ba5891e0-meta.json +1 -0
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- 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/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/7ffd501e81790676-meta.json +1 -0
- package/.turbo/cache/7ffd501e81790676.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/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
- package/.turbo/cache/8e9ebc3df0e18de0-meta.json +1 -0
- package/.turbo/cache/8e9ebc3df0e18de0.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/973d0eea26083f4b-meta.json +1 -0
- package/.turbo/cache/973d0eea26083f4b.tar.zst +0 -0
- package/.turbo/cache/9c6ad42729c7b2d8-meta.json +1 -0
- package/.turbo/cache/9c6ad42729c7b2d8.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/a9a9d012c83882d8-meta.json +1 -0
- package/.turbo/cache/a9a9d012c83882d8.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/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/db361cb6578dca84-meta.json +1 -0
- package/.turbo/cache/db361cb6578dca84.tar.zst +0 -0
- 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/f3ff9040a2196834-meta.json +1 -0
- package/.turbo/cache/f3ff9040a2196834.tar.zst +0 -0
- package/.turbo/cache/f817d89688cefca8-meta.json +1 -0
- package/.turbo/cache/f817d89688cefca8.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fc57c17867dcac3d-meta.json +1 -0
- package/.turbo/cache/fc57c17867dcac3d.tar.zst +0 -0
- package/CHANGELOG.md +44 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/demo/api.md +4 -2
- package/components/checkbox/demo/api.min.js +31 -36
- package/components/checkbox/demo/index.min.js +31 -36
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/index.js +31 -36
- package/components/checkbox/src/auro-checkbox-group.js +2 -2
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +500 -218
- package/components/combobox/demo/index.min.js +500 -218
- 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 +499 -217
- 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 +492 -232
- package/components/datepicker/demo/index.min.js +492 -232
- 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 +492 -232
- 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/dropdown/demo/api.md +4 -4
- package/components/dropdown/demo/api.min.js +166 -42
- package/components/dropdown/demo/index.min.js +166 -42
- package/components/dropdown/dist/auro-dropdown.d.ts +93 -34
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +9 -3
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +166 -42
- package/components/dropdown/src/auro-dropdown.js +154 -39
- package/components/dropdown/src/auro-dropdownBib.js +12 -3
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +4 -0
- package/components/dropdown/src/styles/style.scss +5 -0
- 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 +3 -3
- package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
- package/components/input/demo/api.md +83 -81
- package/components/input/demo/api.min.js +282 -121
- package/components/input/demo/index.md +6 -6
- package/components/input/demo/index.min.js +282 -121
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +155 -84
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +282 -121
- 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 +252 -85
- 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 +7 -9
- package/components/select/demo/api.md +45 -110
- package/components/select/demo/api.min.js +320 -224
- package/components/select/demo/index.md +100 -43
- package/components/select/demo/index.min.js +320 -220
- package/components/select/dist/auro-select.d.ts +64 -51
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +314 -201
- package/components/select/src/auro-select.js +100 -118
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +7 -0
- package/components/select/src/styles/style.scss +11 -1
- 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/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/1de15d89eed2d760-meta.json +0 -1
- package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +0 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/47ba2b5ebdb579e9-meta.json +0 -1
- package/.turbo/cache/47ba2b5ebdb579e9.tar.zst +0 -0
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +0 -1
- package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +0 -1
- package/.turbo/cache/5c16ce3cff5c9dff.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/784c03fe9fd5ac05-meta.json +0 -1
- package/.turbo/cache/784c03fe9fd5ac05.tar.zst +0 -0
- package/.turbo/cache/87219c41a4ace9cd-meta.json +0 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8b735250fa5a62bf-meta.json +0 -1
- package/.turbo/cache/8b735250fa5a62bf.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/993dff2edb7b6766-meta.json +0 -1
- package/.turbo/cache/993dff2edb7b6766.tar.zst +0 -0
- package/.turbo/cache/9a097d6576dadd64-meta.json +0 -1
- package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +0 -1
- package/.turbo/cache/a6a56bb802e1c20f.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/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/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
- package/.turbo/cache/d716cb7a08152beb.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +0 -1
- package/.turbo/cache/fbbe2704bf9cb90b.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
|
@@ -183,7 +183,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
|
|
|
183
183
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
184
184
|
*/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");
|
|
185
185
|
|
|
186
|
-
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))}.
|
|
186
|
+
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)}`;
|
|
187
187
|
|
|
188
188
|
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)}`;
|
|
189
189
|
|
|
@@ -1860,20 +1860,20 @@ class AuroFormValidation {
|
|
|
1860
1860
|
const pattern = new RegExp(`^${elem.pattern}$`, 'u');
|
|
1861
1861
|
|
|
1862
1862
|
if (!pattern.test(elem.value)) {
|
|
1863
|
-
elem.validity = '
|
|
1864
|
-
elem.
|
|
1863
|
+
elem.validity = 'patternMismatch';
|
|
1864
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
1867
|
|
|
1868
1868
|
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
1869
1869
|
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
1870
1870
|
elem.validity = 'tooShort';
|
|
1871
|
-
elem.
|
|
1871
|
+
elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
|
|
1872
1872
|
}
|
|
1873
1873
|
|
|
1874
1874
|
if (elem.value?.length > elem.maxLength) {
|
|
1875
1875
|
elem.validity = 'tooLong';
|
|
1876
|
-
elem.
|
|
1876
|
+
elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
1879
|
|
|
@@ -1889,33 +1889,32 @@ class AuroFormValidation {
|
|
|
1889
1889
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
1890
1890
|
|
|
1891
1891
|
if (!elem.value.match(emailRegex)) {
|
|
1892
|
-
elem.validity = '
|
|
1893
|
-
elem.
|
|
1892
|
+
elem.validity = 'patternMismatch';
|
|
1893
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
1894
1894
|
}
|
|
1895
1895
|
} else if (elem.type === 'credit-card') {
|
|
1896
1896
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
1897
1897
|
elem.validity = 'tooShort';
|
|
1898
|
-
elem.
|
|
1898
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
1899
1899
|
}
|
|
1900
1900
|
} else if (elem.type === 'number') {
|
|
1901
1901
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
1902
1902
|
elem.validity = 'rangeOverflow';
|
|
1903
|
-
elem.
|
|
1903
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
1904
1904
|
}
|
|
1905
1905
|
|
|
1906
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
1906
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
1907
1907
|
elem.validity = 'rangeUnderflow';
|
|
1908
|
-
elem.
|
|
1908
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
1909
1909
|
}
|
|
1910
|
-
|
|
1911
1910
|
} else if (elem.type === 'month-day-year' ||
|
|
1912
1911
|
elem.type === 'month-year' ||
|
|
1913
1912
|
elem.type === 'month-fullYear' ||
|
|
1914
1913
|
elem.type === 'year-month-day'
|
|
1915
1914
|
) {
|
|
1916
|
-
if (elem.value
|
|
1915
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
1917
1916
|
elem.validity = 'tooShort';
|
|
1918
|
-
elem.
|
|
1917
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
1919
1918
|
} else {
|
|
1920
1919
|
const valueDate = new Date(elem.value);
|
|
1921
1920
|
|
|
@@ -1925,7 +1924,7 @@ class AuroFormValidation {
|
|
|
1925
1924
|
|
|
1926
1925
|
if (valueDate > maxDate) {
|
|
1927
1926
|
elem.validity = 'rangeOverflow';
|
|
1928
|
-
elem.
|
|
1927
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
1929
1928
|
}
|
|
1930
1929
|
}
|
|
1931
1930
|
|
|
@@ -1935,7 +1934,7 @@ class AuroFormValidation {
|
|
|
1935
1934
|
|
|
1936
1935
|
if (valueDate < minDate) {
|
|
1937
1936
|
elem.validity = 'rangeUnderflow';
|
|
1938
|
-
elem.
|
|
1937
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
1939
1938
|
}
|
|
1940
1939
|
}
|
|
1941
1940
|
}
|
|
@@ -1958,10 +1957,10 @@ class AuroFormValidation {
|
|
|
1958
1957
|
|
|
1959
1958
|
if (elem.hasAttribute('error')) {
|
|
1960
1959
|
elem.validity = 'customError';
|
|
1961
|
-
elem.
|
|
1960
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
1962
1961
|
} else if (validationShouldRun) {
|
|
1963
1962
|
elem.validity = 'valid';
|
|
1964
|
-
elem.
|
|
1963
|
+
elem.errorMessage = '';
|
|
1965
1964
|
|
|
1966
1965
|
/**
|
|
1967
1966
|
* Only validate once we interact with the datepicker
|
|
@@ -1973,7 +1972,7 @@ class AuroFormValidation {
|
|
|
1973
1972
|
let hasValue = elem.value && elem.value.length > 0;
|
|
1974
1973
|
|
|
1975
1974
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
1976
|
-
if (this.auroInputElements
|
|
1975
|
+
if (this.auroInputElements?.length === 2) {
|
|
1977
1976
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
1978
1977
|
hasValue = false;
|
|
1979
1978
|
}
|
|
@@ -1981,31 +1980,27 @@ class AuroFormValidation {
|
|
|
1981
1980
|
|
|
1982
1981
|
if (!hasValue && elem.required) {
|
|
1983
1982
|
elem.validity = 'valueMissing';
|
|
1984
|
-
elem.
|
|
1983
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1985
1984
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1986
1985
|
this.validateType(elem);
|
|
1987
1986
|
this.validateAttributes(elem);
|
|
1988
1987
|
}
|
|
1989
1988
|
}
|
|
1990
1989
|
|
|
1991
|
-
if (this.auroInputElements
|
|
1990
|
+
if (this.auroInputElements?.length > 0) {
|
|
1992
1991
|
elem.validity = this.auroInputElements[0].validity;
|
|
1993
|
-
elem.
|
|
1992
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1994
1993
|
|
|
1995
|
-
if (elem.validity === 'valid') {
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
1999
|
-
}
|
|
1994
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
1995
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
1996
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
2000
1997
|
}
|
|
2001
1998
|
}
|
|
2002
1999
|
|
|
2003
2000
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
2008
|
-
}
|
|
2001
|
+
// Use the validity message override if it is declared
|
|
2002
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
2003
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
2009
2004
|
}
|
|
2010
2005
|
|
|
2011
2006
|
this.getErrorMessage(elem);
|
|
@@ -2051,18 +2046,18 @@ class AuroFormValidation {
|
|
|
2051
2046
|
if (elem.validity !== 'valid') {
|
|
2052
2047
|
if (elem.setCustomValidity) {
|
|
2053
2048
|
elem.errorMessage = elem.setCustomValidity;
|
|
2054
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
2049
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
2055
2050
|
const input = elem.renderRoot.querySelector('input');
|
|
2056
2051
|
|
|
2057
2052
|
if (input.validationMessage.length > 0) {
|
|
2058
2053
|
elem.errorMessage = input.validationMessage;
|
|
2059
2054
|
}
|
|
2060
|
-
} else if (this.inputElements &&
|
|
2055
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
2061
2056
|
const firstInput = this.inputElements[0];
|
|
2062
2057
|
|
|
2063
2058
|
if (firstInput.validationMessage.length > 0) {
|
|
2064
2059
|
elem.errorMessage = firstInput.validationMessage;
|
|
2065
|
-
} else if (this.inputElements
|
|
2060
|
+
} else if (this.inputElements?.length === 2) {
|
|
2066
2061
|
const secondInput = this.inputElements[1];
|
|
2067
2062
|
|
|
2068
2063
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -2083,42 +2078,8 @@ class AuroFormValidation {
|
|
|
2083
2078
|
/**
|
|
2084
2079
|
* Auro-input provides users a way to enter data into a text field.
|
|
2085
2080
|
*
|
|
2086
|
-
* @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
|
|
2087
|
-
* @attr {String} autocapitalize - An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters]
|
|
2088
|
-
* @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
2089
|
-
* @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
|
|
2090
2081
|
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
2091
2082
|
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
2092
|
-
* @attr {Boolean} disabled - If set, disables the input.
|
|
2093
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
2094
|
-
* @prop {String} errorMessage - Contains the help text message for the current validity error.
|
|
2095
|
-
* @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.
|
|
2096
|
-
* @attr {String} id - Sets the unique ID of the element.
|
|
2097
|
-
* @attr {String} lang - defines the language of an element.
|
|
2098
|
-
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
2099
|
-
* @attr {Number} maxLength - The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
2100
|
-
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
2101
|
-
* @attr {Number} minLength - The minimum number of characters the user can enter into the text input. This must be an non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
2102
|
-
* @attr {String} name - Populates the `name` attribute on the input.
|
|
2103
|
-
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
2104
|
-
* @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
|
|
2105
|
-
* @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
|
|
2106
|
-
* @attr {String} pattern - Specifies a regular expression the form control's value should match.
|
|
2107
|
-
* @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
|
|
2108
|
-
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
2109
|
-
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
2110
|
-
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
2111
|
-
* @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
|
|
2112
|
-
* @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
|
|
2113
|
-
* @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
|
|
2114
|
-
* @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
|
|
2115
|
-
* @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
|
|
2116
|
-
* @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
|
|
2117
|
-
* @attr {String} spellcheck - An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
|
|
2118
|
-
* @attr {String} type - Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `month-day-year`, `month-year`, `year-month-day` or `text`. If given value is not allowed or set, defaults to `text`.
|
|
2119
|
-
* @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
|
|
2120
|
-
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
2121
|
-
* @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
2122
2083
|
*
|
|
2123
2084
|
* @slot helptext - Sets the help text displayed below the input.
|
|
2124
2085
|
* @slot label - Sets the label text for the input.
|
|
@@ -2210,71 +2171,272 @@ class BaseInput extends r {
|
|
|
2210
2171
|
.substring(idSubstrStart, idSubstrEnd);
|
|
2211
2172
|
}
|
|
2212
2173
|
|
|
2213
|
-
// function to define props used within the scope of this
|
|
2174
|
+
// function to define props used within the scope of this componentstatic
|
|
2214
2175
|
static get properties() {
|
|
2215
2176
|
return {
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* If set, the label will remain fixed in the active position.
|
|
2180
|
+
*/
|
|
2181
|
+
activeLabel: {
|
|
2182
|
+
type: Boolean,
|
|
2183
|
+
reflect: true
|
|
2184
|
+
},
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters]
|
|
2188
|
+
*/
|
|
2189
|
+
autocapitalize: {
|
|
2190
|
+
type: String
|
|
2191
|
+
},
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
2195
|
+
*/
|
|
2196
|
+
autocomplete: {
|
|
2223
2197
|
type: String,
|
|
2224
2198
|
reflect: true
|
|
2225
2199
|
},
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* When set to `off`, stops iOS from auto-correcting words when typed into a text box.
|
|
2203
|
+
*/
|
|
2204
|
+
autocorrect: {
|
|
2205
|
+
type: String
|
|
2206
|
+
},
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* If set, disables the input.
|
|
2210
|
+
*/
|
|
2211
|
+
disabled: {
|
|
2212
|
+
type: Boolean
|
|
2213
|
+
},
|
|
2214
|
+
|
|
2215
|
+
error: {
|
|
2234
2216
|
type: String,
|
|
2235
2217
|
reflect: true
|
|
2236
2218
|
},
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* Contains the help text message for the current validity error.
|
|
2222
|
+
*/
|
|
2223
|
+
errorMessage: {
|
|
2224
|
+
type: String
|
|
2225
|
+
},
|
|
2226
|
+
|
|
2227
|
+
/**
|
|
2228
|
+
* 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.
|
|
2229
|
+
*/
|
|
2230
|
+
icon: {
|
|
2231
|
+
type: Boolean
|
|
2232
|
+
},
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* Sets the unique ID of the element.
|
|
2236
|
+
*/
|
|
2237
|
+
id: {
|
|
2238
|
+
type: String
|
|
2239
|
+
},
|
|
2240
|
+
|
|
2241
|
+
/**
|
|
2242
|
+
* Defines the language of an element.
|
|
2243
|
+
*/
|
|
2244
|
+
lang: {
|
|
2245
|
+
type: String
|
|
2246
|
+
},
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
2250
|
+
*/
|
|
2251
|
+
max: {
|
|
2252
|
+
type: String
|
|
2253
|
+
},
|
|
2254
|
+
|
|
2255
|
+
/**
|
|
2256
|
+
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
2257
|
+
*/
|
|
2258
|
+
maxLength: {
|
|
2259
|
+
type: Number
|
|
2260
|
+
},
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
|
|
2264
|
+
*/
|
|
2265
|
+
min: {
|
|
2266
|
+
type: String
|
|
2267
|
+
},
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`.
|
|
2271
|
+
*/
|
|
2272
|
+
minLength: {
|
|
2273
|
+
type: Number
|
|
2274
|
+
},
|
|
2275
|
+
|
|
2276
|
+
/**
|
|
2277
|
+
* Populates the `name` attribute on the input.
|
|
2278
|
+
*/
|
|
2279
|
+
name: {
|
|
2280
|
+
type: String
|
|
2281
|
+
},
|
|
2282
|
+
|
|
2283
|
+
/**
|
|
2284
|
+
* If set, disables auto-validation on blur.
|
|
2285
|
+
*/
|
|
2286
|
+
noValidate: {
|
|
2287
|
+
type: Boolean
|
|
2288
|
+
},
|
|
2289
|
+
|
|
2290
|
+
/**
|
|
2291
|
+
* Specifies a regular expression the form control's value should match.
|
|
2292
|
+
*/
|
|
2293
|
+
pattern: {
|
|
2294
|
+
type: String,
|
|
2240
2295
|
reflect: true
|
|
2241
2296
|
},
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Define custom placeholder text, only supported by date input formats.
|
|
2300
|
+
*/
|
|
2301
|
+
placeholder: {
|
|
2302
|
+
type: String
|
|
2303
|
+
},
|
|
2304
|
+
|
|
2305
|
+
/**
|
|
2306
|
+
* Makes the input read-only, but can be set programmatically.
|
|
2307
|
+
*/
|
|
2308
|
+
readonly: {
|
|
2309
|
+
type: Boolean
|
|
2310
|
+
},
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
2314
|
+
*/
|
|
2315
|
+
required: {
|
|
2316
|
+
type: Boolean
|
|
2317
|
+
},
|
|
2246
2318
|
|
|
2247
2319
|
/**
|
|
2248
2320
|
* @ignore
|
|
2249
2321
|
*/
|
|
2250
|
-
showPassword:
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2322
|
+
showPassword: {
|
|
2323
|
+
state: true
|
|
2324
|
+
},
|
|
2325
|
+
|
|
2326
|
+
/**
|
|
2327
|
+
* Sets a custom help text message to display for all validityStates.
|
|
2328
|
+
*/
|
|
2329
|
+
setCustomValidity: {
|
|
2330
|
+
type: String
|
|
2331
|
+
},
|
|
2332
|
+
|
|
2333
|
+
/**
|
|
2334
|
+
* Custom help text message to display when validity = `badInput`.
|
|
2335
|
+
*/
|
|
2336
|
+
setCustomValidityBadInput: {
|
|
2337
|
+
type: String
|
|
2338
|
+
},
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* Custom help text message to display when validity = `customError`.
|
|
2342
|
+
*/
|
|
2343
|
+
setCustomValidityCustomError: {
|
|
2344
|
+
type: String
|
|
2345
|
+
},
|
|
2346
|
+
|
|
2347
|
+
/**
|
|
2348
|
+
* Custom help text message to display for the declared element `type` and type validity fails.
|
|
2349
|
+
*/
|
|
2350
|
+
setCustomValidityForType: {
|
|
2351
|
+
type: String
|
|
2352
|
+
},
|
|
2353
|
+
|
|
2354
|
+
/**
|
|
2355
|
+
* Custom help text message to display when validity = `rangeOverflow`.
|
|
2356
|
+
*/
|
|
2357
|
+
setCustomValidityRangeOverflow: {
|
|
2358
|
+
type: String
|
|
2359
|
+
},
|
|
2360
|
+
|
|
2361
|
+
/**
|
|
2362
|
+
* Custom help text message to display when validity = `rangeUnderflow`.
|
|
2363
|
+
*/
|
|
2364
|
+
setCustomValidityRangeUnderflow: {
|
|
2365
|
+
type: String
|
|
2366
|
+
},
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Custom help text message to display when validity = `tooLong`.
|
|
2370
|
+
*/
|
|
2371
|
+
setCustomValidityTooLong: {
|
|
2372
|
+
type: String
|
|
2373
|
+
},
|
|
2374
|
+
|
|
2375
|
+
/**
|
|
2376
|
+
* Custom help text message to display when validity = `tooShort`.
|
|
2377
|
+
*/
|
|
2378
|
+
setCustomValidityTooShort: {
|
|
2379
|
+
type: String
|
|
2380
|
+
},
|
|
2381
|
+
|
|
2382
|
+
/**
|
|
2383
|
+
* Custom help text message to display when validity = `valueMissing`.
|
|
2384
|
+
*/
|
|
2385
|
+
setCustomValidityValueMissing: {
|
|
2386
|
+
type: String
|
|
2387
|
+
},
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* Custom help text message for email type validity.
|
|
2391
|
+
*/
|
|
2392
|
+
customValidityTypeEmail: {
|
|
2393
|
+
type: String
|
|
2394
|
+
},
|
|
2395
|
+
|
|
2396
|
+
/**
|
|
2397
|
+
* An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
|
|
2398
|
+
*/
|
|
2399
|
+
spellcheck: {
|
|
2400
|
+
type: String
|
|
2401
|
+
},
|
|
2402
|
+
|
|
2403
|
+
/**
|
|
2404
|
+
* Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `month-day-year`, `month-year`, `year-month-day` or `text`. If given value is not allowed or set, defaults to `text`.
|
|
2405
|
+
*/
|
|
2406
|
+
type: {
|
|
2254
2407
|
type: String,
|
|
2255
2408
|
reflect: true
|
|
2256
2409
|
},
|
|
2257
|
-
|
|
2258
|
-
|
|
2410
|
+
|
|
2411
|
+
/**
|
|
2412
|
+
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
2413
|
+
*/
|
|
2414
|
+
value: {
|
|
2415
|
+
type: String
|
|
2416
|
+
},
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Sets validation mode to re-eval with each input.
|
|
2420
|
+
*/
|
|
2421
|
+
validateOnInput: {
|
|
2422
|
+
type: Boolean
|
|
2423
|
+
},
|
|
2424
|
+
|
|
2425
|
+
/**
|
|
2426
|
+
* Specifies the `validityState` this element is in.
|
|
2427
|
+
*/
|
|
2428
|
+
validity: {
|
|
2259
2429
|
type: String,
|
|
2260
2430
|
reflect: true
|
|
2261
|
-
}
|
|
2262
|
-
setCustomValidity: { type: String },
|
|
2263
|
-
setCustomValidityCustomError: { type: String },
|
|
2264
|
-
setCustomValidityValueMissing: { type: String },
|
|
2265
|
-
setCustomValidityBadInput: { type: String },
|
|
2266
|
-
setCustomValidityTooShort: { type: String },
|
|
2267
|
-
setCustomValidityTooLong: { type: String },
|
|
2268
|
-
setCustomValidityRangeOverflow: { type: String},
|
|
2269
|
-
setCustomValidityRangeUnderflow: { type: String},
|
|
2270
|
-
customValidityTypeEmail: { type: String }
|
|
2431
|
+
}
|
|
2271
2432
|
};
|
|
2272
2433
|
}
|
|
2273
2434
|
|
|
2435
|
+
|
|
2274
2436
|
static get styles() {
|
|
2275
2437
|
return [
|
|
2276
|
-
i$2`${styleCss$3}`,
|
|
2277
2438
|
i$2`${colorCss$3}`,
|
|
2439
|
+
i$2`${styleCss$3}`,
|
|
2278
2440
|
i$2`${tokensCss$3}`
|
|
2279
2441
|
];
|
|
2280
2442
|
}
|
|
@@ -2895,7 +3057,7 @@ class BaseInput extends r {
|
|
|
2895
3057
|
this.maxLength = card.formatLength;
|
|
2896
3058
|
this.minLength = card.formatMinLength;
|
|
2897
3059
|
|
|
2898
|
-
this.
|
|
3060
|
+
this.errorMessage = card.errorMessage;
|
|
2899
3061
|
|
|
2900
3062
|
if (this.icon) {
|
|
2901
3063
|
this.inputIconName = card.cardIcon;
|
|
@@ -2915,63 +3077,63 @@ class BaseInput extends r {
|
|
|
2915
3077
|
name: 'Airlines',
|
|
2916
3078
|
regex: /^(?<num>1|2)\d{0}/u,
|
|
2917
3079
|
formatMinLength: 17,
|
|
2918
|
-
|
|
3080
|
+
errorMessage: CreditCardValidationMessage,
|
|
2919
3081
|
cardIcon: 'credit-card'
|
|
2920
3082
|
},
|
|
2921
3083
|
{
|
|
2922
3084
|
name: 'Commercial',
|
|
2923
3085
|
regex: /^(?<num>2)\d{0}/u,
|
|
2924
3086
|
formatMinLength: 8,
|
|
2925
|
-
|
|
3087
|
+
errorMessage: CreditCardValidationMessage,
|
|
2926
3088
|
cardIcon: 'credit-card'
|
|
2927
3089
|
},
|
|
2928
3090
|
{
|
|
2929
3091
|
name: 'Alaska Commercial',
|
|
2930
3092
|
regex: /^(?<num>27)\d{0}/u,
|
|
2931
3093
|
formatMinLength: 8,
|
|
2932
|
-
|
|
3094
|
+
errorMessage: CreditCardValidationMessage,
|
|
2933
3095
|
cardIcon: 'cc-alaska'
|
|
2934
3096
|
},
|
|
2935
3097
|
{
|
|
2936
3098
|
name: 'American Express',
|
|
2937
3099
|
regex: /^(?<num>34|37)\d{0}/u,
|
|
2938
3100
|
formatLength: 17,
|
|
2939
|
-
|
|
3101
|
+
errorMessage: CreditCardValidationMessage,
|
|
2940
3102
|
cardIcon: 'cc-amex'
|
|
2941
3103
|
},
|
|
2942
3104
|
{
|
|
2943
3105
|
name: 'Diners club',
|
|
2944
3106
|
regex: /^(?<num>36|38)\d{0}/u,
|
|
2945
3107
|
formatLength: 16,
|
|
2946
|
-
|
|
3108
|
+
errorMessage: CreditCardValidationMessage,
|
|
2947
3109
|
cardIcon: 'credit-card'
|
|
2948
3110
|
},
|
|
2949
3111
|
{
|
|
2950
3112
|
name: 'Visa',
|
|
2951
3113
|
regex: /^(?<num>4)\d{0}/u,
|
|
2952
3114
|
formatLength: 19,
|
|
2953
|
-
|
|
3115
|
+
errorMessage: CreditCardValidationMessage,
|
|
2954
3116
|
cardIcon: 'cc-visa'
|
|
2955
3117
|
},
|
|
2956
3118
|
{
|
|
2957
3119
|
name: 'Alaska Airlines Visa',
|
|
2958
3120
|
regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
|
|
2959
3121
|
formatLength: 19,
|
|
2960
|
-
|
|
3122
|
+
errorMessage: CreditCardValidationMessage,
|
|
2961
3123
|
cardIcon: 'cc-alaska'
|
|
2962
3124
|
},
|
|
2963
3125
|
{
|
|
2964
3126
|
name: 'Master Card',
|
|
2965
3127
|
regex: /^(?<num>5)\d{0}/u,
|
|
2966
3128
|
formatLength: 19,
|
|
2967
|
-
|
|
3129
|
+
errorMessage: CreditCardValidationMessage,
|
|
2968
3130
|
cardIcon: 'cc-mastercard'
|
|
2969
3131
|
},
|
|
2970
3132
|
{
|
|
2971
3133
|
name: 'Discover Card',
|
|
2972
3134
|
regex: /^(?<num>6)\d{0}/u,
|
|
2973
3135
|
formatLength: 19,
|
|
2974
|
-
|
|
3136
|
+
errorMessage: CreditCardValidationMessage,
|
|
2975
3137
|
cardIcon: 'cc-discover'
|
|
2976
3138
|
}
|
|
2977
3139
|
];
|
|
@@ -2979,7 +3141,7 @@ class BaseInput extends r {
|
|
|
2979
3141
|
let type = {
|
|
2980
3142
|
name: 'Default Card',
|
|
2981
3143
|
formatLength: 19,
|
|
2982
|
-
|
|
3144
|
+
errorMessage: CreditCardValidationMessage,
|
|
2983
3145
|
cardIcon: 'credit-card'
|
|
2984
3146
|
};
|
|
2985
3147
|
|
|
@@ -4004,7 +4166,6 @@ class AuroInput extends BaseInput {
|
|
|
4004
4166
|
<p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
4005
4167
|
${this.errorMessage}
|
|
4006
4168
|
</p>`
|
|
4007
|
-
|
|
4008
4169
|
}
|
|
4009
4170
|
`;
|
|
4010
4171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auro-input.d.ts","sourceRoot":"","sources":["../src/auro-input.js"],"names":[],"mappings":"AAuBA;IAoBE;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IArBC;;OAEG;IACH,gBAAyE;IAEzE;;OAEG;IACH,kBAAiF;IAenF;;;;OAIG;IACH,oBAgBC;IAED,sBAkBC;IAGD,
|
|
1
|
+
{"version":3,"file":"auro-input.d.ts","sourceRoot":"","sources":["../src/auro-input.js"],"names":[],"mappings":"AAuBA;IAoBE;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IArBC;;OAEG;IACH,gBAAyE;IAEzE;;OAEG;IACH,kBAAiF;IAenF;;;;OAIG;IACH,oBAgBC;IAED,sBAkBC;IAGD,4CA4IC;CACF;sBApOqB,iBAAiB"}
|