@telesign/boreal-web-components 0.1.0-alpha.4 → 0.1.0-alpha.6
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/components-build/bds-avatar.js +1 -1
- package/components-build/bds-badge.js +1 -1
- package/components-build/bds-banner.js +1 -1
- package/components-build/bds-breadcrumb-item.d.ts +11 -0
- package/components-build/bds-breadcrumb-item.js +1 -0
- package/components-build/bds-breadcrumb.d.ts +11 -0
- package/components-build/bds-breadcrumb.js +1 -0
- package/components-build/bds-button-group.d.ts +11 -0
- package/components-build/bds-button-group.js +1 -0
- package/components-build/bds-button.js +1 -1
- package/components-build/bds-checkbox-button.d.ts +11 -0
- package/components-build/bds-checkbox-button.js +1 -0
- package/components-build/bds-checkbox-card.d.ts +11 -0
- package/components-build/bds-checkbox-card.js +1 -0
- package/components-build/bds-checkbox-group.d.ts +11 -0
- package/components-build/bds-checkbox-group.js +1 -0
- package/components-build/bds-checkbox.js +1 -1
- package/components-build/bds-dialog.js +1 -1
- package/components-build/bds-divider.js +1 -1
- package/components-build/bds-flag.js +1 -1
- package/components-build/bds-grid-item.js +1 -1
- package/components-build/bds-grid.js +1 -1
- package/components-build/bds-list-menu-item.js +1 -1
- package/components-build/bds-list-menu.js +1 -1
- package/components-build/bds-popover.js +1 -1
- package/components-build/bds-radio-button.d.ts +11 -0
- package/components-build/bds-radio-button.js +1 -0
- package/components-build/bds-radio-card.d.ts +11 -0
- package/components-build/bds-radio-card.js +1 -0
- package/components-build/bds-radio-group.d.ts +11 -0
- package/components-build/bds-radio-group.js +1 -0
- package/components-build/bds-radio.d.ts +11 -0
- package/components-build/bds-radio.js +1 -0
- package/components-build/bds-select.d.ts +11 -0
- package/components-build/bds-select.js +1 -0
- package/components-build/bds-slider.d.ts +11 -0
- package/components-build/bds-slider.js +1 -0
- package/components-build/bds-spinner.js +1 -1
- package/components-build/bds-status.js +1 -1
- package/components-build/bds-tag.js +1 -1
- package/components-build/bds-text-field.js +1 -1
- package/components-build/bds-toggle.js +1 -1
- package/components-build/bds-tooltip.js +1 -1
- package/components-build/bds-typography.js +1 -1
- package/components-build/index.js +1 -1
- package/components-build/p-B6e9eIHB.js +1 -0
- package/components-build/p-CJBdGD_4.js +1 -0
- package/components-build/p-CPvuMm5C.js +1 -0
- package/components-build/p-DcR7mHFE.js +1 -0
- package/components-build/p-DdOPD9wW.js +1 -0
- package/components-build/p-DfaYciGa.js +1 -0
- package/components-build/p-Dh8DSJs_.js +1 -0
- package/components-build/p-DoNZM78n.js +1 -0
- package/components-build/p-DrkDx75U.js +1 -0
- package/components-build/p-DuBzr05c.js +1 -0
- package/components-build/p-PmjPRW8X.js +1 -0
- package/components-build/p-cgdh1LO-.js +1 -0
- package/{dist/boreal-web-components/p-CaHOghy5.js → components-build/p-fUK0GCeC.js} +1 -1
- package/components-build/p-nxYzL9uu.js +1 -0
- package/components-build/p-yLNcMg2E.js +1 -0
- package/custom-elements.json +5078 -1524
- package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
- package/dist/boreal-web-components/css/boreal.css +60 -0
- package/dist/boreal-web-components/css/theme-connect.css +15 -0
- package/dist/boreal-web-components/css/theme-engage.css +15 -0
- package/dist/boreal-web-components/css/theme-protect.css +15 -0
- package/dist/boreal-web-components/css/theme-proximus.css +15 -0
- package/dist/boreal-web-components/p-02e53626.entry.js +1 -0
- package/dist/boreal-web-components/p-0357450d.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-e0bf8a6e.entry.js → p-1250ba53.entry.js} +1 -1
- package/dist/boreal-web-components/p-1911b978.entry.js +1 -0
- package/dist/boreal-web-components/{p-2158a7cd.entry.js → p-19f9352d.entry.js} +1 -1
- package/dist/boreal-web-components/p-1mOd23lT.system.js +1 -0
- package/dist/boreal-web-components/{p-52600375.system.entry.js → p-25823f7d.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-2db71382.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-251d35df.system.entry.js → p-365e8e5c.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-367e40f9.entry.js +1 -0
- package/dist/boreal-web-components/p-3946d587.entry.js +1 -0
- package/dist/boreal-web-components/p-44b6fe6c.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-7a4efddd.system.entry.js → p-48712a63.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-251b3002.entry.js → p-49ea207a.entry.js} +1 -1
- package/dist/boreal-web-components/p-4b028406.entry.js +1 -0
- package/dist/boreal-web-components/p-4b615de8.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-edca16b6.system.entry.js → p-4f431941.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-524421f7.system.entry.js +1 -0
- package/dist/boreal-web-components/p-530c8c7f.entry.js +1 -0
- package/dist/boreal-web-components/p-55aeff0c.system.entry.js +1 -0
- package/dist/boreal-web-components/p-5c8650b3.system.entry.js +1 -0
- package/dist/boreal-web-components/p-5e590291.system.entry.js +1 -0
- package/dist/boreal-web-components/p-5ee0841f.entry.js +1 -0
- package/dist/boreal-web-components/{p-871c9a9f.system.entry.js → p-65923619.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-66ec16d9.entry.js +1 -0
- package/dist/boreal-web-components/{p-127a4134.entry.js → p-714bf70d.entry.js} +1 -1
- package/dist/boreal-web-components/{p-66360e63.entry.js → p-71ed1e1d.entry.js} +1 -1
- package/dist/boreal-web-components/{p-b12d4788.system.entry.js → p-732e98f1.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-7626338e.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-80822731.system.entry.js → p-77658a5b.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-7G4h4DI7.js +1 -0
- package/dist/boreal-web-components/p-800fc096.system.entry.js +1 -0
- package/dist/boreal-web-components/p-824485ad.entry.js +1 -0
- package/dist/boreal-web-components/p-8dfe3a9f.entry.js +1 -0
- package/dist/boreal-web-components/p-90022071.entry.js +1 -0
- package/dist/boreal-web-components/{p-1d1bb9d2.entry.js → p-9d02057d.entry.js} +1 -1
- package/dist/boreal-web-components/p-C-g3hhl_.system.js +1 -0
- package/dist/boreal-web-components/p-C0P3gzq5.system.js +1 -0
- package/dist/boreal-web-components/p-C4HM8wQe.js +1 -0
- package/dist/boreal-web-components/p-CPvuMm5C.js +1 -0
- package/dist/boreal-web-components/p-CRMH6mfq.system.js +1 -0
- package/dist/boreal-web-components/p-CU_dRLdk.system.js +1 -0
- package/dist/boreal-web-components/p-CW4-dkCF.system.js +1 -0
- package/dist/boreal-web-components/p-CcENtewr.js +1 -0
- package/dist/boreal-web-components/{p-BuxZeJbu.system.js → p-DSU8tkVw.system.js} +1 -1
- package/dist/boreal-web-components/p-DfaYciGa.js +1 -0
- package/dist/boreal-web-components/p-Dk9dfU9-.system.js +1 -0
- package/dist/boreal-web-components/p-DlVzZK7o.js +1 -0
- package/dist/boreal-web-components/p-DnIhjwCH.system.js +1 -0
- package/dist/boreal-web-components/p-Dwo1hcd9.js +1 -0
- package/dist/boreal-web-components/p-K7DvMlRo.system.js +1 -0
- package/{components-build/p-CaHOghy5.js → dist/boreal-web-components/p-U9yfbs7i.js} +1 -1
- package/dist/boreal-web-components/p-UEj9YHof.system.js +1 -0
- package/dist/boreal-web-components/p-b54fe67f.system.entry.js +1 -0
- package/dist/boreal-web-components/p-bbcd3a30.system.entry.js +1 -0
- package/dist/boreal-web-components/p-bea25d3d.system.entry.js +1 -0
- package/dist/boreal-web-components/p-bed506d3.entry.js +1 -0
- package/dist/boreal-web-components/p-bfd62034.system.entry.js +1 -0
- package/dist/boreal-web-components/p-c07d6b82.system.entry.js +1 -0
- package/dist/boreal-web-components/p-cc5c359f.entry.js +1 -0
- package/dist/boreal-web-components/p-cgdh1LO-.js +1 -0
- package/dist/boreal-web-components/p-d2b6ae79.entry.js +1 -0
- package/dist/boreal-web-components/{p-695d0830.entry.js → p-dc7d429c.entry.js} +1 -1
- package/dist/boreal-web-components/p-e21b8416.entry.js +1 -0
- package/dist/boreal-web-components/p-e4364a44.system.entry.js +1 -0
- package/dist/boreal-web-components/p-e51407b2.system.entry.js +1 -0
- package/dist/boreal-web-components/p-e8cde179.system.entry.js +1 -0
- package/dist/boreal-web-components/p-eecc3028.system.entry.js +1 -0
- package/dist/boreal-web-components/p-f3bd824d.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-44ceff4e.system.entry.js → p-f65e9d0c.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-f6eabb16.entry.js +1 -0
- package/dist/boreal-web-components/p-f7acf6e5.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-7db870b7.entry.js → p-f9560509.entry.js} +1 -1
- package/dist/boreal-web-components/p-fa128cad.system.entry.js +1 -0
- package/dist/boreal-web-components/p-fab1a01d.entry.js +1 -0
- package/dist/boreal-web-components/{p-fc24d963.entry.js → p-fb9a0e94.entry.js} +1 -1
- package/dist/boreal-web-components/p-fb9ba833.entry.js +1 -0
- package/dist/boreal-web-components/p-fbe0c9f2.entry.js +1 -0
- package/dist/boreal-web-components/p-fbe88555.entry.js +1 -0
- package/dist/boreal-web-components/p-fc1fa966.system.entry.js +1 -0
- package/dist/boreal-web-components/p-fc4ffa0e.entry.js +1 -0
- package/dist/boreal-web-components/p-fef13445.entry.js +1 -0
- package/dist/boreal-web-components/p-iq2UuV7c.js +1 -0
- package/dist/boreal-web-components/p-qGhMe8Hk.js +1 -0
- package/dist/boreal-web-components/p-vzZJGcYF.system.js +1 -1
- package/dist/boreal-web-components/scss/maps/_theme-connect.scss +16 -1
- package/dist/boreal-web-components/scss/maps/_theme-engage.scss +16 -1
- package/dist/boreal-web-components/scss/maps/_theme-protect.scss +16 -1
- package/dist/boreal-web-components/scss/maps/_theme-proximus.scss +16 -1
- package/dist/boreal-web-components/scss/variables/_theme-connect.scss +16 -1
- package/dist/boreal-web-components/scss/variables/_theme-engage.scss +16 -1
- package/dist/boreal-web-components/scss/variables/_theme-protect.scss +16 -1
- package/dist/boreal-web-components/scss/variables/_theme-proximus.scss +16 -1
- package/dist/cjs/KeyboardController-B_g3peyB.js +1067 -0
- package/dist/cjs/Keys-DXn16dlA.js +34 -0
- package/dist/cjs/Logger-DnziItRH.js +51 -0
- package/dist/cjs/{attributes-wIHueigW.js → attributes-CgRFplrN.js} +3 -0
- package/dist/cjs/bds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/bds-badge.cjs.entry.js +1 -1
- package/dist/cjs/bds-banner.cjs.entry.js +2 -2
- package/dist/cjs/bds-breadcrumb-item.cjs.entry.js +106 -0
- package/dist/cjs/bds-breadcrumb.cjs.entry.js +127 -0
- package/dist/cjs/bds-button-group.cjs.entry.js +116 -0
- package/dist/cjs/bds-button.cjs.entry.js +38 -17
- package/dist/cjs/bds-checkbox-button.cjs.entry.js +119 -0
- package/dist/cjs/bds-checkbox-card.cjs.entry.js +135 -0
- package/dist/cjs/bds-checkbox-group.cjs.entry.js +292 -0
- package/dist/cjs/bds-checkbox.cjs.entry.js +67 -29
- package/dist/cjs/bds-dialog.cjs.entry.js +4 -4
- package/dist/cjs/bds-divider.cjs.entry.js +2 -2
- package/dist/cjs/bds-flag.cjs.entry.js +1 -1
- package/dist/cjs/bds-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/bds-grid.cjs.entry.js +1 -1
- package/dist/cjs/bds-list-menu-item.cjs.entry.js +59 -23
- package/dist/cjs/bds-list-menu.cjs.entry.js +126 -22
- package/dist/cjs/bds-popover.cjs.entry.js +15 -6
- package/dist/cjs/bds-radio-button.cjs.entry.js +60 -0
- package/dist/cjs/bds-radio-card.cjs.entry.js +76 -0
- package/dist/cjs/bds-radio-group.cjs.entry.js +291 -0
- package/dist/cjs/bds-radio.cjs.entry.js +60 -0
- package/dist/cjs/bds-select.cjs.entry.js +394 -0
- package/dist/cjs/bds-slider.cjs.entry.js +655 -0
- package/dist/cjs/bds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bds-status.cjs.entry.js +1 -1
- package/dist/cjs/bds-tag.cjs.entry.js +2 -2
- package/dist/cjs/bds-text-field.cjs.entry.js +15 -9
- package/dist/cjs/bds-toggle.cjs.entry.js +7 -6
- package/dist/cjs/bds-tooltip_2.cjs.entry.js +12 -9
- package/dist/cjs/boreal-web-components.cjs.js +1 -1
- package/dist/cjs/checkbox-form-association-DTEpHXUD.js +43 -0
- package/dist/cjs/coreColors-CQGojc0l.js +10 -0
- package/dist/cjs/{enum-DLblRCkQ.js → enum-DeTWfR0D.js} +3 -3
- package/dist/cjs/form-associated.mixin-BCR6bj29.js +33 -0
- package/dist/cjs/{getOffset-m4hBgyVP.js → getOffset-CsDHFjPW.js} +6 -53
- package/dist/cjs/{form-associated.mixin-DXwvF_vW.js → internals-D8x7GMfR.js} +0 -31
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/orientation-DQAIleEJ.js +8 -0
- package/dist/collection/collection-manifest.json +18 -6
- package/dist/collection/components/actions/bds-button/bds-button.css +55 -55
- package/dist/collection/components/actions/bds-button/bds-button.js +35 -11
- package/dist/collection/components/actions/bds-button/types/enum.js +3 -3
- package/dist/collection/components/actions/bds-button-group/bds-button-group.css +77 -0
- package/dist/collection/components/actions/bds-button-group/bds-button-group.js +264 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.css +27 -1
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.js +283 -51
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.css +30 -11
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js +65 -7
- package/dist/collection/components/actions/bds-toggle/bds-toggle.css +3 -3
- package/dist/collection/components/actions/bds-toggle/bds-toggle.js +1 -1
- package/dist/collection/components/feedback/bds-badge/bds-badge.js +1 -1
- package/dist/collection/components/feedback/bds-banner/bds-banner.js +1 -1
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.js +1 -1
- package/dist/collection/components/feedback/bds-status/bds-status.js +1 -1
- package/dist/collection/components/feedback/bds-tag/bds-tag.css +6 -6
- package/dist/collection/components/feedback/bds-tag/bds-tag.js +1 -1
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox/bds-checkbox.css +132 -0
- package/dist/collection/components/forms/bds-checkbox/{bds-checkbox.js → bds-checkbox/bds-checkbox.js} +138 -35
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-button/bds-checkbox-button.css +113 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-button/bds-checkbox-button.js +382 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-card/bds-checkbox-card.css +139 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-card/bds-checkbox-card.js +443 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/bds-checkbox-group.css +55 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/bds-checkbox-group.js +648 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/types/enum.js +5 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/types/index.js +3 -0
- package/dist/collection/components/forms/bds-checkbox/utils/checkbox-form-association.js +39 -0
- package/dist/collection/components/forms/bds-checkbox/utils/index.js +1 -0
- package/dist/collection/components/forms/bds-flag/bds-flag.js +1 -1
- package/dist/collection/components/forms/bds-radio/bds-radio/bds-radio.css +121 -0
- package/dist/collection/components/forms/bds-radio/bds-radio/bds-radio.js +238 -0
- package/dist/collection/components/forms/bds-radio/bds-radio/types/IRadio.js +1 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-button/bds-radio-button.css +113 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-button/bds-radio-button.js +238 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-button/types/IRadioButton.js +1 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-card/bds-radio-card.css +156 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-card/bds-radio-card.js +307 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-card/types/IRadioCard.js +1 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-group/bds-radio-group.css +55 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-group/bds-radio-group.js +648 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-group/types/IRadioGroup.js +1 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-group/types/enum.js +5 -0
- package/dist/collection/components/forms/bds-radio/bds-radio-group/types/types.js +1 -0
- package/dist/collection/components/forms/bds-select/bds-select.css +23 -0
- package/dist/collection/components/forms/bds-select/bds-select.js +431 -0
- package/dist/collection/components/forms/bds-select/types/ISelect.js +1 -0
- package/dist/collection/components/forms/bds-slider/bds-slider.css +213 -0
- package/dist/collection/components/forms/bds-slider/bds-slider.js +847 -0
- package/dist/collection/components/forms/bds-slider/helpers/SliderDOMController.js +61 -0
- package/dist/collection/components/forms/bds-slider/helpers/SliderService.js +93 -0
- package/dist/collection/components/forms/bds-slider/helpers/index.js +3 -0
- package/dist/collection/components/forms/bds-slider/helpers/parseValues.js +43 -0
- package/dist/collection/components/forms/bds-slider/types/ChangeDetail.js +1 -0
- package/dist/collection/components/forms/bds-slider/types/ISlider.js +1 -0
- package/dist/collection/components/forms/bds-slider/types/ISliderOptions.js +1 -0
- package/dist/collection/components/forms/bds-slider/types/enum.js +16 -0
- package/dist/collection/components/forms/bds-slider/types/index.js +5 -0
- package/dist/collection/components/forms/bds-slider/types/types.js +1 -0
- package/dist/collection/components/forms/bds-text-field/bds-text-field.css +10 -3
- package/dist/collection/components/forms/bds-text-field/bds-text-field.js +47 -2
- package/dist/collection/components/helpers/{bds-divider.css → bds-divider/bds-divider.css} +12 -4
- package/dist/collection/components/helpers/{bds-divider.js → bds-divider/bds-divider.js} +3 -3
- package/dist/collection/components/helpers/bds-divider/types/IDivider.js +1 -0
- package/dist/collection/components/helpers/bds-divider/types/types.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.js +1 -1
- package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/bds-grid.js +3 -3
- package/dist/collection/components/layouts/bds-grid/bds-grid/types/IGrid.js +1 -0
- package/dist/collection/components/layouts/bds-grid/bds-grid/types/types.js +1 -0
- package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/bds-grid-item.js +9 -9
- package/dist/collection/components/layouts/bds-grid/bds-grid-item/types/IGridItem.js +1 -0
- package/dist/collection/components/layouts/bds-grid/bds-grid-item/types/types.js +1 -0
- package/dist/collection/components/navigation/bds-breadcrumb/bds-breadcrumb.css +21 -0
- package/dist/collection/components/navigation/bds-breadcrumb/bds-breadcrumb.js +292 -0
- package/dist/collection/components/navigation/bds-breadcrumb/types/IBreadcrumb.js +1 -0
- package/dist/collection/components/navigation/bds-breadcrumb-item/bds-breadcrumb-item.css +64 -0
- package/dist/collection/components/navigation/bds-breadcrumb-item/bds-breadcrumb-item.js +369 -0
- package/dist/collection/components/navigation/bds-breadcrumb-item/types/IBreadcrumbItem.js +1 -0
- package/dist/collection/components/overlays/bds-dialog/bds-dialog.css +1 -1
- package/dist/collection/components/overlays/bds-dialog/bds-dialog.js +2 -2
- package/dist/collection/components/overlays/bds-popover/bds-popover.js +49 -3
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.js +3 -3
- package/dist/collection/components/titles-text/bds-typography/bds-typography.css +5 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.js +30 -47
- package/dist/collection/components/titles-text/bds-typography/utils/bds-typography-utils.js +1 -1
- package/dist/collection/css/boreal.css +60 -0
- package/dist/collection/css/theme-connect.css +15 -0
- package/dist/collection/css/theme-engage.css +15 -0
- package/dist/collection/css/theme-protect.css +15 -0
- package/dist/collection/css/theme-proximus.css +15 -0
- package/dist/collection/mixins/anchored.mixin.js +2 -2
- package/dist/collection/mixins/links.mixin.js +1 -2
- package/dist/collection/mixins/menu-behavior.mixin.js +12 -6
- package/dist/collection/scss/maps/_theme-connect.scss +16 -1
- package/dist/collection/scss/maps/_theme-engage.scss +16 -1
- package/dist/collection/scss/maps/_theme-protect.scss +16 -1
- package/dist/collection/scss/maps/_theme-proximus.scss +16 -1
- package/dist/collection/scss/variables/_theme-connect.scss +16 -1
- package/dist/collection/scss/variables/_theme-engage.scss +16 -1
- package/dist/collection/scss/variables/_theme-protect.scss +16 -1
- package/dist/collection/scss/variables/_theme-proximus.scss +16 -1
- package/dist/collection/types/index.js +2 -1
- package/dist/collection/types/orientation.js +4 -0
- package/dist/collection/utils/a11y/index.js +4 -0
- package/dist/collection/utils/a11y/keyboard/KeyboardController.js +566 -0
- package/dist/collection/utils/a11y/keyboard/_constants.js +30 -0
- package/dist/collection/utils/a11y/keyboard/focus/aria-activedescendant.js +41 -0
- package/dist/collection/utils/a11y/keyboard/focus/resolve.js +48 -0
- package/dist/collection/utils/a11y/keyboard/focus/roving-tabindex.js +55 -0
- package/dist/collection/utils/a11y/keyboard/navigation/grid-navigation.js +194 -0
- package/dist/collection/utils/a11y/keyboard/navigation/linear-navigation.js +137 -0
- package/dist/collection/utils/a11y/keyboard/types/IKeyboardController.js +1 -0
- package/dist/collection/utils/a11y/keyboard/types/index.js +2 -0
- package/dist/collection/utils/a11y/keyboard/types/types.js +1 -0
- package/dist/collection/utils/constants/common/Keys.js +29 -24
- package/dist/collection/utils/dom/elements.js +63 -0
- package/dist/collection/utils/menu/menu-item.utils.js +9 -8
- package/dist/collection/utils/testing/helpers.js +10 -0
- package/dist/css/boreal.css +60 -0
- package/dist/css/theme-connect.css +15 -0
- package/dist/css/theme-engage.css +15 -0
- package/dist/css/theme-protect.css +15 -0
- package/dist/css/theme-proximus.css +15 -0
- package/dist/esm/KeyboardController-DcnXb5F5.js +1064 -0
- package/dist/esm/Keys-7G4h4DI7.js +31 -0
- package/dist/esm/Logger-iq2UuV7c.js +49 -0
- package/dist/esm/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +3 -0
- package/dist/esm/bds-avatar.entry.js +2 -2
- package/dist/esm/bds-badge.entry.js +1 -1
- package/dist/esm/bds-banner.entry.js +2 -2
- package/dist/esm/bds-breadcrumb-item.entry.js +104 -0
- package/dist/esm/bds-breadcrumb.entry.js +125 -0
- package/dist/esm/bds-button-group.entry.js +114 -0
- package/dist/esm/bds-button.entry.js +36 -15
- package/dist/esm/bds-checkbox-button.entry.js +117 -0
- package/dist/esm/bds-checkbox-card.entry.js +133 -0
- package/dist/esm/bds-checkbox-group.entry.js +290 -0
- package/dist/esm/bds-checkbox.entry.js +67 -29
- package/dist/esm/bds-dialog.entry.js +4 -4
- package/dist/esm/bds-divider.entry.js +2 -2
- package/dist/esm/bds-flag.entry.js +1 -1
- package/dist/esm/bds-grid-item.entry.js +1 -1
- package/dist/esm/bds-grid.entry.js +1 -1
- package/dist/esm/bds-list-menu-item.entry.js +59 -23
- package/dist/esm/bds-list-menu.entry.js +126 -22
- package/dist/esm/bds-popover.entry.js +15 -6
- package/dist/esm/bds-radio-button.entry.js +58 -0
- package/dist/esm/bds-radio-card.entry.js +74 -0
- package/dist/esm/bds-radio-group.entry.js +289 -0
- package/dist/esm/bds-radio.entry.js +58 -0
- package/dist/esm/bds-select.entry.js +392 -0
- package/dist/esm/bds-slider.entry.js +653 -0
- package/dist/esm/bds-spinner.entry.js +1 -1
- package/dist/esm/bds-status.entry.js +1 -1
- package/dist/esm/bds-tag.entry.js +2 -2
- package/dist/esm/bds-text-field.entry.js +10 -4
- package/dist/esm/bds-toggle.entry.js +5 -4
- package/dist/esm/bds-tooltip_2.entry.js +12 -9
- package/dist/esm/boreal-web-components.js +1 -1
- package/dist/esm/checkbox-form-association-cgdh1LO-.js +41 -0
- package/dist/esm/coreColors-Dwo1hcd9.js +8 -0
- package/dist/esm/{enum-C8mRvnTA.js → enum-DlVzZK7o.js} +4 -4
- package/dist/esm/form-associated.mixin-C4HM8wQe.js +31 -0
- package/dist/esm/{getOffset-DKPjeBHi.js → getOffset-DCLpJBcp.js} +4 -51
- package/dist/esm/{form-associated.mixin-CvK2d92c.js → internals-DfaYciGa.js} +1 -31
- package/dist/esm/loader.js +1 -1
- package/dist/esm/orientation-CPvuMm5C.js +6 -0
- package/dist/esm-es5/KeyboardController-DcnXb5F5.js +1 -0
- package/dist/esm-es5/Keys-7G4h4DI7.js +1 -0
- package/dist/esm-es5/Logger-iq2UuV7c.js +1 -0
- package/dist/esm-es5/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +1 -1
- package/dist/esm-es5/bds-avatar.entry.js +1 -1
- package/dist/esm-es5/bds-badge.entry.js +1 -1
- package/dist/esm-es5/bds-banner.entry.js +1 -1
- package/dist/esm-es5/bds-breadcrumb-item.entry.js +1 -0
- package/dist/esm-es5/bds-breadcrumb.entry.js +1 -0
- package/dist/esm-es5/bds-button-group.entry.js +1 -0
- package/dist/esm-es5/bds-button.entry.js +1 -1
- package/dist/esm-es5/bds-checkbox-button.entry.js +1 -0
- package/dist/esm-es5/bds-checkbox-card.entry.js +1 -0
- package/dist/esm-es5/bds-checkbox-group.entry.js +1 -0
- package/dist/esm-es5/bds-checkbox.entry.js +1 -1
- package/dist/esm-es5/bds-dialog.entry.js +1 -1
- package/dist/esm-es5/bds-divider.entry.js +1 -1
- package/dist/esm-es5/bds-flag.entry.js +1 -1
- package/dist/esm-es5/bds-grid-item.entry.js +1 -1
- package/dist/esm-es5/bds-grid.entry.js +1 -1
- package/dist/esm-es5/bds-list-menu-item.entry.js +1 -1
- package/dist/esm-es5/bds-list-menu.entry.js +1 -1
- package/dist/esm-es5/bds-popover.entry.js +1 -1
- package/dist/esm-es5/bds-radio-button.entry.js +1 -0
- package/dist/esm-es5/bds-radio-card.entry.js +1 -0
- package/dist/esm-es5/bds-radio-group.entry.js +1 -0
- package/dist/esm-es5/bds-radio.entry.js +1 -0
- package/dist/esm-es5/bds-select.entry.js +1 -0
- package/dist/esm-es5/bds-slider.entry.js +1 -0
- package/dist/esm-es5/bds-spinner.entry.js +1 -1
- package/dist/esm-es5/bds-status.entry.js +1 -1
- package/dist/esm-es5/bds-tag.entry.js +1 -1
- package/dist/esm-es5/bds-text-field.entry.js +1 -1
- package/dist/esm-es5/bds-toggle.entry.js +1 -1
- package/dist/esm-es5/bds-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/boreal-web-components.js +1 -1
- package/dist/esm-es5/checkbox-form-association-cgdh1LO-.js +1 -0
- package/dist/esm-es5/coreColors-Dwo1hcd9.js +1 -0
- package/dist/esm-es5/enum-DlVzZK7o.js +1 -0
- package/dist/esm-es5/form-associated.mixin-C4HM8wQe.js +1 -0
- package/dist/esm-es5/getOffset-DCLpJBcp.js +1 -0
- package/dist/esm-es5/internals-DfaYciGa.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/orientation-CPvuMm5C.js +1 -0
- package/dist/scss/maps/_theme-connect.scss +16 -1
- package/dist/scss/maps/_theme-engage.scss +16 -1
- package/dist/scss/maps/_theme-protect.scss +16 -1
- package/dist/scss/maps/_theme-proximus.scss +16 -1
- package/dist/scss/variables/_theme-connect.scss +16 -1
- package/dist/scss/variables/_theme-engage.scss +16 -1
- package/dist/scss/variables/_theme-protect.scss +16 -1
- package/dist/scss/variables/_theme-proximus.scss +16 -1
- package/dist/types/components/actions/bds-button/bds-button.d.ts +8 -4
- package/dist/types/components/actions/bds-button/types/enum.d.ts +3 -3
- package/dist/types/components/actions/bds-button-group/bds-button-group.d.ts +40 -0
- package/dist/types/components/actions/bds-button-group/types/IButtonGroup.d.ts +11 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.d.ts +32 -15
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.d.ts +17 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/types.d.ts +3 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.d.ts +10 -1
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.d.ts +2 -0
- package/dist/types/components/actions/bds-toggle/types/IToggle.d.ts +1 -1
- package/dist/types/components/forms/bds-checkbox/{bds-checkbox.d.ts → bds-checkbox/bds-checkbox.d.ts} +24 -9
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-button/bds-checkbox-button.d.ts +68 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-button/types/ICheckboxButton.d.ts +15 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-card/bds-checkbox-card.d.ts +63 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-card/types/ICheckboxCard.d.ts +9 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/bds-checkbox-group.d.ts +86 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/ICheckboxGroup.d.ts +27 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/enum.d.ts +6 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/index.d.ts +4 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/types.d.ts +4 -0
- package/dist/types/components/forms/bds-checkbox/types/ICheckbox.d.ts +7 -22
- package/dist/types/components/forms/bds-checkbox/utils/checkbox-form-association.d.ts +10 -0
- package/dist/types/components/forms/bds-checkbox/utils/index.d.ts +2 -0
- package/dist/types/components/forms/bds-radio/bds-radio/bds-radio.d.ts +36 -0
- package/dist/types/components/forms/bds-radio/bds-radio/types/IRadio.d.ts +13 -0
- package/dist/types/components/forms/bds-radio/bds-radio-button/bds-radio-button.d.ts +36 -0
- package/dist/types/components/forms/bds-radio/bds-radio-button/types/IRadioButton.d.ts +14 -0
- package/dist/types/components/forms/bds-radio/bds-radio-card/bds-radio-card.d.ts +57 -0
- package/dist/types/components/forms/bds-radio/bds-radio-card/types/IRadioCard.d.ts +14 -0
- package/dist/types/components/forms/bds-radio/bds-radio-group/bds-radio-group.d.ts +85 -0
- package/dist/types/components/forms/bds-radio/bds-radio-group/types/IRadioGroup.d.ts +20 -0
- package/dist/types/components/forms/bds-radio/bds-radio-group/types/enum.d.ts +6 -0
- package/dist/types/components/forms/bds-radio/bds-radio-group/types/types.d.ts +3 -0
- package/dist/types/components/forms/bds-select/bds-select.d.ts +98 -0
- package/dist/types/components/forms/bds-select/types/ISelect.d.ts +6 -0
- package/dist/types/components/forms/bds-slider/bds-slider.d.ts +176 -0
- package/dist/types/components/forms/bds-slider/helpers/SliderDOMController.d.ts +38 -0
- package/dist/types/components/forms/bds-slider/helpers/SliderService.d.ts +44 -0
- package/dist/types/components/forms/bds-slider/helpers/index.d.ts +4 -0
- package/dist/types/components/forms/bds-slider/helpers/parseValues.d.ts +18 -0
- package/dist/types/components/forms/bds-slider/types/ChangeDetail.d.ts +9 -0
- package/dist/types/components/forms/bds-slider/types/ISlider.d.ts +17 -0
- package/dist/types/components/forms/bds-slider/types/ISliderOptions.d.ts +31 -0
- package/dist/types/components/forms/bds-slider/types/enum.d.ts +17 -0
- package/dist/types/components/forms/bds-slider/types/index.d.ts +6 -0
- package/dist/types/components/forms/bds-slider/types/types.d.ts +5 -0
- package/dist/types/components/forms/bds-text-field/bds-text-field.d.ts +4 -0
- package/dist/types/components/navigation/bds-breadcrumb/bds-breadcrumb.d.ts +57 -0
- package/dist/types/components/navigation/bds-breadcrumb/types/IBreadcrumb.d.ts +17 -0
- package/dist/types/components/navigation/bds-breadcrumb-item/bds-breadcrumb-item.d.ts +83 -0
- package/dist/types/components/navigation/bds-breadcrumb-item/types/IBreadcrumbItem.d.ts +20 -0
- package/dist/types/components/overlays/bds-popover/bds-popover.d.ts +4 -0
- package/dist/types/components/titles-text/bds-typography/bds-typography.d.ts +2 -46
- package/dist/types/components/titles-text/bds-typography/types/ITypography.d.ts +1 -0
- package/dist/types/components.d.ts +2187 -450
- package/dist/types/mixins/menu-behavior.mixin.d.ts +5 -1
- package/dist/types/types/form.d.ts +24 -0
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/orientation.d.ts +6 -0
- package/dist/types/utils/a11y/index.d.ts +4 -0
- package/dist/types/utils/a11y/keyboard/KeyboardController.d.ts +321 -0
- package/dist/types/utils/a11y/keyboard/_constants.d.ts +28 -0
- package/dist/types/utils/a11y/keyboard/focus/aria-activedescendant.d.ts +17 -0
- package/dist/types/utils/a11y/keyboard/focus/resolve.d.ts +23 -0
- package/dist/types/utils/a11y/keyboard/focus/roving-tabindex.d.ts +20 -0
- package/dist/types/utils/a11y/keyboard/navigation/grid-navigation.d.ts +9 -0
- package/dist/types/utils/a11y/keyboard/navigation/linear-navigation.d.ts +13 -0
- package/dist/types/utils/a11y/keyboard/types/IKeyboardController.d.ts +125 -0
- package/dist/types/utils/a11y/keyboard/types/index.d.ts +3 -0
- package/dist/types/utils/a11y/keyboard/types/types.d.ts +6 -0
- package/dist/types/utils/constants/common/Keys.d.ts +28 -14
- package/dist/types/utils/dom/elements.d.ts +41 -0
- package/dist/types/utils/menu/menu-item.utils.d.ts +2 -2
- package/dist/types/utils/testing/helpers.d.ts +8 -0
- package/package.json +1 -1
- package/components-build/p-B8n1ru5i.js +0 -1
- package/components-build/p-CGdxFth9.js +0 -1
- package/components-build/p-CrAt6pGl.js +0 -1
- package/components-build/p-DCwT43Kz.js +0 -1
- package/components-build/p-DIY3CDNL.js +0 -1
- package/dist/boreal-web-components/p-0028481c.entry.js +0 -1
- package/dist/boreal-web-components/p-1466de58.system.entry.js +0 -1
- package/dist/boreal-web-components/p-2b8bd1dd.entry.js +0 -1
- package/dist/boreal-web-components/p-32c23246.system.entry.js +0 -1
- package/dist/boreal-web-components/p-3fbcc233.entry.js +0 -1
- package/dist/boreal-web-components/p-401f1aee.system.entry.js +0 -1
- package/dist/boreal-web-components/p-41b48701.system.entry.js +0 -1
- package/dist/boreal-web-components/p-41cac1b8.system.entry.js +0 -1
- package/dist/boreal-web-components/p-627b19a5.system.entry.js +0 -1
- package/dist/boreal-web-components/p-649737e5.entry.js +0 -1
- package/dist/boreal-web-components/p-64cb5825.entry.js +0 -1
- package/dist/boreal-web-components/p-6a99f4c6.system.entry.js +0 -1
- package/dist/boreal-web-components/p-731b88cc.entry.js +0 -1
- package/dist/boreal-web-components/p-74c13bed.system.entry.js +0 -1
- package/dist/boreal-web-components/p-7f7ac40f.entry.js +0 -1
- package/dist/boreal-web-components/p-82d49661.entry.js +0 -1
- package/dist/boreal-web-components/p-83ca193e.entry.js +0 -1
- package/dist/boreal-web-components/p-BQ_zoZa2.js +0 -1
- package/dist/boreal-web-components/p-C8mRvnTA.js +0 -1
- package/dist/boreal-web-components/p-CdKFZYxk.system.js +0 -1
- package/dist/boreal-web-components/p-CtknSula.system.js +0 -1
- package/dist/boreal-web-components/p-CvK2d92c.js +0 -1
- package/dist/boreal-web-components/p-CzYQb3pP.js +0 -1
- package/dist/boreal-web-components/p-DZcx75cy.system.js +0 -1
- package/dist/boreal-web-components/p-Dme-NuTD.system.js +0 -1
- package/dist/boreal-web-components/p-ab5ffa15.system.entry.js +0 -1
- package/dist/boreal-web-components/p-ba2b625a.system.entry.js +0 -1
- package/dist/boreal-web-components/p-bf2ef10b.entry.js +0 -1
- package/dist/boreal-web-components/p-c7aee9f4.system.entry.js +0 -1
- package/dist/cjs/Keys-DbIXSJF2.js +0 -22
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox.css +0 -90
- package/dist/esm/Keys-CzYQb3pP.js +0 -20
- package/dist/esm-es5/Keys-CzYQb3pP.js +0 -1
- package/dist/esm-es5/enum-C8mRvnTA.js +0 -1
- package/dist/esm-es5/form-associated.mixin-CvK2d92c.js +0 -1
- package/dist/esm-es5/getOffset-DKPjeBHi.js +0 -1
- package/dist/types/types/IFormProps.d.ts +0 -25
- /package/dist/collection/components/{helpers/types/IDivider.js → actions/bds-button-group/types/IButtonGroup.js} +0 -0
- /package/dist/collection/components/{helpers/types/types.js → actions/bds-list-menu/bds-list-menu/types/IListMenu.js} +0 -0
- /package/dist/collection/components/{layouts/bds-grid/grid-item → actions/bds-list-menu/bds-list-menu}/types/types.js +0 -0
- /package/dist/collection/components/{layouts/bds-grid/grid-item/types/IGridItem.js → forms/bds-checkbox/bds-checkbox-button/types/ICheckboxButton.js} +0 -0
- /package/dist/collection/components/{layouts/bds-grid/grid/types/IGrid.js → forms/bds-checkbox/bds-checkbox-card/types/ICheckboxCard.js} +0 -0
- /package/dist/collection/components/{layouts/bds-grid/grid/types/types.js → forms/bds-checkbox/bds-checkbox-group/types/ICheckboxGroup.js} +0 -0
- /package/dist/collection/{types/IFormProps.js → components/forms/bds-checkbox/bds-checkbox-group/types/types.js} +0 -0
- /package/dist/collection/components/helpers/{types → bds-divider/types}/enum.js +0 -0
- /package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/bds-grid.css +0 -0
- /package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/types/enum.js +0 -0
- /package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/types/index.js +0 -0
- /package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/bds-grid-item.css +0 -0
- /package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/enum.js +0 -0
- /package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/index.js +0 -0
- /package/dist/types/components/helpers/{bds-divider.d.ts → bds-divider/bds-divider.d.ts} +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/IDivider.d.ts +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/enum.d.ts +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/types.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/bds-grid.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/IGrid.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/enum.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/index.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/types.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/bds-grid-item.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/IGridItem.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/enum.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/index.d.ts +0 -0
- /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/types.d.ts +0 -0
|
@@ -11,7 +11,6 @@ import { MixedInCtor } from '../stencil-public-runtime';
|
|
|
11
11
|
* - Computation of aria-selected and tabIndex attributes for accessibility.
|
|
12
12
|
* - A method to handle keyboard navigation (Arrow keys, Enter, Space) within the menu context.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
14
|
* @typeParam B - The base constructor type.
|
|
16
15
|
* @param {B} Base - The base component class to be extended.
|
|
17
16
|
* @returns {MenuBehaviorMixin} - A class with injected menu behaviors.
|
|
@@ -56,6 +55,11 @@ export declare const MenuItemBehavior: <B extends MixedInCtor>(Base: B) => {
|
|
|
56
55
|
disabled: boolean;
|
|
57
56
|
selected: boolean;
|
|
58
57
|
activeItem: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Finds the closest parent element with a role of 'menu' or 'listbox'.
|
|
60
|
+
* @returns {HTMLElement | null} - The parent menu or listbox element, or null if not found.
|
|
61
|
+
*/
|
|
62
|
+
readonly parent: HTMLElement | null;
|
|
59
63
|
/**
|
|
60
64
|
* Detects the ARIA role of the nearest parent menu or listbox.
|
|
61
65
|
* @returns {MenuRole | null} - 'menu', 'listbox', or null if not found.
|
|
@@ -3,4 +3,28 @@ export interface IFormValidator {
|
|
|
3
3
|
isValid: (el: HTMLElement) => boolean;
|
|
4
4
|
message: string;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Interface that define and centralize some props to the form components.
|
|
8
|
+
* In this way we standardize the props and avoid repetition.
|
|
9
|
+
* @public
|
|
10
|
+
* @interface IFormProps
|
|
11
|
+
* @augments {IFormProps}
|
|
12
|
+
* @property {string} name - Name of the form control, submitted as a key in the form data.
|
|
13
|
+
* @property {boolean} disabled - Disables the control. Defaults to `false`.
|
|
14
|
+
* @property {boolean} required - Marks the control as required for form submission. Defaults to `false`.
|
|
15
|
+
* @property {string} info - Tooltip content attached to the label. Rendered via `bds-typography` `tooltipText` prop.
|
|
16
|
+
* @property {boolean} error - When `true`, applies the error visual state.
|
|
17
|
+
* @property {string} errorMessage - Message shown below the input when `error` is `true`. Replaces `helperText`.
|
|
18
|
+
* @property {string} label - Label displayed next to the input. Defaults to `""`.
|
|
19
|
+
* @property {string} helperText - Help text displayed below the input. Defaults to `""`.
|
|
20
|
+
* @example
|
|
21
|
+
* export interface IToggle extends IFormProps {}
|
|
22
|
+
*/
|
|
23
|
+
export interface IFormProps {
|
|
24
|
+
info?: string;
|
|
25
|
+
error?: boolean;
|
|
26
|
+
errorMessage?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
helperText?: string;
|
|
29
|
+
}
|
|
6
30
|
//# sourceMappingURL=form.d.ts.map
|
|
@@ -3,7 +3,8 @@ export * from './form';
|
|
|
3
3
|
export * from './size';
|
|
4
4
|
export * from './states';
|
|
5
5
|
export * from './stylesMap';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './orientation';
|
|
7
7
|
export * from './menu';
|
|
8
8
|
export * from './links';
|
|
9
|
+
export * from './orientation';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export * from './attributes';
|
|
2
|
+
export * from './keyboard/_constants';
|
|
3
|
+
export * from './keyboard/types';
|
|
4
|
+
export { KeyboardController } from './keyboard/KeyboardController';
|
|
5
|
+
export { KEYBOARD, KEYBOARD_MODIFIERS } from '../constants';
|
|
2
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import type { KeyBindingHandler, KeyBindingOptions, LinearNavigationConfig, GridNavigationConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Manages keyboard interactions on a Stencil host element.
|
|
4
|
+
*
|
|
5
|
+
* Provides a **fluent API** to register key bindings and high-level navigation
|
|
6
|
+
* patterns following [ARIA APG](https://www.w3.org/WAI/ARIA/apg/) conventions.
|
|
7
|
+
* All event listeners are cleaned up automatically via a single `AbortController`
|
|
8
|
+
* — no manual `removeEventListener` is ever needed.
|
|
9
|
+
*
|
|
10
|
+
* ---
|
|
11
|
+
*
|
|
12
|
+
* ### Lifecycle
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* private readonly _keyboard = new KeyboardController();
|
|
16
|
+
*
|
|
17
|
+
* componentDidLoad() {
|
|
18
|
+
* this._keyboard.attach(this.el)
|
|
19
|
+
* .setLinearNavigation({ items: 'button', orientation: 'horizontal' });
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* disconnectedCallback() {
|
|
23
|
+
* this._keyboard.detach();
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* ---
|
|
28
|
+
*
|
|
29
|
+
* ### Key Binding API
|
|
30
|
+
*
|
|
31
|
+
* | Method | Description |
|
|
32
|
+
* |--------|-------------|
|
|
33
|
+
* | `set(key, handler, options?)` | Register a single key, chord, or array of independent keys |
|
|
34
|
+
* | `setActivateHandler(handler)` | Register `Enter` **and** `Space` with one call (ARIA activation pattern) |
|
|
35
|
+
* | `onFocusOut(handler)` | Register a `focusout` listener that auto-removes on `detach()` |
|
|
36
|
+
* | `remove(key)` | Unregister a binding at runtime |
|
|
37
|
+
*
|
|
38
|
+
* ---
|
|
39
|
+
*
|
|
40
|
+
* ### Navigation API
|
|
41
|
+
*
|
|
42
|
+
* | Method | Description |
|
|
43
|
+
* |--------|-------------|
|
|
44
|
+
* | `setLinearNavigation(config)` | Arrow keys + `Home`/`End` for flat list navigation |
|
|
45
|
+
* | `setGridNavigation(config)` | 2D arrow-key navigation for grids, calendars, and tables |
|
|
46
|
+
* | `rovingTabindex(items, index)` | Manually apply roving tabindex to a list |
|
|
47
|
+
* | `ariaActiveDescendant(items, index, options?)` | Manually apply `aria-activedescendant` to a list |
|
|
48
|
+
* | `applyFocus(items, index)` | Strategy-agnostic focus — delegates to whichever strategy was configured |
|
|
49
|
+
*/
|
|
50
|
+
export declare class KeyboardController {
|
|
51
|
+
private readonly _bindings;
|
|
52
|
+
private readonly _allowedKeys;
|
|
53
|
+
private readonly _pressedKeys;
|
|
54
|
+
private readonly _defaults;
|
|
55
|
+
private readonly _logger;
|
|
56
|
+
private _abortController;
|
|
57
|
+
private _root;
|
|
58
|
+
private _strategyType;
|
|
59
|
+
private _idPrefix;
|
|
60
|
+
/**
|
|
61
|
+
* @param defaults - Default options applied to every binding registered via `set()`.
|
|
62
|
+
* Defaults to `{ preventDefault: true }` to prevent browser scrolling on arrow keys.
|
|
63
|
+
*/
|
|
64
|
+
constructor(defaults?: KeyBindingOptions);
|
|
65
|
+
/**
|
|
66
|
+
* Attaches the controller to a host element and starts listening for `keydown`
|
|
67
|
+
* and `keyup` events. If already attached, detaches first.
|
|
68
|
+
*
|
|
69
|
+
* Call in `componentDidLoad()`. Supports method chaining.
|
|
70
|
+
*
|
|
71
|
+
* @param el - The Stencil host element (`this.el`) to attach to.
|
|
72
|
+
* @returns `this` for chaining additional configuration calls.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* componentDidLoad() {
|
|
77
|
+
* this._keyboard.attach(this.el).setLinearNavigation({ items: 'button' });
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
attach(el: HTMLElement): this;
|
|
82
|
+
/**
|
|
83
|
+
* Removes all event listeners registered by this controller and clears
|
|
84
|
+
* internal key-press state. Safe to call multiple times.
|
|
85
|
+
*
|
|
86
|
+
* Call in `disconnectedCallback()`.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* disconnectedCallback() {
|
|
91
|
+
* this._keyboard.detach();
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
detach(): void;
|
|
96
|
+
private _ensureAttached;
|
|
97
|
+
private _rebuildAllowedKeys;
|
|
98
|
+
private _dispatchKeyEvent;
|
|
99
|
+
private _matchesTrigger;
|
|
100
|
+
/**
|
|
101
|
+
* Registers a key binding. Supports single keys, chord combinations, and arrays
|
|
102
|
+
* of independent keys. Returns `this` for chaining.
|
|
103
|
+
*
|
|
104
|
+
* **Accepted `key` formats:**
|
|
105
|
+
*
|
|
106
|
+
* | Format | Example | Description |
|
|
107
|
+
* |--------|---------|-------------|
|
|
108
|
+
* | Single key | `KEYBOARD.Escape` | One key, no modifier |
|
|
109
|
+
* | Combination string | `'ctrl+pagedown'` | `+`-separated chord |
|
|
110
|
+
* | Chord array | `['meta', 'k']` | Same as combination string |
|
|
111
|
+
* | Independent keys | `[KEYBOARD.Enter, KEYBOARD.Space]` | Two separate bindings sharing one handler |
|
|
112
|
+
*
|
|
113
|
+
* @param key - Key expression: a single string, a `'+'`-separated chord, or an array of tokens.
|
|
114
|
+
* @param handler - Callback invoked when the key combination is triggered.
|
|
115
|
+
* @param options - Optional overrides for `preventDefault`, `stopPropagation`, `repeat`, and `triggers`.
|
|
116
|
+
* @returns `this` for chaining.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* this._keyboard
|
|
121
|
+
* .attach(this.el)
|
|
122
|
+
* .set(KEYBOARD.Escape, () => this.close())
|
|
123
|
+
* .set('ctrl+k', () => this.openSearch(), { stopPropagation: true })
|
|
124
|
+
* .set([KEYBOARD.Enter, KEYBOARD.Space], () => this.activate());
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
set(key: string | string[], handler: KeyBindingHandler, options?: KeyBindingOptions): this;
|
|
128
|
+
/**
|
|
129
|
+
* Registers the same handler for `Enter` **and** `Space` in a single call.
|
|
130
|
+
*
|
|
131
|
+
* This follows the [ARIA widget activation pattern](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/)
|
|
132
|
+
* where both keys are expected to activate an interactive element.
|
|
133
|
+
*
|
|
134
|
+
* @param handler - Callback invoked on `Enter` or `Space` keydown.
|
|
135
|
+
* @param options - Optional overrides forwarded to the underlying `set()` calls.
|
|
136
|
+
* @returns `this` for chaining.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```ts
|
|
140
|
+
* this._keyboard.attach(this.el).setActivateHandler(() => this.toggle());
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
setActivateHandler(handler: KeyBindingHandler, options?: KeyBindingOptions): this;
|
|
144
|
+
/**
|
|
145
|
+
* Registers a `focusout` listener on the attached root element.
|
|
146
|
+
*
|
|
147
|
+
* Unlike `blur`, `focusout` bubbles — it fires when focus leaves **any descendant**,
|
|
148
|
+
* not just the root itself. The listener is removed automatically when `detach()` is called.
|
|
149
|
+
*
|
|
150
|
+
* @param handler - Callback invoked when focus leaves the component subtree.
|
|
151
|
+
* @returns `this` for chaining.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* this._keyboard.attach(this.el).onFocusOut(() => this.closeDropdown());
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
onFocusOut(handler: (event: FocusEvent) => void): this;
|
|
159
|
+
/**
|
|
160
|
+
* Applies the **roving tabindex** focus technique to a list of elements.
|
|
161
|
+
*
|
|
162
|
+
* Sets `tabindex="-1"` on all items and `tabindex="0"` + `.focus()` on the
|
|
163
|
+
* item at `activeIndex`. The browser's native Tab key then cycles only through
|
|
164
|
+
* the single active item, keeping focus contained in the widget.
|
|
165
|
+
*
|
|
166
|
+
* `activeIndex` is clamped to `[0, items.length - 1]`.
|
|
167
|
+
*
|
|
168
|
+
* @param items - The full list of navigable elements.
|
|
169
|
+
* @param activeIndex - Index of the element that should receive focus.
|
|
170
|
+
* @returns `this` for chaining.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```ts
|
|
174
|
+
* // Manually jump to the last item
|
|
175
|
+
* this._keyboard.rovingTabindex(buttons, buttons.length - 1);
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
rovingTabindex(items: HTMLElement[], activeIndex: number): this;
|
|
179
|
+
/**
|
|
180
|
+
* Applies the **`aria-activedescendant`** focus technique to a list of elements.
|
|
181
|
+
*
|
|
182
|
+
* DOM focus stays on the container at all times. Navigation updates the
|
|
183
|
+
* container's `aria-activedescendant` attribute to point to the active item's `id`.
|
|
184
|
+
* Item `id`s are auto-generated using `idPrefix` when missing.
|
|
185
|
+
*
|
|
186
|
+
* `activeIndex` is clamped to `[0, items.length - 1]`.
|
|
187
|
+
*
|
|
188
|
+
* @param items - The full list of navigable option/grid-cell elements.
|
|
189
|
+
* @param activeIndex - Index of the logically active item.
|
|
190
|
+
* @param options.idPrefix - Prefix used to generate missing item `id`s. Defaults to `'bds-nav-item'`.
|
|
191
|
+
* @param options.container - The element that receives `aria-activedescendant`. Defaults to the attached root.
|
|
192
|
+
* @returns `this` for chaining.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```ts
|
|
196
|
+
* this._keyboard.ariaActiveDescendant(options, 2, { idPrefix: 'my-option' });
|
|
197
|
+
* // -> container.setAttribute('aria-activedescendant', 'my-option-2')
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
ariaActiveDescendant(items: HTMLElement[], activeIndex: number, options?: {
|
|
201
|
+
idPrefix?: string;
|
|
202
|
+
container?: HTMLElement;
|
|
203
|
+
}): this;
|
|
204
|
+
/**
|
|
205
|
+
* Moves focus to `items[activeIndex]` using whichever strategy was configured
|
|
206
|
+
* by the last `setLinearNavigation()` or `setGridNavigation()` call
|
|
207
|
+
* (`roving-tabindex` or `aria-activedescendant`).
|
|
208
|
+
*
|
|
209
|
+
* Use this inside `onNavigate` callbacks to stay strategy-agnostic — the component
|
|
210
|
+
* does not need to know which strategy is active.
|
|
211
|
+
*
|
|
212
|
+
* @param items - The full list of navigable elements.
|
|
213
|
+
* @param activeIndex - Index of the element that should become active.
|
|
214
|
+
* @returns `this` for chaining.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* setLinearNavigation({
|
|
219
|
+
* items: () => this.radioElements,
|
|
220
|
+
* onNavigate: (nextIndex, items) => {
|
|
221
|
+
* this.value = (items[nextIndex] as HTMLBdsRadioElement).value;
|
|
222
|
+
* this._keyboard.applyFocus(items, nextIndex); // works regardless of focus strategy
|
|
223
|
+
* },
|
|
224
|
+
* });
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
applyFocus(items: HTMLElement[], activeIndex: number): this;
|
|
228
|
+
/**
|
|
229
|
+
* Registers arrow-key (`ArrowLeft`, `ArrowRight`, `ArrowUp`, `ArrowDown`),
|
|
230
|
+
* `Home`, and `End` bindings for flat list navigation following the
|
|
231
|
+
* [ARIA Composite Widget pattern](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_general_within).
|
|
232
|
+
*
|
|
233
|
+
* Arrow keys support auto-repeat (throttled to ~10 steps/second by default).
|
|
234
|
+
* Focus strategy (`roving-tabindex` or `aria-activedescendant`) is resolved
|
|
235
|
+
* from `config.focusStrategy` and stored for use by `applyFocus()`.
|
|
236
|
+
*
|
|
237
|
+
* @param config - Navigation options. See {@link LinearNavigationConfig} for all fields.
|
|
238
|
+
* @returns `this` for chaining.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```ts
|
|
242
|
+
* // Toolbar: horizontal arrows, roving tabindex, Enter/Space clicks
|
|
243
|
+
* this._keyboard.attach(this.el).setLinearNavigation({
|
|
244
|
+
* items: 'button:not([disabled])',
|
|
245
|
+
* orientation: 'horizontal',
|
|
246
|
+
* onActivate: () => (document.activeElement as HTMLElement)?.click(),
|
|
247
|
+
* });
|
|
248
|
+
*
|
|
249
|
+
* // Radio group: all arrows, wrap, selection changes on navigate
|
|
250
|
+
* this._keyboard.attach(this.el).setLinearNavigation({
|
|
251
|
+
* items: () => this.radioElements.filter(el => !el.disabled) as HTMLElement[],
|
|
252
|
+
* orientation: 'both',
|
|
253
|
+
* wrap: true,
|
|
254
|
+
* initialActiveSelector: '[checked]',
|
|
255
|
+
* onNavigate: (nextIndex, items) => {
|
|
256
|
+
* this.value = (items[nextIndex] as HTMLBdsRadioElement).value;
|
|
257
|
+
* this._keyboard.applyFocus(items, nextIndex);
|
|
258
|
+
* },
|
|
259
|
+
* });
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
setLinearNavigation(config: LinearNavigationConfig): this;
|
|
263
|
+
/**
|
|
264
|
+
* Registers 2D arrow-key navigation for grids, calendars, and data tables following the
|
|
265
|
+
* [ARIA Grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
|
|
266
|
+
*
|
|
267
|
+
* Registered bindings:
|
|
268
|
+
* - `ArrowLeft / ArrowRight` — move one column left/right
|
|
269
|
+
* - `ArrowUp / ArrowDown` — move one row up/down
|
|
270
|
+
* - `Home / End` — first/last cell in current row
|
|
271
|
+
* - `Ctrl+Home / Ctrl+End` — first/last cell in the entire grid
|
|
272
|
+
* - `PageUp / PageDown` — delegated to `config.onPageUp` / `config.onPageDown` (optional)
|
|
273
|
+
* - `Enter / Space` — delegated to `config.onActivate` (optional)
|
|
274
|
+
*
|
|
275
|
+
* Items are provided as a `HTMLElement[][]` (rows × columns). `null`/`undefined`
|
|
276
|
+
* cells are skipped. The list is re-evaluated on every keydown.
|
|
277
|
+
*
|
|
278
|
+
* @param config - Navigation options. See {@link GridNavigationConfig} for all fields.
|
|
279
|
+
* @returns `this` for chaining.
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```ts
|
|
283
|
+
* // Data table: 2D navigation, Enter selects a cell
|
|
284
|
+
* this._keyboard.attach(this.el).setGridNavigation({
|
|
285
|
+
* items: () => this._getRowsOfCells(),
|
|
286
|
+
* wrap: false,
|
|
287
|
+
* onActivate: () => this._selectFocusedCell(),
|
|
288
|
+
* });
|
|
289
|
+
*
|
|
290
|
+
* // Calendar: grid navigation + PageUp/Down to change months
|
|
291
|
+
* this._keyboard.attach(this.el).setGridNavigation({
|
|
292
|
+
* items: () => this.weekRows.map(row => row.map(day => day.buttonEl)),
|
|
293
|
+
* wrap: true,
|
|
294
|
+
* initialActiveSelector: '[data-today]',
|
|
295
|
+
* onActivate: () => this.selectFocusedDay(),
|
|
296
|
+
* onPageUp: () => this.prevMonth(),
|
|
297
|
+
* onPageDown: () => this.nextMonth(),
|
|
298
|
+
* });
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
setGridNavigation(config: GridNavigationConfig): this;
|
|
302
|
+
/**
|
|
303
|
+
* Removes a previously registered binding so it no longer fires.
|
|
304
|
+
*
|
|
305
|
+
* Pass the same key expression that was used in `set()`. Useful for dynamically
|
|
306
|
+
* enabling or disabling shortcuts (e.g. disabling `Escape` while a sub-modal is open).
|
|
307
|
+
*
|
|
308
|
+
* @param key - The key expression to unregister (same format accepted by `set()`).
|
|
309
|
+
* @returns `this` for chaining.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* // Disable Escape while a confirmation dialog is open
|
|
314
|
+
* this._keyboard.remove(KEYBOARD.Escape);
|
|
315
|
+
* // Re-enable it after the dialog closes
|
|
316
|
+
* this._keyboard.set(KEYBOARD.Escape, () => this.close());
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
remove(key: string | string[]): this;
|
|
320
|
+
}
|
|
321
|
+
//# sourceMappingURL=KeyboardController.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event type constants for key bindings.
|
|
3
|
+
* Use instead of hard-coded `'keydown'` / `'keyup'` strings.
|
|
4
|
+
*/
|
|
5
|
+
export declare const KEY_TRIGGERS: {
|
|
6
|
+
readonly KEYDOWN: "keydown";
|
|
7
|
+
readonly KEYUP: "keyup";
|
|
8
|
+
};
|
|
9
|
+
export declare const KEYBOARD_ORIENTATIONS: {
|
|
10
|
+
readonly BOTH: "both";
|
|
11
|
+
readonly HORIZONTAL: "horizontal";
|
|
12
|
+
readonly VERTICAL: "vertical";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Focus management technique identifiers for `KeyboardController`.
|
|
16
|
+
* Use these constants instead of raw string literals when setting or comparing
|
|
17
|
+
* the focus strategy type.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FOCUS_STRATEGY: {
|
|
20
|
+
readonly ROVING_TABINDEX: "roving-tabindex";
|
|
21
|
+
readonly ARIA_ACTIVE_DESCENDANT: "aria-activedescendant";
|
|
22
|
+
};
|
|
23
|
+
export declare const NAV_BOUNDARY: {
|
|
24
|
+
readonly FIRST: "first";
|
|
25
|
+
readonly LAST: "last";
|
|
26
|
+
};
|
|
27
|
+
export type NavBoundary = (typeof NAV_BOUNDARY)[keyof typeof NAV_BOUNDARY];
|
|
28
|
+
//# sourceMappingURL=_constants.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GridNavigationItems } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures every item in the list has an `id` attribute.
|
|
4
|
+
* Auto-generates one with a unique suffix when an item lacks it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ensureItemIds(items: HTMLElement[], prefix: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Applies the **aria-activedescendant** technique to a flat list:
|
|
9
|
+
* - Ensures all items have `id` attributes.
|
|
10
|
+
* - Sets `tabindex="-1"` on every item (container holds focus).
|
|
11
|
+
* - Updates `aria-activedescendant` on `container` to point to the active item.
|
|
12
|
+
* - Scrolls the active item into view.
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyAriaActiveDescendant(items: HTMLElement[], activeIndex: number, container: HTMLElement, idPrefix: string): void;
|
|
15
|
+
/** Applies aria-activedescendant to a 2D grid container. */
|
|
16
|
+
export declare function applyGridAriaActiveDescendant(items: GridNavigationItems, row: number, col: number, container: HTMLElement, idPrefix: string): void;
|
|
17
|
+
//# sourceMappingURL=aria-activedescendant.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GridNavigationItems, FocusStrategyType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the index of the currently active item for the given strategy type.
|
|
4
|
+
*
|
|
5
|
+
* - `'roving-tabindex'`: reads from `document.activeElement`.
|
|
6
|
+
* - `'aria-activedescendant'`: reads `aria-activedescendant` from the container.
|
|
7
|
+
*
|
|
8
|
+
* Returns `-1` when nothing is active yet.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveCurrentIndex(items: HTMLElement[], strategyType: FocusStrategyType, container: HTMLElement | null): number;
|
|
11
|
+
/**
|
|
12
|
+
* Resolves the `(row, col)` coordinates of the currently active grid cell.
|
|
13
|
+
*
|
|
14
|
+
* - `'roving-tabindex'`: matches against `document.activeElement`.
|
|
15
|
+
* - `'aria-activedescendant'`: reads `aria-activedescendant` from the container.
|
|
16
|
+
*
|
|
17
|
+
* Returns `{ row: -1, col: -1 }` when nothing is active yet.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveGridCurrentPos(items: GridNavigationItems, strategyType: FocusStrategyType, container: HTMLElement | null): {
|
|
20
|
+
row: number;
|
|
21
|
+
col: number;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { GridNavigationItems } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Applies the **roving tabindex** technique with real DOM focus.
|
|
4
|
+
*
|
|
5
|
+
* Order matters for key-repeat: set `tabindex="0"` and call `.focus()` on the
|
|
6
|
+
* new item first, then demote the previous item. This ensures focus is never
|
|
7
|
+
* momentarily absent between steps.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyRovingTabindex(items: HTMLElement[], activeIndex: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* Initializes the **roving tabindex** technique without stealing focus.
|
|
12
|
+
* Only sets tabindex attributes; use during component initialization to
|
|
13
|
+
* avoid moving DOM focus away from the previously focused element.
|
|
14
|
+
*/
|
|
15
|
+
export declare function initRovingTabindex(items: HTMLElement[], activeIndex: number): void;
|
|
16
|
+
/** Applies roving tabindex to a 2D grid. Moves real DOM focus to `(row, col)`. */
|
|
17
|
+
export declare function applyGridRovingTabindex(items: GridNavigationItems, row: number, col: number): void;
|
|
18
|
+
/** Sets tabindex attributes on a 2D grid without stealing focus; use during initialization. */
|
|
19
|
+
export declare function initGridRovingTabindex(items: GridNavigationItems, row: number, col: number): void;
|
|
20
|
+
//# sourceMappingURL=roving-tabindex.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GridNavigationConfig, KeyBindingHandler, KeyBindingOptions, FocusStrategyType } from '../types';
|
|
2
|
+
export interface GridNavigationAccess {
|
|
3
|
+
root: HTMLElement | null;
|
|
4
|
+
abortController: AbortController | null;
|
|
5
|
+
register(key: string | string[], handler: KeyBindingHandler, options?: KeyBindingOptions): void;
|
|
6
|
+
onStrategyResolved(type: FocusStrategyType, prefix: string): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function setupGridNavigation(config: GridNavigationConfig, ctrl: GridNavigationAccess): void;
|
|
9
|
+
//# sourceMappingURL=grid-navigation.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LinearNavigationConfig, KeyBindingHandler, KeyBindingOptions, FocusStrategyType } from '../types';
|
|
2
|
+
export interface LinearNavigationAccess {
|
|
3
|
+
root: HTMLElement | null;
|
|
4
|
+
abortController: AbortController | null;
|
|
5
|
+
register(key: string | string[], handler: KeyBindingHandler, options?: KeyBindingOptions): void;
|
|
6
|
+
onStrategyResolved(type: FocusStrategyType, prefix: string): void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Registers all key bindings for linear list navigation on the given controller.
|
|
10
|
+
* Called internally by `KeyboardController.setLinearNavigation`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setupLinearNavigation(config: LinearNavigationConfig, ctrl: LinearNavigationAccess): void;
|
|
13
|
+
//# sourceMappingURL=linear-navigation.d.ts.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { KEYBOARD } from "../../../constants/index";
|
|
2
|
+
import type { KeyBindingHandler, KeyBindingTrigger, KeyboardOrientation, FocusStrategyType } from './types';
|
|
3
|
+
export type GridNavigationItems = Array<Array<HTMLElement | null | undefined>>;
|
|
4
|
+
/**
|
|
5
|
+
* Focus management technique used during linear/grid navigation.
|
|
6
|
+
*
|
|
7
|
+
* ### `roving-tabindex` (default)
|
|
8
|
+
* Moves real DOM focus between items. Sets `tabindex="0"` on the active item
|
|
9
|
+
* and `tabindex="-1"` on the rest. Use `:focus-visible` for active styling.
|
|
10
|
+
* Ideal for: toolbars, tab lists, radio groups, button groups.
|
|
11
|
+
*
|
|
12
|
+
* ### `aria-activedescendant`
|
|
13
|
+
* The **container** keeps DOM focus at all times. Navigation updates
|
|
14
|
+
* `aria-activedescendant` on the container to point to the active item's `id`.
|
|
15
|
+
* Item `id`s are auto-generated using `idPrefix` when missing.
|
|
16
|
+
* Use `onItemActive` in `setLinearNavigation` to apply custom active styling.
|
|
17
|
+
* Ideal for: listboxes, comboboxes, grids with many rows.
|
|
18
|
+
*/
|
|
19
|
+
export type FocusStrategy = {
|
|
20
|
+
type: Extract<FocusStrategyType, 'roving-tabindex'>;
|
|
21
|
+
} | {
|
|
22
|
+
type: Extract<FocusStrategyType, 'aria-activedescendant'>;
|
|
23
|
+
idPrefix?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Configuration object for {@link KeyboardController.setLinearNavigation}.
|
|
27
|
+
*/
|
|
28
|
+
export interface LinearNavigationConfig {
|
|
29
|
+
/**
|
|
30
|
+
* Navigable items - either a CSS selector string or a function returning elements.
|
|
31
|
+
*
|
|
32
|
+
* - **String**: evaluated as `querySelectorAll` against the attached root on every keydown.
|
|
33
|
+
* - **Function**: called lazily on every keydown - safe to query the DOM each time.
|
|
34
|
+
*/
|
|
35
|
+
items: string | (() => HTMLElement[]);
|
|
36
|
+
/**
|
|
37
|
+
* Which arrow keys drive navigation.
|
|
38
|
+
* - `'horizontal'`: ArrowLeft / ArrowRight
|
|
39
|
+
* - `'vertical'`: ArrowUp / ArrowDown
|
|
40
|
+
* - `'both'`: all four arrow keys (default)
|
|
41
|
+
*/
|
|
42
|
+
orientation?: KeyboardOrientation;
|
|
43
|
+
/** Whether navigation wraps around at the boundaries. Defaults to `true`. */
|
|
44
|
+
wrap?: boolean;
|
|
45
|
+
/** Focus management technique. Defaults to `{ type: 'roving-tabindex' }`. */
|
|
46
|
+
focusStrategy?: FocusStrategy;
|
|
47
|
+
/**
|
|
48
|
+
* CSS selector evaluated against the navigable items to find the initially
|
|
49
|
+
* active one on first render. Applies to both focus strategies.
|
|
50
|
+
* Falls back to the first item (roving-tabindex) or nothing (aria-activedescendant).
|
|
51
|
+
*/
|
|
52
|
+
initialActiveSelector?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Called with `(nextIndex, items)` instead of the default focus behaviour.
|
|
55
|
+
* Use when navigation must also update component state.
|
|
56
|
+
*/
|
|
57
|
+
onNavigate?: (nextIndex: number, items: HTMLElement[]) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Called whenever an item becomes active. **Only used with `aria-activedescendant`.**
|
|
60
|
+
* `prevItem` is `null` during initialization.
|
|
61
|
+
*/
|
|
62
|
+
onItemActive?: (activeItem: HTMLElement, prevItem: HTMLElement | null) => void;
|
|
63
|
+
/** Called when the user activates the focused item (Enter / Space by default). */
|
|
64
|
+
onActivate?: KeyBindingHandler;
|
|
65
|
+
/** Which keys trigger `onActivate`. Defaults to `[KEYBOARD.Enter, KEYBOARD.Space]`. */
|
|
66
|
+
activateKeys?: Array<typeof KEYBOARD.Enter | typeof KEYBOARD.Space>;
|
|
67
|
+
/**
|
|
68
|
+
* Minimum milliseconds between navigation steps when an arrow key is held.
|
|
69
|
+
* Prevents navigation from running at the full browser key-repeat rate (~50 ms).
|
|
70
|
+
* Defaults to `100` ms (~10 items/second). Set to `0` to disable throttling.
|
|
71
|
+
*/
|
|
72
|
+
repeatThrottleMs?: number;
|
|
73
|
+
/** Registered for Escape. */
|
|
74
|
+
onEscape?: KeyBindingHandler;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Configuration object for {@link KeyboardController.setGridNavigation}.
|
|
78
|
+
*/
|
|
79
|
+
export interface GridNavigationConfig {
|
|
80
|
+
/**
|
|
81
|
+
* Items as a 2D array `[row][col]` or a function returning one.
|
|
82
|
+
* `null` / `undefined` cells are skipped. Re-evaluated on every keydown.
|
|
83
|
+
*/
|
|
84
|
+
items: GridNavigationItems | (() => GridNavigationItems);
|
|
85
|
+
/**
|
|
86
|
+
* Whether horizontal arrow keys wrap from the last column of a row to the
|
|
87
|
+
* first column of the next row (and vice versa). Defaults to `false`.
|
|
88
|
+
*/
|
|
89
|
+
wrap?: boolean;
|
|
90
|
+
/** Focus management technique. Defaults to `{ type: 'roving-tabindex' }`. */
|
|
91
|
+
focusStrategy?: FocusStrategy;
|
|
92
|
+
/**
|
|
93
|
+
* CSS selector evaluated against grid cells to find the initially active one.
|
|
94
|
+
* Falls back to the first available cell.
|
|
95
|
+
*/
|
|
96
|
+
initialActiveSelector?: string;
|
|
97
|
+
/** Called with `(row, col, items)` instead of the default focus behavior. */
|
|
98
|
+
onNavigate?: (row: number, col: number, items: GridNavigationItems) => void;
|
|
99
|
+
/** Called when the user activates the focused cell (Enter / Space by default). */
|
|
100
|
+
onActivate?: KeyBindingHandler;
|
|
101
|
+
/** Which keys trigger `onActivate`. Defaults to `[KEYBOARD.Enter, KEYBOARD.Space]`. */
|
|
102
|
+
activateKeys?: Array<typeof KEYBOARD.Enter | typeof KEYBOARD.Space>;
|
|
103
|
+
/** Called on `PageUp` - e.g. navigate to the previous month in a calendar. */
|
|
104
|
+
onPageUp?: KeyBindingHandler;
|
|
105
|
+
/** Called on `PageDown` - e.g. navigate to the next month in a calendar. */
|
|
106
|
+
onPageDown?: KeyBindingHandler;
|
|
107
|
+
/** Registered for Escape. */
|
|
108
|
+
onEscape?: KeyBindingHandler;
|
|
109
|
+
/**
|
|
110
|
+
* Minimum milliseconds between navigation steps when an arrow key is held.
|
|
111
|
+
* Defaults to `100` ms (~10 cells/second). Set to `0` to disable throttling.
|
|
112
|
+
*/
|
|
113
|
+
repeatThrottleMs?: number;
|
|
114
|
+
}
|
|
115
|
+
export interface KeyBindingOptions {
|
|
116
|
+
/** Event type(s) that trigger the handler. Defaults to `['keydown']`. */
|
|
117
|
+
triggers?: KeyBindingTrigger[];
|
|
118
|
+
/** Whether the handler fires on auto-repeated keydown events. Defaults to `false`. */
|
|
119
|
+
repeat?: boolean;
|
|
120
|
+
/** Call `event.preventDefault()` before invoking the handler. Defaults to `true`. */
|
|
121
|
+
preventDefault?: boolean;
|
|
122
|
+
/** Call `event.stopPropagation()` before invoking the handler. Defaults to `false`. */
|
|
123
|
+
stopPropagation?: boolean;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=IKeyboardController.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { KEY_TRIGGERS, KEYBOARD_ORIENTATIONS, FOCUS_STRATEGY } from '../_constants';
|
|
2
|
+
export type KeyBindingHandler = (event: KeyboardEvent) => void;
|
|
3
|
+
export type KeyBindingTrigger = (typeof KEY_TRIGGERS)[keyof typeof KEY_TRIGGERS];
|
|
4
|
+
export type KeyboardOrientation = (typeof KEYBOARD_ORIENTATIONS)[keyof typeof KEYBOARD_ORIENTATIONS];
|
|
5
|
+
export type FocusStrategyType = (typeof FOCUS_STRATEGY)[keyof typeof FOCUS_STRATEGY];
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|