@bi-digital/react 0.0.0-experimental-ca10f7e → 0.0.0-experimental-aff96f9

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 (374) hide show
  1. package/README.md +1 -1
  2. package/dist/{alert-footer-BaB0tSHl.d.ts → alert-footer-W74EeTGu.d.ts} +151 -92
  3. package/dist/{checkbox-Bx9n-4ar.js → checkbox-CK2lV4pu.js} +2 -2
  4. package/dist/{checkbox-Bx9n-4ar.js.map → checkbox-CK2lV4pu.js.map} +1 -1
  5. package/dist/checkbox-subsection-CGXgII6v.js +17 -0
  6. package/dist/checkbox-subsection-CGXgII6v.js.map +1 -0
  7. package/dist/{chip-DFAARDd0.js → chip-CRcC9TkL.js} +1 -1
  8. package/dist/{chip-DFAARDd0.js.map → chip-CRcC9TkL.js.map} +1 -1
  9. package/dist/components/alert/alert-footer.d.ts +16 -13
  10. package/dist/components/alert/alert.d.ts +16 -13
  11. package/dist/components/alert/index.d.ts +16 -13
  12. package/dist/components/avatar/avatar.d.ts +16 -13
  13. package/dist/components/avatar/index.d.ts +16 -13
  14. package/dist/components/badge/badge.d.ts +16 -13
  15. package/dist/components/badge/index.d.ts +16 -13
  16. package/dist/components/button/button.d.ts +16 -13
  17. package/dist/components/button/index.d.ts +16 -13
  18. package/dist/components/card/card-action.d.ts +16 -13
  19. package/dist/components/card/card-actions.d.ts +16 -13
  20. package/dist/components/card/card-content.d.ts +16 -13
  21. package/dist/components/card/card-date.d.ts +16 -13
  22. package/dist/components/card/card-header.d.ts +16 -13
  23. package/dist/components/card/card-media.d.ts +16 -13
  24. package/dist/components/card/card.d.ts +16 -13
  25. package/dist/components/card/index.d.ts +16 -13
  26. package/dist/components/checkbox/checkbox-subsection.d.ts +17 -0
  27. package/dist/components/checkbox/checkbox-subsection.js +3 -0
  28. package/dist/components/checkbox/checkbox.d.ts +16 -13
  29. package/dist/components/checkbox/checkbox.js +6 -5
  30. package/dist/components/checkbox/index.d.ts +17 -14
  31. package/dist/components/checkbox/index.js +9 -7
  32. package/dist/components/chip/chip.d.ts +16 -13
  33. package/dist/components/chip/chip.js +1 -1
  34. package/dist/components/chip/index.d.ts +16 -13
  35. package/dist/components/chip/index.js +2 -2
  36. package/dist/components/dialog/dialog-close-button.d.ts +16 -13
  37. package/dist/components/dialog/dialog-close-button.js +1 -1
  38. package/dist/components/dialog/dialog-content.d.ts +16 -13
  39. package/dist/components/dialog/dialog-content.js +1 -1
  40. package/dist/components/dialog/dialog-footer.d.ts +16 -13
  41. package/dist/components/dialog/dialog-footer.js +1 -1
  42. package/dist/components/dialog/dialog-header.d.ts +16 -13
  43. package/dist/components/dialog/dialog-header.js +1 -1
  44. package/dist/components/dialog/dialog-trigger-context.d.ts +1 -1
  45. package/dist/components/dialog/dialog-trigger-context.js +1 -1
  46. package/dist/components/dialog/dialog-trigger.d.ts +16 -13
  47. package/dist/components/dialog/dialog-trigger.js +2 -2
  48. package/dist/components/dialog/dialog.d.ts +16 -13
  49. package/dist/components/dialog/dialog.js +7 -6
  50. package/dist/components/dialog/index.d.ts +16 -13
  51. package/dist/components/dialog/index.js +13 -12
  52. package/dist/components/drawer/drawer-close-button.d.ts +16 -13
  53. package/dist/components/drawer/drawer-close-button.js +14 -13
  54. package/dist/components/drawer/drawer-content.d.ts +16 -13
  55. package/dist/components/drawer/drawer-content.js +14 -13
  56. package/dist/components/drawer/drawer-footer.d.ts +16 -13
  57. package/dist/components/drawer/drawer-footer.js +14 -13
  58. package/dist/components/drawer/drawer-header.d.ts +16 -13
  59. package/dist/components/drawer/drawer-header.js +14 -13
  60. package/dist/components/drawer/drawer-trigger-context.d.ts +1 -1
  61. package/dist/components/drawer/drawer-trigger-context.js +14 -13
  62. package/dist/components/drawer/drawer-trigger.d.ts +16 -13
  63. package/dist/components/drawer/drawer-trigger.js +14 -13
  64. package/dist/components/drawer/drawer.d.ts +16 -13
  65. package/dist/components/drawer/drawer.js +14 -13
  66. package/dist/components/drawer/index.d.ts +16 -13
  67. package/dist/components/drawer/index.js +21 -20
  68. package/dist/components/dropdown/dropdown-button.d.ts +16 -13
  69. package/dist/components/dropdown/dropdown-button.js +1 -1
  70. package/dist/components/dropdown/dropdown-item.d.ts +1 -1
  71. package/dist/components/dropdown/dropdown-item.js +1 -1
  72. package/dist/components/dropdown/dropdown-list.d.ts +1 -1
  73. package/dist/components/dropdown/dropdown-list.js +1 -1
  74. package/dist/components/dropdown/dropdown-trigger-context.d.ts +1 -1
  75. package/dist/components/dropdown/dropdown-trigger-context.js +10 -9
  76. package/dist/components/dropdown/dropdown-trigger.d.ts +16 -13
  77. package/dist/components/dropdown/dropdown-trigger.js +10 -9
  78. package/dist/components/dropdown/dropdown.d.ts +16 -13
  79. package/dist/components/dropdown/dropdown.js +10 -9
  80. package/dist/components/dropdown/index.d.ts +16 -13
  81. package/dist/components/dropdown/index.js +16 -15
  82. package/dist/components/field/field-affix.d.ts +16 -13
  83. package/dist/components/field/field-description.d.ts +16 -13
  84. package/dist/components/field/field.d.ts +16 -13
  85. package/dist/components/field/index.d.ts +16 -13
  86. package/dist/components/fieldset/fieldset-description.d.ts +16 -13
  87. package/dist/components/fieldset/fieldset-description.js +1 -1
  88. package/dist/components/fieldset/fieldset-legend.d.ts +16 -13
  89. package/dist/components/fieldset/fieldset-legend.js +1 -1
  90. package/dist/components/fieldset/fieldset.d.ts +16 -13
  91. package/dist/components/fieldset/fieldset.js +1 -1
  92. package/dist/components/fieldset/index.d.ts +16 -13
  93. package/dist/components/fieldset/index.js +4 -4
  94. package/dist/components/filter-group/filter-group.d.ts +17 -0
  95. package/dist/components/filter-group/filter-group.js +3 -0
  96. package/dist/components/filter-group/index.d.ts +17 -0
  97. package/dist/components/filter-group/index.js +4 -0
  98. package/dist/components/footer/footer-links.d.ts +1 -1
  99. package/dist/components/footer/footer-links.js +1 -1
  100. package/dist/components/footer/footer.d.ts +16 -13
  101. package/dist/components/footer/footer.js +1 -1
  102. package/dist/components/footer/index.d.ts +16 -13
  103. package/dist/components/footer/index.js +3 -3
  104. package/dist/components/index.d.ts +17 -14
  105. package/dist/components/index.js +84 -73
  106. package/dist/components/input/index.d.ts +16 -13
  107. package/dist/components/input/input.d.ts +16 -13
  108. package/dist/components/label/index.d.ts +16 -13
  109. package/dist/components/label/label.d.ts +16 -13
  110. package/dist/components/link/index.d.ts +16 -13
  111. package/dist/components/link/index.js +2 -2
  112. package/dist/components/link/link.d.ts +16 -13
  113. package/dist/components/link/link.js +1 -1
  114. package/dist/components/logo/index.d.ts +16 -13
  115. package/dist/components/logo/index.js +2 -2
  116. package/dist/components/logo/logo.d.ts +16 -13
  117. package/dist/components/logo/logo.js +1 -1
  118. package/dist/components/navbar/index.d.ts +17 -14
  119. package/dist/components/navbar/index.js +8 -5
  120. package/dist/components/navbar/navbar.d.ts +16 -13
  121. package/dist/components/navbar/navbar.js +3 -3
  122. package/dist/components/navbar/sub-navbar.d.ts +17 -0
  123. package/dist/components/navbar/sub-navbar.js +5 -0
  124. package/dist/components/pagination/index.d.ts +16 -13
  125. package/dist/components/pagination/index.js +4 -4
  126. package/dist/components/pagination/pagination-button.d.ts +16 -13
  127. package/dist/components/pagination/pagination-button.js +1 -1
  128. package/dist/components/pagination/pagination-item.d.ts +1 -1
  129. package/dist/components/pagination/pagination-item.js +1 -1
  130. package/dist/components/pagination/pagination.d.ts +16 -13
  131. package/dist/components/pagination/pagination.js +1 -1
  132. package/dist/components/popover/index.d.ts +16 -13
  133. package/dist/components/popover/index.js +9 -8
  134. package/dist/components/popover/popover-trigger-context.d.ts +1 -1
  135. package/dist/components/popover/popover-trigger-context.js +1 -1
  136. package/dist/components/popover/popover-trigger.d.ts +16 -13
  137. package/dist/components/popover/popover-trigger.js +2 -2
  138. package/dist/components/popover/popover.d.ts +16 -13
  139. package/dist/components/popover/popover.js +7 -6
  140. package/dist/components/radio/index.d.ts +16 -13
  141. package/dist/components/radio/index.js +2 -2
  142. package/dist/components/radio/radio.d.ts +16 -13
  143. package/dist/components/radio/radio.js +1 -1
  144. package/dist/components/search/index.d.ts +16 -13
  145. package/dist/components/search/index.js +2 -2
  146. package/dist/components/search/search.d.ts +16 -13
  147. package/dist/components/search/search.js +1 -1
  148. package/dist/components/select/index.d.ts +16 -13
  149. package/dist/components/select/index.js +4 -4
  150. package/dist/components/select/select-optgroup.d.ts +16 -13
  151. package/dist/components/select/select-optgroup.js +1 -1
  152. package/dist/components/select/select-option.d.ts +16 -13
  153. package/dist/components/select/select-option.js +1 -1
  154. package/dist/components/select/select.d.ts +16 -13
  155. package/dist/components/select/select.js +1 -1
  156. package/dist/components/skip-link/index.d.ts +17 -0
  157. package/dist/components/skip-link/index.js +4 -0
  158. package/dist/components/skip-link/skip-link.d.ts +17 -0
  159. package/dist/components/skip-link/skip-link.js +3 -0
  160. package/dist/components/spinner/index.d.ts +16 -13
  161. package/dist/components/spinner/spinner.d.ts +16 -13
  162. package/dist/components/sticky-header/index.d.ts +3 -0
  163. package/dist/components/sticky-header/index.js +4 -0
  164. package/dist/components/sticky-header/sticky-header.d.ts +2 -0
  165. package/dist/components/sticky-header/sticky-header.js +3 -0
  166. package/dist/components/tabs/index.d.ts +16 -13
  167. package/dist/components/tabs/index.js +5 -5
  168. package/dist/components/tabs/tab.d.ts +16 -13
  169. package/dist/components/tabs/tab.js +1 -1
  170. package/dist/components/tabs/tabs-list.d.ts +16 -13
  171. package/dist/components/tabs/tabs-list.js +1 -1
  172. package/dist/components/tabs/tabs-panel.d.ts +16 -13
  173. package/dist/components/tabs/tabs-panel.js +1 -1
  174. package/dist/components/tabs/tabs.d.ts +16 -13
  175. package/dist/components/tabs/tabs.js +1 -1
  176. package/dist/components/textarea/index.d.ts +16 -13
  177. package/dist/components/textarea/index.js +2 -2
  178. package/dist/components/textarea/textarea.d.ts +16 -13
  179. package/dist/components/textarea/textarea.js +1 -1
  180. package/dist/components/textfield/index.d.ts +16 -13
  181. package/dist/components/textfield/index.js +6 -6
  182. package/dist/components/textfield/textfield.d.ts +16 -13
  183. package/dist/components/textfield/textfield.js +5 -5
  184. package/dist/components/validation-message/index.d.ts +16 -13
  185. package/dist/components/validation-message/index.js +2 -2
  186. package/dist/components/validation-message/validation-message.d.ts +16 -13
  187. package/dist/components/validation-message/validation-message.js +1 -1
  188. package/dist/{dialog-Msiu7H3h.js → dialog-WgEtFqJD.js} +3 -3
  189. package/dist/{dialog-Msiu7H3h.js.map → dialog-WgEtFqJD.js.map} +1 -1
  190. package/dist/{dialog-close-button-BhzM8xy4.js → dialog-close-button-8n-DBvH4.js} +1 -1
  191. package/dist/{dialog-close-button-BhzM8xy4.js.map → dialog-close-button-8n-DBvH4.js.map} +1 -1
  192. package/dist/{dialog-content-BNHkYsxn.js → dialog-content-CU346luZ.js} +1 -1
  193. package/dist/{dialog-content-BNHkYsxn.js.map → dialog-content-CU346luZ.js.map} +1 -1
  194. package/dist/{dialog-footer-B63OYnj7.js → dialog-footer-BPCalxtL.js} +1 -1
  195. package/dist/{dialog-footer-B63OYnj7.js.map → dialog-footer-BPCalxtL.js.map} +1 -1
  196. package/dist/{dialog-header-CRcBLINN.js → dialog-header-DsLpGnOf.js} +1 -1
  197. package/dist/{dialog-header-CRcBLINN.js.map → dialog-header-DsLpGnOf.js.map} +1 -1
  198. package/dist/{dialog-trigger-XPMx1psz.js → dialog-trigger-Q9Y5EG0H.js} +2 -2
  199. package/dist/{dialog-trigger-XPMx1psz.js.map → dialog-trigger-Q9Y5EG0H.js.map} +1 -1
  200. package/dist/{dialog-trigger-context-B5d-o0K7.js → dialog-trigger-context-B41wR-bM.js} +1 -1
  201. package/dist/{dialog-trigger-context-B5d-o0K7.js.map → dialog-trigger-context-B41wR-bM.js.map} +1 -1
  202. package/dist/{dialog-trigger-context-BP03jmAI.d.ts → dialog-trigger-context-BkQSJ-rX.d.ts} +5 -5
  203. package/dist/{drawer-DeggzxN8.js → drawer-B8xyMitJ.js} +2 -2
  204. package/dist/{drawer-DeggzxN8.js.map → drawer-B8xyMitJ.js.map} +1 -1
  205. package/dist/{drawer-close-button-dDQvoj0O.js → drawer-close-button-CqDqQGHP.js} +2 -2
  206. package/dist/{drawer-close-button-dDQvoj0O.js.map → drawer-close-button-CqDqQGHP.js.map} +1 -1
  207. package/dist/{drawer-content-Cqz_MZFW.js → drawer-content-Dp__eciN.js} +2 -2
  208. package/dist/{drawer-content-Cqz_MZFW.js.map → drawer-content-Dp__eciN.js.map} +1 -1
  209. package/dist/{drawer-footer-GbcH-B8w.js → drawer-footer-qYHvZEl_.js} +2 -2
  210. package/dist/{drawer-footer-GbcH-B8w.js.map → drawer-footer-qYHvZEl_.js.map} +1 -1
  211. package/dist/{drawer-header-CS9x6xOi.js → drawer-header-fQaZQuIY.js} +2 -2
  212. package/dist/{drawer-header-CS9x6xOi.js.map → drawer-header-fQaZQuIY.js.map} +1 -1
  213. package/dist/{drawer-trigger-AT7qYJPw.js → drawer-trigger-BvjTEl5N.js} +2 -2
  214. package/dist/{drawer-trigger-AT7qYJPw.js.map → drawer-trigger-BvjTEl5N.js.map} +1 -1
  215. package/dist/{drawer-trigger-context-BDcc94cu.d.ts → drawer-trigger-context-B3X3kUrY.d.ts} +3 -3
  216. package/dist/{drawer-trigger-context-EHdOLF0U.js → drawer-trigger-context-DHYdt3sB.js} +2 -2
  217. package/dist/{drawer-trigger-context-EHdOLF0U.js.map → drawer-trigger-context-DHYdt3sB.js.map} +1 -1
  218. package/dist/{dropdown-C1hpsZcN.js → dropdown-D-dX5PAl.js} +2 -2
  219. package/dist/{dropdown-C1hpsZcN.js.map → dropdown-D-dX5PAl.js.map} +1 -1
  220. package/dist/{dropdown-BhdWlVMW.js → dropdown-D54kcMt_.js} +2 -2
  221. package/dist/{dropdown-BhdWlVMW.js.map → dropdown-D54kcMt_.js.map} +1 -1
  222. package/dist/{dropdown-button-Btuo7J5R.js → dropdown-button-CKPaLMBh.js} +1 -1
  223. package/dist/{dropdown-button-Btuo7J5R.js.map → dropdown-button-CKPaLMBh.js.map} +1 -1
  224. package/dist/{dropdown-item-bMZ3-43Z.d.ts → dropdown-item-Bhw9nhOp.d.ts} +3 -3
  225. package/dist/{dropdown-item-yyt1nBlo.js → dropdown-item-BnnEFIq3.js} +1 -1
  226. package/dist/{dropdown-item-yyt1nBlo.js.map → dropdown-item-BnnEFIq3.js.map} +1 -1
  227. package/dist/{dropdown-list-BMkiVIDL.js → dropdown-list-BWW85rXi.js} +1 -1
  228. package/dist/{dropdown-list-BMkiVIDL.js.map → dropdown-list-BWW85rXi.js.map} +1 -1
  229. package/dist/{dropdown-list-DenWbmcv.d.ts → dropdown-list-XN8RJ-SS.d.ts} +3 -3
  230. package/dist/{dropdown-trigger-DG-mnw2U.js → dropdown-trigger-DfHyg_D7.js} +2 -2
  231. package/dist/{dropdown-trigger-DG-mnw2U.js.map → dropdown-trigger-DfHyg_D7.js.map} +1 -1
  232. package/dist/{dropdown-trigger-context-Ce6Z9VPK.js → dropdown-trigger-context-BpYBk_xf.js} +2 -2
  233. package/dist/{dropdown-trigger-context-Ce6Z9VPK.js.map → dropdown-trigger-context-BpYBk_xf.js.map} +1 -1
  234. package/dist/{dropdown-trigger-context-BabMM_7k.d.ts → dropdown-trigger-context-D0QMaRYY.d.ts} +3 -3
  235. package/dist/{fieldset-DemHknom.js → fieldset-DGB7cvdz.js} +1 -1
  236. package/dist/{fieldset-DemHknom.js.map → fieldset-DGB7cvdz.js.map} +1 -1
  237. package/dist/{fieldset-description-CqUMEhib.js → fieldset-description-oNKwCGnW.js} +1 -1
  238. package/dist/{fieldset-description-CqUMEhib.js.map → fieldset-description-oNKwCGnW.js.map} +1 -1
  239. package/dist/{fieldset-legend-C6D6hE4v.js → fieldset-legend-Dseni7XM.js} +1 -1
  240. package/dist/{fieldset-legend-C6D6hE4v.js.map → fieldset-legend-Dseni7XM.js.map} +1 -1
  241. package/dist/filter-group-BKO5sgGt.js +40 -0
  242. package/dist/filter-group-BKO5sgGt.js.map +1 -0
  243. package/dist/{footer-CU7LdbPO.js → footer-CXKRhzUT.js} +1 -1
  244. package/dist/{footer-CU7LdbPO.js.map → footer-CXKRhzUT.js.map} +1 -1
  245. package/dist/{footer-links-sRD7teEv.d.ts → footer-links-Drm2LFnw.d.ts} +3 -3
  246. package/dist/{footer-links-BIUrxu38.js → footer-links-Dz1UwVuf.js} +1 -1
  247. package/dist/{footer-links-BIUrxu38.js.map → footer-links-Dz1UwVuf.js.map} +1 -1
  248. package/dist/{index-qXXUizvD.d.ts → index-B-0iSMVN.d.ts} +1 -1
  249. package/dist/index-CTw2zfCM.d.ts +1 -0
  250. package/dist/{index-CRy7A5Iq.d.ts → index-CXV3nvLQ.d.ts} +1 -1
  251. package/dist/{link-lNn9wvQf.js → link-ZiUFZak1.js} +1 -1
  252. package/dist/{link-lNn9wvQf.js.map → link-ZiUFZak1.js.map} +1 -1
  253. package/dist/{logo-QKrYvRFP.js → logo-cfY7Ilvc.js} +1 -1
  254. package/dist/{logo-QKrYvRFP.js.map → logo-cfY7Ilvc.js.map} +1 -1
  255. package/dist/main.d.ts +17 -14
  256. package/dist/main.js +85 -74
  257. package/dist/navbar-DJJMercW.js +23 -0
  258. package/dist/navbar-DJJMercW.js.map +1 -0
  259. package/dist/{pagination-u6Z1LYwY.js → pagination-DxXjiIgC.js} +1 -1
  260. package/dist/{pagination-u6Z1LYwY.js.map → pagination-DxXjiIgC.js.map} +1 -1
  261. package/dist/{pagination-button-CG_QfJHY.js → pagination-button-CjEZPPC8.js} +1 -1
  262. package/dist/{pagination-button-CG_QfJHY.js.map → pagination-button-CjEZPPC8.js.map} +1 -1
  263. package/dist/{pagination-item-DntsLLMC.js → pagination-item-DXnI0BWj.js} +1 -1
  264. package/dist/{pagination-item-DntsLLMC.js.map → pagination-item-DXnI0BWj.js.map} +1 -1
  265. package/dist/{pagination-item-hMN-34PX.d.ts → pagination-item-mKQyvHV9.d.ts} +3 -3
  266. package/dist/{popover-WJoHXecW.js → popover-CGvBn3q9.js} +3 -3
  267. package/dist/{popover-WJoHXecW.js.map → popover-CGvBn3q9.js.map} +1 -1
  268. package/dist/{popover-CGNoywPj.js → popover-COi7S9pJ.js} +1 -1
  269. package/dist/{popover-CGNoywPj.js.map → popover-COi7S9pJ.js.map} +1 -1
  270. package/dist/{popover-trigger-CjEKeJwY.js → popover-trigger-BLnIukvY.js} +2 -2
  271. package/dist/{popover-trigger-CjEKeJwY.js.map → popover-trigger-BLnIukvY.js.map} +1 -1
  272. package/dist/{popover-trigger-context-DQy9nKB2.d.ts → popover-trigger-context-C3QaiCth.d.ts} +5 -5
  273. package/dist/{popover-trigger-context-CNUJbbBn.js → popover-trigger-context-CGJlUS_N.js} +1 -1
  274. package/dist/{popover-trigger-context-CNUJbbBn.js.map → popover-trigger-context-CGJlUS_N.js.map} +1 -1
  275. package/dist/{radio-C_Zbb4CF.js → radio-ClWd10lc.js} +1 -1
  276. package/dist/{radio-C_Zbb4CF.js.map → radio-ClWd10lc.js.map} +1 -1
  277. package/dist/{search-Dg6xvCDB.js → search-CRq3BbRW.js} +1 -1
  278. package/dist/{search-Dg6xvCDB.js.map → search-CRq3BbRW.js.map} +1 -1
  279. package/dist/{select-B1e494BO.js → select-DCZV6wZu.js} +1 -1
  280. package/dist/{select-B1e494BO.js.map → select-DCZV6wZu.js.map} +1 -1
  281. package/dist/{select-optgroup-D7Gd7ioS.js → select-optgroup-BUaB9Yz-.js} +1 -1
  282. package/dist/{select-optgroup-D7Gd7ioS.js.map → select-optgroup-BUaB9Yz-.js.map} +1 -1
  283. package/dist/{select-option-DUfDzvNN.js → select-option-BByWq34J.js} +1 -1
  284. package/dist/{select-option-DUfDzvNN.js.map → select-option-BByWq34J.js.map} +1 -1
  285. package/dist/skip-link-DwuiIAvE.js +18 -0
  286. package/dist/skip-link-DwuiIAvE.js.map +1 -0
  287. package/dist/sticky-header-CPHxBupp.d.ts +19 -0
  288. package/dist/sticky-header-DWAJUj20.js +21 -0
  289. package/dist/sticky-header-DWAJUj20.js.map +1 -0
  290. package/dist/sub-navbar-DEudSxfj.js +28 -0
  291. package/dist/sub-navbar-DEudSxfj.js.map +1 -0
  292. package/dist/{tab-D-OGgeAb.js → tab-9qkzsjIT.js} +1 -1
  293. package/dist/{tab-D-OGgeAb.js.map → tab-9qkzsjIT.js.map} +1 -1
  294. package/dist/{tabs-DzRc-Y8t.js → tabs-CpaYfphj.js} +1 -1
  295. package/dist/{tabs-DzRc-Y8t.js.map → tabs-CpaYfphj.js.map} +1 -1
  296. package/dist/{tabs-list-qH_cJgYi.js → tabs-list-UDrgmCSx.js} +1 -1
  297. package/dist/{tabs-list-qH_cJgYi.js.map → tabs-list-UDrgmCSx.js.map} +1 -1
  298. package/dist/{tabs-panel-DtHr9i79.js → tabs-panel-DeVzvQQw.js} +1 -1
  299. package/dist/{tabs-panel-DtHr9i79.js.map → tabs-panel-DeVzvQQw.js.map} +1 -1
  300. package/dist/{textarea-CEUafYI-.js → textarea-C580HmQX.js} +1 -1
  301. package/dist/{textarea-CEUafYI-.js.map → textarea-C580HmQX.js.map} +1 -1
  302. package/dist/textfield-CWoUw1b2.js +0 -0
  303. package/dist/{textfield-DwBJIap9.js → textfield-e06UoQC8.js} +3 -3
  304. package/dist/{textfield-DwBJIap9.js.map → textfield-e06UoQC8.js.map} +1 -1
  305. package/dist/{types-CAwE6h3H.d.ts → types-DC-FPmDA.d.ts} +1 -1
  306. package/dist/{types-BTJlwWCQ.d.ts → types-Mj1poXVf.d.ts} +1 -1
  307. package/dist/types.d.ts +1 -1
  308. package/dist/useCheckboxGroup-DRhqch1m.d.ts +22 -0
  309. package/dist/useCheckboxGroup-rTVawmvi.js +18 -0
  310. package/dist/useCheckboxGroup-rTVawmvi.js.map +1 -0
  311. package/dist/useElementScrolledPastObserver-DjzJ4Mn-.js +20 -0
  312. package/dist/useElementScrolledPastObserver-DjzJ4Mn-.js.map +1 -0
  313. package/dist/{useIsomorphicLayoutEffect-DCaf_yI4.js → useIsomorphicLayoutEffect-B5btmYlF.js} +1 -1
  314. package/dist/{useIsomorphicLayoutEffect-DCaf_yI4.js.map → useIsomorphicLayoutEffect-B5btmYlF.js.map} +1 -1
  315. package/dist/{useIsomorphicLayoutEffect-D3y6bHpX.d.ts → useIsomorphicLayoutEffect-BMdz-mee.d.ts} +1 -1
  316. package/dist/{useMergeRefs-Cz-t7gpp.js → useMergeRefs-CcJMoo46.js} +1 -1
  317. package/dist/{useMergeRefs-Cz-t7gpp.js.map → useMergeRefs-CcJMoo46.js.map} +1 -1
  318. package/dist/{useMergeRefs-BTgz9pcs.d.ts → useMergeRefs-iCenhgmf.d.ts} +1 -1
  319. package/dist/{usePagination-afWMXp7h.js → usePagination-DNqO-ob2.js} +1 -1
  320. package/dist/{usePagination-afWMXp7h.js.map → usePagination-DNqO-ob2.js.map} +1 -1
  321. package/dist/useScrollDirection-BLgp51hx.js +28 -0
  322. package/dist/useScrollDirection-BLgp51hx.js.map +1 -0
  323. package/dist/utilities/hooks/index.d.ts +17 -14
  324. package/dist/utilities/hooks/index.js +6 -5
  325. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts +2 -0
  326. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.js +3 -0
  327. package/dist/utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver.d.ts +8 -0
  328. package/dist/utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver.js +3 -0
  329. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +1 -1
  330. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  331. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.d.ts +1 -1
  332. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.js +1 -1
  333. package/dist/utilities/hooks/usePagination/usePagination.d.ts +16 -13
  334. package/dist/utilities/hooks/usePagination/usePagination.js +1 -1
  335. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.ts +11 -0
  336. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.js +3 -0
  337. package/dist/utilities/index.d.ts +17 -14
  338. package/dist/utilities/index.js +7 -6
  339. package/dist/utilities/types.d.ts +1 -1
  340. package/dist/utilities-JoKvbhOy.js +0 -0
  341. package/dist/{validation-message-DjATM7g-.js → validation-message-6AQTIup_.js} +1 -1
  342. package/dist/{validation-message-DjATM7g-.js.map → validation-message-6AQTIup_.js.map} +1 -1
  343. package/dist/validation-message-B4lI2a0K.js +0 -0
  344. package/dist/vanilla/dropdown/index.d.ts +1 -1
  345. package/dist/vanilla/dropdown/index.js +2 -2
  346. package/dist/vanilla/index.d.ts +2 -2
  347. package/dist/vanilla/index.js +2 -2
  348. package/dist/vanilla/popover/index.d.ts +1 -1
  349. package/dist/vanilla/popover/index.js +1 -1
  350. package/package.json +4 -4
  351. package/dist/navbar-Dm9lM6Xr.js +0 -31
  352. package/dist/navbar-Dm9lM6Xr.js.map +0 -1
  353. /package/dist/{checkbox-DXGZ7D3M.js → checkbox-DdQn64cR.js} +0 -0
  354. /package/dist/{chip-CopwfoBo.js → chip-6KumidQL.js} +0 -0
  355. /package/dist/{components-CtNCeoXN.js → components-CUDHzsYh.js} +0 -0
  356. /package/dist/{dialog-Cva1W11M.js → dialog-B6bZOPYF.js} +0 -0
  357. /package/dist/{drawer-D0EFrwju.js → drawer-sfOVHFWA.js} +0 -0
  358. /package/dist/{dropdown-mQ8x9_NH.js → dropdown-DR0Lif3r.js} +0 -0
  359. /package/dist/{fieldset-BhCAsBCv.js → fieldset-Ds2WiAnj.js} +0 -0
  360. /package/dist/{footer-BThmhXy7.js → filter-group-MjaWbeZO.js} +0 -0
  361. /package/dist/{hooks-CQ4fud3K.js → footer-Cq6w0v2j.js} +0 -0
  362. /package/dist/{link-oWcjwJYP.js → hooks-BmaG9QJW.js} +0 -0
  363. /package/dist/{logo-Dx-VZMJu.js → link-CKJeUW0o.js} +0 -0
  364. /package/dist/{navbar-DvT5z7E0.js → logo-CIDSfhf9.js} +0 -0
  365. /package/dist/{pagination-DrIF_DVv.js → navbar-BuFLsqCZ.js} +0 -0
  366. /package/dist/{popover-3oBuiK3l.js → pagination-DUyQRuUE.js} +0 -0
  367. /package/dist/{radio-h9AAOfEn.js → popover-C4QdJkKG.js} +0 -0
  368. /package/dist/{search-D6IdbNO6.js → radio-Uyx2D7dl.js} +0 -0
  369. /package/dist/{select-Dg_OZVWF.js → search-VYIc3wFh.js} +0 -0
  370. /package/dist/{tabs-DXmy9wEs.js → select-D1X9tdeH.js} +0 -0
  371. /package/dist/{textarea-YZQSw01C.js → skip-link-CGmg3TAi.js} +0 -0
  372. /package/dist/{textfield-BJszUges.js → sticky-header-CII-Yy5M.js} +0 -0
  373. /package/dist/{utilities-DO_q6EB3.js → tabs-CYBqn2Kj.js} +0 -0
  374. /package/dist/{validation-message-fz0dNgdm.js → textarea-D37K5D86.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"popover-WJoHXecW.js","names":["event: MouseEvent","event: KeyboardEvent"],"sources":["../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nconst padding = 20;\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n dark = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;AAgBA,MAAM,UAAU;;;;;;;;;;;;;;;;;;AA4EhB,MAAa,UAAU,CAAC,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,CAAE,GACvB,OAAO,OACP,UAAU,OACV,IACA,GAAG,MACU,KAAK;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,gBAAmB;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,GAAI,EAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,UAAU,GAAG,qBAAqB;EAC/C,MAAM,aAAa,UAAU,OAAO;EACpC,UAAU,CAAC,QAAQ;AACjB,kBAAe,IAAI;AACnB,oBAAiB,IAAI;EACtB;EACD,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,WAAU,MAAM;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,cAAc,CAACA,UAAsB;GACzC,MAAM,KAAK,MAAM;GACjB,MAAM,YAAY,IAAI,WAAW,kBAAkB,SAAS,GAAG,IAAI;GACnE,MAAM,aAAa,cAAc,SAAS,SAAS,GAAW;AAE9D,OAAI,UACF,WAAU,MAAM;EAEnB;EAED,MAAM,gBAAgB,CAACC,UAAyB;AAC9C,OAAI,MAAM,QAAQ,aAAa,OAAQ;AACvC,SAAM,gBAAgB;AACtB,aAAU,MAAM;EACjB;AAED,WAAS,iBAAiB,SAAS,aAAa,KAAK;AACrD,WAAS,iBAAiB,WAAW,cAAc;AACnD,SAAO,MAAM;AACX,YAAS,oBAAoB,SAAS,aAAa,KAAK;AACxD,YAAS,oBAAoB,WAAW,cAAc;EACvD;CACF,GAAE,CAAC,QAAQ,SAAU,EAAC;AAEvB,WAAU,MAAM;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,eAAe,kBAAkB,SAAS,GAAG,IAAI;AAE1E,MAAI,WAAW,WAAW,OACxB,QAAO,WAAW,SAAS,SAAS,MAAM;AACxC,mBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,QAAQ;KACf,GAAI,uBAAuB,CAAE,IAAG,CAAC,KAAK,EAAE,QAAS,EAAC,EAAE,MAAM,EAAE,QAAS,EAAC,AAAC;KACvE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;KAAW,EAAC;IACvC;IACD,UAAU;IACV;GACD,EAAC,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,gBAAgB,KAAK;AACpC,YAAQ,MAAM,aAAa,EAAE,EAAE,KAAK,EAAE;AACtC,YAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;GAC9E,EAAC;EACH,EAAC;CACL,GAAE;EAAC;EAAQ;EAAW;EAAI;EAAsB;CAAmB,EAAC;AAGrE,WAAU,MAAM;AACd,MAAI,GAAI,gBAAe,GAAG;CAC3B,GAAE,CAAC,IAAI,YAAa,EAAC;AAEtB,wBACE,IAAC;EACC,WAAW,KAAG,cAAc,UAAU;EACtC,IAAI,MAAM;EACV,gBAAc;EACd,aAAW;EACX,KAAK;EACL,GAAI;GACJ;AAEL"}
1
+ {"version":3,"file":"popover-CGvBn3q9.js","names":["event: MouseEvent","event: KeyboardEvent"],"sources":["../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nconst padding = 20;\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n dark = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;AAgBA,MAAM,UAAU;;;;;;;;;;;;;;;;;;AA4EhB,MAAa,UAAU,CAAC,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,CAAE,GACvB,OAAO,OACP,UAAU,OACV,IACA,GAAG,MACU,KAAK;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,gBAAmB;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,GAAI,EAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,UAAU,GAAG,qBAAqB;EAC/C,MAAM,aAAa,UAAU,OAAO;EACpC,UAAU,CAAC,QAAQ;AACjB,kBAAe,IAAI;AACnB,oBAAiB,IAAI;EACtB;EACD,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,WAAU,MAAM;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,cAAc,CAACA,UAAsB;GACzC,MAAM,KAAK,MAAM;GACjB,MAAM,YAAY,IAAI,WAAW,kBAAkB,SAAS,GAAG,IAAI;GACnE,MAAM,aAAa,cAAc,SAAS,SAAS,GAAW;AAE9D,OAAI,UACF,WAAU,MAAM;EAEnB;EAED,MAAM,gBAAgB,CAACC,UAAyB;AAC9C,OAAI,MAAM,QAAQ,aAAa,OAAQ;AACvC,SAAM,gBAAgB;AACtB,aAAU,MAAM;EACjB;AAED,WAAS,iBAAiB,SAAS,aAAa,KAAK;AACrD,WAAS,iBAAiB,WAAW,cAAc;AACnD,SAAO,MAAM;AACX,YAAS,oBAAoB,SAAS,aAAa,KAAK;AACxD,YAAS,oBAAoB,WAAW,cAAc;EACvD;CACF,GAAE,CAAC,QAAQ,SAAU,EAAC;AAEvB,WAAU,MAAM;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,eAAe,kBAAkB,SAAS,GAAG,IAAI;AAE1E,MAAI,WAAW,WAAW,OACxB,QAAO,WAAW,SAAS,SAAS,MAAM;AACxC,mBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,QAAQ;KACf,GAAI,uBAAuB,CAAE,IAAG,CAAC,KAAK,EAAE,QAAS,EAAC,EAAE,MAAM,EAAE,QAAS,EAAC,AAAC;KACvE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;KAAW,EAAC;IACvC;IACD,UAAU;IACV;GACD,EAAC,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,gBAAgB,KAAK;AACpC,YAAQ,MAAM,aAAa,EAAE,EAAE,KAAK,EAAE;AACtC,YAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;GAC9E,EAAC;EACH,EAAC;CACL,GAAE;EAAC;EAAQ;EAAW;EAAI;EAAsB;CAAmB,EAAC;AAGrE,WAAU,MAAM;AACd,MAAI,GAAI,gBAAe,GAAG;CAC3B,GAAE,CAAC,IAAI,YAAa,EAAC;AAEtB,wBACE,IAAC;EACC,WAAW,KAAG,cAAc,UAAU;EACtC,IAAI,MAAM;EACV,gBAAc;EACd,aAAW;EACX,KAAK;EACL,GAAI;GACJ;AAEL"}
@@ -45,4 +45,4 @@ const initPopover = ({ id, disableAutoPlacement = false, placement = "top", posi
45
45
 
46
46
  //#endregion
47
47
  export { initPopover };
48
- //# sourceMappingURL=popover-CGNoywPj.js.map
48
+ //# sourceMappingURL=popover-COi7S9pJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-CGNoywPj.js","names":["cleanup: (() => void) | undefined","open: boolean"],"sources":["../src/vanilla/popover/index.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\n\nconst padding = 20;\n\nexport type InitPopoverOptions = {\n /** The id of the popover to initialize. The trigger element should have a `aria-controls` attribute with the same id. */\n id: string;\n /**\n * Placement of the popover relative to the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware: [\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n};\n\nexport const initPopover = ({\n id,\n disableAutoPlacement = false,\n placement = 'top',\n positionMiddleware = [],\n}: InitPopoverOptions) => {\n // let isOpen = false;\n let cleanup: (() => void) | undefined;\n const popover = document.getElementById(id);\n const triggerSelector = `[aria-controls=\"${id}\"]`;\n const trigger = document.querySelector(triggerSelector);\n\n if (!popover || !trigger) return;\n\n const togglePopover = (open: boolean) => {\n if (open) {\n cleanup = autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n popover.setAttribute('aria-hidden', 'false');\n trigger.setAttribute('aria-expanded', 'true');\n } else {\n cleanup?.();\n popover.setAttribute('aria-hidden', 'true');\n trigger.setAttribute('aria-expanded', 'false');\n }\n };\n\n document.addEventListener(\n 'click',\n (event) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(triggerSelector);\n const isOutside = !isTrigger && !popover.contains(el as Node);\n const isOpen = popover.getAttribute('aria-hidden') === 'false';\n\n if (isTrigger) {\n togglePopover(!isOpen);\n }\n if (isOutside && isOpen) {\n togglePopover(false);\n }\n },\n true,\n );\n};\n"],"mappings":";;;AAGA,MAAM,UAAU;AAsChB,MAAa,cAAc,CAAC,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,CAAE,GACJ,KAAK;CAExB,IAAIA;CACJ,MAAM,UAAU,SAAS,eAAe,GAAG;CAC3C,MAAM,mBAAmB,kBAAkB,GAAG;CAC9C,MAAM,UAAU,SAAS,cAAc,gBAAgB;AAEvD,MAAK,YAAY,QAAS;CAE1B,MAAM,gBAAgB,CAACC,SAAkB;AACvC,MAAI,MAAM;AACR,aAAU,WAAW,SAAS,SAAS,MAAM;AAC3C,oBAAgB,SAAS,SAAS;KAChC,YAAY;MACV,OAAO,QAAQ;MACf,GAAI,uBAAuB,CAAE,IAAG,CAAC,KAAK,EAAE,QAAS,EAAC,EAAE,MAAM,EAAE,QAAS,EAAC,AAAC;MACvE,GAAG;MACH,KAAK,EAAE,QAAS,EAAC;KAClB;KACD,UAAU;KACV;IACD,EAAC,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,gBAAgB,KAAK;AACpC,aAAQ,MAAM,aAAa,EAAE,EAAE,KAAK,EAAE;AACtC,aAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;IAC9E,EAAC;GACH,EAAC;AACF,WAAQ,aAAa,eAAe,QAAQ;AAC5C,WAAQ,aAAa,iBAAiB,OAAO;EAC9C,OAAM;AACL,cAAW;AACX,WAAQ,aAAa,eAAe,OAAO;AAC3C,WAAQ,aAAa,iBAAiB,QAAQ;EAC/C;CACF;AAED,UAAS,iBACP,SACA,CAAC,UAAU;EACT,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,IAAI,UAAU,gBAAgB;EAChD,MAAM,aAAa,cAAc,QAAQ,SAAS,GAAW;EAC7D,MAAM,SAAS,QAAQ,aAAa,cAAc,KAAK;AAEvD,MAAI,UACF,gBAAe,OAAO;AAExB,MAAI,aAAa,OACf,eAAc,MAAM;CAEvB,GACD,KACD;AACF"}
1
+ {"version":3,"file":"popover-COi7S9pJ.js","names":["cleanup: (() => void) | undefined","open: boolean"],"sources":["../src/vanilla/popover/index.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\n\nconst padding = 20;\n\nexport type InitPopoverOptions = {\n /** The id of the popover to initialize. The trigger element should have a `aria-controls` attribute with the same id. */\n id: string;\n /**\n * Placement of the popover relative to the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware: [\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n};\n\nexport const initPopover = ({\n id,\n disableAutoPlacement = false,\n placement = 'top',\n positionMiddleware = [],\n}: InitPopoverOptions) => {\n // let isOpen = false;\n let cleanup: (() => void) | undefined;\n const popover = document.getElementById(id);\n const triggerSelector = `[aria-controls=\"${id}\"]`;\n const trigger = document.querySelector(triggerSelector);\n\n if (!popover || !trigger) return;\n\n const togglePopover = (open: boolean) => {\n if (open) {\n cleanup = autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n popover.setAttribute('aria-hidden', 'false');\n trigger.setAttribute('aria-expanded', 'true');\n } else {\n cleanup?.();\n popover.setAttribute('aria-hidden', 'true');\n trigger.setAttribute('aria-expanded', 'false');\n }\n };\n\n document.addEventListener(\n 'click',\n (event) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(triggerSelector);\n const isOutside = !isTrigger && !popover.contains(el as Node);\n const isOpen = popover.getAttribute('aria-hidden') === 'false';\n\n if (isTrigger) {\n togglePopover(!isOpen);\n }\n if (isOutside && isOpen) {\n togglePopover(false);\n }\n },\n true,\n );\n};\n"],"mappings":";;;AAGA,MAAM,UAAU;AAsChB,MAAa,cAAc,CAAC,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,CAAE,GACJ,KAAK;CAExB,IAAIA;CACJ,MAAM,UAAU,SAAS,eAAe,GAAG;CAC3C,MAAM,mBAAmB,kBAAkB,GAAG;CAC9C,MAAM,UAAU,SAAS,cAAc,gBAAgB;AAEvD,MAAK,YAAY,QAAS;CAE1B,MAAM,gBAAgB,CAACC,SAAkB;AACvC,MAAI,MAAM;AACR,aAAU,WAAW,SAAS,SAAS,MAAM;AAC3C,oBAAgB,SAAS,SAAS;KAChC,YAAY;MACV,OAAO,QAAQ;MACf,GAAI,uBAAuB,CAAE,IAAG,CAAC,KAAK,EAAE,QAAS,EAAC,EAAE,MAAM,EAAE,QAAS,EAAC,AAAC;MACvE,GAAG;MACH,KAAK,EAAE,QAAS,EAAC;KAClB;KACD,UAAU;KACV;IACD,EAAC,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,gBAAgB,KAAK;AACpC,aAAQ,MAAM,aAAa,EAAE,EAAE,KAAK,EAAE;AACtC,aAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;IAC9E,EAAC;GACH,EAAC;AACF,WAAQ,aAAa,eAAe,QAAQ;AAC5C,WAAQ,aAAa,iBAAiB,OAAO;EAC9C,OAAM;AACL,cAAW;AACX,WAAQ,aAAa,eAAe,OAAO;AAC3C,WAAQ,aAAa,iBAAiB,QAAQ;EAC/C;CACF;AAED,UAAS,iBACP,SACA,CAAC,UAAU;EACT,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,IAAI,UAAU,gBAAgB;EAChD,MAAM,aAAa,cAAc,QAAQ,SAAS,GAAW;EAC7D,MAAM,SAAS,QAAQ,aAAa,cAAc,KAAK;AAEvD,MAAI,UACF,gBAAe,OAAO;AAExB,MAAI,aAAa,OACf,eAAc,MAAM;CAEvB,GACD,KACD;AACF"}
@@ -1,5 +1,5 @@
1
1
  import { Button } from "./button-fhd-JARc.js";
2
- import { Context } from "./popover-trigger-context-CNUJbbBn.js";
2
+ import { Context } from "./popover-trigger-context-CGJlUS_N.js";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { use } from "react";
@@ -43,4 +43,4 @@ const PopoverTrigger = ({ id, inline, asChild, ref,...rest }) => {
43
43
 
44
44
  //#endregion
45
45
  export { PopoverTrigger };
46
- //# sourceMappingURL=popover-trigger-CjEKeJwY.js.map
46
+ //# sourceMappingURL=popover-trigger-BLnIukvY.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-CjEKeJwY.js","names":[],"sources":["../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,iBAAiB,CAAC,EAAE,IAAI,QAAQ,SAAS,IAAK,GAAG,MAA2B,KAAK;CAC5F,MAAM,EAAE,WAAW,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAC/D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,SAAS,MAAM,iBAAiB,CAAC,UAAU,KAAK;EAChD,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,SACjB,IACD,CAAE;CACP,GACD,KACD;AAED,wBAAO,IAAC;EAAe;EAAK,GAAI;GAAgB;AACjD"}
1
+ {"version":3,"file":"popover-trigger-BLnIukvY.js","names":[],"sources":["../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,iBAAiB,CAAC,EAAE,IAAI,QAAQ,SAAS,IAAK,GAAG,MAA2B,KAAK;CAC5F,MAAM,EAAE,WAAW,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAC/D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,SAAS,MAAM,iBAAiB,CAAC,UAAU,KAAK;EAChD,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,SACjB,IACD,CAAE;CACP,GACD,KACD;AAED,wBAAO,IAAC;EAAe;EAAK,GAAI;GAAgB;AACjD"}
@@ -1,9 +1,9 @@
1
- import * as react_jsx_runtime53 from "react/jsx-runtime";
2
- import * as react52 from "react";
1
+ import * as react_jsx_runtime56 from "react/jsx-runtime";
2
+ import * as react55 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/components/popover/popover-trigger-context.d.ts
6
- declare const Context: react52.Context<{
6
+ declare const Context: react55.Context<{
7
7
  popoverId?: string;
8
8
  setPopoverId?: (id: string) => void;
9
9
  popoverOpen?: boolean;
@@ -25,7 +25,7 @@ type PopoverTriggerContextProps = {
25
25
  */
26
26
  declare const PopoverTriggerContext: ({
27
27
  children
28
- }: PopoverTriggerContextProps) => react_jsx_runtime53.JSX.Element;
28
+ }: PopoverTriggerContextProps) => react_jsx_runtime56.JSX.Element;
29
29
  //#endregion
30
30
  export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
31
- //# sourceMappingURL=popover-trigger-context-DQy9nKB2.d.ts.map
31
+ //# sourceMappingURL=popover-trigger-context-C3QaiCth.d.ts.map
@@ -31,4 +31,4 @@ const PopoverTriggerContext = ({ children }) => {
31
31
 
32
32
  //#endregion
33
33
  export { Context, PopoverTriggerContext };
34
- //# sourceMappingURL=popover-trigger-context-CNUJbbBn.js.map
34
+ //# sourceMappingURL=popover-trigger-context-CGJlUS_N.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-context-CNUJbbBn.js","names":[],"sources":["../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useState(false);\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;AAGA,MAAa,UAAU,cAKpB,CAAE,EAAC;;;;;;;;;;;;AAiBN,MAAa,wBAAwB,CAAC,EAAE,UAAsC,KAAK;CACjF,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,SAAS,MAAM;AAErD,wBAAO,IAAC;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;EAAgB;EAAG;GAAmB;AACtG"}
1
+ {"version":3,"file":"popover-trigger-context-CGJlUS_N.js","names":[],"sources":["../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useState(false);\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;AAGA,MAAa,UAAU,cAKpB,CAAE,EAAC;;;;;;;;;;;;AAiBN,MAAa,wBAAwB,CAAC,EAAE,UAAsC,KAAK;CACjF,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,SAAS,MAAM;AAErD,wBAAO,IAAC;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;EAAgB;EAAG;GAAmB;AACtG"}
@@ -40,4 +40,4 @@ const Radio = ({ dark, label, description, error, style, className, ref, id, "ar
40
40
 
41
41
  //#endregion
42
42
  export { Radio };
43
- //# sourceMappingURL=radio-C_Zbb4CF.js.map
43
+ //# sourceMappingURL=radio-ClWd10lc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-C_Zbb4CF.js","names":[],"sources":["../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n style,\n className,\n ref,\n id,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field className={className} data-dark={dark} style={style} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,OACA,WACA,KACA,IACA,oBAAoB,oBACpB,GAAG,OACQ,KAAK;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,mBAAoB,EAAC,KAAK,IAAI,CAAC,MAAM;AAEhG,wBACE,IAAC;EAAiB;EAAW,aAAW;EAAa;EAAO;4BAC1D,KAAC;mBACC,IAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc;IACd,oBAAkB;IAClB,GAAI;KACJ;GACD,yBACC,IAAC;IAAM,QAAO;IAAS,SAAS;IAAI;8BAClC,IAAC,oBAAM,QAAa;KACd;GAET,+BAGC,IAAC;IAAiB,eAAY;IAAO,IAAI;cACtC;KACgB;MAEf;GACF;AAEX"}
1
+ {"version":3,"file":"radio-ClWd10lc.js","names":[],"sources":["../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n style,\n className,\n ref,\n id,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field className={className} data-dark={dark} style={style} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,OACA,WACA,KACA,IACA,oBAAoB,oBACpB,GAAG,OACQ,KAAK;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,mBAAoB,EAAC,KAAK,IAAI,CAAC,MAAM;AAEhG,wBACE,IAAC;EAAiB;EAAW,aAAW;EAAa;EAAO;4BAC1D,KAAC;mBACC,IAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc;IACd,oBAAkB;IAClB,GAAI;KACJ;GACD,yBACC,IAAC;IAAM,QAAO;IAAS,SAAS;IAAI;8BAClC,IAAC,oBAAM,QAAa;KACd;GAET,+BAGC,IAAC;IAAiB,eAAY;IAAO,IAAI;cACtC;KACgB;MAEf;GACF;AAEX"}
@@ -52,4 +52,4 @@ const Search = ({ className, onSubmit, clearAriaLabel = "Clear", size = "medium"
52
52
 
53
53
  //#endregion
54
54
  export { Search };
55
- //# sourceMappingURL=search-Dg6xvCDB.js.map
55
+ //# sourceMappingURL=search-CRq3BbRW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-Dg6xvCDB.js","names":["e: React.FormEvent<HTMLFormElement>"],"sources":["../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { BiIconCrossSmall, BiIconMagnefyingGlass } from '@bi-digital/icons-react';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @defaultValue 'Clear'\n */\n clearAriaLabel?: string;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n dark,\n style,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} asChild>\n <form onSubmit={handleSubmit}>\n <FieldAffixes>\n <FieldAffix>\n <BiIconMagnefyingGlass size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} variant='text' type='reset'>\n <BiIconCrossSmall size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AAyBA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,MACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;AAC5D,IAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;AACpD,YAAS,OAAO,SAAS,GAAG;EAC7B;CACF;AACD,wBACE,IAAC;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAO;4BAC7E,IAAC;GAAK,UAAU;6BACd,KAAC;oBACC,IAAC,wCACC,IAAC,yBAA4B,OAAQ,GAC1B;oBACb,IAAC;KAAM,MAAK;KAAY;KAAW;KAAM,GAAI;MAAS;oBACtD,IAAC;KAAW,eAAY;+BACtB,IAAC;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;gCACnF,IAAC;OAAuB;OAAM,eAAY;QAAS;OAC5C;MACE;OACA;IACV;GACD;AAEX"}
1
+ {"version":3,"file":"search-CRq3BbRW.js","names":["e: React.FormEvent<HTMLFormElement>"],"sources":["../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { BiIconCrossSmall, BiIconMagnefyingGlass } from '@bi-digital/icons-react';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @defaultValue 'Clear'\n */\n clearAriaLabel?: string;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n dark,\n style,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} asChild>\n <form onSubmit={handleSubmit}>\n <FieldAffixes>\n <FieldAffix>\n <BiIconMagnefyingGlass size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} variant='text' type='reset'>\n <BiIconCrossSmall size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AAyBA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,MACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;AAC5D,IAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;AACpD,YAAS,OAAO,SAAS,GAAG;EAC7B;CACF;AACD,wBACE,IAAC;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAO;4BAC7E,IAAC;GAAK,UAAU;6BACd,KAAC;oBACC,IAAC,wCACC,IAAC,yBAA4B,OAAQ,GAC1B;oBACb,IAAC;KAAM,MAAK;KAAY;KAAW;KAAM,GAAI;MAAS;oBACtD,IAAC;KAAW,eAAY;+BACtB,IAAC;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;gCACnF,IAAC;OAAuB;OAAM,eAAY;QAAS;OAC5C;MACE;OACA;IACV;GACD;AAEX"}
@@ -23,4 +23,4 @@ const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref,...props })
23
23
 
24
24
  //#endregion
25
25
  export { Select };
26
- //# sourceMappingURL=select-B1e494BO.js.map
26
+ //# sourceMappingURL=select-DCZV6wZu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-B1e494BO.js","names":[],"sources":["../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;;AAmBA,MAAa,SAAS,CAAC,EAAE,WAAW,MAAM,WAAW,aAAa,MAAM,IAAK,GAAG,OAAoB,KAAK;AACvG,wBACE,IAAC;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,aAAW;EACN;EACL,WAAW,CAAC,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,SAAU,OAAM,gBAAgB;AAC1C,eAAY,MAAM;EACnB;EACD,aAAa,CAAC,UAAU;AACtB,OAAI,MAAM,SAAU,OAAM,gBAAgB;AAC1C,iBAAc,MAAM;EACrB;EACD,GAAI;GACJ;AAEL"}
1
+ {"version":3,"file":"select-DCZV6wZu.js","names":[],"sources":["../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;;AAmBA,MAAa,SAAS,CAAC,EAAE,WAAW,MAAM,WAAW,aAAa,MAAM,IAAK,GAAG,OAAoB,KAAK;AACvG,wBACE,IAAC;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,aAAW;EACN;EACL,WAAW,CAAC,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,SAAU,OAAM,gBAAgB;AAC1C,eAAY,MAAM;EACnB;EACD,aAAa,CAAC,UAAU;AACtB,OAAI,MAAM,SAAU,OAAM,gBAAgB;AAC1C,iBAAc,MAAM;EACrB;EACD,GAAI;GACJ;AAEL"}
@@ -12,4 +12,4 @@ const SelectOptgroup = ({ asChild, ref,...props }) => {
12
12
 
13
13
  //#endregion
14
14
  export { SelectOptgroup };
15
- //# sourceMappingURL=select-optgroup-D7Gd7ioS.js.map
15
+ //# sourceMappingURL=select-optgroup-BUaB9Yz-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-optgroup-D7Gd7ioS.js","names":[],"sources":["../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,iBAAiB,CAAC,EAAE,SAAS,IAAK,GAAG,OAA4B,KAAK;CACjF,MAAM,YAAY,UAAU,OAAO;AACnC,wBAAO,IAAC;EAAU,GAAI;EAAY;GAAO;AAC1C"}
1
+ {"version":3,"file":"select-optgroup-BUaB9Yz-.js","names":[],"sources":["../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,iBAAiB,CAAC,EAAE,SAAS,IAAK,GAAG,OAA4B,KAAK;CACjF,MAAM,YAAY,UAAU,OAAO;AACnC,wBAAO,IAAC;EAAU,GAAI;EAAY;GAAO;AAC1C"}
@@ -12,4 +12,4 @@ const SelectOption = ({ asChild, ref,...props }) => {
12
12
 
13
13
  //#endregion
14
14
  export { SelectOption };
15
- //# sourceMappingURL=select-option-DUfDzvNN.js.map
15
+ //# sourceMappingURL=select-option-BByWq34J.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-option-DUfDzvNN.js","names":[],"sources":["../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,eAAe,CAAC,EAAE,SAAS,IAAK,GAAG,OAA0B,KAAK;CAC7E,MAAM,YAAY,UAAU,OAAO;AACnC,wBAAO,IAAC;EAAU,GAAI;EAAY;GAAO;AAC1C"}
1
+ {"version":3,"file":"select-option-BByWq34J.js","names":[],"sources":["../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,eAAe,CAAC,EAAE,SAAS,IAAK,GAAG,OAA0B,KAAK;CAC7E,MAAM,YAAY,UAAU,OAAO;AACnC,wBAAO,IAAC;EAAU,GAAI;EAAY;GAAO;AAC1C"}
@@ -0,0 +1,18 @@
1
+ import clsx from "clsx/lite";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/components/skip-link/skip-link.tsx
6
+ const SkipLink = ({ asChild, children, className, dark,...props }) => {
7
+ const Component = asChild ? Slot : "a";
8
+ return /* @__PURE__ */ jsx(Component, {
9
+ className: clsx("bi-skip-link", className),
10
+ "data-dark": dark,
11
+ ...props,
12
+ children
13
+ });
14
+ };
15
+
16
+ //#endregion
17
+ export { SkipLink };
18
+ //# sourceMappingURL=skip-link-DwuiIAvE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link-DwuiIAvE.js","names":[],"sources":["../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, dark, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} data-dark={dark} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAaA,MAAa,WAAW,CAAC,EAAE,SAAS,UAAU,WAAW,KAAM,GAAG,OAAsB,KAAK;CAC3F,MAAM,YAAY,UAAU,OAAO;AACnC,wBACE,IAAC;EAAU,WAAW,KAAK,gBAAgB,UAAU;EAAE,aAAW;EAAM,GAAI;EACzE;GACS;AAEf"}
@@ -0,0 +1,19 @@
1
+ import * as react_jsx_runtime66 from "react/jsx-runtime";
2
+ import { ReactNode } from "react";
3
+
4
+ //#region src/components/sticky-header/sticky-header.d.ts
5
+ type StickyHeaderProps = {
6
+ children: ReactNode;
7
+ };
8
+ /**
9
+ * Make a sticky header that will stay at the top of the viewport when scrolling.
10
+ * It handles different distance to the top based on sub-navbar, navbar and other factors.
11
+ * This element is a Slot which simply adds the correct CSS styles to the children.
12
+ * Make sure that the children passed to this component appends className and not overrides it.
13
+ */
14
+ declare const StickyHeader: ({
15
+ children
16
+ }: StickyHeaderProps) => react_jsx_runtime66.JSX.Element;
17
+ //#endregion
18
+ export { StickyHeader, StickyHeaderProps };
19
+ //# sourceMappingURL=sticky-header-CPHxBupp.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { Slot } from "@radix-ui/react-slot";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/components/sticky-header/sticky-header.tsx
5
+ /**
6
+ * Make a sticky header that will stay at the top of the viewport when scrolling.
7
+ * It handles different distance to the top based on sub-navbar, navbar and other factors.
8
+ * This element is a Slot which simply adds the correct CSS styles to the children.
9
+ * Make sure that the children passed to this component appends className and not overrides it.
10
+ */
11
+ const StickyHeader = ({ children }) => {
12
+ const Component = Slot;
13
+ return /* @__PURE__ */ jsx(Component, {
14
+ className: "bi-sticky-header",
15
+ children
16
+ });
17
+ };
18
+
19
+ //#endregion
20
+ export { StickyHeader };
21
+ //# sourceMappingURL=sticky-header-DWAJUj20.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sticky-header-DWAJUj20.js","names":[],"sources":["../src/components/sticky-header/sticky-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ReactNode } from 'react';\n\nexport type StickyHeaderProps = {\n children: ReactNode;\n};\n\n/**\n * Make a sticky header that will stay at the top of the viewport when scrolling.\n * It handles different distance to the top based on sub-navbar, navbar and other factors.\n * This element is a Slot which simply adds the correct CSS styles to the children.\n * Make sure that the children passed to this component appends className and not overrides it.\n */\nexport const StickyHeader = ({ children }: StickyHeaderProps) => {\n const Component = Slot;\n return <Component className='bi-sticky-header'>{children}</Component>;\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAa,eAAe,CAAC,EAAE,UAA6B,KAAK;CAC/D,MAAM,YAAY;AAClB,wBAAO,IAAC;EAAU,WAAU;EAAoB;GAAqB;AACtE"}
@@ -0,0 +1,28 @@
1
+ import { useElementScrolledPastObserver } from "./useElementScrolledPastObserver-DjzJ4Mn-.js";
2
+ import { useScrollDirection } from "./useScrollDirection-BLgp51hx.js";
3
+ import clsx from "clsx/lite";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useRef } from "react";
6
+
7
+ //#region src/components/navbar/sub-navbar.tsx
8
+ const SubNavbar = ({ dark = false, children, className, ref,...props }) => {
9
+ const elementRef = useRef(null);
10
+ const fixed = useElementScrolledPastObserver(elementRef);
11
+ const scrollDirection = useScrollDirection();
12
+ return /* @__PURE__ */ jsxs("div", {
13
+ className: "bi-sub-navbar--wrapper",
14
+ children: [/* @__PURE__ */ jsx("div", { ref: elementRef }), /* @__PURE__ */ jsx("nav", {
15
+ className: clsx("bi-sub-navbar", className),
16
+ "data-fixed": fixed,
17
+ "data-scroll-dir": fixed ? scrollDirection : void 0,
18
+ "data-dark": dark,
19
+ ...props,
20
+ ref,
21
+ children
22
+ })]
23
+ });
24
+ };
25
+
26
+ //#endregion
27
+ export { SubNavbar };
28
+ //# sourceMappingURL=sub-navbar-DEudSxfj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sub-navbar-DEudSxfj.js","names":[],"sources":["../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useElementScrolledPastObserver } from '../../utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver';\nimport { useScrollDirection } from '../../utilities/hooks/useScrollDirection/useScrollDirection';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useElementScrolledPastObserver(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAcA,MAAa,YAAY,CAAC,EAAE,OAAO,OAAO,UAAU,WAAW,IAAK,GAAG,OAAuB,KAAK;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,+BAA+B,WAAW;CACxD,MAAM,kBAAkB,oBAAoB;AAE5C,wBACE,KAAC;EAAI,WAAU;6BACb,IAAC,SAAI,KAAK,aAAc,kBACxB,IAAC;GACC,WAAW,KAAK,iBAAiB,UAAU;GAC3C,cAAY;GACZ,mBAAiB,QAAQ;GACzB,aAAW;GACX,GAAI;GACC;GAEJ;IACG;GACF;AAET"}
@@ -24,4 +24,4 @@ const Tab = ({ className, value, disabled, children, asChild, dark, ref,...props
24
24
 
25
25
  //#endregion
26
26
  export { Tab };
27
- //# sourceMappingURL=tab-D-OGgeAb.js.map
27
+ //# sourceMappingURL=tab-9qkzsjIT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-D-OGgeAb.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,MAAM,CAAC,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,MAAM,IAAK,GAAG,OAAiB,KAAK;AACvG,wBACE,IAAC;EAAe;EAAiB;EAAU;4BACzC,IAAC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB,UAAU;GAChC;GACD;GACH;GACN,GAAI;GAEH;IACM;GACD;AAEb"}
1
+ {"version":3,"file":"tab-9qkzsjIT.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,MAAM,CAAC,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,MAAM,IAAK,GAAG,OAAiB,KAAK;AACvG,wBACE,IAAC;EAAe;EAAiB;EAAU;4BACzC,IAAC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB,UAAU;GAChC;GACD;GACH;GACN,GAAI;GAEH;IACM;GACD;AAEb"}
@@ -21,4 +21,4 @@ const Tabs = ({ activationMode = "automatic", orientation = "horizontal", defaul
21
21
 
22
22
  //#endregion
23
23
  export { Tabs };
24
- //# sourceMappingURL=tabs-DzRc-Y8t.js.map
24
+ //# sourceMappingURL=tabs-CpaYfphj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-DzRc-Y8t.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,OAAO,CAAC,EACnB,iBAAiB,aACjB,cAAc,cACd,cACA,OACA,UACA,UACA,WACA,SACA,MACA,IACA,GAAG,OACO,KAAK;AACf,wBACE,IAAC;EACC,WAAW,KAAK,WAAW,UAAU;EACrB;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
1
+ {"version":3,"file":"tabs-CpaYfphj.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,OAAO,CAAC,EACnB,iBAAiB,aACjB,cAAc,cACd,cACA,OACA,UACA,UACA,WACA,SACA,MACA,IACA,GAAG,OACO,KAAK;AACf,wBACE,IAAC;EACC,WAAW,KAAK,WAAW,UAAU;EACrB;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
@@ -17,4 +17,4 @@ const TabsList = ({ className, loop = true, children, asChild, dark, ref,...prop
17
17
 
18
18
  //#endregion
19
19
  export { TabsList };
20
- //# sourceMappingURL=tabs-list-qH_cJgYi.js.map
20
+ //# sourceMappingURL=tabs-list-UDrgmCSx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-list-qH_cJgYi.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,WAAW,CAAC,EAAE,WAAW,OAAO,MAAM,UAAU,SAAS,MAAM,IAAK,GAAG,OAAsB,KAAK;AAC7G,wBACE,IAAC;EACC,WAAW,KAAK,iBAAiB,UAAU;EACrC;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
1
+ {"version":3,"file":"tabs-list-UDrgmCSx.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,WAAW,CAAC,EAAE,WAAW,OAAO,MAAM,UAAU,SAAS,MAAM,IAAK,GAAG,OAAsB,KAAK;AAC7G,wBACE,IAAC;EACC,WAAW,KAAK,iBAAiB,UAAU;EACrC;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
@@ -18,4 +18,4 @@ const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref,
18
18
 
19
19
  //#endregion
20
20
  export { TabsPanel };
21
- //# sourceMappingURL=tabs-panel-DtHr9i79.js.map
21
+ //# sourceMappingURL=tabs-panel-DeVzvQQw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-panel-DtHr9i79.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,YAAY,CAAC,EAAE,WAAW,OAAO,YAAY,UAAU,SAAS,MAAM,IAAK,GAAG,OAAuB,KAAK;AACrH,wBACE,IAAC;EACC,WAAW,KAAK,kBAAkB,UAAU;EACrC;EACP,YAAY;EACH;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACO;AAEb"}
1
+ {"version":3,"file":"tabs-panel-DeVzvQQw.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,YAAY,CAAC,EAAE,WAAW,OAAO,YAAY,UAAU,SAAS,MAAM,IAAK,GAAG,OAAuB,KAAK;AACrH,wBACE,IAAC;EACC,WAAW,KAAK,kBAAkB,UAAU;EACrC;EACP,YAAY;EACH;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACO;AAEb"}
@@ -14,4 +14,4 @@ const Textarea = ({ className, dark, size, ref,...props }) => {
14
14
 
15
15
  //#endregion
16
16
  export { Textarea };
17
- //# sourceMappingURL=textarea-CEUafYI-.js.map
17
+ //# sourceMappingURL=textarea-C580HmQX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea-CEUafYI-.js","names":[],"sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,WAAW,CAAC,EAAE,WAAW,MAAM,MAAM,IAAK,GAAG,OAAsB,KAAK;AACnF,wBAAO,IAAC;EAAS,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI;GAAS;AACnH"}
1
+ {"version":3,"file":"textarea-C580HmQX.js","names":[],"sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,WAAW,CAAC,EAAE,WAAW,MAAM,MAAM,IAAK,GAAG,OAAsB,KAAK;AACnF,wBAAO,IAAC;EAAS,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI;GAAS;AACnH"}
File without changes
@@ -3,8 +3,8 @@ import { FieldDescription } from "./field-description-Dhm1VA08.js";
3
3
  import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
4
4
  import { Input } from "./input-Dr7BnTyd.js";
5
5
  import { Label } from "./label-DUzvAx-T.js";
6
- import { Textarea } from "./textarea-CEUafYI-.js";
7
- import { ValidationMessage } from "./validation-message-DjATM7g-.js";
6
+ import { Textarea } from "./textarea-C580HmQX.js";
7
+ import { ValidationMessage } from "./validation-message-6AQTIup_.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useId } from "react";
10
10
 
@@ -59,4 +59,4 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
59
59
 
60
60
  //#endregion
61
61
  export { Textfield };
62
- //# sourceMappingURL=textfield-DwBJIap9.js.map
62
+ //# sourceMappingURL=textfield-e06UoQC8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textfield-DwBJIap9.js","names":[],"sources":["../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps &\n // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AA8CA,MAAa,YAAY,CAAC,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACY,KAAK;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM;AACrG,wBACE,KAAC;EAAiB;EAAW,aAAW;EAAa;;GAClD,yBAAS,IAAC;IAAM,SAAS;cAAK;KAAc;GAC5C,+BAAe,IAAC;IAAiB,IAAI;cAAgB;KAA+B;mBACrF,KAAC;IACE,0BAAU,IAAC,wBAAY,SAAoB;IAC3C,4BACC,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KAClB,GAAK;MACL,mBAEF,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KAClB,GAAK;MACL;IAEH,0BAAU,IAAC,wBAAY,SAAoB;OAC/B;KACZ,yBAAS,IAAC;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
1
+ {"version":3,"file":"textfield-e06UoQC8.js","names":[],"sources":["../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps &\n // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AA8CA,MAAa,YAAY,CAAC,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACY,KAAK;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM;AACrG,wBACE,KAAC;EAAiB;EAAW,aAAW;EAAa;;GAClD,yBAAS,IAAC;IAAM,SAAS;cAAK;KAAc;GAC5C,+BAAe,IAAC;IAAiB,IAAI;cAAgB;KAA+B;mBACrF,KAAC;IACE,0BAAU,IAAC,wBAAY,SAAoB;IAC3C,4BACC,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KAClB,GAAK;MACL,mBAEF,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KAClB,GAAK;MACL;IAEH,0BAAU,IAAC,wBAAY,SAAoB;OAC/B;KACZ,yBAAS,IAAC;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
@@ -6,4 +6,4 @@
6
6
  type MergeRight<T1, T2> = Omit<T1, keyof T2> & T2;
7
7
  //#endregion
8
8
  export { MergeRight };
9
- //# sourceMappingURL=types-CAwE6h3H.d.ts.map
9
+ //# sourceMappingURL=types-DC-FPmDA.d.ts.map
@@ -31,4 +31,4 @@ type LabelRequiredProps = {
31
31
  };
32
32
  //#endregion
33
33
  export { AsChildProps, DefaultProps, LabelRequiredProps };
34
- //# sourceMappingURL=types-BTJlwWCQ.d.ts.map
34
+ //# sourceMappingURL=types-Mj1poXVf.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { AsChildProps, DefaultProps, LabelRequiredProps } from "./types-BTJlwWCQ.js";
1
+ import { AsChildProps, DefaultProps, LabelRequiredProps } from "./types-Mj1poXVf.js";
2
2
  export { AsChildProps, DefaultProps, LabelRequiredProps };
@@ -0,0 +1,22 @@
1
+ import { ChangeEvent } from "react";
2
+
3
+ //#region src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts
4
+ type UseCheckboxGroupOptions = {
5
+ options: boolean[];
6
+ updateOptions: (checked: boolean) => void;
7
+ };
8
+ type UseCheckboxGroupReturn = {
9
+ /** Spread this on the "parent" checkbox */
10
+ checkboxGroupProps: {
11
+ checked: boolean;
12
+ indeterminate: boolean;
13
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
14
+ };
15
+ };
16
+ declare const useCheckboxGroup: ({
17
+ options,
18
+ updateOptions
19
+ }: UseCheckboxGroupOptions) => UseCheckboxGroupReturn;
20
+ //#endregion
21
+ export { UseCheckboxGroupOptions, UseCheckboxGroupReturn, useCheckboxGroup };
22
+ //# sourceMappingURL=useCheckboxGroup-DRhqch1m.d.ts.map
@@ -0,0 +1,18 @@
1
+ //#region src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.tsx
2
+ const useCheckboxGroup = ({ options, updateOptions }) => {
3
+ const checked = options.every((option) => option);
4
+ const indeterminate = options.some((option) => option) && !checked;
5
+ const onChange = (e) => {
6
+ const newChecked = e.target.indeterminate ? true : e.target.checked;
7
+ updateOptions(newChecked);
8
+ };
9
+ return { checkboxGroupProps: {
10
+ checked,
11
+ indeterminate,
12
+ onChange
13
+ } };
14
+ };
15
+
16
+ //#endregion
17
+ export { useCheckboxGroup };
18
+ //# sourceMappingURL=useCheckboxGroup-rTVawmvi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCheckboxGroup-rTVawmvi.js","names":["e: ChangeEvent<HTMLInputElement>"],"sources":["../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\n\nexport type UseCheckboxGroupOptions = {\n options: boolean[];\n updateOptions: (checked: boolean) => void;\n};\n\nexport type UseCheckboxGroupReturn = {\n /** Spread this on the \"parent\" checkbox */\n checkboxGroupProps: {\n checked: boolean;\n indeterminate: boolean;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n };\n};\n\nexport const useCheckboxGroup = ({ options, updateOptions }: UseCheckboxGroupOptions): UseCheckboxGroupReturn => {\n const checked = options.every((option) => option);\n const indeterminate = options.some((option) => option) && !checked;\n\n const onChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.indeterminate ? true : e.target.checked;\n updateOptions(newChecked);\n };\n\n return {\n checkboxGroupProps: {\n checked,\n indeterminate,\n onChange,\n },\n };\n};\n"],"mappings":";AAgBA,MAAa,mBAAmB,CAAC,EAAE,SAAS,eAAwC,KAA6B;CAC/G,MAAM,UAAU,QAAQ,MAAM,CAAC,WAAW,OAAO;CACjD,MAAM,gBAAgB,QAAQ,KAAK,CAAC,WAAW,OAAO,KAAK;CAE3D,MAAM,WAAW,CAACA,MAAqC;EACrD,MAAM,aAAa,EAAE,OAAO,gBAAgB,OAAO,EAAE,OAAO;AAC5D,gBAAc,WAAW;CAC1B;AAED,QAAO,EACL,oBAAoB;EAClB;EACA;EACA;CACD,EACF;AACF"}
@@ -0,0 +1,20 @@
1
+ import { useEffect, useState } from "react";
2
+
3
+ //#region src/utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver.tsx
4
+ /** Detects when an element's is scrolled past and is no longer in the viewport. */
5
+ const useElementScrolledPastObserver = (elementRef) => {
6
+ const [isPast, setIsPast] = useState(false);
7
+ useEffect(() => {
8
+ const observer = new IntersectionObserver(([entry]) => setIsPast(entry.boundingClientRect.y < 0), { threshold: [0] });
9
+ const currentRef = elementRef.current;
10
+ if (currentRef) observer.observe(currentRef);
11
+ return () => {
12
+ if (currentRef) observer.unobserve(currentRef);
13
+ };
14
+ }, [elementRef]);
15
+ return isPast;
16
+ };
17
+
18
+ //#endregion
19
+ export { useElementScrolledPastObserver };
20
+ //# sourceMappingURL=useElementScrolledPastObserver-DjzJ4Mn-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementScrolledPastObserver-DjzJ4Mn-.js","names":["elementRef: RefObject<HTMLElement | null>"],"sources":["../src/utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver.tsx"],"sourcesContent":["import { useEffect, useState, type RefObject } from 'react';\n\n/** Detects when an element's is scrolled past and is no longer in the viewport. */\nexport const useElementScrolledPastObserver = (elementRef: RefObject<HTMLElement | null>): boolean => {\n const [isPast, setIsPast] = useState(false);\n\n useEffect(() => {\n const observer = new IntersectionObserver(([entry]) => setIsPast(entry.boundingClientRect.y < 0), {\n threshold: [0],\n });\n const currentRef = elementRef.current;\n if (currentRef) observer.observe(currentRef);\n return () => {\n if (currentRef) observer.unobserve(currentRef);\n };\n }, [elementRef]);\n return isPast;\n};\n"],"mappings":";;;;AAGA,MAAa,iCAAiC,CAACA,eAAuD;CACpG,MAAM,CAAC,QAAQ,UAAU,GAAG,SAAS,MAAM;AAE3C,WAAU,MAAM;EACd,MAAM,WAAW,IAAI,qBAAqB,CAAC,CAAC,MAAM,KAAK,UAAU,MAAM,mBAAmB,IAAI,EAAE,EAAE,EAChG,WAAW,CAAC,CAAE,EACf;EACD,MAAM,aAAa,WAAW;AAC9B,MAAI,WAAY,UAAS,QAAQ,WAAW;AAC5C,SAAO,MAAM;AACX,OAAI,WAAY,UAAS,UAAU,WAAW;EAC/C;CACF,GAAE,CAAC,UAAW,EAAC;AAChB,QAAO;AACR"}