@bi-digital/react 0.0.0-experimental-8e8691a → 0.0.0-experimental-9588a13

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 (391) hide show
  1. package/dist/{alert-footer-Bks3U6Tq.d.ts → alert-footer-Dpx0nSZr.d.ts} +18 -18
  2. package/dist/{checkbox-CxA8UXr6.js → checkbox-ZR1Z2PCF.js} +2 -2
  3. package/dist/checkbox-ZR1Z2PCF.js.map +1 -0
  4. package/dist/{checkbox-subsection-CGXgII6v.js → checkbox-subsection-BPe5aj-W.js} +1 -1
  5. package/dist/{checkbox-subsection-CGXgII6v.js.map → checkbox-subsection-BPe5aj-W.js.map} +1 -1
  6. package/dist/{chip-CRcC9TkL.js → chip-b9xUiF7_.js} +1 -1
  7. package/dist/{chip-CRcC9TkL.js.map → chip-b9xUiF7_.js.map} +1 -1
  8. package/dist/components/alert/alert-footer.d.ts +17 -15
  9. package/dist/components/alert/alert.d.ts +17 -15
  10. package/dist/components/alert/index.d.ts +17 -15
  11. package/dist/components/avatar/avatar.d.ts +17 -15
  12. package/dist/components/avatar/index.d.ts +17 -15
  13. package/dist/components/badge/badge.d.ts +17 -15
  14. package/dist/components/badge/index.d.ts +17 -15
  15. package/dist/components/button/button.d.ts +17 -15
  16. package/dist/components/button/index.d.ts +17 -15
  17. package/dist/components/card/card-action.d.ts +17 -15
  18. package/dist/components/card/card-actions.d.ts +17 -15
  19. package/dist/components/card/card-content.d.ts +17 -15
  20. package/dist/components/card/card-date.d.ts +17 -15
  21. package/dist/components/card/card-header.d.ts +17 -15
  22. package/dist/components/card/card-media.d.ts +17 -15
  23. package/dist/components/card/card.d.ts +17 -15
  24. package/dist/components/card/index.d.ts +17 -15
  25. package/dist/components/checkbox/checkbox-subsection.d.ts +17 -15
  26. package/dist/components/checkbox/checkbox-subsection.js +1 -1
  27. package/dist/components/checkbox/checkbox.d.ts +17 -15
  28. package/dist/components/checkbox/checkbox.js +2 -6
  29. package/dist/components/checkbox/index.d.ts +17 -15
  30. package/dist/components/checkbox/index.js +4 -8
  31. package/dist/components/chip/chip.d.ts +17 -15
  32. package/dist/components/chip/chip.js +1 -1
  33. package/dist/components/chip/index.d.ts +17 -15
  34. package/dist/components/chip/index.js +2 -2
  35. package/dist/components/dialog/dialog-close-button.d.ts +17 -15
  36. package/dist/components/dialog/dialog-close-button.js +1 -1
  37. package/dist/components/dialog/dialog-content.d.ts +17 -15
  38. package/dist/components/dialog/dialog-content.js +1 -1
  39. package/dist/components/dialog/dialog-footer.d.ts +17 -15
  40. package/dist/components/dialog/dialog-footer.js +1 -1
  41. package/dist/components/dialog/dialog-header.d.ts +17 -15
  42. package/dist/components/dialog/dialog-header.js +1 -1
  43. package/dist/components/dialog/dialog-trigger-context.d.ts +1 -1
  44. package/dist/components/dialog/dialog-trigger-context.js +1 -1
  45. package/dist/components/dialog/dialog-trigger.d.ts +17 -15
  46. package/dist/components/dialog/dialog-trigger.js +2 -2
  47. package/dist/components/dialog/dialog.d.ts +17 -15
  48. package/dist/components/dialog/dialog.js +3 -7
  49. package/dist/components/dialog/index.d.ts +17 -15
  50. package/dist/components/dialog/index.js +9 -13
  51. package/dist/components/drawer/drawer-close-button.d.ts +17 -15
  52. package/dist/components/drawer/drawer-close-button.js +10 -14
  53. package/dist/components/drawer/drawer-content.d.ts +17 -15
  54. package/dist/components/drawer/drawer-content.js +10 -14
  55. package/dist/components/drawer/drawer-footer.d.ts +17 -15
  56. package/dist/components/drawer/drawer-footer.js +10 -14
  57. package/dist/components/drawer/drawer-header.d.ts +17 -15
  58. package/dist/components/drawer/drawer-header.js +10 -14
  59. package/dist/components/drawer/drawer-trigger-context.d.ts +1 -1
  60. package/dist/components/drawer/drawer-trigger-context.js +10 -14
  61. package/dist/components/drawer/drawer-trigger.d.ts +17 -15
  62. package/dist/components/drawer/drawer-trigger.js +10 -14
  63. package/dist/components/drawer/drawer.d.ts +17 -15
  64. package/dist/components/drawer/drawer.js +10 -14
  65. package/dist/components/drawer/index.d.ts +17 -15
  66. package/dist/components/drawer/index.js +17 -21
  67. package/dist/components/dropdown/dropdown-button.d.ts +17 -15
  68. package/dist/components/dropdown/dropdown-button.js +1 -1
  69. package/dist/components/dropdown/dropdown-item.d.ts +1 -1
  70. package/dist/components/dropdown/dropdown-item.js +1 -1
  71. package/dist/components/dropdown/dropdown-list.d.ts +1 -1
  72. package/dist/components/dropdown/dropdown-list.js +1 -1
  73. package/dist/components/dropdown/dropdown-trigger-context.d.ts +17 -15
  74. package/dist/components/dropdown/dropdown-trigger-context.js +6 -10
  75. package/dist/components/dropdown/dropdown-trigger.d.ts +17 -15
  76. package/dist/components/dropdown/dropdown-trigger.js +6 -10
  77. package/dist/components/dropdown/dropdown.d.ts +17 -15
  78. package/dist/components/dropdown/dropdown.js +6 -10
  79. package/dist/components/dropdown/index.d.ts +17 -15
  80. package/dist/components/dropdown/index.js +12 -16
  81. package/dist/components/field/field-affix.d.ts +17 -15
  82. package/dist/components/field/field-description.d.ts +17 -15
  83. package/dist/components/field/field.d.ts +17 -15
  84. package/dist/components/field/index.d.ts +17 -15
  85. package/dist/components/fieldset/fieldset-description.d.ts +17 -15
  86. package/dist/components/fieldset/fieldset-description.js +1 -1
  87. package/dist/components/fieldset/fieldset-legend.d.ts +17 -15
  88. package/dist/components/fieldset/fieldset-legend.js +1 -1
  89. package/dist/components/fieldset/fieldset.d.ts +17 -15
  90. package/dist/components/fieldset/fieldset.js +1 -1
  91. package/dist/components/fieldset/index.d.ts +17 -15
  92. package/dist/components/fieldset/index.js +4 -4
  93. package/dist/components/filter-group/filter-group.d.ts +17 -15
  94. package/dist/components/filter-group/filter-group.js +1 -1
  95. package/dist/components/filter-group/index.d.ts +17 -15
  96. package/dist/components/filter-group/index.js +2 -2
  97. package/dist/components/footer/footer-links.d.ts +1 -1
  98. package/dist/components/footer/footer-links.js +1 -1
  99. package/dist/components/footer/footer.d.ts +17 -15
  100. package/dist/components/footer/footer.js +1 -1
  101. package/dist/components/footer/index.d.ts +17 -15
  102. package/dist/components/footer/index.js +3 -3
  103. package/dist/components/index.d.ts +17 -15
  104. package/dist/components/index.js +84 -83
  105. package/dist/components/input/index.d.ts +17 -15
  106. package/dist/components/input/input.d.ts +17 -15
  107. package/dist/components/label/index.d.ts +17 -15
  108. package/dist/components/label/label.d.ts +17 -15
  109. package/dist/components/link/index.d.ts +17 -15
  110. package/dist/components/link/index.js +2 -2
  111. package/dist/components/link/link.d.ts +17 -15
  112. package/dist/components/link/link.js +1 -1
  113. package/dist/components/logo/index.d.ts +17 -15
  114. package/dist/components/logo/index.js +2 -2
  115. package/dist/components/logo/logo.d.ts +17 -15
  116. package/dist/components/logo/logo.js +1 -1
  117. package/dist/components/navbar/index.d.ts +17 -15
  118. package/dist/components/navbar/index.js +12 -7
  119. package/dist/components/navbar/navbar.d.ts +17 -15
  120. package/dist/components/navbar/navbar.js +3 -3
  121. package/dist/components/navbar/sub-navbar.d.ts +17 -15
  122. package/dist/components/navbar/sub-navbar.js +8 -3
  123. package/dist/components/pagination/index.d.ts +17 -15
  124. package/dist/components/pagination/index.js +4 -4
  125. package/dist/components/pagination/pagination-button.d.ts +17 -15
  126. package/dist/components/pagination/pagination-button.js +1 -1
  127. package/dist/components/pagination/pagination-item.d.ts +1 -1
  128. package/dist/components/pagination/pagination-item.js +1 -1
  129. package/dist/components/pagination/pagination.d.ts +17 -15
  130. package/dist/components/pagination/pagination.js +1 -1
  131. package/dist/components/popover/index.d.ts +17 -15
  132. package/dist/components/popover/index.js +5 -9
  133. package/dist/components/popover/popover-trigger-context.d.ts +1 -1
  134. package/dist/components/popover/popover-trigger-context.js +1 -1
  135. package/dist/components/popover/popover-trigger.d.ts +17 -15
  136. package/dist/components/popover/popover-trigger.js +2 -2
  137. package/dist/components/popover/popover.d.ts +17 -15
  138. package/dist/components/popover/popover.js +3 -7
  139. package/dist/components/radio/index.d.ts +17 -15
  140. package/dist/components/radio/index.js +2 -2
  141. package/dist/components/radio/radio.d.ts +17 -15
  142. package/dist/components/radio/radio.js +1 -1
  143. package/dist/components/search/index.d.ts +17 -15
  144. package/dist/components/search/index.js +2 -2
  145. package/dist/components/search/search.d.ts +17 -15
  146. package/dist/components/search/search.js +1 -1
  147. package/dist/components/select/index.d.ts +17 -15
  148. package/dist/components/select/index.js +4 -4
  149. package/dist/components/select/select-optgroup.d.ts +17 -15
  150. package/dist/components/select/select-optgroup.js +1 -1
  151. package/dist/components/select/select-option.d.ts +17 -15
  152. package/dist/components/select/select-option.js +1 -1
  153. package/dist/components/select/select.d.ts +17 -15
  154. package/dist/components/select/select.js +1 -1
  155. package/dist/components/skip-link/index.d.ts +17 -15
  156. package/dist/components/skip-link/index.js +2 -2
  157. package/dist/components/skip-link/skip-link.d.ts +17 -15
  158. package/dist/components/skip-link/skip-link.js +1 -1
  159. package/dist/components/spinner/index.d.ts +17 -15
  160. package/dist/components/spinner/spinner.d.ts +17 -15
  161. package/dist/components/sticky-header/index.d.ts +2 -2
  162. package/dist/components/sticky-header/index.js +2 -2
  163. package/dist/components/sticky-header/sticky-header.d.ts +1 -1
  164. package/dist/components/sticky-header/sticky-header.js +1 -1
  165. package/dist/components/tabs/index.d.ts +17 -15
  166. package/dist/components/tabs/index.js +5 -5
  167. package/dist/components/tabs/tab.d.ts +17 -15
  168. package/dist/components/tabs/tab.js +1 -1
  169. package/dist/components/tabs/tabs-list.d.ts +17 -15
  170. package/dist/components/tabs/tabs-list.js +1 -1
  171. package/dist/components/tabs/tabs-panel.d.ts +17 -15
  172. package/dist/components/tabs/tabs-panel.js +1 -1
  173. package/dist/components/tabs/tabs.d.ts +17 -15
  174. package/dist/components/tabs/tabs.js +1 -1
  175. package/dist/components/textarea/index.d.ts +17 -15
  176. package/dist/components/textarea/index.js +2 -2
  177. package/dist/components/textarea/textarea.d.ts +17 -15
  178. package/dist/components/textarea/textarea.js +1 -1
  179. package/dist/components/textfield/index.d.ts +17 -15
  180. package/dist/components/textfield/index.js +6 -6
  181. package/dist/components/textfield/textfield.d.ts +17 -15
  182. package/dist/components/textfield/textfield.js +5 -5
  183. package/dist/components/validation-message/index.d.ts +17 -15
  184. package/dist/components/validation-message/index.js +2 -2
  185. package/dist/components/validation-message/validation-message.d.ts +17 -15
  186. package/dist/components/validation-message/validation-message.js +1 -1
  187. package/dist/{dialog-WgEtFqJD.js → dialog-DzGRZgbP.js} +3 -3
  188. package/dist/dialog-DzGRZgbP.js.map +1 -0
  189. package/dist/{dialog-close-button-8n-DBvH4.js → dialog-close-button-B4zf0hvt.js} +1 -1
  190. package/dist/{dialog-close-button-8n-DBvH4.js.map → dialog-close-button-B4zf0hvt.js.map} +1 -1
  191. package/dist/{dialog-content-CU346luZ.js → dialog-content-R35XpbSj.js} +1 -1
  192. package/dist/{dialog-content-CU346luZ.js.map → dialog-content-R35XpbSj.js.map} +1 -1
  193. package/dist/{dialog-footer-BPCalxtL.js → dialog-footer-AoiCz_Uj.js} +1 -1
  194. package/dist/{dialog-footer-BPCalxtL.js.map → dialog-footer-AoiCz_Uj.js.map} +1 -1
  195. package/dist/{dialog-header-DsLpGnOf.js → dialog-header-Bbq9DcHX.js} +1 -1
  196. package/dist/{dialog-header-DsLpGnOf.js.map → dialog-header-Bbq9DcHX.js.map} +1 -1
  197. package/dist/{dialog-trigger-Q9Y5EG0H.js → dialog-trigger-DinHpkua.js} +2 -2
  198. package/dist/{dialog-trigger-Q9Y5EG0H.js.map → dialog-trigger-DinHpkua.js.map} +1 -1
  199. package/dist/{dialog-trigger-context-B41wR-bM.js → dialog-trigger-context-51mA5fz3.js} +1 -1
  200. package/dist/{dialog-trigger-context-B41wR-bM.js.map → dialog-trigger-context-51mA5fz3.js.map} +1 -1
  201. package/dist/{dialog-trigger-context-BkQSJ-rX.d.ts → dialog-trigger-context-DwmhJNzA.d.ts} +1 -1
  202. package/dist/{drawer-B8xyMitJ.js → drawer-CZ05Lizo.js} +2 -2
  203. package/dist/{drawer-B8xyMitJ.js.map → drawer-CZ05Lizo.js.map} +1 -1
  204. package/dist/{drawer-close-button-CqDqQGHP.js → drawer-close-button-DigcuqLc.js} +2 -2
  205. package/dist/{drawer-close-button-CqDqQGHP.js.map → drawer-close-button-DigcuqLc.js.map} +1 -1
  206. package/dist/{drawer-content-Dp__eciN.js → drawer-content-CFc-rxBo.js} +2 -2
  207. package/dist/{drawer-content-Dp__eciN.js.map → drawer-content-CFc-rxBo.js.map} +1 -1
  208. package/dist/{drawer-footer-qYHvZEl_.js → drawer-footer-CfHjfvEg.js} +2 -2
  209. package/dist/{drawer-footer-qYHvZEl_.js.map → drawer-footer-CfHjfvEg.js.map} +1 -1
  210. package/dist/{drawer-header-fQaZQuIY.js → drawer-header-DK4XoaaW.js} +2 -2
  211. package/dist/{drawer-header-fQaZQuIY.js.map → drawer-header-DK4XoaaW.js.map} +1 -1
  212. package/dist/{drawer-trigger-BvjTEl5N.js → drawer-trigger-Do9Htx5M.js} +2 -2
  213. package/dist/{drawer-trigger-BvjTEl5N.js.map → drawer-trigger-Do9Htx5M.js.map} +1 -1
  214. package/dist/{drawer-trigger-context-DHYdt3sB.js → drawer-trigger-context-BUWPPdas.js} +2 -2
  215. package/dist/{drawer-trigger-context-DHYdt3sB.js.map → drawer-trigger-context-BUWPPdas.js.map} +1 -1
  216. package/dist/{drawer-trigger-context-B3X3kUrY.d.ts → drawer-trigger-context-BoS9ZcVF.d.ts} +1 -1
  217. package/dist/dropdown-1Tmd7LL7.js +18 -0
  218. package/dist/{dropdown-D-dX5PAl.js.map → dropdown-1Tmd7LL7.js.map} +1 -1
  219. package/dist/{dropdown-button-CKPaLMBh.js → dropdown-button-FQqIwqdp.js} +1 -1
  220. package/dist/{dropdown-button-CKPaLMBh.js.map → dropdown-button-FQqIwqdp.js.map} +1 -1
  221. package/dist/{dropdown-item-Bhw9nhOp.d.ts → dropdown-item-CKKjumy3.d.ts} +1 -1
  222. package/dist/{dropdown-item-BnnEFIq3.js → dropdown-item-DQQXQC4J.js} +1 -1
  223. package/dist/{dropdown-item-BnnEFIq3.js.map → dropdown-item-DQQXQC4J.js.map} +1 -1
  224. package/dist/{dropdown-list-BWW85rXi.js → dropdown-list-DB1mST67.js} +1 -1
  225. package/dist/{dropdown-list-BWW85rXi.js.map → dropdown-list-DB1mST67.js.map} +1 -1
  226. package/dist/{dropdown-list-XN8RJ-SS.d.ts → dropdown-list-vVhxG14z.d.ts} +1 -1
  227. package/dist/{dropdown-trigger-COk6CKIa.js → dropdown-trigger-Fwrigwtg.js} +2 -2
  228. package/dist/{dropdown-trigger-COk6CKIa.js.map → dropdown-trigger-Fwrigwtg.js.map} +1 -1
  229. package/dist/{dropdown-trigger-context-BkqjqjhG.js → dropdown-trigger-context-BCcyoZEx.js} +2 -2
  230. package/dist/{dropdown-trigger-context-BkqjqjhG.js.map → dropdown-trigger-context-BCcyoZEx.js.map} +1 -1
  231. package/dist/{dropdown-CnR0zNhr.js → dropdown-x-JxMFr2.js} +2 -2
  232. package/dist/{dropdown-CnR0zNhr.js.map → dropdown-x-JxMFr2.js.map} +1 -1
  233. package/dist/{fieldset-DGB7cvdz.js → fieldset-Bpu4CRKG.js} +1 -1
  234. package/dist/{fieldset-DGB7cvdz.js.map → fieldset-Bpu4CRKG.js.map} +1 -1
  235. package/dist/{fieldset-description-oNKwCGnW.js → fieldset-description-DiHvcLh-.js} +1 -1
  236. package/dist/{fieldset-description-oNKwCGnW.js.map → fieldset-description-DiHvcLh-.js.map} +1 -1
  237. package/dist/{fieldset-legend-Dseni7XM.js → fieldset-legend-CR4srn2-.js} +1 -1
  238. package/dist/{fieldset-legend-Dseni7XM.js.map → fieldset-legend-CR4srn2-.js.map} +1 -1
  239. package/dist/{filter-group-BKO5sgGt.js → filter-group-DMSPaCQt.js} +1 -1
  240. package/dist/{filter-group-BKO5sgGt.js.map → filter-group-DMSPaCQt.js.map} +1 -1
  241. package/dist/{footer-CXKRhzUT.js → footer-CU7LdbPO.js} +1 -1
  242. package/dist/{footer-CXKRhzUT.js.map → footer-CU7LdbPO.js.map} +1 -1
  243. package/dist/{footer-links-Dz1UwVuf.js → footer-links-BIUrxu38.js} +1 -1
  244. package/dist/{footer-links-Dz1UwVuf.js.map → footer-links-BIUrxu38.js.map} +1 -1
  245. package/dist/{footer-links-CiYPQHgT.d.ts → footer-links-Drm2LFnw.d.ts} +1 -1
  246. package/dist/{index-CxSdiV-v.d.ts → index-5t6b3t6a.d.ts} +7 -2
  247. package/dist/index-CjnsNUdv.d.ts +23 -0
  248. package/dist/{index-CjygsraA.d.ts → index-DShfRjSD.d.ts} +7 -2
  249. package/dist/{link-BdmxFMOF.js → link-BqDeZAJF.js} +1 -1
  250. package/dist/{link-BdmxFMOF.js.map → link-BqDeZAJF.js.map} +1 -1
  251. package/dist/{logo-cfY7Ilvc.js → logo-QKrYvRFP.js} +1 -1
  252. package/dist/{logo-cfY7Ilvc.js.map → logo-QKrYvRFP.js.map} +1 -1
  253. package/dist/main.d.ts +18 -16
  254. package/dist/main.js +86 -85
  255. package/dist/{navbar-DJJMercW.js → navbar-Dxv7GQO0.js} +2 -2
  256. package/dist/{navbar-DJJMercW.js.map → navbar-Dxv7GQO0.js.map} +1 -1
  257. package/dist/{pagination-DxXjiIgC.js → pagination-DH6vZYMO.js} +1 -1
  258. package/dist/{pagination-DxXjiIgC.js.map → pagination-DH6vZYMO.js.map} +1 -1
  259. package/dist/{pagination-button-CjEZPPC8.js → pagination-button-CMSNwkeT.js} +1 -1
  260. package/dist/{pagination-button-CjEZPPC8.js.map → pagination-button-CMSNwkeT.js.map} +1 -1
  261. package/dist/{pagination-item-DXnI0BWj.js → pagination-item-DzskmZxf.js} +1 -1
  262. package/dist/{pagination-item-DXnI0BWj.js.map → pagination-item-DzskmZxf.js.map} +1 -1
  263. package/dist/{pagination-item-5nXzmcd5.d.ts → pagination-item-mKQyvHV9.d.ts} +1 -1
  264. package/dist/{popover-COi7S9pJ.js → popover-8q0iwwCv.js} +7 -1
  265. package/dist/popover-8q0iwwCv.js.map +1 -0
  266. package/dist/{popover-I6eZrM65.js → popover-Co-HV5GI.js} +4 -4
  267. package/dist/popover-Co-HV5GI.js.map +1 -0
  268. package/dist/{popover-trigger-dMRssLhy.js → popover-trigger-Chi8uvRM.js} +2 -2
  269. package/dist/{popover-trigger-dMRssLhy.js.map → popover-trigger-Chi8uvRM.js.map} +1 -1
  270. package/dist/{popover-trigger-context-D7nOI0FT.js → popover-trigger-context-Cre9Mczn.js} +1 -1
  271. package/dist/{popover-trigger-context-D7nOI0FT.js.map → popover-trigger-context-Cre9Mczn.js.map} +1 -1
  272. package/dist/{popover-trigger-context-JipAPdV6.d.ts → popover-trigger-context-D6z-_uL5.d.ts} +1 -1
  273. package/dist/{radio-Cn3PqpMt.js → radio-DAC5mhl3.js} +1 -1
  274. package/dist/{radio-Cn3PqpMt.js.map → radio-DAC5mhl3.js.map} +1 -1
  275. package/dist/{search-CdV5su_L.js → search-DRgmqncD.js} +1 -1
  276. package/dist/{search-CdV5su_L.js.map → search-DRgmqncD.js.map} +1 -1
  277. package/dist/{select-DCZV6wZu.js → select-R87VdG5U.js} +1 -1
  278. package/dist/{select-DCZV6wZu.js.map → select-R87VdG5U.js.map} +1 -1
  279. package/dist/{select-optgroup-BUaB9Yz-.js → select-optgroup-jowSQvbc.js} +1 -1
  280. package/dist/{select-optgroup-BUaB9Yz-.js.map → select-optgroup-jowSQvbc.js.map} +1 -1
  281. package/dist/{select-option-BByWq34J.js → select-option-WAhhr82L.js} +1 -1
  282. package/dist/{select-option-BByWq34J.js.map → select-option-WAhhr82L.js.map} +1 -1
  283. package/dist/{skip-link-DwuiIAvE.js → skip-link-CTmIHesZ.js} +1 -1
  284. package/dist/{skip-link-DwuiIAvE.js.map → skip-link-CTmIHesZ.js.map} +1 -1
  285. package/dist/{sticky-header-DWAJUj20.js → sticky-header-Dki5mPis.js} +1 -1
  286. package/dist/{sticky-header-DWAJUj20.js.map → sticky-header-Dki5mPis.js.map} +1 -1
  287. package/dist/{sticky-header-BJkvy3qf.d.ts → sticky-header-JeG62vfR.d.ts} +3 -3
  288. package/dist/{sub-navbar-DEudSxfj.js → sub-navbar-DkxQv0WJ.js} +4 -4
  289. package/dist/sub-navbar-DkxQv0WJ.js.map +1 -0
  290. package/dist/sub-navbar-qSNpTABT.js +120 -0
  291. package/dist/sub-navbar-qSNpTABT.js.map +1 -0
  292. package/dist/{tab-9qkzsjIT.js → tab-78y6QR5H.js} +1 -1
  293. package/dist/{tab-9qkzsjIT.js.map → tab-78y6QR5H.js.map} +1 -1
  294. package/dist/{tabs-CpaYfphj.js → tabs-UA0wAjuH.js} +1 -1
  295. package/dist/{tabs-CpaYfphj.js.map → tabs-UA0wAjuH.js.map} +1 -1
  296. package/dist/{tabs-list-UDrgmCSx.js → tabs-list-BykXXSuq.js} +1 -1
  297. package/dist/{tabs-list-UDrgmCSx.js.map → tabs-list-BykXXSuq.js.map} +1 -1
  298. package/dist/{tabs-panel-DeVzvQQw.js → tabs-panel-B8knWcZY.js} +1 -1
  299. package/dist/{tabs-panel-DeVzvQQw.js.map → tabs-panel-B8knWcZY.js.map} +1 -1
  300. package/dist/{textarea-C580HmQX.js → textarea-DUqVsdL4.js} +1 -1
  301. package/dist/{textarea-C580HmQX.js.map → textarea-DUqVsdL4.js.map} +1 -1
  302. package/dist/{textfield-CdqVq5R0.js → textfield-Di-19dz-.js} +3 -3
  303. package/dist/{textfield-CdqVq5R0.js.map → textfield-Di-19dz-.js.map} +1 -1
  304. package/dist/{types-Mj1poXVf.d.ts → types-BiKqUD4X.d.ts} +1 -1
  305. package/dist/{types-Db8O5fnL.d.ts → types-BiXTaZLc.d.ts} +1 -1
  306. package/dist/types.d.ts +1 -1
  307. package/dist/{useCheckboxGroup-rTVawmvi.js → useCheckboxGroup-BDH3ewt8.js} +1 -1
  308. package/dist/{useCheckboxGroup-rTVawmvi.js.map → useCheckboxGroup-BDH3ewt8.js.map} +1 -1
  309. package/dist/{useCheckboxGroup-DRhqch1m.d.ts → useCheckboxGroup-DyHY-wHm.d.ts} +1 -1
  310. package/dist/useIsElementAboveViewport-V1lc14eB.d.ts +8 -0
  311. package/dist/{useElementScrolledPastObserver-DjzJ4Mn-.js → useIsElementAboveViewport-lmdnXDdc.js} +6 -6
  312. package/dist/useIsElementAboveViewport-lmdnXDdc.js.map +1 -0
  313. package/dist/{useIsomorphicLayoutEffect-BMdz-mee.d.ts → useIsomorphicLayoutEffect-BtM0-_Y8.d.ts} +1 -1
  314. package/dist/{useIsomorphicLayoutEffect-B5btmYlF.js → useIsomorphicLayoutEffect-odKYwQAV.js} +1 -1
  315. package/dist/{useIsomorphicLayoutEffect-B5btmYlF.js.map → useIsomorphicLayoutEffect-odKYwQAV.js.map} +1 -1
  316. package/dist/useMediaQuery-B2wgHq1a.d.ts +32 -0
  317. package/dist/useMediaQuery-ICPWsO_p.js +44 -0
  318. package/dist/useMediaQuery-ICPWsO_p.js.map +1 -0
  319. package/dist/{useMergeRefs-CcJMoo46.js → useMergeRefs-DC710CHX.js} +1 -1
  320. package/dist/{useMergeRefs-CcJMoo46.js.map → useMergeRefs-DC710CHX.js.map} +1 -1
  321. package/dist/{usePagination-DNqO-ob2.js → usePagination-DQR72JNE.js} +1 -1
  322. package/dist/{usePagination-DNqO-ob2.js.map → usePagination-DQR72JNE.js.map} +1 -1
  323. package/dist/{useScrollDirection-BLgp51hx.js → useScrollDirection-C2EmQi0U.js} +1 -1
  324. package/dist/{useScrollDirection-BLgp51hx.js.map → useScrollDirection-C2EmQi0U.js.map} +1 -1
  325. package/dist/useScrollDirection-CDsglrZR.d.ts +11 -0
  326. package/dist/utilities/hooks/index.d.ts +18 -16
  327. package/dist/utilities/hooks/index.js +8 -6
  328. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts +1 -1
  329. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.js +1 -1
  330. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.ts +2 -0
  331. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.js +3 -0
  332. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +1 -1
  333. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  334. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.ts +2 -0
  335. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.js +4 -0
  336. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.d.ts +11 -2
  337. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.js +1 -1
  338. package/dist/utilities/hooks/usePagination/usePagination.d.ts +17 -15
  339. package/dist/utilities/hooks/usePagination/usePagination.js +1 -1
  340. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.ts +2 -11
  341. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.js +1 -1
  342. package/dist/utilities/index.d.ts +18 -16
  343. package/dist/utilities/index.js +9 -7
  344. package/dist/utilities/types.d.ts +1 -1
  345. package/dist/{validation-message-6AQTIup_.js → validation-message-C3CmzFMz.js} +1 -1
  346. package/dist/{validation-message-6AQTIup_.js.map → validation-message-C3CmzFMz.js.map} +1 -1
  347. package/dist/vanilla/dropdown/index.d.ts +1 -1
  348. package/dist/vanilla/dropdown/index.js +2 -2
  349. package/dist/vanilla/index.d.ts +4 -3
  350. package/dist/vanilla/index.js +4 -3
  351. package/dist/vanilla/popover/index.d.ts +1 -1
  352. package/dist/vanilla/popover/index.js +1 -1
  353. package/dist/vanilla/sub-navbar/index.d.ts +2 -0
  354. package/dist/vanilla/sub-navbar/index.js +3 -0
  355. package/package.json +4 -4
  356. package/dist/checkbox-CxA8UXr6.js.map +0 -1
  357. package/dist/dialog-WgEtFqJD.js.map +0 -1
  358. package/dist/dropdown-D-dX5PAl.js +0 -15
  359. package/dist/popover-COi7S9pJ.js.map +0 -1
  360. package/dist/popover-I6eZrM65.js.map +0 -1
  361. package/dist/sub-navbar-DEudSxfj.js.map +0 -1
  362. package/dist/useElementScrolledPastObserver-DjzJ4Mn-.js.map +0 -1
  363. package/dist/useMergeRefs-iCenhgmf.d.ts +0 -11
  364. package/dist/utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver.d.ts +0 -8
  365. package/dist/utilities/hooks/useElementScrolledPastObserver/useElementScrolledPastObserver.js +0 -3
  366. /package/dist/{checkbox-DdQn64cR.js → checkbox-BNKPLC2A.js} +0 -0
  367. /package/dist/{chip-6KumidQL.js → chip-CotWEWjj.js} +0 -0
  368. /package/dist/{components-CUDHzsYh.js → components-BKbhmG9u.js} +0 -0
  369. /package/dist/{dialog-B6bZOPYF.js → dialog-CCde3DPt.js} +0 -0
  370. /package/dist/{drawer-sfOVHFWA.js → drawer-Cc670B_f.js} +0 -0
  371. /package/dist/{dropdown-DR0Lif3r.js → dropdown-BecLkiCE.js} +0 -0
  372. /package/dist/{fieldset-Ds2WiAnj.js → fieldset-D5HSCHPA.js} +0 -0
  373. /package/dist/{filter-group-MjaWbeZO.js → filter-group-C-q_L0lS.js} +0 -0
  374. /package/dist/{footer-Cq6w0v2j.js → footer-BThmhXy7.js} +0 -0
  375. /package/dist/{hooks-BmaG9QJW.js → hooks-A8EMc2jd.js} +0 -0
  376. /package/dist/{index-2Mg7qf3C.d.ts → index-CTw2zfCM.d.ts} +0 -0
  377. /package/dist/{link-CKJeUW0o.js → link-oWcjwJYP.js} +0 -0
  378. /package/dist/{logo-CIDSfhf9.js → logo-Dx-VZMJu.js} +0 -0
  379. /package/dist/{navbar-BuFLsqCZ.js → navbar-CgY7xCrh.js} +0 -0
  380. /package/dist/{pagination-DUyQRuUE.js → pagination-DP8yM-lj.js} +0 -0
  381. /package/dist/{popover-C4QdJkKG.js → popover-Ch_2ehYy.js} +0 -0
  382. /package/dist/{radio-Uyx2D7dl.js → radio-CqUVAF9T.js} +0 -0
  383. /package/dist/{search-VYIc3wFh.js → search-DPfMkuMX.js} +0 -0
  384. /package/dist/{select-D1X9tdeH.js → select-COon86Fr.js} +0 -0
  385. /package/dist/{skip-link-CGmg3TAi.js → skip-link-Cl5tUnjp.js} +0 -0
  386. /package/dist/{sticky-header-CII-Yy5M.js → sticky-header-B1bz37dV.js} +0 -0
  387. /package/dist/{tabs-CYBqn2Kj.js → tabs-Gam5A0Jd.js} +0 -0
  388. /package/dist/{textarea-D37K5D86.js → textarea-SnVkE05Y.js} +0 -0
  389. /package/dist/{textfield-CWoUw1b2.js → textfield-vutZ4Ch8.js} +0 -0
  390. /package/dist/{utilities-JoKvbhOy.js → utilities-CScrp2iY.js} +0 -0
  391. /package/dist/{validation-message-B4lI2a0K.js → validation-message-CtPYa33u.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"navbar-DJJMercW.js","names":[],"sources":["../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,SAAS,CAAC,EACrB,OAAO,OACP,QAAQ,OACR,eACA,UACA,UACA,MACA,UACA,WACA,IACA,GAAG,OACS,KAAK;AACjB,wBACE,KAAC;EAAI,GAAI;EAAO,WAAW,KAAK,aAAa,UAAU;EAAE,cAAY;EAAO,aAAW;EAAW;aAC/F,0BACD,KAAC,uCACC,IAAC;GAAE,cAAY;GAAe,MAAM;aACjC,wBAAQ,IAAC,QAAW,OAAQ;IAC3B,EACH,YACM;GACL;AAET"}
1
+ {"version":3,"file":"navbar-Dxv7GQO0.js","names":[],"sources":["../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,SAAS,CAAC,EACrB,OAAO,OACP,QAAQ,OACR,eACA,UACA,UACA,MACA,UACA,WACA,IACA,GAAG,OACS,KAAK;AACjB,wBACE,KAAC;EAAI,GAAI;EAAO,WAAW,KAAK,aAAa,UAAU;EAAE,cAAY;EAAO,aAAW;EAAW;aAC/F,0BACD,KAAC,uCACC,IAAC;GAAE,cAAY;GAAe,MAAM;aACjC,wBAAQ,IAAC,QAAW,OAAQ;IAC3B,EACH,YACM;GACL;AAET"}
@@ -14,4 +14,4 @@ const Pagination = ({ className, dark = false, ref, children,...props }) => {
14
14
 
15
15
  //#endregion
16
16
  export { Pagination };
17
- //# sourceMappingURL=pagination-DxXjiIgC.js.map
17
+ //# sourceMappingURL=pagination-DH6vZYMO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-DxXjiIgC.js","names":[],"sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, dark = false, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} data-dark={dark} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,aAAa,CAAC,EAAE,WAAW,OAAO,OAAO,KAAK,SAAU,GAAG,OAAwB,KAAK;AACnG,wBACE,IAAC;EAAI,WAAW,KAAK,iBAAiB,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;4BAC/E,IAAC,QAAI,WAAc;GACf;AAET"}
1
+ {"version":3,"file":"pagination-DH6vZYMO.js","names":[],"sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, dark = false, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} data-dark={dark} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,aAAa,CAAC,EAAE,WAAW,OAAO,OAAO,KAAK,SAAU,GAAG,OAAwB,KAAK;AACnG,wBACE,IAAC;EAAI,WAAW,KAAK,iBAAiB,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;4BAC/E,IAAC,QAAI,WAAc;GACf;AAET"}
@@ -11,4 +11,4 @@ const PaginationButton = ({ ref,...rest }) => /* @__PURE__ */ jsx(Button, {
11
11
 
12
12
  //#endregion
13
13
  export { PaginationButton };
14
- //# sourceMappingURL=pagination-button-CjEZPPC8.js.map
14
+ //# sourceMappingURL=pagination-button-CMSNwkeT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-button-CjEZPPC8.js","names":[],"sources":["../src/components/pagination/pagination-button.tsx"],"sourcesContent":["import { AriaAttributes } from 'react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type PaginationButtonProps = ButtonProps & {\n /**\n * Toggle button as active\n * @default false\n */\n 'aria-current'?: AriaAttributes['aria-current'];\n};\n\nexport const PaginationButton = ({ ref, ...rest }: PaginationButtonProps) => (\n <Button variant='text' icon ref={ref} {...rest} />\n);\n"],"mappings":";;;;AAWA,MAAa,mBAAmB,CAAC,EAAE,IAAK,GAAG,MAA6B,qBACtE,IAAC;CAAO,SAAQ;CAAO;CAAU;CAAK,GAAI;EAAQ"}
1
+ {"version":3,"file":"pagination-button-CMSNwkeT.js","names":[],"sources":["../src/components/pagination/pagination-button.tsx"],"sourcesContent":["import { AriaAttributes } from 'react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type PaginationButtonProps = ButtonProps & {\n /**\n * Toggle button as active\n * @default false\n */\n 'aria-current'?: AriaAttributes['aria-current'];\n};\n\nexport const PaginationButton = ({ ref, ...rest }: PaginationButtonProps) => (\n <Button variant='text' icon ref={ref} {...rest} />\n);\n"],"mappings":";;;;AAWA,MAAa,mBAAmB,CAAC,EAAE,IAAK,GAAG,MAA6B,qBACtE,IAAC;CAAO,SAAQ;CAAO;CAAU;CAAK,GAAI;EAAQ"}
@@ -13,4 +13,4 @@ const PaginationItem = ({ ref, asChild, children,...rest }) => {
13
13
 
14
14
  //#endregion
15
15
  export { PaginationItem };
16
- //# sourceMappingURL=pagination-item-DXnI0BWj.js.map
16
+ //# sourceMappingURL=pagination-item-DzskmZxf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-item-DXnI0BWj.js","names":[],"sources":["../src/components/pagination/pagination-item.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { HTMLAttributes, Ref } from 'react';\n\nexport type PaginationItemProps = HTMLAttributes<HTMLLIElement> & {\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<HTMLLIElement>;\n};\n\nexport const PaginationItem = ({ ref, asChild, children, ...rest }: PaginationItemProps) => {\n const Component = asChild ? Slot : 'li';\n return (\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,iBAAiB,CAAC,EAAE,KAAK,SAAS,SAAU,GAAG,MAA2B,KAAK;CAC1F,MAAM,YAAY,UAAU,OAAO;AACnC,wBACE,IAAC;EAAe;EAAK,GAAI;EACtB;GACS;AAEf"}
1
+ {"version":3,"file":"pagination-item-DzskmZxf.js","names":[],"sources":["../src/components/pagination/pagination-item.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { HTMLAttributes, Ref } from 'react';\n\nexport type PaginationItemProps = HTMLAttributes<HTMLLIElement> & {\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<HTMLLIElement>;\n};\n\nexport const PaginationItem = ({ ref, asChild, children, ...rest }: PaginationItemProps) => {\n const Component = asChild ? Slot : 'li';\n return (\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,iBAAiB,CAAC,EAAE,KAAK,SAAS,SAAU,GAAG,MAA2B,KAAK;CAC1F,MAAM,YAAY,UAAU,OAAO;AACnC,wBACE,IAAC;EAAe;EAAK,GAAI;EACtB;GACS;AAEf"}
@@ -18,4 +18,4 @@ declare const PaginationItem: ({
18
18
  }: PaginationItemProps) => react_jsx_runtime53.JSX.Element;
19
19
  //#endregion
20
20
  export { PaginationItem, PaginationItemProps };
21
- //# sourceMappingURL=pagination-item-5nXzmcd5.d.ts.map
21
+ //# sourceMappingURL=pagination-item-mKQyvHV9.d.ts.map
@@ -2,6 +2,11 @@ import { autoUpdate, computePosition, flip, hide, offset, shift } from "@floatin
2
2
 
3
3
  //#region src/vanilla/popover/index.ts
4
4
  const padding = 20;
5
+ /**
6
+ * Initializes the popover.
7
+ * @param options - InitPopoverOptions
8
+ * @returns A function to programmatically toggle the popover.
9
+ */
5
10
  const initPopover = ({ id, disableAutoPlacement = false, placement = "top", positionMiddleware = [] }) => {
6
11
  let cleanup;
7
12
  const popover = document.getElementById(id);
@@ -41,8 +46,9 @@ const initPopover = ({ id, disableAutoPlacement = false, placement = "top", posi
41
46
  if (isTrigger) togglePopover(!isOpen);
42
47
  if (isOutside && isOpen) togglePopover(false);
43
48
  }, true);
49
+ return togglePopover;
44
50
  };
45
51
 
46
52
  //#endregion
47
53
  export { initPopover };
48
- //# sourceMappingURL=popover-COi7S9pJ.js.map
54
+ //# sourceMappingURL=popover-8q0iwwCv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-8q0iwwCv.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\n/**\n * Initializes the popover.\n * @param options - InitPopoverOptions\n * @returns A function to programmatically toggle the popover.\n */\nexport const initPopover = ({\n id,\n disableAutoPlacement = false,\n placement = 'top',\n positionMiddleware = [],\n}: InitPopoverOptions) => {\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 return togglePopover;\n};\n"],"mappings":";;;AAGA,MAAM,UAAU;;;;;;AA2ChB,MAAa,cAAc,CAAC,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,CAAE,GACJ,KAAK;CACxB,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;AAED,QAAO;AACR"}
@@ -1,11 +1,11 @@
1
- import { useMergeRefs } from "./useMergeRefs-CcJMoo46.js";
2
- import { Context } from "./popover-trigger-context-D7nOI0FT.js";
1
+ import { useMergeRefs } from "./useMergeRefs-DC710CHX.js";
2
+ import { Context } from "./popover-trigger-context-Cre9Mczn.js";
3
3
  import clsx from "clsx/lite";
4
4
  import { Slot } from "@radix-ui/react-slot";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { use, useEffect, useRef } from "react";
7
- import { useControllableState } from "@radix-ui/react-use-controllable-state";
8
7
  import { autoUpdate, computePosition, flip, hide, offset, shift } from "@floating-ui/dom";
8
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
9
9
 
10
10
  //#region src/components/popover/popover.tsx
11
11
  const padding = 20;
@@ -104,4 +104,4 @@ const Popover = ({ id, className, onOpenChange, open, placement = "top", disable
104
104
 
105
105
  //#endregion
106
106
  export { Popover };
107
- //# sourceMappingURL=popover-I6eZrM65.js.map
107
+ //# sourceMappingURL=popover-Co-HV5GI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-Co-HV5GI.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/useMergeRefs/useMergeRefs';\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,5 +1,5 @@
1
1
  import { Button } from "./button-fhd-JARc.js";
2
- import { Context } from "./popover-trigger-context-D7nOI0FT.js";
2
+ import { Context } from "./popover-trigger-context-Cre9Mczn.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-dMRssLhy.js.map
46
+ //# sourceMappingURL=popover-trigger-Chi8uvRM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-dMRssLhy.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-Chi8uvRM.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"}
@@ -37,4 +37,4 @@ const PopoverTriggerContext = ({ children, open, onOpenChange }) => {
37
37
 
38
38
  //#endregion
39
39
  export { Context, PopoverTriggerContext };
40
- //# sourceMappingURL=popover-trigger-context-D7nOI0FT.js.map
40
+ //# sourceMappingURL=popover-trigger-context-Cre9Mczn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-context-D7nOI0FT.js","names":[],"sources":["../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { 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 * 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\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, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;;AAIA,MAAa,UAAU,cAKpB,CAAE,EAAC;;;;;;;;;;;;AA2BN,MAAa,wBAAwB,CAAC,EAAE,UAAU,MAAM,cAA0C,KAAK;CACrG,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,wBAAO,IAAC;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;EAAgB;EAAG;GAAmB;AACtG"}
1
+ {"version":3,"file":"popover-trigger-context-Cre9Mczn.js","names":[],"sources":["../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { 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 * 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\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, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;;AAIA,MAAa,UAAU,cAKpB,CAAE,EAAC;;;;;;;;;;;;AA2BN,MAAa,wBAAwB,CAAC,EAAE,UAAU,MAAM,cAA0C,KAAK;CACrG,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,wBAAO,IAAC;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;EAAgB;EAAG;GAAmB;AACtG"}
@@ -40,4 +40,4 @@ declare const PopoverTriggerContext: ({
40
40
  }: PopoverTriggerContextProps) => react_jsx_runtime56.JSX.Element;
41
41
  //#endregion
42
42
  export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
43
- //# sourceMappingURL=popover-trigger-context-JipAPdV6.d.ts.map
43
+ //# sourceMappingURL=popover-trigger-context-D6z-_uL5.d.ts.map
@@ -42,4 +42,4 @@ const Radio = ({ dark, label, description, error, fullwidth, style, className, r
42
42
 
43
43
  //#endregion
44
44
  export { Radio };
45
- //# sourceMappingURL=radio-Cn3PqpMt.js.map
45
+ //# sourceMappingURL=radio-DAC5mhl3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-Cn3PqpMt.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 /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n fullwidth,\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} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\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":";;;;;;;;AAuBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,WACA,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;EAAkB;EAAW;4BAChF,KAAC;mBACC,IAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc;IACd,oBAAkB;IACZ;IACN,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-DAC5mhl3.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 /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n fullwidth,\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} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\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":";;;;;;;;AAuBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,WACA,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;EAAkB;EAAW;4BAChF,KAAC;mBACC,IAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc;IACd,oBAAkB;IACZ;IACN,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"}
@@ -57,4 +57,4 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
57
57
 
58
58
  //#endregion
59
59
  export { Search };
60
- //# sourceMappingURL=search-CdV5su_L.js.map
60
+ //# sourceMappingURL=search-DRgmqncD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-CdV5su_L.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 /** Called when the user resets the search input. */\n onReset?: (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 onReset,\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 const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <BiIconMagnefyingGlass size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} dark={dark} {...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":";;;;;;;;;AA2BA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,SACA,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;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,QACF,SAAQ,GAAG;CAEd;AACD,wBACE,IAAC;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAO;4BAC7E,IAAC;GAAK,UAAU;GAAc,SAAS;6BACrC,KAAC;oBACC,IAAC,wCACC,IAAC,yBAA4B,OAAQ,GAC1B;oBACb,IAAC;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;oBAClE,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-DRgmqncD.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 /** Called when the user resets the search input. */\n onReset?: (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 onReset,\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 const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <BiIconMagnefyingGlass size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} dark={dark} {...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":";;;;;;;;;AA2BA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,SACA,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;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,QACF,SAAQ,GAAG;CAEd;AACD,wBACE,IAAC;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAO;4BAC7E,IAAC;GAAK,UAAU;GAAc,SAAS;6BACrC,KAAC;oBACC,IAAC,wCACC,IAAC,yBAA4B,OAAQ,GAC1B;oBACb,IAAC;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;oBAClE,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-DCZV6wZu.js.map
26
+ //# sourceMappingURL=select-R87VdG5U.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"select-R87VdG5U.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-BUaB9Yz-.js.map
15
+ //# sourceMappingURL=select-optgroup-jowSQvbc.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"select-optgroup-jowSQvbc.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-BByWq34J.js.map
15
+ //# sourceMappingURL=select-option-WAhhr82L.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"select-option-WAhhr82L.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"}
@@ -15,4 +15,4 @@ const SkipLink = ({ asChild, children, className, dark,...props }) => {
15
15
 
16
16
  //#endregion
17
17
  export { SkipLink };
18
- //# sourceMappingURL=skip-link-DwuiIAvE.js.map
18
+ //# sourceMappingURL=skip-link-CTmIHesZ.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"skip-link-CTmIHesZ.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"}
@@ -18,4 +18,4 @@ const StickyHeader = ({ children }) => {
18
18
 
19
19
  //#endregion
20
20
  export { StickyHeader };
21
- //# sourceMappingURL=sticky-header-DWAJUj20.js.map
21
+ //# sourceMappingURL=sticky-header-Dki5mPis.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"sticky-header-Dki5mPis.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"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime66 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime67 from "react/jsx-runtime";
2
2
  import { ReactNode } from "react";
3
3
 
4
4
  //#region src/components/sticky-header/sticky-header.d.ts
@@ -13,7 +13,7 @@ type StickyHeaderProps = {
13
13
  */
14
14
  declare const StickyHeader: ({
15
15
  children
16
- }: StickyHeaderProps) => react_jsx_runtime66.JSX.Element;
16
+ }: StickyHeaderProps) => react_jsx_runtime67.JSX.Element;
17
17
  //#endregion
18
18
  export { StickyHeader, StickyHeaderProps };
19
- //# sourceMappingURL=sticky-header-BJkvy3qf.d.ts.map
19
+ //# sourceMappingURL=sticky-header-JeG62vfR.d.ts.map
@@ -1,5 +1,5 @@
1
- import { useElementScrolledPastObserver } from "./useElementScrolledPastObserver-DjzJ4Mn-.js";
2
- import { useScrollDirection } from "./useScrollDirection-BLgp51hx.js";
1
+ import { useIsElementAboveViewport } from "./useIsElementAboveViewport-lmdnXDdc.js";
2
+ import { useScrollDirection } from "./useScrollDirection-C2EmQi0U.js";
3
3
  import clsx from "clsx/lite";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useRef } from "react";
@@ -7,7 +7,7 @@ import { useRef } from "react";
7
7
  //#region src/components/navbar/sub-navbar.tsx
8
8
  const SubNavbar = ({ dark = false, children, className, ref,...props }) => {
9
9
  const elementRef = useRef(null);
10
- const fixed = useElementScrolledPastObserver(elementRef);
10
+ const fixed = useIsElementAboveViewport(elementRef);
11
11
  const scrollDirection = useScrollDirection();
12
12
  return /* @__PURE__ */ jsxs("div", {
13
13
  className: "bi-sub-navbar--wrapper",
@@ -25,4 +25,4 @@ const SubNavbar = ({ dark = false, children, className, ref,...props }) => {
25
25
 
26
26
  //#endregion
27
27
  export { SubNavbar };
28
- //# sourceMappingURL=sub-navbar-DEudSxfj.js.map
28
+ //# sourceMappingURL=sub-navbar-DkxQv0WJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sub-navbar-DkxQv0WJ.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 { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\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 = useIsElementAboveViewport(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":";;;;;;;AAaA,MAAa,YAAY,CAAC,EAAE,OAAO,OAAO,UAAU,WAAW,IAAK,GAAG,OAAuB,KAAK;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,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"}
@@ -0,0 +1,120 @@
1
+ //#region src/vanilla/sub-navbar/index.ts
2
+ /**
3
+ * Detects the vertical scroll direction of the page.
4
+ * Returns 'up' | 'down' | null. The direction is only updated if the scroll distance
5
+ * exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.
6
+ */
7
+ var ScrollDirectionTracker = class {
8
+ scrollDirection = null;
9
+ lastScrollY = window.pageYOffset;
10
+ callbacks = /* @__PURE__ */ new Set();
11
+ constructor() {
12
+ this.updateScrollDirection = this.updateScrollDirection.bind(this);
13
+ window.addEventListener("scroll", this.updateScrollDirection);
14
+ }
15
+ updateScrollDirection() {
16
+ const scrollY = window.pageYOffset;
17
+ const direction = scrollY > this.lastScrollY ? "down" : "up";
18
+ if (direction !== this.scrollDirection && (scrollY - this.lastScrollY > 5 || scrollY - this.lastScrollY < -5)) {
19
+ this.scrollDirection = direction;
20
+ this.callbacks.forEach((callback) => callback(this.scrollDirection));
21
+ }
22
+ this.lastScrollY = scrollY > 0 ? scrollY : 0;
23
+ }
24
+ subscribe(callback) {
25
+ this.callbacks.add(callback);
26
+ return () => this.callbacks.delete(callback);
27
+ }
28
+ destroy() {
29
+ window.removeEventListener("scroll", this.updateScrollDirection);
30
+ this.callbacks.clear();
31
+ }
32
+ getCurrentDirection() {
33
+ return this.scrollDirection;
34
+ }
35
+ };
36
+ /**
37
+ * Detects when an element is scrolled past and is no longer in the viewport.
38
+ */
39
+ var ElementAboveViewportTracker = class {
40
+ isAboveViewport = false;
41
+ observer;
42
+ callbacks = /* @__PURE__ */ new Set();
43
+ constructor(element) {
44
+ this.element = element;
45
+ this.observer = new IntersectionObserver(([entry]) => {
46
+ const newIsAbove = entry.boundingClientRect.y < 0;
47
+ if (newIsAbove !== this.isAboveViewport) {
48
+ this.isAboveViewport = newIsAbove;
49
+ this.callbacks.forEach((callback) => callback(this.isAboveViewport));
50
+ }
51
+ }, { threshold: [0] });
52
+ this.observer.observe(this.element);
53
+ }
54
+ subscribe(callback) {
55
+ this.callbacks.add(callback);
56
+ return () => this.callbacks.delete(callback);
57
+ }
58
+ destroy() {
59
+ this.observer.disconnect();
60
+ this.callbacks.clear();
61
+ }
62
+ getIsAboveViewport() {
63
+ return this.isAboveViewport;
64
+ }
65
+ };
66
+ /**
67
+ * Initializes all sub-navbars on the page to handle scroll-based behavior.
68
+ * This includes:
69
+ * - Setting data-fixed attribute when the navbar is scrolled past
70
+ * - Setting data-scroll-dir attribute based on scroll direction when fixed
71
+ *
72
+ * @param options Configuration options
73
+ * @returns Cleanup function to remove all event listeners and observers
74
+ */
75
+ const initSubNavbar = ({ selector = ".bi-sub-navbar" } = {}) => {
76
+ const subNavbars = document.querySelectorAll(selector);
77
+ if (subNavbars.length === 0) {
78
+ console.warn(`No elements found with selector: ${selector}`);
79
+ return () => {};
80
+ }
81
+ const scrollTracker = new ScrollDirectionTracker();
82
+ const cleanupFunctions = [];
83
+ subNavbars.forEach((navbar) => {
84
+ const wrapper = navbar.closest(".bi-sub-navbar--wrapper");
85
+ if (!wrapper) {
86
+ console.warn("Sub-navbar must be wrapped in an element with class \"bi-sub-navbar--wrapper\"");
87
+ return;
88
+ }
89
+ let referenceElement = wrapper.querySelector("div:first-child");
90
+ if (!referenceElement || referenceElement === navbar) {
91
+ referenceElement = document.createElement("div");
92
+ wrapper.insertBefore(referenceElement, navbar);
93
+ }
94
+ const viewportTracker = new ElementAboveViewportTracker(referenceElement);
95
+ const unsubscribeViewport = viewportTracker.subscribe((isAbove) => {
96
+ navbar.setAttribute("data-fixed", String(isAbove));
97
+ if (isAbove) {
98
+ const currentDirection = scrollTracker.getCurrentDirection();
99
+ if (currentDirection) navbar.setAttribute("data-scroll-dir", currentDirection);
100
+ } else navbar.removeAttribute("data-scroll-dir");
101
+ });
102
+ const unsubscribeScroll = scrollTracker.subscribe((direction) => {
103
+ const isFixed = navbar.getAttribute("data-fixed") === "true";
104
+ if (isFixed && direction) navbar.setAttribute("data-scroll-dir", direction);
105
+ });
106
+ cleanupFunctions.push(() => {
107
+ unsubscribeViewport();
108
+ unsubscribeScroll();
109
+ viewportTracker.destroy();
110
+ });
111
+ });
112
+ return () => {
113
+ cleanupFunctions.forEach((cleanup) => cleanup());
114
+ scrollTracker.destroy();
115
+ };
116
+ };
117
+
118
+ //#endregion
119
+ export { initSubNavbar };
120
+ //# sourceMappingURL=sub-navbar-qSNpTABT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sub-navbar-qSNpTABT.js","names":["callback: (direction: 'up' | 'down' | null) => void","element: HTMLElement","callback: (isAbove: boolean) => void","cleanupFunctions: (() => void)[]"],"sources":["../src/vanilla/sub-navbar/index.ts"],"sourcesContent":["/**\n * Detects the vertical scroll direction of the page.\n * Returns 'up' | 'down' | null. The direction is only updated if the scroll distance\n * exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nclass ScrollDirectionTracker {\n private scrollDirection: 'up' | 'down' | null = null;\n private lastScrollY = window.pageYOffset;\n private callbacks = new Set<(direction: 'up' | 'down' | null) => void>();\n\n constructor() {\n this.updateScrollDirection = this.updateScrollDirection.bind(this);\n window.addEventListener('scroll', this.updateScrollDirection);\n }\n\n private updateScrollDirection() {\n const scrollY = window.pageYOffset;\n const direction = scrollY > this.lastScrollY ? 'down' : 'up';\n\n if (direction !== this.scrollDirection && (scrollY - this.lastScrollY > 5 || scrollY - this.lastScrollY < -5)) {\n this.scrollDirection = direction;\n this.callbacks.forEach((callback) => callback(this.scrollDirection));\n }\n\n this.lastScrollY = scrollY > 0 ? scrollY : 0;\n }\n\n subscribe(callback: (direction: 'up' | 'down' | null) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n window.removeEventListener('scroll', this.updateScrollDirection);\n this.callbacks.clear();\n }\n\n getCurrentDirection() {\n return this.scrollDirection;\n }\n}\n\n/**\n * Detects when an element is scrolled past and is no longer in the viewport.\n */\nclass ElementAboveViewportTracker {\n private isAboveViewport = false;\n private observer: IntersectionObserver;\n private callbacks = new Set<(isAbove: boolean) => void>();\n\n constructor(private element: HTMLElement) {\n this.observer = new IntersectionObserver(\n ([entry]) => {\n const newIsAbove = entry.boundingClientRect.y < 0;\n if (newIsAbove !== this.isAboveViewport) {\n this.isAboveViewport = newIsAbove;\n this.callbacks.forEach((callback) => callback(this.isAboveViewport));\n }\n },\n { threshold: [0] },\n );\n\n this.observer.observe(this.element);\n }\n\n subscribe(callback: (isAbove: boolean) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n this.observer.disconnect();\n this.callbacks.clear();\n }\n\n getIsAboveViewport() {\n return this.isAboveViewport;\n }\n}\n\nexport type InitSubNavbarOptions = {\n /**\n * Custom selector to find sub-navbars.\n * @default '.bi-sub-navbar'\n */\n selector?: string;\n};\n\n/**\n * Initializes all sub-navbars on the page to handle scroll-based behavior.\n * This includes:\n * - Setting data-fixed attribute when the navbar is scrolled past\n * - Setting data-scroll-dir attribute based on scroll direction when fixed\n *\n * @param options Configuration options\n * @returns Cleanup function to remove all event listeners and observers\n */\nexport const initSubNavbar = ({ selector = '.bi-sub-navbar' }: InitSubNavbarOptions = {}) => {\n const subNavbars = document.querySelectorAll<HTMLElement>(selector);\n\n if (subNavbars.length === 0) {\n console.warn(`No elements found with selector: ${selector}`);\n return () => {};\n }\n\n const scrollTracker = new ScrollDirectionTracker();\n const cleanupFunctions: (() => void)[] = [];\n\n subNavbars.forEach((navbar) => {\n const wrapper = navbar.closest('.bi-sub-navbar--wrapper') as HTMLElement;\n if (!wrapper) {\n console.warn('Sub-navbar must be wrapped in an element with class \"bi-sub-navbar--wrapper\"');\n return;\n }\n\n // Find or create the reference element (empty div) that acts as the scroll trigger\n let referenceElement = wrapper.querySelector<HTMLElement>('div:first-child');\n if (!referenceElement || referenceElement === navbar) {\n referenceElement = document.createElement('div');\n wrapper.insertBefore(referenceElement, navbar);\n }\n\n const viewportTracker = new ElementAboveViewportTracker(referenceElement);\n\n // Subscribe to viewport changes\n const unsubscribeViewport = viewportTracker.subscribe((isAbove) => {\n navbar.setAttribute('data-fixed', String(isAbove));\n\n // Only set scroll direction when fixed\n if (isAbove) {\n const currentDirection = scrollTracker.getCurrentDirection();\n if (currentDirection) {\n navbar.setAttribute('data-scroll-dir', currentDirection);\n }\n } else {\n navbar.removeAttribute('data-scroll-dir');\n }\n });\n\n // Subscribe to scroll direction changes\n const unsubscribeScroll = scrollTracker.subscribe((direction) => {\n const isFixed = navbar.getAttribute('data-fixed') === 'true';\n if (isFixed && direction) {\n navbar.setAttribute('data-scroll-dir', direction);\n }\n });\n\n cleanupFunctions.push(() => {\n unsubscribeViewport();\n unsubscribeScroll();\n viewportTracker.destroy();\n });\n });\n\n // Return cleanup function\n return () => {\n cleanupFunctions.forEach((cleanup) => cleanup());\n scrollTracker.destroy();\n };\n};\n"],"mappings":";;;;;;AAKA,IAAM,yBAAN,MAA6B;CAC3B,AAAQ,kBAAwC;CAChD,AAAQ,cAAc,OAAO;CAC7B,AAAQ,4BAAY,IAAI;CAExB,cAAc;AACZ,OAAK,wBAAwB,KAAK,sBAAsB,KAAK,KAAK;AAClE,SAAO,iBAAiB,UAAU,KAAK,sBAAsB;CAC9D;CAED,AAAQ,wBAAwB;EAC9B,MAAM,UAAU,OAAO;EACvB,MAAM,YAAY,UAAU,KAAK,cAAc,SAAS;AAExD,MAAI,cAAc,KAAK,oBAAoB,UAAU,KAAK,cAAc,KAAK,UAAU,KAAK,cAAc,KAAK;AAC7G,QAAK,kBAAkB;AACvB,QAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,gBAAgB,CAAC;EACrE;AAED,OAAK,cAAc,UAAU,IAAI,UAAU;CAC5C;CAED,UAAUA,UAAqD;AAC7D,OAAK,UAAU,IAAI,SAAS;AAC5B,SAAO,MAAM,KAAK,UAAU,OAAO,SAAS;CAC7C;CAED,UAAU;AACR,SAAO,oBAAoB,UAAU,KAAK,sBAAsB;AAChE,OAAK,UAAU,OAAO;CACvB;CAED,sBAAsB;AACpB,SAAO,KAAK;CACb;AACF;;;;AAKD,IAAM,8BAAN,MAAkC;CAChC,AAAQ,kBAAkB;CAC1B,AAAQ;CACR,AAAQ,4BAAY,IAAI;CAExB,YAAoBC,SAAsB;EAAtB;AAClB,OAAK,WAAW,IAAI,qBAClB,CAAC,CAAC,MAAM,KAAK;GACX,MAAM,aAAa,MAAM,mBAAmB,IAAI;AAChD,OAAI,eAAe,KAAK,iBAAiB;AACvC,SAAK,kBAAkB;AACvB,SAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,gBAAgB,CAAC;GACrE;EACF,GACD,EAAE,WAAW,CAAC,CAAE,EAAE;AAGpB,OAAK,SAAS,QAAQ,KAAK,QAAQ;CACpC;CAED,UAAUC,UAAsC;AAC9C,OAAK,UAAU,IAAI,SAAS;AAC5B,SAAO,MAAM,KAAK,UAAU,OAAO,SAAS;CAC7C;CAED,UAAU;AACR,OAAK,SAAS,YAAY;AAC1B,OAAK,UAAU,OAAO;CACvB;CAED,qBAAqB;AACnB,SAAO,KAAK;CACb;AACF;;;;;;;;;;AAmBD,MAAa,gBAAgB,CAAC,EAAE,WAAW,kBAAwC,GAAG,CAAE,MAAK;CAC3F,MAAM,aAAa,SAAS,iBAA8B,SAAS;AAEnE,KAAI,WAAW,WAAW,GAAG;AAC3B,UAAQ,MAAM,mCAAmC,SAAS,EAAE;AAC5D,SAAO,MAAM,CAAE;CAChB;CAED,MAAM,gBAAgB,IAAI;CAC1B,MAAMC,mBAAmC,CAAE;AAE3C,YAAW,QAAQ,CAAC,WAAW;EAC7B,MAAM,UAAU,OAAO,QAAQ,0BAA0B;AACzD,OAAK,SAAS;AACZ,WAAQ,KAAK,iFAA+E;AAC5F;EACD;EAGD,IAAI,mBAAmB,QAAQ,cAA2B,kBAAkB;AAC5E,OAAK,oBAAoB,qBAAqB,QAAQ;AACpD,sBAAmB,SAAS,cAAc,MAAM;AAChD,WAAQ,aAAa,kBAAkB,OAAO;EAC/C;EAED,MAAM,kBAAkB,IAAI,4BAA4B;EAGxD,MAAM,sBAAsB,gBAAgB,UAAU,CAAC,YAAY;AACjE,UAAO,aAAa,cAAc,OAAO,QAAQ,CAAC;AAGlD,OAAI,SAAS;IACX,MAAM,mBAAmB,cAAc,qBAAqB;AAC5D,QAAI,iBACF,QAAO,aAAa,mBAAmB,iBAAiB;GAE3D,MACC,QAAO,gBAAgB,kBAAkB;EAE5C,EAAC;EAGF,MAAM,oBAAoB,cAAc,UAAU,CAAC,cAAc;GAC/D,MAAM,UAAU,OAAO,aAAa,aAAa,KAAK;AACtD,OAAI,WAAW,UACb,QAAO,aAAa,mBAAmB,UAAU;EAEpD,EAAC;AAEF,mBAAiB,KAAK,MAAM;AAC1B,wBAAqB;AACrB,sBAAmB;AACnB,mBAAgB,SAAS;EAC1B,EAAC;CACH,EAAC;AAGF,QAAO,MAAM;AACX,mBAAiB,QAAQ,CAAC,YAAY,SAAS,CAAC;AAChD,gBAAc,SAAS;CACxB;AACF"}
@@ -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-9qkzsjIT.js.map
27
+ //# sourceMappingURL=tab-78y6QR5H.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"tab-78y6QR5H.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-CpaYfphj.js.map
24
+ //# sourceMappingURL=tabs-UA0wAjuH.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"tabs-UA0wAjuH.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-UDrgmCSx.js.map
20
+ //# sourceMappingURL=tabs-list-BykXXSuq.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"tabs-list-BykXXSuq.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-DeVzvQQw.js.map
21
+ //# sourceMappingURL=tabs-panel-B8knWcZY.js.map