@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,1050 @@
|
|
|
1
|
+
function dynamicExample() {
|
|
2
|
+
const values = ['Yes', 'No', 'Maybe'];
|
|
3
|
+
const radioGroup = document.getElementById('dynamicExample');
|
|
4
|
+
|
|
5
|
+
for (let i = 0; i < values.length; i++) {
|
|
6
|
+
const radio = document.createElement('auro-radio');
|
|
7
|
+
|
|
8
|
+
radio.id = `dynamicRadio${i}`;
|
|
9
|
+
radio.label = values[i];
|
|
10
|
+
radio.name = 'radioDemo';
|
|
11
|
+
radio.value = values[i];
|
|
12
|
+
radio.textContent = values[i];
|
|
13
|
+
|
|
14
|
+
radioGroup.appendChild(radio);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2019 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/
|
|
23
|
+
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$1=Symbol(),o$3=new WeakMap;let n$2 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$3.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$3.set(s,t));}return t}toString(){return this.cssText}};const r$3=t=>new n$2("string"==typeof t?t:t+"",void 0,s$1),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$2(o,t,s$1)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @license
|
|
27
|
+
* Copyright 2017 Google LLC
|
|
28
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
+
*/const{is:i$3,defineProperty:e$3,getOwnPropertyDescriptor:r$2,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$3(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$3(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$2(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright 2017 Google LLC
|
|
34
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
+
*/
|
|
36
|
+
const t$1=globalThis,i$2=t$1.trustedTypes,s=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$1="?"+h,n=`<${o$1}>`,r$1=document,l=()=>r$1.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$1.createTreeWalker(r$1,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$2)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$1)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$1.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$1).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r$1,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.2.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @license
|
|
40
|
+
* Copyright 2017 Google LLC
|
|
41
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
+
*/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$1=globalThis.litElementPolyfillSupport;i$1?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2017 Google LLC
|
|
47
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
+
*/
|
|
49
|
+
const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @license
|
|
53
|
+
* Copyright 2018 Google LLC
|
|
54
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
+
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @license
|
|
59
|
+
* Copyright 2018 Google LLC
|
|
60
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
|
+
*/const o=o=>o??E;
|
|
62
|
+
|
|
63
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t();}(0,function(){function e(e){var t=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return !!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""));}function u(e){t=!1;}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c);}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c));}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0);},!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),a());},!0),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target);},!0),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1;},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")));},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""));}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready");}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{});}window.dispatchEvent(t);}"undefined"!=typeof document&&e(document);});
|
|
64
|
+
|
|
65
|
+
var styleCss$1 = i$4`*,*: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{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;outline:unset}:host(.focus-visible) .displayFlex .inputGroup:focus-within{width:auto}:host(.focus-visible) .rdoGroup{display:block;padding-right:var(--ds-size-100, 0.5rem);outline:3px solid transparent}:host(.focus-visible) .rdoGroup .label:after{outline-width:1px;outline-style:solid}.rdoGroup{position:relative;padding-right:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.label{display:block;margin-left:var(--ds-size-300, 1.5rem)}.label:hover{cursor:pointer}.label:after{position:absolute;z-index:1;top:var(--ds-size-50, 0.25rem);left:var(--ds-size-50, 0.25rem);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));content:"";border-radius:50%;border:1px solid}.slotContent{display:block;margin-left:var(--ds-size-400, 2rem);padding-left:var(--ds-size-100, 0.5rem)}`;
|
|
66
|
+
|
|
67
|
+
var colorCss$1 = i$4`.label{color:var(--ds-auro-radio-label-color)}.label:after{background-color:var(--ds-auro-radio-btn-fill-color);border-color:var(--ds-auro-radio-btn-border-color);box-shadow:inset 0 0 0 3px var(--ds-auro-radio-btn-inset-color);outline-color:var(--ds-auro-radio-btn-border-color);-webkit-tap-highlight-color:var(--ds-auro-radio-tap-color)}:host([checked]){--ds-auro-radio-btn-inset-color: var(--ds-color-background-primary-100-default, #ffffff);--ds-auro-radio-btn-fill-color: var(--ds-color-border-ui-default-default);--ds-auro-radio-btn-border-color: var(--ds-color-border-ui-default-default)}:host([error]){--ds-auro-radio-btn-border-color: var(--ds-color-border-error-default, #cc1816)}:host([checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-color-border-error-default, #cc1816)}:host([disabled]){--ds-auro-radio-btn-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}:host(.focus-visible){--ds-auro-radio-btn-border-color: var(--ds-color-border-ui-default-default, #2c67b5)}`;
|
|
68
|
+
|
|
69
|
+
var tokenCss = i$4`:host{--ds-auro-radio-group-help-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default);--ds-auro-radio-group-label-color: inherit;--ds-auro-radio-btn-border-color: var(--ds-color-border-primary-default, $ds-color-border-primary-default);--ds-auro-radio-btn-fill-color: transparent;--ds-auro-radio-btn-inset-color: transparent;--ds-auro-radio-label-color: inherit;--ds-auro-radio-tap-color: transparent}`;
|
|
70
|
+
|
|
71
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
72
|
+
// See LICENSE in the project root for license information.
|
|
73
|
+
|
|
74
|
+
// ---------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
77
|
+
|
|
78
|
+
class AuroLibraryRuntimeUtils {
|
|
79
|
+
|
|
80
|
+
/* eslint-disable jsdoc/require-param */
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* This will register a new custom element with the browser.
|
|
84
|
+
* @param {String} name - The name of the custom element.
|
|
85
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
86
|
+
* @returns {void}
|
|
87
|
+
*/
|
|
88
|
+
registerComponent(name, componentClass) {
|
|
89
|
+
if (!customElements.get(name)) {
|
|
90
|
+
customElements.define(name, class extends componentClass {});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
98
|
+
closestElement(
|
|
99
|
+
selector, // selector like in .closest()
|
|
100
|
+
base = this, // extra functionality to skip a parent
|
|
101
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
102
|
+
!el || el === document || el === window
|
|
103
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
104
|
+
: found
|
|
105
|
+
? found // found a selector INside this element
|
|
106
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
107
|
+
) {
|
|
108
|
+
return __Closest(base);
|
|
109
|
+
}
|
|
110
|
+
/* eslint-enable jsdoc/require-param */
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
114
|
+
* @param {Object} elem - The element to check.
|
|
115
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
116
|
+
* @returns {void}
|
|
117
|
+
*/
|
|
118
|
+
handleComponentTagRename(elem, tagName) {
|
|
119
|
+
const tag = tagName.toLowerCase();
|
|
120
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
121
|
+
|
|
122
|
+
if (elemTag !== tag) {
|
|
123
|
+
elem.setAttribute(tag, true);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Validates if an element is a specific Auro component.
|
|
129
|
+
* @param {Object} elem - The element to validate.
|
|
130
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
131
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
132
|
+
*/
|
|
133
|
+
elementMatch(elem, tagName) {
|
|
134
|
+
const tag = tagName.toLowerCase();
|
|
135
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
136
|
+
|
|
137
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
142
|
+
// See LICENSE in the project root for license information.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @attr {Boolean} checked - If set to true, the radio button will be filled.
|
|
147
|
+
* @attr {Boolean} disabled - If set to true, the radio button will be non-clickable.
|
|
148
|
+
* @attr {Boolean} required - Defines element as required.
|
|
149
|
+
* @attr {Boolean} error - If set to true, sets an error state on the radio button.
|
|
150
|
+
* @event toggleSelected - Notifies that the component has toggled the checked/selected state.
|
|
151
|
+
* @event focusSelected - Notifies that the component has gained focus.
|
|
152
|
+
* @event auroRadio-blur - Notifies that the component has lost focus.
|
|
153
|
+
* @event resetRadio - Notifies that the component has reset the checked/selected state.
|
|
154
|
+
* @event auroRadio-selected - Notifies that the component has been marked as checked/selected.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
// build the component class
|
|
158
|
+
class AuroRadio extends r {
|
|
159
|
+
constructor() {
|
|
160
|
+
super();
|
|
161
|
+
this.checked = false;
|
|
162
|
+
this.disabled = false;
|
|
163
|
+
this.required = false;
|
|
164
|
+
this.error = false;
|
|
165
|
+
this.tabIndex = -1;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @private
|
|
169
|
+
*/
|
|
170
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
static get styles() {
|
|
174
|
+
return [
|
|
175
|
+
styleCss$1,
|
|
176
|
+
colorCss$1,
|
|
177
|
+
tokenCss
|
|
178
|
+
];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// function to define props used within the scope of this component
|
|
182
|
+
static get properties() {
|
|
183
|
+
return {
|
|
184
|
+
checked: {
|
|
185
|
+
type: Boolean,
|
|
186
|
+
reflect: true
|
|
187
|
+
},
|
|
188
|
+
disabled: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
reflect: true
|
|
191
|
+
},
|
|
192
|
+
required: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
reflect: true
|
|
195
|
+
},
|
|
196
|
+
error: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
reflect: true
|
|
199
|
+
},
|
|
200
|
+
id: { type: String },
|
|
201
|
+
label: { type: String },
|
|
202
|
+
name: { type: String },
|
|
203
|
+
value: { type: String },
|
|
204
|
+
tabIndex: {
|
|
205
|
+
type: Number,
|
|
206
|
+
reflect: true
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* This will register this element with the browser.
|
|
213
|
+
* @param {string} [name="auro-radio"] - The name of element that you want to register to.
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* AuroRadio.register("custom-radio") // This will resgiter this element to <custom-radio/>
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
static register(name = "auro-radio") {
|
|
220
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroRadio);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Method for handling content when change event is fired.
|
|
225
|
+
* @private
|
|
226
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
227
|
+
* @returns {void}
|
|
228
|
+
*/
|
|
229
|
+
handleChange(event) {
|
|
230
|
+
this.checked = event.target.checked;
|
|
231
|
+
const customEvent = new CustomEvent(event.type, event);
|
|
232
|
+
|
|
233
|
+
this.dispatchEvent(customEvent);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Method for handling content when input event is fired.
|
|
238
|
+
* @private
|
|
239
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
240
|
+
* @returns {void}
|
|
241
|
+
*/
|
|
242
|
+
handleInput(event) {
|
|
243
|
+
this.checked = event.target.checked;
|
|
244
|
+
this.dispatchEvent(new CustomEvent('toggleSelected', {
|
|
245
|
+
bubbles: true,
|
|
246
|
+
composed: true,
|
|
247
|
+
target: this
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Method for handling focus event.
|
|
253
|
+
* @private
|
|
254
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
255
|
+
* @returns {void}
|
|
256
|
+
*/
|
|
257
|
+
handleFocus(event) {
|
|
258
|
+
this.dispatchEvent(new CustomEvent('focusSelected', {
|
|
259
|
+
bubbles: true,
|
|
260
|
+
composed: true,
|
|
261
|
+
target: event.target
|
|
262
|
+
}));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Method for handling blur event.
|
|
267
|
+
* @private
|
|
268
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
269
|
+
* @returns {void}
|
|
270
|
+
*/
|
|
271
|
+
handleBlur(event) {
|
|
272
|
+
this.dispatchEvent(new CustomEvent('auroRadio-blur', {
|
|
273
|
+
bubbles: true,
|
|
274
|
+
composed: true,
|
|
275
|
+
target: event.target
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
updated(changedProperties) {
|
|
280
|
+
if (changedProperties.has('checked')) {
|
|
281
|
+
this.dispatchEvent(new CustomEvent('resetRadio', {
|
|
282
|
+
bubbles: true,
|
|
283
|
+
composed: true
|
|
284
|
+
}));
|
|
285
|
+
|
|
286
|
+
if (this.checked) {
|
|
287
|
+
this.dispatchEvent(new CustomEvent('auroRadio-selected', {
|
|
288
|
+
bubbles: true,
|
|
289
|
+
composed: true
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Method for handling content when it is invalid accessibility wise.
|
|
297
|
+
* @private
|
|
298
|
+
* @param {Boolean} error - The element's error attribute.
|
|
299
|
+
* @returns {void}
|
|
300
|
+
*/
|
|
301
|
+
invalid(error) {
|
|
302
|
+
if (error) {
|
|
303
|
+
return 'true';
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
return 'false';
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Method for handling passing the required status to aria.
|
|
311
|
+
* @private
|
|
312
|
+
* @param {Boolean} required - The element's required attribute.
|
|
313
|
+
* @returns {void}
|
|
314
|
+
*/
|
|
315
|
+
isRequired(required) {
|
|
316
|
+
if (required) {
|
|
317
|
+
return 'true';
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return 'false';
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
firstUpdated() {
|
|
324
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
325
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-radio');
|
|
326
|
+
|
|
327
|
+
this.addEventListener('blur', this.handleBlur);
|
|
328
|
+
|
|
329
|
+
this.input = this.shadowRoot.querySelector('input');
|
|
330
|
+
|
|
331
|
+
this.addEventListener('click', () => {
|
|
332
|
+
this.input.click();
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
337
|
+
render() {
|
|
338
|
+
const labelClasses = {
|
|
339
|
+
'ods-inputLabel': true,
|
|
340
|
+
'ods-inputLabel--radio': true,
|
|
341
|
+
'label': true,
|
|
342
|
+
'label--rdo': true,
|
|
343
|
+
'errorBorder': this.error
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
return x`
|
|
347
|
+
<div class="ods-inputGroup rdoGroup">
|
|
348
|
+
<input
|
|
349
|
+
class="util_displayHiddenVisually ods-inputOption rdo--input"
|
|
350
|
+
@focus="${this.handleFocus}"
|
|
351
|
+
@input="${this.handleInput}"
|
|
352
|
+
@change="${this.handleChange}"
|
|
353
|
+
?disabled="${this.disabled}"
|
|
354
|
+
aria-invalid="${this.invalid(this.error)}"
|
|
355
|
+
aria-required="${this.isRequired(this.required)}"
|
|
356
|
+
.checked="${this.checked}"
|
|
357
|
+
id="${o(this.id)}"
|
|
358
|
+
name="${o(this.name)}"
|
|
359
|
+
type="radio"
|
|
360
|
+
.value="${this.value}"
|
|
361
|
+
tabIndex="-1"
|
|
362
|
+
/>
|
|
363
|
+
|
|
364
|
+
<label for="${o(this.id)}" class="${e(labelClasses)}">
|
|
365
|
+
<slot>${this.label}</slot>
|
|
366
|
+
</label>
|
|
367
|
+
|
|
368
|
+
</div>
|
|
369
|
+
<slot name="content" class="slotContent"></slot>
|
|
370
|
+
`;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
var styleCss = i$4`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}fieldset{all:unset}.displayFlex legend+slot{display:flex;white-space:nowrap}legend{margin-bottom:var(--ds-size-150, 0.75rem)}`;
|
|
375
|
+
|
|
376
|
+
var colorCss = i$4`:host legend{color:var(--ds-auro-radio-group-label-color)}:host([disabled]){--ds-auro-radio-group-label-color: var(--ds-color-text-disabled-default, $ds-color-text-disabled-default)}.radioGroupElement-helpText{color:var(--ds-auro-radio-group-help-text-color)}:host([validity]:not([validity=valid])){--ds-auro-radio-group-help-text-color: var(--ds-color-alert-error-default, #df0b37)}`;
|
|
377
|
+
|
|
378
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
379
|
+
// See LICENSE in the project root for license information.
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class AuroFormValidation {
|
|
383
|
+
constructor() {
|
|
384
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Determines the validity state of the element based on the common attribute restrictions (pattern).
|
|
389
|
+
* @private
|
|
390
|
+
* @param {object} elem - HTML element to validate.
|
|
391
|
+
* @returns {void}
|
|
392
|
+
*/
|
|
393
|
+
validateAttributes(elem) {
|
|
394
|
+
if (elem.pattern) {
|
|
395
|
+
const pattern = new RegExp(`^${elem.pattern}$`, 'u');
|
|
396
|
+
|
|
397
|
+
if (!pattern.test(elem.value)) {
|
|
398
|
+
elem.validity = 'badInput';
|
|
399
|
+
elem.setCustomValidity = elem.setCustomValidityBadInput || '';
|
|
400
|
+
}
|
|
401
|
+
} else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
|
|
402
|
+
elem.validity = 'tooShort';
|
|
403
|
+
elem.setCustomValidity = elem.setCustomValidityTooShort || '';
|
|
404
|
+
} else if (elem.value && elem.value.length > elem.maxLength) {
|
|
405
|
+
elem.validity = 'tooLong';
|
|
406
|
+
elem.setCustomValidity = elem.setCustomValidityTooLong || '';
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Determines the validity state of the element based on the type attribute.
|
|
412
|
+
* @private
|
|
413
|
+
* @param {object} elem - HTML element to validate.
|
|
414
|
+
* @returns {void}
|
|
415
|
+
*/
|
|
416
|
+
validateType(elem) {
|
|
417
|
+
if (elem.hasAttribute('type')) {
|
|
418
|
+
if (elem.type === 'email') {
|
|
419
|
+
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
420
|
+
|
|
421
|
+
if (!elem.value.match(emailRegex)) {
|
|
422
|
+
elem.validity = 'badInput';
|
|
423
|
+
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
424
|
+
}
|
|
425
|
+
} else if (elem.type === 'credit-card') {
|
|
426
|
+
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
427
|
+
elem.validity = 'tooShort';
|
|
428
|
+
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
429
|
+
}
|
|
430
|
+
} else if (elem.type === 'number' || elem.type === 'numeric') { // 'numeric` is a deprecated alias for number'
|
|
431
|
+
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
432
|
+
elem.validity = 'rangeOverflow';
|
|
433
|
+
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
437
|
+
elem.validity = 'rangeUnderflow';
|
|
438
|
+
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
} else if (elem.type === 'month-day-year' ||
|
|
442
|
+
elem.type === 'month-year' ||
|
|
443
|
+
elem.type === 'month-fullYear' ||
|
|
444
|
+
elem.type === 'year-month-day'
|
|
445
|
+
) {
|
|
446
|
+
if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
447
|
+
elem.validity = 'tooShort';
|
|
448
|
+
elem.setCustomValidity = elem.setCustomValidityForType || '';
|
|
449
|
+
} else {
|
|
450
|
+
const valueDate = new Date(elem.value);
|
|
451
|
+
|
|
452
|
+
// validate max
|
|
453
|
+
if (elem.max !== undefined) {
|
|
454
|
+
const maxDate = new Date(elem.max);
|
|
455
|
+
|
|
456
|
+
if (valueDate > maxDate) {
|
|
457
|
+
elem.validity = 'rangeOverflow';
|
|
458
|
+
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// validate min
|
|
463
|
+
if (elem.min) {
|
|
464
|
+
const minDate = new Date(elem.min);
|
|
465
|
+
|
|
466
|
+
if (valueDate < minDate) {
|
|
467
|
+
elem.validity = 'rangeUnderflow';
|
|
468
|
+
elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Determines the validity state of the element.
|
|
478
|
+
* @param {object} elem - HTML element to validate.
|
|
479
|
+
* @param {boolean} force - Boolean that forces validation to run.
|
|
480
|
+
* @returns {void}
|
|
481
|
+
*/
|
|
482
|
+
validate(elem, force) {
|
|
483
|
+
this.getInputElements(elem);
|
|
484
|
+
this.getAuroInputs(elem);
|
|
485
|
+
|
|
486
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
487
|
+
const validationShouldRun = force || (!elem.contains(document.activeElement) && elem.value !== undefined) || elem.validateOnInput;
|
|
488
|
+
|
|
489
|
+
if (elem.hasAttribute('error')) {
|
|
490
|
+
elem.validity = 'customError';
|
|
491
|
+
elem.setCustomValidity = elem.error;
|
|
492
|
+
} else if (validationShouldRun) {
|
|
493
|
+
elem.validity = 'valid';
|
|
494
|
+
elem.setCustomValidity = '';
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Only validate once we interact with the datepicker
|
|
498
|
+
* elem.value === undefined is the initial state pre-interaction.
|
|
499
|
+
*
|
|
500
|
+
* The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
|
|
501
|
+
*/
|
|
502
|
+
|
|
503
|
+
let hasValue = elem.value && elem.value.length > 0;
|
|
504
|
+
|
|
505
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
506
|
+
if (this.auroInputElements && this.auroInputElements.length === 2) {
|
|
507
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
508
|
+
hasValue = false;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
if (!hasValue && elem.required) {
|
|
513
|
+
elem.validity = 'valueMissing';
|
|
514
|
+
elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
|
|
515
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
516
|
+
this.validateType(elem);
|
|
517
|
+
this.validateAttributes(elem);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
if (this.auroInputElements && this.auroInputElements.length > 0) {
|
|
522
|
+
elem.validity = this.auroInputElements[0].validity;
|
|
523
|
+
elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
|
|
524
|
+
|
|
525
|
+
if (elem.validity === 'valid') {
|
|
526
|
+
if (this.auroInputElements.length > 1) {
|
|
527
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
528
|
+
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
534
|
+
if (elem.validity && elem.validity !== 'valid') {
|
|
535
|
+
elem.isValid = false;
|
|
536
|
+
|
|
537
|
+
// Use the validity message override if it is declared
|
|
538
|
+
if (elem.ValidityMessageOverride) {
|
|
539
|
+
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
540
|
+
}
|
|
541
|
+
} else {
|
|
542
|
+
elem.isValid = true;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
this.getErrorMessage(elem);
|
|
546
|
+
|
|
547
|
+
elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
|
|
548
|
+
bubbles: true,
|
|
549
|
+
composed: true,
|
|
550
|
+
detail: {
|
|
551
|
+
validity: elem.validity,
|
|
552
|
+
message: elem.errorMessage
|
|
553
|
+
}
|
|
554
|
+
}));
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Gets all the HTML5 `inputs` in the element shadow DOM.
|
|
560
|
+
* @private
|
|
561
|
+
* @param {object} elem - HTML element to validate.
|
|
562
|
+
* @returns {void}
|
|
563
|
+
*/
|
|
564
|
+
getInputElements(elem) {
|
|
565
|
+
this.inputElements = elem.renderRoot.querySelectorAll('input');
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Gets all the `auro-inputs` in the element shadow DOM.
|
|
570
|
+
* @private
|
|
571
|
+
* @param {object} elem - HTML element to validate.
|
|
572
|
+
* @returns {void}
|
|
573
|
+
*/
|
|
574
|
+
getAuroInputs(elem) {
|
|
575
|
+
this.auroInputElements = elem.shadowRoot.querySelectorAll('auro-input, [auro-input]');
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Return appropriate error message.
|
|
580
|
+
* @private
|
|
581
|
+
* @param {object} elem - HTML element to validate.
|
|
582
|
+
* @returns {void}
|
|
583
|
+
*/
|
|
584
|
+
getErrorMessage(elem) {
|
|
585
|
+
if (elem.validity !== 'valid') {
|
|
586
|
+
if (elem.setCustomValidity) {
|
|
587
|
+
elem.errorMessage = elem.setCustomValidity;
|
|
588
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
589
|
+
const input = elem.renderRoot.querySelector('input');
|
|
590
|
+
|
|
591
|
+
if (input.validationMessage.length > 0) {
|
|
592
|
+
elem.errorMessage = input.validationMessage;
|
|
593
|
+
}
|
|
594
|
+
} else if (this.inputElements && this.inputElements.length > 0) {
|
|
595
|
+
const firstInput = this.inputElements[0];
|
|
596
|
+
|
|
597
|
+
if (firstInput.validationMessage.length > 0) {
|
|
598
|
+
elem.errorMessage = firstInput.validationMessage;
|
|
599
|
+
} else if (this.inputElements.length === 2) {
|
|
600
|
+
const secondInput = this.inputElements[1];
|
|
601
|
+
|
|
602
|
+
if (secondInput.validationMessage.length > 0) {
|
|
603
|
+
elem.errorMessage = secondInput.validationMessage;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
} else {
|
|
608
|
+
elem.errorMessage = undefined;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
614
|
+
// See LICENSE in the project root for license information.
|
|
615
|
+
// ---------------------------------------------------------------------
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [0, 1, -1] }] */
|
|
620
|
+
/* eslint-disable max-lines */
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* @attr {String} validity - Specifies the `validityState` this element is in.
|
|
624
|
+
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
625
|
+
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
626
|
+
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
627
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
628
|
+
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
629
|
+
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
630
|
+
* @attr {Object} optionSelected - Specifies the current selected radio button.
|
|
631
|
+
* @csspart radio-group - Apply css to the fieldset element in the shadow DOM
|
|
632
|
+
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
633
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
|
|
634
|
+
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
635
|
+
* @event auroFormElement-validated - Notifies that the element has been validated.
|
|
636
|
+
*/
|
|
637
|
+
|
|
638
|
+
class AuroRadioGroup extends r {
|
|
639
|
+
constructor() {
|
|
640
|
+
super();
|
|
641
|
+
this.disabled = false;
|
|
642
|
+
this.horizontal = false;
|
|
643
|
+
this.required = false;
|
|
644
|
+
this.validity = undefined;
|
|
645
|
+
this.value = undefined;
|
|
646
|
+
this.optionSelected = undefined;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* @private
|
|
650
|
+
*/
|
|
651
|
+
this.validation = new AuroFormValidation();
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* @private
|
|
655
|
+
*/
|
|
656
|
+
this.index = 0;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* @private
|
|
660
|
+
*/
|
|
661
|
+
this.max = 3;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* @private
|
|
665
|
+
*/
|
|
666
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
static get styles() {
|
|
670
|
+
return [
|
|
671
|
+
styleCss,
|
|
672
|
+
colorCss,
|
|
673
|
+
tokenCss
|
|
674
|
+
];
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
static get properties() {
|
|
678
|
+
return {
|
|
679
|
+
disabled: {
|
|
680
|
+
type: Boolean,
|
|
681
|
+
reflect: true
|
|
682
|
+
},
|
|
683
|
+
horizontal: { type: Boolean },
|
|
684
|
+
error: {
|
|
685
|
+
type: String,
|
|
686
|
+
reflect: true
|
|
687
|
+
},
|
|
688
|
+
value: {
|
|
689
|
+
type: Array
|
|
690
|
+
},
|
|
691
|
+
noValidate: {
|
|
692
|
+
type: Boolean,
|
|
693
|
+
reflect: true
|
|
694
|
+
},
|
|
695
|
+
required: {
|
|
696
|
+
type: Boolean,
|
|
697
|
+
reflect: true
|
|
698
|
+
},
|
|
699
|
+
setCustomValidity: {
|
|
700
|
+
type: String
|
|
701
|
+
},
|
|
702
|
+
setCustomValidityCustomError: {
|
|
703
|
+
type: String
|
|
704
|
+
},
|
|
705
|
+
setCustomValidityValueMissing: {
|
|
706
|
+
type: String
|
|
707
|
+
},
|
|
708
|
+
validity: {
|
|
709
|
+
type: String,
|
|
710
|
+
reflect: true
|
|
711
|
+
},
|
|
712
|
+
optionSelected: {
|
|
713
|
+
type: Object
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* This will register this element with the browser.
|
|
720
|
+
* @param {string} [name="auro-radio-group"] - The name of element that you want to register to.
|
|
721
|
+
*
|
|
722
|
+
* @example
|
|
723
|
+
* AuroRadioGroup.register("custom-radio-group") // This will register this element to <custom-radio-group/>
|
|
724
|
+
*
|
|
725
|
+
*/
|
|
726
|
+
static register(name = "auro-radio-group") {
|
|
727
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroRadioGroup);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
connectedCallback() {
|
|
731
|
+
super.connectedCallback();
|
|
732
|
+
this.handleItems();
|
|
733
|
+
this.addEventListener('toggleSelected', this.handleToggleSelected);
|
|
734
|
+
this.addEventListener('keydown', this.handleKeyDown);
|
|
735
|
+
this.addEventListener('resetRadio', this.resetRadio);
|
|
736
|
+
this.addEventListener('auroRadio-blur', this.handleRadioBlur);
|
|
737
|
+
this.addEventListener('auroRadio-selected', this.handleSelection);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
firstUpdated() {
|
|
741
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
742
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-radio-group');
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Method for handling of selection of a radio element.
|
|
747
|
+
* @private
|
|
748
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
749
|
+
* @returns {void}
|
|
750
|
+
*/
|
|
751
|
+
handleSelection(event) {
|
|
752
|
+
if (event.target.value) {
|
|
753
|
+
this.value = event.target.value;
|
|
754
|
+
} else {
|
|
755
|
+
this.value = '';
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
this.optionSelected = event.target;
|
|
759
|
+
|
|
760
|
+
this.validation.validate(this);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Method handles radio element blur.
|
|
765
|
+
* @private
|
|
766
|
+
* @returns {void}
|
|
767
|
+
*/
|
|
768
|
+
handleRadioBlur() {
|
|
769
|
+
if (this.value === undefined) {
|
|
770
|
+
this.value = '';
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
this.validation.validate(this);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* LitElement lifecycle method. Called after the DOM has been updated.
|
|
778
|
+
* @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
|
|
779
|
+
* @returns {void}
|
|
780
|
+
*/
|
|
781
|
+
updated(changedProperties) {
|
|
782
|
+
if (changedProperties.has('disabled')) {
|
|
783
|
+
// only change the children if we are making everything disabled, or if we are making everything enabled and there are no individually-disabled radio buttons
|
|
784
|
+
if (this.disabled || this.items.every((el) => el.disabled)) {
|
|
785
|
+
this.items.forEach((el) => {
|
|
786
|
+
el.disabled = this.disabled;
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
if (changedProperties.has('required')) {
|
|
792
|
+
this.items.forEach((el) => {
|
|
793
|
+
el.required = this.required;
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
if (changedProperties.has('error')) {
|
|
798
|
+
this.validation.validate(this, true);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
if (changedProperties.has('validity')) {
|
|
802
|
+
if (this.validity && this.validity !== 'valid') {
|
|
803
|
+
this.items.forEach((el) => {
|
|
804
|
+
el.setAttribute('error', true);
|
|
805
|
+
});
|
|
806
|
+
} else {
|
|
807
|
+
this.items.forEach((el) => {
|
|
808
|
+
el.removeAttribute('error');
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Method for a total reset of the radio element.
|
|
816
|
+
* @returns {void}
|
|
817
|
+
*/
|
|
818
|
+
reset() {
|
|
819
|
+
this.value = undefined;
|
|
820
|
+
this.index = 0;
|
|
821
|
+
this.optionSelected = undefined;
|
|
822
|
+
const buttons = this.querySelectorAll('auro-radio, [auro-radio]');
|
|
823
|
+
|
|
824
|
+
buttons.forEach((button) => {
|
|
825
|
+
button.checked = false;
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
this.validation.validate(this);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Method handles the reset event from a radio element.
|
|
833
|
+
* @private
|
|
834
|
+
* @returns {void}
|
|
835
|
+
*/
|
|
836
|
+
resetRadio() {
|
|
837
|
+
if (this.items.length === 0) {
|
|
838
|
+
this.handleItems();
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// handle tab index
|
|
842
|
+
this.items.forEach((item) => {
|
|
843
|
+
item.tabIndex = -1;
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
if (!this.disabled) {
|
|
847
|
+
this.items[this.index].tabIndex = 0;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Method for handling the attributes of each radio input.
|
|
853
|
+
* @private
|
|
854
|
+
* @returns {void}
|
|
855
|
+
*/
|
|
856
|
+
handleItems() {
|
|
857
|
+
this.items = [...this.querySelectorAll(':scope > *:not([slot])')];
|
|
858
|
+
this.initializeIndex();
|
|
859
|
+
|
|
860
|
+
if (this.disabled) {
|
|
861
|
+
this.items.forEach((el) => {
|
|
862
|
+
el.disabled = this.disabled;
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
this.items.forEach((el) => {
|
|
867
|
+
el.required = this.required;
|
|
868
|
+
el.error = Boolean(this.error);
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Method for handling slot content changes.
|
|
874
|
+
* @private
|
|
875
|
+
* @returns {void}
|
|
876
|
+
*/
|
|
877
|
+
handleSlotChange() {
|
|
878
|
+
this.handleItems();
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Method for initializing the tab index of the checked radio input.
|
|
883
|
+
* @private
|
|
884
|
+
* @returns {void}
|
|
885
|
+
*/
|
|
886
|
+
initializeIndex() {
|
|
887
|
+
if (!this.disabled) {
|
|
888
|
+
const index = this.items.findIndex((item) => item.hasAttribute('checked') && !item.hasAttribute('disabled'));
|
|
889
|
+
const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
|
|
890
|
+
|
|
891
|
+
this.index = index >= 0 ? index : nextEnabledIndex;
|
|
892
|
+
|
|
893
|
+
if (this.index >= 0) {
|
|
894
|
+
this.items[this.index].tabIndex = 0;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Method for handling a newly selected radio input.
|
|
901
|
+
* @private
|
|
902
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
903
|
+
* @returns {void}
|
|
904
|
+
*/
|
|
905
|
+
handleToggleSelected(event) {
|
|
906
|
+
this.index = this.items.indexOf(event.target);
|
|
907
|
+
|
|
908
|
+
this.items.forEach((item) => {
|
|
909
|
+
if (item === event.target) {
|
|
910
|
+
item.tabIndex = 0;
|
|
911
|
+
if (event.target.value) {
|
|
912
|
+
this.value = event.target.value;
|
|
913
|
+
}
|
|
914
|
+
} else {
|
|
915
|
+
const sdInput = item.shadowRoot.querySelector('input');
|
|
916
|
+
|
|
917
|
+
sdInput.checked = false;
|
|
918
|
+
item.checked = false;
|
|
919
|
+
item.tabIndex = -1;
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
this.optionSelected = event.target;
|
|
924
|
+
|
|
925
|
+
this.validation.validate(this);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Method for selecting a radio input.
|
|
930
|
+
* @private
|
|
931
|
+
* @param {Number} index - The value of the element's index attribute.
|
|
932
|
+
* @returns {void}
|
|
933
|
+
*/
|
|
934
|
+
selectItem(index) {
|
|
935
|
+
const sdItem = this.items[index].shadowRoot.querySelector('input');
|
|
936
|
+
|
|
937
|
+
sdItem.click();
|
|
938
|
+
sdItem.focus();
|
|
939
|
+
this.index = index;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Method for selecting the next radio input.
|
|
944
|
+
* @private
|
|
945
|
+
* @param {Number} index - The value of the element's index attribute.
|
|
946
|
+
* @param {String} moveDirection - Arrow key pressed by user.
|
|
947
|
+
* @returns {void}
|
|
948
|
+
*/
|
|
949
|
+
selectNextItem(index, moveDirection) {
|
|
950
|
+
let currIndex = index;
|
|
951
|
+
|
|
952
|
+
for (currIndex; currIndex < this.items.length; moveDirection === "Down" ? currIndex += 1 : currIndex -= 1) {
|
|
953
|
+
currIndex = currIndex === -1 ? this.items.length - 1 : currIndex;
|
|
954
|
+
const sdItem = this.items[currIndex].shadowRoot.querySelector('input');
|
|
955
|
+
|
|
956
|
+
if (this.disabled || this.items.every((item) => item.disabled === true)) {
|
|
957
|
+
sdItem.focus();
|
|
958
|
+
break;
|
|
959
|
+
}
|
|
960
|
+
if (!sdItem.disabled) {
|
|
961
|
+
sdItem.click();
|
|
962
|
+
sdItem.focus();
|
|
963
|
+
this.index = currIndex;
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* Method for handling a keydown event.
|
|
971
|
+
* @private
|
|
972
|
+
* @param {Event} event - The trigger event tied to this function.
|
|
973
|
+
* @returns {void}
|
|
974
|
+
*/
|
|
975
|
+
handleKeyDown(event) {
|
|
976
|
+
switch (event.key) {
|
|
977
|
+
case " ":
|
|
978
|
+
event.preventDefault();
|
|
979
|
+
this.selectItem(this.index);
|
|
980
|
+
break;
|
|
981
|
+
|
|
982
|
+
case "Down":
|
|
983
|
+
case "ArrowDown":
|
|
984
|
+
case "Right":
|
|
985
|
+
case "ArrowRight":
|
|
986
|
+
event.preventDefault();
|
|
987
|
+
this.selectNextItem(this.index === this.items.length - 1 ? 0 : this.index + 1, "Down");
|
|
988
|
+
break;
|
|
989
|
+
|
|
990
|
+
case "Up":
|
|
991
|
+
case "ArrowUp":
|
|
992
|
+
case "Left":
|
|
993
|
+
case "ArrowLeft":
|
|
994
|
+
event.preventDefault();
|
|
995
|
+
this.selectNextItem(this.index === 0 ? this.items.length - 1 : this.index - 1, "Up");
|
|
996
|
+
break;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
1001
|
+
render() {
|
|
1002
|
+
const groupClasses = {
|
|
1003
|
+
'displayFlex': this.horizontal && this.items.length <= this.max
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
return x`
|
|
1007
|
+
<fieldset class="${e(groupClasses)}" part="radio-group">
|
|
1008
|
+
${this.required
|
|
1009
|
+
? x`<legend><slot name="legend"></slot></legend>`
|
|
1010
|
+
: x`<legend><slot name="legend"></slot> <slot name="optionalLabel">(optional)</slot></legend>`
|
|
1011
|
+
}
|
|
1012
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1013
|
+
</fieldset>
|
|
1014
|
+
|
|
1015
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
1016
|
+
? x`
|
|
1017
|
+
<p class="radioGroupElement-helpText" part="helpText">
|
|
1018
|
+
<slot name="helpText"></slot>
|
|
1019
|
+
</p>`
|
|
1020
|
+
: x`
|
|
1021
|
+
<p class="radioGroupElement-helpText" role="alert" aria-live="assertive" part="helpText">
|
|
1022
|
+
${this.setCustomValidity}
|
|
1023
|
+
</p>`
|
|
1024
|
+
}
|
|
1025
|
+
`;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
AuroRadio.register();
|
|
1030
|
+
AuroRadioGroup.register();
|
|
1031
|
+
|
|
1032
|
+
AuroRadio.register('custom-radio');
|
|
1033
|
+
AuroRadioGroup.register('custom-radio-group');
|
|
1034
|
+
|
|
1035
|
+
function initExamples(initCount) {
|
|
1036
|
+
initCount = initCount || 0;
|
|
1037
|
+
|
|
1038
|
+
try {
|
|
1039
|
+
dynamicExample();
|
|
1040
|
+
} catch (error) {
|
|
1041
|
+
if (initCount <= 20) {
|
|
1042
|
+
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
1043
|
+
setTimeout(() => {
|
|
1044
|
+
initExamples(initCount + 1);
|
|
1045
|
+
}, 100);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
export { initExamples };
|