@aurodesignsystem/auro-formkit 1.6.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/.husky/commit-msg +4 -0
- package/.husky/pre-commit +3 -0
- package/.turbo/cache/06e8fe5b2ddad186-meta.json +1 -0
- package/.turbo/cache/06e8fe5b2ddad186.tar.zst +0 -0
- package/.turbo/cache/10feda0f037804bb-meta.json +1 -0
- package/.turbo/cache/10feda0f037804bb.tar.zst +0 -0
- package/.turbo/cache/12f223ca7c12a587-meta.json +1 -0
- package/.turbo/cache/12f223ca7c12a587.tar.zst +0 -0
- package/.turbo/cache/144e8e78657bf800-meta.json +1 -0
- package/.turbo/cache/144e8e78657bf800.tar.zst +0 -0
- package/.turbo/cache/18939b2c7c83b163-meta.json +1 -0
- package/.turbo/cache/18939b2c7c83b163.tar.zst +0 -0
- package/.turbo/cache/1de685df0eaa39c8-meta.json +1 -0
- package/.turbo/cache/1de685df0eaa39c8.tar.zst +0 -0
- package/.turbo/cache/1f3b6e5b310ff590-meta.json +1 -0
- package/.turbo/cache/1f3b6e5b310ff590.tar.zst +0 -0
- package/.turbo/cache/1f53ce3a28c56cdf-meta.json +1 -0
- package/.turbo/cache/1f53ce3a28c56cdf.tar.zst +0 -0
- package/.turbo/cache/235d3af66386f827-meta.json +1 -0
- package/.turbo/cache/235d3af66386f827.tar.zst +0 -0
- package/.turbo/cache/23bf100310bd9f5a-meta.json +1 -0
- package/.turbo/cache/23bf100310bd9f5a.tar.zst +0 -0
- package/.turbo/cache/2900e7ec28e1488f-meta.json +1 -0
- package/.turbo/cache/2900e7ec28e1488f.tar.zst +0 -0
- package/.turbo/cache/2dd00eb6e255bd02-meta.json +1 -0
- package/.turbo/cache/2dd00eb6e255bd02.tar.zst +0 -0
- package/.turbo/cache/33466ea2930c3714-meta.json +1 -0
- package/.turbo/cache/33466ea2930c3714.tar.zst +0 -0
- package/.turbo/cache/451e562c76f74ec6-meta.json +1 -0
- package/.turbo/cache/451e562c76f74ec6.tar.zst +0 -0
- package/.turbo/cache/4520919609c97850-meta.json +1 -0
- package/.turbo/cache/4520919609c97850.tar.zst +0 -0
- package/.turbo/cache/45542e8beda9bb05-meta.json +1 -0
- package/.turbo/cache/45542e8beda9bb05.tar.zst +0 -0
- package/.turbo/cache/4a510678a1fcfe5c-meta.json +1 -0
- package/.turbo/cache/4a510678a1fcfe5c.tar.zst +0 -0
- package/.turbo/cache/5058ecc7f1e34496-meta.json +1 -0
- package/.turbo/cache/5058ecc7f1e34496.tar.zst +0 -0
- package/.turbo/cache/5e689c61e1109b98-meta.json +1 -0
- package/.turbo/cache/5e689c61e1109b98.tar.zst +0 -0
- package/.turbo/cache/62519d73b891d83c-meta.json +1 -0
- package/.turbo/cache/62519d73b891d83c.tar.zst +0 -0
- package/.turbo/cache/65511706643c4a44-meta.json +1 -0
- package/.turbo/cache/65511706643c4a44.tar.zst +0 -0
- package/.turbo/cache/6992d7134a39e43e-meta.json +1 -0
- package/.turbo/cache/6992d7134a39e43e.tar.zst +0 -0
- package/.turbo/cache/6bbc14e82dbe2dab-meta.json +1 -0
- package/.turbo/cache/6bbc14e82dbe2dab.tar.zst +0 -0
- package/.turbo/cache/706d4f762cc8061c-meta.json +1 -0
- package/.turbo/cache/706d4f762cc8061c.tar.zst +0 -0
- package/.turbo/cache/70d7b72f15ee97a4-meta.json +1 -0
- package/.turbo/cache/70d7b72f15ee97a4.tar.zst +0 -0
- package/.turbo/cache/7255686674920f97-meta.json +1 -0
- package/.turbo/cache/7255686674920f97.tar.zst +0 -0
- package/.turbo/cache/73572172d84713cd-meta.json +1 -0
- package/.turbo/cache/73572172d84713cd.tar.zst +0 -0
- package/.turbo/cache/7ddb7ace73fe6ec2-meta.json +1 -0
- package/.turbo/cache/7ddb7ace73fe6ec2.tar.zst +0 -0
- package/.turbo/cache/7e901cc4235b7051-meta.json +1 -0
- package/.turbo/cache/7e901cc4235b7051.tar.zst +0 -0
- package/.turbo/cache/821d931bf082b7de-meta.json +1 -0
- package/.turbo/cache/821d931bf082b7de.tar.zst +0 -0
- package/.turbo/cache/897b0d8a0c301207-meta.json +1 -0
- package/.turbo/cache/897b0d8a0c301207.tar.zst +0 -0
- package/.turbo/cache/8b7cdb9a0d4c3112-meta.json +1 -0
- package/.turbo/cache/8b7cdb9a0d4c3112.tar.zst +0 -0
- package/.turbo/cache/9135f474c69d1b3c-meta.json +1 -0
- package/.turbo/cache/9135f474c69d1b3c.tar.zst +0 -0
- package/.turbo/cache/9a7ab914e08ce75f-meta.json +1 -0
- package/.turbo/cache/9a7ab914e08ce75f.tar.zst +0 -0
- package/.turbo/cache/a174f9409e2dbb04-meta.json +1 -0
- package/.turbo/cache/a174f9409e2dbb04.tar.zst +0 -0
- package/.turbo/cache/a7bf477bbdabc7bc-meta.json +1 -0
- package/.turbo/cache/a7bf477bbdabc7bc.tar.zst +0 -0
- package/.turbo/cache/a90aa34f427a2f62-meta.json +1 -0
- package/.turbo/cache/a90aa34f427a2f62.tar.zst +0 -0
- package/.turbo/cache/aeee74f29106cab5-meta.json +1 -0
- package/.turbo/cache/aeee74f29106cab5.tar.zst +0 -0
- package/.turbo/cache/b61416daf63fbaad-meta.json +1 -0
- package/.turbo/cache/b61416daf63fbaad.tar.zst +0 -0
- package/.turbo/cache/b9463532618cdc61-meta.json +1 -0
- package/.turbo/cache/b9463532618cdc61.tar.zst +0 -0
- package/.turbo/cache/bb3afea40c91e8ba-meta.json +1 -0
- package/.turbo/cache/bb3afea40c91e8ba.tar.zst +0 -0
- package/.turbo/cache/c2e5da6599ac51c9-meta.json +1 -0
- package/.turbo/cache/c2e5da6599ac51c9.tar.zst +0 -0
- package/.turbo/cache/c53689c4c8b7448c-meta.json +1 -0
- package/.turbo/cache/c53689c4c8b7448c.tar.zst +0 -0
- package/.turbo/cache/c63dc7b6157da70b-meta.json +1 -0
- package/.turbo/cache/c63dc7b6157da70b.tar.zst +0 -0
- package/.turbo/cache/c7bb3445b71ead45-meta.json +1 -0
- package/.turbo/cache/c7bb3445b71ead45.tar.zst +0 -0
- package/.turbo/cache/c8b63b6e8a190eb9-meta.json +1 -0
- package/.turbo/cache/c8b63b6e8a190eb9.tar.zst +0 -0
- package/.turbo/cache/cd8bab87240a17ed-meta.json +1 -0
- package/.turbo/cache/cd8bab87240a17ed.tar.zst +0 -0
- package/.turbo/cache/d35b1eee9f2881af-meta.json +1 -0
- package/.turbo/cache/d35b1eee9f2881af.tar.zst +0 -0
- package/.turbo/cache/d641ace8fafc5cd2-meta.json +1 -0
- package/.turbo/cache/d641ace8fafc5cd2.tar.zst +0 -0
- package/.turbo/cache/d8bd6f80733c28af-meta.json +1 -0
- package/.turbo/cache/d8bd6f80733c28af.tar.zst +0 -0
- package/.turbo/cache/e4b3ec56d4ae56ba-meta.json +1 -0
- package/.turbo/cache/e4b3ec56d4ae56ba.tar.zst +0 -0
- package/.turbo/cache/e6f030eddf6fbf4e-meta.json +1 -0
- package/.turbo/cache/e6f030eddf6fbf4e.tar.zst +0 -0
- package/.turbo/cache/e81d7d64333b17e4-meta.json +1 -0
- package/.turbo/cache/e81d7d64333b17e4.tar.zst +0 -0
- package/.turbo/cache/ec4e1a5bd603f7ef-meta.json +1 -0
- package/.turbo/cache/ec4e1a5bd603f7ef.tar.zst +0 -0
- package/.turbo/cache/f6ee0c1e3e6753e1-meta.json +1 -0
- package/.turbo/cache/f6ee0c1e3e6753e1.tar.zst +0 -0
- package/.turbo/cache/f88563bd8d462bf1-meta.json +1 -0
- package/.turbo/cache/f88563bd8d462bf1.tar.zst +0 -0
- package/.turbo/cache/fdce614efad05760-meta.json +1 -0
- package/.turbo/cache/fdce614efad05760.tar.zst +0 -0
- package/.turbo/cache/fdd1bdd173a4185c-meta.json +1 -0
- package/.turbo/cache/fdd1bdd173a4185c.tar.zst +0 -0
- package/CHANGELOG.md +367 -0
- package/LICENSE +201 -0
- package/README.md +225 -0
- package/components/checkbox/.stylelintrc.json +3 -0
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +98 -0
- package/components/checkbox/.turbo/turbo-build.log +182 -0
- package/components/checkbox/.turbo/turbo-bundler.log +13 -0
- package/components/checkbox/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/checkbox/.turbo/turbo-sass$colon$render.log +34 -0
- package/components/checkbox/.turbo/turbo-types.log +4 -0
- package/components/checkbox/README.md +187 -0
- package/components/checkbox/demo/api.html +48 -0
- package/components/checkbox/demo/api.js +1 -0
- package/components/checkbox/demo/api.md +272 -0
- package/components/checkbox/demo/api.min.js +845 -0
- package/components/checkbox/demo/index.js +8 -0
- package/components/checkbox/demo/index.md +306 -0
- package/components/checkbox/demo/index.min.js +845 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +119 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +75 -0
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -0
- package/components/checkbox/dist/index.d.ts +4 -0
- package/components/checkbox/dist/index.d.ts.map +1 -0
- package/components/checkbox/dist/index.js +844 -0
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +3 -0
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts.map +1 -0
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +3 -0
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts.map +1 -0
- package/components/checkbox/dist/styles/color-css.d.ts +3 -0
- package/components/checkbox/dist/styles/color-css.d.ts.map +1 -0
- package/components/checkbox/dist/styles/colorGroup-css.d.ts +3 -0
- package/components/checkbox/dist/styles/colorGroup-css.d.ts.map +1 -0
- package/components/checkbox/dist/styles/tokens-css.d.ts +3 -0
- package/components/checkbox/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/checkbox/node_modules/chalk/package.json +83 -0
- package/components/checkbox/node_modules/chalk/readme.md +325 -0
- package/components/checkbox/node_modules/chalk/source/index.d.ts +320 -0
- package/components/checkbox/node_modules/chalk/source/index.js +225 -0
- package/components/checkbox/node_modules/chalk/source/utilities.js +33 -0
- package/components/checkbox/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/checkbox/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/checkbox/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/checkbox/package.json +68 -0
- package/components/checkbox/src/auro-checkbox-group.js +319 -0
- package/components/checkbox/src/auro-checkbox.js +184 -0
- package/components/checkbox/src/index.js +8 -0
- package/components/checkbox/src/styles/auro-checkbox-css.js +2 -0
- package/components/checkbox/src/styles/auro-checkbox-group-css.js +2 -0
- package/components/checkbox/src/styles/auro-checkbox-group.css +26 -0
- package/components/checkbox/src/styles/auro-checkbox-group.scss +38 -0
- package/components/checkbox/src/styles/auro-checkbox.css +123 -0
- package/components/checkbox/src/styles/auro-checkbox.scss +100 -0
- package/components/checkbox/src/styles/color-css.js +2 -0
- package/components/checkbox/src/styles/color.css +84 -0
- package/components/checkbox/src/styles/color.scss +118 -0
- package/components/checkbox/src/styles/colorGroup-css.js +2 -0
- package/components/checkbox/src/styles/colorGroup.css +16 -0
- package/components/checkbox/src/styles/colorGroup.scss +24 -0
- package/components/checkbox/src/styles/tokens-css.js +2 -0
- package/components/checkbox/src/styles/tokens.css +9 -0
- package/components/checkbox/src/styles/tokens.scss +11 -0
- package/components/combobox/.stylelintrc.json +3 -0
- package/components/combobox/.turbo/turbo-build$colon$sass.log +46 -0
- package/components/combobox/.turbo/turbo-build.log +157 -0
- package/components/combobox/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/combobox/.turbo/turbo-sass$colon$render.log +10 -0
- package/components/combobox/README.md +200 -0
- package/components/combobox/demo/api.html +54 -0
- package/components/combobox/demo/api.js +32 -0
- package/components/combobox/demo/api.md +743 -0
- package/components/combobox/demo/api.min.js +9017 -0
- package/components/combobox/demo/index.js +26 -0
- package/components/combobox/demo/index.md +626 -0
- package/components/combobox/demo/index.min.js +8919 -0
- package/components/combobox/dist/auro-combobox.d.ts +221 -0
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -0
- package/components/combobox/dist/formkit/auro-dropdownVersion.d.ts +3 -0
- package/components/combobox/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
- package/components/combobox/dist/formkit/auro-inputVersion.d.ts +3 -0
- package/components/combobox/dist/formkit/auro-inputVersion.d.ts.map +1 -0
- package/components/combobox/dist/index.d.ts +3 -0
- package/components/combobox/dist/index.d.ts.map +1 -0
- package/components/combobox/dist/index.js +7842 -0
- package/components/combobox/dist/styles/style-css.d.ts +3 -0
- package/components/combobox/dist/styles/style-css.d.ts.map +1 -0
- package/components/combobox/node_modules/chalk/package.json +83 -0
- package/components/combobox/node_modules/chalk/readme.md +325 -0
- package/components/combobox/node_modules/chalk/source/index.d.ts +320 -0
- package/components/combobox/node_modules/chalk/source/index.js +225 -0
- package/components/combobox/node_modules/chalk/source/utilities.js +33 -0
- package/components/combobox/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/combobox/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/combobox/package.json +67 -0
- package/components/combobox/src/auro-combobox.js +674 -0
- package/components/combobox/src/formkit/auro-dropdownVersion.js +1 -0
- package/components/combobox/src/formkit/auro-inputVersion.js +1 -0
- package/components/combobox/src/index.js +6 -0
- package/components/combobox/src/styles/style-css.js +2 -0
- package/components/combobox/src/styles/style.css +60 -0
- package/components/combobox/src/styles/style.scss +46 -0
- package/components/counter/.stylelintrc.json +3 -0
- package/components/counter/.turbo/turbo-build$colon$sass.log +66 -0
- package/components/counter/.turbo/turbo-build.log +87 -0
- package/components/counter/.turbo/turbo-bundler.log +13 -0
- package/components/counter/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/counter/.turbo/turbo-sass$colon$render.log +16 -0
- package/components/counter/.turbo/turbo-types.log +4 -0
- package/components/counter/demo/api.html +52 -0
- package/components/counter/demo/api.js +16 -0
- package/components/counter/demo/api.md +1053 -0
- package/components/counter/demo/api.min.js +115 -0
- package/components/counter/demo/index.js +20 -0
- package/components/counter/demo/index.md +12 -0
- package/components/counter/demo/index.min.js +71 -0
- package/components/counter/dist/auro-counter-group.d.ts +20 -0
- package/components/counter/dist/auro-counter-group.d.ts.map +1 -0
- package/components/counter/dist/auro-counter.d.ts +6 -0
- package/components/counter/dist/auro-counter.d.ts.map +1 -0
- package/components/counter/dist/index.d.ts +4 -0
- package/components/counter/dist/index.d.ts.map +1 -0
- package/components/counter/dist/index.js +110 -0
- package/components/counter/dist/styles/counter-group-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-group-css.d.ts.map +1 -0
- package/components/counter/dist/styles/style-css.d.ts +3 -0
- package/components/counter/dist/styles/style-css.d.ts.map +1 -0
- package/components/counter/node_modules/chalk/package.json +83 -0
- package/components/counter/node_modules/chalk/readme.md +325 -0
- package/components/counter/node_modules/chalk/source/index.d.ts +320 -0
- package/components/counter/node_modules/chalk/source/index.js +225 -0
- package/components/counter/node_modules/chalk/source/utilities.js +33 -0
- package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/counter/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/counter/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/counter/package.json +50 -0
- package/components/counter/src/auro-counter-group.js +48 -0
- package/components/counter/src/auro-counter.js +29 -0
- package/components/counter/src/index.js +8 -0
- package/components/counter/src/styles/counter-group-css.js +2 -0
- package/components/counter/src/styles/counter-group.css +4 -0
- package/components/counter/src/styles/counter-group.scss +17 -0
- package/components/counter/src/styles/style-css.js +2 -0
- package/components/counter/src/styles/style.css +4 -0
- package/components/counter/src/styles/style.scss +17 -0
- package/components/datepicker/.stylelintrc.json +3 -0
- package/components/datepicker/.turbo/turbo-build$colon$sass.log +352 -0
- package/components/datepicker/.turbo/turbo-build.log +489 -0
- package/components/datepicker/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/datepicker/.turbo/turbo-sass$colon$render.log +58 -0
- package/components/datepicker/README.md +181 -0
- package/components/datepicker/demo/api.html +58 -0
- package/components/datepicker/demo/api.js +33 -0
- package/components/datepicker/demo/api.md +1172 -0
- package/components/datepicker/demo/api.min.js +18446 -0
- package/components/datepicker/demo/index.js +19 -0
- package/components/datepicker/demo/index.md +107 -0
- package/components/datepicker/demo/index.min.js +18175 -0
- package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
- package/components/datepicker/dist/auro-calendar-cell.d.ts.map +1 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts +5 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts.map +1 -0
- package/components/datepicker/dist/auro-calendar.d.ts +105 -0
- package/components/datepicker/dist/auro-calendar.d.ts.map +1 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +336 -0
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -0
- package/components/datepicker/dist/dropdownVersion.d.ts +1 -0
- package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -0
- package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts +3 -0
- package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
- package/components/datepicker/dist/formkit/auro-inputVersion.d.ts +3 -0
- package/components/datepicker/dist/formkit/auro-inputVersion.d.ts.map +1 -0
- package/components/datepicker/dist/index.d.ts +3 -0
- package/components/datepicker/dist/index.d.ts.map +1 -0
- package/components/datepicker/dist/index.js +18171 -0
- package/components/datepicker/dist/popoverVersion.d.ts +3 -0
- package/components/datepicker/dist/popoverVersion.d.ts.map +1 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +3 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/color-cell-css.d.ts +3 -0
- package/components/datepicker/dist/styles/color-cell-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/color-css.d.ts +3 -0
- package/components/datepicker/dist/styles/color-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/color-month-css.d.ts +3 -0
- package/components/datepicker/dist/styles/color-month-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +3 -0
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +3 -0
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +3 -0
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/style-css.d.ts +3 -0
- package/components/datepicker/dist/styles/style-css.d.ts.map +1 -0
- package/components/datepicker/dist/styles/tokens-css.d.ts +3 -0
- package/components/datepicker/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/datepicker/dist/utilities.d.ts +47 -0
- package/components/datepicker/dist/utilities.d.ts.map +1 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts +39 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts.map +1 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +51 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts.map +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +6 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts.map +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +61 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts.map +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +2 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts.map +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +58 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts.map +1 -0
- package/components/datepicker/node_modules/chalk/package.json +83 -0
- package/components/datepicker/node_modules/chalk/readme.md +325 -0
- package/components/datepicker/node_modules/chalk/source/index.d.ts +320 -0
- package/components/datepicker/node_modules/chalk/source/index.js +225 -0
- package/components/datepicker/node_modules/chalk/source/utilities.js +33 -0
- package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/datepicker/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
- package/components/datepicker/node_modules/rollup-plugin-serve/README.md +137 -0
- package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
- package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
- package/components/datepicker/node_modules/rollup-plugin-serve/index.d.ts +75 -0
- package/components/datepicker/node_modules/rollup-plugin-serve/package.json +51 -0
- package/components/datepicker/package.json +79 -0
- package/components/datepicker/src/auro-calendar-cell.js +381 -0
- package/components/datepicker/src/auro-calendar-month.js +128 -0
- package/components/datepicker/src/auro-calendar.js +328 -0
- package/components/datepicker/src/auro-datepicker.js +968 -0
- package/components/datepicker/src/dropdownVersion.js +0 -0
- package/components/datepicker/src/formkit/auro-dropdownVersion.js +1 -0
- package/components/datepicker/src/formkit/auro-inputVersion.js +1 -0
- package/components/datepicker/src/index.js +6 -0
- package/components/datepicker/src/popoverVersion.js +1 -0
- package/components/datepicker/src/styles/color-calendar-css.js +2 -0
- package/components/datepicker/src/styles/color-calendar.css +35 -0
- package/components/datepicker/src/styles/color-calendar.scss +51 -0
- package/components/datepicker/src/styles/color-cell-css.js +2 -0
- package/components/datepicker/src/styles/color-cell.css +45 -0
- package/components/datepicker/src/styles/color-cell.scss +73 -0
- package/components/datepicker/src/styles/color-css.js +2 -0
- package/components/datepicker/src/styles/color-month-css.js +2 -0
- package/components/datepicker/src/styles/color-month.css +34 -0
- package/components/datepicker/src/styles/color-month.scss +27 -0
- package/components/datepicker/src/styles/color.css +43 -0
- package/components/datepicker/src/styles/color.scss +30 -0
- package/components/datepicker/src/styles/style-auro-calendar-cell-css.js +2 -0
- package/components/datepicker/src/styles/style-auro-calendar-cell.css +123 -0
- package/components/datepicker/src/styles/style-auro-calendar-cell.scss +147 -0
- package/components/datepicker/src/styles/style-auro-calendar-css.js +2 -0
- package/components/datepicker/src/styles/style-auro-calendar-month-css.js +2 -0
- package/components/datepicker/src/styles/style-auro-calendar-month.css +121 -0
- package/components/datepicker/src/styles/style-auro-calendar-month.scss +141 -0
- package/components/datepicker/src/styles/style-auro-calendar.css +152 -0
- package/components/datepicker/src/styles/style-auro-calendar.scss +191 -0
- package/components/datepicker/src/styles/style-css.js +2 -0
- package/components/datepicker/src/styles/style.css +111 -0
- package/components/datepicker/src/styles/style.scss +107 -0
- package/components/datepicker/src/styles/tokens-css.js +2 -0
- package/components/datepicker/src/styles/tokens.css +22 -0
- package/components/datepicker/src/styles/tokens.scss +25 -0
- package/components/datepicker/src/utilities.js +87 -0
- package/components/datepicker/src/utilitiesCalendar.js +139 -0
- package/components/datepicker/src/utilitiesCalendarRender.js +156 -0
- package/components/datepicker/src/vendor/wc-range-datepicker/day.js +8 -0
- package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-calendar.js +521 -0
- package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-cell.js +211 -0
- package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker.js +254 -0
- package/components/dropdown/.stylelintrc.json +3 -0
- package/components/dropdown/.turbo/turbo-build$colon$sass.log +75 -0
- package/components/dropdown/.turbo/turbo-build$colon$version.log +7 -0
- package/components/dropdown/.turbo/turbo-build.log +206 -0
- package/components/dropdown/.turbo/turbo-bundler.log +13 -0
- package/components/dropdown/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/dropdown/.turbo/turbo-sass$colon$render.log +34 -0
- package/components/dropdown/.turbo/turbo-types.log +4 -0
- package/components/dropdown/README.md +188 -0
- package/components/dropdown/demo/api.html +53 -0
- package/components/dropdown/demo/api.js +21 -0
- package/components/dropdown/demo/api.md +1173 -0
- package/components/dropdown/demo/api.min.js +2868 -0
- package/components/dropdown/demo/index.js +22 -0
- package/components/dropdown/demo/index.md +360 -0
- package/components/dropdown/demo/index.min.js +2834 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +189 -0
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +33 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -0
- package/components/dropdown/dist/floatingUI.d.mts +68 -0
- package/components/dropdown/dist/floatingUI.d.mts.map +1 -0
- package/components/dropdown/dist/iconVersion.d.ts +3 -0
- package/components/dropdown/dist/iconVersion.d.ts.map +1 -0
- package/components/dropdown/dist/index.d.ts +3 -0
- package/components/dropdown/dist/index.d.ts.map +1 -0
- package/components/dropdown/dist/index.js +2825 -0
- package/components/dropdown/dist/styles/bibColors-css.d.ts +3 -0
- package/components/dropdown/dist/styles/bibColors-css.d.ts.map +1 -0
- package/components/dropdown/dist/styles/bibStyles-css.d.ts +3 -0
- package/components/dropdown/dist/styles/bibStyles-css.d.ts.map +1 -0
- package/components/dropdown/dist/styles/color-css.d.ts +3 -0
- package/components/dropdown/dist/styles/color-css.d.ts.map +1 -0
- package/components/dropdown/dist/styles/style-css.d.ts +3 -0
- package/components/dropdown/dist/styles/style-css.d.ts.map +1 -0
- package/components/dropdown/dist/styles/tokens-css.d.ts +3 -0
- package/components/dropdown/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/dropdown/node_modules/chalk/package.json +83 -0
- package/components/dropdown/node_modules/chalk/readme.md +325 -0
- package/components/dropdown/node_modules/chalk/source/index.d.ts +320 -0
- package/components/dropdown/node_modules/chalk/source/index.js +225 -0
- package/components/dropdown/node_modules/chalk/source/utilities.js +33 -0
- package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/dropdown/package.json +57 -0
- package/components/dropdown/src/auro-dropdown.js +354 -0
- package/components/dropdown/src/auro-dropdownBib.js +97 -0
- package/components/dropdown/src/floatingUI.mjs +381 -0
- package/components/dropdown/src/iconVersion.js +1 -0
- package/components/dropdown/src/index.js +6 -0
- package/components/dropdown/src/styles/bibColors-css.js +2 -0
- package/components/dropdown/src/styles/bibColors.css +6 -0
- package/components/dropdown/src/styles/bibColors.scss +18 -0
- package/components/dropdown/src/styles/bibStyles-css.js +2 -0
- package/components/dropdown/src/styles/bibStyles.css +48 -0
- package/components/dropdown/src/styles/bibStyles.scss +67 -0
- package/components/dropdown/src/styles/color-css.js +2 -0
- package/components/dropdown/src/styles/color.css +60 -0
- package/components/dropdown/src/styles/color.scss +79 -0
- package/components/dropdown/src/styles/style-css.js +2 -0
- package/components/dropdown/src/styles/style.css +81 -0
- package/components/dropdown/src/styles/style.scss +110 -0
- package/components/dropdown/src/styles/tokens-css.js +2 -0
- package/components/dropdown/src/styles/tokens.css +13 -0
- package/components/dropdown/src/styles/tokens.scss +15 -0
- package/components/form/.stylelintrc.json +3 -0
- package/components/form/.turbo/turbo-build$colon$sass.log +57 -0
- package/components/form/.turbo/turbo-build$colon$version.log +4 -0
- package/components/form/.turbo/turbo-build.log +113 -0
- package/components/form/.turbo/turbo-bundler.log +13 -0
- package/components/form/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/form/.turbo/turbo-sass$colon$render.log +10 -0
- package/components/form/.turbo/turbo-types.log +4 -0
- package/components/form/README.md +186 -0
- package/components/form/demo/api.html +48 -0
- package/components/form/demo/api.js +3 -0
- package/components/form/demo/api.md +0 -0
- package/components/form/demo/api.min.js +160 -0
- package/components/form/demo/index.js +4 -0
- package/components/form/demo/index.md +40 -0
- package/components/form/demo/index.min.js +161 -0
- package/components/form/dist/auro-form.d.ts +26 -0
- package/components/form/dist/auro-form.d.ts.map +1 -0
- package/components/form/dist/index.d.ts +3 -0
- package/components/form/dist/index.d.ts.map +1 -0
- package/components/form/dist/index.js +162 -0
- package/components/form/dist/styles/style-css.d.ts +3 -0
- package/components/form/dist/styles/style-css.d.ts.map +1 -0
- package/components/form/node_modules/chalk/package.json +83 -0
- package/components/form/node_modules/chalk/readme.md +325 -0
- package/components/form/node_modules/chalk/source/index.d.ts +320 -0
- package/components/form/node_modules/chalk/source/index.js +225 -0
- package/components/form/node_modules/chalk/source/utilities.js +33 -0
- package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/form/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/form/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/form/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/form/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/form/package.json +72 -0
- package/components/form/src/auro-form.js +74 -0
- package/components/form/src/index.js +6 -0
- package/components/form/src/styles/style-css.js +2 -0
- package/components/form/src/styles/style.css +36 -0
- package/components/form/src/styles/style.scss +37 -0
- package/components/input/.stylelintrc.json +3 -0
- package/components/input/.turbo/turbo-build$colon$sass.log +148 -0
- package/components/input/.turbo/turbo-build$colon$version.log +10 -0
- package/components/input/.turbo/turbo-build.log +300 -0
- package/components/input/.turbo/turbo-bundler.log +13 -0
- package/components/input/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/input/.turbo/turbo-sass$colon$render.log +52 -0
- package/components/input/.turbo/turbo-types.log +4 -0
- package/components/input/README.md +176 -0
- package/components/input/demo/api.html +40 -0
- package/components/input/demo/api.js +25 -0
- package/components/input/demo/api.md +1251 -0
- package/components/input/demo/api.min.js +4068 -0
- package/components/input/demo/index.js +20 -0
- package/components/input/demo/index.md +253 -0
- package/components/input/demo/index.min.js +4010 -0
- package/components/input/dist/auro-input.d.ts +29 -0
- package/components/input/dist/auro-input.d.ts.map +1 -0
- package/components/input/dist/base-input.d.ts +359 -0
- package/components/input/dist/base-input.d.ts.map +1 -0
- package/components/input/dist/buttonVersion.d.ts +3 -0
- package/components/input/dist/buttonVersion.d.ts.map +1 -0
- package/components/input/dist/i18n.d.ts +19 -0
- package/components/input/dist/i18n.d.ts.map +1 -0
- package/components/input/dist/iconVersion.d.ts +3 -0
- package/components/input/dist/iconVersion.d.ts.map +1 -0
- package/components/input/dist/index.d.ts +3 -0
- package/components/input/dist/index.d.ts.map +1 -0
- package/components/input/dist/index.js +3977 -0
- package/components/input/dist/styles/borders-css.d.ts +3 -0
- package/components/input/dist/styles/borders-css.d.ts.map +1 -0
- package/components/input/dist/styles/color-css.d.ts +3 -0
- package/components/input/dist/styles/color-css.d.ts.map +1 -0
- package/components/input/dist/styles/helpText-css.d.ts +3 -0
- package/components/input/dist/styles/helpText-css.d.ts.map +1 -0
- package/components/input/dist/styles/input-css.d.ts +3 -0
- package/components/input/dist/styles/input-css.d.ts.map +1 -0
- package/components/input/dist/styles/label-css.d.ts +3 -0
- package/components/input/dist/styles/label-css.d.ts.map +1 -0
- package/components/input/dist/styles/notificationIcons-css.d.ts +3 -0
- package/components/input/dist/styles/notificationIcons-css.d.ts.map +1 -0
- package/components/input/dist/styles/style-css.d.ts +3 -0
- package/components/input/dist/styles/style-css.d.ts.map +1 -0
- package/components/input/dist/styles/tokens-css.d.ts +3 -0
- package/components/input/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/input/node_modules/chalk/package.json +83 -0
- package/components/input/node_modules/chalk/readme.md +325 -0
- package/components/input/node_modules/chalk/source/index.d.ts +320 -0
- package/components/input/node_modules/chalk/source/index.js +225 -0
- package/components/input/node_modules/chalk/source/utilities.js +33 -0
- package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/input/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/input/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/input/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/input/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/input/package.json +75 -0
- package/components/input/src/auro-input.js +242 -0
- package/components/input/src/base-input.js +942 -0
- package/components/input/src/buttonVersion.js +1 -0
- package/components/input/src/i18n.js +102 -0
- package/components/input/src/iconVersion.js +1 -0
- package/components/input/src/index.js +6 -0
- package/components/input/src/styles/@aurodesignsystem/webcorestylesheets/src/breakpoints +0 -0
- package/components/input/src/styles/borders-css.js +2 -0
- package/components/input/src/styles/borders.css +35 -0
- package/components/input/src/styles/borders.scss +65 -0
- package/components/input/src/styles/color-css.js +2 -0
- package/components/input/src/styles/color.css +63 -0
- package/components/input/src/styles/color.scss +96 -0
- package/components/input/src/styles/helpText-css.js +2 -0
- package/components/input/src/styles/helpText.css +6 -0
- package/components/input/src/styles/helpText.scss +9 -0
- package/components/input/src/styles/input-css.js +2 -0
- package/components/input/src/styles/input.css +22 -0
- package/components/input/src/styles/input.scss +29 -0
- package/components/input/src/styles/label-css.js +2 -0
- package/components/input/src/styles/label.css +45 -0
- package/components/input/src/styles/label.scss +75 -0
- package/components/input/src/styles/notificationIcons-css.js +2 -0
- package/components/input/src/styles/notificationIcons.css +76 -0
- package/components/input/src/styles/notificationIcons.scss +103 -0
- package/components/input/src/styles/style-css.js +2 -0
- package/components/input/src/styles/style.css +272 -0
- package/components/input/src/styles/style.scss +57 -0
- package/components/input/src/styles/tokens-css.js +2 -0
- package/components/input/src/styles/tokens.css +9 -0
- package/components/input/src/styles/tokens.scss +11 -0
- package/components/menu/.stylelintrc.json +3 -0
- package/components/menu/.turbo/turbo-build$colon$sass.log +86 -0
- package/components/menu/.turbo/turbo-build$colon$version.log +7 -0
- package/components/menu/.turbo/turbo-build.log +181 -0
- package/components/menu/.turbo/turbo-bundler.log +13 -0
- package/components/menu/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/menu/.turbo/turbo-sass$colon$render.log +34 -0
- package/components/menu/.turbo/turbo-types.log +4 -0
- package/components/menu/README.md +190 -0
- package/components/menu/demo/api.html +51 -0
- package/components/menu/demo/api.js +25 -0
- package/components/menu/demo/api.md +781 -0
- package/components/menu/demo/api.min.js +1233 -0
- package/components/menu/demo/index.js +28 -0
- package/components/menu/demo/index.md +104 -0
- package/components/menu/demo/index.min.js +1186 -0
- package/components/menu/dist/auro-menu.d.ts +168 -0
- package/components/menu/dist/auro-menu.d.ts.map +1 -0
- package/components/menu/dist/auro-menuoption.d.ts +65 -0
- package/components/menu/dist/auro-menuoption.d.ts.map +1 -0
- package/components/menu/dist/iconVersion.d.ts +3 -0
- package/components/menu/dist/iconVersion.d.ts.map +1 -0
- package/components/menu/dist/index.d.ts +4 -0
- package/components/menu/dist/index.d.ts.map +1 -0
- package/components/menu/dist/index.js +1178 -0
- package/components/menu/dist/styles/color-menu-css.d.ts +3 -0
- package/components/menu/dist/styles/color-menu-css.d.ts.map +1 -0
- package/components/menu/dist/styles/color-menuoption-css.d.ts +3 -0
- package/components/menu/dist/styles/color-menuoption-css.d.ts.map +1 -0
- package/components/menu/dist/styles/style-menu-css.d.ts +3 -0
- package/components/menu/dist/styles/style-menu-css.d.ts.map +1 -0
- package/components/menu/dist/styles/style-menuoption-css.d.ts +3 -0
- package/components/menu/dist/styles/style-menuoption-css.d.ts.map +1 -0
- package/components/menu/dist/styles/tokens-css.d.ts +3 -0
- package/components/menu/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/menu/node_modules/chalk/package.json +83 -0
- package/components/menu/node_modules/chalk/readme.md +325 -0
- package/components/menu/node_modules/chalk/source/index.d.ts +320 -0
- package/components/menu/node_modules/chalk/source/index.js +225 -0
- package/components/menu/node_modules/chalk/source/utilities.js +33 -0
- package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/menu/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/menu/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/menu/node_modules/mime/CHANGELOG.md +296 -0
- package/components/menu/node_modules/mime/Mime.js +97 -0
- package/components/menu/node_modules/mime/README.md +187 -0
- package/components/menu/node_modules/mime/cli.js +46 -0
- package/components/menu/node_modules/mime/index.js +4 -0
- package/components/menu/node_modules/mime/lite.js +4 -0
- package/components/menu/node_modules/mime/package.json +52 -0
- package/components/menu/node_modules/mime/types/other.js +1 -0
- package/components/menu/node_modules/mime/types/standard.js +1 -0
- package/components/menu/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
- package/components/menu/node_modules/rollup-plugin-serve/README.md +135 -0
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs.js +197 -0
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.es.js +193 -0
- package/components/menu/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
- package/components/menu/node_modules/rollup-plugin-serve/package.json +44 -0
- package/components/menu/package.json +70 -0
- package/components/menu/src/auro-menu.js +521 -0
- package/components/menu/src/auro-menuoption.js +148 -0
- package/components/menu/src/iconVersion.js +1 -0
- package/components/menu/src/index.js +8 -0
- package/components/menu/src/styles/color-menu-css.js +2 -0
- package/components/menu/src/styles/color-menu.css +4 -0
- package/components/menu/src/styles/color-menu.scss +12 -0
- package/components/menu/src/styles/color-menuoption-css.js +2 -0
- package/components/menu/src/styles/color-menuoption.css +23 -0
- package/components/menu/src/styles/color-menuoption.scss +33 -0
- package/components/menu/src/styles/style-menu-css.js +2 -0
- package/components/menu/src/styles/style-menu.css +2043 -0
- package/components/menu/src/styles/style-menu.scss +58 -0
- package/components/menu/src/styles/style-menuoption-css.js +2 -0
- package/components/menu/src/styles/style-menuoption.css +45 -0
- package/components/menu/src/styles/style-menuoption.scss +66 -0
- package/components/menu/src/styles/tokens-css.js +2 -0
- package/components/menu/src/styles/tokens.css +6 -0
- package/components/menu/src/styles/tokens.scss +6 -0
- package/components/radio/.stylelintrc.json +3 -0
- package/components/radio/.turbo/turbo-build$colon$sass.log +130 -0
- package/components/radio/.turbo/turbo-build.log +213 -0
- package/components/radio/.turbo/turbo-bundler.log +13 -0
- package/components/radio/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/radio/.turbo/turbo-sass$colon$render.log +34 -0
- package/components/radio/.turbo/turbo-types.log +4 -0
- package/components/radio/README.md +176 -0
- package/components/radio/demo/api.html +50 -0
- package/components/radio/demo/api.js +17 -0
- package/components/radio/demo/api.md +401 -0
- package/components/radio/demo/api.min.js +1050 -0
- package/components/radio/demo/index.js +8 -0
- package/components/radio/demo/index.md +122 -0
- package/components/radio/demo/index.min.js +1016 -0
- package/components/radio/dist/auro-radio-group.d.ts +171 -0
- package/components/radio/dist/auro-radio-group.d.ts.map +1 -0
- package/components/radio/dist/auro-radio.d.ts +113 -0
- package/components/radio/dist/auro-radio.d.ts.map +1 -0
- package/components/radio/dist/index.d.ts +4 -0
- package/components/radio/dist/index.d.ts.map +1 -0
- package/components/radio/dist/index.js +1015 -0
- package/components/radio/dist/styles/auro-radio-group-css.d.ts +3 -0
- package/components/radio/dist/styles/auro-radio-group-css.d.ts.map +1 -0
- package/components/radio/dist/styles/color-css.d.ts +3 -0
- package/components/radio/dist/styles/color-css.d.ts.map +1 -0
- package/components/radio/dist/styles/groupColor-css.d.ts +3 -0
- package/components/radio/dist/styles/groupColor-css.d.ts.map +1 -0
- package/components/radio/dist/styles/style-css.d.ts +3 -0
- package/components/radio/dist/styles/style-css.d.ts.map +1 -0
- package/components/radio/dist/styles/tokens-css.d.ts +3 -0
- package/components/radio/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/radio/node_modules/chalk/package.json +83 -0
- package/components/radio/node_modules/chalk/readme.md +325 -0
- package/components/radio/node_modules/chalk/source/index.d.ts +320 -0
- package/components/radio/node_modules/chalk/source/index.js +225 -0
- package/components/radio/node_modules/chalk/source/utilities.js +33 -0
- package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/radio/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/radio/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/radio/package.json +69 -0
- package/components/radio/src/auro-radio-group.js +433 -0
- package/components/radio/src/auro-radio.js +247 -0
- package/components/radio/src/index.js +8 -0
- package/components/radio/src/styles/auro-radio-group-css.js +2 -0
- package/components/radio/src/styles/auro-radio-group.css +23 -0
- package/components/radio/src/styles/auro-radio-group.scss +36 -0
- package/components/radio/src/styles/color-css.js +2 -0
- package/components/radio/src/styles/color.css +45 -0
- package/components/radio/src/styles/color.scss +56 -0
- package/components/radio/src/styles/groupColor-css.js +2 -0
- package/components/radio/src/styles/groupColor.css +21 -0
- package/components/radio/src/styles/groupColor.scss +33 -0
- package/components/radio/src/styles/style-css.js +2 -0
- package/components/radio/src/styles/style.css +113 -0
- package/components/radio/src/styles/style.scss +99 -0
- package/components/radio/src/styles/tokens-css.js +2 -0
- package/components/radio/src/styles/tokens.css +9 -0
- package/components/radio/src/styles/tokens.scss +12 -0
- package/components/select/.stylelintrc.json +3 -0
- package/components/select/.turbo/turbo-build$colon$sass.log +122 -0
- package/components/select/.turbo/turbo-build.log +237 -0
- package/components/select/.turbo/turbo-postCss$colon$component.log +5 -0
- package/components/select/.turbo/turbo-sass$colon$render.log +22 -0
- package/components/select/README.md +205 -0
- package/components/select/demo/alertValue.js +6 -0
- package/components/select/demo/api.html +53 -0
- package/components/select/demo/api.js +31 -0
- package/components/select/demo/api.md +748 -0
- package/components/select/demo/api.min.js +4845 -0
- package/components/select/demo/index.js +9 -0
- package/components/select/demo/index.md +470 -0
- package/components/select/demo/index.min.js +4768 -0
- package/components/select/dist/auro-select.d.ts +174 -0
- package/components/select/dist/auro-select.d.ts.map +1 -0
- package/components/select/dist/formkit/auro-dropdownVersion.d.ts +3 -0
- package/components/select/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
- package/components/select/dist/index.d.ts +3 -0
- package/components/select/dist/index.d.ts.map +1 -0
- package/components/select/dist/index.js +3732 -0
- package/components/select/dist/styles/color-css.d.ts +3 -0
- package/components/select/dist/styles/color-css.d.ts.map +1 -0
- package/components/select/dist/styles/style-css.d.ts +3 -0
- package/components/select/dist/styles/style-css.d.ts.map +1 -0
- package/components/select/dist/styles/tokens-css.d.ts +3 -0
- package/components/select/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/select/node_modules/chalk/package.json +83 -0
- package/components/select/node_modules/chalk/readme.md +325 -0
- package/components/select/node_modules/chalk/source/index.d.ts +320 -0
- package/components/select/node_modules/chalk/source/index.js +225 -0
- package/components/select/node_modules/chalk/source/utilities.js +33 -0
- package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/select/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/select/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
- package/components/select/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/select/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/select/node_modules/mime/CHANGELOG.md +296 -0
- package/components/select/node_modules/mime/Mime.js +97 -0
- package/components/select/node_modules/mime/README.md +187 -0
- package/components/select/node_modules/mime/cli.js +46 -0
- package/components/select/node_modules/mime/index.js +4 -0
- package/components/select/node_modules/mime/lite.js +4 -0
- package/components/select/node_modules/mime/package.json +52 -0
- package/components/select/node_modules/mime/types/other.js +1 -0
- package/components/select/node_modules/mime/types/standard.js +1 -0
- package/components/select/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
- package/components/select/node_modules/rollup-plugin-serve/README.md +135 -0
- package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
- package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs.js +197 -0
- package/components/select/node_modules/rollup-plugin-serve/dist/index.es.js +193 -0
- package/components/select/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
- package/components/select/node_modules/rollup-plugin-serve/package.json +44 -0
- package/components/select/package.json +70 -0
- package/components/select/packageScripts/postinstall.mjs +28 -0
- package/components/select/src/auro-select.js +537 -0
- package/components/select/src/formkit/auro-dropdownVersion.js +1 -0
- package/components/select/src/index.js +6 -0
- package/components/select/src/styles/color-css.js +2 -0
- package/components/select/src/styles/color.css +63 -0
- package/components/select/src/styles/color.scss +33 -0
- package/components/select/src/styles/style-css.js +2 -0
- package/components/select/src/styles/style.css +97 -0
- package/components/select/src/styles/style.scss +66 -0
- package/components/select/src/styles/tokens-css.js +2 -0
- package/components/select/src/styles/tokens.css +3 -0
- package/components/select/src/styles/tokens.scss +5 -0
- package/package.json +142 -0
- package/packages/build-tools/package.json +18 -0
- package/packages/build-tools/src/docProcessor.mjs +104 -0
- package/packages/build-tools/src/formVersionWriter.mjs +75 -0
- package/packages/build-tools/src/index.js +1 -0
- package/packages/build-tools/src/kitDocProcessor.mjs +66 -0
- package/packages/form-validation/package.json +12 -0
- package/packages/form-validation/src/index.js +1 -0
- package/packages/form-validation/src/validation.js +239 -0
- package/packages/typescript/base.json +19 -0
- package/packages/typescript/package.json +20 -0
- package/turbo.json +100 -0
|
@@ -0,0 +1,942 @@
|
|
|
1
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
|
|
4
|
+
// ---------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
/* eslint-disable max-lines, no-magic-numbers, dot-location */
|
|
7
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [0] }] */
|
|
8
|
+
|
|
9
|
+
import { LitElement, css } from "lit";
|
|
10
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
|
+
|
|
12
|
+
import styleCss from "./styles/style-css.js";
|
|
13
|
+
import colorCss from "./styles/color-css.js";
|
|
14
|
+
import tokensCss from "./styles/tokens-css.js";
|
|
15
|
+
|
|
16
|
+
import Cleave from 'cleave.js';
|
|
17
|
+
import i18n, {notifyOnLangChange, stopNotifyingOnLangChange} from './i18n.js';
|
|
18
|
+
|
|
19
|
+
import AuroFormValidation from '@auro-formkit/form-validation';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Auro-input provides users a way to enter data into a text field.
|
|
23
|
+
*
|
|
24
|
+
* @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
|
|
25
|
+
* @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]
|
|
26
|
+
* @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
27
|
+
* @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
|
|
28
|
+
* @attr {Boolean} bordered - Applies bordered UI variant.
|
|
29
|
+
* @attr {Boolean} borderless - Applies borderless UI variant.
|
|
30
|
+
* @attr {Boolean} disabled - If set, disables the input.
|
|
31
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
32
|
+
* @prop {String} errorMessage - Contains the help text message for the current validity error.
|
|
33
|
+
* @attr {String} helpText - Deprecated, see `slot`.
|
|
34
|
+
* @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.
|
|
35
|
+
* @attr {String} id - Sets the unique ID of the element.
|
|
36
|
+
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
|
|
37
|
+
* @attr {String} label - Deprecated, see `slot`.
|
|
38
|
+
* @attr {String} lang - defines the language of an element.
|
|
39
|
+
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `numeric` and all date formats.
|
|
40
|
+
* @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.
|
|
41
|
+
* @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `numeric` and all date formats.
|
|
42
|
+
* @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`.
|
|
43
|
+
* @attr {String} name - Populates the `name` attribute on the input.
|
|
44
|
+
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
45
|
+
* @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
|
|
46
|
+
* @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
|
|
47
|
+
* @attr {String} pattern - Specifies a regular expression the form control's value should match.
|
|
48
|
+
* @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
|
|
49
|
+
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
50
|
+
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
51
|
+
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
52
|
+
* @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
|
|
53
|
+
* @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
|
|
54
|
+
* @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
|
|
55
|
+
* @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
|
|
56
|
+
* @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
|
|
57
|
+
* @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
|
|
58
|
+
* @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`.
|
|
59
|
+
* @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`.
|
|
60
|
+
* @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
|
|
61
|
+
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
62
|
+
* @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
63
|
+
*
|
|
64
|
+
* @slot helptext - Sets the help text displayed below the input.
|
|
65
|
+
* @slot label - Sets the label text for the input.
|
|
66
|
+
*
|
|
67
|
+
* @csspart wrapper - Use for customizing the style of the root element
|
|
68
|
+
* @csspart label - Use for customizing the style of the label element
|
|
69
|
+
* @csspart helpText - Use for customizing the style of the helpText element
|
|
70
|
+
* @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
|
|
71
|
+
* @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
|
|
72
|
+
* @event input - Event fires when the value of an `auro-input` has been changed.
|
|
73
|
+
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
export default class BaseInput extends LitElement {
|
|
77
|
+
|
|
78
|
+
constructor() {
|
|
79
|
+
super();
|
|
80
|
+
|
|
81
|
+
this.isValid = false;
|
|
82
|
+
|
|
83
|
+
this.icon = false;
|
|
84
|
+
this.disabled = false;
|
|
85
|
+
this.required = false;
|
|
86
|
+
this.noValidate = false;
|
|
87
|
+
this.max = undefined;
|
|
88
|
+
this.min = undefined;
|
|
89
|
+
this.maxLength = undefined;
|
|
90
|
+
this.minLength = undefined;
|
|
91
|
+
this.label = 'Input label is undefined';
|
|
92
|
+
this.activeLabel = false;
|
|
93
|
+
|
|
94
|
+
this.setCustomValidityForType = undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Internal Defaults.
|
|
99
|
+
* @private
|
|
100
|
+
* @returns {void}
|
|
101
|
+
*/
|
|
102
|
+
privateDefaults() {
|
|
103
|
+
this.validation = new AuroFormValidation();
|
|
104
|
+
this.inputIconName = undefined;
|
|
105
|
+
this.showPassword = false;
|
|
106
|
+
this.validationCCLength = undefined;
|
|
107
|
+
this.hasValue = false;
|
|
108
|
+
|
|
109
|
+
this.allowedInputTypes = [
|
|
110
|
+
"text",
|
|
111
|
+
"email",
|
|
112
|
+
"password",
|
|
113
|
+
"credit-card",
|
|
114
|
+
"month-day-year",
|
|
115
|
+
"year-month-day",
|
|
116
|
+
"month-year"
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
this.dateInputTypes = [
|
|
120
|
+
"month-day-year",
|
|
121
|
+
"year-month-day",
|
|
122
|
+
"month-year",
|
|
123
|
+
"month-fullYear",
|
|
124
|
+
"month",
|
|
125
|
+
"year",
|
|
126
|
+
"fullYear"
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
this.autoFormattingTypes = [
|
|
130
|
+
'credit-card',
|
|
131
|
+
'month-day-year',
|
|
132
|
+
'month-year',
|
|
133
|
+
'month-fullyear',
|
|
134
|
+
'year-month-day'
|
|
135
|
+
];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Credit Card is not included as this caused cursor placement issues.
|
|
139
|
+
* The Safari issue.
|
|
140
|
+
*/
|
|
141
|
+
this.setSelectionInputTypes = [
|
|
142
|
+
"text",
|
|
143
|
+
"password",
|
|
144
|
+
"email",
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
const idLength = 36;
|
|
148
|
+
const idSubstrEnd = 8;
|
|
149
|
+
const idSubstrStart = 2;
|
|
150
|
+
|
|
151
|
+
this.uniqueId = Math.random()
|
|
152
|
+
.toString(idLength)
|
|
153
|
+
.substring(idSubstrStart, idSubstrEnd);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// function to define props used within the scope of this component
|
|
157
|
+
static get properties() {
|
|
158
|
+
return {
|
|
159
|
+
id: { type: String },
|
|
160
|
+
label: { type: String },
|
|
161
|
+
name: { type: String },
|
|
162
|
+
type: { type: String,
|
|
163
|
+
reflect: true },
|
|
164
|
+
value: { type: String },
|
|
165
|
+
lang: { type: String },
|
|
166
|
+
pattern: {
|
|
167
|
+
type: String,
|
|
168
|
+
reflect: true
|
|
169
|
+
},
|
|
170
|
+
icon: { type: Boolean },
|
|
171
|
+
disabled: { type: Boolean },
|
|
172
|
+
required: { type: Boolean },
|
|
173
|
+
noValidate: { type: Boolean },
|
|
174
|
+
helpText: { type: String },
|
|
175
|
+
spellcheck: { type: String },
|
|
176
|
+
autocorrect: { type: String },
|
|
177
|
+
autocapitalize: { type: String },
|
|
178
|
+
autocomplete: {
|
|
179
|
+
type: String,
|
|
180
|
+
reflect: true
|
|
181
|
+
},
|
|
182
|
+
placeholder: { type: String },
|
|
183
|
+
activeLabel: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
reflect: true
|
|
186
|
+
},
|
|
187
|
+
max: { type: String },
|
|
188
|
+
min: { type: String },
|
|
189
|
+
maxLength: { type: Number },
|
|
190
|
+
minLength: { type: Number },
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @ignore
|
|
194
|
+
*/
|
|
195
|
+
showPassword: { state: true },
|
|
196
|
+
validateOnInput: { type: Boolean },
|
|
197
|
+
readonly: { type: Boolean },
|
|
198
|
+
error: {
|
|
199
|
+
type: String,
|
|
200
|
+
reflect: true
|
|
201
|
+
},
|
|
202
|
+
errorMessage: { type: String },
|
|
203
|
+
isValid: {
|
|
204
|
+
type: String,
|
|
205
|
+
reflect: true
|
|
206
|
+
},
|
|
207
|
+
validity: {
|
|
208
|
+
type: String,
|
|
209
|
+
reflect: true
|
|
210
|
+
},
|
|
211
|
+
setCustomValidity: { type: String },
|
|
212
|
+
setCustomValidityCustomError: { type: String },
|
|
213
|
+
setCustomValidityValueMissing: { type: String },
|
|
214
|
+
setCustomValidityBadInput: { type: String },
|
|
215
|
+
setCustomValidityTooShort: { type: String },
|
|
216
|
+
setCustomValidityTooLong: { type: String },
|
|
217
|
+
setCustomValidityRangeOverflow: { type: String},
|
|
218
|
+
setCustomValidityRangeUnderflow: { type: String},
|
|
219
|
+
customValidityTypeEmail: { type: String }
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
static get styles() {
|
|
224
|
+
return [
|
|
225
|
+
css`${styleCss}`,
|
|
226
|
+
css`${colorCss}`,
|
|
227
|
+
css`${tokensCss}`
|
|
228
|
+
];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
connectedCallback() {
|
|
232
|
+
super.connectedCallback();
|
|
233
|
+
|
|
234
|
+
this.privateDefaults();
|
|
235
|
+
|
|
236
|
+
notifyOnLangChange(this);
|
|
237
|
+
|
|
238
|
+
// Process auto-formatting if defined for CleaveJS
|
|
239
|
+
if (this.type) {
|
|
240
|
+
let config = null;
|
|
241
|
+
|
|
242
|
+
// Set config for credit card
|
|
243
|
+
switch (this.type) {
|
|
244
|
+
case 'number':
|
|
245
|
+
config = {
|
|
246
|
+
numeral: true,
|
|
247
|
+
delimiter: ''
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
this.inputMode = 'numeric';
|
|
251
|
+
|
|
252
|
+
break;
|
|
253
|
+
|
|
254
|
+
case 'credit-card':
|
|
255
|
+
config = {
|
|
256
|
+
creditCard: true
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
this.inputMode = 'numeric';
|
|
260
|
+
|
|
261
|
+
break;
|
|
262
|
+
|
|
263
|
+
case 'month-day-year':
|
|
264
|
+
config = {
|
|
265
|
+
date: true,
|
|
266
|
+
delimiter: '/',
|
|
267
|
+
datePattern: [
|
|
268
|
+
'm',
|
|
269
|
+
'd',
|
|
270
|
+
'Y'
|
|
271
|
+
]
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
this.inputMode = 'numeric';
|
|
275
|
+
|
|
276
|
+
break;
|
|
277
|
+
|
|
278
|
+
case 'year-month-day':
|
|
279
|
+
config = {
|
|
280
|
+
date: true,
|
|
281
|
+
delimiter: '/',
|
|
282
|
+
datePattern: [
|
|
283
|
+
'Y',
|
|
284
|
+
'm',
|
|
285
|
+
'd'
|
|
286
|
+
]
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
this.inputMode = 'numeric';
|
|
290
|
+
|
|
291
|
+
break;
|
|
292
|
+
|
|
293
|
+
case 'month-year':
|
|
294
|
+
config = {
|
|
295
|
+
date: true,
|
|
296
|
+
datePattern: [
|
|
297
|
+
'm',
|
|
298
|
+
'y'
|
|
299
|
+
]
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
this.inputMode = 'numeric';
|
|
303
|
+
|
|
304
|
+
break;
|
|
305
|
+
|
|
306
|
+
case 'month-fullYear':
|
|
307
|
+
config = {
|
|
308
|
+
date: true,
|
|
309
|
+
datePattern: [
|
|
310
|
+
'm',
|
|
311
|
+
'Y'
|
|
312
|
+
]
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
this.inputMode = 'numeric';
|
|
316
|
+
|
|
317
|
+
break;
|
|
318
|
+
|
|
319
|
+
case 'fullYear':
|
|
320
|
+
config = {
|
|
321
|
+
date: true,
|
|
322
|
+
datePattern: ['Y']
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
this.inputMode = 'numeric';
|
|
326
|
+
|
|
327
|
+
break;
|
|
328
|
+
|
|
329
|
+
case 'year':
|
|
330
|
+
config = {
|
|
331
|
+
date: true,
|
|
332
|
+
datePattern: ['y']
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
this.inputMode = 'numeric';
|
|
336
|
+
|
|
337
|
+
break;
|
|
338
|
+
|
|
339
|
+
case 'month':
|
|
340
|
+
config = {
|
|
341
|
+
date: true,
|
|
342
|
+
datePattern: ['m']
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
this.inputMode = 'numeric';
|
|
346
|
+
|
|
347
|
+
break;
|
|
348
|
+
|
|
349
|
+
default:
|
|
350
|
+
// Do nothing
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// initialize CleaveJS if we have a defined config for the requested format
|
|
354
|
+
if (config) {
|
|
355
|
+
// eslint-disable-next-line no-unused-vars
|
|
356
|
+
const cleave = new Cleave(this, config);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
disconnectedCallback() {
|
|
362
|
+
super.disconnectedCallback();
|
|
363
|
+
stopNotifyingOnLangChange(this);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
firstUpdated() {
|
|
367
|
+
// add attribute for query selectors when auro-input is registered under a custom name
|
|
368
|
+
if (this.tagName.toLowerCase() !== 'auro-input') {
|
|
369
|
+
this.setAttribute('auro-input', true);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
this.inputElement = this.renderRoot.querySelector('input');
|
|
373
|
+
this.labelElement = this.shadowRoot.querySelector('label');
|
|
374
|
+
|
|
375
|
+
// use validity message override if declared when initializing the component
|
|
376
|
+
if (this.hasAttribute('setCustomValidity')) {
|
|
377
|
+
this.ValidityMessageOverride = this.setCustomValidity;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// if setCustomValidityForType is not set, use our default
|
|
381
|
+
if (!this.setCustomValidityForType) {
|
|
382
|
+
if (this.type === 'password') {
|
|
383
|
+
this.setCustomValidityForType = i18n(this.lang, 'password');
|
|
384
|
+
} else if (this.type === 'credit-card') {
|
|
385
|
+
this.setCustomValidityForType = i18n(this.lang, 'creditcard');
|
|
386
|
+
} else if (this.type === 'email') {
|
|
387
|
+
this.setCustomValidityForType = i18n(this.lang, 'email');
|
|
388
|
+
} else if (this.type === 'month-day-year') {
|
|
389
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateMMDDYYYY');
|
|
390
|
+
} else if (this.type === 'month-year') {
|
|
391
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateMMYY');
|
|
392
|
+
} else if (this.type === 'month-fullyear') {
|
|
393
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateMMYYYY');
|
|
394
|
+
} else if (this.type === 'year-month-day') {
|
|
395
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateYYYYMMDD');
|
|
396
|
+
} else if (this.type === 'year') {
|
|
397
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateYY');
|
|
398
|
+
} else if (this.type === 'fullYear') {
|
|
399
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateYYYY');
|
|
400
|
+
} else if (this.type === 'month') {
|
|
401
|
+
this.setCustomValidityForType = i18n(this.lang, 'dateMM');
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
this.addEventListener('keydown', (evt) => {
|
|
406
|
+
if (this.autoFormattingTypes.includes(this.type)) {
|
|
407
|
+
if (evt.key.length === 1 || evt.key === 'Backspace' || evt.key === 'Delete') {
|
|
408
|
+
if (evt.key.length === 1) {
|
|
409
|
+
const numCharSelected = this.inputElement.selectionEnd - this.inputElement.selectionStart;
|
|
410
|
+
|
|
411
|
+
if (numCharSelected > 1) {
|
|
412
|
+
this.cursorPosition = this.inputElement.selectionStart + 1;
|
|
413
|
+
} else if (numCharSelected === 1) {
|
|
414
|
+
this.cursorPosition = this.inputElement.selectionEnd;
|
|
415
|
+
} else {
|
|
416
|
+
this.cursorPosition = this.inputElement.selectionEnd + 1;
|
|
417
|
+
}
|
|
418
|
+
} else if (evt.key === 'Backspace') {
|
|
419
|
+
this.cursorPosition = this.inputElement.selectionEnd - 1;
|
|
420
|
+
} else if (evt.key === 'Delete') {
|
|
421
|
+
this.cursorPosition = this.inputElement.selectionEnd;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if (evt.key === "ArrowUp" || evt.key === "ArrowDown" || evt.key === "ArrowLeft" || evt.key === "ArrowRight") {
|
|
426
|
+
if (evt.key === 'ArrowUp') {
|
|
427
|
+
this.cursorPosition = 0;
|
|
428
|
+
} else if (evt.key === 'ArrowDown') {
|
|
429
|
+
this.cursorPosition = this.value.length;
|
|
430
|
+
} else if (evt.key === 'ArrowLeft') {
|
|
431
|
+
this.cursorPosition = this.inputElement.selectionEnd - 1;
|
|
432
|
+
} else if (evt.key === 'ArrowRight') {
|
|
433
|
+
this.cursorPosition = this.inputElement.selectionEnd + 1;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* LitElement lifecycle method. Called after the DOM has been updated.
|
|
442
|
+
* @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
|
|
443
|
+
* @returns {void}
|
|
444
|
+
*/
|
|
445
|
+
updated(changedProperties) {
|
|
446
|
+
if (this.type === 'password') {
|
|
447
|
+
this.spellcheck = 'false';
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (this.spellcheck === 'false') {
|
|
451
|
+
this.autocorrect = 'off';
|
|
452
|
+
this.autocapitalize = 'none';
|
|
453
|
+
} else {
|
|
454
|
+
this.autocorrect = this.autocorrect ? this.autocorrect : undefined;
|
|
455
|
+
this.autocapitalize = undefined;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if (changedProperties.has('readonly')) {
|
|
459
|
+
if (this.readonly) {
|
|
460
|
+
this.inputElement.setAttribute('readonly', true);
|
|
461
|
+
this.inputElement.setAttribute('aria-readonly', true);
|
|
462
|
+
} else {
|
|
463
|
+
this.inputElement.removeAttribute('readonly');
|
|
464
|
+
this.inputElement.removeAttribute('aria-readonly');
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (changedProperties.has('type')) {
|
|
469
|
+
this.configureDataForType();
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (changedProperties.has('value')) {
|
|
473
|
+
if (this.value && this.value.length > 0) {
|
|
474
|
+
this.hasValue = true;
|
|
475
|
+
this.requestUpdate();
|
|
476
|
+
} else {
|
|
477
|
+
this.hasValue = false;
|
|
478
|
+
this.requestUpdate();
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if (this.value !== this.inputElement.value) {
|
|
482
|
+
if (this.value) {
|
|
483
|
+
this.inputElement.value = this.value;
|
|
484
|
+
} else {
|
|
485
|
+
this.inputElement.value = '';
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
if (!this.shadowRoot.contains(this.getActiveElement())) {
|
|
489
|
+
this.validation.validate(this);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
this.notifyValueChanged();
|
|
493
|
+
}
|
|
494
|
+
this.autoFormatHandling();
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (changedProperties.has('error')) {
|
|
498
|
+
this.validation.validate(this, true);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
if (changedProperties.has('validity')) {
|
|
502
|
+
this.notifyValidityChange();
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @private
|
|
508
|
+
* @returns {void} Handles cursor position when input auto-formats.
|
|
509
|
+
*/
|
|
510
|
+
autoFormatHandling() {
|
|
511
|
+
if (this.cursorPosition >= 0 && this.autoFormattingTypes.includes(this.type)) {
|
|
512
|
+
if (this.type === 'credit-card' && this.inputElement.value.charAt(this.cursorPosition) === ' ') {
|
|
513
|
+
this.cursorPosition += 1;
|
|
514
|
+
} else if (this.dateInputTypes.includes(this.type)) {
|
|
515
|
+
const divider = '/';
|
|
516
|
+
const dividerNextChar = this.inputElement.value.charAt(this.cursorPosition) === divider;
|
|
517
|
+
|
|
518
|
+
if (this.cursorPosition > 1 && dividerNextChar && this.inputElement.value.charAt(this.cursorPosition - 2) !== divider) {
|
|
519
|
+
this.cursorPosition += 1;
|
|
520
|
+
} else if (this.cursorPosition > 0 && this.inputElement.value.charAt(this.cursorPosition + 1) === divider
|
|
521
|
+
&& this.inputElement.value.charAt(this.cursorPosition - 1) === '0') { // eslint-disable-line operator-linebreak
|
|
522
|
+
this.cursorPosition += 2;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
this.inputElement.setSelectionRange(this.cursorPosition, this.cursorPosition);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @private
|
|
532
|
+
* @returns {void} Notify validity state changed via event.
|
|
533
|
+
*/
|
|
534
|
+
notifyValidityChange() {
|
|
535
|
+
this.dispatchEvent(new CustomEvent('auroInput-validityChange', {
|
|
536
|
+
bubbles: true,
|
|
537
|
+
cancelable: false,
|
|
538
|
+
composed: true,
|
|
539
|
+
}));
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* @private
|
|
544
|
+
* @returns {string}
|
|
545
|
+
*/
|
|
546
|
+
definePattern() {
|
|
547
|
+
if (this.type === 'credit-card' && !this.noValidate && this.maxLength) {
|
|
548
|
+
return `.{${this.maxLength},${this.maxLength}}`;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
return this.pattern;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Function to set element focus.
|
|
556
|
+
* @private
|
|
557
|
+
* @return {void}
|
|
558
|
+
*/
|
|
559
|
+
focus() {
|
|
560
|
+
this.inputElement.focus();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Required to convert SVG icons from data to HTML string.
|
|
565
|
+
* @private
|
|
566
|
+
* @param {string} icon HTML string for requested icon.
|
|
567
|
+
* @returns {object} Appended HTML for SVG.
|
|
568
|
+
*/
|
|
569
|
+
getIconAsHtml(icon) {
|
|
570
|
+
const dom = new DOMParser().parseFromString(icon.svg, 'text/html');
|
|
571
|
+
|
|
572
|
+
return dom.body.firstChild;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Sends event notifying that the input has changed it's value.
|
|
577
|
+
* @private
|
|
578
|
+
* @returns {void}
|
|
579
|
+
*/
|
|
580
|
+
notifyValueChanged() {
|
|
581
|
+
let inputEvent = null;
|
|
582
|
+
|
|
583
|
+
inputEvent = new Event('input', {
|
|
584
|
+
bubbles: true,
|
|
585
|
+
composed: true,
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
// Dispatched event to alert outside shadow DOM context of event firing.
|
|
589
|
+
this.dispatchEvent(inputEvent);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Handles event of clearing input content by clicking the X icon.
|
|
594
|
+
* @private
|
|
595
|
+
* @return {void}
|
|
596
|
+
*/
|
|
597
|
+
handleClickClear() {
|
|
598
|
+
this.inputElement.value = "";
|
|
599
|
+
this.value = "";
|
|
600
|
+
this.labelElement.classList.remove('inputElement-label--sticky');
|
|
601
|
+
this.focus();
|
|
602
|
+
this.validation.validate(this);
|
|
603
|
+
this.notifyValueChanged();
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* @private
|
|
608
|
+
* @return {void}
|
|
609
|
+
*/
|
|
610
|
+
handleInput() {
|
|
611
|
+
// Prevent non-numeric characters from being entered on credit card fields.
|
|
612
|
+
if (this.type === 'credit-card') {
|
|
613
|
+
this.inputElement.value = this.inputElement.value.replace(/[\D]/gu, '');
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// Sets value property to value of element value (el.value).
|
|
617
|
+
this.value = this.inputElement.value;
|
|
618
|
+
|
|
619
|
+
// Validation on blur or input.
|
|
620
|
+
if (this.validateOnInput) {
|
|
621
|
+
this.validation.validate(this);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
// Prevents cursor jumping in Safari.
|
|
625
|
+
const { selectionStart } = this.inputElement;
|
|
626
|
+
|
|
627
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
628
|
+
this.updateComplete.then(() => {
|
|
629
|
+
try {
|
|
630
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
631
|
+
} catch (error) { // eslint-disable-line
|
|
632
|
+
// do nothing
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Function to support @focusin event.
|
|
640
|
+
* @private
|
|
641
|
+
* @return {void}
|
|
642
|
+
*/
|
|
643
|
+
handleFocusin() {
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* The input is considered to be in it's initial state based on
|
|
647
|
+
* if this.value === undefined. The first time we interact with the
|
|
648
|
+
* input manually, by applying focusin, we need to flag the
|
|
649
|
+
* input as no longer in the initial state.
|
|
650
|
+
*/
|
|
651
|
+
if (this.value === undefined) {
|
|
652
|
+
this.value = '';
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Function to support @blur event.
|
|
658
|
+
* @private
|
|
659
|
+
* @return {void}
|
|
660
|
+
*/
|
|
661
|
+
handleBlur() {
|
|
662
|
+
this.inputElement.scrollLeft = 100;
|
|
663
|
+
|
|
664
|
+
if (!this.noValidate) {
|
|
665
|
+
this.validation.validate(this);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Returns focused element, even if it's in the shadow DOM.
|
|
671
|
+
* @private
|
|
672
|
+
* @param {Object} root - Element to check for focus.
|
|
673
|
+
* @returns {Object}
|
|
674
|
+
*/
|
|
675
|
+
getActiveElement(root = document) {
|
|
676
|
+
const activeEl = root.activeElement;
|
|
677
|
+
|
|
678
|
+
if (!activeEl) {
|
|
679
|
+
return null;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
if (activeEl.shadowRoot) {
|
|
683
|
+
return this.getActiveElement(activeEl.shadowRoot);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
return activeEl;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Public method force validation of input.
|
|
691
|
+
* @returns {void}
|
|
692
|
+
*/
|
|
693
|
+
validate() {
|
|
694
|
+
this.validation.validate(this);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
700
|
+
* @private
|
|
701
|
+
* @returns {void}
|
|
702
|
+
*/
|
|
703
|
+
configureDataForType() {
|
|
704
|
+
if (this.type === 'month-day-year' || this.type === 'year-month-day') {
|
|
705
|
+
this.dateStrLength = 10;
|
|
706
|
+
} else if (this.type === 'month-year') {
|
|
707
|
+
this.dateStrLength = 5;
|
|
708
|
+
} else if (this.type === 'month-fullYear') {
|
|
709
|
+
this.dateStrLength = 7;
|
|
710
|
+
} else if (this.type === 'month' || this.type === 'year') {
|
|
711
|
+
this.dateStrLength = 2;
|
|
712
|
+
} else if (this.type === 'fullYear') {
|
|
713
|
+
this.dateStrLength = 4;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Validates against list of supported this.allowedInputTypes; return type=text if invalid request.
|
|
719
|
+
* @private
|
|
720
|
+
* @param {string} type Value entered into component prop.
|
|
721
|
+
* @returns {string} Iterates over allowed types array.
|
|
722
|
+
*/
|
|
723
|
+
getInputType(type) {
|
|
724
|
+
if (this.allowedInputTypes.includes(type)) {
|
|
725
|
+
return type;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
return "text";
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Determines default help text string.
|
|
733
|
+
* @private
|
|
734
|
+
* @param {string} type Value entered into component prop.
|
|
735
|
+
* @returns {string} Evaluates pre-determined help text.
|
|
736
|
+
*/
|
|
737
|
+
getHelpText(type) {
|
|
738
|
+
if (type === 'password') {
|
|
739
|
+
this.helpText = i18n(this.lang, 'password');
|
|
740
|
+
} else if (type === 'email') {
|
|
741
|
+
this.helpText = i18n(this.lang, 'email');
|
|
742
|
+
} else if (type === 'credit-card') {
|
|
743
|
+
this.helpText = i18n(this.lang, 'creditcard');
|
|
744
|
+
} else if (type === 'month-day-year') {
|
|
745
|
+
this.helpText = i18n(this.lang, 'dateMMDDYYYY');
|
|
746
|
+
} else if (type === 'month-year') {
|
|
747
|
+
this.helpText = i18n(this.lang, 'dateMMYY');
|
|
748
|
+
} else if (type === 'month-fullyear') {
|
|
749
|
+
this.helpText = i18n(this.lang, 'dateMMYYYY');
|
|
750
|
+
} else if (type === 'year-month-day') {
|
|
751
|
+
this.helpText = i18n(this.lang, 'dateYYYYMMDD');
|
|
752
|
+
} else if (type === 'month') {
|
|
753
|
+
this.helpText = i18n(this.lang, 'dateMM');
|
|
754
|
+
} else if (type === 'year') {
|
|
755
|
+
this.helpText = i18n(this.lang, 'dateYY');
|
|
756
|
+
} else if (type === 'fullYear') {
|
|
757
|
+
this.helpText = i18n(this.lang, 'dateYYYY');
|
|
758
|
+
} else {
|
|
759
|
+
this.helpText = '';
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
return this.helpText;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Function to support show-password feature.
|
|
767
|
+
* @private
|
|
768
|
+
* @returns {void}
|
|
769
|
+
*/
|
|
770
|
+
handleClickShowPassword() {
|
|
771
|
+
this.showPassword = !this.showPassword;
|
|
772
|
+
this.focus();
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Support placeholder text.
|
|
777
|
+
* @private
|
|
778
|
+
* @returns {string}
|
|
779
|
+
*/
|
|
780
|
+
getPlaceholder() {
|
|
781
|
+
if (this.type === 'month-day-year') {
|
|
782
|
+
return !this.placeholder ? 'MM/DD/YYYY' : this.placeholder;
|
|
783
|
+
} else if (this.type === 'month-year') {
|
|
784
|
+
return !this.placeholder ? 'MM/YY' : this.placeholder;
|
|
785
|
+
} else if (this.type === 'month-fullYear') {
|
|
786
|
+
return !this.placeholder ? 'MM/YYYY' : this.placeholder;
|
|
787
|
+
} else if (this.type === 'year-month-day') {
|
|
788
|
+
return !this.placeholder ? 'YYYY/MM/DD' : this.placeholder;
|
|
789
|
+
} else if (this.type === 'year') {
|
|
790
|
+
return !this.placeholder ? 'YY' : this.placeholder;
|
|
791
|
+
} else if (this.type === 'fullYear') {
|
|
792
|
+
return !this.placeholder ? 'YYYY' : this.placeholder;
|
|
793
|
+
} else if (this.type === 'month') {
|
|
794
|
+
return !this.placeholder ? 'MM' : this.placeholder;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
return ifDefined(this.placeholder);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Defines placement of input icon based on type, used with classMap.
|
|
802
|
+
* @private
|
|
803
|
+
* @returns {boolean}
|
|
804
|
+
*/
|
|
805
|
+
defineInputIcon() {
|
|
806
|
+
if (this.icon && this.type === 'credit-card') {
|
|
807
|
+
return true;
|
|
808
|
+
} else if (this.dateInputTypes.includes(this.type)) {
|
|
809
|
+
return true;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
return false;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Defines padding of input label based on type, used with classMap.
|
|
817
|
+
* @private
|
|
818
|
+
* @returns {boolean}
|
|
819
|
+
*/
|
|
820
|
+
defineLabelPadding() {
|
|
821
|
+
if (this.icon && this.type === 'credit-card' && (this.value === "" || this.value === undefined)) {
|
|
822
|
+
return true;
|
|
823
|
+
} else if (this.dateInputTypes.includes(this.type)) {
|
|
824
|
+
return true;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
return false;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
// Functions specific to Credit Card component support
|
|
831
|
+
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Function to support credit-card feature type.
|
|
835
|
+
* @private
|
|
836
|
+
* @returns {void}
|
|
837
|
+
*/
|
|
838
|
+
processCreditCard() {
|
|
839
|
+
const card = this.matchInputValueToCreditCard();
|
|
840
|
+
|
|
841
|
+
this.maxLength = card.formatLength;
|
|
842
|
+
this.minLength = card.formatMinLength;
|
|
843
|
+
|
|
844
|
+
this.setCustomValidity = card.setCustomValidity;
|
|
845
|
+
|
|
846
|
+
if (this.icon) {
|
|
847
|
+
this.inputIconName = card.cardIcon;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Function to support credit-card feature type.
|
|
853
|
+
* @private
|
|
854
|
+
* @returns {object} JSON with data for credit card formatting.
|
|
855
|
+
*/
|
|
856
|
+
matchInputValueToCreditCard() {
|
|
857
|
+
const CreditCardValidationMessage = `${i18n(this.lang, 'validCard')}`;
|
|
858
|
+
|
|
859
|
+
const creditCardTypes = [
|
|
860
|
+
{
|
|
861
|
+
name: 'Airlines',
|
|
862
|
+
regex: /^(?<num>1|2)\d{0}/u,
|
|
863
|
+
formatMinLength: 17,
|
|
864
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
865
|
+
cardIcon: 'credit-card'
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
name: 'Commercial',
|
|
869
|
+
regex: /^(?<num>2)\d{0}/u,
|
|
870
|
+
formatMinLength: 8,
|
|
871
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
872
|
+
cardIcon: 'credit-card'
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
name: 'Alaska Commercial',
|
|
876
|
+
regex: /^(?<num>27)\d{0}/u,
|
|
877
|
+
formatMinLength: 8,
|
|
878
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
879
|
+
cardIcon: 'cc-alaska'
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
name: 'American Express',
|
|
883
|
+
regex: /^(?<num>34|37)\d{0}/u,
|
|
884
|
+
formatLength: 17,
|
|
885
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
886
|
+
cardIcon: 'cc-amex'
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
name: 'Diners club',
|
|
890
|
+
regex: /^(?<num>36|38)\d{0}/u,
|
|
891
|
+
formatLength: 16,
|
|
892
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
893
|
+
cardIcon: 'credit-card'
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
name: 'Visa',
|
|
897
|
+
regex: /^(?<num>4)\d{0}/u,
|
|
898
|
+
formatLength: 19,
|
|
899
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
900
|
+
cardIcon: 'cc-visa'
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
name: 'Alaska Airlines Visa',
|
|
904
|
+
regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
|
|
905
|
+
formatLength: 19,
|
|
906
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
907
|
+
cardIcon: 'cc-alaska'
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: 'Master Card',
|
|
911
|
+
regex: /^(?<num>5)\d{0}/u,
|
|
912
|
+
formatLength: 19,
|
|
913
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
914
|
+
cardIcon: 'cc-mastercard'
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
name: 'Discover Card',
|
|
918
|
+
regex: /^(?<num>6)\d{0}/u,
|
|
919
|
+
formatLength: 19,
|
|
920
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
921
|
+
cardIcon: 'cc-discover'
|
|
922
|
+
}
|
|
923
|
+
];
|
|
924
|
+
|
|
925
|
+
let type = {
|
|
926
|
+
name: 'Default Card',
|
|
927
|
+
formatLength: 19,
|
|
928
|
+
setCustomValidity: CreditCardValidationMessage,
|
|
929
|
+
cardIcon: 'credit-card'
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
creditCardTypes.forEach((cardType) => {
|
|
933
|
+
if (cardType.regex.exec(this.value)) {
|
|
934
|
+
type = cardType;
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
|
|
938
|
+
this.validationCCLength = type.formatLength;
|
|
939
|
+
|
|
940
|
+
return type;
|
|
941
|
+
}
|
|
942
|
+
}
|