@bi-digital/react 0.2.21 → 0.2.23

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 (390) hide show
  1. package/dist/{alert-footer-KRDyyLma.d.ts → alert-footer-Cqr42-cW.d.ts} +63 -32
  2. package/dist/{checkbox-CXVZj5Vv.js → checkbox-ZR1Z2PCF.js} +3 -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 +15 -14
  9. package/dist/components/alert/alert.d.ts +15 -14
  10. package/dist/components/alert/index.d.ts +15 -14
  11. package/dist/components/avatar/avatar.d.ts +15 -14
  12. package/dist/components/avatar/index.d.ts +15 -14
  13. package/dist/components/badge/badge.d.ts +15 -14
  14. package/dist/components/badge/index.d.ts +15 -14
  15. package/dist/components/button/button.d.ts +15 -14
  16. package/dist/components/button/index.d.ts +15 -14
  17. package/dist/components/card/card-action.d.ts +15 -14
  18. package/dist/components/card/card-actions.d.ts +15 -14
  19. package/dist/components/card/card-content.d.ts +15 -14
  20. package/dist/components/card/card-date.d.ts +15 -14
  21. package/dist/components/card/card-header.d.ts +15 -14
  22. package/dist/components/card/card-media.d.ts +15 -14
  23. package/dist/components/card/card.d.ts +15 -14
  24. package/dist/components/card/index.d.ts +15 -14
  25. package/dist/components/checkbox/checkbox-subsection.d.ts +15 -14
  26. package/dist/components/checkbox/checkbox-subsection.js +1 -1
  27. package/dist/components/checkbox/checkbox.d.ts +15 -14
  28. package/dist/components/checkbox/checkbox.js +2 -6
  29. package/dist/components/checkbox/index.d.ts +15 -14
  30. package/dist/components/checkbox/index.js +4 -8
  31. package/dist/components/chip/chip.d.ts +15 -14
  32. package/dist/components/chip/chip.js +1 -1
  33. package/dist/components/chip/index.d.ts +15 -14
  34. package/dist/components/chip/index.js +2 -2
  35. package/dist/components/dialog/dialog-close-button.d.ts +15 -14
  36. package/dist/components/dialog/dialog-close-button.js +1 -1
  37. package/dist/components/dialog/dialog-content.d.ts +15 -14
  38. package/dist/components/dialog/dialog-content.js +1 -1
  39. package/dist/components/dialog/dialog-footer.d.ts +15 -14
  40. package/dist/components/dialog/dialog-footer.js +1 -1
  41. package/dist/components/dialog/dialog-header.d.ts +15 -14
  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 +15 -14
  46. package/dist/components/dialog/dialog-trigger.js +2 -2
  47. package/dist/components/dialog/dialog.d.ts +15 -14
  48. package/dist/components/dialog/dialog.js +3 -7
  49. package/dist/components/dialog/index.d.ts +15 -14
  50. package/dist/components/dialog/index.js +9 -13
  51. package/dist/components/drawer/drawer-close-button.d.ts +15 -14
  52. package/dist/components/drawer/drawer-close-button.js +10 -14
  53. package/dist/components/drawer/drawer-content.d.ts +15 -14
  54. package/dist/components/drawer/drawer-content.js +10 -14
  55. package/dist/components/drawer/drawer-footer.d.ts +15 -14
  56. package/dist/components/drawer/drawer-footer.js +10 -14
  57. package/dist/components/drawer/drawer-header.d.ts +15 -14
  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 +15 -14
  62. package/dist/components/drawer/drawer-trigger.js +10 -14
  63. package/dist/components/drawer/drawer.d.ts +15 -14
  64. package/dist/components/drawer/drawer.js +10 -14
  65. package/dist/components/drawer/index.d.ts +15 -14
  66. package/dist/components/drawer/index.js +17 -21
  67. package/dist/components/dropdown/dropdown-button.d.ts +15 -14
  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 -1
  74. package/dist/components/dropdown/dropdown-trigger-context.js +6 -10
  75. package/dist/components/dropdown/dropdown-trigger.d.ts +15 -14
  76. package/dist/components/dropdown/dropdown-trigger.js +6 -10
  77. package/dist/components/dropdown/dropdown.d.ts +15 -14
  78. package/dist/components/dropdown/dropdown.js +6 -10
  79. package/dist/components/dropdown/index.d.ts +15 -14
  80. package/dist/components/dropdown/index.js +12 -16
  81. package/dist/components/field/field-affix.d.ts +15 -14
  82. package/dist/components/field/field-description.d.ts +15 -14
  83. package/dist/components/field/field.d.ts +15 -14
  84. package/dist/components/field/index.d.ts +15 -14
  85. package/dist/components/fieldset/fieldset-description.d.ts +15 -14
  86. package/dist/components/fieldset/fieldset-description.js +1 -1
  87. package/dist/components/fieldset/fieldset-legend.d.ts +15 -14
  88. package/dist/components/fieldset/fieldset-legend.js +1 -1
  89. package/dist/components/fieldset/fieldset.d.ts +15 -14
  90. package/dist/components/fieldset/fieldset.js +1 -1
  91. package/dist/components/fieldset/index.d.ts +15 -14
  92. package/dist/components/fieldset/index.js +4 -4
  93. package/dist/components/filter-group/filter-group.d.ts +15 -14
  94. package/dist/components/filter-group/filter-group.js +1 -1
  95. package/dist/components/filter-group/index.d.ts +15 -14
  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 +15 -14
  100. package/dist/components/footer/footer.js +1 -1
  101. package/dist/components/footer/index.d.ts +15 -14
  102. package/dist/components/footer/index.js +3 -3
  103. package/dist/components/index.d.ts +15 -14
  104. package/dist/components/index.js +84 -83
  105. package/dist/components/input/index.d.ts +15 -14
  106. package/dist/components/input/input.d.ts +15 -14
  107. package/dist/components/label/index.d.ts +15 -14
  108. package/dist/components/label/label.d.ts +15 -14
  109. package/dist/components/link/index.d.ts +15 -14
  110. package/dist/components/link/index.js +2 -2
  111. package/dist/components/link/link.d.ts +15 -14
  112. package/dist/components/link/link.js +1 -1
  113. package/dist/components/logo/index.d.ts +15 -14
  114. package/dist/components/logo/index.js +2 -2
  115. package/dist/components/logo/logo.d.ts +15 -14
  116. package/dist/components/logo/logo.js +1 -1
  117. package/dist/components/navbar/index.d.ts +15 -14
  118. package/dist/components/navbar/index.js +12 -7
  119. package/dist/components/navbar/navbar.d.ts +15 -14
  120. package/dist/components/navbar/navbar.js +3 -3
  121. package/dist/components/navbar/sub-navbar.d.ts +15 -14
  122. package/dist/components/navbar/sub-navbar.js +8 -3
  123. package/dist/components/pagination/index.d.ts +15 -14
  124. package/dist/components/pagination/index.js +4 -4
  125. package/dist/components/pagination/pagination-button.d.ts +15 -14
  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 +15 -14
  130. package/dist/components/pagination/pagination.js +1 -1
  131. package/dist/components/popover/index.d.ts +15 -14
  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 +15 -14
  136. package/dist/components/popover/popover-trigger.js +2 -2
  137. package/dist/components/popover/popover.d.ts +15 -14
  138. package/dist/components/popover/popover.js +3 -7
  139. package/dist/components/radio/index.d.ts +15 -14
  140. package/dist/components/radio/index.js +2 -2
  141. package/dist/components/radio/radio.d.ts +15 -14
  142. package/dist/components/radio/radio.js +1 -1
  143. package/dist/components/search/index.d.ts +15 -14
  144. package/dist/components/search/index.js +2 -2
  145. package/dist/components/search/search.d.ts +15 -14
  146. package/dist/components/search/search.js +1 -1
  147. package/dist/components/select/index.d.ts +15 -14
  148. package/dist/components/select/index.js +4 -4
  149. package/dist/components/select/select-optgroup.d.ts +15 -14
  150. package/dist/components/select/select-optgroup.js +1 -1
  151. package/dist/components/select/select-option.d.ts +15 -14
  152. package/dist/components/select/select-option.js +1 -1
  153. package/dist/components/select/select.d.ts +15 -14
  154. package/dist/components/select/select.js +1 -1
  155. package/dist/components/skip-link/index.d.ts +15 -14
  156. package/dist/components/skip-link/index.js +2 -2
  157. package/dist/components/skip-link/skip-link.d.ts +15 -14
  158. package/dist/components/skip-link/skip-link.js +1 -1
  159. package/dist/components/spinner/index.d.ts +15 -14
  160. package/dist/components/spinner/spinner.d.ts +15 -14
  161. package/dist/components/sticky-header/index.js +2 -2
  162. package/dist/components/sticky-header/sticky-header.js +1 -1
  163. package/dist/components/tabs/index.d.ts +15 -14
  164. package/dist/components/tabs/index.js +5 -5
  165. package/dist/components/tabs/tab.d.ts +15 -14
  166. package/dist/components/tabs/tab.js +1 -1
  167. package/dist/components/tabs/tabs-list.d.ts +15 -14
  168. package/dist/components/tabs/tabs-list.js +1 -1
  169. package/dist/components/tabs/tabs-panel.d.ts +15 -14
  170. package/dist/components/tabs/tabs-panel.js +1 -1
  171. package/dist/components/tabs/tabs.d.ts +15 -14
  172. package/dist/components/tabs/tabs.js +1 -1
  173. package/dist/components/textarea/index.d.ts +15 -14
  174. package/dist/components/textarea/index.js +2 -2
  175. package/dist/components/textarea/textarea.d.ts +15 -14
  176. package/dist/components/textarea/textarea.js +1 -1
  177. package/dist/components/textfield/index.d.ts +15 -14
  178. package/dist/components/textfield/index.js +6 -6
  179. package/dist/components/textfield/textfield.d.ts +15 -14
  180. package/dist/components/textfield/textfield.js +5 -5
  181. package/dist/components/validation-message/index.d.ts +15 -14
  182. package/dist/components/validation-message/index.js +2 -2
  183. package/dist/components/validation-message/validation-message.d.ts +15 -14
  184. package/dist/components/validation-message/validation-message.js +1 -1
  185. package/dist/{dialog-WgEtFqJD.js → dialog-DzGRZgbP.js} +3 -3
  186. package/dist/dialog-DzGRZgbP.js.map +1 -0
  187. package/dist/{dialog-close-button-8n-DBvH4.js → dialog-close-button-B4zf0hvt.js} +1 -1
  188. package/dist/{dialog-close-button-8n-DBvH4.js.map → dialog-close-button-B4zf0hvt.js.map} +1 -1
  189. package/dist/{dialog-content-CU346luZ.js → dialog-content-R35XpbSj.js} +1 -1
  190. package/dist/{dialog-content-CU346luZ.js.map → dialog-content-R35XpbSj.js.map} +1 -1
  191. package/dist/{dialog-footer-BPCalxtL.js → dialog-footer-AoiCz_Uj.js} +1 -1
  192. package/dist/{dialog-footer-BPCalxtL.js.map → dialog-footer-AoiCz_Uj.js.map} +1 -1
  193. package/dist/{dialog-header-DsLpGnOf.js → dialog-header-Bbq9DcHX.js} +1 -1
  194. package/dist/{dialog-header-DsLpGnOf.js.map → dialog-header-Bbq9DcHX.js.map} +1 -1
  195. package/dist/{dialog-trigger-Q9Y5EG0H.js → dialog-trigger-DinHpkua.js} +2 -2
  196. package/dist/{dialog-trigger-Q9Y5EG0H.js.map → dialog-trigger-DinHpkua.js.map} +1 -1
  197. package/dist/{dialog-trigger-context-B41wR-bM.js → dialog-trigger-context-51mA5fz3.js} +1 -1
  198. package/dist/{dialog-trigger-context-B41wR-bM.js.map → dialog-trigger-context-51mA5fz3.js.map} +1 -1
  199. package/dist/{dialog-trigger-context-BkQSJ-rX.d.ts → dialog-trigger-context-DwmhJNzA.d.ts} +1 -1
  200. package/dist/{drawer-B8xyMitJ.js → drawer-CZ05Lizo.js} +2 -2
  201. package/dist/{drawer-B8xyMitJ.js.map → drawer-CZ05Lizo.js.map} +1 -1
  202. package/dist/{drawer-close-button-CqDqQGHP.js → drawer-close-button-DigcuqLc.js} +2 -2
  203. package/dist/{drawer-close-button-CqDqQGHP.js.map → drawer-close-button-DigcuqLc.js.map} +1 -1
  204. package/dist/{drawer-content-Dp__eciN.js → drawer-content-CFc-rxBo.js} +2 -2
  205. package/dist/{drawer-content-Dp__eciN.js.map → drawer-content-CFc-rxBo.js.map} +1 -1
  206. package/dist/{drawer-footer-qYHvZEl_.js → drawer-footer-CfHjfvEg.js} +2 -2
  207. package/dist/{drawer-footer-qYHvZEl_.js.map → drawer-footer-CfHjfvEg.js.map} +1 -1
  208. package/dist/{drawer-header-fQaZQuIY.js → drawer-header-DK4XoaaW.js} +2 -2
  209. package/dist/{drawer-header-fQaZQuIY.js.map → drawer-header-DK4XoaaW.js.map} +1 -1
  210. package/dist/{drawer-trigger-BvjTEl5N.js → drawer-trigger-Do9Htx5M.js} +2 -2
  211. package/dist/{drawer-trigger-BvjTEl5N.js.map → drawer-trigger-Do9Htx5M.js.map} +1 -1
  212. package/dist/{drawer-trigger-context-DHYdt3sB.js → drawer-trigger-context-BUWPPdas.js} +2 -2
  213. package/dist/{drawer-trigger-context-DHYdt3sB.js.map → drawer-trigger-context-BUWPPdas.js.map} +1 -1
  214. package/dist/{drawer-trigger-context-B3X3kUrY.d.ts → drawer-trigger-context-BoS9ZcVF.d.ts} +1 -1
  215. package/dist/dropdown-A1PW0OoQ.js +19 -0
  216. package/dist/{dropdown-D-dX5PAl.js.map → dropdown-A1PW0OoQ.js.map} +1 -1
  217. package/dist/{dropdown-D54kcMt_.js → dropdown-b7acNLZb.js} +2 -2
  218. package/dist/{dropdown-D54kcMt_.js.map → dropdown-b7acNLZb.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-DfHyg_D7.js → dropdown-trigger-Fwrigwtg.js} +2 -2
  228. package/dist/{dropdown-trigger-DfHyg_D7.js.map → dropdown-trigger-Fwrigwtg.js.map} +1 -1
  229. package/dist/{dropdown-trigger-context-BpYBk_xf.js → dropdown-trigger-context-BCcyoZEx.js} +6 -3
  230. package/dist/dropdown-trigger-context-BCcyoZEx.js.map +1 -0
  231. package/dist/{fieldset-DGB7cvdz.js → fieldset-Bpu4CRKG.js} +1 -1
  232. package/dist/{fieldset-DGB7cvdz.js.map → fieldset-Bpu4CRKG.js.map} +1 -1
  233. package/dist/{fieldset-description-oNKwCGnW.js → fieldset-description-DiHvcLh-.js} +1 -1
  234. package/dist/{fieldset-description-oNKwCGnW.js.map → fieldset-description-DiHvcLh-.js.map} +1 -1
  235. package/dist/{fieldset-legend-Dseni7XM.js → fieldset-legend-CR4srn2-.js} +1 -1
  236. package/dist/{fieldset-legend-Dseni7XM.js.map → fieldset-legend-CR4srn2-.js.map} +1 -1
  237. package/dist/{filter-group-BKO5sgGt.js → filter-group-DMSPaCQt.js} +1 -1
  238. package/dist/{filter-group-BKO5sgGt.js.map → filter-group-DMSPaCQt.js.map} +1 -1
  239. package/dist/{footer-CXKRhzUT.js → footer-CU7LdbPO.js} +1 -1
  240. package/dist/{footer-CXKRhzUT.js.map → footer-CU7LdbPO.js.map} +1 -1
  241. package/dist/{footer-links-Dz1UwVuf.js → footer-links-BIUrxu38.js} +1 -1
  242. package/dist/{footer-links-Dz1UwVuf.js.map → footer-links-BIUrxu38.js.map} +1 -1
  243. package/dist/{footer-links-B237uv2H.d.ts → footer-links-Drm2LFnw.d.ts} +3 -3
  244. package/dist/index-CjnsNUdv.d.ts +23 -0
  245. package/dist/{index-B-0iSMVN.d.ts → index-DV9bEW_1.d.ts} +14 -3
  246. package/dist/{index-CXV3nvLQ.d.ts → index-SaA0V19q.d.ts} +14 -3
  247. package/dist/{link-BdmxFMOF.js → link-BqDeZAJF.js} +1 -1
  248. package/dist/{link-BdmxFMOF.js.map → link-BqDeZAJF.js.map} +1 -1
  249. package/dist/{logo-cfY7Ilvc.js → logo-QKrYvRFP.js} +1 -1
  250. package/dist/{logo-cfY7Ilvc.js.map → logo-QKrYvRFP.js.map} +1 -1
  251. package/dist/main.d.ts +16 -15
  252. package/dist/main.js +86 -85
  253. package/dist/{navbar-DJJMercW.js → navbar-Dxv7GQO0.js} +2 -2
  254. package/dist/{navbar-DJJMercW.js.map → navbar-Dxv7GQO0.js.map} +1 -1
  255. package/dist/{pagination-DxXjiIgC.js → pagination-DH6vZYMO.js} +1 -1
  256. package/dist/{pagination-DxXjiIgC.js.map → pagination-DH6vZYMO.js.map} +1 -1
  257. package/dist/{pagination-button-CjEZPPC8.js → pagination-button-CMSNwkeT.js} +1 -1
  258. package/dist/{pagination-button-CjEZPPC8.js.map → pagination-button-CMSNwkeT.js.map} +1 -1
  259. package/dist/{pagination-item-DXnI0BWj.js → pagination-item-DzskmZxf.js} +1 -1
  260. package/dist/{pagination-item-DXnI0BWj.js.map → pagination-item-DzskmZxf.js.map} +1 -1
  261. package/dist/{pagination-item-CEfdaSuS.d.ts → pagination-item-mKQyvHV9.d.ts} +3 -3
  262. package/dist/{popover-CGvBn3q9.js → popover-DmA4qMtu.js} +7 -7
  263. package/dist/popover-DmA4qMtu.js.map +1 -0
  264. package/dist/{popover-COi7S9pJ.js → popover-MUiGENkr.js} +8 -3
  265. package/dist/popover-MUiGENkr.js.map +1 -0
  266. package/dist/{popover-trigger-BLnIukvY.js → popover-trigger-Chi8uvRM.js} +2 -2
  267. package/dist/{popover-trigger-BLnIukvY.js.map → popover-trigger-Chi8uvRM.js.map} +1 -1
  268. package/dist/{popover-trigger-context-CGJlUS_N.js → popover-trigger-context-Cre9Mczn.js} +9 -3
  269. package/dist/popover-trigger-context-Cre9Mczn.js.map +1 -0
  270. package/dist/{popover-trigger-context-CQKQbCmr.d.ts → popover-trigger-context-D6z-_uL5.d.ts} +18 -6
  271. package/dist/{radio-ulWuU7RE.js → radio-DAC5mhl3.js} +2 -1
  272. package/dist/{radio-ulWuU7RE.js.map → radio-DAC5mhl3.js.map} +1 -1
  273. package/dist/{search-Cqnboh3z.js → search-DRgmqncD.js} +2 -1
  274. package/dist/{search-Cqnboh3z.js.map → search-DRgmqncD.js.map} +1 -1
  275. package/dist/{select-DCZV6wZu.js → select-R87VdG5U.js} +1 -1
  276. package/dist/{select-DCZV6wZu.js.map → select-R87VdG5U.js.map} +1 -1
  277. package/dist/{select-optgroup-BUaB9Yz-.js → select-optgroup-jowSQvbc.js} +1 -1
  278. package/dist/{select-optgroup-BUaB9Yz-.js.map → select-optgroup-jowSQvbc.js.map} +1 -1
  279. package/dist/{select-option-BByWq34J.js → select-option-WAhhr82L.js} +1 -1
  280. package/dist/{select-option-BByWq34J.js.map → select-option-WAhhr82L.js.map} +1 -1
  281. package/dist/{skip-link-DwuiIAvE.js → skip-link-CTmIHesZ.js} +1 -1
  282. package/dist/{skip-link-DwuiIAvE.js.map → skip-link-CTmIHesZ.js.map} +1 -1
  283. package/dist/{sticky-header-DWAJUj20.js → sticky-header-Dki5mPis.js} +1 -1
  284. package/dist/{sticky-header-DWAJUj20.js.map → sticky-header-Dki5mPis.js.map} +1 -1
  285. package/dist/{sub-navbar-DEudSxfj.js → sub-navbar-DkxQv0WJ.js} +4 -4
  286. package/dist/sub-navbar-DkxQv0WJ.js.map +1 -0
  287. package/dist/sub-navbar-qSNpTABT.js +120 -0
  288. package/dist/sub-navbar-qSNpTABT.js.map +1 -0
  289. package/dist/{tab-9qkzsjIT.js → tab-78y6QR5H.js} +1 -1
  290. package/dist/{tab-9qkzsjIT.js.map → tab-78y6QR5H.js.map} +1 -1
  291. package/dist/{tabs-CpaYfphj.js → tabs-UA0wAjuH.js} +1 -1
  292. package/dist/{tabs-CpaYfphj.js.map → tabs-UA0wAjuH.js.map} +1 -1
  293. package/dist/{tabs-list-UDrgmCSx.js → tabs-list-BykXXSuq.js} +1 -1
  294. package/dist/{tabs-list-UDrgmCSx.js.map → tabs-list-BykXXSuq.js.map} +1 -1
  295. package/dist/{tabs-panel-DeVzvQQw.js → tabs-panel-B8knWcZY.js} +1 -1
  296. package/dist/{tabs-panel-DeVzvQQw.js.map → tabs-panel-B8knWcZY.js.map} +1 -1
  297. package/dist/{textarea-C580HmQX.js → textarea-DUqVsdL4.js} +1 -1
  298. package/dist/{textarea-C580HmQX.js.map → textarea-DUqVsdL4.js.map} +1 -1
  299. package/dist/{textfield-D9Ssbb43.js → textfield-Di-19dz-.js} +5 -3
  300. package/dist/{textfield-D9Ssbb43.js.map → textfield-Di-19dz-.js.map} +1 -1
  301. package/dist/{types-Mj1poXVf.d.ts → types-BiKqUD4X.d.ts} +1 -1
  302. package/dist/{types-DC-FPmDA.d.ts → types-BiXTaZLc.d.ts} +1 -1
  303. package/dist/types.d.ts +1 -1
  304. package/dist/{useCheckboxGroup-rTVawmvi.js → useCheckboxGroup-BDH3ewt8.js} +1 -1
  305. package/dist/{useCheckboxGroup-rTVawmvi.js.map → useCheckboxGroup-BDH3ewt8.js.map} +1 -1
  306. package/dist/{useCheckboxGroup-DRhqch1m.d.ts → useCheckboxGroup-DyHY-wHm.d.ts} +1 -1
  307. package/dist/useIsElementAboveViewport-V1lc14eB.d.ts +8 -0
  308. package/dist/{useElementScrolledPastObserver-DjzJ4Mn-.js → useIsElementAboveViewport-lmdnXDdc.js} +6 -6
  309. package/dist/useIsElementAboveViewport-lmdnXDdc.js.map +1 -0
  310. package/dist/{useIsomorphicLayoutEffect-BMdz-mee.d.ts → useIsomorphicLayoutEffect-BtM0-_Y8.d.ts} +1 -1
  311. package/dist/{useIsomorphicLayoutEffect-B5btmYlF.js → useIsomorphicLayoutEffect-odKYwQAV.js} +1 -1
  312. package/dist/{useIsomorphicLayoutEffect-B5btmYlF.js.map → useIsomorphicLayoutEffect-odKYwQAV.js.map} +1 -1
  313. package/dist/useMediaQuery-B2wgHq1a.d.ts +32 -0
  314. package/dist/useMediaQuery-ICPWsO_p.js +44 -0
  315. package/dist/useMediaQuery-ICPWsO_p.js.map +1 -0
  316. package/dist/{useMergeRefs-CcJMoo46.js → useMergeRefs-DC710CHX.js} +1 -1
  317. package/dist/{useMergeRefs-CcJMoo46.js.map → useMergeRefs-DC710CHX.js.map} +1 -1
  318. package/dist/{usePagination-DNqO-ob2.js → usePagination-DQR72JNE.js} +1 -1
  319. package/dist/{usePagination-DNqO-ob2.js.map → usePagination-DQR72JNE.js.map} +1 -1
  320. package/dist/{useScrollDirection-BLgp51hx.js → useScrollDirection-C2EmQi0U.js} +1 -1
  321. package/dist/{useScrollDirection-BLgp51hx.js.map → useScrollDirection-C2EmQi0U.js.map} +1 -1
  322. package/dist/useScrollDirection-CDsglrZR.d.ts +11 -0
  323. package/dist/utilities/hooks/index.d.ts +16 -15
  324. package/dist/utilities/hooks/index.js +8 -6
  325. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts +1 -1
  326. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.js +1 -1
  327. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.ts +2 -0
  328. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.js +3 -0
  329. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +1 -1
  330. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
  331. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.ts +2 -0
  332. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.js +4 -0
  333. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.d.ts +11 -2
  334. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.js +1 -1
  335. package/dist/utilities/hooks/usePagination/usePagination.d.ts +15 -14
  336. package/dist/utilities/hooks/usePagination/usePagination.js +1 -1
  337. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.ts +2 -11
  338. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.js +1 -1
  339. package/dist/utilities/index.d.ts +16 -15
  340. package/dist/utilities/index.js +9 -7
  341. package/dist/utilities/types.d.ts +1 -1
  342. package/dist/{validation-message-6AQTIup_.js → validation-message-C3CmzFMz.js} +1 -1
  343. package/dist/{validation-message-6AQTIup_.js.map → validation-message-C3CmzFMz.js.map} +1 -1
  344. package/dist/vanilla/dropdown/index.d.ts +1 -1
  345. package/dist/vanilla/dropdown/index.js +2 -2
  346. package/dist/vanilla/index.d.ts +4 -3
  347. package/dist/vanilla/index.js +4 -3
  348. package/dist/vanilla/popover/index.d.ts +1 -1
  349. package/dist/vanilla/popover/index.js +1 -1
  350. package/dist/vanilla/sub-navbar/index.d.ts +2 -0
  351. package/dist/vanilla/sub-navbar/index.js +3 -0
  352. package/package.json +4 -4
  353. package/dist/checkbox-CXVZj5Vv.js.map +0 -1
  354. package/dist/dialog-WgEtFqJD.js.map +0 -1
  355. package/dist/dropdown-D-dX5PAl.js +0 -15
  356. package/dist/dropdown-trigger-context-BpYBk_xf.js.map +0 -1
  357. package/dist/dropdown-trigger-context-D0QMaRYY.d.ts +0 -29
  358. package/dist/popover-CGvBn3q9.js.map +0 -1
  359. package/dist/popover-COi7S9pJ.js.map +0 -1
  360. package/dist/popover-trigger-context-CGJlUS_N.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/{link-CKJeUW0o.js → link-oWcjwJYP.js} +0 -0
  377. /package/dist/{logo-CIDSfhf9.js → logo-Dx-VZMJu.js} +0 -0
  378. /package/dist/{navbar-BuFLsqCZ.js → navbar-CgY7xCrh.js} +0 -0
  379. /package/dist/{pagination-DUyQRuUE.js → pagination-DP8yM-lj.js} +0 -0
  380. /package/dist/{popover-C4QdJkKG.js → popover-Ch_2ehYy.js} +0 -0
  381. /package/dist/{radio-Uyx2D7dl.js → radio-CqUVAF9T.js} +0 -0
  382. /package/dist/{search-VYIc3wFh.js → search-DPfMkuMX.js} +0 -0
  383. /package/dist/{select-D1X9tdeH.js → select-COon86Fr.js} +0 -0
  384. /package/dist/{skip-link-CGmg3TAi.js → skip-link-Cl5tUnjp.js} +0 -0
  385. /package/dist/{sticky-header-CII-Yy5M.js → sticky-header-B1bz37dV.js} +0 -0
  386. /package/dist/{tabs-CYBqn2Kj.js → tabs-Gam5A0Jd.js} +0 -0
  387. /package/dist/{textarea-D37K5D86.js → textarea-SnVkE05Y.js} +0 -0
  388. /package/dist/{textfield-CWoUw1b2.js → textfield-vutZ4Ch8.js} +0 -0
  389. /package/dist/{utilities-JoKvbhOy.js → utilities-CScrp2iY.js} +0 -0
  390. /package/dist/{validation-message-B4lI2a0K.js → validation-message-CtPYa33u.js} +0 -0
@@ -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"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime51 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime53 from "react/jsx-runtime";
2
2
  import { HTMLAttributes, Ref } from "react";
3
3
 
4
4
  //#region src/components/pagination/pagination-item.d.ts
@@ -15,7 +15,7 @@ declare const PaginationItem: ({
15
15
  asChild,
16
16
  children,
17
17
  ...rest
18
- }: PaginationItemProps) => react_jsx_runtime51.JSX.Element;
18
+ }: PaginationItemProps) => react_jsx_runtime53.JSX.Element;
19
19
  //#endregion
20
20
  export { PaginationItem, PaginationItemProps };
21
- //# sourceMappingURL=pagination-item-CEfdaSuS.d.ts.map
21
+ //# sourceMappingURL=pagination-item-mKQyvHV9.d.ts.map
@@ -1,14 +1,13 @@
1
- import { useMergeRefs } from "./useMergeRefs-CcJMoo46.js";
2
- import { Context } from "./popover-trigger-context-CGJlUS_N.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
- const padding = 20;
12
11
  /**
13
12
  * Popover component, used to display content in a popover over an element.
14
13
  *
@@ -26,7 +25,7 @@ const padding = 20;
26
25
  * Content
27
26
  * </Popover>
28
27
  */
29
- const Popover = ({ id, className, onOpenChange, open, placement = "top", disableAutoPlacement = false, positionMiddleware = [], dark = false, asChild = false, ref,...rest }) => {
28
+ const Popover = ({ id, className, onOpenChange, open, placement = "top", disableAutoPlacement = false, positionMiddleware = [], padding = 20, dark = false, asChild = false, ref,...rest }) => {
30
29
  const Component = asChild ? Slot : "div";
31
30
  const popoverRef = useRef(null);
32
31
  const isControlled = useRef(open !== void 0);
@@ -87,7 +86,8 @@ const Popover = ({ id, className, onOpenChange, open, placement = "top", disable
87
86
  placement,
88
87
  id,
89
88
  disableAutoPlacement,
90
- positionMiddleware
89
+ positionMiddleware,
90
+ padding
91
91
  ]);
92
92
  useEffect(() => {
93
93
  if (id) setPopoverId?.(id);
@@ -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-CGvBn3q9.js.map
107
+ //# sourceMappingURL=popover-DmA4qMtu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-DmA4qMtu.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\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 * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\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 padding = 20,\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, padding]);\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,MAAa,UAAU,CAAC,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,CAAE,GACvB,UAAU,IACV,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;EAAoB;CAAQ,EAAC;AAG9E,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,8 +1,12 @@
1
1
  import { autoUpdate, computePosition, flip, hide, offset, shift } from "@floating-ui/dom";
2
2
 
3
3
  //#region src/vanilla/popover/index.ts
4
- const padding = 20;
5
- const initPopover = ({ id, disableAutoPlacement = false, placement = "top", positionMiddleware = [] }) => {
4
+ /**
5
+ * Initializes the popover.
6
+ * @param options - InitPopoverOptions
7
+ * @returns A function to programmatically toggle the popover.
8
+ */
9
+ const initPopover = ({ id, disableAutoPlacement = false, placement = "top", positionMiddleware = [], padding = 20 }) => {
6
10
  let cleanup;
7
11
  const popover = document.getElementById(id);
8
12
  const triggerSelector = `[aria-controls="${id}"]`;
@@ -41,8 +45,9 @@ const initPopover = ({ id, disableAutoPlacement = false, placement = "top", posi
41
45
  if (isTrigger) togglePopover(!isOpen);
42
46
  if (isOutside && isOpen) togglePopover(false);
43
47
  }, true);
48
+ return togglePopover;
44
49
  };
45
50
 
46
51
  //#endregion
47
52
  export { initPopover };
48
- //# sourceMappingURL=popover-COi7S9pJ.js.map
53
+ //# sourceMappingURL=popover-MUiGENkr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-MUiGENkr.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\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 * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\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 padding = 20,\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":";;;;;;;;AAiDA,MAAa,cAAc,CAAC,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,CAAE,GACvB,UAAU,IACS,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,5 +1,5 @@
1
1
  import { Button } from "./button-fhd-JARc.js";
2
- import { Context } from "./popover-trigger-context-CGJlUS_N.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-BLnIukvY.js.map
46
+ //# sourceMappingURL=popover-trigger-Chi8uvRM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-BLnIukvY.js","names":[],"sources":["../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,iBAAiB,CAAC,EAAE,IAAI,QAAQ,SAAS,IAAK,GAAG,MAA2B,KAAK;CAC5F,MAAM,EAAE,WAAW,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAC/D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,SAAS,MAAM,iBAAiB,CAAC,UAAU,KAAK;EAChD,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,SACjB,IACD,CAAE;CACP,GACD,KACD;AAED,wBAAO,IAAC;EAAe;EAAK,GAAI;GAAgB;AACjD"}
1
+ {"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"}
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { createContext, useId, useState } from "react";
3
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
3
4
 
4
5
  //#region src/components/popover/popover-trigger-context.tsx
5
6
  const Context = createContext({});
@@ -14,10 +15,15 @@ const Context = createContext({});
14
15
  * </Popover>
15
16
  * </PopoverTriggerContext>
16
17
  */
17
- const PopoverTriggerContext = ({ children }) => {
18
+ const PopoverTriggerContext = ({ children, open, onOpenChange }) => {
18
19
  const randomPopoverId = useId();
19
20
  const [popoverId, setPopoverId] = useState(randomPopoverId);
20
- const [popoverOpen, setPopoverOpen] = useState(false);
21
+ const [popoverOpen, setPopoverOpen] = useControllableState({
22
+ prop: open,
23
+ onChange: onOpenChange,
24
+ defaultProp: false,
25
+ caller: "PopoverTriggerContext"
26
+ });
21
27
  return /* @__PURE__ */ jsx(Context, {
22
28
  value: {
23
29
  popoverId,
@@ -31,4 +37,4 @@ const PopoverTriggerContext = ({ children }) => {
31
37
 
32
38
  //#endregion
33
39
  export { Context, PopoverTriggerContext };
34
- //# sourceMappingURL=popover-trigger-context-CGJlUS_N.js.map
40
+ //# sourceMappingURL=popover-trigger-context-Cre9Mczn.js.map
@@ -0,0 +1 @@
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"}
@@ -1,9 +1,9 @@
1
- import * as react_jsx_runtime54 from "react/jsx-runtime";
2
- import * as react53 from "react";
1
+ import * as react_jsx_runtime56 from "react/jsx-runtime";
2
+ import * as react55 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/components/popover/popover-trigger-context.d.ts
6
- declare const Context: react53.Context<{
6
+ declare const Context: react55.Context<{
7
7
  popoverId?: string;
8
8
  setPopoverId?: (id: string) => void;
9
9
  popoverOpen?: boolean;
@@ -11,6 +11,16 @@ declare const Context: react53.Context<{
11
11
  }>;
12
12
  type PopoverTriggerContextProps = {
13
13
  children: ReactNode;
14
+ /**
15
+ * When a boolean is provided, the popover will be controlled.
16
+ * @default undefined
17
+ */
18
+ open?: boolean;
19
+ /**
20
+ * Callback when the open state changes.
21
+ * @param open - The new open state of the popover.
22
+ */
23
+ onOpenChange?: (open: boolean) => void;
14
24
  };
15
25
  /**
16
26
  * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.
@@ -24,8 +34,10 @@ type PopoverTriggerContextProps = {
24
34
  * </PopoverTriggerContext>
25
35
  */
26
36
  declare const PopoverTriggerContext: ({
27
- children
28
- }: PopoverTriggerContextProps) => react_jsx_runtime54.JSX.Element;
37
+ children,
38
+ open,
39
+ onOpenChange
40
+ }: PopoverTriggerContextProps) => react_jsx_runtime56.JSX.Element;
29
41
  //#endregion
30
42
  export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
31
- //# sourceMappingURL=popover-trigger-context-CQKQbCmr.d.ts.map
43
+ //# sourceMappingURL=popover-trigger-context-D6z-_uL5.d.ts.map
@@ -22,6 +22,7 @@ const Radio = ({ dark, label, description, error, fullwidth, style, className, r
22
22
  ref,
23
23
  "aria-invalid": error || void 0,
24
24
  "aria-describedby": ariaDescribedBy,
25
+ dark,
25
26
  ...props
26
27
  }),
27
28
  label && /* @__PURE__ */ jsx(Label, {
@@ -41,4 +42,4 @@ const Radio = ({ dark, label, description, error, fullwidth, style, className, r
41
42
 
42
43
  //#endregion
43
44
  export { Radio };
44
- //# sourceMappingURL=radio-ulWuU7RE.js.map
45
+ //# sourceMappingURL=radio-DAC5mhl3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-ulWuU7RE.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 {...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;IAClB,GAAI;KACJ;GACD,yBACC,IAAC;IAAM,QAAO;IAAS,SAAS;IAAI;8BAClC,IAAC,oBAAM,QAAa;KACd;GAET,+BAGC,IAAC;IAAiB,eAAY;IAAO,IAAI;cACtC;KACgB;MAEf;GACF;AAEX"}
1
+ {"version":3,"file":"radio-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"}
@@ -32,6 +32,7 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
32
32
  type: "text",
33
33
  ref,
34
34
  size,
35
+ dark,
35
36
  ...props
36
37
  }),
37
38
  /* @__PURE__ */ jsx(FieldAffix, {
@@ -56,4 +57,4 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
56
57
 
57
58
  //#endregion
58
59
  export { Search };
59
- //# sourceMappingURL=search-Cqnboh3z.js.map
60
+ //# sourceMappingURL=search-DRgmqncD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-Cqnboh3z.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} {...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;KAAM,GAAI;MAAS;oBACtD,IAAC;KAAW,eAAY;+BACtB,IAAC;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;gCACnF,IAAC;OAAuB;OAAM,eAAY;QAAS;OAC5C;MACE;OACA;IACV;GACD;AAEX"}
1
+ {"version":3,"file":"search-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,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"}