@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.
Files changed (571) hide show
  1. package/components-build/bds-avatar.js +1 -1
  2. package/components-build/bds-badge.js +1 -1
  3. package/components-build/bds-banner.js +1 -1
  4. package/components-build/bds-breadcrumb-item.d.ts +11 -0
  5. package/components-build/bds-breadcrumb-item.js +1 -0
  6. package/components-build/bds-breadcrumb.d.ts +11 -0
  7. package/components-build/bds-breadcrumb.js +1 -0
  8. package/components-build/bds-button-group.d.ts +11 -0
  9. package/components-build/bds-button-group.js +1 -0
  10. package/components-build/bds-button.js +1 -1
  11. package/components-build/bds-checkbox-button.d.ts +11 -0
  12. package/components-build/bds-checkbox-button.js +1 -0
  13. package/components-build/bds-checkbox-card.d.ts +11 -0
  14. package/components-build/bds-checkbox-card.js +1 -0
  15. package/components-build/bds-checkbox-group.d.ts +11 -0
  16. package/components-build/bds-checkbox-group.js +1 -0
  17. package/components-build/bds-checkbox.js +1 -1
  18. package/components-build/bds-dialog.js +1 -1
  19. package/components-build/bds-divider.js +1 -1
  20. package/components-build/bds-flag.js +1 -1
  21. package/components-build/bds-grid-item.js +1 -1
  22. package/components-build/bds-grid.js +1 -1
  23. package/components-build/bds-list-menu-item.js +1 -1
  24. package/components-build/bds-list-menu.js +1 -1
  25. package/components-build/bds-popover.js +1 -1
  26. package/components-build/bds-radio-button.d.ts +11 -0
  27. package/components-build/bds-radio-button.js +1 -0
  28. package/components-build/bds-radio-card.d.ts +11 -0
  29. package/components-build/bds-radio-card.js +1 -0
  30. package/components-build/bds-radio-group.d.ts +11 -0
  31. package/components-build/bds-radio-group.js +1 -0
  32. package/components-build/bds-radio.d.ts +11 -0
  33. package/components-build/bds-radio.js +1 -0
  34. package/components-build/bds-select.d.ts +11 -0
  35. package/components-build/bds-select.js +1 -0
  36. package/components-build/bds-slider.d.ts +11 -0
  37. package/components-build/bds-slider.js +1 -0
  38. package/components-build/bds-spinner.js +1 -1
  39. package/components-build/bds-status.js +1 -1
  40. package/components-build/bds-tag.js +1 -1
  41. package/components-build/bds-text-field.js +1 -1
  42. package/components-build/bds-toggle.js +1 -1
  43. package/components-build/bds-tooltip.js +1 -1
  44. package/components-build/bds-typography.js +1 -1
  45. package/components-build/index.js +1 -1
  46. package/components-build/p-B6e9eIHB.js +1 -0
  47. package/components-build/p-CJBdGD_4.js +1 -0
  48. package/components-build/p-CPvuMm5C.js +1 -0
  49. package/components-build/p-DcR7mHFE.js +1 -0
  50. package/components-build/p-DdOPD9wW.js +1 -0
  51. package/components-build/p-DfaYciGa.js +1 -0
  52. package/components-build/p-Dh8DSJs_.js +1 -0
  53. package/components-build/p-DoNZM78n.js +1 -0
  54. package/components-build/p-DrkDx75U.js +1 -0
  55. package/components-build/p-DuBzr05c.js +1 -0
  56. package/components-build/p-PmjPRW8X.js +1 -0
  57. package/components-build/p-cgdh1LO-.js +1 -0
  58. package/{dist/boreal-web-components/p-CaHOghy5.js → components-build/p-fUK0GCeC.js} +1 -1
  59. package/components-build/p-nxYzL9uu.js +1 -0
  60. package/components-build/p-yLNcMg2E.js +1 -0
  61. package/custom-elements.json +5078 -1524
  62. package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
  63. package/dist/boreal-web-components/css/boreal.css +60 -0
  64. package/dist/boreal-web-components/css/theme-connect.css +15 -0
  65. package/dist/boreal-web-components/css/theme-engage.css +15 -0
  66. package/dist/boreal-web-components/css/theme-protect.css +15 -0
  67. package/dist/boreal-web-components/css/theme-proximus.css +15 -0
  68. package/dist/boreal-web-components/p-02e53626.entry.js +1 -0
  69. package/dist/boreal-web-components/p-0357450d.system.entry.js +1 -0
  70. package/dist/boreal-web-components/{p-e0bf8a6e.entry.js → p-1250ba53.entry.js} +1 -1
  71. package/dist/boreal-web-components/p-1911b978.entry.js +1 -0
  72. package/dist/boreal-web-components/{p-2158a7cd.entry.js → p-19f9352d.entry.js} +1 -1
  73. package/dist/boreal-web-components/p-1mOd23lT.system.js +1 -0
  74. package/dist/boreal-web-components/{p-52600375.system.entry.js → p-25823f7d.system.entry.js} +1 -1
  75. package/dist/boreal-web-components/p-2db71382.system.entry.js +1 -0
  76. package/dist/boreal-web-components/{p-251d35df.system.entry.js → p-365e8e5c.system.entry.js} +1 -1
  77. package/dist/boreal-web-components/p-367e40f9.entry.js +1 -0
  78. package/dist/boreal-web-components/p-3946d587.entry.js +1 -0
  79. package/dist/boreal-web-components/p-44b6fe6c.system.entry.js +1 -0
  80. package/dist/boreal-web-components/{p-7a4efddd.system.entry.js → p-48712a63.system.entry.js} +1 -1
  81. package/dist/boreal-web-components/{p-251b3002.entry.js → p-49ea207a.entry.js} +1 -1
  82. package/dist/boreal-web-components/p-4b028406.entry.js +1 -0
  83. package/dist/boreal-web-components/p-4b615de8.system.entry.js +1 -0
  84. package/dist/boreal-web-components/{p-edca16b6.system.entry.js → p-4f431941.system.entry.js} +1 -1
  85. package/dist/boreal-web-components/p-524421f7.system.entry.js +1 -0
  86. package/dist/boreal-web-components/p-530c8c7f.entry.js +1 -0
  87. package/dist/boreal-web-components/p-55aeff0c.system.entry.js +1 -0
  88. package/dist/boreal-web-components/p-5c8650b3.system.entry.js +1 -0
  89. package/dist/boreal-web-components/p-5e590291.system.entry.js +1 -0
  90. package/dist/boreal-web-components/p-5ee0841f.entry.js +1 -0
  91. package/dist/boreal-web-components/{p-871c9a9f.system.entry.js → p-65923619.system.entry.js} +1 -1
  92. package/dist/boreal-web-components/p-66ec16d9.entry.js +1 -0
  93. package/dist/boreal-web-components/{p-127a4134.entry.js → p-714bf70d.entry.js} +1 -1
  94. package/dist/boreal-web-components/{p-66360e63.entry.js → p-71ed1e1d.entry.js} +1 -1
  95. package/dist/boreal-web-components/{p-b12d4788.system.entry.js → p-732e98f1.system.entry.js} +1 -1
  96. package/dist/boreal-web-components/p-7626338e.system.entry.js +1 -0
  97. package/dist/boreal-web-components/{p-80822731.system.entry.js → p-77658a5b.system.entry.js} +1 -1
  98. package/dist/boreal-web-components/p-7G4h4DI7.js +1 -0
  99. package/dist/boreal-web-components/p-800fc096.system.entry.js +1 -0
  100. package/dist/boreal-web-components/p-824485ad.entry.js +1 -0
  101. package/dist/boreal-web-components/p-8dfe3a9f.entry.js +1 -0
  102. package/dist/boreal-web-components/p-90022071.entry.js +1 -0
  103. package/dist/boreal-web-components/{p-1d1bb9d2.entry.js → p-9d02057d.entry.js} +1 -1
  104. package/dist/boreal-web-components/p-C-g3hhl_.system.js +1 -0
  105. package/dist/boreal-web-components/p-C0P3gzq5.system.js +1 -0
  106. package/dist/boreal-web-components/p-C4HM8wQe.js +1 -0
  107. package/dist/boreal-web-components/p-CPvuMm5C.js +1 -0
  108. package/dist/boreal-web-components/p-CRMH6mfq.system.js +1 -0
  109. package/dist/boreal-web-components/p-CU_dRLdk.system.js +1 -0
  110. package/dist/boreal-web-components/p-CW4-dkCF.system.js +1 -0
  111. package/dist/boreal-web-components/p-CcENtewr.js +1 -0
  112. package/dist/boreal-web-components/{p-BuxZeJbu.system.js → p-DSU8tkVw.system.js} +1 -1
  113. package/dist/boreal-web-components/p-DfaYciGa.js +1 -0
  114. package/dist/boreal-web-components/p-Dk9dfU9-.system.js +1 -0
  115. package/dist/boreal-web-components/p-DlVzZK7o.js +1 -0
  116. package/dist/boreal-web-components/p-DnIhjwCH.system.js +1 -0
  117. package/dist/boreal-web-components/p-Dwo1hcd9.js +1 -0
  118. package/dist/boreal-web-components/p-K7DvMlRo.system.js +1 -0
  119. package/{components-build/p-CaHOghy5.js → dist/boreal-web-components/p-U9yfbs7i.js} +1 -1
  120. package/dist/boreal-web-components/p-UEj9YHof.system.js +1 -0
  121. package/dist/boreal-web-components/p-b54fe67f.system.entry.js +1 -0
  122. package/dist/boreal-web-components/p-bbcd3a30.system.entry.js +1 -0
  123. package/dist/boreal-web-components/p-bea25d3d.system.entry.js +1 -0
  124. package/dist/boreal-web-components/p-bed506d3.entry.js +1 -0
  125. package/dist/boreal-web-components/p-bfd62034.system.entry.js +1 -0
  126. package/dist/boreal-web-components/p-c07d6b82.system.entry.js +1 -0
  127. package/dist/boreal-web-components/p-cc5c359f.entry.js +1 -0
  128. package/dist/boreal-web-components/p-cgdh1LO-.js +1 -0
  129. package/dist/boreal-web-components/p-d2b6ae79.entry.js +1 -0
  130. package/dist/boreal-web-components/{p-695d0830.entry.js → p-dc7d429c.entry.js} +1 -1
  131. package/dist/boreal-web-components/p-e21b8416.entry.js +1 -0
  132. package/dist/boreal-web-components/p-e4364a44.system.entry.js +1 -0
  133. package/dist/boreal-web-components/p-e51407b2.system.entry.js +1 -0
  134. package/dist/boreal-web-components/p-e8cde179.system.entry.js +1 -0
  135. package/dist/boreal-web-components/p-eecc3028.system.entry.js +1 -0
  136. package/dist/boreal-web-components/p-f3bd824d.system.entry.js +1 -0
  137. package/dist/boreal-web-components/{p-44ceff4e.system.entry.js → p-f65e9d0c.system.entry.js} +1 -1
  138. package/dist/boreal-web-components/p-f6eabb16.entry.js +1 -0
  139. package/dist/boreal-web-components/p-f7acf6e5.system.entry.js +1 -0
  140. package/dist/boreal-web-components/{p-7db870b7.entry.js → p-f9560509.entry.js} +1 -1
  141. package/dist/boreal-web-components/p-fa128cad.system.entry.js +1 -0
  142. package/dist/boreal-web-components/p-fab1a01d.entry.js +1 -0
  143. package/dist/boreal-web-components/{p-fc24d963.entry.js → p-fb9a0e94.entry.js} +1 -1
  144. package/dist/boreal-web-components/p-fb9ba833.entry.js +1 -0
  145. package/dist/boreal-web-components/p-fbe0c9f2.entry.js +1 -0
  146. package/dist/boreal-web-components/p-fbe88555.entry.js +1 -0
  147. package/dist/boreal-web-components/p-fc1fa966.system.entry.js +1 -0
  148. package/dist/boreal-web-components/p-fc4ffa0e.entry.js +1 -0
  149. package/dist/boreal-web-components/p-fef13445.entry.js +1 -0
  150. package/dist/boreal-web-components/p-iq2UuV7c.js +1 -0
  151. package/dist/boreal-web-components/p-qGhMe8Hk.js +1 -0
  152. package/dist/boreal-web-components/p-vzZJGcYF.system.js +1 -1
  153. package/dist/boreal-web-components/scss/maps/_theme-connect.scss +16 -1
  154. package/dist/boreal-web-components/scss/maps/_theme-engage.scss +16 -1
  155. package/dist/boreal-web-components/scss/maps/_theme-protect.scss +16 -1
  156. package/dist/boreal-web-components/scss/maps/_theme-proximus.scss +16 -1
  157. package/dist/boreal-web-components/scss/variables/_theme-connect.scss +16 -1
  158. package/dist/boreal-web-components/scss/variables/_theme-engage.scss +16 -1
  159. package/dist/boreal-web-components/scss/variables/_theme-protect.scss +16 -1
  160. package/dist/boreal-web-components/scss/variables/_theme-proximus.scss +16 -1
  161. package/dist/cjs/KeyboardController-B_g3peyB.js +1067 -0
  162. package/dist/cjs/Keys-DXn16dlA.js +34 -0
  163. package/dist/cjs/Logger-DnziItRH.js +51 -0
  164. package/dist/cjs/{attributes-wIHueigW.js → attributes-CgRFplrN.js} +3 -0
  165. package/dist/cjs/bds-avatar.cjs.entry.js +2 -2
  166. package/dist/cjs/bds-badge.cjs.entry.js +1 -1
  167. package/dist/cjs/bds-banner.cjs.entry.js +2 -2
  168. package/dist/cjs/bds-breadcrumb-item.cjs.entry.js +106 -0
  169. package/dist/cjs/bds-breadcrumb.cjs.entry.js +127 -0
  170. package/dist/cjs/bds-button-group.cjs.entry.js +116 -0
  171. package/dist/cjs/bds-button.cjs.entry.js +38 -17
  172. package/dist/cjs/bds-checkbox-button.cjs.entry.js +119 -0
  173. package/dist/cjs/bds-checkbox-card.cjs.entry.js +135 -0
  174. package/dist/cjs/bds-checkbox-group.cjs.entry.js +292 -0
  175. package/dist/cjs/bds-checkbox.cjs.entry.js +67 -29
  176. package/dist/cjs/bds-dialog.cjs.entry.js +4 -4
  177. package/dist/cjs/bds-divider.cjs.entry.js +2 -2
  178. package/dist/cjs/bds-flag.cjs.entry.js +1 -1
  179. package/dist/cjs/bds-grid-item.cjs.entry.js +1 -1
  180. package/dist/cjs/bds-grid.cjs.entry.js +1 -1
  181. package/dist/cjs/bds-list-menu-item.cjs.entry.js +59 -23
  182. package/dist/cjs/bds-list-menu.cjs.entry.js +126 -22
  183. package/dist/cjs/bds-popover.cjs.entry.js +15 -6
  184. package/dist/cjs/bds-radio-button.cjs.entry.js +60 -0
  185. package/dist/cjs/bds-radio-card.cjs.entry.js +76 -0
  186. package/dist/cjs/bds-radio-group.cjs.entry.js +291 -0
  187. package/dist/cjs/bds-radio.cjs.entry.js +60 -0
  188. package/dist/cjs/bds-select.cjs.entry.js +394 -0
  189. package/dist/cjs/bds-slider.cjs.entry.js +655 -0
  190. package/dist/cjs/bds-spinner.cjs.entry.js +1 -1
  191. package/dist/cjs/bds-status.cjs.entry.js +1 -1
  192. package/dist/cjs/bds-tag.cjs.entry.js +2 -2
  193. package/dist/cjs/bds-text-field.cjs.entry.js +15 -9
  194. package/dist/cjs/bds-toggle.cjs.entry.js +7 -6
  195. package/dist/cjs/bds-tooltip_2.cjs.entry.js +12 -9
  196. package/dist/cjs/boreal-web-components.cjs.js +1 -1
  197. package/dist/cjs/checkbox-form-association-DTEpHXUD.js +43 -0
  198. package/dist/cjs/coreColors-CQGojc0l.js +10 -0
  199. package/dist/cjs/{enum-DLblRCkQ.js → enum-DeTWfR0D.js} +3 -3
  200. package/dist/cjs/form-associated.mixin-BCR6bj29.js +33 -0
  201. package/dist/cjs/{getOffset-m4hBgyVP.js → getOffset-CsDHFjPW.js} +6 -53
  202. package/dist/cjs/{form-associated.mixin-DXwvF_vW.js → internals-D8x7GMfR.js} +0 -31
  203. package/dist/cjs/loader.cjs.js +1 -1
  204. package/dist/cjs/orientation-DQAIleEJ.js +8 -0
  205. package/dist/collection/collection-manifest.json +18 -6
  206. package/dist/collection/components/actions/bds-button/bds-button.css +55 -55
  207. package/dist/collection/components/actions/bds-button/bds-button.js +35 -11
  208. package/dist/collection/components/actions/bds-button/types/enum.js +3 -3
  209. package/dist/collection/components/actions/bds-button-group/bds-button-group.css +77 -0
  210. package/dist/collection/components/actions/bds-button-group/bds-button-group.js +264 -0
  211. package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.css +27 -1
  212. package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.js +283 -51
  213. package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/enum.js +4 -0
  214. package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.css +30 -11
  215. package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js +65 -7
  216. package/dist/collection/components/actions/bds-toggle/bds-toggle.css +3 -3
  217. package/dist/collection/components/actions/bds-toggle/bds-toggle.js +1 -1
  218. package/dist/collection/components/feedback/bds-badge/bds-badge.js +1 -1
  219. package/dist/collection/components/feedback/bds-banner/bds-banner.js +1 -1
  220. package/dist/collection/components/feedback/bds-spinner/bds-spinner.js +1 -1
  221. package/dist/collection/components/feedback/bds-status/bds-status.js +1 -1
  222. package/dist/collection/components/feedback/bds-tag/bds-tag.css +6 -6
  223. package/dist/collection/components/feedback/bds-tag/bds-tag.js +1 -1
  224. package/dist/collection/components/forms/bds-checkbox/bds-checkbox/bds-checkbox.css +132 -0
  225. package/dist/collection/components/forms/bds-checkbox/{bds-checkbox.js → bds-checkbox/bds-checkbox.js} +138 -35
  226. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-button/bds-checkbox-button.css +113 -0
  227. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-button/bds-checkbox-button.js +382 -0
  228. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-card/bds-checkbox-card.css +139 -0
  229. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-card/bds-checkbox-card.js +443 -0
  230. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/bds-checkbox-group.css +55 -0
  231. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/bds-checkbox-group.js +648 -0
  232. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/types/enum.js +5 -0
  233. package/dist/collection/components/forms/bds-checkbox/bds-checkbox-group/types/index.js +3 -0
  234. package/dist/collection/components/forms/bds-checkbox/utils/checkbox-form-association.js +39 -0
  235. package/dist/collection/components/forms/bds-checkbox/utils/index.js +1 -0
  236. package/dist/collection/components/forms/bds-flag/bds-flag.js +1 -1
  237. package/dist/collection/components/forms/bds-radio/bds-radio/bds-radio.css +121 -0
  238. package/dist/collection/components/forms/bds-radio/bds-radio/bds-radio.js +238 -0
  239. package/dist/collection/components/forms/bds-radio/bds-radio/types/IRadio.js +1 -0
  240. package/dist/collection/components/forms/bds-radio/bds-radio-button/bds-radio-button.css +113 -0
  241. package/dist/collection/components/forms/bds-radio/bds-radio-button/bds-radio-button.js +238 -0
  242. package/dist/collection/components/forms/bds-radio/bds-radio-button/types/IRadioButton.js +1 -0
  243. package/dist/collection/components/forms/bds-radio/bds-radio-card/bds-radio-card.css +156 -0
  244. package/dist/collection/components/forms/bds-radio/bds-radio-card/bds-radio-card.js +307 -0
  245. package/dist/collection/components/forms/bds-radio/bds-radio-card/types/IRadioCard.js +1 -0
  246. package/dist/collection/components/forms/bds-radio/bds-radio-group/bds-radio-group.css +55 -0
  247. package/dist/collection/components/forms/bds-radio/bds-radio-group/bds-radio-group.js +648 -0
  248. package/dist/collection/components/forms/bds-radio/bds-radio-group/types/IRadioGroup.js +1 -0
  249. package/dist/collection/components/forms/bds-radio/bds-radio-group/types/enum.js +5 -0
  250. package/dist/collection/components/forms/bds-radio/bds-radio-group/types/types.js +1 -0
  251. package/dist/collection/components/forms/bds-select/bds-select.css +23 -0
  252. package/dist/collection/components/forms/bds-select/bds-select.js +431 -0
  253. package/dist/collection/components/forms/bds-select/types/ISelect.js +1 -0
  254. package/dist/collection/components/forms/bds-slider/bds-slider.css +213 -0
  255. package/dist/collection/components/forms/bds-slider/bds-slider.js +847 -0
  256. package/dist/collection/components/forms/bds-slider/helpers/SliderDOMController.js +61 -0
  257. package/dist/collection/components/forms/bds-slider/helpers/SliderService.js +93 -0
  258. package/dist/collection/components/forms/bds-slider/helpers/index.js +3 -0
  259. package/dist/collection/components/forms/bds-slider/helpers/parseValues.js +43 -0
  260. package/dist/collection/components/forms/bds-slider/types/ChangeDetail.js +1 -0
  261. package/dist/collection/components/forms/bds-slider/types/ISlider.js +1 -0
  262. package/dist/collection/components/forms/bds-slider/types/ISliderOptions.js +1 -0
  263. package/dist/collection/components/forms/bds-slider/types/enum.js +16 -0
  264. package/dist/collection/components/forms/bds-slider/types/index.js +5 -0
  265. package/dist/collection/components/forms/bds-slider/types/types.js +1 -0
  266. package/dist/collection/components/forms/bds-text-field/bds-text-field.css +10 -3
  267. package/dist/collection/components/forms/bds-text-field/bds-text-field.js +47 -2
  268. package/dist/collection/components/helpers/{bds-divider.css → bds-divider/bds-divider.css} +12 -4
  269. package/dist/collection/components/helpers/{bds-divider.js → bds-divider/bds-divider.js} +3 -3
  270. package/dist/collection/components/helpers/bds-divider/types/IDivider.js +1 -0
  271. package/dist/collection/components/helpers/bds-divider/types/types.js +1 -0
  272. package/dist/collection/components/images-icons/bds-avatar/bds-avatar.js +1 -1
  273. package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/bds-grid.js +3 -3
  274. package/dist/collection/components/layouts/bds-grid/bds-grid/types/IGrid.js +1 -0
  275. package/dist/collection/components/layouts/bds-grid/bds-grid/types/types.js +1 -0
  276. package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/bds-grid-item.js +9 -9
  277. package/dist/collection/components/layouts/bds-grid/bds-grid-item/types/IGridItem.js +1 -0
  278. package/dist/collection/components/layouts/bds-grid/bds-grid-item/types/types.js +1 -0
  279. package/dist/collection/components/navigation/bds-breadcrumb/bds-breadcrumb.css +21 -0
  280. package/dist/collection/components/navigation/bds-breadcrumb/bds-breadcrumb.js +292 -0
  281. package/dist/collection/components/navigation/bds-breadcrumb/types/IBreadcrumb.js +1 -0
  282. package/dist/collection/components/navigation/bds-breadcrumb-item/bds-breadcrumb-item.css +64 -0
  283. package/dist/collection/components/navigation/bds-breadcrumb-item/bds-breadcrumb-item.js +369 -0
  284. package/dist/collection/components/navigation/bds-breadcrumb-item/types/IBreadcrumbItem.js +1 -0
  285. package/dist/collection/components/overlays/bds-dialog/bds-dialog.css +1 -1
  286. package/dist/collection/components/overlays/bds-dialog/bds-dialog.js +2 -2
  287. package/dist/collection/components/overlays/bds-popover/bds-popover.js +49 -3
  288. package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.js +3 -3
  289. package/dist/collection/components/titles-text/bds-typography/bds-typography.css +5 -0
  290. package/dist/collection/components/titles-text/bds-typography/bds-typography.js +30 -47
  291. package/dist/collection/components/titles-text/bds-typography/utils/bds-typography-utils.js +1 -1
  292. package/dist/collection/css/boreal.css +60 -0
  293. package/dist/collection/css/theme-connect.css +15 -0
  294. package/dist/collection/css/theme-engage.css +15 -0
  295. package/dist/collection/css/theme-protect.css +15 -0
  296. package/dist/collection/css/theme-proximus.css +15 -0
  297. package/dist/collection/mixins/anchored.mixin.js +2 -2
  298. package/dist/collection/mixins/links.mixin.js +1 -2
  299. package/dist/collection/mixins/menu-behavior.mixin.js +12 -6
  300. package/dist/collection/scss/maps/_theme-connect.scss +16 -1
  301. package/dist/collection/scss/maps/_theme-engage.scss +16 -1
  302. package/dist/collection/scss/maps/_theme-protect.scss +16 -1
  303. package/dist/collection/scss/maps/_theme-proximus.scss +16 -1
  304. package/dist/collection/scss/variables/_theme-connect.scss +16 -1
  305. package/dist/collection/scss/variables/_theme-engage.scss +16 -1
  306. package/dist/collection/scss/variables/_theme-protect.scss +16 -1
  307. package/dist/collection/scss/variables/_theme-proximus.scss +16 -1
  308. package/dist/collection/types/index.js +2 -1
  309. package/dist/collection/types/orientation.js +4 -0
  310. package/dist/collection/utils/a11y/index.js +4 -0
  311. package/dist/collection/utils/a11y/keyboard/KeyboardController.js +566 -0
  312. package/dist/collection/utils/a11y/keyboard/_constants.js +30 -0
  313. package/dist/collection/utils/a11y/keyboard/focus/aria-activedescendant.js +41 -0
  314. package/dist/collection/utils/a11y/keyboard/focus/resolve.js +48 -0
  315. package/dist/collection/utils/a11y/keyboard/focus/roving-tabindex.js +55 -0
  316. package/dist/collection/utils/a11y/keyboard/navigation/grid-navigation.js +194 -0
  317. package/dist/collection/utils/a11y/keyboard/navigation/linear-navigation.js +137 -0
  318. package/dist/collection/utils/a11y/keyboard/types/IKeyboardController.js +1 -0
  319. package/dist/collection/utils/a11y/keyboard/types/index.js +2 -0
  320. package/dist/collection/utils/a11y/keyboard/types/types.js +1 -0
  321. package/dist/collection/utils/constants/common/Keys.js +29 -24
  322. package/dist/collection/utils/dom/elements.js +63 -0
  323. package/dist/collection/utils/menu/menu-item.utils.js +9 -8
  324. package/dist/collection/utils/testing/helpers.js +10 -0
  325. package/dist/css/boreal.css +60 -0
  326. package/dist/css/theme-connect.css +15 -0
  327. package/dist/css/theme-engage.css +15 -0
  328. package/dist/css/theme-protect.css +15 -0
  329. package/dist/css/theme-proximus.css +15 -0
  330. package/dist/esm/KeyboardController-DcnXb5F5.js +1064 -0
  331. package/dist/esm/Keys-7G4h4DI7.js +31 -0
  332. package/dist/esm/Logger-iq2UuV7c.js +49 -0
  333. package/dist/esm/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +3 -0
  334. package/dist/esm/bds-avatar.entry.js +2 -2
  335. package/dist/esm/bds-badge.entry.js +1 -1
  336. package/dist/esm/bds-banner.entry.js +2 -2
  337. package/dist/esm/bds-breadcrumb-item.entry.js +104 -0
  338. package/dist/esm/bds-breadcrumb.entry.js +125 -0
  339. package/dist/esm/bds-button-group.entry.js +114 -0
  340. package/dist/esm/bds-button.entry.js +36 -15
  341. package/dist/esm/bds-checkbox-button.entry.js +117 -0
  342. package/dist/esm/bds-checkbox-card.entry.js +133 -0
  343. package/dist/esm/bds-checkbox-group.entry.js +290 -0
  344. package/dist/esm/bds-checkbox.entry.js +67 -29
  345. package/dist/esm/bds-dialog.entry.js +4 -4
  346. package/dist/esm/bds-divider.entry.js +2 -2
  347. package/dist/esm/bds-flag.entry.js +1 -1
  348. package/dist/esm/bds-grid-item.entry.js +1 -1
  349. package/dist/esm/bds-grid.entry.js +1 -1
  350. package/dist/esm/bds-list-menu-item.entry.js +59 -23
  351. package/dist/esm/bds-list-menu.entry.js +126 -22
  352. package/dist/esm/bds-popover.entry.js +15 -6
  353. package/dist/esm/bds-radio-button.entry.js +58 -0
  354. package/dist/esm/bds-radio-card.entry.js +74 -0
  355. package/dist/esm/bds-radio-group.entry.js +289 -0
  356. package/dist/esm/bds-radio.entry.js +58 -0
  357. package/dist/esm/bds-select.entry.js +392 -0
  358. package/dist/esm/bds-slider.entry.js +653 -0
  359. package/dist/esm/bds-spinner.entry.js +1 -1
  360. package/dist/esm/bds-status.entry.js +1 -1
  361. package/dist/esm/bds-tag.entry.js +2 -2
  362. package/dist/esm/bds-text-field.entry.js +10 -4
  363. package/dist/esm/bds-toggle.entry.js +5 -4
  364. package/dist/esm/bds-tooltip_2.entry.js +12 -9
  365. package/dist/esm/boreal-web-components.js +1 -1
  366. package/dist/esm/checkbox-form-association-cgdh1LO-.js +41 -0
  367. package/dist/esm/coreColors-Dwo1hcd9.js +8 -0
  368. package/dist/esm/{enum-C8mRvnTA.js → enum-DlVzZK7o.js} +4 -4
  369. package/dist/esm/form-associated.mixin-C4HM8wQe.js +31 -0
  370. package/dist/esm/{getOffset-DKPjeBHi.js → getOffset-DCLpJBcp.js} +4 -51
  371. package/dist/esm/{form-associated.mixin-CvK2d92c.js → internals-DfaYciGa.js} +1 -31
  372. package/dist/esm/loader.js +1 -1
  373. package/dist/esm/orientation-CPvuMm5C.js +6 -0
  374. package/dist/esm-es5/KeyboardController-DcnXb5F5.js +1 -0
  375. package/dist/esm-es5/Keys-7G4h4DI7.js +1 -0
  376. package/dist/esm-es5/Logger-iq2UuV7c.js +1 -0
  377. package/dist/esm-es5/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +1 -1
  378. package/dist/esm-es5/bds-avatar.entry.js +1 -1
  379. package/dist/esm-es5/bds-badge.entry.js +1 -1
  380. package/dist/esm-es5/bds-banner.entry.js +1 -1
  381. package/dist/esm-es5/bds-breadcrumb-item.entry.js +1 -0
  382. package/dist/esm-es5/bds-breadcrumb.entry.js +1 -0
  383. package/dist/esm-es5/bds-button-group.entry.js +1 -0
  384. package/dist/esm-es5/bds-button.entry.js +1 -1
  385. package/dist/esm-es5/bds-checkbox-button.entry.js +1 -0
  386. package/dist/esm-es5/bds-checkbox-card.entry.js +1 -0
  387. package/dist/esm-es5/bds-checkbox-group.entry.js +1 -0
  388. package/dist/esm-es5/bds-checkbox.entry.js +1 -1
  389. package/dist/esm-es5/bds-dialog.entry.js +1 -1
  390. package/dist/esm-es5/bds-divider.entry.js +1 -1
  391. package/dist/esm-es5/bds-flag.entry.js +1 -1
  392. package/dist/esm-es5/bds-grid-item.entry.js +1 -1
  393. package/dist/esm-es5/bds-grid.entry.js +1 -1
  394. package/dist/esm-es5/bds-list-menu-item.entry.js +1 -1
  395. package/dist/esm-es5/bds-list-menu.entry.js +1 -1
  396. package/dist/esm-es5/bds-popover.entry.js +1 -1
  397. package/dist/esm-es5/bds-radio-button.entry.js +1 -0
  398. package/dist/esm-es5/bds-radio-card.entry.js +1 -0
  399. package/dist/esm-es5/bds-radio-group.entry.js +1 -0
  400. package/dist/esm-es5/bds-radio.entry.js +1 -0
  401. package/dist/esm-es5/bds-select.entry.js +1 -0
  402. package/dist/esm-es5/bds-slider.entry.js +1 -0
  403. package/dist/esm-es5/bds-spinner.entry.js +1 -1
  404. package/dist/esm-es5/bds-status.entry.js +1 -1
  405. package/dist/esm-es5/bds-tag.entry.js +1 -1
  406. package/dist/esm-es5/bds-text-field.entry.js +1 -1
  407. package/dist/esm-es5/bds-toggle.entry.js +1 -1
  408. package/dist/esm-es5/bds-tooltip_2.entry.js +1 -1
  409. package/dist/esm-es5/boreal-web-components.js +1 -1
  410. package/dist/esm-es5/checkbox-form-association-cgdh1LO-.js +1 -0
  411. package/dist/esm-es5/coreColors-Dwo1hcd9.js +1 -0
  412. package/dist/esm-es5/enum-DlVzZK7o.js +1 -0
  413. package/dist/esm-es5/form-associated.mixin-C4HM8wQe.js +1 -0
  414. package/dist/esm-es5/getOffset-DCLpJBcp.js +1 -0
  415. package/dist/esm-es5/internals-DfaYciGa.js +1 -0
  416. package/dist/esm-es5/loader.js +1 -1
  417. package/dist/esm-es5/orientation-CPvuMm5C.js +1 -0
  418. package/dist/scss/maps/_theme-connect.scss +16 -1
  419. package/dist/scss/maps/_theme-engage.scss +16 -1
  420. package/dist/scss/maps/_theme-protect.scss +16 -1
  421. package/dist/scss/maps/_theme-proximus.scss +16 -1
  422. package/dist/scss/variables/_theme-connect.scss +16 -1
  423. package/dist/scss/variables/_theme-engage.scss +16 -1
  424. package/dist/scss/variables/_theme-protect.scss +16 -1
  425. package/dist/scss/variables/_theme-proximus.scss +16 -1
  426. package/dist/types/components/actions/bds-button/bds-button.d.ts +8 -4
  427. package/dist/types/components/actions/bds-button/types/enum.d.ts +3 -3
  428. package/dist/types/components/actions/bds-button-group/bds-button-group.d.ts +40 -0
  429. package/dist/types/components/actions/bds-button-group/types/IButtonGroup.d.ts +11 -0
  430. package/dist/types/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.d.ts +32 -15
  431. package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.d.ts +17 -0
  432. package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/enum.d.ts +5 -0
  433. package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/types.d.ts +3 -0
  434. package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.d.ts +10 -1
  435. package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.d.ts +2 -0
  436. package/dist/types/components/actions/bds-toggle/types/IToggle.d.ts +1 -1
  437. package/dist/types/components/forms/bds-checkbox/{bds-checkbox.d.ts → bds-checkbox/bds-checkbox.d.ts} +24 -9
  438. package/dist/types/components/forms/bds-checkbox/bds-checkbox-button/bds-checkbox-button.d.ts +68 -0
  439. package/dist/types/components/forms/bds-checkbox/bds-checkbox-button/types/ICheckboxButton.d.ts +15 -0
  440. package/dist/types/components/forms/bds-checkbox/bds-checkbox-card/bds-checkbox-card.d.ts +63 -0
  441. package/dist/types/components/forms/bds-checkbox/bds-checkbox-card/types/ICheckboxCard.d.ts +9 -0
  442. package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/bds-checkbox-group.d.ts +86 -0
  443. package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/ICheckboxGroup.d.ts +27 -0
  444. package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/enum.d.ts +6 -0
  445. package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/index.d.ts +4 -0
  446. package/dist/types/components/forms/bds-checkbox/bds-checkbox-group/types/types.d.ts +4 -0
  447. package/dist/types/components/forms/bds-checkbox/types/ICheckbox.d.ts +7 -22
  448. package/dist/types/components/forms/bds-checkbox/utils/checkbox-form-association.d.ts +10 -0
  449. package/dist/types/components/forms/bds-checkbox/utils/index.d.ts +2 -0
  450. package/dist/types/components/forms/bds-radio/bds-radio/bds-radio.d.ts +36 -0
  451. package/dist/types/components/forms/bds-radio/bds-radio/types/IRadio.d.ts +13 -0
  452. package/dist/types/components/forms/bds-radio/bds-radio-button/bds-radio-button.d.ts +36 -0
  453. package/dist/types/components/forms/bds-radio/bds-radio-button/types/IRadioButton.d.ts +14 -0
  454. package/dist/types/components/forms/bds-radio/bds-radio-card/bds-radio-card.d.ts +57 -0
  455. package/dist/types/components/forms/bds-radio/bds-radio-card/types/IRadioCard.d.ts +14 -0
  456. package/dist/types/components/forms/bds-radio/bds-radio-group/bds-radio-group.d.ts +85 -0
  457. package/dist/types/components/forms/bds-radio/bds-radio-group/types/IRadioGroup.d.ts +20 -0
  458. package/dist/types/components/forms/bds-radio/bds-radio-group/types/enum.d.ts +6 -0
  459. package/dist/types/components/forms/bds-radio/bds-radio-group/types/types.d.ts +3 -0
  460. package/dist/types/components/forms/bds-select/bds-select.d.ts +98 -0
  461. package/dist/types/components/forms/bds-select/types/ISelect.d.ts +6 -0
  462. package/dist/types/components/forms/bds-slider/bds-slider.d.ts +176 -0
  463. package/dist/types/components/forms/bds-slider/helpers/SliderDOMController.d.ts +38 -0
  464. package/dist/types/components/forms/bds-slider/helpers/SliderService.d.ts +44 -0
  465. package/dist/types/components/forms/bds-slider/helpers/index.d.ts +4 -0
  466. package/dist/types/components/forms/bds-slider/helpers/parseValues.d.ts +18 -0
  467. package/dist/types/components/forms/bds-slider/types/ChangeDetail.d.ts +9 -0
  468. package/dist/types/components/forms/bds-slider/types/ISlider.d.ts +17 -0
  469. package/dist/types/components/forms/bds-slider/types/ISliderOptions.d.ts +31 -0
  470. package/dist/types/components/forms/bds-slider/types/enum.d.ts +17 -0
  471. package/dist/types/components/forms/bds-slider/types/index.d.ts +6 -0
  472. package/dist/types/components/forms/bds-slider/types/types.d.ts +5 -0
  473. package/dist/types/components/forms/bds-text-field/bds-text-field.d.ts +4 -0
  474. package/dist/types/components/navigation/bds-breadcrumb/bds-breadcrumb.d.ts +57 -0
  475. package/dist/types/components/navigation/bds-breadcrumb/types/IBreadcrumb.d.ts +17 -0
  476. package/dist/types/components/navigation/bds-breadcrumb-item/bds-breadcrumb-item.d.ts +83 -0
  477. package/dist/types/components/navigation/bds-breadcrumb-item/types/IBreadcrumbItem.d.ts +20 -0
  478. package/dist/types/components/overlays/bds-popover/bds-popover.d.ts +4 -0
  479. package/dist/types/components/titles-text/bds-typography/bds-typography.d.ts +2 -46
  480. package/dist/types/components/titles-text/bds-typography/types/ITypography.d.ts +1 -0
  481. package/dist/types/components.d.ts +2187 -450
  482. package/dist/types/mixins/menu-behavior.mixin.d.ts +5 -1
  483. package/dist/types/types/form.d.ts +24 -0
  484. package/dist/types/types/index.d.ts +2 -1
  485. package/dist/types/types/orientation.d.ts +6 -0
  486. package/dist/types/utils/a11y/index.d.ts +4 -0
  487. package/dist/types/utils/a11y/keyboard/KeyboardController.d.ts +321 -0
  488. package/dist/types/utils/a11y/keyboard/_constants.d.ts +28 -0
  489. package/dist/types/utils/a11y/keyboard/focus/aria-activedescendant.d.ts +17 -0
  490. package/dist/types/utils/a11y/keyboard/focus/resolve.d.ts +23 -0
  491. package/dist/types/utils/a11y/keyboard/focus/roving-tabindex.d.ts +20 -0
  492. package/dist/types/utils/a11y/keyboard/navigation/grid-navigation.d.ts +9 -0
  493. package/dist/types/utils/a11y/keyboard/navigation/linear-navigation.d.ts +13 -0
  494. package/dist/types/utils/a11y/keyboard/types/IKeyboardController.d.ts +125 -0
  495. package/dist/types/utils/a11y/keyboard/types/index.d.ts +3 -0
  496. package/dist/types/utils/a11y/keyboard/types/types.d.ts +6 -0
  497. package/dist/types/utils/constants/common/Keys.d.ts +28 -14
  498. package/dist/types/utils/dom/elements.d.ts +41 -0
  499. package/dist/types/utils/menu/menu-item.utils.d.ts +2 -2
  500. package/dist/types/utils/testing/helpers.d.ts +8 -0
  501. package/package.json +1 -1
  502. package/components-build/p-B8n1ru5i.js +0 -1
  503. package/components-build/p-CGdxFth9.js +0 -1
  504. package/components-build/p-CrAt6pGl.js +0 -1
  505. package/components-build/p-DCwT43Kz.js +0 -1
  506. package/components-build/p-DIY3CDNL.js +0 -1
  507. package/dist/boreal-web-components/p-0028481c.entry.js +0 -1
  508. package/dist/boreal-web-components/p-1466de58.system.entry.js +0 -1
  509. package/dist/boreal-web-components/p-2b8bd1dd.entry.js +0 -1
  510. package/dist/boreal-web-components/p-32c23246.system.entry.js +0 -1
  511. package/dist/boreal-web-components/p-3fbcc233.entry.js +0 -1
  512. package/dist/boreal-web-components/p-401f1aee.system.entry.js +0 -1
  513. package/dist/boreal-web-components/p-41b48701.system.entry.js +0 -1
  514. package/dist/boreal-web-components/p-41cac1b8.system.entry.js +0 -1
  515. package/dist/boreal-web-components/p-627b19a5.system.entry.js +0 -1
  516. package/dist/boreal-web-components/p-649737e5.entry.js +0 -1
  517. package/dist/boreal-web-components/p-64cb5825.entry.js +0 -1
  518. package/dist/boreal-web-components/p-6a99f4c6.system.entry.js +0 -1
  519. package/dist/boreal-web-components/p-731b88cc.entry.js +0 -1
  520. package/dist/boreal-web-components/p-74c13bed.system.entry.js +0 -1
  521. package/dist/boreal-web-components/p-7f7ac40f.entry.js +0 -1
  522. package/dist/boreal-web-components/p-82d49661.entry.js +0 -1
  523. package/dist/boreal-web-components/p-83ca193e.entry.js +0 -1
  524. package/dist/boreal-web-components/p-BQ_zoZa2.js +0 -1
  525. package/dist/boreal-web-components/p-C8mRvnTA.js +0 -1
  526. package/dist/boreal-web-components/p-CdKFZYxk.system.js +0 -1
  527. package/dist/boreal-web-components/p-CtknSula.system.js +0 -1
  528. package/dist/boreal-web-components/p-CvK2d92c.js +0 -1
  529. package/dist/boreal-web-components/p-CzYQb3pP.js +0 -1
  530. package/dist/boreal-web-components/p-DZcx75cy.system.js +0 -1
  531. package/dist/boreal-web-components/p-Dme-NuTD.system.js +0 -1
  532. package/dist/boreal-web-components/p-ab5ffa15.system.entry.js +0 -1
  533. package/dist/boreal-web-components/p-ba2b625a.system.entry.js +0 -1
  534. package/dist/boreal-web-components/p-bf2ef10b.entry.js +0 -1
  535. package/dist/boreal-web-components/p-c7aee9f4.system.entry.js +0 -1
  536. package/dist/cjs/Keys-DbIXSJF2.js +0 -22
  537. package/dist/collection/components/forms/bds-checkbox/bds-checkbox.css +0 -90
  538. package/dist/esm/Keys-CzYQb3pP.js +0 -20
  539. package/dist/esm-es5/Keys-CzYQb3pP.js +0 -1
  540. package/dist/esm-es5/enum-C8mRvnTA.js +0 -1
  541. package/dist/esm-es5/form-associated.mixin-CvK2d92c.js +0 -1
  542. package/dist/esm-es5/getOffset-DKPjeBHi.js +0 -1
  543. package/dist/types/types/IFormProps.d.ts +0 -25
  544. /package/dist/collection/components/{helpers/types/IDivider.js → actions/bds-button-group/types/IButtonGroup.js} +0 -0
  545. /package/dist/collection/components/{helpers/types/types.js → actions/bds-list-menu/bds-list-menu/types/IListMenu.js} +0 -0
  546. /package/dist/collection/components/{layouts/bds-grid/grid-item → actions/bds-list-menu/bds-list-menu}/types/types.js +0 -0
  547. /package/dist/collection/components/{layouts/bds-grid/grid-item/types/IGridItem.js → forms/bds-checkbox/bds-checkbox-button/types/ICheckboxButton.js} +0 -0
  548. /package/dist/collection/components/{layouts/bds-grid/grid/types/IGrid.js → forms/bds-checkbox/bds-checkbox-card/types/ICheckboxCard.js} +0 -0
  549. /package/dist/collection/components/{layouts/bds-grid/grid/types/types.js → forms/bds-checkbox/bds-checkbox-group/types/ICheckboxGroup.js} +0 -0
  550. /package/dist/collection/{types/IFormProps.js → components/forms/bds-checkbox/bds-checkbox-group/types/types.js} +0 -0
  551. /package/dist/collection/components/helpers/{types → bds-divider/types}/enum.js +0 -0
  552. /package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/bds-grid.css +0 -0
  553. /package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/types/enum.js +0 -0
  554. /package/dist/collection/components/layouts/bds-grid/{grid → bds-grid}/types/index.js +0 -0
  555. /package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/bds-grid-item.css +0 -0
  556. /package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/enum.js +0 -0
  557. /package/dist/collection/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/index.js +0 -0
  558. /package/dist/types/components/helpers/{bds-divider.d.ts → bds-divider/bds-divider.d.ts} +0 -0
  559. /package/dist/types/components/helpers/{types → bds-divider/types}/IDivider.d.ts +0 -0
  560. /package/dist/types/components/helpers/{types → bds-divider/types}/enum.d.ts +0 -0
  561. /package/dist/types/components/helpers/{types → bds-divider/types}/types.d.ts +0 -0
  562. /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/bds-grid.d.ts +0 -0
  563. /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/IGrid.d.ts +0 -0
  564. /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/enum.d.ts +0 -0
  565. /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/index.d.ts +0 -0
  566. /package/dist/types/components/layouts/bds-grid/{grid → bds-grid}/types/types.d.ts +0 -0
  567. /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/bds-grid-item.d.ts +0 -0
  568. /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/IGridItem.d.ts +0 -0
  569. /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/enum.d.ts +0 -0
  570. /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/index.d.ts +0 -0
  571. /package/dist/types/components/layouts/bds-grid/{grid-item → bds-grid-item}/types/types.d.ts +0 -0
@@ -0,0 +1,566 @@
1
+ import { KEYBOARD, KEYBOARD_MODIFIERS } from "../../constants/index";
2
+ import { Logger } from "../../../services/logger/index";
3
+ import { KEY_TRIGGERS, FOCUS_STRATEGY } from "./_constants";
4
+ import { applyRovingTabindex } from "./focus/roving-tabindex";
5
+ import { applyAriaActiveDescendant } from "./focus/aria-activedescendant";
6
+ import { setupLinearNavigation } from "./navigation/linear-navigation";
7
+ import { setupGridNavigation } from "./navigation/grid-navigation";
8
+ // ─── Modifier constants ───────────────────────────────────────────────────────
9
+ /** Maps each modifier key name to the `KeyboardEvent` property that indicates it is active. */
10
+ const MODIFIER_CHECKS = {
11
+ alt: (e) => e.altKey,
12
+ control: (e) => e.ctrlKey,
13
+ meta: (e) => e.metaKey,
14
+ shift: (e) => e.shiftKey,
15
+ };
16
+ /** Returns `true` when `k` is the normalized name of a modifier key (`alt`, `control`, `meta`, `shift`). */
17
+ function isModifier(k) {
18
+ return k in MODIFIER_CHECKS;
19
+ }
20
+ /**
21
+ * Shorthand aliases accepted in key expressions.
22
+ * Normalized before any binding lookup so callers can use familiar names.
23
+ *
24
+ * | Alias | Resolves to |
25
+ * |-------|-------------|
26
+ * | `ctrl` | `control` |
27
+ * | `cmd` / `win` | `meta` |
28
+ * | `option` | `alt` |
29
+ * | `space` | `' '` (Space character) |
30
+ */
31
+ const KEY_ALIASES = {
32
+ ctrl: KEYBOARD_MODIFIERS.Control,
33
+ cmd: KEYBOARD_MODIFIERS.Meta,
34
+ win: KEYBOARD_MODIFIERS.Meta,
35
+ option: KEYBOARD_MODIFIERS.Alt,
36
+ space: KEYBOARD.Space,
37
+ };
38
+ // ─── Key binding helpers ──────────────────────────────────────────────────────
39
+ /**
40
+ * Normalizes a raw key token to its canonical lowercase form.
41
+ *
42
+ * - Trims surrounding whitespace (except a literal space character).
43
+ * - Converts to lowercase.
44
+ * - Applies {@link KEY_ALIASES} (`'ctrl'` → `'control'`, `'space'` → `' '`).
45
+ *
46
+ * @param raw - A single key token as typed by the developer (e.g. `'Ctrl'`, `'ArrowLeft'`).
47
+ * @returns The canonical lowercase key string used internally for binding lookup.
48
+ */
49
+ function normalizeKey(raw) {
50
+ if (raw === ' ')
51
+ return ' '; // preserve the Space key — trim() would erase it
52
+ const lower = raw.trim().toLowerCase();
53
+ return KEY_ALIASES[lower] ?? lower;
54
+ }
55
+ /**
56
+ * Splits a key expression into separate modifier and regular-key arrays.
57
+ *
58
+ * Accepts either a `'+'`-separated combination string (`'ctrl+pagedown'`) or
59
+ * an array of tokens (`['control', 'pagedown']`). Each token is normalized via
60
+ * {@link normalizeKey} before classification.
61
+ *
62
+ * @param input - A key combination string or array of key tokens.
63
+ * @returns An object with `keys` (non-modifier keys) and `modifiers` (modifier keys).
64
+ */
65
+ function parseKeys(input) {
66
+ const tokens = (Array.isArray(input) ? input : input.split('+')).map(normalizeKey);
67
+ const modifiers = tokens.filter(k => isModifier(k));
68
+ const keys = tokens.filter(k => !isModifier(k));
69
+ return { keys, modifiers };
70
+ }
71
+ /**
72
+ * Produces a deterministic lookup key for a `Map` from a set of regular keys and modifiers.
73
+ *
74
+ * Modifiers are sorted in declaration order (`alt`, `control`, `meta`, `shift`) and
75
+ * regular keys are sorted alphabetically, so `'ctrl+shift+s'` and `'shift+ctrl+s'`
76
+ * always produce the same string.
77
+ *
78
+ * @param keys - Non-modifier key names (already normalized).
79
+ * @param modifiers - Modifier key names (already normalized).
80
+ * @returns A canonical string like `'control+shift+s'` used as the `Map` key.
81
+ */
82
+ function createCombinationKey(keys, modifiers) {
83
+ const sortedKeys = [...keys].sort();
84
+ const sortedMods = Object.keys(MODIFIER_CHECKS).filter(m => modifiers.includes(m));
85
+ return [...sortedMods, ...sortedKeys].join('+');
86
+ }
87
+ // ─── Controller ───────────────────────────────────────────────────────────────
88
+ /**
89
+ * Manages keyboard interactions on a Stencil host element.
90
+ *
91
+ * Provides a **fluent API** to register key bindings and high-level navigation
92
+ * patterns following [ARIA APG](https://www.w3.org/WAI/ARIA/apg/) conventions.
93
+ * All event listeners are cleaned up automatically via a single `AbortController`
94
+ * — no manual `removeEventListener` is ever needed.
95
+ *
96
+ * ---
97
+ *
98
+ * ### Lifecycle
99
+ *
100
+ * ```ts
101
+ * private readonly _keyboard = new KeyboardController();
102
+ *
103
+ * componentDidLoad() {
104
+ * this._keyboard.attach(this.el)
105
+ * .setLinearNavigation({ items: 'button', orientation: 'horizontal' });
106
+ * }
107
+ *
108
+ * disconnectedCallback() {
109
+ * this._keyboard.detach();
110
+ * }
111
+ * ```
112
+ *
113
+ * ---
114
+ *
115
+ * ### Key Binding API
116
+ *
117
+ * | Method | Description |
118
+ * |--------|-------------|
119
+ * | `set(key, handler, options?)` | Register a single key, chord, or array of independent keys |
120
+ * | `setActivateHandler(handler)` | Register `Enter` **and** `Space` with one call (ARIA activation pattern) |
121
+ * | `onFocusOut(handler)` | Register a `focusout` listener that auto-removes on `detach()` |
122
+ * | `remove(key)` | Unregister a binding at runtime |
123
+ *
124
+ * ---
125
+ *
126
+ * ### Navigation API
127
+ *
128
+ * | Method | Description |
129
+ * |--------|-------------|
130
+ * | `setLinearNavigation(config)` | Arrow keys + `Home`/`End` for flat list navigation |
131
+ * | `setGridNavigation(config)` | 2D arrow-key navigation for grids, calendars, and tables |
132
+ * | `rovingTabindex(items, index)` | Manually apply roving tabindex to a list |
133
+ * | `ariaActiveDescendant(items, index, options?)` | Manually apply `aria-activedescendant` to a list |
134
+ * | `applyFocus(items, index)` | Strategy-agnostic focus — delegates to whichever strategy was configured |
135
+ */
136
+ export class KeyboardController {
137
+ /**
138
+ * @param defaults - Default options applied to every binding registered via `set()`.
139
+ * Defaults to `{ preventDefault: true }` to prevent browser scrolling on arrow keys.
140
+ */
141
+ constructor(defaults = { preventDefault: true }) {
142
+ this._bindings = new Map();
143
+ this._allowedKeys = new Set();
144
+ this._pressedKeys = new Set();
145
+ this._logger = new Logger();
146
+ this._abortController = null;
147
+ this._root = null;
148
+ this._strategyType = FOCUS_STRATEGY.ROVING_TABINDEX;
149
+ this._idPrefix = 'bds-nav-item';
150
+ this._defaults = defaults;
151
+ }
152
+ // ─── Lifecycle ──────────────────────────────────────────────────────────────
153
+ /**
154
+ * Attaches the controller to a host element and starts listening for `keydown`
155
+ * and `keyup` events. If already attached, detaches first.
156
+ *
157
+ * Call in `componentDidLoad()`. Supports method chaining.
158
+ *
159
+ * @param el - The Stencil host element (`this.el`) to attach to.
160
+ * @returns `this` for chaining additional configuration calls.
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * componentDidLoad() {
165
+ * this._keyboard.attach(this.el).setLinearNavigation({ items: 'button' });
166
+ * }
167
+ * ```
168
+ */
169
+ attach(el) {
170
+ this.detach();
171
+ this._root = el;
172
+ this._abortController = new AbortController();
173
+ const { signal } = this._abortController;
174
+ const onKey = (e) => this._dispatchKeyEvent(e);
175
+ const onClear = () => this._pressedKeys.clear();
176
+ el.addEventListener(KEY_TRIGGERS.KEYDOWN, onKey, { signal });
177
+ el.addEventListener(KEY_TRIGGERS.KEYUP, onKey, { signal });
178
+ // Clear pressed-key state when the element loses focus to prevent stale
179
+ // combinations after Tab+key sequences.
180
+ el.addEventListener('focusout', onClear, { signal });
181
+ // Also clear when the window itself loses focus (e.g. Alt+Tab to another app).
182
+ globalThis.addEventListener('blur', onClear, { signal });
183
+ return this;
184
+ }
185
+ /**
186
+ * Removes all event listeners registered by this controller and clears
187
+ * internal key-press state. Safe to call multiple times.
188
+ *
189
+ * Call in `disconnectedCallback()`.
190
+ *
191
+ * @example
192
+ * ```ts
193
+ * disconnectedCallback() {
194
+ * this._keyboard.detach();
195
+ * }
196
+ * ```
197
+ */
198
+ detach() {
199
+ this._abortController?.abort();
200
+ this._abortController = null;
201
+ this._root = null;
202
+ this._pressedKeys.clear();
203
+ }
204
+ _ensureAttached(method) {
205
+ if (this._root != null && this._abortController != null)
206
+ return true;
207
+ this._logger.warn('KeyboardController', `${method}() was called before attach(). Call attach(el) first.`);
208
+ return false;
209
+ }
210
+ _rebuildAllowedKeys() {
211
+ this._allowedKeys.clear();
212
+ this._bindings.forEach(binding => {
213
+ for (const k of [...binding.keys, ...binding.modifiers]) {
214
+ this._allowedKeys.add(k);
215
+ }
216
+ });
217
+ }
218
+ // ─── Private ─────────────────────────────────────────────────────────────
219
+ _dispatchKeyEvent(event) {
220
+ const key = event.key.toLowerCase();
221
+ const isDown = event.type === KEY_TRIGGERS.KEYDOWN;
222
+ const isUp = event.type === KEY_TRIGGERS.KEYUP;
223
+ // Fast-path: ignore keys that have no registered binding
224
+ if (!this._allowedKeys.has(key)) {
225
+ if (!isModifier(key) && isUp)
226
+ this._pressedKeys.delete(key);
227
+ return;
228
+ }
229
+ if (!isModifier(key) && isDown) {
230
+ this._pressedKeys.add(key);
231
+ }
232
+ const activeModifiers = Object.keys(MODIFIER_CHECKS).filter(mod => MODIFIER_CHECKS[mod](event));
233
+ const combination = createCombinationKey(Array.from(this._pressedKeys), activeModifiers);
234
+ let binding = this._bindings.get(combination);
235
+ // Fallback: when two non-modifier keys are "simultaneously" pressed (e.g. ArrowDown held
236
+ // while ArrowUp keyup hasn't fired yet), the multi-key combination won't match any
237
+ // single-key binding. Try matching just the current key + active modifiers.
238
+ if (binding === undefined && this._pressedKeys.size > 1) {
239
+ binding = this._bindings.get(createCombinationKey([key], activeModifiers));
240
+ }
241
+ if (binding !== undefined) {
242
+ // Prevent default for all matching keydown events — including auto-repeat —
243
+ // so held keys (e.g. Space on a checkbox) never trigger browser scroll even
244
+ // when the handler is intentionally skipped on repeat.
245
+ if (binding.options.preventDefault && isDown)
246
+ event.preventDefault();
247
+ if (this._matchesTrigger(binding, event)) {
248
+ // Also prevent default on keyup when the binding fires.
249
+ if (binding.options.preventDefault && isUp)
250
+ event.preventDefault();
251
+ if (binding.options.stopPropagation)
252
+ event.stopPropagation();
253
+ binding.handler(event);
254
+ }
255
+ }
256
+ if (!isModifier(key) && isUp) {
257
+ this._pressedKeys.delete(key);
258
+ }
259
+ }
260
+ _matchesTrigger(binding, event) {
261
+ const triggers = binding.options.triggers ?? [KEY_TRIGGERS.KEYDOWN];
262
+ if (event.type === KEY_TRIGGERS.KEYDOWN && triggers.includes(KEY_TRIGGERS.KEYDOWN)) {
263
+ return !event.repeat || Boolean(binding.options.repeat);
264
+ }
265
+ if (event.type === KEY_TRIGGERS.KEYUP && triggers.includes(KEY_TRIGGERS.KEYUP)) {
266
+ return true;
267
+ }
268
+ return false;
269
+ }
270
+ // ─── Public API ──────────────────────────────────────────────────────────
271
+ /**
272
+ * Registers a key binding. Supports single keys, chord combinations, and arrays
273
+ * of independent keys. Returns `this` for chaining.
274
+ *
275
+ * **Accepted `key` formats:**
276
+ *
277
+ * | Format | Example | Description |
278
+ * |--------|---------|-------------|
279
+ * | Single key | `KEYBOARD.Escape` | One key, no modifier |
280
+ * | Combination string | `'ctrl+pagedown'` | `+`-separated chord |
281
+ * | Chord array | `['meta', 'k']` | Same as combination string |
282
+ * | Independent keys | `[KEYBOARD.Enter, KEYBOARD.Space]` | Two separate bindings sharing one handler |
283
+ *
284
+ * @param key - Key expression: a single string, a `'+'`-separated chord, or an array of tokens.
285
+ * @param handler - Callback invoked when the key combination is triggered.
286
+ * @param options - Optional overrides for `preventDefault`, `stopPropagation`, `repeat`, and `triggers`.
287
+ * @returns `this` for chaining.
288
+ *
289
+ * @example
290
+ * ```ts
291
+ * this._keyboard
292
+ * .attach(this.el)
293
+ * .set(KEYBOARD.Escape, () => this.close())
294
+ * .set('ctrl+k', () => this.openSearch(), { stopPropagation: true })
295
+ * .set([KEYBOARD.Enter, KEYBOARD.Space], () => this.activate());
296
+ * ```
297
+ */
298
+ set(key, handler, options) {
299
+ if (Array.isArray(key)) {
300
+ const normalized = key.map(normalizeKey);
301
+ const hasModifier = normalized.some(k => isModifier(k));
302
+ if (!hasModifier) {
303
+ normalized.forEach(k => this.set(k, handler, options));
304
+ return this;
305
+ }
306
+ }
307
+ const { keys, modifiers } = parseKeys(key);
308
+ const combination = createCombinationKey(keys, modifiers);
309
+ const mergedOptions = { ...this._defaults, ...options };
310
+ for (const k of [...keys, ...modifiers]) {
311
+ this._allowedKeys.add(k);
312
+ }
313
+ this._bindings.set(combination, { keys, modifiers, handler, options: mergedOptions });
314
+ return this;
315
+ }
316
+ /**
317
+ * Registers the same handler for `Enter` **and** `Space` in a single call.
318
+ *
319
+ * This follows the [ARIA widget activation pattern](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/)
320
+ * where both keys are expected to activate an interactive element.
321
+ *
322
+ * @param handler - Callback invoked on `Enter` or `Space` keydown.
323
+ * @param options - Optional overrides forwarded to the underlying `set()` calls.
324
+ * @returns `this` for chaining.
325
+ *
326
+ * @example
327
+ * ```ts
328
+ * this._keyboard.attach(this.el).setActivateHandler(() => this.toggle());
329
+ * ```
330
+ */
331
+ setActivateHandler(handler, options) {
332
+ return this.set([KEYBOARD.Enter, KEYBOARD.Space], handler, options);
333
+ }
334
+ /**
335
+ * Registers a `focusout` listener on the attached root element.
336
+ *
337
+ * Unlike `blur`, `focusout` bubbles — it fires when focus leaves **any descendant**,
338
+ * not just the root itself. The listener is removed automatically when `detach()` is called.
339
+ *
340
+ * @param handler - Callback invoked when focus leaves the component subtree.
341
+ * @returns `this` for chaining.
342
+ *
343
+ * @example
344
+ * ```ts
345
+ * this._keyboard.attach(this.el).onFocusOut(() => this.closeDropdown());
346
+ * ```
347
+ */
348
+ onFocusOut(handler) {
349
+ if (this._root == null || this._abortController == null)
350
+ return this;
351
+ this._root.addEventListener('focusout', handler, {
352
+ signal: this._abortController.signal,
353
+ });
354
+ return this;
355
+ }
356
+ /**
357
+ * Applies the **roving tabindex** focus technique to a list of elements.
358
+ *
359
+ * Sets `tabindex="-1"` on all items and `tabindex="0"` + `.focus()` on the
360
+ * item at `activeIndex`. The browser's native Tab key then cycles only through
361
+ * the single active item, keeping focus contained in the widget.
362
+ *
363
+ * `activeIndex` is clamped to `[0, items.length - 1]`.
364
+ *
365
+ * @param items - The full list of navigable elements.
366
+ * @param activeIndex - Index of the element that should receive focus.
367
+ * @returns `this` for chaining.
368
+ *
369
+ * @example
370
+ * ```ts
371
+ * // Manually jump to the last item
372
+ * this._keyboard.rovingTabindex(buttons, buttons.length - 1);
373
+ * ```
374
+ */
375
+ rovingTabindex(items, activeIndex) {
376
+ if (items.length === 0)
377
+ return this;
378
+ const clamped = Math.max(0, Math.min(activeIndex, items.length - 1));
379
+ applyRovingTabindex(items, clamped);
380
+ return this;
381
+ }
382
+ /**
383
+ * Applies the **`aria-activedescendant`** focus technique to a list of elements.
384
+ *
385
+ * DOM focus stays on the container at all times. Navigation updates the
386
+ * container's `aria-activedescendant` attribute to point to the active item's `id`.
387
+ * Item `id`s are auto-generated using `idPrefix` when missing.
388
+ *
389
+ * `activeIndex` is clamped to `[0, items.length - 1]`.
390
+ *
391
+ * @param items - The full list of navigable option/grid-cell elements.
392
+ * @param activeIndex - Index of the logically active item.
393
+ * @param options.idPrefix - Prefix used to generate missing item `id`s. Defaults to `'bds-nav-item'`.
394
+ * @param options.container - The element that receives `aria-activedescendant`. Defaults to the attached root.
395
+ * @returns `this` for chaining.
396
+ *
397
+ * @example
398
+ * ```ts
399
+ * this._keyboard.ariaActiveDescendant(options, 2, { idPrefix: 'my-option' });
400
+ * // -> container.setAttribute('aria-activedescendant', 'my-option-2')
401
+ * ```
402
+ */
403
+ ariaActiveDescendant(items, activeIndex, options) {
404
+ if (items.length === 0)
405
+ return this;
406
+ const container = options?.container ?? this._root;
407
+ if (container == null)
408
+ return this;
409
+ const prefix = options?.idPrefix ?? 'bds-nav-item';
410
+ const clamped = Math.max(0, Math.min(activeIndex, items.length - 1));
411
+ applyAriaActiveDescendant(items, clamped, container, prefix);
412
+ return this;
413
+ }
414
+ /**
415
+ * Moves focus to `items[activeIndex]` using whichever strategy was configured
416
+ * by the last `setLinearNavigation()` or `setGridNavigation()` call
417
+ * (`roving-tabindex` or `aria-activedescendant`).
418
+ *
419
+ * Use this inside `onNavigate` callbacks to stay strategy-agnostic — the component
420
+ * does not need to know which strategy is active.
421
+ *
422
+ * @param items - The full list of navigable elements.
423
+ * @param activeIndex - Index of the element that should become active.
424
+ * @returns `this` for chaining.
425
+ *
426
+ * @example
427
+ * ```ts
428
+ * setLinearNavigation({
429
+ * items: () => this.radioElements,
430
+ * onNavigate: (nextIndex, items) => {
431
+ * this.value = (items[nextIndex] as HTMLBdsRadioElement).value;
432
+ * this._keyboard.applyFocus(items, nextIndex); // works regardless of focus strategy
433
+ * },
434
+ * });
435
+ * ```
436
+ */
437
+ applyFocus(items, activeIndex) {
438
+ if (this._strategyType === FOCUS_STRATEGY.ARIA_ACTIVE_DESCENDANT) {
439
+ return this.ariaActiveDescendant(items, activeIndex, { idPrefix: this._idPrefix });
440
+ }
441
+ return this.rovingTabindex(items, activeIndex);
442
+ }
443
+ /**
444
+ * Registers arrow-key (`ArrowLeft`, `ArrowRight`, `ArrowUp`, `ArrowDown`),
445
+ * `Home`, and `End` bindings for flat list navigation following the
446
+ * [ARIA Composite Widget pattern](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_general_within).
447
+ *
448
+ * Arrow keys support auto-repeat (throttled to ~10 steps/second by default).
449
+ * Focus strategy (`roving-tabindex` or `aria-activedescendant`) is resolved
450
+ * from `config.focusStrategy` and stored for use by `applyFocus()`.
451
+ *
452
+ * @param config - Navigation options. See {@link LinearNavigationConfig} for all fields.
453
+ * @returns `this` for chaining.
454
+ *
455
+ * @example
456
+ * ```ts
457
+ * // Toolbar: horizontal arrows, roving tabindex, Enter/Space clicks
458
+ * this._keyboard.attach(this.el).setLinearNavigation({
459
+ * items: 'button:not([disabled])',
460
+ * orientation: 'horizontal',
461
+ * onActivate: () => (document.activeElement as HTMLElement)?.click(),
462
+ * });
463
+ *
464
+ * // Radio group: all arrows, wrap, selection changes on navigate
465
+ * this._keyboard.attach(this.el).setLinearNavigation({
466
+ * items: () => this.radioElements.filter(el => !el.disabled) as HTMLElement[],
467
+ * orientation: 'both',
468
+ * wrap: true,
469
+ * initialActiveSelector: '[checked]',
470
+ * onNavigate: (nextIndex, items) => {
471
+ * this.value = (items[nextIndex] as HTMLBdsRadioElement).value;
472
+ * this._keyboard.applyFocus(items, nextIndex);
473
+ * },
474
+ * });
475
+ * ```
476
+ */
477
+ setLinearNavigation(config) {
478
+ if (!this._ensureAttached('setLinearNavigation'))
479
+ return this;
480
+ setupLinearNavigation(config, {
481
+ root: this._root,
482
+ abortController: this._abortController,
483
+ register: (key, handler, options) => this.set(key, handler, options),
484
+ onStrategyResolved: (type, prefix) => {
485
+ this._strategyType = type;
486
+ this._idPrefix = prefix;
487
+ },
488
+ });
489
+ return this;
490
+ }
491
+ /**
492
+ * Registers 2D arrow-key navigation for grids, calendars, and data tables following the
493
+ * [ARIA Grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
494
+ *
495
+ * Registered bindings:
496
+ * - `ArrowLeft / ArrowRight` — move one column left/right
497
+ * - `ArrowUp / ArrowDown` — move one row up/down
498
+ * - `Home / End` — first/last cell in current row
499
+ * - `Ctrl+Home / Ctrl+End` — first/last cell in the entire grid
500
+ * - `PageUp / PageDown` — delegated to `config.onPageUp` / `config.onPageDown` (optional)
501
+ * - `Enter / Space` — delegated to `config.onActivate` (optional)
502
+ *
503
+ * Items are provided as a `HTMLElement[][]` (rows × columns). `null`/`undefined`
504
+ * cells are skipped. The list is re-evaluated on every keydown.
505
+ *
506
+ * @param config - Navigation options. See {@link GridNavigationConfig} for all fields.
507
+ * @returns `this` for chaining.
508
+ *
509
+ * @example
510
+ * ```ts
511
+ * // Data table: 2D navigation, Enter selects a cell
512
+ * this._keyboard.attach(this.el).setGridNavigation({
513
+ * items: () => this._getRowsOfCells(),
514
+ * wrap: false,
515
+ * onActivate: () => this._selectFocusedCell(),
516
+ * });
517
+ *
518
+ * // Calendar: grid navigation + PageUp/Down to change months
519
+ * this._keyboard.attach(this.el).setGridNavigation({
520
+ * items: () => this.weekRows.map(row => row.map(day => day.buttonEl)),
521
+ * wrap: true,
522
+ * initialActiveSelector: '[data-today]',
523
+ * onActivate: () => this.selectFocusedDay(),
524
+ * onPageUp: () => this.prevMonth(),
525
+ * onPageDown: () => this.nextMonth(),
526
+ * });
527
+ * ```
528
+ */
529
+ setGridNavigation(config) {
530
+ if (!this._ensureAttached('setGridNavigation'))
531
+ return this;
532
+ setupGridNavigation(config, {
533
+ root: this._root,
534
+ abortController: this._abortController,
535
+ register: (key, handler, options) => this.set(key, handler, options),
536
+ onStrategyResolved: (type, prefix) => {
537
+ this._strategyType = type;
538
+ this._idPrefix = prefix;
539
+ },
540
+ });
541
+ return this;
542
+ }
543
+ /**
544
+ * Removes a previously registered binding so it no longer fires.
545
+ *
546
+ * Pass the same key expression that was used in `set()`. Useful for dynamically
547
+ * enabling or disabling shortcuts (e.g. disabling `Escape` while a sub-modal is open).
548
+ *
549
+ * @param key - The key expression to unregister (same format accepted by `set()`).
550
+ * @returns `this` for chaining.
551
+ *
552
+ * @example
553
+ * ```ts
554
+ * // Disable Escape while a confirmation dialog is open
555
+ * this._keyboard.remove(KEYBOARD.Escape);
556
+ * // Re-enable it after the dialog closes
557
+ * this._keyboard.set(KEYBOARD.Escape, () => this.close());
558
+ * ```
559
+ */
560
+ remove(key) {
561
+ const { keys, modifiers } = parseKeys(key);
562
+ this._bindings.delete(createCombinationKey(keys, modifiers));
563
+ this._rebuildAllowedKeys();
564
+ return this;
565
+ }
566
+ }
@@ -0,0 +1,30 @@
1
+ import { ORIENTATIONS } from "../../../types/index";
2
+ // ─── Key trigger constants ────────────────────────────────────────────────────
3
+ /**
4
+ * Event type constants for key bindings.
5
+ * Use instead of hard-coded `'keydown'` / `'keyup'` strings.
6
+ */
7
+ export const KEY_TRIGGERS = {
8
+ KEYDOWN: 'keydown',
9
+ KEYUP: 'keyup',
10
+ };
11
+ // ─── Orientation constants ────────────────────────────────────────────────────
12
+ export const KEYBOARD_ORIENTATIONS = {
13
+ ...ORIENTATIONS,
14
+ BOTH: 'both',
15
+ };
16
+ // ─── Focus strategy constants ─────────────────────────────────────────────────
17
+ /**
18
+ * Focus management technique identifiers for `KeyboardController`.
19
+ * Use these constants instead of raw string literals when setting or comparing
20
+ * the focus strategy type.
21
+ */
22
+ export const FOCUS_STRATEGY = {
23
+ ROVING_TABINDEX: 'roving-tabindex',
24
+ ARIA_ACTIVE_DESCENDANT: 'aria-activedescendant',
25
+ };
26
+ // ─── Navigation boundary constants (internal) ────────────────────────────────
27
+ export const NAV_BOUNDARY = {
28
+ FIRST: 'first',
29
+ LAST: 'last',
30
+ };
@@ -0,0 +1,41 @@
1
+ function isHTMLElement(cell) {
2
+ return cell != null;
3
+ }
4
+ /**
5
+ * Ensures every item in the list has an `id` attribute.
6
+ * Auto-generates one with a unique suffix when an item lacks it.
7
+ */
8
+ export function ensureItemIds(items, prefix) {
9
+ items.forEach((item, i) => {
10
+ if (item.id.length === 0) {
11
+ item.id = `${prefix}-${i}-${Math.random().toString(36).slice(2, 7)}`;
12
+ }
13
+ });
14
+ }
15
+ /**
16
+ * Applies the **aria-activedescendant** technique to a flat list:
17
+ * - Ensures all items have `id` attributes.
18
+ * - Sets `tabindex="-1"` on every item (container holds focus).
19
+ * - Updates `aria-activedescendant` on `container` to point to the active item.
20
+ * - Scrolls the active item into view.
21
+ */
22
+ export function applyAriaActiveDescendant(items, activeIndex, container, idPrefix) {
23
+ const activeItem = items[activeIndex];
24
+ if (activeItem == null)
25
+ return;
26
+ ensureItemIds(items, idPrefix);
27
+ items.forEach(item => item.setAttribute('tabindex', '-1'));
28
+ container.setAttribute('aria-activedescendant', activeItem.id);
29
+ activeItem.scrollIntoView({ block: 'nearest' });
30
+ }
31
+ /** Applies aria-activedescendant to a 2D grid container. */
32
+ export function applyGridAriaActiveDescendant(items, row, col, container, idPrefix) {
33
+ const flat = items.flat().filter(isHTMLElement);
34
+ const cell = items[row]?.[col];
35
+ if (cell == null)
36
+ return;
37
+ ensureItemIds(flat, idPrefix);
38
+ flat.forEach(item => item.setAttribute('tabindex', '-1'));
39
+ container.setAttribute('aria-activedescendant', cell.id);
40
+ cell.scrollIntoView({ block: 'nearest' });
41
+ }
@@ -0,0 +1,48 @@
1
+ import { FOCUS_STRATEGY } from "../_constants";
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 function resolveCurrentIndex(items, strategyType, container) {
11
+ if (strategyType === FOCUS_STRATEGY.ARIA_ACTIVE_DESCENDANT) {
12
+ const activeId = container?.getAttribute('aria-activedescendant');
13
+ if (activeId == null)
14
+ return -1;
15
+ return items.findIndex(item => item.id === activeId);
16
+ }
17
+ return items.indexOf(document.activeElement);
18
+ }
19
+ /**
20
+ * Resolves the `(row, col)` coordinates of the currently active grid cell.
21
+ *
22
+ * - `'roving-tabindex'`: matches against `document.activeElement`.
23
+ * - `'aria-activedescendant'`: reads `aria-activedescendant` from the container.
24
+ *
25
+ * Returns `{ row: -1, col: -1 }` when nothing is active yet.
26
+ */
27
+ export function resolveGridCurrentPos(items, strategyType, container) {
28
+ if (strategyType === FOCUS_STRATEGY.ARIA_ACTIVE_DESCENDANT) {
29
+ const activeId = container?.getAttribute('aria-activedescendant');
30
+ if (activeId != null) {
31
+ for (let r = 0; r < items.length; r++) {
32
+ for (let c = 0; c < items[r].length; c++) {
33
+ if (items[r][c]?.id === activeId)
34
+ return { row: r, col: c };
35
+ }
36
+ }
37
+ }
38
+ return { row: -1, col: -1 };
39
+ }
40
+ const focused = document.activeElement;
41
+ for (let r = 0; r < items.length; r++) {
42
+ for (let c = 0; c < items[r].length; c++) {
43
+ if (items[r][c] === focused)
44
+ return { row: r, col: c };
45
+ }
46
+ }
47
+ return { row: -1, col: -1 };
48
+ }