@baloise/ds-core 20.0.0-next.4 → 20.0.0-next.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 (988) hide show
  1. package/LICENSE +9 -0
  2. package/components/all.d.ts +56 -0
  3. package/components/all.js +84 -0
  4. package/components/ds-accordion.js +1 -1
  5. package/components/ds-alert-container.js +1 -1
  6. package/components/ds-app.js +1 -1
  7. package/components/ds-badge.js +1 -1
  8. package/components/ds-button-group.js +1 -1
  9. package/components/ds-button.js +1 -1
  10. package/components/ds-card-actions.js +1 -1
  11. package/components/ds-card-content.js +1 -1
  12. package/components/ds-card-header.js +1 -1
  13. package/components/ds-card-subtitle.js +1 -1
  14. package/components/ds-card-title.js +1 -1
  15. package/components/ds-card.js +1 -1
  16. package/components/ds-carousel-item.d.ts +11 -0
  17. package/components/ds-carousel-item.js +4 -0
  18. package/components/ds-carousel.d.ts +11 -0
  19. package/components/ds-carousel.js +4 -0
  20. package/components/ds-checkbox-group.js +1 -1
  21. package/components/ds-checkbox.js +1 -1
  22. package/components/ds-close.js +1 -1
  23. package/components/ds-content.js +1 -1
  24. package/components/ds-data-item.d.ts +11 -0
  25. package/components/ds-data-item.js +4 -0
  26. package/components/ds-data-label.d.ts +11 -0
  27. package/components/ds-data-label.js +4 -0
  28. package/components/ds-data-value.d.ts +11 -0
  29. package/components/ds-data-value.js +4 -0
  30. package/components/ds-data.d.ts +11 -0
  31. package/components/ds-data.js +4 -0
  32. package/components/ds-date.d.ts +11 -0
  33. package/components/ds-date.js +4 -0
  34. package/components/ds-divider.js +1 -1
  35. package/components/ds-drawer.d.ts +11 -0
  36. package/components/ds-drawer.js +4 -0
  37. package/components/ds-file-upload.d.ts +11 -0
  38. package/components/ds-file-upload.js +4 -0
  39. package/components/ds-footer.d.ts +11 -0
  40. package/components/ds-footer.js +4 -0
  41. package/components/ds-heading.js +1 -1
  42. package/components/ds-hint-text.d.ts +11 -0
  43. package/components/ds-hint-text.js +4 -0
  44. package/components/ds-hint-title.d.ts +11 -0
  45. package/components/ds-hint-title.js +4 -0
  46. package/components/ds-hint.d.ts +11 -0
  47. package/components/ds-hint.js +4 -0
  48. package/components/ds-icon.js +1 -1
  49. package/components/ds-input.js +1 -1
  50. package/components/ds-item.js +1 -1
  51. package/components/ds-label.js +1 -1
  52. package/components/ds-list.js +1 -1
  53. package/components/ds-logo.js +1 -1
  54. package/components/ds-modal-body.d.ts +11 -0
  55. package/components/ds-modal-body.js +4 -0
  56. package/components/ds-modal-header.d.ts +11 -0
  57. package/components/ds-modal-header.js +4 -0
  58. package/components/ds-modal.d.ts +11 -0
  59. package/components/ds-modal.js +4 -0
  60. package/components/ds-navbar.d.ts +11 -0
  61. package/components/ds-navbar.js +4 -0
  62. package/components/ds-notification.js +1 -1
  63. package/components/ds-number-input.js +1 -1
  64. package/components/ds-pagination.js +1 -1
  65. package/components/ds-popup.d.ts +11 -0
  66. package/components/ds-popup.js +4 -0
  67. package/components/ds-progress-bar.js +1 -1
  68. package/components/ds-radio-group.js +1 -1
  69. package/components/ds-radio.js +1 -1
  70. package/components/ds-segment-item.js +1 -1
  71. package/components/ds-segment.js +1 -1
  72. package/components/ds-select-optgroup.d.ts +11 -0
  73. package/components/ds-select-optgroup.js +4 -0
  74. package/components/ds-select-option.d.ts +11 -0
  75. package/components/ds-select-option.js +4 -0
  76. package/components/ds-select.d.ts +11 -0
  77. package/components/ds-select.js +4 -0
  78. package/components/ds-shape.js +1 -1
  79. package/components/ds-snackbar.js +1 -1
  80. package/components/ds-spinner.js +1 -1
  81. package/components/ds-stack.js +1 -1
  82. package/components/ds-step-panel.d.ts +11 -0
  83. package/components/ds-step-panel.js +4 -0
  84. package/components/ds-step.d.ts +11 -0
  85. package/components/ds-step.js +4 -0
  86. package/components/ds-steps.d.ts +11 -0
  87. package/components/ds-steps.js +4 -0
  88. package/components/ds-tab-panel.d.ts +11 -0
  89. package/components/ds-tab-panel.js +4 -0
  90. package/components/ds-tab.d.ts +11 -0
  91. package/components/ds-tab.js +4 -0
  92. package/components/ds-tabs.d.ts +11 -0
  93. package/components/ds-tabs.js +4 -0
  94. package/components/ds-tag-group.js +1 -1
  95. package/components/ds-tag.js +1 -1
  96. package/components/ds-text.js +1 -1
  97. package/components/ds-textarea.js +1 -1
  98. package/components/ds-toast.js +1 -1
  99. package/components/ds-toggle.js +1 -1
  100. package/components/ds-tooltip.d.ts +11 -0
  101. package/components/ds-tooltip.js +4 -0
  102. package/components/index.js +1 -1
  103. package/components/p-3Mi9vpmB.js +4 -0
  104. package/components/p-B-en4B17.js +4 -0
  105. package/components/p-B1gnrQ9b.js +4 -0
  106. package/components/p-BU0dY8pq.js +4 -0
  107. package/components/p-BfXZJ1Fe.js +4 -0
  108. package/components/p-BgzU1loG.js +4 -0
  109. package/components/p-BhbWmCTu.js +4 -0
  110. package/components/p-BqY0KzJC.js +4 -0
  111. package/components/p-BrIcCcce.js +4 -0
  112. package/components/p-BrJFPhMA.js +4 -0
  113. package/components/p-Btdh3fq7.js +4 -0
  114. package/components/{p-Urcs7-vS.js → p-BwfAXfmz.js} +1 -1
  115. package/components/p-ByX1_7SF.js +4 -0
  116. package/components/p-C1jqbZdf.js +4 -0
  117. package/{dist/design-system/p-15bc012833.entry.js → components/p-CA7G72wZ.js} +1 -1
  118. package/components/p-CQHwI4iD.js +4 -0
  119. package/components/p-CYWn3X22.js +4 -0
  120. package/components/p-CjIxf5zy.js +4 -0
  121. package/components/p-Ctnm_MBD.js +4 -0
  122. package/components/p-CvaNxQtw.js +4 -0
  123. package/components/p-D9ILiUgm.js +4 -0
  124. package/components/{p-BATOumsf.js → p-D9YYP2SG.js} +1 -1
  125. package/components/p-DAYd9ty0.js +4 -0
  126. package/components/p-DIK6Zkg6.js +4 -0
  127. package/{dist/design-system/p-BkESlUMc.js → components/p-DQBzmbR6.js} +1 -1
  128. package/components/{p-z1jJgtep.js → p-DU7t9H9h.js} +1 -1
  129. package/components/p-DYTOWDAA.js +4 -0
  130. package/components/p-DYlqkAWn.js +4 -0
  131. package/components/p-DbM7ALm9.js +14 -0
  132. package/{dist/design-system/p-D2tr7015.js → components/p-DbY6Pfeh.js} +1 -1
  133. package/components/{p-DZqqelPH.js → p-DcSNuA8W.js} +1 -1
  134. package/components/p-DenZRIeA.js +4 -0
  135. package/components/p-DokkRjWC.js +4 -0
  136. package/{dist/design-system/p-BwrOVItb.js → components/p-Dr4MUfss.js} +1 -1
  137. package/components/p-DsvYY32v.js +4 -0
  138. package/components/p-Du7QOHtz.js +5 -0
  139. package/components/{p-E8U6M5ii.js → p-FBQaJyH0.js} +1 -1
  140. package/components/{p-Dr4dquer.js → p-J0mxIuTt.js} +1 -1
  141. package/{dist/design-system/p-DJxr2Dcd.js → components/p-UCeQ1JCs.js} +1 -1
  142. package/components/p-Uy_dVz21.js +4 -0
  143. package/components/p-WO0X5Vmy.js +4 -0
  144. package/components/p-bGV2P6rT.js +4 -0
  145. package/components/{p-Bt20CEww.js → p-n3_2KEz0.js} +1 -1
  146. package/dist/cjs/array-CioNm_V1.js +1985 -0
  147. package/dist/cjs/{breakpoints.decorator-qaoHOU6Q.js → breakpoints.decorator-C-Qm21UK.js} +1 -1
  148. package/dist/cjs/{breakpoints.subject-DhAN_ZAn.js → breakpoints.subject-XNcGwhzh.js} +3 -3
  149. package/dist/cjs/{button.interfaces-BueDWsuH.js → button.interfaces-CqlUGR-N.js} +1 -1
  150. package/dist/cjs/carousel.interfaces-BFQpUNrw.js +12 -0
  151. package/dist/cjs/{config.decorator-Qmrq4ZYj.js → config.decorator-ThGLtT-3.js} +1 -1
  152. package/dist/cjs/{config.utils-Cv4cx_Xa.js → config.utils-MhZvq4Qm.js} +1 -1
  153. package/dist/cjs/create-validator-decorator-BIgFqrMJ.js +212 -0
  154. package/dist/cjs/design-system.cjs.js +3 -3
  155. package/dist/cjs/{device-CptgCtVc.js → device-BnjBOLnP.js} +1 -1
  156. package/dist/cjs/ds-accordion.cjs.entry.js +30 -34
  157. package/dist/cjs/ds-alert-container.cjs.entry.js +12 -15
  158. package/dist/cjs/ds-app.cjs.entry.js +16 -6
  159. package/dist/cjs/ds-badge.cjs.entry.js +32 -25
  160. package/dist/cjs/ds-button-group.cjs.entry.js +14 -17
  161. package/dist/cjs/ds-button_2.cjs.entry.js +58 -73
  162. package/dist/cjs/ds-card-actions.cjs.entry.js +6 -8
  163. package/dist/cjs/ds-card-content.cjs.entry.js +2 -2
  164. package/dist/cjs/ds-card-header.cjs.entry.js +8 -5
  165. package/dist/cjs/ds-card-subtitle.cjs.entry.js +13 -13
  166. package/dist/cjs/ds-card-title.cjs.entry.js +11 -7
  167. package/dist/cjs/ds-card.cjs.entry.js +30 -42
  168. package/dist/cjs/ds-carousel-item.cjs.entry.js +128 -0
  169. package/dist/cjs/ds-carousel.cjs.entry.js +473 -0
  170. package/dist/cjs/ds-checkbox-group.cjs.entry.js +41 -2012
  171. package/dist/cjs/ds-checkbox.cjs.entry.js +23 -19
  172. package/dist/cjs/ds-content_2.cjs.entry.js +330 -0
  173. package/dist/cjs/ds-data-item.cjs.entry.js +146 -0
  174. package/dist/cjs/ds-data-label.cjs.entry.js +41 -0
  175. package/dist/cjs/ds-data-value.cjs.entry.js +31 -0
  176. package/dist/cjs/ds-data.cjs.entry.js +43 -0
  177. package/dist/cjs/ds-date.cjs.entry.js +5334 -0
  178. package/dist/cjs/{ds-logo.cjs.entry.js → ds-divider_2.cjs.entry.js} +130 -25
  179. package/dist/cjs/ds-drawer_2.cjs.entry.js +602 -0
  180. package/dist/cjs/ds-file-upload.cjs.entry.js +515 -0
  181. package/dist/cjs/ds-footer.cjs.entry.js +159 -0
  182. package/dist/cjs/ds-heading.cjs.entry.js +21 -19
  183. package/dist/cjs/ds-hint-text.cjs.entry.js +28 -0
  184. package/dist/cjs/ds-hint-title.cjs.entry.js +31 -0
  185. package/dist/cjs/ds-hint.cjs.entry.js +243 -0
  186. package/dist/cjs/ds-icon_2.cjs.entry.js +78 -70
  187. package/dist/cjs/ds-input.cjs.entry.js +45 -43
  188. package/dist/cjs/ds-item.cjs.entry.js +29 -34
  189. package/dist/cjs/ds-label.cjs.entry.js +22 -30
  190. package/dist/cjs/ds-list.cjs.entry.js +6 -12
  191. package/dist/cjs/ds-modal-body.cjs.entry.js +34 -0
  192. package/dist/cjs/ds-modal-header.cjs.entry.js +31 -0
  193. package/dist/cjs/ds-modal.cjs.entry.js +201 -0
  194. package/dist/cjs/ds-navbar.cjs.entry.js +359 -0
  195. package/dist/cjs/ds-notification.cjs.entry.js +19 -27
  196. package/dist/cjs/ds-number-input.cjs.entry.js +128 -45
  197. package/dist/cjs/ds-pagination.cjs.entry.js +41 -37
  198. package/dist/cjs/ds-progress-bar.cjs.entry.js +25 -29
  199. package/dist/cjs/ds-radio-group.cjs.entry.js +30 -29
  200. package/dist/cjs/ds-radio.cjs.entry.js +26 -33
  201. package/dist/cjs/ds-segment-item.cjs.entry.js +9 -9
  202. package/dist/cjs/ds-segment.cjs.entry.js +29 -117
  203. package/dist/cjs/ds-select-optgroup.cjs.entry.js +49 -0
  204. package/dist/cjs/ds-select-option.cjs.entry.js +57 -0
  205. package/dist/cjs/ds-select.cjs.entry.js +2772 -0
  206. package/dist/cjs/ds-shape.cjs.entry.js +10 -16
  207. package/dist/cjs/ds-snackbar.cjs.entry.js +40 -57
  208. package/dist/cjs/ds-step-panel.cjs.entry.js +55 -0
  209. package/dist/cjs/ds-step.cjs.entry.js +170 -0
  210. package/dist/cjs/ds-steps.cjs.entry.js +227 -0
  211. package/dist/cjs/ds-tab-panel.cjs.entry.js +55 -0
  212. package/dist/cjs/ds-tab.cjs.entry.js +120 -0
  213. package/dist/cjs/ds-tabs.cjs.entry.js +364 -0
  214. package/dist/cjs/ds-tag-group.cjs.entry.js +3 -3
  215. package/dist/cjs/ds-tag.cjs.entry.js +19 -26
  216. package/dist/cjs/ds-text.cjs.entry.js +28 -32
  217. package/dist/cjs/ds-textarea.cjs.entry.js +32 -31
  218. package/dist/cjs/ds-toast.cjs.entry.js +40 -54
  219. package/dist/cjs/ds-toggle.cjs.entry.js +22 -21
  220. package/dist/cjs/ds-tooltip.cjs.entry.js +182 -0
  221. package/dist/cjs/{field.util-RjuvTLNZ.js → field.util-L-DkeMVk.js} +1 -1
  222. package/dist/cjs/floating-ui.dom-Cu3dZdFD.js +1628 -0
  223. package/dist/cjs/focus-D3VVgpM7.js +1958 -0
  224. package/dist/cjs/footer.i18n-CpGxizgm.js +162 -0
  225. package/dist/cjs/{form-control-Bno2tBGf.js → form-control-CtMcJUuC.js} +2 -2
  226. package/dist/cjs/has-value-DK0oRqXI.js +12 -0
  227. package/dist/cjs/{index-CdD-TT_n.js → index-sC3JnTlJ.js} +497 -175
  228. package/dist/cjs/index.cjs.js +26 -8283
  229. package/dist/cjs/keyboard-C7y0jXYb.js +23 -0
  230. package/dist/cjs/{listener-DgVWqfa1.js → listener-BwB_xent.js} +1 -1
  231. package/dist/cjs/loader.cjs.js +2 -2
  232. package/dist/cjs/luxon-q23LOWrr.js +8137 -0
  233. package/dist/cjs/one-of-BZGRIMtQ.js +30 -0
  234. package/dist/cjs/popup.interfaces-B-mwd9rh.js +23 -0
  235. package/dist/cjs/required-COz3Unzu.js +38 -0
  236. package/dist/cjs/resize.decorator-DWM_fQgv.js +98 -0
  237. package/dist/cjs/scroll-CUuEh4xd.js +89 -0
  238. package/dist/cjs/svg-D9RbiR8R.js +2443 -0
  239. package/dist/cjs/{tslib.es6-BTi-SLnA.js → tslib.es6-CxyosZMg.js} +1 -1
  240. package/dist/cjs/type-hmc4CJcO.js +33 -0
  241. package/dist/collection/collection-manifest.json +30 -2
  242. package/dist/collection/components/accordion/accordion.host.css +1 -1
  243. package/dist/collection/components/accordion/accordion.js +22 -29
  244. package/dist/collection/components/alert/alert-container.js +8 -14
  245. package/dist/collection/components/alert/alert.controller.js +1 -1
  246. package/dist/collection/components/alert/snackbar/snackbar.js +30 -53
  247. package/dist/collection/components/alert/toast/toast.js +32 -53
  248. package/dist/collection/components/app/app.js +11 -3
  249. package/dist/collection/components/badge/badge.interfaces.js +1 -1
  250. package/dist/collection/components/badge/badge.js +28 -25
  251. package/dist/collection/components/button/button-group/button-group.js +8 -14
  252. package/dist/collection/components/button/button.host.css +1 -1
  253. package/dist/collection/components/button/button.interfaces.js +1 -1
  254. package/dist/collection/components/button/button.js +44 -54
  255. package/dist/collection/components/card/card-actions/card-actions.js +3 -6
  256. package/dist/collection/components/card/card-header/card-header.js +4 -3
  257. package/dist/collection/components/card/card-subtitle/card-subtitle.js +8 -11
  258. package/dist/collection/components/card/card-title/card-title.js +6 -5
  259. package/dist/collection/components/card/card.host.css +1 -1
  260. package/dist/collection/components/card/card.js +25 -38
  261. package/dist/collection/components/carousel/carousel/carousel.host.css +1 -0
  262. package/dist/collection/components/carousel/carousel/carousel.i18n.js +65 -0
  263. package/dist/collection/components/carousel/carousel/carousel.js +631 -0
  264. package/dist/collection/components/carousel/carousel-item/carousel-item.host.css +1 -0
  265. package/dist/collection/components/carousel/carousel-item/carousel-item.js +313 -0
  266. package/dist/collection/components/carousel/carousel.interfaces.js +6 -0
  267. package/dist/collection/components/carousel/test/carousel.a11y.play.js +34 -0
  268. package/dist/collection/components/carousel/test/carousel.component.play.js +57 -0
  269. package/dist/collection/components/carousel/test/carousel.visual.play.js +24 -0
  270. package/dist/collection/components/checkbox/checkbox-group/checkbox-group.host.css +1 -1
  271. package/dist/collection/components/checkbox/checkbox-group/checkbox-group.js +25 -26
  272. package/dist/collection/components/checkbox/checkbox.js +18 -18
  273. package/dist/collection/components/close/close.js +10 -21
  274. package/dist/collection/components/content/content.js +38 -52
  275. package/dist/collection/components/data/data-item.host.css +1 -0
  276. package/dist/collection/components/data/data-item.i18n.js +35 -0
  277. package/dist/collection/components/data/data-item.js +244 -0
  278. package/dist/collection/components/data/data-label.host.css +1 -0
  279. package/dist/collection/components/data/data-label.js +72 -0
  280. package/dist/collection/components/data/data-value.host.css +1 -0
  281. package/dist/collection/components/data/data-value.js +38 -0
  282. package/dist/collection/components/data/data.host.css +1 -0
  283. package/dist/collection/components/data/data.js +75 -0
  284. package/dist/collection/components/data/test/data.a11y.play.js +31 -0
  285. package/dist/collection/components/data/test/data.component.play.js +104 -0
  286. package/dist/collection/components/data/test/data.visual.play.js +25 -0
  287. package/dist/collection/components/date/date.host.css +1 -0
  288. package/dist/collection/components/date/date.i18n.js +105 -0
  289. package/dist/collection/components/date/date.interfaces.js +4 -0
  290. package/dist/collection/components/date/date.js +1241 -0
  291. package/dist/collection/components/date/date.mask.js +189 -0
  292. package/dist/collection/components/date/date.picker.js +536 -0
  293. package/dist/collection/components/date/test/date.a11y.play.js +27 -0
  294. package/dist/collection/components/date/test/date.component.play.js +69 -0
  295. package/dist/collection/components/date/test/date.visual.play.js +43 -0
  296. package/dist/collection/components/divider/divider.host.css +1 -1
  297. package/dist/collection/components/divider/divider.js +11 -24
  298. package/dist/collection/components/drawer/drawer.host.css +1 -0
  299. package/dist/collection/{utils/property-checkers/constants.js → components/drawer/drawer.interfaces.js} +1 -1
  300. package/dist/collection/components/drawer/drawer.js +492 -0
  301. package/dist/collection/components/drawer/test/drawer.a11y.play.js +39 -0
  302. package/dist/collection/components/drawer/test/drawer.component.play.js +131 -0
  303. package/dist/collection/components/drawer/test/drawer.visual.play.js +31 -0
  304. package/dist/collection/components/file-upload/file-upload.host.css +1 -0
  305. package/dist/collection/components/file-upload/file-upload.i18n.js +55 -0
  306. package/dist/collection/components/file-upload/file-upload.interfaces.js +10 -0
  307. package/dist/collection/components/file-upload/file-upload.js +1030 -0
  308. package/dist/collection/components/file-upload/test/file-upload.a11y.play.js +52 -0
  309. package/dist/collection/components/file-upload/test/file-upload.component.play.js +124 -0
  310. package/dist/collection/components/file-upload/test/file-upload.visual.play.js +18 -0
  311. package/dist/collection/components/file-upload/utils/file-list.util.js +13 -0
  312. package/dist/collection/components/file-upload/utils/file-size.util.js +10 -0
  313. package/dist/collection/components/file-upload/utils/file-validation.util.js +48 -0
  314. package/dist/collection/components/footer/footer.host.css +1 -0
  315. package/dist/collection/components/footer/footer.i18n.js +155 -0
  316. package/dist/collection/components/footer/footer.interfaces.js +4 -0
  317. package/dist/collection/components/footer/footer.js +350 -0
  318. package/dist/collection/components/footer/test/footer.a11y.play.js +17 -0
  319. package/dist/collection/components/footer/test/footer.component.play.js +74 -0
  320. package/dist/collection/components/footer/test/footer.visual.play.js +16 -0
  321. package/dist/collection/components/form/test/form.visual.play.js +13 -1
  322. package/dist/collection/components/heading/heading.js +16 -17
  323. package/dist/collection/components/hint/hint-text/hint-text.js +28 -0
  324. package/dist/collection/components/hint/hint-title/hint-title.js +31 -0
  325. package/dist/collection/components/hint/hint.host.css +1 -0
  326. package/dist/collection/components/hint/hint.i18n.js +35 -0
  327. package/dist/collection/components/hint/hint.interfaces.js +1 -0
  328. package/dist/collection/components/hint/hint.js +410 -0
  329. package/dist/collection/components/hint/test/hint.a11y.play.js +41 -0
  330. package/dist/collection/components/hint/test/hint.component.play.js +110 -0
  331. package/dist/collection/components/hint/test/hint.visual.play.js +39 -0
  332. package/dist/collection/components/icon/icon.host.css +1 -1
  333. package/dist/collection/components/icon/icon.interfaces.js +1 -0
  334. package/dist/collection/components/icon/icon.js +73 -42
  335. package/dist/collection/components/icon/test/icon.component.play.js +23 -1
  336. package/dist/collection/components/input/clear-button.i18n.js +35 -0
  337. package/dist/collection/components/input/clear-button.util.js +11 -0
  338. package/dist/collection/components/input/input.host.css +1 -1
  339. package/dist/collection/components/input/input.js +36 -37
  340. package/dist/collection/components/input/test/input.component.play.js +1 -1
  341. package/dist/collection/components/input/trigger-button.i18n.js +45 -0
  342. package/dist/collection/components/label/label.js +16 -28
  343. package/dist/collection/components/list/item/item.host.css +1 -1
  344. package/dist/collection/components/list/item/item.interfaces.js +1 -1
  345. package/dist/collection/components/list/item/item.js +27 -34
  346. package/dist/collection/components/list/list.js +3 -10
  347. package/dist/collection/components/list/test/list.visual.play.js +30 -0
  348. package/dist/collection/components/logo/logo.js +11 -18
  349. package/dist/collection/components/modal/modal-body/modal-body.host.css +1 -0
  350. package/dist/collection/components/modal/modal-body/modal-body.js +41 -0
  351. package/dist/collection/components/modal/modal-header/modal-header.js +32 -0
  352. package/dist/collection/components/modal/modal.controller.js +31 -0
  353. package/dist/collection/components/modal/modal.host.css +1 -0
  354. package/dist/collection/components/modal/modal.interfaces.js +1 -0
  355. package/dist/collection/components/modal/modal.js +461 -0
  356. package/dist/collection/components/modal/test/modal.a11y.play.js +59 -0
  357. package/dist/collection/components/modal/test/modal.component.play.js +196 -0
  358. package/dist/collection/components/modal/test/modal.visual.play.js +36 -0
  359. package/dist/collection/components/navbar/navbar.host.css +1 -0
  360. package/dist/collection/components/navbar/navbar.i18n.js +65 -0
  361. package/dist/collection/components/navbar/navbar.interfaces.js +6 -0
  362. package/dist/collection/components/navbar/navbar.js +544 -0
  363. package/dist/collection/components/navbar/test/navbar.a11y.play.js +26 -0
  364. package/dist/collection/components/navbar/test/navbar.component.play.js +76 -0
  365. package/dist/collection/components/navbar/test/navbar.visual.play.js +14 -0
  366. package/dist/collection/components/notification/notification.js +14 -26
  367. package/dist/collection/components/number-input/number-input.host.css +1 -1
  368. package/dist/collection/components/number-input/number-input.js +23 -24
  369. package/dist/collection/components/pagination/pagination.host.css +1 -1
  370. package/dist/collection/components/pagination/pagination.js +29 -28
  371. package/dist/collection/components/popup/popup.host.css +1 -0
  372. package/dist/collection/components/popup/popup.interfaces.js +18 -0
  373. package/dist/collection/components/popup/popup.js +869 -0
  374. package/dist/collection/components/popup/test/popup.a11y.play.js +50 -0
  375. package/dist/collection/components/popup/test/popup.component.play.js +168 -0
  376. package/dist/collection/components/popup/test/popup.visual.play.js +33 -0
  377. package/dist/collection/components/progress-bar/progress-bar.host.css +1 -1
  378. package/dist/collection/components/progress-bar/progress-bar.js +13 -20
  379. package/dist/collection/components/radio/radio-group/radio-group.host.css +1 -1
  380. package/dist/collection/components/radio/radio-group/radio-group.js +22 -23
  381. package/dist/collection/components/radio/radio.js +19 -20
  382. package/dist/collection/components/segment/segment/segment.host.css +1 -1
  383. package/dist/collection/components/segment/segment/segment.js +19 -20
  384. package/dist/collection/components/segment/segment-item.js +6 -7
  385. package/dist/collection/components/select/select-optgroup.host.css +1 -0
  386. package/dist/collection/components/select/select-optgroup.js +82 -0
  387. package/dist/collection/components/select/select-option.host.css +1 -0
  388. package/dist/collection/components/select/select-option.js +112 -0
  389. package/dist/collection/components/select/select.host.css +1 -0
  390. package/dist/collection/components/select/select.i18n.js +45 -0
  391. package/dist/collection/components/select/select.interfaces.js +4 -0
  392. package/dist/collection/components/select/select.js +1024 -0
  393. package/dist/collection/components/select/select.picker.js +276 -0
  394. package/dist/collection/components/select/test/select.a11y.play.js +81 -0
  395. package/dist/collection/components/select/test/select.component.play.js +184 -0
  396. package/dist/collection/components/select/test/select.visual.play.js +70 -0
  397. package/dist/collection/components/shape/shape.js +7 -14
  398. package/dist/collection/components/spinner/spinner.js +18 -26
  399. package/dist/collection/components/stack/stack.host.css +1 -1
  400. package/dist/collection/components/stack/stack.js +41 -153
  401. package/dist/collection/components/steps/step/step.host.css +1 -0
  402. package/dist/collection/components/steps/step/step.js +431 -0
  403. package/dist/collection/components/steps/step-panel/step-panel.host.css +1 -0
  404. package/dist/collection/components/steps/step-panel/step-panel.js +104 -0
  405. package/dist/collection/components/steps/steps/steps.host.css +1 -0
  406. package/dist/collection/components/steps/steps/steps.js +356 -0
  407. package/dist/collection/components/steps/steps.interfaces.js +4 -0
  408. package/dist/collection/components/steps/test/steps.a11y.play.js +73 -0
  409. package/dist/collection/components/steps/test/steps.component.play.js +182 -0
  410. package/dist/collection/components/steps/test/steps.visual.play.js +18 -0
  411. package/dist/collection/components/tabs/tab/tab.host.css +1 -0
  412. package/dist/collection/components/tabs/tab/tab.js +278 -0
  413. package/dist/collection/components/tabs/tab-panel/tab-panel.host.css +1 -0
  414. package/dist/collection/components/tabs/tab-panel/tab-panel.js +104 -0
  415. package/dist/collection/components/tabs/tabs/tabs.host.css +1 -0
  416. package/dist/collection/components/tabs/tabs/tabs.i18n.js +45 -0
  417. package/dist/collection/components/tabs/tabs/tabs.js +552 -0
  418. package/dist/collection/components/tabs/tabs.interfaces.js +12 -0
  419. package/dist/collection/components/tabs/test/tabs.a11y.play.js +60 -0
  420. package/dist/collection/components/tabs/test/tabs.component.play.js +129 -0
  421. package/dist/collection/components/tabs/test/tabs.visual.play.js +31 -0
  422. package/dist/collection/components/tag/tag-group/tag-group.js +1 -1
  423. package/dist/collection/components/tag/tag.js +15 -26
  424. package/dist/collection/components/text/text.js +23 -30
  425. package/dist/collection/components/textarea/textarea.host.css +1 -1
  426. package/dist/collection/components/textarea/textarea.js +24 -25
  427. package/dist/collection/components/time-input/test/time-input.visual.play.js +18 -0
  428. package/dist/collection/components/toggle/toggle.js +19 -20
  429. package/dist/collection/components/tooltip/test/tooltip.a11y.play.js +32 -0
  430. package/dist/collection/components/tooltip/test/tooltip.component.play.js +51 -0
  431. package/dist/collection/components/tooltip/test/tooltip.visual.play.js +16 -0
  432. package/dist/collection/components/tooltip/tooltip.host.css +1 -0
  433. package/dist/collection/components/tooltip/tooltip.interfaces.js +4 -0
  434. package/dist/collection/components/tooltip/tooltip.js +407 -0
  435. package/dist/collection/foundation/colors.visual.play.js +18 -0
  436. package/dist/collection/global/config/config.const.js +11 -0
  437. package/dist/collection/global/config/config.default.js +92 -42
  438. package/dist/collection/global/config/config.js +1 -1
  439. package/dist/collection/global/config/config.meta.js +27 -0
  440. package/dist/collection/global/config/index.js +1 -0
  441. package/dist/collection/global/config/initialize.js +2 -1
  442. package/dist/collection/global/constants/tags.constant.js +29 -1
  443. package/dist/collection/global/constants/version.constant.js +1 -1
  444. package/dist/collection/global/index.js +0 -1
  445. package/dist/collection/global/initialize.js +2 -0
  446. package/dist/collection/index.js +5 -20
  447. package/dist/collection/utils/attributes.js +0 -15
  448. package/dist/collection/utils/focus.js +72 -0
  449. package/dist/collection/utils/form-control.js +1 -1
  450. package/dist/collection/utils/has-value.js +7 -0
  451. package/dist/collection/utils/helpers.js +14 -74
  452. package/dist/collection/utils/index.js +7 -5
  453. package/dist/collection/utils/{property-checkers/is-value-empty.js → is-value-empty.js} +1 -1
  454. package/dist/collection/utils/number.js +6 -25
  455. package/dist/collection/utils/property-decorators/array-of.js +25 -0
  456. package/dist/collection/utils/property-decorators/bound.js +79 -0
  457. package/dist/collection/utils/property-decorators/create-validator-decorator.js +212 -0
  458. package/dist/collection/utils/property-decorators/date.js +24 -0
  459. package/dist/collection/utils/property-decorators/index.js +12 -0
  460. package/dist/collection/utils/property-decorators/iso-date.js +24 -0
  461. package/dist/collection/utils/property-decorators/one-of.js +25 -0
  462. package/dist/collection/utils/property-decorators/pattern.js +25 -0
  463. package/dist/collection/utils/property-decorators/required.js +44 -0
  464. package/dist/collection/utils/property-decorators/type.js +28 -0
  465. package/dist/collection/utils/property-decorators/url.js +32 -0
  466. package/dist/collection/utils/property-types.js +1 -0
  467. package/dist/collection/utils/svg.js +19 -0
  468. package/dist/design-system/design-system.esm.js +1 -1
  469. package/dist/design-system/index.esm.js +1 -1
  470. package/dist/design-system/p-01430d5c28.entry.js +4 -0
  471. package/dist/design-system/p-014d464627.entry.js +4 -0
  472. package/dist/design-system/p-0663d7c0f1.entry.js +4 -0
  473. package/dist/design-system/p-0bd2ce2da3.entry.js +4 -0
  474. package/dist/design-system/p-0ff0be5b83.entry.js +4 -0
  475. package/dist/design-system/p-10c136d00d.entry.js +4 -0
  476. package/dist/design-system/p-11f34d0c7d.entry.js +4 -0
  477. package/dist/design-system/p-13d1ce3158.entry.js +4 -0
  478. package/dist/design-system/p-163d606781.entry.js +4 -0
  479. package/dist/design-system/p-1VXOIrN2.js +4 -0
  480. package/dist/design-system/p-202ecb8f01.entry.js +4 -0
  481. package/dist/design-system/p-27d181c5ac.entry.js +4 -0
  482. package/dist/design-system/p-2a35e0b9b0.entry.js +4 -0
  483. package/dist/design-system/p-2f51e1d39b.entry.js +4 -0
  484. package/dist/design-system/p-3134821ac6.entry.js +4 -0
  485. package/dist/design-system/p-3292ae6a05.entry.js +4 -0
  486. package/dist/design-system/p-372bf379f9.entry.js +4 -0
  487. package/dist/design-system/p-3895178b39.entry.js +4 -0
  488. package/dist/design-system/p-3c6b7a2967.entry.js +4 -0
  489. package/dist/design-system/p-3ef4bd1c59.entry.js +4 -0
  490. package/dist/design-system/p-493b18cc46.entry.js +4 -0
  491. package/dist/design-system/p-4a99464dae.entry.js +4 -0
  492. package/dist/design-system/p-4e6638d14e.entry.js +4 -0
  493. package/dist/design-system/p-53dda5d400.entry.js +4 -0
  494. package/dist/design-system/p-5d17209d91.entry.js +4 -0
  495. package/dist/design-system/p-5e51fa8df4.entry.js +4 -0
  496. package/dist/design-system/p-60d29d8b8e.entry.js +4 -0
  497. package/dist/design-system/p-62cb503015.entry.js +4 -0
  498. package/dist/design-system/p-650289138a.entry.js +4 -0
  499. package/dist/design-system/p-65c221261c.entry.js +4 -0
  500. package/dist/design-system/p-68c9f4f630.entry.js +4 -0
  501. package/dist/design-system/p-68ebed7eee.entry.js +4 -0
  502. package/dist/design-system/p-6b6531379b.entry.js +4 -0
  503. package/dist/design-system/p-6d168ba9ad.entry.js +4 -0
  504. package/dist/design-system/p-6ef31a3c07.entry.js +4 -0
  505. package/dist/design-system/p-774b89ed0b.entry.js +4 -0
  506. package/dist/design-system/p-787bd92bcc.entry.js +4 -0
  507. package/{components/p-E1SnOz0L.js → dist/design-system/p-78NZc8PM.js} +1 -1
  508. package/dist/design-system/p-7c353652a9.entry.js +4 -0
  509. package/dist/design-system/p-7c8bf0f33e.entry.js +4 -0
  510. package/dist/design-system/p-7e702193fc.entry.js +4 -0
  511. package/dist/design-system/p-8353961d39.entry.js +4 -0
  512. package/dist/design-system/{p-1d312498a6.entry.js → p-8406f6faf1.entry.js} +1 -1
  513. package/dist/design-system/p-9f2dd0b55b.entry.js +4 -0
  514. package/dist/design-system/p-B-en4B17.js +4 -0
  515. package/dist/design-system/p-B1e0kNRJ.js +14 -0
  516. package/dist/design-system/p-B8KVoKrH.js +5 -0
  517. package/dist/design-system/p-BAY6Z8bT.js +4 -0
  518. package/dist/design-system/p-BLGVE-7Z.js +4 -0
  519. package/dist/design-system/{p-C7EnKCpl.js → p-BMM6Nxeh.js} +1 -1
  520. package/{components/p-Diz11uvt.js → dist/design-system/p-BPGfTrrM.js} +1 -1
  521. package/dist/design-system/p-BhdSNuGP.js +4 -0
  522. package/dist/design-system/p-BkTv_bQR.js +4 -0
  523. package/dist/design-system/p-BqY0KzJC.js +4 -0
  524. package/dist/design-system/p-BrJFPhMA.js +4 -0
  525. package/dist/design-system/p-BvEM6oCl.js +4 -0
  526. package/dist/design-system/p-C1jqbZdf.js +4 -0
  527. package/dist/design-system/p-C6MVahkC.js +5 -0
  528. package/dist/design-system/{p-DCf2fJmI.js → p-C7i6xLTJ.js} +1 -1
  529. package/dist/design-system/p-CvTcEsXg.js +4 -0
  530. package/dist/design-system/p-CwCAiaMq.js +4 -0
  531. package/{components/p-5Sp1eJOt.js → dist/design-system/p-DTxLRTYr.js} +1 -1
  532. package/dist/design-system/{p-Dnjznncd.js → p-DgVaaZT_.js} +1 -1
  533. package/dist/design-system/{p-CAcwu8uP.js → p-Dm2lqE3-.js} +1 -1
  534. package/dist/design-system/p-HwbqEzpk.js +4 -0
  535. package/dist/design-system/p-LCY5n5tq.js +4 -0
  536. package/dist/design-system/p-Uy_dVz21.js +4 -0
  537. package/dist/design-system/p-a465c1acce.entry.js +4 -0
  538. package/dist/design-system/p-a62b7985a0.entry.js +4 -0
  539. package/dist/design-system/p-a8de98dd7b.entry.js +4 -0
  540. package/dist/design-system/p-ad2b17b0a0.entry.js +4 -0
  541. package/dist/design-system/p-afd8bbe699.entry.js +4 -0
  542. package/dist/design-system/{p-7e6ed497e7.entry.js → p-b68bc14064.entry.js} +1 -1
  543. package/dist/design-system/p-b955a93959.entry.js +4 -0
  544. package/dist/design-system/p-c37f266740.entry.js +4 -0
  545. package/dist/design-system/p-caad93b943.entry.js +4 -0
  546. package/dist/design-system/p-cca79bfeb1.entry.js +4 -0
  547. package/dist/design-system/p-d5f8d8f5e1.entry.js +4 -0
  548. package/dist/design-system/p-dcb749efc7.entry.js +4 -0
  549. package/dist/design-system/p-dd38f8f206.entry.js +4 -0
  550. package/dist/design-system/p-ddf2a7dfee.entry.js +4 -0
  551. package/dist/design-system/p-df5899b930.entry.js +4 -0
  552. package/dist/design-system/p-e7472337ed.entry.js +4 -0
  553. package/dist/design-system/p-e85c92ca1a.entry.js +4 -0
  554. package/dist/design-system/p-f0119fe693.entry.js +4 -0
  555. package/dist/design-system/p-f4958b9e97.entry.js +4 -0
  556. package/dist/design-system/p-f62643c33d.entry.js +4 -0
  557. package/dist/design-system/p-fa9568abce.entry.js +4 -0
  558. package/dist/design-system/p-fcd98f22b7.entry.js +4 -0
  559. package/dist/design-system/p-feeef4a8cb.entry.js +4 -0
  560. package/dist/design-system/{p-BLPSziW-.js → p-hLAmwHiq.js} +1 -1
  561. package/dist/design-system/p-ij4OEkzJ.js +4 -0
  562. package/dist/design-system/p-tl_BegdE.js +4 -0
  563. package/dist/esm/array-dJH4dfMr.js +1983 -0
  564. package/dist/esm/{breakpoints.decorator-L2xeP46f.js → breakpoints.decorator-DZ0xN4Np.js} +1 -1
  565. package/dist/esm/{breakpoints.subject-BhbzG-rl.js → breakpoints.subject-BNnXcKMw.js} +3 -3
  566. package/dist/esm/{button.interfaces-BkESlUMc.js → button.interfaces-BPGfTrrM.js} +1 -1
  567. package/dist/esm/carousel.interfaces-B-en4B17.js +8 -0
  568. package/dist/esm/{config.decorator-BQNIja4k.js → config.decorator-ZQ0_Zx5y.js} +1 -1
  569. package/dist/esm/{config.utils-COlKFRlV.js → config.utils-D9o7rffC.js} +1 -1
  570. package/dist/esm/create-validator-decorator-DovxquEu.js +208 -0
  571. package/dist/esm/design-system.js +4 -4
  572. package/dist/esm/{device-Dhwt3m7W.js → device-CRuIJzXR.js} +1 -1
  573. package/dist/esm/ds-accordion.entry.js +30 -34
  574. package/dist/esm/ds-alert-container.entry.js +12 -15
  575. package/dist/esm/ds-app.entry.js +16 -6
  576. package/dist/esm/ds-badge.entry.js +32 -25
  577. package/dist/esm/ds-button-group.entry.js +14 -17
  578. package/dist/esm/ds-button_2.entry.js +58 -73
  579. package/dist/esm/ds-card-actions.entry.js +6 -8
  580. package/dist/esm/ds-card-content.entry.js +2 -2
  581. package/dist/esm/ds-card-header.entry.js +8 -5
  582. package/dist/esm/ds-card-subtitle.entry.js +13 -13
  583. package/dist/esm/ds-card-title.entry.js +11 -7
  584. package/dist/esm/ds-card.entry.js +30 -42
  585. package/dist/esm/ds-carousel-item.entry.js +126 -0
  586. package/dist/esm/ds-carousel.entry.js +471 -0
  587. package/dist/esm/ds-checkbox-group.entry.js +40 -2011
  588. package/dist/esm/ds-checkbox.entry.js +23 -19
  589. package/dist/esm/ds-content_2.entry.js +327 -0
  590. package/dist/esm/ds-data-item.entry.js +144 -0
  591. package/dist/esm/ds-data-label.entry.js +39 -0
  592. package/dist/esm/ds-data-value.entry.js +29 -0
  593. package/dist/esm/ds-data.entry.js +41 -0
  594. package/dist/esm/ds-date.entry.js +5332 -0
  595. package/dist/esm/{ds-logo.entry.js → ds-divider_2.entry.js} +130 -26
  596. package/dist/esm/ds-drawer_2.entry.js +599 -0
  597. package/dist/esm/ds-file-upload.entry.js +513 -0
  598. package/dist/esm/ds-footer.entry.js +157 -0
  599. package/dist/esm/ds-heading.entry.js +21 -19
  600. package/dist/esm/ds-hint-text.entry.js +26 -0
  601. package/dist/esm/ds-hint-title.entry.js +29 -0
  602. package/dist/esm/ds-hint.entry.js +241 -0
  603. package/dist/esm/ds-icon_2.entry.js +78 -70
  604. package/dist/esm/ds-input.entry.js +46 -44
  605. package/dist/esm/ds-item.entry.js +29 -34
  606. package/dist/esm/ds-label.entry.js +22 -30
  607. package/dist/esm/ds-list.entry.js +6 -12
  608. package/dist/esm/ds-modal-body.entry.js +32 -0
  609. package/dist/esm/ds-modal-header.entry.js +29 -0
  610. package/dist/esm/ds-modal.entry.js +199 -0
  611. package/dist/esm/ds-navbar.entry.js +357 -0
  612. package/dist/esm/ds-notification.entry.js +19 -27
  613. package/dist/esm/ds-number-input.entry.js +129 -46
  614. package/dist/esm/ds-pagination.entry.js +41 -37
  615. package/dist/esm/ds-progress-bar.entry.js +25 -29
  616. package/dist/esm/ds-radio-group.entry.js +31 -30
  617. package/dist/esm/ds-radio.entry.js +25 -32
  618. package/dist/esm/ds-segment-item.entry.js +9 -9
  619. package/dist/esm/ds-segment.entry.js +28 -116
  620. package/dist/esm/ds-select-optgroup.entry.js +47 -0
  621. package/dist/esm/ds-select-option.entry.js +55 -0
  622. package/dist/esm/ds-select.entry.js +2770 -0
  623. package/dist/esm/ds-shape.entry.js +10 -16
  624. package/dist/esm/ds-snackbar.entry.js +40 -57
  625. package/dist/esm/ds-step-panel.entry.js +53 -0
  626. package/dist/esm/ds-step.entry.js +168 -0
  627. package/dist/esm/ds-steps.entry.js +225 -0
  628. package/dist/esm/ds-tab-panel.entry.js +53 -0
  629. package/dist/esm/ds-tab.entry.js +118 -0
  630. package/dist/esm/ds-tabs.entry.js +362 -0
  631. package/dist/esm/ds-tag-group.entry.js +3 -3
  632. package/dist/esm/ds-tag.entry.js +19 -26
  633. package/dist/esm/ds-text.entry.js +28 -32
  634. package/dist/esm/ds-textarea.entry.js +33 -32
  635. package/dist/esm/ds-toast.entry.js +40 -54
  636. package/dist/esm/ds-toggle.entry.js +22 -21
  637. package/dist/esm/ds-tooltip.entry.js +180 -0
  638. package/dist/esm/{field.util-BXxRO7CD.js → field.util-BjZzAi09.js} +1 -1
  639. package/dist/esm/floating-ui.dom-BqY0KzJC.js +1621 -0
  640. package/dist/esm/focus-ZxHImoOj.js +1956 -0
  641. package/dist/esm/footer.i18n-BrJFPhMA.js +159 -0
  642. package/dist/esm/{form-control-D2O-sb65.js → form-control-DvJo0GKN.js} +2 -2
  643. package/dist/esm/has-value-DU9L2JaI.js +10 -0
  644. package/dist/esm/{index-CuwLeg-T.js → index-C6MVahkC.js} +496 -175
  645. package/dist/esm/index.js +13 -8273
  646. package/dist/esm/{input.interfaces-C7EnKCpl.js → input.interfaces-BMM6Nxeh.js} +1 -1
  647. package/dist/esm/keyboard-Uy_dVz21.js +20 -0
  648. package/dist/esm/{listener-C_kjUVTE.js → listener-DHP2OPMZ.js} +1 -1
  649. package/dist/esm/loader.js +3 -3
  650. package/dist/esm/luxon-C1jqbZdf.js +8133 -0
  651. package/dist/esm/one-of-CKPv0Nqm.js +28 -0
  652. package/dist/esm/popup.interfaces-BAY6Z8bT.js +20 -0
  653. package/dist/esm/required-Dqsbx5fH.js +36 -0
  654. package/dist/esm/resize.decorator-B8h8D676.js +96 -0
  655. package/dist/esm/scroll-CsH7NHo5.js +87 -0
  656. package/dist/esm/svg-B8KVoKrH.js +2440 -0
  657. package/dist/esm/{tslib.es6-tdchDLyb.js → tslib.es6-C9GKXw-5.js} +1 -1
  658. package/dist/esm/type-DzkhLOG_.js +31 -0
  659. package/dist/types/components/accordion/accordion.d.ts +0 -5
  660. package/dist/types/components/alert/alert-container.d.ts +0 -5
  661. package/dist/types/components/alert/snackbar/snackbar.d.ts +0 -5
  662. package/dist/types/components/alert/toast/toast.d.ts +0 -5
  663. package/dist/types/components/badge/badge.d.ts +1 -3
  664. package/dist/types/components/badge/badge.interfaces.d.ts +1 -1
  665. package/dist/types/components/button/button-group/button-group.d.ts +0 -5
  666. package/dist/types/components/button/button.d.ts +1 -3
  667. package/dist/types/components/button/button.interfaces.d.ts +1 -1
  668. package/dist/types/components/card/card-actions/card-actions.d.ts +0 -1
  669. package/dist/types/components/card/card-subtitle/card-subtitle.d.ts +0 -1
  670. package/dist/types/components/card/card.d.ts +1 -3
  671. package/dist/types/components/carousel/carousel/carousel.d.ts +114 -0
  672. package/dist/types/components/carousel/carousel/carousel.i18n.d.ts +9 -0
  673. package/dist/types/components/carousel/carousel-item/carousel-item.d.ts +70 -0
  674. package/dist/types/components/carousel/carousel.interfaces.d.ts +14 -0
  675. package/dist/types/components/carousel/test/carousel.a11y.play.d.ts +1 -0
  676. package/dist/types/components/carousel/test/carousel.component.play.d.ts +1 -0
  677. package/dist/types/components/carousel/test/carousel.visual.play.d.ts +1 -0
  678. package/dist/types/components/close/close.d.ts +1 -3
  679. package/dist/types/components/content/content.d.ts +2 -5
  680. package/dist/types/components/data/data-item.d.ts +43 -0
  681. package/dist/types/components/data/data-item.i18n.d.ts +6 -0
  682. package/dist/types/components/data/data-item.interfaces.d.ts +4 -0
  683. package/dist/types/components/data/data-label.d.ts +19 -0
  684. package/dist/types/components/data/data-label.interfaces.d.ts +3 -0
  685. package/dist/types/components/data/data-value.d.ts +15 -0
  686. package/dist/types/components/data/data-value.interfaces.d.ts +5 -0
  687. package/dist/types/components/data/data.d.ts +19 -0
  688. package/dist/types/components/data/data.interfaces.d.ts +4 -0
  689. package/dist/types/components/data/test/data.a11y.play.d.ts +1 -0
  690. package/dist/types/components/data/test/data.component.play.d.ts +1 -0
  691. package/dist/types/components/data/test/data.visual.play.d.ts +1 -0
  692. package/dist/types/components/date/date.d.ts +214 -0
  693. package/dist/types/components/date/date.i18n.d.ts +13 -0
  694. package/dist/types/components/date/date.interfaces.d.ts +18 -0
  695. package/dist/types/components/date/date.mask.d.ts +29 -0
  696. package/dist/types/components/date/date.picker.d.ts +67 -0
  697. package/dist/types/components/date/test/date.a11y.play.d.ts +1 -0
  698. package/dist/types/components/date/test/date.component.play.d.ts +1 -0
  699. package/dist/types/components/date/test/date.visual.play.d.ts +1 -0
  700. package/dist/types/components/divider/divider.d.ts +1 -3
  701. package/dist/types/components/drawer/drawer.d.ts +102 -0
  702. package/dist/types/components/drawer/drawer.interfaces.d.ts +8 -0
  703. package/dist/types/components/drawer/test/drawer.a11y.play.d.ts +1 -0
  704. package/dist/types/components/drawer/test/drawer.component.play.d.ts +1 -0
  705. package/dist/types/components/drawer/test/drawer.visual.play.d.ts +1 -0
  706. package/dist/types/components/file-upload/file-upload.d.ts +192 -0
  707. package/dist/types/components/file-upload/file-upload.i18n.d.ts +8 -0
  708. package/dist/types/components/file-upload/file-upload.interfaces.d.ts +24 -0
  709. package/dist/types/components/file-upload/test/file-upload.a11y.play.d.ts +1 -0
  710. package/dist/types/components/file-upload/test/file-upload.component.play.d.ts +1 -0
  711. package/dist/types/components/file-upload/test/file-upload.visual.play.d.ts +1 -0
  712. package/dist/types/components/file-upload/utils/file-list.util.d.ts +2 -0
  713. package/dist/types/components/file-upload/utils/file-size.util.d.ts +1 -0
  714. package/dist/types/components/file-upload/utils/file-validation.util.d.ts +13 -0
  715. package/dist/types/components/footer/footer.d.ts +68 -0
  716. package/dist/types/components/footer/footer.i18n.d.ts +7 -0
  717. package/dist/types/components/footer/footer.interfaces.d.ts +19 -0
  718. package/dist/types/components/footer/test/footer.a11y.play.d.ts +1 -0
  719. package/dist/types/components/footer/test/footer.component.play.d.ts +1 -0
  720. package/dist/types/components/footer/test/footer.visual.play.d.ts +1 -0
  721. package/dist/types/components/hint/hint-text/hint-text.d.ts +15 -0
  722. package/dist/types/components/hint/hint-title/hint-title.d.ts +16 -0
  723. package/dist/types/components/hint/hint.d.ts +87 -0
  724. package/dist/types/components/hint/hint.i18n.d.ts +6 -0
  725. package/dist/types/components/hint/hint.interfaces.d.ts +4 -0
  726. package/dist/types/components/hint/test/hint.a11y.play.d.ts +1 -0
  727. package/dist/types/components/hint/test/hint.component.play.d.ts +1 -0
  728. package/dist/types/components/hint/test/hint.visual.play.d.ts +1 -0
  729. package/dist/types/components/icon/icon.d.ts +7 -3
  730. package/dist/types/components/icon/icon.interfaces.d.ts +1 -1
  731. package/dist/types/components/input/clear-button.i18n.d.ts +6 -0
  732. package/dist/types/components/input/clear-button.util.d.ts +10 -0
  733. package/dist/types/components/input/trigger-button.i18n.d.ts +7 -0
  734. package/dist/types/components/label/label.d.ts +3 -5
  735. package/dist/types/components/list/item/item.d.ts +0 -5
  736. package/dist/types/components/list/item/item.interfaces.d.ts +1 -1
  737. package/dist/types/components/list/list.d.ts +0 -5
  738. package/dist/types/components/list/test/list.visual.play.d.ts +1 -0
  739. package/dist/types/components/logo/logo.d.ts +1 -2
  740. package/dist/types/components/modal/modal-body/modal-body.d.ts +15 -0
  741. package/dist/types/components/modal/modal-header/modal-header.d.ts +17 -0
  742. package/dist/types/components/modal/modal.controller.d.ts +3 -0
  743. package/dist/types/components/modal/modal.d.ts +97 -0
  744. package/dist/types/components/modal/modal.interfaces.d.ts +15 -0
  745. package/dist/types/components/modal/test/modal.a11y.play.d.ts +1 -0
  746. package/dist/types/components/modal/test/modal.component.play.d.ts +1 -0
  747. package/dist/types/components/modal/test/modal.visual.play.d.ts +1 -0
  748. package/dist/types/components/navbar/navbar.d.ts +128 -0
  749. package/dist/types/components/navbar/navbar.i18n.d.ts +9 -0
  750. package/dist/types/components/navbar/navbar.interfaces.d.ts +10 -0
  751. package/dist/types/components/navbar/test/navbar.a11y.play.d.ts +1 -0
  752. package/dist/types/components/navbar/test/navbar.component.play.d.ts +1 -0
  753. package/dist/types/components/navbar/test/navbar.visual.play.d.ts +1 -0
  754. package/dist/types/components/notification/notification.d.ts +1 -3
  755. package/dist/types/components/pagination/pagination.d.ts +0 -5
  756. package/dist/types/components/popup/popup.d.ts +152 -0
  757. package/dist/types/components/popup/popup.interfaces.d.ts +14 -0
  758. package/dist/types/components/popup/test/popup.a11y.play.d.ts +1 -0
  759. package/dist/types/components/popup/test/popup.component.play.d.ts +1 -0
  760. package/dist/types/components/popup/test/popup.visual.play.d.ts +1 -0
  761. package/dist/types/components/progress-bar/progress-bar.d.ts +0 -5
  762. package/dist/types/components/select/select-optgroup.d.ts +28 -0
  763. package/dist/types/components/select/select-option.d.ts +34 -0
  764. package/dist/types/components/select/select.d.ts +193 -0
  765. package/dist/types/components/select/select.i18n.d.ts +7 -0
  766. package/dist/types/components/select/select.interfaces.d.ts +16 -0
  767. package/dist/types/components/select/select.picker.d.ts +57 -0
  768. package/dist/types/components/select/test/select.a11y.play.d.ts +1 -0
  769. package/dist/types/components/select/test/select.component.play.d.ts +1 -0
  770. package/dist/types/components/select/test/select.visual.play.d.ts +1 -0
  771. package/dist/types/components/shape/shape.d.ts +2 -7
  772. package/dist/types/components/spinner/spinner.d.ts +0 -2
  773. package/dist/types/components/stack/stack.d.ts +7 -19
  774. package/dist/types/components/steps/step/step.d.ts +89 -0
  775. package/dist/types/components/steps/step-panel/step-panel.d.ts +34 -0
  776. package/dist/types/components/steps/steps/steps.d.ts +77 -0
  777. package/dist/types/components/steps/steps.interfaces.d.ts +10 -0
  778. package/dist/types/components/steps/test/steps.a11y.play.d.ts +1 -0
  779. package/dist/types/components/steps/test/steps.component.play.d.ts +1 -0
  780. package/dist/types/components/steps/test/steps.visual.play.d.ts +1 -0
  781. package/dist/types/components/tabs/tab/tab.d.ts +67 -0
  782. package/dist/types/components/tabs/tab-panel/tab-panel.d.ts +34 -0
  783. package/dist/types/components/tabs/tabs/tabs.d.ts +97 -0
  784. package/dist/types/components/tabs/tabs/tabs.i18n.d.ts +7 -0
  785. package/dist/types/components/tabs/tabs.interfaces.d.ts +12 -0
  786. package/dist/types/components/tabs/test/tabs.a11y.play.d.ts +1 -0
  787. package/dist/types/components/tabs/test/tabs.component.play.d.ts +1 -0
  788. package/dist/types/components/tabs/test/tabs.visual.play.d.ts +1 -0
  789. package/dist/types/components/tag/tag.d.ts +1 -3
  790. package/dist/types/components/text/text.d.ts +2 -7
  791. package/dist/types/components/time-input/test/time-input.visual.play.d.ts +1 -0
  792. package/dist/types/components/tooltip/test/tooltip.a11y.play.d.ts +1 -0
  793. package/dist/types/components/tooltip/test/tooltip.component.play.d.ts +1 -0
  794. package/dist/types/components/tooltip/test/tooltip.visual.play.d.ts +1 -0
  795. package/dist/types/components/tooltip/tooltip.d.ts +85 -0
  796. package/dist/types/components/tooltip/tooltip.interfaces.d.ts +10 -0
  797. package/dist/types/components.d.ts +4913 -1926
  798. package/dist/types/foundation/colors.visual.play.d.ts +1 -0
  799. package/dist/types/global/config/config.const.d.ts +3 -0
  800. package/dist/types/global/config/config.default.d.ts +0 -40
  801. package/dist/types/global/config/config.meta.d.ts +2 -0
  802. package/dist/types/global/config/config.types.d.ts +27 -0
  803. package/dist/types/global/config/index.d.ts +1 -0
  804. package/dist/types/global/index.d.ts +0 -1
  805. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/carousel.po.d.ts +12 -0
  806. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/data-item.po.d.ts +16 -0
  807. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/data.po.d.ts +12 -0
  808. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/date.po.d.ts +15 -0
  809. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/drawer.po.d.ts +11 -0
  810. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/file-upload.po.d.ts +16 -0
  811. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/footer.po.d.ts +16 -0
  812. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/hint.po.d.ts +10 -0
  813. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/index.d.ts +15 -0
  814. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/modal.po.d.ts +15 -0
  815. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/navbar.po.d.ts +13 -0
  816. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/popup.po.d.ts +11 -0
  817. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/select.po.d.ts +24 -0
  818. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/steps.po.d.ts +13 -0
  819. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/tabs.po.d.ts +13 -0
  820. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/tooltip.po.d.ts +6 -0
  821. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/page/utils/goto.d.ts +1 -1
  822. package/dist/types/index.d.ts +4 -1
  823. package/dist/types/stencil-public-runtime.d.ts +1 -0
  824. package/dist/types/utils/attributes.d.ts +0 -8
  825. package/dist/types/utils/focus.d.ts +18 -0
  826. package/dist/types/utils/form-control.d.ts +2 -2
  827. package/dist/types/utils/has-value.d.ts +1 -0
  828. package/dist/types/utils/index.d.ts +7 -5
  829. package/dist/types/utils/number.d.ts +0 -3
  830. package/dist/types/utils/property-decorators/array-of.d.ts +9 -0
  831. package/dist/types/utils/property-decorators/bound.d.ts +36 -0
  832. package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +48 -0
  833. package/dist/types/utils/property-decorators/date.d.ts +6 -0
  834. package/dist/types/utils/property-decorators/index.d.ts +9 -0
  835. package/dist/types/utils/property-decorators/iso-date.d.ts +6 -0
  836. package/dist/types/utils/property-decorators/one-of.d.ts +8 -0
  837. package/dist/types/utils/property-decorators/pattern.d.ts +8 -0
  838. package/dist/types/utils/property-decorators/required.d.ts +17 -0
  839. package/dist/types/utils/property-decorators/type.d.ts +9 -0
  840. package/dist/types/utils/property-decorators/url.d.ts +6 -0
  841. package/dist/types/utils/svg.d.ts +2 -0
  842. package/docs/cem.json +17659 -0
  843. package/docs/components.json +38767 -17409
  844. package/docs/html.html-data.json +1529 -147
  845. package/docs/tags.json +29 -1
  846. package/package.json +45 -38
  847. package/sbom.cdx.json +54391 -0
  848. package/README.md +0 -33
  849. package/components/p-82RSSk25.js +0 -4
  850. package/components/p-BEngECpF.js +0 -4
  851. package/components/p-BMBthpLd.js +0 -4
  852. package/components/p-BNY3JzuV.js +0 -4
  853. package/components/p-BOTkpyFe.js +0 -5
  854. package/components/p-BOgMmRCt.js +0 -4
  855. package/components/p-CDYlUuhB.js +0 -4
  856. package/components/p-Cb75Rr6o.js +0 -4
  857. package/components/p-CojUmpFm.js +0 -4
  858. package/components/p-DHeVI6dR.js +0 -4
  859. package/components/p-DTPbL3uY.js +0 -4
  860. package/components/p-DnnGnukM.js +0 -4
  861. package/components/p-DtuTnY5l.js +0 -4
  862. package/components/p-JZ1uDtZv.js +0 -4
  863. package/components/p-cSbDziZm.js +0 -4
  864. package/components/p-gA-94RPS.js +0 -4
  865. package/components/p-xDEngwqW.js +0 -4
  866. package/dist/cjs/contact-SPfz2A_q.js +0 -1647
  867. package/dist/cjs/ds-content.cjs.entry.js +0 -154
  868. package/dist/cjs/ds-divider.cjs.entry.js +0 -131
  869. package/dist/cjs/ds-stack.cjs.entry.js +0 -224
  870. package/dist/cjs/isEmpty-BmKp4bH4.js +0 -99
  871. package/dist/cjs/stack.interfaces-6vlKvBmb.js +0 -68
  872. package/dist/cjs/svg-D7Mwbcvp.js +0 -1482
  873. package/dist/cjs/validate.decorator-C9-9HA0Y.js +0 -115
  874. package/dist/collection/global/constants/icons.constant.js +0 -42
  875. package/dist/collection/utils/element-states/element-states.decorator.js +0 -23
  876. package/dist/collection/utils/element-states/element-states.listener.js +0 -55
  877. package/dist/collection/utils/element-states/element-states.subject.js +0 -24
  878. package/dist/collection/utils/element-states/index.js +0 -5
  879. package/dist/collection/utils/keyboard/index.js +0 -6
  880. package/dist/collection/utils/keyboard/keyboard.decorator.js +0 -23
  881. package/dist/collection/utils/keyboard/keyboard.listener.js +0 -34
  882. package/dist/collection/utils/keyboard/keyboard.subject.js +0 -24
  883. package/dist/collection/utils/property-checkers/check-array-of.js +0 -13
  884. package/dist/collection/utils/property-checkers/check-date.js +0 -18
  885. package/dist/collection/utils/property-checkers/check-iso-date.js +0 -14
  886. package/dist/collection/utils/property-checkers/check-one-of.js +0 -13
  887. package/dist/collection/utils/property-checkers/check-pattern.js +0 -13
  888. package/dist/collection/utils/property-checkers/check-type.js +0 -20
  889. package/dist/collection/utils/property-checkers/check-url.js +0 -20
  890. package/dist/collection/utils/property-checkers/empty-or.js +0 -15
  891. package/dist/collection/utils/property-checkers/index.js +0 -57
  892. package/dist/collection/utils/property-checkers/required-and.js +0 -20
  893. package/dist/collection/utils/swipe/index.js +0 -6
  894. package/dist/collection/utils/swipe/swipe.decorator.js +0 -23
  895. package/dist/collection/utils/swipe/swipe.listener.js +0 -33
  896. package/dist/collection/utils/swipe/swipe.subject.js +0 -28
  897. package/dist/collection/utils/validate.decorator.js +0 -203
  898. package/dist/design-system/p-03bbcdf9de.entry.js +0 -4
  899. package/dist/design-system/p-1154323457.entry.js +0 -4
  900. package/dist/design-system/p-1f0601a4f4.entry.js +0 -4
  901. package/dist/design-system/p-21b080a49a.entry.js +0 -4
  902. package/dist/design-system/p-27c34c4e5f.entry.js +0 -4
  903. package/dist/design-system/p-2b91de302f.entry.js +0 -4
  904. package/dist/design-system/p-31c1235ac5.entry.js +0 -4
  905. package/dist/design-system/p-3259acaa64.entry.js +0 -4
  906. package/dist/design-system/p-339d85cca0.entry.js +0 -4
  907. package/dist/design-system/p-35e63b52e7.entry.js +0 -4
  908. package/dist/design-system/p-363f3a7ab4.entry.js +0 -4
  909. package/dist/design-system/p-3d901720f7.entry.js +0 -4
  910. package/dist/design-system/p-40ba8b9812.entry.js +0 -4
  911. package/dist/design-system/p-432430e14f.entry.js +0 -4
  912. package/dist/design-system/p-487807f228.entry.js +0 -4
  913. package/dist/design-system/p-4a049d1b7f.entry.js +0 -4
  914. package/dist/design-system/p-4f4cce8ce4.entry.js +0 -4
  915. package/dist/design-system/p-5a901a9b8e.entry.js +0 -4
  916. package/dist/design-system/p-5d3330bf93.entry.js +0 -4
  917. package/dist/design-system/p-640223834c.entry.js +0 -4
  918. package/dist/design-system/p-6b9aab417f.entry.js +0 -4
  919. package/dist/design-system/p-799705af3a.entry.js +0 -4
  920. package/dist/design-system/p-82RSSk25.js +0 -4
  921. package/dist/design-system/p-8e0872fef0.entry.js +0 -4
  922. package/dist/design-system/p-9617d56181.entry.js +0 -4
  923. package/dist/design-system/p-BaIoYrFa.js +0 -5
  924. package/dist/design-system/p-Cb75Rr6o.js +0 -4
  925. package/dist/design-system/p-CqZ6YSy9.js +0 -4
  926. package/dist/design-system/p-CqzM3doy.js +0 -4
  927. package/dist/design-system/p-CuwLeg-T.js +0 -5
  928. package/dist/design-system/p-DTPbL3uY.js +0 -4
  929. package/dist/design-system/p-aff68865ee.entry.js +0 -4
  930. package/dist/design-system/p-b3c6327744.entry.js +0 -4
  931. package/dist/design-system/p-be9023a38b.entry.js +0 -4
  932. package/dist/design-system/p-c031d1dce5.entry.js +0 -4
  933. package/dist/design-system/p-c3ae96e220.entry.js +0 -4
  934. package/dist/design-system/p-d430812a57.entry.js +0 -4
  935. package/dist/design-system/p-de1354f022.entry.js +0 -4
  936. package/dist/design-system/p-e3d0c82e2a.entry.js +0 -4
  937. package/dist/design-system/p-ea1a5e1f75.entry.js +0 -4
  938. package/dist/design-system/p-ea7169501c.entry.js +0 -4
  939. package/dist/design-system/p-eab397e041.entry.js +0 -4
  940. package/dist/design-system/p-ecba4deb9a.entry.js +0 -4
  941. package/dist/design-system/p-fe0dbd4b03.entry.js +0 -4
  942. package/dist/design-system/p-ng5ZzTOj.js +0 -4
  943. package/dist/esm/contact-Cb75Rr6o.js +0 -1636
  944. package/dist/esm/ds-content.entry.js +0 -152
  945. package/dist/esm/ds-divider.entry.js +0 -129
  946. package/dist/esm/ds-stack.entry.js +0 -222
  947. package/dist/esm/isEmpty-DmZYZqE9.js +0 -97
  948. package/dist/esm/stack.interfaces-ng5ZzTOj.js +0 -62
  949. package/dist/esm/svg-BaIoYrFa.js +0 -1480
  950. package/dist/esm/validate.decorator-82RSSk25.js +0 -110
  951. package/dist/types/global/constants/icons.constant.d.ts +0 -38
  952. package/dist/types/utils/element-states/element-states.decorator.d.ts +0 -3
  953. package/dist/types/utils/element-states/element-states.interfaces.d.ts +0 -10
  954. package/dist/types/utils/element-states/element-states.listener.d.ts +0 -15
  955. package/dist/types/utils/element-states/element-states.subject.d.ts +0 -8
  956. package/dist/types/utils/element-states/index.d.ts +0 -2
  957. package/dist/types/utils/keyboard/index.d.ts +0 -3
  958. package/dist/types/utils/keyboard/keyboard.decorator.d.ts +0 -3
  959. package/dist/types/utils/keyboard/keyboard.interfaces.d.ts +0 -8
  960. package/dist/types/utils/keyboard/keyboard.listener.d.ts +0 -9
  961. package/dist/types/utils/keyboard/keyboard.subject.d.ts +0 -8
  962. package/dist/types/utils/property-checkers/check-array-of.d.ts +0 -2
  963. package/dist/types/utils/property-checkers/check-date.d.ts +0 -1
  964. package/dist/types/utils/property-checkers/check-iso-date.d.ts +0 -1
  965. package/dist/types/utils/property-checkers/check-one-of.d.ts +0 -1
  966. package/dist/types/utils/property-checkers/check-pattern.d.ts +0 -1
  967. package/dist/types/utils/property-checkers/check-type.d.ts +0 -2
  968. package/dist/types/utils/property-checkers/check-url.d.ts +0 -1
  969. package/dist/types/utils/property-checkers/constants.d.ts +0 -1
  970. package/dist/types/utils/property-checkers/empty-or.d.ts +0 -1
  971. package/dist/types/utils/property-checkers/index.d.ts +0 -19
  972. package/dist/types/utils/property-checkers/required-and.d.ts +0 -1
  973. package/dist/types/utils/swipe/index.d.ts +0 -3
  974. package/dist/types/utils/swipe/swipe.decorator.d.ts +0 -5
  975. package/dist/types/utils/swipe/swipe.interfaces.d.ts +0 -10
  976. package/dist/types/utils/swipe/swipe.listener.d.ts +0 -10
  977. package/dist/types/utils/swipe/swipe.subject.d.ts +0 -11
  978. package/dist/types/utils/validate.decorator.d.ts +0 -114
  979. /package/dist/collection/{utils/element-states/element-states.interfaces.js → components/data/data-item.interfaces.js} +0 -0
  980. /package/dist/collection/{utils/keyboard/keyboard.interfaces.js → components/data/data-label.interfaces.js} +0 -0
  981. /package/dist/collection/{utils/property-checkers/property-types.js → components/data/data-value.interfaces.js} +0 -0
  982. /package/dist/collection/{utils/swipe/swipe.interfaces.js → components/data/data.interfaces.js} +0 -0
  983. /package/dist/collection/utils/{property-checkers/is-iso-date.js → is-iso-date.js} +0 -0
  984. /package/dist/collection/utils/{keyboard/keyboard.helpers.js → keyboard.js} +0 -0
  985. /package/dist/types/utils/{property-checkers/is-iso-date.d.ts → is-iso-date.d.ts} +0 -0
  986. /package/dist/types/utils/{property-checkers/is-value-empty.d.ts → is-value-empty.d.ts} +0 -0
  987. /package/dist/types/utils/{keyboard/keyboard.helpers.d.ts → keyboard.d.ts} +0 -0
  988. /package/dist/types/utils/{property-checkers/property-types.d.ts → property-types.d.ts} +0 -0
@@ -0,0 +1,1958 @@
1
+ /*!
2
+ * (C) Helvetia Design System https://design.baloise.dev/ - Apache License 2.0
3
+ */
4
+ 'use strict';
5
+
6
+ var index = require('./index-sC3JnTlJ.js');
7
+
8
+ /*!
9
+ * tabbable 6.5.0
10
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
11
+ */
12
+ // NOTE: separate `:not()` selectors has broader browser support than the newer
13
+ // `:not([inert], [inert] *)` (Feb 2023)
14
+ var candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'area[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];
15
+ var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
16
+ var NoElement = typeof Element === 'undefined';
17
+ var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
18
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
19
+ var _element$getRootNode;
20
+ return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
21
+ } : function (element) {
22
+ return element === null || element === void 0 ? void 0 : element.ownerDocument;
23
+ };
24
+
25
+ /**
26
+ * Determines if a node is inert or in an inert ancestor.
27
+ * @param {Node} [node]
28
+ * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
29
+ * see if any of them are inert. If false, only `node` itself is considered.
30
+ * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
31
+ * False if `node` is falsy.
32
+ */
33
+ var _isInert = function isInert(node, lookUp) {
34
+ var _node$getAttribute;
35
+ if (lookUp === void 0) {
36
+ lookUp = true;
37
+ }
38
+ // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
39
+ // JS API property; we have to check the attribute, which can either be empty or 'true';
40
+ // if it's `null` (not specified) or 'false', it's an active element
41
+ var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
42
+ var inert = inertAtt === '' || inertAtt === 'true';
43
+
44
+ // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
45
+ // if it weren't for `matches()` not being a function on shadow roots; the following
46
+ // code works for any kind of node
47
+ var result = inert || lookUp && node && (
48
+ // closest does not exist on shadow roots, so we fall back to a manual
49
+ // lookup upward, in case it is not defined.
50
+ typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));
51
+ return result;
52
+ };
53
+
54
+ /**
55
+ * Determines if a node's content is editable.
56
+ * @param {Element} [node]
57
+ * @returns True if it's content-editable; false if it's not or `node` is falsy.
58
+ */
59
+ var isContentEditable = function isContentEditable(node) {
60
+ var _node$getAttribute2;
61
+ // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
62
+ // to use the attribute directly to check for this, which can either be empty or 'true';
63
+ // if it's `null` (not specified) or 'false', it's a non-editable element
64
+ var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
65
+ return attValue === '' || attValue === 'true';
66
+ };
67
+
68
+ /**
69
+ * @param {Element} el container to check in
70
+ * @param {boolean} includeContainer add container to check
71
+ * @param {(node: Element) => boolean} filter filter candidates
72
+ * @returns {Element[]}
73
+ */
74
+ var getCandidates = function getCandidates(el, includeContainer, filter) {
75
+ // even if `includeContainer=false`, we still have to check it for inertness because
76
+ // if it's inert (either by itself or via its parent), then all its children are inert
77
+ if (_isInert(el)) {
78
+ return [];
79
+ }
80
+ var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
81
+ if (includeContainer && matches.call(el, candidateSelector)) {
82
+ candidates.unshift(el);
83
+ }
84
+ candidates = candidates.filter(filter);
85
+ return candidates;
86
+ };
87
+
88
+ /**
89
+ * @callback GetShadowRoot
90
+ * @param {Element} element to check for shadow root
91
+ * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
92
+ */
93
+
94
+ /**
95
+ * @callback ShadowRootFilter
96
+ * @param {Element} shadowHostNode the element which contains shadow content
97
+ * @returns {boolean} true if a shadow root could potentially contain valid candidates.
98
+ */
99
+
100
+ /**
101
+ * @typedef {Object} CandidateScope
102
+ * @property {Element} scopeParent contains inner candidates
103
+ * @property {Element[]} candidates list of candidates found in the scope parent
104
+ */
105
+
106
+ /**
107
+ * @typedef {Object} IterativeOptions
108
+ * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
109
+ * if a function, implies shadow support is enabled and either returns the shadow root of an element
110
+ * or a boolean stating if it has an undisclosed shadow root
111
+ * @property {(node: Element) => boolean} filter filter candidates
112
+ * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
113
+ * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
114
+ */
115
+
116
+ /**
117
+ * @param {Element[]} elements list of element containers to match candidates from
118
+ * @param {boolean} includeContainer add container list to check
119
+ * @param {IterativeOptions} options
120
+ * @returns {Array.<Element|CandidateScope>}
121
+ */
122
+ var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
123
+ var candidates = [];
124
+ var elementsToCheck = Array.from(elements);
125
+ while (elementsToCheck.length) {
126
+ var element = elementsToCheck.shift();
127
+ if (_isInert(element, false)) {
128
+ // no need to look up since we're drilling down
129
+ // anything inside this container will also be inert
130
+ continue;
131
+ }
132
+ if (element.tagName === 'SLOT') {
133
+ // add shadow dom slot scope (slot itself cannot be focusable)
134
+ var assigned = element.assignedElements();
135
+ var content = assigned.length ? assigned : element.children;
136
+ var nestedCandidates = _getCandidatesIteratively(content, true, options);
137
+ if (options.flatten) {
138
+ candidates.push.apply(candidates, nestedCandidates);
139
+ } else {
140
+ candidates.push({
141
+ scopeParent: element,
142
+ candidates: nestedCandidates
143
+ });
144
+ }
145
+ } else {
146
+ // check candidate element
147
+ var validCandidate = matches.call(element, candidateSelector);
148
+ if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
149
+ candidates.push(element);
150
+ }
151
+
152
+ // iterate over shadow content if possible
153
+ var shadowRoot = element.shadowRoot ||
154
+ // check for an undisclosed shadow
155
+ typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
156
+
157
+ // no inert look up because we're already drilling down and checking for inertness
158
+ // on the way down, so all containers to this root node should have already been
159
+ // vetted as non-inert
160
+ var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
161
+ if (shadowRoot && validShadowRoot) {
162
+ // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
163
+ // shadow exists, so look at light dom children as fallback BUT create a scope for any
164
+ // child candidates found because they're likely slotted elements (elements that are
165
+ // children of the web component element (which has the shadow), in the light dom, but
166
+ // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
167
+ // _after_ we return from this recursive call
168
+ var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
169
+ if (options.flatten) {
170
+ candidates.push.apply(candidates, _nestedCandidates);
171
+ } else {
172
+ candidates.push({
173
+ scopeParent: element,
174
+ candidates: _nestedCandidates
175
+ });
176
+ }
177
+ } else {
178
+ // there's not shadow so just dig into the element's (light dom) children
179
+ // __without__ giving the element special scope treatment
180
+ elementsToCheck.unshift.apply(elementsToCheck, element.children);
181
+ }
182
+ }
183
+ }
184
+ return candidates;
185
+ };
186
+
187
+ /**
188
+ * @private
189
+ * Determines if the node has an explicitly specified `tabindex` attribute.
190
+ * @param {HTMLElement} node
191
+ * @returns {boolean} True if so; false if not.
192
+ */
193
+ var hasTabIndex = function hasTabIndex(node) {
194
+ return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
195
+ };
196
+
197
+ /**
198
+ * Determine the tab index of a given node.
199
+ * @param {HTMLElement} node
200
+ * @returns {number} Tab order (negative, 0, or positive number).
201
+ * @throws {Error} If `node` is falsy.
202
+ */
203
+ var getTabIndex = function getTabIndex(node) {
204
+ if (!node) {
205
+ throw new Error('No node provided');
206
+ }
207
+ if (node.tabIndex < 0) {
208
+ // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
209
+ // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
210
+ // yet they are still part of the regular tab order; in FF, they get a default
211
+ // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
212
+ // order, consider their tab index to be 0.
213
+ // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
214
+ // so if they don't have a tabindex attribute specifically set, assume it's 0.
215
+ if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
216
+ return 0;
217
+ }
218
+ }
219
+ return node.tabIndex;
220
+ };
221
+
222
+ /**
223
+ * Determine the tab index of a given node __for sort order purposes__.
224
+ * @param {HTMLElement} node
225
+ * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
226
+ * has tabIndex -1, but needs to be sorted by document order in order for its content to be
227
+ * inserted into the correct sort position.
228
+ * @returns {number} Tab order (negative, 0, or positive number).
229
+ */
230
+ var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
231
+ var tabIndex = getTabIndex(node);
232
+ if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
233
+ return 0;
234
+ }
235
+ return tabIndex;
236
+ };
237
+ var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
238
+ return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
239
+ };
240
+ var isInput = function isInput(node) {
241
+ return node.tagName === 'INPUT';
242
+ };
243
+ var isHiddenInput = function isHiddenInput(node) {
244
+ return isInput(node) && node.type === 'hidden';
245
+ };
246
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
247
+ var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
248
+ return child.tagName === 'SUMMARY';
249
+ });
250
+ return r;
251
+ };
252
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
253
+ for (var i = 0; i < nodes.length; i++) {
254
+ if (nodes[i].checked && nodes[i].form === form) {
255
+ return nodes[i];
256
+ }
257
+ }
258
+ };
259
+ var isTabbableRadio = function isTabbableRadio(node) {
260
+ if (!node.name) {
261
+ return true;
262
+ }
263
+ var radioScope = node.form || getRootNode(node);
264
+ var queryRadios = function queryRadios(name) {
265
+ return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
266
+ };
267
+ var radioSet;
268
+ if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
269
+ radioSet = queryRadios(window.CSS.escape(node.name));
270
+ } else {
271
+ try {
272
+ radioSet = queryRadios(node.name);
273
+ } catch (err) {
274
+ // eslint-disable-next-line no-console
275
+ console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
276
+ return false;
277
+ }
278
+ }
279
+ var checked = getCheckedRadio(radioSet, node.form);
280
+ return !checked || checked === node;
281
+ };
282
+ var isRadio = function isRadio(node) {
283
+ return isInput(node) && node.type === 'radio';
284
+ };
285
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
286
+ return isRadio(node) && !isTabbableRadio(node);
287
+ };
288
+
289
+ // determines if a node is ultimately attached to the window's document
290
+ var isNodeAttached = function isNodeAttached(node) {
291
+ var _nodeRoot;
292
+ // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
293
+ // (but NOT _the_ document; see second 'If' comment below for more).
294
+ // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
295
+ // is attached, and the one we need to check if it's in the document or not (because the
296
+ // shadow, and all nodes it contains, is never considered in the document since shadows
297
+ // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
298
+ // is hidden, or is not in the document itself but is detached, it will affect the shadow's
299
+ // visibility, including all the nodes it contains). The host could be any normal node,
300
+ // or a custom element (i.e. web component). Either way, that's the one that is considered
301
+ // part of the document, not the shadow root, nor any of its children (i.e. the node being
302
+ // tested).
303
+ // To further complicate things, we have to look all the way up until we find a shadow HOST
304
+ // that is attached (or find none) because the node might be in nested shadows...
305
+ // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
306
+ // document (per the docs) and while it's a Document-type object, that document does not
307
+ // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
308
+ // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
309
+ // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
310
+ // node is actually detached.
311
+ // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
312
+ // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
313
+ // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
314
+ // `ownerDocument` will be `null`, hence the optional chaining on it.
315
+ var nodeRoot = node && getRootNode(node);
316
+ var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
317
+
318
+ // in some cases, a detached node will return itself as the root instead of a document or
319
+ // shadow root object, in which case, we shouldn't try to look further up the host chain
320
+ var attached = false;
321
+ if (nodeRoot && nodeRoot !== node) {
322
+ var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
323
+ attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
324
+ while (!attached && nodeRootHost) {
325
+ var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
326
+ // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
327
+ // which means we need to get the host's host and check if that parent host is contained
328
+ // in (i.e. attached to) the document
329
+ nodeRoot = getRootNode(nodeRootHost);
330
+ nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
331
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
332
+ }
333
+ }
334
+ return attached;
335
+ };
336
+ var isZeroArea = function isZeroArea(node) {
337
+ var _node$getBoundingClie = node.getBoundingClientRect(),
338
+ width = _node$getBoundingClie.width,
339
+ height = _node$getBoundingClie.height;
340
+ return width === 0 && height === 0;
341
+ };
342
+ var isHidden = function isHidden(node, _ref) {
343
+ var displayCheck = _ref.displayCheck,
344
+ getShadowRoot = _ref.getShadowRoot;
345
+ if (displayCheck === 'full-native') {
346
+ if ('checkVisibility' in node) {
347
+ // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4
348
+ // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility
349
+ var visible = node.checkVisibility({
350
+ // Checking opacity might be desirable for some use cases, but natively,
351
+ // opacity zero elements _are_ focusable and tabbable.
352
+ checkOpacity: false,
353
+ opacityProperty: false,
354
+ contentVisibilityAuto: true,
355
+ visibilityProperty: true,
356
+ // This is an alias for `visibilityProperty`. Contemporary browsers
357
+ // support both. However, this alias has wider browser support (Chrome
358
+ // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
359
+ // we include it anyway.
360
+ checkVisibilityCSS: true
361
+ });
362
+ return !visible;
363
+ }
364
+ // Fall through to manual visibility checks
365
+ }
366
+
367
+ // NOTE: visibility will be `undefined` if node is detached from the document
368
+ // (see notes about this further down), which means we will consider it visible
369
+ // (this is legacy behavior from a very long way back)
370
+ // NOTE: we check this regardless of `displayCheck="none"` because this is a
371
+ // _visibility_ check, not a _display_ check
372
+ var _getComputedStyle = getComputedStyle(node),
373
+ visibility = _getComputedStyle.visibility;
374
+ if (visibility === 'hidden' || visibility === 'collapse') {
375
+ return true;
376
+ }
377
+ var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
378
+ var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
379
+ if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
380
+ return true;
381
+ }
382
+ if (!displayCheck || displayCheck === 'full' ||
383
+ // full-native can run this branch when it falls through in case
384
+ // Element#checkVisibility is unsupported
385
+ displayCheck === 'full-native' || displayCheck === 'legacy-full') {
386
+ if (typeof getShadowRoot === 'function') {
387
+ // figure out if we should consider the node to be in an undisclosed shadow and use the
388
+ // 'non-zero-area' fallback
389
+ var originalNode = node;
390
+ while (node) {
391
+ var parentElement = node.parentElement;
392
+ var rootNode = getRootNode(node);
393
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
394
+ ) {
395
+ // node has an undisclosed shadow which means we can only treat it as a black box, so we
396
+ // fall back to a non-zero-area test
397
+ return isZeroArea(node);
398
+ } else if (node.assignedSlot) {
399
+ // iterate up slot
400
+ node = node.assignedSlot;
401
+ } else if (!parentElement && rootNode !== node.ownerDocument) {
402
+ // cross shadow boundary
403
+ node = rootNode.host;
404
+ } else {
405
+ // iterate up normal dom
406
+ node = parentElement;
407
+ }
408
+ }
409
+ node = originalNode;
410
+ }
411
+ // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
412
+ // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
413
+ // it might be a falsy value, which means shadow DOM support is disabled
414
+
415
+ // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
416
+ // now we can just test to see if it would normally be visible or not, provided it's
417
+ // attached to the main document.
418
+ // NOTE: We must consider case where node is inside a shadow DOM and given directly to
419
+ // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
420
+
421
+ if (isNodeAttached(node)) {
422
+ // this works wherever the node is: if there's at least one client rect, it's
423
+ // somehow displayed; it also covers the CSS 'display: contents' case where the
424
+ // node itself is hidden in place of its contents; and there's no need to search
425
+ // up the hierarchy either
426
+ return !node.getClientRects().length;
427
+ }
428
+
429
+ // Else, the node isn't attached to the document, which means the `getClientRects()`
430
+ // API will __always__ return zero rects (this can happen, for example, if React
431
+ // is used to render nodes onto a detached tree, as confirmed in this thread:
432
+ // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
433
+ //
434
+ // It also means that even window.getComputedStyle(node).display will return `undefined`
435
+ // because styles are only computed for nodes that are in the document.
436
+ //
437
+ // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
438
+ // somehow. Though it was never stated officially, anyone who has ever used tabbable
439
+ // APIs on nodes in detached containers has actually implicitly used tabbable in what
440
+ // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
441
+ // considering __everything__ to be visible because of the innability to determine styles.
442
+ //
443
+ // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
444
+ // nodes as visible with the 'none' fallback.__
445
+ if (displayCheck !== 'legacy-full') {
446
+ return true; // hidden
447
+ }
448
+ // else, fallback to 'none' mode and consider the node visible
449
+ } else if (displayCheck === 'non-zero-area') {
450
+ // NOTE: Even though this tests that the node's client rect is non-zero to determine
451
+ // whether it's displayed, and that a detached node will __always__ have a zero-area
452
+ // client rect, we don't special-case for whether the node is attached or not. In
453
+ // this mode, we do want to consider nodes that have a zero area to be hidden at all
454
+ // times, and that includes attached or not.
455
+ return isZeroArea(node);
456
+ }
457
+
458
+ // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
459
+ // it's visible
460
+ return false;
461
+ };
462
+
463
+ // form fields (nested) inside a disabled fieldset are not focusable/tabbable
464
+ // unless they are in the _first_ <legend> element of the top-most disabled
465
+ // fieldset
466
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
467
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
468
+ var parentNode = node.parentElement;
469
+ // check if `node` is contained in a disabled <fieldset>
470
+ while (parentNode) {
471
+ if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
472
+ // look for the first <legend> among the children of the disabled <fieldset>
473
+ for (var i = 0; i < parentNode.children.length; i++) {
474
+ var child = parentNode.children.item(i);
475
+ // when the first <legend> (in document order) is found
476
+ if (child.tagName === 'LEGEND') {
477
+ // if its parent <fieldset> is not nested in another disabled <fieldset>,
478
+ // return whether `node` is a descendant of its first <legend>
479
+ return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
480
+ }
481
+ }
482
+ // the disabled <fieldset> containing `node` has no <legend>
483
+ return true;
484
+ }
485
+ parentNode = parentNode.parentElement;
486
+ }
487
+ }
488
+
489
+ // else, node's tabbable/focusable state should not be affected by a fieldset's
490
+ // enabled/disabled state
491
+ return false;
492
+ };
493
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
494
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
495
+ // For a details element with a summary, the summary element gets the focus
496
+ isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
497
+ return false;
498
+ }
499
+ return true;
500
+ };
501
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
502
+ if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
503
+ return false;
504
+ }
505
+ return true;
506
+ };
507
+ var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
508
+ var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
509
+ if (isNaN(tabIndex) || tabIndex >= 0) {
510
+ return true;
511
+ }
512
+ // If a custom element has an explicit negative tabindex,
513
+ // browsers will not allow tab targeting said element's children.
514
+ return false;
515
+ };
516
+
517
+ /**
518
+ * @param {Array.<Element|CandidateScope>} candidates
519
+ * @returns Element[]
520
+ */
521
+ var _sortByOrder = function sortByOrder(candidates) {
522
+ var regularTabbables = [];
523
+ var orderedTabbables = [];
524
+ candidates.forEach(function (item, i) {
525
+ var isScope = !!item.scopeParent;
526
+ var element = isScope ? item.scopeParent : item;
527
+ var candidateTabindex = getSortOrderTabIndex(element, isScope);
528
+ var elements = isScope ? _sortByOrder(item.candidates) : element;
529
+ if (candidateTabindex === 0) {
530
+ isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
531
+ } else {
532
+ orderedTabbables.push({
533
+ documentOrder: i,
534
+ tabIndex: candidateTabindex,
535
+ item: item,
536
+ isScope: isScope,
537
+ content: elements
538
+ });
539
+ }
540
+ });
541
+ return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
542
+ sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
543
+ return acc;
544
+ }, []).concat(regularTabbables);
545
+ };
546
+ var tabbable = function tabbable(container, options) {
547
+ options = options || {};
548
+ var candidates;
549
+ if (options.getShadowRoot) {
550
+ candidates = _getCandidatesIteratively([container], options.includeContainer, {
551
+ filter: isNodeMatchingSelectorTabbable.bind(null, options),
552
+ flatten: false,
553
+ getShadowRoot: options.getShadowRoot,
554
+ shadowRootFilter: isShadowRootTabbable
555
+ });
556
+ } else {
557
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
558
+ }
559
+ return _sortByOrder(candidates);
560
+ };
561
+ var focusable = function focusable(container, options) {
562
+ options = options || {};
563
+ var candidates;
564
+ if (options.getShadowRoot) {
565
+ candidates = _getCandidatesIteratively([container], options.includeContainer, {
566
+ filter: isNodeMatchingSelectorFocusable.bind(null, options),
567
+ flatten: true,
568
+ getShadowRoot: options.getShadowRoot
569
+ });
570
+ } else {
571
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
572
+ }
573
+ return candidates;
574
+ };
575
+ var isTabbable = function isTabbable(node, options) {
576
+ options = options || {};
577
+ if (!node) {
578
+ throw new Error('No node provided');
579
+ }
580
+ if (matches.call(node, candidateSelector) === false) {
581
+ return false;
582
+ }
583
+ return isNodeMatchingSelectorTabbable(options, node);
584
+ };
585
+ var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe:not([inert]):not([inert] *)').join(',');
586
+ var isFocusable = function isFocusable(node, options) {
587
+ options = options || {};
588
+ if (!node) {
589
+ throw new Error('No node provided');
590
+ }
591
+ if (matches.call(node, focusableCandidateSelector) === false) {
592
+ return false;
593
+ }
594
+ return isNodeMatchingSelectorFocusable(options, node);
595
+ };
596
+
597
+ /*!
598
+ * focus-trap 8.2.2
599
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
600
+ */
601
+
602
+ function _arrayLikeToArray(r, a) {
603
+ (null == a || a > r.length) && (a = r.length);
604
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
605
+ return n;
606
+ }
607
+ function _arrayWithoutHoles(r) {
608
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
609
+ }
610
+ function _createForOfIteratorHelper(r, e) {
611
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
612
+ if (!t) {
613
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
614
+ t && (r = t);
615
+ var n = 0,
616
+ F = function () {};
617
+ return {
618
+ s: F,
619
+ n: function () {
620
+ return n >= r.length ? {
621
+ done: true
622
+ } : {
623
+ done: false,
624
+ value: r[n++]
625
+ };
626
+ },
627
+ e: function (r) {
628
+ throw r;
629
+ },
630
+ f: F
631
+ };
632
+ }
633
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
634
+ }
635
+ var o,
636
+ a = true,
637
+ u = false;
638
+ return {
639
+ s: function () {
640
+ t = t.call(r);
641
+ },
642
+ n: function () {
643
+ var r = t.next();
644
+ return a = r.done, r;
645
+ },
646
+ e: function (r) {
647
+ u = true, o = r;
648
+ },
649
+ f: function () {
650
+ try {
651
+ a || null == t.return || t.return();
652
+ } finally {
653
+ if (u) throw o;
654
+ }
655
+ }
656
+ };
657
+ }
658
+ function _defineProperty(e, r, t) {
659
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
660
+ value: t,
661
+ enumerable: true,
662
+ configurable: true,
663
+ writable: true
664
+ }) : e[r] = t, e;
665
+ }
666
+ function _iterableToArray(r) {
667
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
668
+ }
669
+ function _nonIterableSpread() {
670
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
671
+ }
672
+ function ownKeys(e, r) {
673
+ var t = Object.keys(e);
674
+ if (Object.getOwnPropertySymbols) {
675
+ var o = Object.getOwnPropertySymbols(e);
676
+ r && (o = o.filter(function (r) {
677
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
678
+ })), t.push.apply(t, o);
679
+ }
680
+ return t;
681
+ }
682
+ function _objectSpread2(e) {
683
+ for (var r = 1; r < arguments.length; r++) {
684
+ var t = null != arguments[r] ? arguments[r] : {};
685
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
686
+ _defineProperty(e, r, t[r]);
687
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
688
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
689
+ });
690
+ }
691
+ return e;
692
+ }
693
+ function _toConsumableArray(r) {
694
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
695
+ }
696
+ function _toPrimitive(t, r) {
697
+ if ("object" != typeof t || !t) return t;
698
+ var e = t[Symbol.toPrimitive];
699
+ if (void 0 !== e) {
700
+ var i = e.call(t, r);
701
+ if ("object" != typeof i) return i;
702
+ throw new TypeError("@@toPrimitive must return a primitive value.");
703
+ }
704
+ return ("string" === r ? String : Number)(t);
705
+ }
706
+ function _toPropertyKey(t) {
707
+ var i = _toPrimitive(t, "string");
708
+ return "symbol" == typeof i ? i : i + "";
709
+ }
710
+ function _unsupportedIterableToArray(r, a) {
711
+ if (r) {
712
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
713
+ var t = {}.toString.call(r).slice(8, -1);
714
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
715
+ }
716
+ }
717
+
718
+ var activeFocusTraps = {
719
+ // Returns the trap from the top of the stack.
720
+ getActiveTrap: function getActiveTrap(trapStack) {
721
+ if ((trapStack === null || trapStack === void 0 ? void 0 : trapStack.length) > 0) {
722
+ return trapStack[trapStack.length - 1];
723
+ }
724
+ return null;
725
+ },
726
+ // Pauses the currently active trap, then adds a new trap to the stack.
727
+ activateTrap: function activateTrap(trapStack, trap) {
728
+ var activeTrap = activeFocusTraps.getActiveTrap(trapStack);
729
+ if (trap !== activeTrap) {
730
+ activeFocusTraps.pauseTrap(trapStack);
731
+ }
732
+ var trapIndex = trapStack.indexOf(trap);
733
+ if (trapIndex === -1) {
734
+ trapStack.push(trap);
735
+ } else {
736
+ // move this existing trap to the front of the queue
737
+ trapStack.splice(trapIndex, 1);
738
+ trapStack.push(trap);
739
+ }
740
+ },
741
+ // Removes the trap from the top of the stack, then unpauses the next trap down.
742
+ deactivateTrap: function deactivateTrap(trapStack, trap) {
743
+ var trapIndex = trapStack.indexOf(trap);
744
+ if (trapIndex !== -1) {
745
+ trapStack.splice(trapIndex, 1);
746
+ }
747
+ activeFocusTraps.unpauseTrap(trapStack);
748
+ },
749
+ // Pauses the trap at the top of the stack.
750
+ pauseTrap: function pauseTrap(trapStack) {
751
+ var activeTrap = activeFocusTraps.getActiveTrap(trapStack);
752
+ activeTrap === null || activeTrap === void 0 || activeTrap._setPausedState(true);
753
+ },
754
+ // Unpauses the trap at the top of the stack.
755
+ unpauseTrap: function unpauseTrap(trapStack) {
756
+ var activeTrap = activeFocusTraps.getActiveTrap(trapStack);
757
+ if (activeTrap && !activeTrap._isManuallyPaused()) {
758
+ activeTrap._setPausedState(false);
759
+ }
760
+ }
761
+ };
762
+ var isSelectableInput = function isSelectableInput(node) {
763
+ return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
764
+ };
765
+ var isEscapeEvent = function isEscapeEvent(e) {
766
+ return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;
767
+ };
768
+ var isTabEvent = function isTabEvent(e) {
769
+ return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
770
+ };
771
+
772
+ // checks for TAB by default
773
+ var isKeyForward = function isKeyForward(e) {
774
+ return isTabEvent(e) && !e.shiftKey;
775
+ };
776
+
777
+ // checks for SHIFT+TAB by default
778
+ var isKeyBackward = function isKeyBackward(e) {
779
+ return isTabEvent(e) && e.shiftKey;
780
+ };
781
+ var delay = function delay(fn) {
782
+ return setTimeout(fn, 0);
783
+ };
784
+
785
+ /**
786
+ * Get an option's value when it could be a plain value, or a handler that provides
787
+ * the value.
788
+ * @param {*} value Option's value to check.
789
+ * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
790
+ * @returns {*} The `value`, or the handler's returned value.
791
+ */
792
+ var valueOrHandler = function valueOrHandler(value) {
793
+ for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
794
+ params[_key - 1] = arguments[_key];
795
+ }
796
+ return typeof value === 'function' ? value.apply(void 0, params) : value;
797
+ };
798
+ var getActualTarget = function getActualTarget(event) {
799
+ // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
800
+ // shadow host. However, event.target.composedPath() will be an array of
801
+ // nodes "clicked" from inner-most (the actual element inside the shadow) to
802
+ // outer-most (the host HTML document). If we have access to composedPath(),
803
+ // then use its first element; otherwise, fall back to event.target (and
804
+ // this only works for an _open_ shadow DOM; otherwise,
805
+ // composedPath()[0] === event.target always).
806
+ return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
807
+ };
808
+
809
+ // NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this
810
+ // current instance use the same stack if `userOptions.trapStack` isn't specified
811
+ var internalTrapStack = [];
812
+ var createFocusTrap = function createFocusTrap(elements, userOptions) {
813
+ // SSR: a live trap shouldn't be created in this type of environment so this
814
+ // should be safe code to execute if the `document` option isn't specified
815
+ var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
816
+ var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;
817
+ var config = _objectSpread2({
818
+ returnFocusOnDeactivate: true,
819
+ escapeDeactivates: true,
820
+ delayInitialFocus: true,
821
+ delayReturnFocus: true,
822
+ isolateSubtrees: false,
823
+ isKeyForward: isKeyForward,
824
+ isKeyBackward: isKeyBackward
825
+ }, userOptions);
826
+ var state = {
827
+ // containers given to createFocusTrap()
828
+ /** @type {Array<HTMLElement>} */
829
+ containers: [],
830
+ // list of objects identifying tabbable nodes in `containers` in the trap
831
+ // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
832
+ // is active, but the trap should never get to a state where there isn't at least one group
833
+ // with at least one tabbable node in it (that would lead to an error condition that would
834
+ // result in an error being thrown)
835
+ /** @type {Array<{
836
+ * container: HTMLElement,
837
+ * tabbableNodes: Array<HTMLElement>, // empty if none
838
+ * focusableNodes: Array<HTMLElement>, // empty if none
839
+ * posTabIndexesFound: boolean,
840
+ * firstTabbableNode: HTMLElement|undefined,
841
+ * lastTabbableNode: HTMLElement|undefined,
842
+ * firstDomTabbableNode: HTMLElement|undefined,
843
+ * lastDomTabbableNode: HTMLElement|undefined,
844
+ * nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
845
+ * }>}
846
+ */
847
+ containerGroups: [],
848
+ // same order/length as `containers` list
849
+
850
+ // references to objects in `containerGroups`, but only those that actually have
851
+ // tabbable nodes in them
852
+ // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
853
+ // the same length
854
+ tabbableGroups: [],
855
+ // references to nodes that are siblings to the ancestors of this trap's containers.
856
+ /** @type {Set<HTMLElement>} */
857
+ adjacentElements: new Set(),
858
+ // references to nodes that were inert or aria-hidden before the trap was activated.
859
+ /** @type {Set<HTMLElement>} */
860
+ alreadySilent: new Set(),
861
+ nodeFocusedBeforeActivation: null,
862
+ mostRecentlyFocusedNode: null,
863
+ active: false,
864
+ paused: false,
865
+ manuallyPaused: false,
866
+ // timer ID for when delayInitialFocus is true and initial focus in this trap
867
+ // has been delayed during activation
868
+ delayInitialFocusTimer: undefined,
869
+ // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
870
+ recentNavEvent: undefined
871
+ };
872
+ var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
873
+
874
+ /**
875
+ * Gets a configuration option value.
876
+ * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
877
+ * value will be taken from this object. Otherwise, value will be taken from base configuration.
878
+ * @param {string} optionName Name of the option whose value is sought.
879
+ * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
880
+ * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
881
+ */
882
+ var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
883
+ return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
884
+ };
885
+
886
+ /**
887
+ * Finds the index of the container that contains the element.
888
+ * @param {HTMLElement} element
889
+ * @param {Event} [event] If available, and `element` isn't directly found in any container,
890
+ * the event's composed path is used to see if includes any known trap containers in the
891
+ * case where the element is inside a Shadow DOM.
892
+ * @returns {number} Index of the container in either `state.containers` or
893
+ * `state.containerGroups` (the order/length of these lists are the same); -1
894
+ * if the element isn't found.
895
+ */
896
+ var findContainerIndex = function findContainerIndex(element, event) {
897
+ var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;
898
+ // NOTE: search `containerGroups` because it's possible a group contains no tabbable
899
+ // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
900
+ // and we still need to find the element in there
901
+ return state.containerGroups.findIndex(function (_ref) {
902
+ var container = _ref.container,
903
+ tabbableNodes = _ref.tabbableNodes;
904
+ return container.contains(element) || (// fall back to explicit tabbable search which will take into consideration any
905
+ // web components if the `tabbableOptions.getShadowRoot` option was used for
906
+ // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
907
+ // look inside web components even if open)
908
+ composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {
909
+ return node === element;
910
+ });
911
+ });
912
+ };
913
+
914
+ /**
915
+ * Gets the node for the given option, which is expected to be an option that
916
+ * can be either a DOM node, a string that is a selector to get a node, `false`
917
+ * (if a node is explicitly NOT given), or a function that returns any of these
918
+ * values.
919
+ * @param {string} optionName
920
+ * @param {Object} options
921
+ * @param {boolean} [options.hasFallback] True if the option could be a selector string
922
+ * and the option allows for a fallback scenario in the case where the selector is
923
+ * valid but does not match a node (i.e. the queried node doesn't exist in the DOM).
924
+ * @param {Array} [options.params] Params to pass to the option if it's a function.
925
+ * @returns {undefined | null | false | HTMLElement | SVGElement} Returns
926
+ * `undefined` if the option is not specified; `null` if the option didn't resolve
927
+ * to a node but `options.hasFallback=true`, `false` if the option resolved to `false`
928
+ * (node explicitly not given); otherwise, the resolved DOM node.
929
+ * @throws {Error} If the option is set, not `false`, and is not, or does not
930
+ * resolve to a node, unless the option is a selector string and `options.hasFallback=true`.
931
+ */
932
+ var getNodeForOption = function getNodeForOption(optionName) {
933
+ var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
934
+ _ref2$hasFallback = _ref2.hasFallback,
935
+ hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback,
936
+ _ref2$params = _ref2.params,
937
+ params = _ref2$params === void 0 ? [] : _ref2$params;
938
+ var optionValue = config[optionName];
939
+ if (typeof optionValue === 'function') {
940
+ optionValue = optionValue.apply(void 0, _toConsumableArray(params));
941
+ }
942
+ if (optionValue === true) {
943
+ optionValue = undefined; // use default value
944
+ }
945
+ if (!optionValue) {
946
+ if (optionValue === undefined || optionValue === false) {
947
+ return optionValue;
948
+ }
949
+ // else, empty string (invalid), null (invalid), 0 (invalid)
950
+
951
+ throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
952
+ }
953
+ var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
954
+
955
+ if (typeof optionValue === 'string') {
956
+ try {
957
+ node = doc.querySelector(optionValue); // resolve to node, or null if fails
958
+ } catch (err) {
959
+ throw new Error("`".concat(optionName, "` appears to be an invalid selector; error=\"").concat(err.message, "\""));
960
+ }
961
+ if (!node) {
962
+ if (!hasFallback) {
963
+ throw new Error("`".concat(optionName, "` as selector refers to no known node"));
964
+ }
965
+ // else, `node` MUST be `null` because that's what `Document.querySelector()` returns
966
+ // if the selector is valid but doesn't match anything
967
+ }
968
+ }
969
+ return node;
970
+ };
971
+
972
+ /**
973
+ * Gets the current activeElement. If it's a web-component and has open shadow-root
974
+ * it will recursively search inside shadow roots for the "true" activeElement.
975
+ *
976
+ * @param {Document | ShadowRoot} el
977
+ *
978
+ * @returns {HTMLElement|null} The element that currently has the focus. `null` if a focused element isn't found.
979
+ **/
980
+ var _getActiveElement = function getActiveElement(el) {
981
+ var activeElement = el.activeElement;
982
+ if (!activeElement) {
983
+ return null;
984
+ }
985
+ if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {
986
+ return _getActiveElement(activeElement.shadowRoot);
987
+ }
988
+ return activeElement;
989
+ };
990
+ var getInitialFocusNode = function getInitialFocusNode() {
991
+ var node = getNodeForOption('initialFocus', {
992
+ hasFallback: true
993
+ });
994
+
995
+ // false explicitly indicates we want no initialFocus at all
996
+ if (node === false) {
997
+ return false;
998
+ }
999
+ if (node === undefined || node && !isFocusable(node, config.tabbableOptions)) {
1000
+ var activeElement = _getActiveElement(doc);
1001
+
1002
+ // option not specified nor focusable: use fallback options
1003
+ if (findContainerIndex(activeElement) >= 0) {
1004
+ node = activeElement;
1005
+ } else {
1006
+ var firstTabbableGroup = state.tabbableGroups[0];
1007
+ var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
1008
+
1009
+ // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
1010
+ node = firstTabbableNode || getNodeForOption('fallbackFocus');
1011
+ }
1012
+ } else if (node === null) {
1013
+ // option is a VALID selector string that doesn't yield a node: use the `fallbackFocus`
1014
+ // option instead of the default behavior when the option isn't specified at all
1015
+ node = getNodeForOption('fallbackFocus');
1016
+ }
1017
+ if (!node) {
1018
+ throw new Error('Your focus-trap needs to have at least one focusable element');
1019
+ }
1020
+ return node;
1021
+ };
1022
+ var updateTabbableNodes = function updateTabbableNodes() {
1023
+ state.containerGroups = state.containers.map(function (container) {
1024
+ var tabbableNodes = tabbable(container, config.tabbableOptions);
1025
+
1026
+ // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
1027
+ // are a superset of tabbable nodes since nodes with negative `tabindex` attributes
1028
+ // are focusable but not tabbable
1029
+ var focusableNodes = focusable(container, config.tabbableOptions);
1030
+ var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;
1031
+ var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;
1032
+ var firstDomTabbableNode = focusableNodes.find(function (node) {
1033
+ return isTabbable(node);
1034
+ });
1035
+ var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {
1036
+ return isTabbable(node);
1037
+ });
1038
+ var posTabIndexesFound = !!tabbableNodes.find(function (node) {
1039
+ return getTabIndex(node) > 0;
1040
+ });
1041
+ return {
1042
+ container: container,
1043
+ tabbableNodes: tabbableNodes,
1044
+ focusableNodes: focusableNodes,
1045
+ /** True if at least one node with positive `tabindex` was found in this container. */
1046
+ posTabIndexesFound: posTabIndexesFound,
1047
+ /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
1048
+ firstTabbableNode: firstTabbableNode,
1049
+ /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
1050
+ lastTabbableNode: lastTabbableNode,
1051
+ // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
1052
+ // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
1053
+ // because that API doesn't work with Shadow DOM as well as it should (@see
1054
+ // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
1055
+ // to address an edge case related to positive tabindex support, this seems like a much easier,
1056
+ // "close enough most of the time" alternative for positive tabindexes which should generally
1057
+ // be avoided anyway...
1058
+ /** First tabbable node in container, __DOM__ order; `undefined` if none. */
1059
+ firstDomTabbableNode: firstDomTabbableNode,
1060
+ /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
1061
+ lastDomTabbableNode: lastDomTabbableNode,
1062
+ /**
1063
+ * Finds the __tabbable__ node that follows the given node in the specified direction,
1064
+ * in this container, if any.
1065
+ * @param {HTMLElement} node
1066
+ * @param {boolean} [forward] True if going in forward tab order; false if going
1067
+ * in reverse.
1068
+ * @returns {HTMLElement|undefined} The next tabbable node, if any.
1069
+ */
1070
+ nextTabbableNode: function nextTabbableNode(node) {
1071
+ var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1072
+ var nodeIdx = tabbableNodes.indexOf(node);
1073
+ if (nodeIdx < 0) {
1074
+ // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):
1075
+ // since `node` should at least have been focusable, we assume that's the case and mimic
1076
+ // what browsers do, which is set focus to the next node in __document position order__,
1077
+ // regardless of positive tabindexes, if any -- and for reasons explained in the NOTE
1078
+ // above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to
1079
+ // basic DOM order
1080
+ if (forward) {
1081
+ return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {
1082
+ return isTabbable(el);
1083
+ });
1084
+ }
1085
+ return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {
1086
+ return isTabbable(el);
1087
+ });
1088
+ }
1089
+ return tabbableNodes[nodeIdx + (forward ? 1 : -1)];
1090
+ }
1091
+ };
1092
+ });
1093
+ state.tabbableGroups = state.containerGroups.filter(function (group) {
1094
+ return group.tabbableNodes.length > 0;
1095
+ });
1096
+
1097
+ // throw if no groups have tabbable nodes and we don't have a fallback focus node either
1098
+ if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
1099
+ ) {
1100
+ throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
1101
+ }
1102
+
1103
+ // NOTE: Positive tabindexes are only properly supported in single-container traps because
1104
+ // doing it across multiple containers where tabindexes could be all over the place
1105
+ // would require Tabbable to support multiple containers, would require additional
1106
+ // specialized Shadow DOM support, and would require Tabbable's multi-container support
1107
+ // to look at those containers in document position order rather than user-provided
1108
+ // order (as they are treated in Focus-trap, for legacy reasons). See discussion on
1109
+ // https://github.com/focus-trap/focus-trap/issues/375 for more details.
1110
+ if (state.containerGroups.find(function (g) {
1111
+ return g.posTabIndexesFound;
1112
+ }) && state.containerGroups.length > 1) {
1113
+ throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
1114
+ }
1115
+ };
1116
+ var _tryFocus = function tryFocus(node) {
1117
+ if (node === false) {
1118
+ return;
1119
+ }
1120
+ if (node === _getActiveElement(document)) {
1121
+ return;
1122
+ }
1123
+ if (!node || !node.focus) {
1124
+ _tryFocus(getInitialFocusNode());
1125
+ return;
1126
+ }
1127
+ node.focus({
1128
+ preventScroll: !!config.preventScroll
1129
+ });
1130
+ // NOTE: focus() API does not trigger focusIn event so set MRU node manually
1131
+ state.mostRecentlyFocusedNode = node;
1132
+ if (isSelectableInput(node)) {
1133
+ node.select();
1134
+ }
1135
+ };
1136
+ var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
1137
+ var node = getNodeForOption('setReturnFocus', {
1138
+ params: [previousActiveElement]
1139
+ });
1140
+ return node ? node : node === false ? false : previousActiveElement;
1141
+ };
1142
+
1143
+ /**
1144
+ * Finds the next node (in either direction) where focus should move according to a
1145
+ * keyboard focus-in event.
1146
+ * @param {Object} params
1147
+ * @param {Node} [params.target] Known target __from which__ to navigate, if any.
1148
+ * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event
1149
+ * will be used to determine the `target`). Ignored if `target` is specified.
1150
+ * @param {boolean} [params.isBackward] True if focus should move backward.
1151
+ * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
1152
+ * determined given the current state of the trap.
1153
+ */
1154
+ var findNextNavNode = function findNextNavNode(_ref3) {
1155
+ var target = _ref3.target,
1156
+ event = _ref3.event,
1157
+ _ref3$isBackward = _ref3.isBackward,
1158
+ isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;
1159
+ target = target || getActualTarget(event);
1160
+ updateTabbableNodes();
1161
+ var destinationNode = null;
1162
+ if (state.tabbableGroups.length > 0) {
1163
+ // make sure the target is actually contained in a group
1164
+ // NOTE: the target may also be the container itself if it's focusable
1165
+ // with tabIndex='-1' and was given initial focus
1166
+ var containerIndex = findContainerIndex(target, event);
1167
+ var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
1168
+ if (containerIndex < 0) {
1169
+ // target not found in any group: quite possible focus has escaped the trap,
1170
+ // so bring it back into...
1171
+ if (isBackward) {
1172
+ // ...the last node in the last group
1173
+ destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
1174
+ } else {
1175
+ // ...the first node in the first group
1176
+ destinationNode = state.tabbableGroups[0].firstTabbableNode;
1177
+ }
1178
+ } else if (isBackward) {
1179
+ // REVERSE
1180
+
1181
+ // is the target the first tabbable node in a group?
1182
+ var startOfGroupIndex = state.tabbableGroups.findIndex(function (_ref4) {
1183
+ var firstTabbableNode = _ref4.firstTabbableNode;
1184
+ return target === firstTabbableNode;
1185
+ });
1186
+ if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
1187
+ // an exception case where the target is either the container itself, or
1188
+ // a non-tabbable node that was given focus (i.e. tabindex is negative
1189
+ // and user clicked on it or node was programmatically given focus)
1190
+ // and is not followed by any other tabbable node, in which
1191
+ // case, we should handle shift+tab as if focus were on the container's
1192
+ // first tabbable node, and go to the last tabbable node of the LAST group
1193
+ startOfGroupIndex = containerIndex;
1194
+ }
1195
+ if (startOfGroupIndex >= 0) {
1196
+ // YES: then shift+tab should go to the last tabbable node in the
1197
+ // previous group (and wrap around to the last tabbable node of
1198
+ // the LAST group if it's the first tabbable node of the FIRST group)
1199
+ var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
1200
+ var destinationGroup = state.tabbableGroups[destinationGroupIndex];
1201
+ destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;
1202
+ } else if (!isTabEvent(event)) {
1203
+ // user must have customized the nav keys so we have to move focus manually _within_
1204
+ // the active group: do this based on the order determined by tabbable()
1205
+ destinationNode = containerGroup.nextTabbableNode(target, false);
1206
+ }
1207
+ } else {
1208
+ // FORWARD
1209
+
1210
+ // is the target the last tabbable node in a group?
1211
+ var lastOfGroupIndex = state.tabbableGroups.findIndex(function (_ref5) {
1212
+ var lastTabbableNode = _ref5.lastTabbableNode;
1213
+ return target === lastTabbableNode;
1214
+ });
1215
+ if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
1216
+ // an exception case where the target is the container itself, or
1217
+ // a non-tabbable node that was given focus (i.e. tabindex is negative
1218
+ // and user clicked on it or node was programmatically given focus)
1219
+ // and is not followed by any other tabbable node, in which
1220
+ // case, we should handle tab as if focus were on the container's
1221
+ // last tabbable node, and go to the first tabbable node of the FIRST group
1222
+ lastOfGroupIndex = containerIndex;
1223
+ }
1224
+ if (lastOfGroupIndex >= 0) {
1225
+ // YES: then tab should go to the first tabbable node in the next
1226
+ // group (and wrap around to the first tabbable node of the FIRST
1227
+ // group if it's the last tabbable node of the LAST group)
1228
+ var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
1229
+ var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
1230
+ destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;
1231
+ } else if (!isTabEvent(event)) {
1232
+ // user must have customized the nav keys so we have to move focus manually _within_
1233
+ // the active group: do this based on the order determined by tabbable()
1234
+ destinationNode = containerGroup.nextTabbableNode(target);
1235
+ }
1236
+ }
1237
+ } else {
1238
+ // no groups available
1239
+ // NOTE: the fallbackFocus option does not support returning false to opt-out
1240
+ destinationNode = getNodeForOption('fallbackFocus');
1241
+ }
1242
+ return destinationNode;
1243
+ };
1244
+
1245
+ // This needs to be done on mousedown and touchstart instead of click
1246
+ // so that it precedes the focus event.
1247
+ var checkPointerDown = function checkPointerDown(e) {
1248
+ var target = getActualTarget(e);
1249
+ if (findContainerIndex(target, e) >= 0) {
1250
+ // allow the click since it occurred inside the trap
1251
+ return;
1252
+ }
1253
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
1254
+ // immediately deactivate the trap
1255
+ trap.deactivate({
1256
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
1257
+ // which will result in the outside click setting focus to the node
1258
+ // that was clicked (and if not focusable, to "nothing"); by setting
1259
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
1260
+ // on activation (or the configured `setReturnFocus` node), whether the
1261
+ // outside click was on a focusable node or not
1262
+ returnFocus: config.returnFocusOnDeactivate
1263
+ });
1264
+ return;
1265
+ }
1266
+
1267
+ // This is needed for mobile devices.
1268
+ // (If we'll only let `click` events through,
1269
+ // then on mobile they will be blocked anyways if `touchstart` is blocked.)
1270
+ if (valueOrHandler(config.allowOutsideClick, e)) {
1271
+ // allow the click outside the trap to take place
1272
+ return;
1273
+ }
1274
+
1275
+ // otherwise, prevent the click
1276
+ e.preventDefault();
1277
+ };
1278
+
1279
+ // In case focus escapes the trap for some strange reason, pull it back in.
1280
+ // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected
1281
+ // scrolling if the node that got focused was out of view; there's nothing we can do to
1282
+ // prevent that from happening by the time we discover that focus escaped
1283
+ var checkFocusIn = function checkFocusIn(event) {
1284
+ var target = getActualTarget(event);
1285
+ var targetContained = findContainerIndex(target, event) >= 0;
1286
+
1287
+ // In Firefox when you Tab out of an iframe the Document is briefly focused.
1288
+ if (targetContained || target instanceof Document) {
1289
+ if (targetContained) {
1290
+ state.mostRecentlyFocusedNode = target;
1291
+ }
1292
+ } else {
1293
+ // escaped! pull it back in to where it just left
1294
+ event.stopImmediatePropagation();
1295
+
1296
+ // focus will escape if the MRU node had a positive tab index and user tried to nav forward;
1297
+ // it will also escape if the MRU node had a 0 tab index and user tried to nav backward
1298
+ // toward a node with a positive tab index
1299
+ var nextNode; // next node to focus, if we find one
1300
+ var navAcrossContainers = true;
1301
+ if (state.mostRecentlyFocusedNode) {
1302
+ if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {
1303
+ // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...
1304
+ var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);
1305
+ // there MAY not be any tabbable nodes in the container if there are at least 2 containers
1306
+ // and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container
1307
+ // with at least one tabbable node in order to function, so this could be the other container
1308
+ // with nothing tabbable in it)
1309
+ var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;
1310
+ if (tabbableNodes.length > 0) {
1311
+ // MRU tab index MAY not be found if the MRU node is focusable but not tabbable
1312
+ var mruTabIdx = tabbableNodes.findIndex(function (node) {
1313
+ return node === state.mostRecentlyFocusedNode;
1314
+ });
1315
+ if (mruTabIdx >= 0) {
1316
+ if (config.isKeyForward(state.recentNavEvent)) {
1317
+ if (mruTabIdx + 1 < tabbableNodes.length) {
1318
+ nextNode = tabbableNodes[mruTabIdx + 1];
1319
+ navAcrossContainers = false;
1320
+ }
1321
+ // else, don't wrap within the container as focus should move to next/previous
1322
+ // container
1323
+ } else {
1324
+ if (mruTabIdx - 1 >= 0) {
1325
+ nextNode = tabbableNodes[mruTabIdx - 1];
1326
+ navAcrossContainers = false;
1327
+ }
1328
+ // else, don't wrap within the container as focus should move to next/previous
1329
+ // container
1330
+ }
1331
+ // else, don't find in container order without considering direction too
1332
+ }
1333
+ }
1334
+ // else, no tabbable nodes in that container (which means we must have at least one other
1335
+ // container with at least one tabbable node in it, otherwise focus-trap would've thrown
1336
+ // an error the last time updateTabbableNodes() was run): find next node among all known
1337
+ // containers
1338
+ } else {
1339
+ // check to see if there's at least one tabbable node with a positive tab index inside
1340
+ // the trap because focus seems to escape when navigating backward from a tabbable node
1341
+ // with tabindex=0 when this is the case (instead of wrapping to the tabbable node with
1342
+ // the greatest positive tab index like it should)
1343
+ if (!state.containerGroups.some(function (g) {
1344
+ return g.tabbableNodes.some(function (n) {
1345
+ return getTabIndex(n) > 0;
1346
+ });
1347
+ })) {
1348
+ // no containers with tabbable nodes with positive tab indexes which means the focus
1349
+ // escaped for some other reason and we should just execute the fallback to the
1350
+ // MRU node or initial focus node, if any
1351
+ navAcrossContainers = false;
1352
+ }
1353
+ }
1354
+ } else {
1355
+ // no MRU node means we're likely in some initial condition when the trap has just
1356
+ // been activated and initial focus hasn't been given yet, in which case we should
1357
+ // fall through to trying to focus the initial focus node, which is what should
1358
+ // happen below at this point in the logic
1359
+ navAcrossContainers = false;
1360
+ }
1361
+ if (navAcrossContainers) {
1362
+ nextNode = findNextNavNode({
1363
+ // move FROM the MRU node, not event-related node (which will be the node that is
1364
+ // outside the trap causing the focus escape we're trying to fix)
1365
+ target: state.mostRecentlyFocusedNode,
1366
+ isBackward: config.isKeyBackward(state.recentNavEvent)
1367
+ });
1368
+ }
1369
+ if (nextNode) {
1370
+ _tryFocus(nextNode);
1371
+ } else {
1372
+ _tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
1373
+ }
1374
+ }
1375
+ state.recentNavEvent = undefined; // clear
1376
+ };
1377
+
1378
+ // Hijack key nav events on the first and last focusable nodes of the trap,
1379
+ // in order to prevent focus from escaping. If it escapes for even a
1380
+ // moment it can end up scrolling the page and causing confusion so we
1381
+ // kind of need to capture the action at the keydown phase.
1382
+ var checkKeyNav = function checkKeyNav(event) {
1383
+ var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1384
+ state.recentNavEvent = event;
1385
+ var destinationNode = findNextNavNode({
1386
+ event: event,
1387
+ isBackward: isBackward
1388
+ });
1389
+ if (destinationNode) {
1390
+ if (isTabEvent(event)) {
1391
+ // since tab natively moves focus, we wouldn't have a destination node unless we
1392
+ // were on the edge of a container and had to move to the next/previous edge, in
1393
+ // which case we want to prevent default to keep the browser from moving focus
1394
+ // to where it normally would
1395
+ event.preventDefault();
1396
+ }
1397
+ _tryFocus(destinationNode);
1398
+ }
1399
+ // else, let the browser take care of [shift+]tab and move the focus
1400
+ };
1401
+ var checkTabKey = function checkTabKey(event) {
1402
+ if (config.isKeyForward(event) || config.isKeyBackward(event)) {
1403
+ checkKeyNav(event, config.isKeyBackward(event));
1404
+ }
1405
+ };
1406
+
1407
+ // we use a different event phase for the Escape key to allow canceling the event and checking for this in escapeDeactivates
1408
+ var checkEscapeKey = function checkEscapeKey(event) {
1409
+ if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {
1410
+ event.preventDefault();
1411
+ trap.deactivate();
1412
+ }
1413
+ };
1414
+ var checkClick = function checkClick(e) {
1415
+ var target = getActualTarget(e);
1416
+ if (findContainerIndex(target, e) >= 0) {
1417
+ return;
1418
+ }
1419
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
1420
+ return;
1421
+ }
1422
+ if (valueOrHandler(config.allowOutsideClick, e)) {
1423
+ return;
1424
+ }
1425
+ e.preventDefault();
1426
+ e.stopImmediatePropagation();
1427
+ };
1428
+
1429
+ //
1430
+ // EVENT LISTENERS
1431
+ //
1432
+
1433
+ /**
1434
+ * Adds listeners to the document necessary for trapping focus and attempts to set focus
1435
+ * to the configured initial focus node. Does nothing if the trap isn't active.
1436
+ * @returns {Promise<void> | undefined} A promise resolved once the initial focus node has
1437
+ * been focused when `delayInitialFocus=true`; `undefined` when focus is set synchronously
1438
+ * or the trap isn't active.
1439
+ */
1440
+ var addListeners = function addListeners() {
1441
+ if (!state.active) {
1442
+ return;
1443
+ }
1444
+
1445
+ // There can be only one listening focus trap at a time
1446
+ activeFocusTraps.activateTrap(trapStack, trap);
1447
+
1448
+ // Delay ensures that the focused element doesn't capture the event
1449
+ // that caused the focus trap activation.
1450
+ /** @type {Promise<void> | undefined} */
1451
+ var promise;
1452
+ if (config.delayInitialFocus) {
1453
+ // NOTE: Promise constructor callback is called synchronously, which is what we want
1454
+ // since we need to capture the timer ID immediately
1455
+ promise = new Promise(function (resolve) {
1456
+ state.delayInitialFocusTimer = delay(function () {
1457
+ _tryFocus(getInitialFocusNode());
1458
+ resolve();
1459
+ });
1460
+ });
1461
+ } else {
1462
+ _tryFocus(getInitialFocusNode());
1463
+ }
1464
+ doc.addEventListener('focusin', checkFocusIn, true);
1465
+ doc.addEventListener('mousedown', checkPointerDown, {
1466
+ capture: true,
1467
+ passive: false
1468
+ });
1469
+ doc.addEventListener('touchstart', checkPointerDown, {
1470
+ capture: true,
1471
+ passive: false
1472
+ });
1473
+ doc.addEventListener('click', checkClick, {
1474
+ capture: true,
1475
+ passive: false
1476
+ });
1477
+ doc.addEventListener('keydown', checkTabKey, {
1478
+ capture: true,
1479
+ passive: false
1480
+ });
1481
+ doc.addEventListener('keydown', checkEscapeKey);
1482
+ return promise;
1483
+ };
1484
+
1485
+ /**
1486
+ * Traverses up the DOM from each of `containers`, collecting references to
1487
+ * the elements that are siblings to `container` or an ancestor of `container`.
1488
+ * @param {Array<HTMLElement>} containers
1489
+ */
1490
+ var collectAdjacentElements = function collectAdjacentElements(containers) {
1491
+ // Re-activate all adjacent elements & clear previous collection.
1492
+ if (state.active && !state.paused) {
1493
+ trap._setSubtreeIsolation(false);
1494
+ }
1495
+ state.adjacentElements.clear();
1496
+ state.alreadySilent.clear();
1497
+
1498
+ // Collect all ancestors of all containers to avoid redundant processing.
1499
+ var containerAncestors = new Set();
1500
+ var adjacentElements = new Set();
1501
+
1502
+ // Compile all elements adjacent to the focus trap containers & lineage.
1503
+ var _iterator = _createForOfIteratorHelper(containers),
1504
+ _step;
1505
+ try {
1506
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1507
+ var container = _step.value;
1508
+ containerAncestors.add(container);
1509
+ var insideShadowRoot = typeof ShadowRoot !== 'undefined' && container.getRootNode() instanceof ShadowRoot;
1510
+ var current = container;
1511
+ while (current) {
1512
+ containerAncestors.add(current);
1513
+ var parent = current.parentElement;
1514
+ var siblings = [];
1515
+ if (parent) {
1516
+ siblings = parent.children;
1517
+ } else if (!parent && insideShadowRoot) {
1518
+ siblings = current.getRootNode().children;
1519
+ parent = current.getRootNode().host;
1520
+ insideShadowRoot = typeof ShadowRoot !== 'undefined' && parent.getRootNode() instanceof ShadowRoot;
1521
+ }
1522
+
1523
+ // Add all the children, we'll remove container lineage later.
1524
+ var _iterator2 = _createForOfIteratorHelper(siblings),
1525
+ _step2;
1526
+ try {
1527
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1528
+ var child = _step2.value;
1529
+ adjacentElements.add(child);
1530
+ }
1531
+ } catch (err) {
1532
+ _iterator2.e(err);
1533
+ } finally {
1534
+ _iterator2.f();
1535
+ }
1536
+ current = parent;
1537
+ }
1538
+ }
1539
+
1540
+ // Multi-container traps may overlap.
1541
+ // Remove elements within container lineages.
1542
+ } catch (err) {
1543
+ _iterator.e(err);
1544
+ } finally {
1545
+ _iterator.f();
1546
+ }
1547
+ containerAncestors.forEach(function (el) {
1548
+ adjacentElements["delete"](el);
1549
+ });
1550
+ state.adjacentElements = adjacentElements;
1551
+ };
1552
+ var removeListeners = function removeListeners() {
1553
+ if (!state.active) {
1554
+ return;
1555
+ }
1556
+ doc.removeEventListener('focusin', checkFocusIn, true);
1557
+ doc.removeEventListener('mousedown', checkPointerDown, true);
1558
+ doc.removeEventListener('touchstart', checkPointerDown, true);
1559
+ doc.removeEventListener('click', checkClick, true);
1560
+ doc.removeEventListener('keydown', checkTabKey, true);
1561
+ doc.removeEventListener('keydown', checkEscapeKey);
1562
+ return trap;
1563
+ };
1564
+
1565
+ //
1566
+ // MUTATION OBSERVER
1567
+ //
1568
+
1569
+ var checkDomRemoval = function checkDomRemoval(mutations) {
1570
+ var focusedNode = state.mostRecentlyFocusedNode;
1571
+ if (!focusedNode) {
1572
+ return;
1573
+ }
1574
+ var isFocusedNodeRemoved = mutations.some(function (mutation) {
1575
+ var removedNodes = Array.from(mutation.removedNodes);
1576
+ return removedNodes.some(function (node) {
1577
+ return node === focusedNode || typeof node.contains === 'function' && node.contains(focusedNode);
1578
+ });
1579
+ });
1580
+
1581
+ // If the currently focused node is removed then browsers will move focus to the
1582
+ // <body> element. If this happens, try to move focus back into the trap.
1583
+ if (isFocusedNodeRemoved && state.containers.some(function (container) {
1584
+ return container === null || container === void 0 ? void 0 : container.isConnected;
1585
+ })) {
1586
+ // Refresh tabbable state before resolving initial focus because
1587
+ // getInitialFocusNode() may fall back to the first tabbable node in the trap.
1588
+ updateTabbableNodes();
1589
+ var initialFocusNode = getInitialFocusNode();
1590
+ _tryFocus(initialFocusNode);
1591
+ }
1592
+ };
1593
+
1594
+ // Use MutationObserver - if supported - to detect if focused node is removed
1595
+ // from the DOM.
1596
+ var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;
1597
+ var updateObservedNodes = function updateObservedNodes() {
1598
+ if (!mutationObserver) {
1599
+ return;
1600
+ }
1601
+ mutationObserver.disconnect();
1602
+ if (state.active && !state.paused) {
1603
+ state.containers.map(function (container) {
1604
+ mutationObserver.observe(container, {
1605
+ subtree: true,
1606
+ childList: true
1607
+ });
1608
+ });
1609
+ }
1610
+ };
1611
+
1612
+ //
1613
+ // TRAP DEFINITION
1614
+ //
1615
+
1616
+ trap = {
1617
+ get active() {
1618
+ return state.active;
1619
+ },
1620
+ get paused() {
1621
+ return state.paused;
1622
+ },
1623
+ activate: function activate(activateOptions) {
1624
+ if (state.active) {
1625
+ return this;
1626
+ }
1627
+ var onActivate = getOption(activateOptions, 'onActivate');
1628
+ var onPostActivate = getOption(activateOptions, 'onPostActivate');
1629
+ var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
1630
+
1631
+ // If a currently-active trap is isolating its subtree, we need to remove
1632
+ // that isolation to allow the new trap to find tabbable nodes.
1633
+ var preexistingTrap = activeFocusTraps.getActiveTrap(trapStack);
1634
+ var revertState = false;
1635
+ if (preexistingTrap && !preexistingTrap.paused) {
1636
+ var _preexistingTrap$_set;
1637
+ // [#1729] method MAY not exist if using `trapStack` option to share stack with older
1638
+ // versions of Focus-trap in the same DOM so use optional chaining here just in case
1639
+ // since this is a trap we may not have created from this instance of the library
1640
+ (_preexistingTrap$_set = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set === void 0 || _preexistingTrap$_set.call(preexistingTrap, false);
1641
+ revertState = true;
1642
+ }
1643
+ try {
1644
+ if (!checkCanFocusTrap) {
1645
+ updateTabbableNodes();
1646
+ }
1647
+ state.active = true;
1648
+ state.paused = false;
1649
+ state.nodeFocusedBeforeActivation = _getActiveElement(doc);
1650
+ onActivate === null || onActivate === void 0 || onActivate({
1651
+ trap: trap
1652
+ });
1653
+ var finishActivation = function finishActivation() {
1654
+ if (checkCanFocusTrap) {
1655
+ updateTabbableNodes();
1656
+ }
1657
+ var afterListeners = function afterListeners() {
1658
+ trap._setSubtreeIsolation(true);
1659
+ updateObservedNodes();
1660
+ onPostActivate === null || onPostActivate === void 0 || onPostActivate({
1661
+ trap: trap
1662
+ });
1663
+ };
1664
+
1665
+ // NOTE: wait for initial focus node to get focused (whether activation is fully,
1666
+ // partially, or not asynchronous) before we potentially isolate the subtrees
1667
+ // with aria-hidden while focus is still in some other subtree and not yet in
1668
+ // the trap, resulting in some browsers (e.g. Chrome) logging to the console that
1669
+ // they, "Blocked aria-hidden on an element because its descendant retained focus..."
1670
+ var listenersPromise = addListeners();
1671
+ if (listenersPromise) {
1672
+ listenersPromise.then(afterListeners);
1673
+ } else {
1674
+ afterListeners();
1675
+ }
1676
+ };
1677
+ if (checkCanFocusTrap) {
1678
+ checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
1679
+ return this;
1680
+ }
1681
+ finishActivation();
1682
+ } catch (error) {
1683
+ // If our activation throws an exception and the stack hasn't changed,
1684
+ // we need to re-enable the prior trap's subtree isolation.
1685
+ if (preexistingTrap === activeFocusTraps.getActiveTrap(trapStack) && revertState) {
1686
+ var _preexistingTrap$_set2;
1687
+ // [#1729] method MAY not exist if using `trapStack` option to share stack with older
1688
+ // versions of Focus-trap in the same DOM so use optional chaining here just in case
1689
+ // since this is a trap we may not have created from this instance of the library
1690
+ (_preexistingTrap$_set2 = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set2 === void 0 || _preexistingTrap$_set2.call(preexistingTrap, true);
1691
+ }
1692
+ throw error;
1693
+ }
1694
+ return this;
1695
+ },
1696
+ deactivate: function deactivate(deactivateOptions) {
1697
+ if (!state.active) {
1698
+ return this;
1699
+ }
1700
+ var options = _objectSpread2({
1701
+ onDeactivate: config.onDeactivate,
1702
+ onPostDeactivate: config.onPostDeactivate,
1703
+ checkCanReturnFocus: config.checkCanReturnFocus
1704
+ }, deactivateOptions);
1705
+ clearTimeout(state.delayInitialFocusTimer); // noop if undefined
1706
+ state.delayInitialFocusTimer = undefined;
1707
+
1708
+ // Prior to removing this trap from the trapStack, we need to remove any applications of `inert`.
1709
+ // This allows the next trap down to update its tabbable nodes properly.
1710
+ //
1711
+ // If this trap is not top of the stack, don't change any current isolation.
1712
+ if (!state.paused) {
1713
+ trap._setSubtreeIsolation(false);
1714
+ }
1715
+ state.alreadySilent.clear();
1716
+ removeListeners();
1717
+ state.active = false;
1718
+ state.paused = false;
1719
+ updateObservedNodes();
1720
+ activeFocusTraps.deactivateTrap(trapStack, trap);
1721
+ var onDeactivate = getOption(options, 'onDeactivate');
1722
+ var onPostDeactivate = getOption(options, 'onPostDeactivate');
1723
+ var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
1724
+ var delayReturnFocus = getOption(options, 'delayReturnFocus');
1725
+ var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
1726
+ onDeactivate === null || onDeactivate === void 0 || onDeactivate({
1727
+ trap: trap
1728
+ });
1729
+ var completeDeactivation = function completeDeactivation() {
1730
+ if (returnFocus) {
1731
+ _tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
1732
+ }
1733
+ onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate({
1734
+ trap: trap
1735
+ });
1736
+ };
1737
+ var finishDeactivation = function finishDeactivation() {
1738
+ if (delayReturnFocus && returnFocus) {
1739
+ delay(completeDeactivation);
1740
+ } else {
1741
+ completeDeactivation();
1742
+ }
1743
+ };
1744
+ if (returnFocus && checkCanReturnFocus) {
1745
+ checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
1746
+ return this;
1747
+ }
1748
+ finishDeactivation();
1749
+ return this;
1750
+ },
1751
+ pause: function pause(pauseOptions) {
1752
+ if (!state.active) {
1753
+ return this;
1754
+ }
1755
+ state.manuallyPaused = true;
1756
+ return this._setPausedState(true, pauseOptions);
1757
+ },
1758
+ unpause: function unpause(unpauseOptions) {
1759
+ if (!state.active) {
1760
+ return this;
1761
+ }
1762
+ state.manuallyPaused = false;
1763
+ if (trapStack[trapStack.length - 1] !== this) {
1764
+ return this;
1765
+ }
1766
+ return this._setPausedState(false, unpauseOptions);
1767
+ },
1768
+ updateContainerElements: function updateContainerElements(containerElements) {
1769
+ var elementsAsArray = [].concat(containerElements).filter(Boolean);
1770
+ state.containers = elementsAsArray.map(function (element) {
1771
+ return typeof element === 'string' ? doc.querySelector(element) : element;
1772
+ });
1773
+ if (config.isolateSubtrees) {
1774
+ collectAdjacentElements(state.containers);
1775
+ }
1776
+ if (state.active) {
1777
+ updateTabbableNodes();
1778
+ if (!state.paused) {
1779
+ trap._setSubtreeIsolation(true);
1780
+ }
1781
+ }
1782
+ updateObservedNodes();
1783
+ return this;
1784
+ }
1785
+ };
1786
+ Object.defineProperties(trap, {
1787
+ _isManuallyPaused: {
1788
+ value: function value() {
1789
+ return state.manuallyPaused;
1790
+ }
1791
+ },
1792
+ _setPausedState: {
1793
+ value: function value(paused, options) {
1794
+ if (state.paused === paused) {
1795
+ return this;
1796
+ }
1797
+ state.paused = paused;
1798
+ if (paused) {
1799
+ var onPause = getOption(options, 'onPause');
1800
+ var onPostPause = getOption(options, 'onPostPause');
1801
+ onPause === null || onPause === void 0 || onPause({
1802
+ trap: trap
1803
+ });
1804
+ removeListeners();
1805
+ trap._setSubtreeIsolation(false);
1806
+ updateObservedNodes();
1807
+ onPostPause === null || onPostPause === void 0 || onPostPause({
1808
+ trap: trap
1809
+ });
1810
+ } else {
1811
+ var onUnpause = getOption(options, 'onUnpause');
1812
+ var onPostUnpause = getOption(options, 'onPostUnpause');
1813
+ onUnpause === null || onUnpause === void 0 || onUnpause({
1814
+ trap: trap
1815
+ });
1816
+ var finishUnpause = function finishUnpause() {
1817
+ updateTabbableNodes();
1818
+ var afterListeners = function afterListeners() {
1819
+ trap._setSubtreeIsolation(true);
1820
+ updateObservedNodes();
1821
+ onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause({
1822
+ trap: trap
1823
+ });
1824
+ };
1825
+
1826
+ // NOTE: wait for initial focus node to get focused (whether activation is fully,
1827
+ // partially, or not asynchronous) before we potentially isolate the subtrees
1828
+ // with aria-hidden while focus is still in some other subtree and not yet in
1829
+ // the trap, resulting in some browsers (e.g. Chrome) logging to the console that
1830
+ // they, "Blocked aria-hidden on an element because its descendant retained focus..."
1831
+ var listenersPromise = addListeners();
1832
+ if (listenersPromise) {
1833
+ listenersPromise.then(afterListeners);
1834
+ } else {
1835
+ afterListeners();
1836
+ }
1837
+ };
1838
+ finishUnpause();
1839
+ }
1840
+ return this;
1841
+ }
1842
+ },
1843
+ _setSubtreeIsolation: {
1844
+ value: function value(isEnabled) {
1845
+ if (config.isolateSubtrees) {
1846
+ state.adjacentElements.forEach(function (el) {
1847
+ var _el$getAttribute;
1848
+ if (isEnabled) {
1849
+ switch (config.isolateSubtrees) {
1850
+ case 'aria-hidden':
1851
+ // check both attribute and property to ensure initial state is captured
1852
+ // correctly across different browsers and test environments (like JSDOM)
1853
+ if (el.ariaHidden === 'true' || ((_el$getAttribute = el.getAttribute('aria-hidden')) === null || _el$getAttribute === void 0 ? void 0 : _el$getAttribute.toLowerCase()) === 'true') {
1854
+ state.alreadySilent.add(el);
1855
+ }
1856
+ el.setAttribute('aria-hidden', 'true');
1857
+ break;
1858
+ default:
1859
+ // check both attribute and property to ensure initial state is captured
1860
+ // correctly across different browsers and test environments (like JSDOM)
1861
+ if (el.inert || el.hasAttribute('inert')) {
1862
+ state.alreadySilent.add(el);
1863
+ }
1864
+ el.setAttribute('inert', true);
1865
+ break;
1866
+ }
1867
+ } else {
1868
+ if (state.alreadySilent.has(el)) ; else {
1869
+ switch (config.isolateSubtrees) {
1870
+ case 'aria-hidden':
1871
+ el.removeAttribute('aria-hidden');
1872
+ break;
1873
+ default:
1874
+ el.removeAttribute('inert');
1875
+ break;
1876
+ }
1877
+ }
1878
+ }
1879
+ });
1880
+ }
1881
+ }
1882
+ }
1883
+ });
1884
+
1885
+ // initialize container elements
1886
+ trap.updateContainerElements(elements);
1887
+ return trap;
1888
+ };
1889
+
1890
+ class FocusHandler {
1891
+ constructor() {
1892
+ this.focusTrap = null;
1893
+ this.disabled = false;
1894
+ this.previousFocusedElement = null;
1895
+ this.restoreElement = null;
1896
+ }
1897
+ connect() { }
1898
+ disconnect() {
1899
+ if (!this.disabled) {
1900
+ this.disable();
1901
+ }
1902
+ this.target = undefined;
1903
+ this.focusTrap = null;
1904
+ this.previousFocusedElement = null;
1905
+ this.restoreElement = null;
1906
+ }
1907
+ isDisabled() {
1908
+ return this.disabled;
1909
+ }
1910
+ enable(options) {
1911
+ if (options === null || options === void 0 ? void 0 : options.target) {
1912
+ this.target = options.target;
1913
+ }
1914
+ if (this.target) {
1915
+ if (options === null || options === void 0 ? void 0 : options.restoreElement) {
1916
+ this.restoreElement = options.restoreElement;
1917
+ }
1918
+ this.initializeFocusTrap();
1919
+ this.disabled = false;
1920
+ }
1921
+ }
1922
+ disable() {
1923
+ if (!this.disabled && this.target) {
1924
+ this.deactivateFocusTrap();
1925
+ this.disabled = true;
1926
+ }
1927
+ }
1928
+ initializeFocusTrap() {
1929
+ if (!this.target)
1930
+ return;
1931
+ if (index.dsBrowser.hasDocument && index.dsBrowser.hasWindow) {
1932
+ this.previousFocusedElement = document.activeElement;
1933
+ }
1934
+ this.focusTrap = createFocusTrap(this.target, {
1935
+ escapeDeactivates: false,
1936
+ initialFocus: false,
1937
+ fallbackFocus: this.target,
1938
+ tabbableOptions: {
1939
+ getShadowRoot: true,
1940
+ },
1941
+ });
1942
+ this.focusTrap.activate();
1943
+ }
1944
+ deactivateFocusTrap() {
1945
+ if (this.focusTrap) {
1946
+ this.focusTrap.deactivate();
1947
+ this.focusTrap = null;
1948
+ }
1949
+ }
1950
+ restoreFocus(el) {
1951
+ const focusTarget = el || this.restoreElement || this.previousFocusedElement;
1952
+ if (focusTarget && index.dsBrowser.hasDocument) {
1953
+ focusTarget.focus();
1954
+ }
1955
+ }
1956
+ }
1957
+
1958
+ exports.FocusHandler = FocusHandler;