@aurodesignsystem/auro-formkit 2.0.0-beta.4 → 2.0.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/cache/006be80261b993a5-meta.json +1 -0
- package/.turbo/cache/006be80261b993a5.tar.zst +0 -0
- package/.turbo/cache/03338963f2ae4c89-meta.json +1 -0
- package/.turbo/cache/03338963f2ae4c89.tar.zst +0 -0
- package/.turbo/cache/06dfc9c20aacd0fa-meta.json +1 -0
- package/.turbo/cache/06dfc9c20aacd0fa.tar.zst +0 -0
- package/.turbo/cache/075034ccdb82fbea-meta.json +1 -0
- package/.turbo/cache/075034ccdb82fbea.tar.zst +0 -0
- package/.turbo/cache/0ff927ad868537f6-meta.json +1 -0
- package/.turbo/cache/0ff927ad868537f6.tar.zst +0 -0
- package/.turbo/cache/10b8500a6b0c6655-meta.json +1 -0
- package/.turbo/cache/10b8500a6b0c6655.tar.zst +0 -0
- package/.turbo/cache/138466aaa06fa946-meta.json +1 -0
- package/.turbo/cache/138466aaa06fa946.tar.zst +0 -0
- package/.turbo/cache/1a8525cb6ad91e2a-meta.json +1 -0
- package/.turbo/cache/1a8525cb6ad91e2a.tar.zst +0 -0
- package/.turbo/cache/1c347bdf63624c8a-meta.json +1 -0
- package/.turbo/cache/1c347bdf63624c8a.tar.zst +0 -0
- package/.turbo/cache/1d4e8167ea8e924f-meta.json +1 -0
- package/.turbo/cache/1d4e8167ea8e924f.tar.zst +0 -0
- package/.turbo/cache/2289d12debb3c42c-meta.json +1 -0
- package/.turbo/cache/2289d12debb3c42c.tar.zst +0 -0
- package/.turbo/cache/22fc147c04804f70-meta.json +1 -0
- package/.turbo/cache/22fc147c04804f70.tar.zst +0 -0
- package/.turbo/cache/2d51091c22fc92f5-meta.json +1 -0
- package/.turbo/cache/2d51091c22fc92f5.tar.zst +0 -0
- package/.turbo/cache/3025cdff2ca7afbf-meta.json +1 -0
- package/.turbo/cache/3025cdff2ca7afbf.tar.zst +0 -0
- package/.turbo/cache/3082b3a86c0f9b94-meta.json +1 -0
- package/.turbo/cache/3082b3a86c0f9b94.tar.zst +0 -0
- package/.turbo/cache/366fc19b143f7957-meta.json +1 -0
- package/.turbo/cache/366fc19b143f7957.tar.zst +0 -0
- package/.turbo/cache/3dba2f8fdc7eb1d0-meta.json +1 -0
- package/.turbo/cache/3dba2f8fdc7eb1d0.tar.zst +0 -0
- package/.turbo/cache/43995f6c84a2de33-meta.json +1 -0
- package/.turbo/cache/43995f6c84a2de33.tar.zst +0 -0
- package/.turbo/cache/45d6aea680ecb5ec-meta.json +1 -0
- package/.turbo/cache/45d6aea680ecb5ec.tar.zst +0 -0
- package/.turbo/cache/45ecc27552696bd6-meta.json +1 -0
- package/.turbo/cache/45ecc27552696bd6.tar.zst +0 -0
- package/.turbo/cache/47d63056350252e5-meta.json +1 -0
- package/.turbo/cache/47d63056350252e5.tar.zst +0 -0
- package/.turbo/cache/4aadd7fe6b69cccf-meta.json +1 -0
- package/.turbo/cache/4aadd7fe6b69cccf.tar.zst +0 -0
- package/.turbo/cache/5b3bb164db4c477c-meta.json +1 -0
- package/.turbo/cache/5b3bb164db4c477c.tar.zst +0 -0
- package/.turbo/cache/6bfd7cffad1e6b8a-meta.json +1 -0
- package/.turbo/cache/6bfd7cffad1e6b8a.tar.zst +0 -0
- package/.turbo/cache/6d48e8dc24e08c8c-meta.json +1 -0
- package/.turbo/cache/6d48e8dc24e08c8c.tar.zst +0 -0
- package/.turbo/cache/70e65d2581c9de95-meta.json +1 -0
- package/.turbo/cache/70e65d2581c9de95.tar.zst +0 -0
- package/.turbo/cache/78629f56974cc5d7-meta.json +1 -0
- package/.turbo/cache/78629f56974cc5d7.tar.zst +0 -0
- package/.turbo/cache/7a2e937d0f5acb7c-meta.json +1 -0
- package/.turbo/cache/7a2e937d0f5acb7c.tar.zst +0 -0
- package/.turbo/cache/85f181c5a0ebfdc3-meta.json +1 -0
- package/.turbo/cache/85f181c5a0ebfdc3.tar.zst +0 -0
- package/.turbo/cache/8830b8b624914679-meta.json +1 -0
- package/.turbo/cache/8830b8b624914679.tar.zst +0 -0
- package/.turbo/cache/88d4c5b7339b081b-meta.json +1 -0
- package/.turbo/cache/88d4c5b7339b081b.tar.zst +0 -0
- package/.turbo/cache/8f20a1cd3533e2cb-meta.json +1 -0
- package/.turbo/cache/8f20a1cd3533e2cb.tar.zst +0 -0
- package/.turbo/cache/91de2098a36b6939-meta.json +1 -0
- package/.turbo/cache/91de2098a36b6939.tar.zst +0 -0
- package/.turbo/cache/96edc0764ed4ab77-meta.json +1 -0
- package/.turbo/cache/96edc0764ed4ab77.tar.zst +0 -0
- package/.turbo/cache/a776eb6f87cd7464-meta.json +1 -0
- package/.turbo/cache/a776eb6f87cd7464.tar.zst +0 -0
- package/.turbo/cache/aa2a6d9e7beff7fc-meta.json +1 -0
- package/.turbo/cache/aa2a6d9e7beff7fc.tar.zst +0 -0
- package/.turbo/cache/ac47b2df8381d990-meta.json +1 -0
- package/.turbo/cache/ac47b2df8381d990.tar.zst +0 -0
- package/.turbo/cache/ac98992ca27cd36e-meta.json +1 -0
- package/.turbo/cache/ac98992ca27cd36e.tar.zst +0 -0
- package/.turbo/cache/b323342fa340ccb5-meta.json +1 -0
- package/.turbo/cache/b323342fa340ccb5.tar.zst +0 -0
- package/.turbo/cache/b681d1652a7f2aca-meta.json +1 -0
- package/.turbo/cache/b681d1652a7f2aca.tar.zst +0 -0
- package/.turbo/cache/b99d21002170d86d-meta.json +1 -0
- package/.turbo/cache/b99d21002170d86d.tar.zst +0 -0
- package/.turbo/cache/bff34c0db361f414-meta.json +1 -0
- package/.turbo/cache/bff34c0db361f414.tar.zst +0 -0
- package/.turbo/cache/c1c7334875426ff3-meta.json +1 -0
- package/.turbo/cache/c1c7334875426ff3.tar.zst +0 -0
- package/.turbo/cache/cd12b66dd972aaf7-meta.json +1 -0
- package/.turbo/cache/cd12b66dd972aaf7.tar.zst +0 -0
- package/.turbo/cache/cf74604f39b00f11-meta.json +1 -0
- package/.turbo/cache/cf74604f39b00f11.tar.zst +0 -0
- package/.turbo/cache/d5dbe6fb31ae5667-meta.json +1 -0
- package/.turbo/cache/d5dbe6fb31ae5667.tar.zst +0 -0
- package/.turbo/cache/e2688cc026390fd6-meta.json +1 -0
- package/.turbo/cache/e2688cc026390fd6.tar.zst +0 -0
- package/.turbo/cache/e34579fa4cd85684-meta.json +1 -0
- package/.turbo/cache/e34579fa4cd85684.tar.zst +0 -0
- package/.turbo/cache/e64bd75c16c140f3-meta.json +1 -0
- package/.turbo/cache/e64bd75c16c140f3.tar.zst +0 -0
- package/.turbo/cache/ea92743dea3b7023-meta.json +1 -0
- package/.turbo/cache/ea92743dea3b7023.tar.zst +0 -0
- package/.turbo/cache/f1b0cb8241603223-meta.json +1 -0
- package/.turbo/cache/f1b0cb8241603223.tar.zst +0 -0
- package/.turbo/cache/f22dc2dd55715ba2-meta.json +1 -0
- package/.turbo/cache/f22dc2dd55715ba2.tar.zst +0 -0
- package/.turbo/cache/f8f7a8045f230b79-meta.json +1 -0
- package/.turbo/cache/f8f7a8045f230b79.tar.zst +0 -0
- package/.turbo/cache/f8f99ba69bff8f2c-meta.json +1 -0
- package/.turbo/cache/f8f99ba69bff8f2c.tar.zst +0 -0
- package/.turbo/cache/faafa5cc35d12e06-meta.json +1 -0
- package/.turbo/cache/faafa5cc35d12e06.tar.zst +0 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +360 -0
- package/README.md +59 -59
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +10 -10
- package/components/checkbox/.turbo/turbo-build.log +20 -21
- package/components/checkbox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/checkbox/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/checkbox/README.md +27 -35
- package/components/checkbox/demo/api.md +67 -68
- package/components/checkbox/demo/api.min.js +429 -89
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +429 -89
- package/components/checkbox/dist/auro-checkbox-group.d.ts +40 -16
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +19 -6
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
- package/components/checkbox/dist/index.js +429 -89
- package/components/checkbox/package.json +6 -5
- package/components/checkbox/src/auro-checkbox-group.js +62 -23
- package/components/checkbox/src/auro-checkbox.js +30 -9
- package/components/checkbox/src/styles/colorGroup-css.js +1 -1
- package/components/checkbox/src/styles/colorGroup.css +0 -8
- package/components/checkbox/src/styles/colorGroup.scss +0 -8
- package/components/checkbox/src/styles/tokens-css.js +1 -1
- package/components/checkbox/src/styles/tokens.css +0 -1
- package/components/checkbox/src/styles/tokens.scss +0 -1
- package/components/combobox/.turbo/turbo-build$colon$sass.log +5 -5
- package/components/combobox/.turbo/turbo-build.log +22 -23
- package/components/combobox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/combobox/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/combobox/README.md +23 -28
- package/components/combobox/demo/api.md +27 -25
- package/components/combobox/demo/api.min.js +3385 -848
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +3382 -845
- package/components/combobox/dist/auro-combobox.d.ts +74 -79
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/dropdownVersion.d.ts +3 -0
- package/components/combobox/dist/dropdownVersion.d.ts.map +1 -0
- package/components/combobox/dist/index.js +2733 -510
- package/components/combobox/dist/inputVersion.d.ts +3 -0
- package/components/combobox/dist/inputVersion.d.ts.map +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/.husky/pre-commit +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/CHANGELOG.md +863 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/README.md +109 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/README.md +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/_auroElement.scss +45 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.js +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.mjs +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials+fv.css +110 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials.css +106 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/demoWrapper.css +8 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/elementDemoStyles.css +813 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/package.json +134 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/packageScripts/postinstall.mjs +39 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_animation.scss +30 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_blockquote.scss +46 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_breakpoints.scss +155 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_core.scss +25 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_essentials.scss +267 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_focus-visible.scss +36 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_fonts.scss +50 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_grids.scss +395 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_headings.scss +255 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_normalize.scss +663 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_picture.scss +31 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_utilityClasses.scss +22 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials+fv.scss +19 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleButton.scss +32 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleTab.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_containedButtons.scss +59 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_table.scss +54 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_tablist.scss +37 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/README.md +5 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/demoWrapper.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/elementDemoStyles.scss +123 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_deprecated.scss +16 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_manageScope.scss +42 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_displayProperties.scss +142 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_fontStyles.scss +151 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_inset.scss +188 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_layoutProperties.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_listProperties.scss +176 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_responsive.scss +249 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_typeProperties.scss +49 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_capitalize.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_contains.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_map-deep-get.scss +29 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleButton.scss +76 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleTab.scss +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_insetUtility.scss +9 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_layoutPropertiesGenerator.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_spacingUtility.scss +96 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_important.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_spacing-options.scss +13 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/README.md +293 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js +1377 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/index.js +1370 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/package.json +1 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/package.json +89 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/types/index.d.ts +115 -0
- package/components/combobox/node_modules/chalk/package.json +3 -3
- package/components/combobox/node_modules/chalk/readme.md +25 -53
- package/components/combobox/node_modules/chalk/source/index.d.ts +6 -1
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +6 -2
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +2 -2
- package/components/combobox/package.json +12 -13
- package/components/combobox/src/auro-combobox.js +215 -163
- package/components/combobox/src/dropdownVersion.js +1 -0
- package/components/combobox/src/inputVersion.js +1 -0
- package/components/counter/.turbo/turbo-build$colon$sass.log +210 -7
- package/components/{input → counter}/.turbo/turbo-build$colon$version.log +5 -5
- package/components/counter/.turbo/turbo-build.log +329 -14
- package/components/counter/.turbo/turbo-bundler.log +13 -4
- package/components/counter/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/counter/.turbo/turbo-sass$colon$render.log +45 -3
- package/components/counter/.turbo/turbo-types.log +1 -1
- package/components/counter/README.md +188 -0
- package/components/counter/demo/api.md +107 -1014
- package/components/counter/demo/api.min.js +5203 -36
- package/components/counter/demo/index.js +2 -1
- package/components/counter/demo/index.md +292 -0
- package/components/counter/demo/index.min.js +5231 -19
- package/components/counter/dist/auro-counter-button.d.ts +13 -0
- package/components/counter/dist/auro-counter-button.d.ts.map +1 -0
- package/components/counter/dist/auro-counter-group.d.ts +127 -5
- package/components/counter/dist/auro-counter-group.d.ts.map +1 -1
- package/components/counter/dist/auro-counter-wrapper.d.ts +23 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts.map +1 -0
- package/components/counter/dist/auro-counter.d.ts +91 -0
- package/components/counter/dist/auro-counter.d.ts.map +1 -1
- package/components/counter/dist/dropdownVersion.d.ts +3 -0
- package/components/counter/dist/dropdownVersion.d.ts.map +1 -0
- package/components/counter/dist/iconVersion.d.ts +3 -0
- package/components/counter/dist/iconVersion.d.ts.map +1 -0
- package/components/counter/dist/index.js +5203 -36
- package/components/{input/dist/styles/helpText-css.d.ts → counter/dist/styles/color-css.d.ts} +1 -1
- package/components/counter/dist/styles/color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts.map +1 -0
- package/components/counter/dist/styles/tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/counter/package.json +14 -5
- package/components/counter/src/auro-counter-button.js +42 -0
- package/components/counter/src/auro-counter-group.js +305 -20
- package/components/counter/src/auro-counter-wrapper.js +54 -0
- package/components/counter/src/auro-counter.js +325 -12
- package/components/counter/src/dropdownVersion.js +1 -0
- package/components/counter/src/iconVersion.js +1 -0
- package/components/counter/src/index.js +1 -1
- package/components/counter/src/styles/color-css.js +2 -0
- package/components/counter/src/styles/color.css +29 -0
- package/components/counter/src/styles/color.scss +49 -0
- package/components/counter/src/styles/counter-button-color-css.js +2 -0
- package/components/counter/src/styles/counter-button-color.css +11 -0
- package/components/counter/src/styles/counter-button-color.scss +23 -0
- package/components/counter/src/styles/counter-button-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens.css +6 -0
- package/components/counter/src/styles/counter-button-tokens.scss +8 -0
- package/components/counter/src/styles/counter-button.css +186 -0
- package/components/counter/src/styles/counter-button.scss +84 -0
- package/components/counter/src/styles/counter-group-css.js +1 -1
- package/components/counter/src/styles/counter-group.css +15 -1
- package/components/counter/src/styles/counter-group.scss +16 -1
- package/components/counter/src/styles/counter-wrapper-color-css.js +2 -0
- package/components/counter/src/styles/counter-wrapper-color.css +4 -0
- package/components/counter/src/styles/counter-wrapper-color.scss +19 -0
- package/components/counter/src/styles/counter-wrapper-css.js +2 -0
- package/components/counter/src/styles/counter-wrapper.css +15 -0
- package/components/counter/src/styles/counter-wrapper.scss +29 -0
- package/components/counter/src/styles/style-css.js +1 -1
- package/components/counter/src/styles/style.css +50 -1
- package/components/counter/src/styles/style.scss +58 -2
- package/components/counter/src/styles/tokens-css.js +2 -0
- package/components/counter/src/styles/tokens.css +12 -0
- package/components/counter/src/styles/tokens.scss +25 -0
- package/components/datepicker/.turbo/turbo-build$colon$sass.log +34 -34
- package/components/datepicker/.turbo/turbo-build.log +52 -53
- package/components/datepicker/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/datepicker/.turbo/turbo-sass$colon$render.log +10 -10
- package/components/datepicker/README.md +23 -28
- package/components/datepicker/demo/api.md +85 -57
- package/components/datepicker/demo/api.min.js +1304 -558
- package/components/datepicker/demo/index.md +1 -1
- package/components/datepicker/demo/index.min.js +1304 -558
- package/components/datepicker/dist/auro-calendar.d.ts +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +101 -73
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +1304 -558
- package/components/datepicker/dist/inputVersion.d.ts +3 -0
- package/components/datepicker/dist/inputVersion.d.ts.map +1 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +2 -2
- package/components/datepicker/package.json +8 -8
- package/components/datepicker/src/auro-calendar.js +1 -1
- package/components/datepicker/src/auro-datepicker.js +170 -89
- package/components/datepicker/src/dropdownVersion.js +1 -0
- package/components/datepicker/src/inputVersion.js +1 -0
- package/components/datepicker/src/styles/color-cell-css.js +1 -1
- package/components/datepicker/src/styles/color-cell.css +1 -1
- package/components/datepicker/src/styles/color-cell.scss +1 -1
- package/components/datepicker/src/styles/style-css.js +1 -1
- package/components/datepicker/src/styles/style.css +55 -35
- package/components/datepicker/src/styles/style.scss +45 -13
- package/components/datepicker/src/utilitiesCalendarRender.js +2 -2
- package/components/dropdown/.turbo/turbo-build$colon$sass.log +8 -8
- package/components/dropdown/.turbo/turbo-build.log +19 -20
- package/components/dropdown/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/dropdown/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/dropdown/README.md +19 -27
- package/components/dropdown/demo/api.md +15 -3
- package/components/dropdown/demo/api.min.js +406 -88
- package/components/dropdown/demo/index.js +0 -3
- package/components/dropdown/demo/index.min.js +406 -91
- package/components/dropdown/dist/auro-dropdown.d.ts +16 -2
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +406 -88
- package/components/dropdown/package.json +6 -5
- package/components/dropdown/src/auro-dropdown.js +102 -11
- package/components/dropdown/src/styles/color-css.js +1 -1
- package/components/dropdown/src/styles/color.css +3 -6
- package/components/dropdown/src/styles/color.scss +3 -6
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +5 -6
- package/components/dropdown/src/styles/style.scss +8 -8
- package/components/dropdown/src/styles/tokens-css.js +1 -1
- package/components/dropdown/src/styles/tokens.css +1 -1
- package/components/dropdown/src/styles/tokens.scss +1 -1
- package/components/form/.turbo/turbo-build$colon$sass.log +6 -6
- package/components/form/.turbo/turbo-build$colon$version.log +1 -1
- package/components/form/.turbo/turbo-build.log +17 -18
- package/components/form/.turbo/turbo-bundler.log +4 -4
- package/components/form/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/form/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/form/.turbo/turbo-types.log +1 -1
- package/components/form/README.md +29 -35
- package/components/form/demo/api.min.js +447 -25
- package/components/form/demo/index.min.js +447 -25
- package/components/form/demo/registerDemoDeps.js +22 -0
- package/components/form/demo/working.html +117 -0
- package/components/form/dist/auro-form.d.ts +178 -2
- package/components/form/dist/auro-form.d.ts.map +1 -1
- package/components/form/dist/index.js +447 -25
- package/components/form/package.json +8 -6
- package/components/form/src/auro-form.js +444 -25
- package/components/form/src/styles/style.css +1 -1
- package/components/helptext/.stylelintrc.json +3 -0
- package/components/helptext/.turbo/turbo-build$colon$sass.log +34 -0
- package/components/helptext/.turbo/turbo-build.log +49 -0
- package/components/helptext/.turbo/turbo-bundler.log +7 -0
- package/components/helptext/.turbo/turbo-postCss$colon$component.log +4 -0
- package/components/helptext/.turbo/turbo-sass$colon$render.log +22 -0
- package/components/helptext/.turbo/turbo-types.log +4 -0
- package/components/helptext/dist/auro-helptext.d.ts +54 -0
- package/components/helptext/dist/auro-helptext.d.ts.map +1 -0
- package/components/helptext/dist/index.d.ts +3 -0
- package/components/helptext/dist/index.d.ts.map +1 -0
- package/components/helptext/dist/index.js +224 -0
- package/components/helptext/dist/styles/color-css.d.ts +3 -0
- package/components/helptext/dist/styles/color-css.d.ts.map +1 -0
- package/components/helptext/dist/styles/style-css.d.ts +3 -0
- package/components/helptext/dist/styles/style-css.d.ts.map +1 -0
- package/components/helptext/dist/styles/tokens-css.d.ts +3 -0
- package/components/helptext/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/helptext/node_modules/chalk/package.json +83 -0
- package/components/helptext/node_modules/chalk/readme.md +297 -0
- package/components/helptext/node_modules/chalk/source/index.d.ts +325 -0
- package/components/helptext/node_modules/chalk/source/index.js +225 -0
- package/components/helptext/node_modules/chalk/source/utilities.js +33 -0
- package/components/helptext/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/helptext/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/helptext/package.json +57 -0
- package/components/helptext/src/auro-helptext.js +127 -0
- package/components/helptext/src/index.js +6 -0
- package/components/helptext/src/styles/color-css.js +2 -0
- package/components/helptext/src/styles/color.css +8 -0
- package/components/helptext/src/styles/color.scss +11 -0
- package/components/helptext/src/styles/style-css.js +2 -0
- package/components/helptext/src/styles/style.css +23 -0
- package/components/helptext/src/styles/style.scss +33 -0
- package/components/helptext/src/styles/tokens-css.js +2 -0
- package/components/helptext/src/styles/tokens.css +3 -0
- package/components/helptext/src/styles/tokens.scss +5 -0
- package/components/input/.turbo/turbo-build$colon$sass.log +22 -32
- package/components/input/.turbo/turbo-build.log +33 -46
- package/components/input/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +9 -15
- package/components/input/README.md +19 -29
- package/components/input/demo/api.md +85 -253
- package/components/input/demo/api.min.js +413 -125
- package/components/input/demo/index.md +9 -59
- package/components/input/demo/index.min.js +413 -125
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +3 -3
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +413 -125
- package/components/input/package.json +6 -5
- package/components/input/src/auro-input.js +18 -10
- package/components/input/src/base-input.js +5 -5
- package/components/input/src/styles/color-css.js +1 -1
- package/components/input/src/styles/color.css +0 -5
- package/components/input/src/styles/color.scss +0 -5
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +2 -2
- package/components/input/src/styles/input.scss +2 -2
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +2 -9
- package/components/input/src/styles/style.scss +0 -1
- package/components/input/src/styles/tokens-css.js +1 -1
- package/components/input/src/styles/tokens.css +0 -1
- package/components/input/src/styles/tokens.scss +0 -1
- package/components/menu/.turbo/turbo-build$colon$sass.log +9 -9
- package/components/menu/.turbo/turbo-build$colon$version.log +1 -1
- package/components/menu/.turbo/turbo-build.log +22 -21
- package/components/menu/.turbo/turbo-bundler.log +4 -4
- package/components/menu/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/menu/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/menu/.turbo/turbo-types.log +1 -1
- package/components/menu/README.md +19 -27
- package/components/menu/demo/api.md +57 -20
- package/components/menu/demo/api.min.js +626 -312
- package/components/menu/demo/index.min.js +624 -310
- package/components/menu/dist/auro-menu-utils.d.ts +43 -0
- package/components/menu/dist/auro-menu-utils.d.ts.map +1 -0
- package/components/menu/dist/auro-menu.d.ts +97 -81
- package/components/menu/dist/auro-menu.d.ts.map +1 -1
- package/components/menu/dist/index.d.ts +1 -0
- package/components/menu/dist/index.js +625 -311
- package/components/menu/package.json +5 -5
- package/components/menu/src/auro-menu-utils.js +131 -0
- package/components/menu/src/auro-menu.js +492 -303
- package/components/menu/src/index.js +7 -0
- package/components/menu/src/styles/color-menuoption-css.js +1 -1
- package/components/menu/src/styles/color-menuoption.css +3 -0
- package/components/menu/src/styles/color-menuoption.scss +4 -0
- package/components/menu/src/styles/style-menu.css +1 -1
- package/components/radio/.turbo/turbo-build$colon$sass.log +13 -13
- package/components/radio/.turbo/turbo-build.log +23 -24
- package/components/radio/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/radio/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/radio/README.md +19 -27
- package/components/radio/demo/api.md +9 -8
- package/components/radio/demo/api.min.js +360 -62
- package/components/radio/demo/index.min.js +360 -62
- package/components/radio/dist/auro-radio-group.d.ts +7 -1
- package/components/radio/dist/auro-radio-group.d.ts.map +1 -1
- package/components/radio/dist/index.js +360 -62
- package/components/radio/package.json +6 -6
- package/components/radio/src/auro-radio-group.js +24 -6
- package/components/radio/src/styles/groupColor-css.js +1 -1
- package/components/radio/src/styles/groupColor.css +0 -8
- package/components/radio/src/styles/groupColor.scss +0 -8
- package/components/radio/src/styles/tokens-css.js +1 -1
- package/components/radio/src/styles/tokens.css +0 -1
- package/components/radio/src/styles/tokens.scss +0 -1
- package/components/select/.turbo/turbo-build$colon$sass.log +12 -12
- package/components/select/.turbo/turbo-build.log +28 -27
- package/components/select/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/select/.turbo/turbo-sass$colon$render.log +4 -4
- package/components/select/README.md +22 -43
- package/components/select/demo/api.md +52 -15
- package/components/select/demo/api.min.js +2851 -609
- package/components/select/demo/index.md +1 -16
- package/components/select/demo/index.min.js +2849 -607
- package/components/select/dist/auro-select.d.ts +23 -6
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/dropdownVersion.d.ts +3 -0
- package/components/select/dist/dropdownVersion.d.ts.map +1 -0
- package/components/select/dist/index.js +2313 -385
- package/components/select/package.json +7 -7
- package/components/select/src/auro-select.js +77 -32
- package/components/select/src/dropdownVersion.js +1 -0
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +5 -4
- package/components/select/src/styles/style.scss +11 -4
- package/package.json +27 -23
- package/packages/build-tools/src/docProcessor.mjs +37 -8
- package/packages/build-tools/src/postinstall.mjs +8 -0
- package/packages/form-validation/src/validation.js +79 -20
- package/packages/utils/package.json +12 -0
- package/packages/utils/src/iconUtil.js +25 -0
- package/packages/utils/src/index.js +1 -0
- package/turbo.json +42 -9
- package/.turbo/cache/013a48308b893dac-meta.json +0 -1
- package/.turbo/cache/013a48308b893dac.tar.zst +0 -0
- package/.turbo/cache/02244170c798a2bd-meta.json +0 -1
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/051ff97a20add0e2-meta.json +0 -1
- package/.turbo/cache/051ff97a20add0e2.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +0 -1
- package/.turbo/cache/07ca42419b9f050c.tar.zst +0 -0
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +0 -1
- package/.turbo/cache/0cea4c1f34f3683b.tar.zst +0 -0
- package/.turbo/cache/0ea853339c064fa1-meta.json +0 -1
- package/.turbo/cache/0ea853339c064fa1.tar.zst +0 -0
- package/.turbo/cache/16658beec9f4a809-meta.json +0 -1
- package/.turbo/cache/16658beec9f4a809.tar.zst +0 -0
- package/.turbo/cache/17259cf94d8f8925-meta.json +0 -1
- package/.turbo/cache/17259cf94d8f8925.tar.zst +0 -0
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +0 -1
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +0 -1
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +0 -1
- package/.turbo/cache/1c99a949ec63ab35.tar.zst +0 -0
- package/.turbo/cache/1df4710eef8ed00d-meta.json +0 -1
- package/.turbo/cache/1df4710eef8ed00d.tar.zst +0 -0
- package/.turbo/cache/204b66d1b253e9cc-meta.json +0 -1
- package/.turbo/cache/204b66d1b253e9cc.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +0 -1
- package/.turbo/cache/257a7a26ea72dbc5.tar.zst +0 -0
- package/.turbo/cache/2a5d0939d6fc1052-meta.json +0 -1
- package/.turbo/cache/2a5d0939d6fc1052.tar.zst +0 -0
- package/.turbo/cache/2e3b829fcf75c836-meta.json +0 -1
- package/.turbo/cache/2e3b829fcf75c836.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +0 -1
- package/.turbo/cache/3bf45120d0cc9bd8.tar.zst +0 -0
- package/.turbo/cache/3d380d0d40404cac-meta.json +0 -1
- package/.turbo/cache/3d380d0d40404cac.tar.zst +0 -0
- package/.turbo/cache/3e12285c614db539-meta.json +0 -1
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +0 -1
- package/.turbo/cache/45035bf5c4147ccd.tar.zst +0 -0
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +0 -1
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +0 -1
- package/.turbo/cache/5f304c0f37ef25f3.tar.zst +0 -0
- package/.turbo/cache/64de7a53e02db647-meta.json +0 -1
- package/.turbo/cache/64de7a53e02db647.tar.zst +0 -0
- package/.turbo/cache/691a74627ec57993-meta.json +0 -1
- package/.turbo/cache/691a74627ec57993.tar.zst +0 -0
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +0 -1
- package/.turbo/cache/69aae513b7ec6c7d.tar.zst +0 -0
- package/.turbo/cache/6dd67d179191bda8-meta.json +0 -1
- package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +0 -1
- package/.turbo/cache/6dd7058e6703cb35.tar.zst +0 -0
- package/.turbo/cache/73e9073a5274616d-meta.json +0 -1
- package/.turbo/cache/73e9073a5274616d.tar.zst +0 -0
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +0 -1
- package/.turbo/cache/773edc0f83c8c5a5.tar.zst +0 -0
- package/.turbo/cache/786a822763403879-meta.json +0 -1
- package/.turbo/cache/786a822763403879.tar.zst +0 -0
- package/.turbo/cache/7e1043cffa69f327-meta.json +0 -1
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/7ffd501e81790676-meta.json +0 -1
- package/.turbo/cache/7ffd501e81790676.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +0 -1
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +0 -1
- package/.turbo/cache/80b5d974184a01df.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +0 -1
- package/.turbo/cache/8954c6073396fadd.tar.zst +0 -0
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +0 -1
- package/.turbo/cache/8e79bd5c3a16a72e.tar.zst +0 -0
- package/.turbo/cache/8e9ebc3df0e18de0-meta.json +0 -1
- package/.turbo/cache/8e9ebc3df0e18de0.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +0 -1
- package/.turbo/cache/92daa6d7c389d548.tar.zst +0 -0
- package/.turbo/cache/973d0eea26083f4b-meta.json +0 -1
- package/.turbo/cache/973d0eea26083f4b.tar.zst +0 -0
- package/.turbo/cache/9c6ad42729c7b2d8-meta.json +0 -1
- package/.turbo/cache/9c6ad42729c7b2d8.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +0 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/a9a9d012c83882d8-meta.json +0 -1
- package/.turbo/cache/a9a9d012c83882d8.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +0 -1
- package/.turbo/cache/b54fc4f664a7a5a0.tar.zst +0 -0
- package/.turbo/cache/ba4418918621fbcd-meta.json +0 -1
- package/.turbo/cache/ba4418918621fbcd.tar.zst +0 -0
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +0 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +0 -1
- package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +0 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +0 -1
- package/.turbo/cache/cc81de9c0b452a7c.tar.zst +0 -0
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +0 -1
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +0 -1
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +0 -1
- package/.turbo/cache/dad1301ac69bcb85.tar.zst +0 -0
- package/.turbo/cache/db361cb6578dca84-meta.json +0 -1
- package/.turbo/cache/db361cb6578dca84.tar.zst +0 -0
- package/.turbo/cache/dea5945f55c6aba5-meta.json +0 -1
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +0 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f3ff9040a2196834-meta.json +0 -1
- package/.turbo/cache/f3ff9040a2196834.tar.zst +0 -0
- package/.turbo/cache/f817d89688cefca8-meta.json +0 -1
- package/.turbo/cache/f817d89688cefca8.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +0 -1
- package/.turbo/cache/fa132b5b5f0e75f8.tar.zst +0 -0
- package/.turbo/cache/fc57c17867dcac3d-meta.json +0 -1
- package/.turbo/cache/fc57c17867dcac3d.tar.zst +0 -0
- package/components/checkbox/.turbo/turbo-bundler.log +0 -13
- package/components/checkbox/.turbo/turbo-types.log +0 -4
- package/components/dropdown/.turbo/turbo-build$colon$version.log +0 -7
- package/components/dropdown/.turbo/turbo-bundler.log +0 -13
- package/components/dropdown/.turbo/turbo-types.log +0 -4
- package/components/input/.turbo/turbo-bundler.log +0 -13
- package/components/input/.turbo/turbo-types.log +0 -4
- package/components/input/dist/styles/helpText-css.d.ts.map +0 -1
- package/components/input/src/styles/helpText-css.js +0 -2
- package/components/input/src/styles/helpText.css +0 -6
- package/components/input/src/styles/helpText.scss +0 -9
- package/components/radio/.turbo/turbo-bundler.log +0 -13
- package/components/radio/.turbo/turbo-types.log +0 -4
|
@@ -10,23 +10,32 @@ import colorCss from "./styles/color-menu-css.js";
|
|
|
10
10
|
import tokensCss from "./styles/tokens-css.js";
|
|
11
11
|
|
|
12
12
|
import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';
|
|
13
|
+
import {
|
|
14
|
+
arrayOrUndefinedHasChanged,
|
|
15
|
+
isOptionInteractive,
|
|
16
|
+
dispatchMenuEvent,
|
|
17
|
+
arrayConverter
|
|
18
|
+
} from './auro-menu-utils.js';
|
|
19
|
+
|
|
13
20
|
|
|
14
21
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
15
22
|
/**
|
|
16
23
|
* The auro-menu element provides users a way to select from a list of options.
|
|
17
|
-
* @attr {
|
|
18
|
-
* @attr {
|
|
19
|
-
* @attr {
|
|
20
|
-
* @attr {
|
|
21
|
-
* @attr {
|
|
22
|
-
* @attr {
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
25
|
-
* @
|
|
26
|
-
* @event auroMenu-
|
|
27
|
-
* @event auroMenu-
|
|
28
|
-
* @event auroMenu-
|
|
29
|
-
* @event auroMenu-
|
|
24
|
+
* @attr {Array<HTMLElement>|undefined} optionselected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
|
|
25
|
+
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
26
|
+
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
27
|
+
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
28
|
+
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
29
|
+
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
30
|
+
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
31
|
+
* @attr {Array<string>|undefined} value - Value selected for the menu. `undefined` when no selection has been made, otherwise an array of strings. In single-select mode, the array will contain only one value.
|
|
32
|
+
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
33
|
+
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
34
|
+
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
35
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
36
|
+
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
|
|
37
|
+
* @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
38
|
+
* @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
30
39
|
* @slot loadingText - Text to show while loading attribute is set
|
|
31
40
|
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
32
41
|
* @slot - Slot for insertion of menu options.
|
|
@@ -37,52 +46,104 @@ import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/util
|
|
|
37
46
|
export class AuroMenu extends LitElement {
|
|
38
47
|
constructor() {
|
|
39
48
|
super();
|
|
49
|
+
|
|
50
|
+
// State properties (reactive)
|
|
51
|
+
|
|
52
|
+
// Value of the selected options
|
|
40
53
|
this.value = undefined;
|
|
54
|
+
// Currently selected option
|
|
41
55
|
this.optionSelected = undefined;
|
|
56
|
+
// String used for highlighting/filtering
|
|
42
57
|
this.matchWord = undefined;
|
|
58
|
+
// Hide the checkmark icon on selected options
|
|
43
59
|
this.noCheckmark = false;
|
|
60
|
+
// Currently active option
|
|
44
61
|
this.optionActive = undefined;
|
|
62
|
+
// Loading state
|
|
45
63
|
this.loading = false;
|
|
64
|
+
// Multi-select mode
|
|
65
|
+
this.multiSelect = false;
|
|
66
|
+
|
|
67
|
+
// Event Bindings
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
46
73
|
|
|
47
74
|
/**
|
|
48
75
|
* @private
|
|
49
76
|
*/
|
|
50
|
-
this.
|
|
77
|
+
this.handleMouseSelect = this.handleMouseSelect.bind(this);
|
|
51
78
|
|
|
52
79
|
/**
|
|
53
80
|
* @private
|
|
54
81
|
*/
|
|
55
|
-
this.
|
|
82
|
+
this.handleOptionHover = this.handleOptionHover.bind(this);
|
|
56
83
|
|
|
57
84
|
/**
|
|
58
85
|
* @private
|
|
59
86
|
*/
|
|
60
|
-
this.
|
|
87
|
+
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
88
|
+
|
|
89
|
+
// Instance properties (non-reactive)
|
|
61
90
|
|
|
62
91
|
/**
|
|
63
92
|
* @private
|
|
64
93
|
*/
|
|
65
|
-
this
|
|
94
|
+
Object.assign(this, {
|
|
95
|
+
// Root-level menu (true) or a nested submenu (false)
|
|
96
|
+
rootMenu: true,
|
|
97
|
+
// Currently focused/active menu item index
|
|
98
|
+
index: -1,
|
|
99
|
+
// Nested menu spacer
|
|
100
|
+
nestingSpacer: '<span class="nestingSpacer"></span>',
|
|
101
|
+
// Loading indicator for slot elements
|
|
102
|
+
loadingSlots: null,
|
|
103
|
+
// Store for menu items
|
|
104
|
+
items: [],
|
|
105
|
+
});
|
|
66
106
|
}
|
|
67
107
|
|
|
68
108
|
static get properties() {
|
|
69
109
|
return {
|
|
70
|
-
noCheckmark:
|
|
110
|
+
noCheckmark: {
|
|
71
111
|
type: Boolean,
|
|
72
|
-
reflect: true
|
|
112
|
+
reflect: true,
|
|
113
|
+
attribute: 'nocheckmark'
|
|
73
114
|
},
|
|
74
|
-
disabled:
|
|
115
|
+
disabled: {
|
|
75
116
|
type: Boolean,
|
|
76
117
|
reflect: true
|
|
77
118
|
},
|
|
78
|
-
loading:
|
|
119
|
+
loading: {
|
|
79
120
|
type: Boolean,
|
|
80
121
|
reflect: true
|
|
81
122
|
},
|
|
82
|
-
optionSelected: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
123
|
+
optionSelected: {
|
|
124
|
+
// Allow HTMLElement[] arrays and undefined
|
|
125
|
+
converter: arrayConverter,
|
|
126
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
127
|
+
},
|
|
128
|
+
optionActive: {
|
|
129
|
+
type: Object,
|
|
130
|
+
attribute: 'optionactive'
|
|
131
|
+
},
|
|
132
|
+
matchWord: {
|
|
133
|
+
type: String,
|
|
134
|
+
attribute: 'matchword'
|
|
135
|
+
},
|
|
136
|
+
multiSelect: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
reflect: true,
|
|
139
|
+
attribute: 'multiselect'
|
|
140
|
+
},
|
|
141
|
+
value: {
|
|
142
|
+
// Allow string[] arrays and undefined
|
|
143
|
+
type: Object,
|
|
144
|
+
converter: arrayConverter,
|
|
145
|
+
hasChanged: arrayOrUndefinedHasChanged
|
|
146
|
+
}
|
|
86
147
|
};
|
|
87
148
|
}
|
|
88
149
|
|
|
@@ -106,198 +167,328 @@ export class AuroMenu extends LitElement {
|
|
|
106
167
|
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
107
168
|
}
|
|
108
169
|
|
|
109
|
-
|
|
110
|
-
* Passes the noCheckmark attribute to all nested auro-menuoptions.
|
|
111
|
-
* @private
|
|
112
|
-
* @returns {void}
|
|
113
|
-
*/
|
|
114
|
-
handleNoCheckmarkAttr() {
|
|
115
|
-
if (this.noCheckmark) {
|
|
116
|
-
const menus = this.querySelectorAll('auro-menu, [auro-menu]');
|
|
170
|
+
// Lifecycle Methods
|
|
117
171
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
});
|
|
172
|
+
connectedCallback() {
|
|
173
|
+
super.connectedCallback();
|
|
121
174
|
|
|
122
|
-
|
|
175
|
+
this.addEventListener('keydown', this.handleKeyDown);
|
|
176
|
+
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
177
|
+
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
178
|
+
this.addEventListener('slotchange', this.handleSlotChange);
|
|
179
|
+
}
|
|
123
180
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
181
|
+
disconnectedCallback() {
|
|
182
|
+
this.removeEventListener('keydown', this.handleKeyDown);
|
|
183
|
+
this.removeEventListener('mousedown', this.handleMouseSelect);
|
|
184
|
+
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
185
|
+
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
186
|
+
|
|
187
|
+
super.disconnectedCallback();
|
|
128
188
|
}
|
|
129
189
|
|
|
130
190
|
firstUpdated() {
|
|
131
|
-
|
|
132
|
-
this.runtimeUtils.handleComponentTagRename(this, 'auro-menu');
|
|
133
|
-
|
|
134
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
191
|
+
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
135
192
|
|
|
136
193
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
194
|
+
this.initializeMenu();
|
|
137
195
|
}
|
|
138
196
|
|
|
139
197
|
updated(changedProperties) {
|
|
140
|
-
if (changedProperties.has('
|
|
141
|
-
|
|
198
|
+
if (changedProperties.has('value')) {
|
|
199
|
+
// Handle null/undefined case
|
|
200
|
+
if (this.value === undefined || this.value === null) {
|
|
201
|
+
this.optionSelected = undefined;
|
|
202
|
+
// Reset index tracking
|
|
203
|
+
this.index = -1;
|
|
204
|
+
} else {
|
|
205
|
+
// Convert single values to arrays
|
|
206
|
+
const valueArray = Array.isArray(this.value) ? this.value : [this.value];
|
|
207
|
+
|
|
208
|
+
// Find all matching options
|
|
209
|
+
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
210
|
+
|
|
211
|
+
if (matchingOptions.length > 0) {
|
|
212
|
+
if (this.multiSelect) {
|
|
213
|
+
// For multiselect, keep all matching options
|
|
214
|
+
this.optionSelected = matchingOptions;
|
|
215
|
+
} else {
|
|
216
|
+
// For single select, only use the first match
|
|
217
|
+
this.optionSelected = [matchingOptions[0]];
|
|
218
|
+
this.index = this.items.indexOf(matchingOptions[0]);
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
// No matches found - trigger failure event
|
|
222
|
+
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
223
|
+
this.optionSelected = undefined;
|
|
224
|
+
this.index = -1;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Update UI state
|
|
229
|
+
this.updateItemsState(new Map([
|
|
230
|
+
[
|
|
231
|
+
'optionSelected',
|
|
232
|
+
true
|
|
233
|
+
]
|
|
234
|
+
]));
|
|
235
|
+
|
|
236
|
+
// Notify of changes
|
|
237
|
+
if (this.optionSelected !== undefined) {
|
|
238
|
+
this.notifySelectionChange();
|
|
239
|
+
}
|
|
142
240
|
}
|
|
143
241
|
|
|
144
|
-
|
|
145
|
-
|
|
242
|
+
// Process all other UI updates
|
|
243
|
+
this.updateItemsState(changedProperties);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Updates the UI state and appearance of menu items based on changed properties.
|
|
248
|
+
* @private
|
|
249
|
+
* @param {Map<string, boolean>} changedProperties - LitElement's changed properties map.
|
|
250
|
+
*/
|
|
251
|
+
updateItemsState(changedProperties) {
|
|
252
|
+
if (!this.items) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Handle noCheckmark propagation to all menus and options
|
|
257
|
+
if (changedProperties.has('noCheckmark') && this.noCheckmark) {
|
|
258
|
+
// Update both menus and options
|
|
259
|
+
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
146
260
|
}
|
|
147
261
|
|
|
148
|
-
if
|
|
149
|
-
|
|
262
|
+
// Regex for matchWord if needed
|
|
263
|
+
let regexWord = null;
|
|
150
264
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
265
|
+
if (changedProperties.has('matchWord') && this.matchWord && this.matchWord.length) {
|
|
266
|
+
const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
|
|
267
|
+
regexWord = new RegExp(escapedWord, 'giu');
|
|
154
268
|
}
|
|
155
269
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
270
|
+
// Handle direct item updates
|
|
271
|
+
this.items.forEach((option) => {
|
|
272
|
+
// Update selection if option or value changed
|
|
273
|
+
if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
|
|
274
|
+
const isSelected = this.isOptionSelected(option);
|
|
275
|
+
option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
|
|
276
|
+
|
|
277
|
+
// Add/remove selected attribute based on state
|
|
278
|
+
if (isSelected) {
|
|
279
|
+
option.setAttribute('selected', '');
|
|
280
|
+
} else {
|
|
281
|
+
option.removeAttribute('selected');
|
|
162
282
|
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Update text highlighting if matchWord changed
|
|
286
|
+
if (changedProperties.has('matchWord') && regexWord &&
|
|
287
|
+
isOptionInteractive(option) && !option.hasAttribute('persistent')) {
|
|
288
|
+
const nested = option.querySelectorAll('.nestingSpacer');
|
|
289
|
+
// Create nested spacers
|
|
290
|
+
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
291
|
+
|
|
292
|
+
// Update with spacers and matchWord
|
|
293
|
+
option.innerHTML = nestingSpacerBundle +
|
|
294
|
+
option.textContent.replace(
|
|
295
|
+
regexWord,
|
|
296
|
+
(match) => `<strong>${match}</strong>`
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Update disabled state
|
|
301
|
+
if (changedProperties.has('disabled')) {
|
|
302
|
+
option.disabled = this.disabled;
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
// Handle loading state changes
|
|
307
|
+
if (changedProperties.has('loading')) {
|
|
308
|
+
this.setAttribute("aria-busy", this.loading);
|
|
309
|
+
dispatchMenuEvent(this, "auroMenu-loadingChange", {
|
|
310
|
+
loading: this.loading,
|
|
311
|
+
hasLoadingPlaceholder: this.hasLoadingPlaceholder
|
|
163
312
|
});
|
|
164
|
-
this.setAttribute("aria-busy", this.hasAttribute("loading"));
|
|
165
|
-
this.dispatchEvent(event);
|
|
166
313
|
}
|
|
167
314
|
}
|
|
168
315
|
|
|
316
|
+
// Init Methods
|
|
317
|
+
|
|
169
318
|
/**
|
|
319
|
+
* Initializes the menu's state and structure.
|
|
170
320
|
* @private
|
|
171
|
-
* @param {Object} option - The menuoption to check for interactive state.
|
|
172
|
-
* @returns {Boolean} Returns true if the option is interactive.
|
|
173
321
|
*/
|
|
174
|
-
|
|
175
|
-
|
|
322
|
+
initializeMenu() {
|
|
323
|
+
this.initItems();
|
|
324
|
+
if (this.rootMenu) {
|
|
325
|
+
this.setAttribute('role', 'listbox');
|
|
326
|
+
this.setAttribute('root', '');
|
|
327
|
+
this.handleNestedMenus(this);
|
|
328
|
+
}
|
|
176
329
|
}
|
|
177
330
|
|
|
178
331
|
/**
|
|
332
|
+
* Initializes menu items and their attributes.
|
|
179
333
|
* @private
|
|
180
|
-
* @returns {void} When called will update the DOM with visible suggest text matches.
|
|
181
334
|
*/
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
this.items.forEach((item) => {
|
|
192
|
-
if (this.optionInteractive(item) && !item.hasAttribute('persistent')) {
|
|
193
|
-
const nested = item.querySelectorAll('.nestingSpacer');
|
|
194
|
-
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
195
|
-
|
|
196
|
-
item.innerHTML = nestingSpacerBundle + item.textContent.replace(regexWord, (match) => `<strong>${match}</strong>`);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
335
|
+
initItems() {
|
|
336
|
+
this.items = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
|
|
337
|
+
if (this.noCheckmark) {
|
|
338
|
+
this.updateItemsState(new Map([
|
|
339
|
+
[
|
|
340
|
+
'noCheckmark',
|
|
341
|
+
true
|
|
342
|
+
]
|
|
343
|
+
]));
|
|
199
344
|
}
|
|
200
345
|
}
|
|
201
346
|
|
|
347
|
+
// Logic Methods
|
|
348
|
+
|
|
202
349
|
/**
|
|
203
|
-
*
|
|
350
|
+
* Updates menu state when an option is selected.
|
|
351
|
+
* @private
|
|
352
|
+
* @param {HTMLElement} option - The option element to select.
|
|
204
353
|
*/
|
|
205
|
-
|
|
206
|
-
this.
|
|
207
|
-
|
|
208
|
-
this.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
354
|
+
handleSelectState(option) {
|
|
355
|
+
if (this.multiSelect) {
|
|
356
|
+
const currentValue = this.value || [];
|
|
357
|
+
const currentSelected = this.optionSelected || [];
|
|
358
|
+
|
|
359
|
+
if (!currentValue.includes(option.value)) {
|
|
360
|
+
this.value = [
|
|
361
|
+
...currentValue,
|
|
362
|
+
option.value
|
|
363
|
+
];
|
|
364
|
+
}
|
|
365
|
+
if (!currentSelected.includes(option)) {
|
|
366
|
+
this.optionSelected = [
|
|
367
|
+
...currentSelected,
|
|
368
|
+
option
|
|
369
|
+
];
|
|
370
|
+
}
|
|
371
|
+
} else {
|
|
372
|
+
// Single select - use arrays with single values
|
|
373
|
+
this.value = [option.value];
|
|
374
|
+
this.optionSelected = [option];
|
|
212
375
|
}
|
|
376
|
+
|
|
377
|
+
this.index = this.items.indexOf(option);
|
|
213
378
|
}
|
|
214
379
|
|
|
215
380
|
/**
|
|
216
|
-
*
|
|
217
|
-
* @param {Object} option - The menuoption to be selected.
|
|
381
|
+
* Deselects a menu option and updates related state.
|
|
218
382
|
* @private
|
|
383
|
+
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
219
384
|
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
385
|
+
handleDeselectState(option) {
|
|
386
|
+
if (this.multiSelect && Array.isArray(this.value)) {
|
|
387
|
+
// Remove this option from array
|
|
388
|
+
this.value = this.value.filter((val) => val !== option.value);
|
|
389
|
+
|
|
390
|
+
// If array is empty after removal, set back to undefined
|
|
391
|
+
if (this.value.length === 0) {
|
|
392
|
+
this.value = undefined;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
396
|
+
if (this.optionSelected.length === 0) {
|
|
397
|
+
this.optionSelected = undefined;
|
|
398
|
+
}
|
|
399
|
+
} else {
|
|
400
|
+
// For single-select: Back to undefined when deselected
|
|
401
|
+
this.value = undefined;
|
|
402
|
+
this.optionSelected = undefined;
|
|
403
|
+
}
|
|
224
404
|
|
|
225
|
-
|
|
226
|
-
this.optionSelected = option;
|
|
405
|
+
// Update the index tracking
|
|
227
406
|
this.index = this.items.indexOf(option);
|
|
407
|
+
|
|
408
|
+
// Update UI to reflect changes
|
|
409
|
+
this.updateItemsState(new Map([
|
|
410
|
+
[
|
|
411
|
+
'optionSelected',
|
|
412
|
+
true
|
|
413
|
+
]
|
|
414
|
+
]));
|
|
415
|
+
|
|
416
|
+
// Notify of selection change
|
|
417
|
+
this.notifySelectionChange();
|
|
228
418
|
}
|
|
229
419
|
|
|
230
420
|
/**
|
|
231
|
-
*
|
|
421
|
+
* Resets all options to their default state.
|
|
232
422
|
* @private
|
|
233
|
-
* @return {void}
|
|
234
423
|
*/
|
|
235
|
-
|
|
236
|
-
this.
|
|
237
|
-
|
|
238
|
-
cancelable: false,
|
|
239
|
-
composed: true,
|
|
240
|
-
}));
|
|
424
|
+
clearSelection() {
|
|
425
|
+
this.optionSelected = undefined;
|
|
426
|
+
this.value = undefined;
|
|
241
427
|
}
|
|
242
428
|
|
|
243
429
|
/**
|
|
244
|
-
*
|
|
430
|
+
* Resets the menu to its initial state.
|
|
431
|
+
* This is the only way to return value to undefined.
|
|
432
|
+
* @public
|
|
245
433
|
*/
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
434
|
+
reset() {
|
|
435
|
+
// Reset to undefined - initial state
|
|
436
|
+
this.value = undefined;
|
|
437
|
+
this.optionSelected = undefined;
|
|
438
|
+
this.index = -1;
|
|
439
|
+
|
|
440
|
+
// Reset UI state
|
|
441
|
+
this.updateItemsState(new Map([
|
|
442
|
+
[
|
|
443
|
+
'optionSelected',
|
|
444
|
+
true
|
|
445
|
+
]
|
|
446
|
+
]));
|
|
447
|
+
|
|
448
|
+
// Dispatch reset event
|
|
449
|
+
dispatchMenuEvent(this, 'auroMenu-selectValueReset');
|
|
450
|
+
}
|
|
250
451
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
composed: true,
|
|
265
|
-
}));
|
|
266
|
-
|
|
267
|
-
this.dispatchEvent(new CustomEvent('auroMenu-customEventFired', {
|
|
268
|
-
bubbles: true,
|
|
269
|
-
cancelable: false,
|
|
270
|
-
composed: true,
|
|
271
|
-
}));
|
|
272
|
-
} else {
|
|
273
|
-
this.handleLocalSelectState(option);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
452
|
+
/**
|
|
453
|
+
* Handles nested menu structure.
|
|
454
|
+
* @private
|
|
455
|
+
* @param {HTMLElement} menu - Root menu element.
|
|
456
|
+
*/
|
|
457
|
+
handleNestedMenus(menu) {
|
|
458
|
+
const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu]');
|
|
459
|
+
|
|
460
|
+
nestedMenus.forEach((nestedMenu) => {
|
|
461
|
+
// role="listbox" only allows "role=group" for children.
|
|
462
|
+
nestedMenu.setAttribute('role', 'group');
|
|
463
|
+
if (!nestedMenu.hasAttribute('aria-label')) {
|
|
464
|
+
nestedMenu.setAttribute('aria-label', 'submenu');
|
|
276
465
|
}
|
|
277
|
-
}
|
|
278
466
|
|
|
279
|
-
|
|
467
|
+
const options = nestedMenu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
468
|
+
options.forEach((option) => {
|
|
469
|
+
option.innerHTML = this.nestingSpacer + option.innerHTML;
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
this.handleNestedMenus(nestedMenu);
|
|
473
|
+
});
|
|
280
474
|
}
|
|
281
475
|
|
|
476
|
+
// Event Handlers
|
|
477
|
+
|
|
282
478
|
/**
|
|
283
|
-
*
|
|
479
|
+
* Handles keyboard navigation.
|
|
284
480
|
* @private
|
|
285
|
-
* @param {
|
|
481
|
+
* @param {KeyboardEvent} event - Event object from the browser.
|
|
286
482
|
*/
|
|
287
483
|
handleKeyDown(event) {
|
|
288
484
|
event.preventDefault();
|
|
289
|
-
|
|
290
|
-
// With ArrowDown/ArrowUp events, pass new value to selectNextItem()
|
|
291
|
-
// With Enter event, set value and apply attrs
|
|
292
485
|
switch (event.key) {
|
|
293
486
|
case "ArrowDown":
|
|
294
|
-
this.
|
|
487
|
+
this.navigateOptions('down');
|
|
295
488
|
break;
|
|
296
|
-
|
|
297
489
|
case "ArrowUp":
|
|
298
|
-
this.
|
|
490
|
+
this.navigateOptions('up');
|
|
299
491
|
break;
|
|
300
|
-
|
|
301
492
|
case "Enter":
|
|
302
493
|
this.makeSelection();
|
|
303
494
|
break;
|
|
@@ -307,222 +498,218 @@ export class AuroMenu extends LitElement {
|
|
|
307
498
|
}
|
|
308
499
|
|
|
309
500
|
/**
|
|
310
|
-
*
|
|
501
|
+
* Makes a selection based on the current index or clicked option.
|
|
311
502
|
* @private
|
|
312
503
|
*/
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
504
|
+
makeSelection() {
|
|
505
|
+
if (!this.items) {
|
|
506
|
+
this.initItems();
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// Get currently selected menu option based on index
|
|
510
|
+
const option = this.items[this.index];
|
|
511
|
+
|
|
512
|
+
// Return early if option is not interactive
|
|
513
|
+
if (!option || !isOptionInteractive(option)) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
// Handle custom events first
|
|
518
|
+
if (option.hasAttribute('event')) {
|
|
519
|
+
this.handleCustomEvent(option);
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
if (this.multiSelect) {
|
|
524
|
+
// In multiselect, toggle individual selections
|
|
525
|
+
this.toggleOption(option);
|
|
526
|
+
// In single select, only handle selection of new options
|
|
527
|
+
} else if (!this.isOptionSelected(option)) {
|
|
528
|
+
this.clearSelection();
|
|
529
|
+
this.handleSelectState(option);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
this.notifySelectionChange();
|
|
316
533
|
}
|
|
317
534
|
|
|
318
535
|
/**
|
|
319
|
-
*
|
|
536
|
+
* Toggle the selection state of the menuoption.
|
|
320
537
|
* @private
|
|
538
|
+
* @param {HTMLElement} option - The menuoption to toggle.
|
|
321
539
|
*/
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
const index = this.items.findIndex((option) => option.hasAttribute('selected') && this.optionInteractive(option));
|
|
540
|
+
toggleOption(option) {
|
|
541
|
+
const isCurrentlySelected = this.isOptionSelected(option);
|
|
325
542
|
|
|
326
|
-
if (
|
|
327
|
-
this.
|
|
328
|
-
|
|
543
|
+
if (isCurrentlySelected) {
|
|
544
|
+
this.handleDeselectState(option);
|
|
545
|
+
} else if (option.value === undefined || option.value === '') {
|
|
546
|
+
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
547
|
+
} else {
|
|
548
|
+
this.handleSelectState(option);
|
|
329
549
|
}
|
|
330
550
|
}
|
|
331
551
|
|
|
332
552
|
/**
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
* The event.target is not used as the function needs to know where to go,
|
|
338
|
-
* versus knowing where it is.
|
|
339
|
-
* @param {String} moveDirection - Up or Down based on keyboard event.
|
|
553
|
+
* Handles option selection via mouse.
|
|
554
|
+
* @private
|
|
555
|
+
* @param {MouseEvent} event - Event object from the browser.
|
|
340
556
|
*/
|
|
341
|
-
|
|
342
|
-
if (
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
// calculate which is the selection we should focus next
|
|
346
|
-
let increment = 0;
|
|
347
|
-
|
|
348
|
-
if (moveDirection === 'down') {
|
|
349
|
-
increment = 1;
|
|
350
|
-
} else if (moveDirection === 'up') {
|
|
351
|
-
increment = -1;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
this.index += increment;
|
|
355
|
-
|
|
356
|
-
// keep looping inside the array of options
|
|
357
|
-
if (this.index > this.items.length - 1) {
|
|
358
|
-
this.index = 0;
|
|
359
|
-
} else if (this.index < 0) {
|
|
360
|
-
this.index = this.items.length - 1;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
// check if new index is disabled, static or hidden, if so, execute again
|
|
364
|
-
if (!this.optionInteractive(this.items[this.index])) {
|
|
365
|
-
this.selectNextItem(moveDirection);
|
|
366
|
-
} else {
|
|
367
|
-
// apply focus to new index
|
|
368
|
-
this.updateActiveOption(this.index);
|
|
369
|
-
}
|
|
370
|
-
} else {
|
|
371
|
-
this.index = 0;
|
|
557
|
+
handleMouseSelect(event) {
|
|
558
|
+
if (event.target === this) {
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
372
561
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
562
|
+
const option = event.target.closest('auro-menuoption, [auro-menuoption]');
|
|
563
|
+
if (option) {
|
|
564
|
+
this.index = this.items.indexOf(option);
|
|
565
|
+
this.makeSelection();
|
|
378
566
|
}
|
|
379
567
|
}
|
|
380
568
|
|
|
381
569
|
/**
|
|
382
|
-
*
|
|
570
|
+
* Handles option hover events.
|
|
383
571
|
* @private
|
|
384
|
-
* @param {
|
|
572
|
+
* @param {CustomEvent} event - Event object from the browser.
|
|
385
573
|
*/
|
|
386
|
-
|
|
387
|
-
const
|
|
574
|
+
handleOptionHover(event) {
|
|
575
|
+
const option = event.target;
|
|
576
|
+
this.index = this.items.indexOf(option);
|
|
577
|
+
this.updateActiveOption(this.index);
|
|
578
|
+
}
|
|
388
579
|
|
|
389
|
-
|
|
390
|
-
|
|
580
|
+
/**
|
|
581
|
+
* Handles slot change events.
|
|
582
|
+
* @private
|
|
583
|
+
*/
|
|
584
|
+
handleSlotChange() {
|
|
585
|
+
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
586
|
+
this.rootMenu = false;
|
|
391
587
|
}
|
|
392
588
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
589
|
+
if (this.rootMenu) {
|
|
590
|
+
this.initializeMenu();
|
|
591
|
+
} else if (this.noCheckmark) {
|
|
592
|
+
this.updateItemsState(new Map([
|
|
593
|
+
[
|
|
594
|
+
'noCheckmark',
|
|
595
|
+
true
|
|
596
|
+
]
|
|
597
|
+
]));
|
|
598
|
+
}
|
|
402
599
|
}
|
|
403
600
|
|
|
404
601
|
/**
|
|
405
|
-
*
|
|
602
|
+
* Navigates through options using keyboard.
|
|
406
603
|
* @private
|
|
407
|
-
* @param {
|
|
604
|
+
* @param {string} direction - 'up' or 'down'.
|
|
408
605
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
if (!this.items) {
|
|
412
|
-
|
|
606
|
+
navigateOptions(direction) {
|
|
607
|
+
// Return early if no items exist
|
|
608
|
+
if (!this.items || !this.items.length) {
|
|
609
|
+
return;
|
|
413
610
|
}
|
|
414
611
|
|
|
415
|
-
this.index
|
|
612
|
+
let newIndex = this.index;
|
|
613
|
+
const increment = direction === 'down' ? 1 : -1;
|
|
614
|
+
const maxIterations = this.items.length;
|
|
615
|
+
let iterations = 0;
|
|
616
|
+
let foundInteractiveOption = false;
|
|
416
617
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
valueMatch = true;
|
|
421
|
-
this.index = index;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
618
|
+
do {
|
|
619
|
+
newIndex = (newIndex + increment + this.items.length) % this.items.length;
|
|
620
|
+
iterations += 1;
|
|
424
621
|
|
|
425
|
-
if
|
|
426
|
-
|
|
427
|
-
|
|
622
|
+
// Check if current option is interactive
|
|
623
|
+
const currentOption = this.items[newIndex];
|
|
624
|
+
if (isOptionInteractive(currentOption)) {
|
|
625
|
+
foundInteractiveOption = true;
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
428
628
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
composed: true,
|
|
433
|
-
}));
|
|
434
|
-
} else {
|
|
435
|
-
this.makeSelection();
|
|
629
|
+
// Break if all options were checked
|
|
630
|
+
if (iterations >= maxIterations) {
|
|
631
|
+
break;
|
|
436
632
|
}
|
|
437
|
-
}
|
|
438
|
-
this.resetOptionsStates();
|
|
633
|
+
} while (iterations < maxIterations);
|
|
439
634
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
635
|
+
// Handle the results of the search
|
|
636
|
+
if (foundInteractiveOption) {
|
|
637
|
+
// Update only if an interactive option was found
|
|
638
|
+
this.index = newIndex;
|
|
639
|
+
this.updateActiveOption(this.index);
|
|
640
|
+
} else {
|
|
641
|
+
// All options are disabled or non-interactive
|
|
642
|
+
// Keep the current index unchanged
|
|
643
|
+
dispatchMenuEvent(this, 'auroMenu-navigateFailure', {
|
|
644
|
+
reason: 'No interactive options available',
|
|
645
|
+
direction,
|
|
646
|
+
currentIndex: this.index
|
|
647
|
+
});
|
|
445
648
|
}
|
|
446
649
|
}
|
|
447
650
|
|
|
448
651
|
/**
|
|
449
|
-
*
|
|
450
|
-
* @param {Number} index - Index of the menuoption that will be made active.
|
|
652
|
+
* Updates the active option state and dispatches events.
|
|
451
653
|
* @private
|
|
654
|
+
* @param {number} index - Index of the option to make active.
|
|
452
655
|
*/
|
|
453
656
|
updateActiveOption(index) {
|
|
454
|
-
this.items.
|
|
455
|
-
|
|
456
|
-
}
|
|
657
|
+
if (!this.items || !this.items[index]) {
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
this.items.forEach((item) => item.classList.remove('active'));
|
|
457
662
|
this.items[index].classList.add('active');
|
|
458
663
|
this.optionActive = this.items[index];
|
|
459
664
|
|
|
460
|
-
this
|
|
461
|
-
bubbles: true,
|
|
462
|
-
cancelable: false,
|
|
463
|
-
composed: true,
|
|
464
|
-
detail: this.items[index]
|
|
465
|
-
}));
|
|
665
|
+
dispatchMenuEvent(this, 'auroMenu-activatedOption', this.items[index]);
|
|
466
666
|
}
|
|
467
667
|
|
|
468
668
|
/**
|
|
469
|
-
*
|
|
470
|
-
* @param {Event} evt - Mousedown event.
|
|
669
|
+
* Handles custom events defined on options.
|
|
471
670
|
* @private
|
|
671
|
+
* @param {HTMLElement} option - Option with custom event.
|
|
472
672
|
*/
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
673
|
+
handleCustomEvent(option) {
|
|
674
|
+
const eventName = option.getAttribute('event');
|
|
675
|
+
dispatchMenuEvent(this, eventName);
|
|
676
|
+
dispatchMenuEvent(this, 'auroMenu-customEventFired');
|
|
477
677
|
}
|
|
478
678
|
|
|
479
679
|
/**
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
* This getter evaluates the `loadingSlots` collection to determine if it contains any items.
|
|
483
|
-
* If the size of the collection is greater than zero, it indicates the presence of loading
|
|
484
|
-
* placeholders, returning true; otherwise, it returns false.
|
|
485
|
-
*
|
|
486
|
-
* @getter hasLoadingPlaceholder
|
|
487
|
-
* @type {boolean}
|
|
488
|
-
* @returns {boolean} Returns true if loading placeholders exist; false otherwise.
|
|
680
|
+
* Notifies selection change to parent components.
|
|
681
|
+
* @private
|
|
489
682
|
*/
|
|
490
|
-
|
|
491
|
-
|
|
683
|
+
notifySelectionChange() {
|
|
684
|
+
dispatchMenuEvent(this, 'auroMenu-selectedOption');
|
|
492
685
|
}
|
|
493
686
|
|
|
494
687
|
/**
|
|
495
|
-
*
|
|
688
|
+
* Checks if an option is currently selected.
|
|
496
689
|
* @private
|
|
690
|
+
* @param {HTMLElement} option - The option to check.
|
|
691
|
+
* @returns {boolean}
|
|
497
692
|
*/
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
this.rootMenu = false;
|
|
693
|
+
isOptionSelected(option) {
|
|
694
|
+
if (!this.optionSelected) {
|
|
695
|
+
return false;
|
|
502
696
|
}
|
|
697
|
+
// Always treat as array for both single and multi-select
|
|
698
|
+
return Array.isArray(this.optionSelected) && this.optionSelected.includes(option);
|
|
699
|
+
}
|
|
503
700
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
this.markOptions();
|
|
511
|
-
this.index = -1;
|
|
512
|
-
this.getSelectedIndex();
|
|
513
|
-
|
|
514
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
515
|
-
this.addEventListener('mousedown', this.handleMenuMouseDown);
|
|
516
|
-
this.addEventListener('auroMenuOption-mouseover', (evt) => {
|
|
517
|
-
this.index = this.items.indexOf(evt.target);
|
|
518
|
-
this.updateActiveOption(this.index);
|
|
519
|
-
});
|
|
520
|
-
} else {
|
|
521
|
-
// make sure to update all menuoption noCheckmark attributes when the menu is dynamically changed
|
|
522
|
-
this.handleNoCheckmarkAttr();
|
|
523
|
-
}
|
|
701
|
+
/**
|
|
702
|
+
* Getter for loading placeholder state.
|
|
703
|
+
* @returns {boolean} - True if loading slots are present and non-empty.
|
|
704
|
+
*/
|
|
705
|
+
get hasLoadingPlaceholder() {
|
|
706
|
+
return this.loadingSlots && this.loadingSlots.length > 0;
|
|
524
707
|
}
|
|
525
708
|
|
|
709
|
+
/**
|
|
710
|
+
* Renders the component.
|
|
711
|
+
* @returns {boolean} - True if loading slots are present and non-empty.
|
|
712
|
+
*/
|
|
526
713
|
render() {
|
|
527
714
|
if (this.loading) {
|
|
528
715
|
return html`
|
|
@@ -534,6 +721,8 @@ export class AuroMenu extends LitElement {
|
|
|
534
721
|
</auro-menuoption>
|
|
535
722
|
`;
|
|
536
723
|
}
|
|
537
|
-
|
|
724
|
+
|
|
725
|
+
return html`<slot @slotchange=${this.handleSlotChange}></slot>`;
|
|
538
726
|
}
|
|
539
727
|
}
|
|
728
|
+
|