@chassis-ui/react 0.2.0 → 0.4.0

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 (777) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +56 -23
  3. package/dist/accordion.js +1 -1
  4. package/dist/alert.d.ts +2 -0
  5. package/dist/alert.js +1 -0
  6. package/dist/autocomplete.d.ts +1 -1
  7. package/dist/autocomplete.js +1 -1
  8. package/dist/avatar.d.ts +1 -1
  9. package/dist/avatar.js +1 -1
  10. package/dist/badge.d.ts +1 -1
  11. package/dist/badge.js +1 -1
  12. package/dist/breadcrumb.js +1 -1
  13. package/dist/button-group.d.ts +1 -1
  14. package/dist/button-group.js +1 -1
  15. package/dist/button.d.ts +1 -1
  16. package/dist/button.js +1 -1
  17. package/dist/calendar.d.ts +1 -1
  18. package/dist/calendar.js +1 -1
  19. package/dist/card.d.ts +1 -1
  20. package/dist/card.js +1 -1
  21. package/dist/carousel.d.ts +1 -1
  22. package/dist/carousel.js +1 -1
  23. package/dist/checkbox.d.ts +2 -2
  24. package/dist/checkbox.js +1 -1
  25. package/dist/chip-input.js +1 -1
  26. package/dist/chip.d.ts +1 -1
  27. package/dist/chip.js +1 -1
  28. package/dist/chunks/Button-BoymWE-L.js +2 -0
  29. package/dist/chunks/Button-BoymWE-L.js.map +1 -0
  30. package/dist/chunks/{Button-Cptd4Yk7.d.ts → Button-BuZ_GOHS.d.ts} +3 -2
  31. package/dist/chunks/Chip-DCaWaBqo.js +2 -0
  32. package/dist/chunks/Chip-DCaWaBqo.js.map +1 -0
  33. package/dist/chunks/CloseButton-DPgQztE0.js +2 -0
  34. package/dist/chunks/CloseButton-DPgQztE0.js.map +1 -0
  35. package/dist/chunks/ComboboxItem-C9TpoJOI.d.ts +2 -1
  36. package/dist/chunks/ComboboxListBox-Cm3L1ULl.js +2 -0
  37. package/dist/chunks/ComboboxListBox-Cm3L1ULl.js.map +1 -0
  38. package/dist/chunks/DateSegment-2agXAd0f.js +2 -0
  39. package/dist/chunks/DateSegment-2agXAd0f.js.map +1 -0
  40. package/dist/chunks/{FormHelp-Be2PQL0y.js → FormHelp-AE6_iSLJ.js} +2 -1
  41. package/dist/chunks/FormHelp-AE6_iSLJ.js.map +1 -0
  42. package/dist/chunks/FormLabel-CYcQiFUI.js +2 -1
  43. package/dist/chunks/FormLabel-CYcQiFUI.js.map +1 -0
  44. package/dist/chunks/Icon-CioraWLF.d.ts +2 -1
  45. package/dist/chunks/Icon-DLB1f88W.js +2 -0
  46. package/dist/chunks/Icon-DLB1f88W.js.map +1 -0
  47. package/dist/chunks/{Link-B0Y1xgYi.d.ts → Link-CKymd2ru.d.ts} +8 -6
  48. package/dist/chunks/Link-CZsWCnQb.js +2 -0
  49. package/dist/chunks/Link-CZsWCnQb.js.map +1 -0
  50. package/dist/chunks/Menu-CSBg2Zmc.js +2 -0
  51. package/dist/chunks/Menu-CSBg2Zmc.js.map +1 -0
  52. package/dist/chunks/Menu-QeYOzrUL.d.ts +95 -0
  53. package/dist/chunks/MenuItemDef-D0VDtYIQ.d.ts +2 -1
  54. package/dist/chunks/MenuToggle-BdQtF7FV.js +2 -0
  55. package/dist/chunks/MenuToggle-BdQtF7FV.js.map +1 -0
  56. package/dist/chunks/Portal-CgeR1WXV.js +2 -0
  57. package/dist/chunks/Portal-CgeR1WXV.js.map +1 -0
  58. package/dist/chunks/RangeCalendar-BJl-j4W2.js +2 -0
  59. package/dist/chunks/RangeCalendar-BJl-j4W2.js.map +1 -0
  60. package/dist/chunks/VisuallyHidden-C2dM7HhC.js +2 -0
  61. package/dist/chunks/VisuallyHidden-C2dM7HhC.js.map +1 -0
  62. package/dist/chunks/accordion-B8UWyvQB.js +2 -0
  63. package/dist/chunks/accordion-B8UWyvQB.js.map +1 -0
  64. package/dist/chunks/alert-BXI-_qlt.js +2 -0
  65. package/dist/chunks/alert-BXI-_qlt.js.map +1 -0
  66. package/dist/chunks/autocomplete-Baf9VSHN.js +2 -0
  67. package/dist/chunks/autocomplete-Baf9VSHN.js.map +1 -0
  68. package/dist/chunks/avatar-S3dGy6Qc.js +2 -0
  69. package/dist/chunks/avatar-S3dGy6Qc.js.map +1 -0
  70. package/dist/chunks/{badge-Bj8mf8lu.js → badge-D2oztCvs.js} +2 -1
  71. package/dist/chunks/badge-D2oztCvs.js.map +1 -0
  72. package/dist/chunks/{breadcrumb-DDxnx_iS.js → breadcrumb-s6J9itez.js} +2 -1
  73. package/dist/chunks/breadcrumb-s6J9itez.js.map +1 -0
  74. package/dist/chunks/breakpoints-CGk8szzR.js +2 -0
  75. package/dist/chunks/breakpoints-CGk8szzR.js.map +1 -0
  76. package/dist/chunks/breakpoints-ECy4lKQT.d.ts +6 -0
  77. package/dist/chunks/button-group-BGppPrIv.js +2 -0
  78. package/dist/chunks/button-group-BGppPrIv.js.map +1 -0
  79. package/dist/chunks/card-CobeDpf1.js +2 -0
  80. package/dist/chunks/card-CobeDpf1.js.map +1 -0
  81. package/dist/chunks/carousel-fTVPqnSV.js +2 -0
  82. package/dist/chunks/carousel-fTVPqnSV.js.map +1 -0
  83. package/dist/chunks/checkbox-ZyQn5Ku5.js +2 -0
  84. package/dist/chunks/checkbox-ZyQn5Ku5.js.map +1 -0
  85. package/dist/chunks/chip-input-BpVDRERg.js +2 -0
  86. package/dist/chunks/chip-input-BpVDRERg.js.map +1 -0
  87. package/dist/chunks/collapse--Go2Y73B.js +2 -0
  88. package/dist/chunks/collapse--Go2Y73B.js.map +1 -0
  89. package/dist/chunks/{color-input-CyRaLR_G.js → color-input-Bwl5ef5B.js} +2 -1
  90. package/dist/chunks/color-input-Bwl5ef5B.js.map +1 -0
  91. package/dist/chunks/combobox-Bp1tIaiW.js +2 -0
  92. package/dist/chunks/combobox-Bp1tIaiW.js.map +1 -0
  93. package/dist/chunks/context-menu-B4a0tS-h.js +2 -0
  94. package/dist/chunks/context-menu-B4a0tS-h.js.map +1 -0
  95. package/dist/chunks/datagrid-CH3Cy-q7.js +3 -0
  96. package/dist/chunks/datagrid-CH3Cy-q7.js.map +1 -0
  97. package/dist/chunks/dateRangePresets-R1FtA1zp.d.ts +2 -1
  98. package/dist/chunks/datepicker-bOiM_zhJ.js +2 -0
  99. package/dist/chunks/datepicker-bOiM_zhJ.js.map +1 -0
  100. package/dist/chunks/dialogTransition-i9vw0i2Z.js +2 -1
  101. package/dist/chunks/dialogTransition-i9vw0i2Z.js.map +1 -0
  102. package/dist/chunks/direction-LN6uwsK5.js +2 -0
  103. package/dist/chunks/direction-LN6uwsK5.js.map +1 -0
  104. package/dist/chunks/divider-CjbF4OfA.js +2 -0
  105. package/dist/chunks/divider-CjbF4OfA.js.map +1 -0
  106. package/dist/chunks/drawer-C7Tz4XU_.js +2 -0
  107. package/dist/chunks/drawer-C7Tz4XU_.js.map +1 -0
  108. package/dist/chunks/{file-input-RRqZSzjH.js → file-input-CDM6qrmV.js} +2 -1
  109. package/dist/chunks/file-input-CDM6qrmV.js.map +1 -0
  110. package/dist/chunks/flex-B52oLCCC.js +2 -0
  111. package/dist/chunks/flex-B52oLCCC.js.map +1 -0
  112. package/dist/chunks/floating-input-DmSZZc27.js +2 -0
  113. package/dist/chunks/floating-input-DmSZZc27.js.map +1 -0
  114. package/dist/chunks/focus-ring-SR_LwaN7.js +2 -1
  115. package/dist/chunks/focus-ring-SR_LwaN7.js.map +1 -0
  116. package/dist/chunks/focusRedirect-BrvK3U_o.js +2 -1
  117. package/dist/chunks/focusRedirect-BrvK3U_o.js.map +1 -0
  118. package/dist/chunks/form-GpdAyWWi.js +2 -1
  119. package/dist/chunks/form-GpdAyWWi.js.map +1 -0
  120. package/dist/chunks/form-field-CNPGTMiW.js +2 -0
  121. package/dist/chunks/form-field-CNPGTMiW.js.map +1 -0
  122. package/dist/chunks/grid-C7tO-ppc.js +2 -0
  123. package/dist/chunks/grid-C7tO-ppc.js.map +1 -0
  124. package/dist/chunks/{icon-mxYpL5nL.js → icon-BQsT6YtE.js} +2 -1
  125. package/dist/chunks/icon-BQsT6YtE.js.map +1 -0
  126. package/dist/chunks/{iconConfig-Bu6Pt9o3.d.ts → iconConfig-C6gbYhsD.d.ts} +5 -3
  127. package/dist/chunks/iconSlot-BNu2MrFI.js +2 -0
  128. package/dist/chunks/iconSlot-BNu2MrFI.js.map +1 -0
  129. package/dist/chunks/{index-BKMW0rkw.d.ts → index-0jbACjYQ.d.ts} +5 -3
  130. package/dist/chunks/{index-BO_1MN66.d.ts → index-4cKG9KWB.d.ts} +3 -5
  131. package/dist/chunks/index-6uob77s9.d.ts +2 -1
  132. package/dist/chunks/{index-tOodmT36.d.ts → index-91YA-jkp.d.ts} +4 -6
  133. package/dist/chunks/index-9rQeMqVI.d.ts +42 -0
  134. package/dist/chunks/index-B0-8n-Gs.d.ts +2 -1
  135. package/dist/chunks/{index-D9PZHY_I.d.ts → index-B19ZH3fm.d.ts} +3 -2
  136. package/dist/chunks/{index-COsIPd8L.d.ts → index-B1kw0jzM.d.ts} +3 -2
  137. package/dist/chunks/index-B2K-O9kl.d.ts +59 -0
  138. package/dist/chunks/{index-CJzKu7QI.d.ts → index-B5bF1JxF.d.ts} +3 -2
  139. package/dist/chunks/index-B8uaSJA9.d.ts +2 -1
  140. package/dist/chunks/index-BA-raEMm.d.ts +2 -1
  141. package/dist/chunks/{index-C61tPIJ-.d.ts → index-BAsbRx5n.d.ts} +6 -2
  142. package/dist/chunks/index-BF3OWUVc.d.ts +66 -0
  143. package/dist/chunks/{index-Ctuk1xBU.d.ts → index-BLS1jhSJ.d.ts} +10 -7
  144. package/dist/chunks/{index-JllMXhVx.d.ts → index-BMkbJVHg.d.ts} +22 -5
  145. package/dist/chunks/{index-DB_ToPdz.d.ts → index-BNf0jIIL.d.ts} +12 -1
  146. package/dist/chunks/{index-t_x6jj7l.d.ts → index-BOx8v-oT.d.ts} +3 -2
  147. package/dist/chunks/index-BSLneLYu.d.ts +79 -0
  148. package/dist/chunks/index-BVGGIaPX.d.ts +2 -1
  149. package/dist/chunks/{index-qgZ5VGmc.d.ts → index-B_UzbGOa.d.ts} +20 -2
  150. package/dist/chunks/{index-XjLvaH4G.d.ts → index-BfEJYF4c.d.ts} +7 -6
  151. package/dist/chunks/index-Bi8FFadV.d.ts +2 -1
  152. package/dist/chunks/index-Bkj17NEQ.d.ts +2 -1
  153. package/dist/chunks/{index--0_IpTDT.d.ts → index-BxROljJI.d.ts} +3 -2
  154. package/dist/chunks/index-Bz8MDq0H.d.ts +85 -0
  155. package/dist/chunks/{index-Cf2n0l0U.d.ts → index-C4Dks__B.d.ts} +3 -2
  156. package/dist/chunks/{index-CRfm7W6C.d.ts → index-C9gzVqwX.d.ts} +3 -2
  157. package/dist/chunks/index-CCXJXToc.d.ts +2 -1
  158. package/dist/chunks/{index-COsYSDrz.d.ts → index-CFnQubsV.d.ts} +17 -3
  159. package/dist/chunks/{index-8PhBSbNQ.d.ts → index-CHQR8x8_.d.ts} +16 -17
  160. package/dist/chunks/{index-BTTeKpiE.d.ts → index-CIwzgZJi.d.ts} +3 -2
  161. package/dist/chunks/{index-dh3TKanY.d.ts → index-CTpwB1yR.d.ts} +3 -2
  162. package/dist/chunks/{index-DR8sYtvd.d.ts → index-CYvVmTPR.d.ts} +20 -87
  163. package/dist/chunks/{index-Dum6Y9XR.d.ts → index-Cc4SSslb.d.ts} +20 -2
  164. package/dist/chunks/index-CftERHnE.d.ts +2 -1
  165. package/dist/chunks/{index-CaQ1JY5D.d.ts → index-Ci7AEgEc.d.ts} +4 -6
  166. package/dist/chunks/{index-DKma0jQw.d.ts → index-CjT_4IZx.d.ts} +4 -3
  167. package/dist/chunks/{index-BxTlIaZu.d.ts → index-CqZ68Z8R.d.ts} +125 -11
  168. package/dist/chunks/{index-D2VVO8rx.d.ts → index-CsARGAzD.d.ts} +3 -2
  169. package/dist/chunks/index-CxjNw4ss.d.ts +216 -0
  170. package/dist/chunks/index-DAoPg59I.d.ts +2 -1
  171. package/dist/chunks/index-DHGgezXU.d.ts +2 -1
  172. package/dist/chunks/index-DHOG_rjE.d.ts +121 -0
  173. package/dist/chunks/index-DHcztR18.d.ts +208 -0
  174. package/dist/chunks/index-DJfga0Ce.d.ts +57 -0
  175. package/dist/chunks/{index-DJJocp_q.d.ts → index-DM01FX3a.d.ts} +4 -3
  176. package/dist/chunks/index-DMbdEm__.d.ts +119 -0
  177. package/dist/chunks/{index-BlgkO3dn.d.ts → index-DP5xugE-.d.ts} +25 -34
  178. package/dist/chunks/index-DPCwFiJL.d.ts +95 -0
  179. package/dist/chunks/{index-BTDgfLxK.d.ts → index-DQImhbhy.d.ts} +21 -5
  180. package/dist/chunks/index-DaHQdNul.d.ts +182 -0
  181. package/dist/chunks/index-Dcc_W6Kv.d.ts +2 -1
  182. package/dist/chunks/index-Ddd7iWfm.d.ts +32 -0
  183. package/dist/chunks/index-Dfg4Ftb8.d.ts +2 -1
  184. package/dist/chunks/index-DtbUXxjz.d.ts +2 -1
  185. package/dist/chunks/{index-DPV62IdF.d.ts → index-DtvHH_Mb.d.ts} +12 -10
  186. package/dist/chunks/index-Du9fBqkT.d.ts +56 -0
  187. package/dist/chunks/index-HrKN6s8z.d.ts +2 -1
  188. package/dist/chunks/{index-ClT3E_hv.d.ts → index-NGgDkhyn.d.ts} +19 -25
  189. package/dist/chunks/{index-Dfy1YW5j.d.ts → index-U27Ar174.d.ts} +3 -2
  190. package/dist/chunks/{index-CsMIgBsd.d.ts → index-YJ9QdBuq.d.ts} +10 -10
  191. package/dist/chunks/{index-Dh5CaHTP.d.ts → index-aRdgpeRb.d.ts} +3 -2
  192. package/dist/chunks/index-g74gO0pc.d.ts +36 -0
  193. package/dist/chunks/{index-BO9jLOIb.d.ts → index-lSPcxiii.d.ts} +3 -2
  194. package/dist/chunks/{index-nklPDKlC.d.ts → index-x0vZRyoU.d.ts} +4 -3
  195. package/dist/chunks/{input-adorn-C_EHML68.js → input-adorn-DwdX-jxA.js} +2 -1
  196. package/dist/chunks/input-adorn-DwdX-jxA.js.map +1 -0
  197. package/dist/chunks/{input-group-iI7azfvE.js → input-group-Cuiuf4Dl.js} +2 -1
  198. package/dist/chunks/input-group-Cuiuf4Dl.js.map +1 -0
  199. package/dist/chunks/lazyElement-tfMG21pZ.js +2 -0
  200. package/dist/chunks/lazyElement-tfMG21pZ.js.map +1 -0
  201. package/dist/chunks/list-BQCkwWjF.js +2 -0
  202. package/dist/chunks/list-BQCkwWjF.js.map +1 -0
  203. package/dist/chunks/menu-98EAD9nj.js +2 -0
  204. package/dist/chunks/menu-98EAD9nj.js.map +1 -0
  205. package/dist/chunks/modal-bgDR29Jh.js +2 -0
  206. package/dist/chunks/modal-bgDR29Jh.js.map +1 -0
  207. package/dist/chunks/nav-TiZuTHC6.js +2 -0
  208. package/dist/chunks/nav-TiZuTHC6.js.map +1 -0
  209. package/dist/chunks/nav-overflow-Ay5mM5Gc.js +2 -0
  210. package/dist/chunks/nav-overflow-Ay5mM5Gc.js.map +1 -0
  211. package/dist/chunks/navOverflow-B5krZe6D.js +2 -0
  212. package/dist/chunks/navOverflow-B5krZe6D.js.map +1 -0
  213. package/dist/chunks/navVariant-CnD21GBS.d.ts +5 -0
  214. package/dist/chunks/navVariant-DeGTk9B7.js +2 -0
  215. package/dist/chunks/navVariant-DeGTk9B7.js.map +1 -0
  216. package/dist/chunks/navbar-DxIwt0sc.js +2 -0
  217. package/dist/chunks/navbar-DxIwt0sc.js.map +1 -0
  218. package/dist/chunks/notification-Dbci5Ka3.js +2 -0
  219. package/dist/chunks/notification-Dbci5Ka3.js.map +1 -0
  220. package/dist/chunks/number-field-IBIX2IWH.js +2 -0
  221. package/dist/chunks/number-field-IBIX2IWH.js.map +1 -0
  222. package/dist/chunks/otp-input-ws393uPB.js +2 -0
  223. package/dist/chunks/otp-input-ws393uPB.js.map +1 -0
  224. package/dist/chunks/overlayPlacement-BtS90IVf.js +2 -1
  225. package/dist/chunks/overlayPlacement-BtS90IVf.js.map +1 -0
  226. package/dist/chunks/{overlayPlacement-B7843a-Q.d.ts → overlayPlacement-CIsLpycT.d.ts} +3 -2
  227. package/dist/chunks/pagination-BkOquk-x.js +2 -0
  228. package/dist/chunks/pagination-BkOquk-x.js.map +1 -0
  229. package/dist/chunks/password-strength-DDK8pHRq.js +2 -0
  230. package/dist/chunks/password-strength-DDK8pHRq.js.map +1 -0
  231. package/dist/chunks/placeholder-BCr83sUn.js +2 -0
  232. package/dist/chunks/placeholder-BCr83sUn.js.map +1 -0
  233. package/dist/chunks/polymorphic-BhGNZQja.js +2 -0
  234. package/dist/chunks/polymorphic-BhGNZQja.js.map +1 -0
  235. package/dist/chunks/polymorphic-CVHbTHSN.d.ts +2 -1
  236. package/dist/chunks/popover-Bdg8D4sm.js +2 -0
  237. package/dist/chunks/popover-Bdg8D4sm.js.map +1 -0
  238. package/dist/chunks/{progress-DlrZ71aV.js → progress-zWkTltor.js} +2 -1
  239. package/dist/chunks/progress-zWkTltor.js.map +1 -0
  240. package/dist/chunks/radio-B6gJdtoN.js +2 -0
  241. package/dist/chunks/radio-B6gJdtoN.js.map +1 -0
  242. package/dist/chunks/{range-input-BN3430j-.js → range-input-CT_8TKL7.js} +2 -1
  243. package/dist/chunks/range-input-CT_8TKL7.js.map +1 -0
  244. package/dist/chunks/renderFormCheck-DN_-V62U.js +2 -0
  245. package/dist/chunks/renderFormCheck-DN_-V62U.js.map +1 -0
  246. package/dist/chunks/{renderFormCheck-CYWG-Rbt.d.ts → renderFormCheck-nKgpa_a3.d.ts} +4 -3
  247. package/dist/chunks/renderFormField-Brkw1yA6.js +2 -0
  248. package/dist/chunks/renderFormField-Brkw1yA6.js.map +1 -0
  249. package/dist/chunks/{renderFormField-fBEny6JV.d.ts → renderFormField-ChNagAFN.d.ts} +3 -2
  250. package/dist/chunks/{renderMenuItemContent-CmqT3YUQ.js → renderMenuItemContent-DUezZrpj.js} +2 -1
  251. package/dist/chunks/renderMenuItemContent-DUezZrpj.js.map +1 -0
  252. package/dist/chunks/scrollspy-C2HmrnZ4.js +2 -0
  253. package/dist/chunks/scrollspy-C2HmrnZ4.js.map +1 -0
  254. package/dist/chunks/scrollspy-D_lPjb92.js +2 -0
  255. package/dist/chunks/scrollspy-D_lPjb92.js.map +1 -0
  256. package/dist/chunks/search-field--nDoCI_E.js +2 -0
  257. package/dist/chunks/search-field--nDoCI_E.js.map +1 -0
  258. package/dist/chunks/select-BwJIfv9f.js +2 -0
  259. package/dist/chunks/select-BwJIfv9f.js.map +1 -0
  260. package/dist/chunks/skeleton-CmZBLJwp.js +2 -0
  261. package/dist/chunks/skeleton-CmZBLJwp.js.map +1 -0
  262. package/dist/chunks/slot-CNhFZdHF.js +2 -0
  263. package/dist/chunks/slot-CNhFZdHF.js.map +1 -0
  264. package/dist/chunks/spacingClassName-DVhk8m3P.js +2 -1
  265. package/dist/chunks/spacingClassName-DVhk8m3P.js.map +1 -0
  266. package/dist/chunks/spinner-DblhvrHL.js +2 -0
  267. package/dist/chunks/spinner-DblhvrHL.js.map +1 -0
  268. package/dist/chunks/stack-DK5F53VT.js +2 -0
  269. package/dist/chunks/stack-DK5F53VT.js.map +1 -0
  270. package/dist/chunks/static-table-D0M4oc_t.js +2 -1
  271. package/dist/chunks/static-table-D0M4oc_t.js.map +1 -0
  272. package/dist/chunks/stepper-CVXMJ2yg.js +2 -0
  273. package/dist/chunks/stepper-CVXMJ2yg.js.map +1 -0
  274. package/dist/chunks/switch-C6s3LxEv.js +2 -0
  275. package/dist/chunks/switch-C6s3LxEv.js.map +1 -0
  276. package/dist/chunks/table-Cy6uEuEP.js +2 -0
  277. package/dist/chunks/table-Cy6uEuEP.js.map +1 -0
  278. package/dist/chunks/tableClassName-CZA2Bse8.js +2 -1
  279. package/dist/chunks/tableClassName-CZA2Bse8.js.map +1 -0
  280. package/dist/chunks/tabs-91T7-8qq.js +2 -0
  281. package/dist/chunks/tabs-91T7-8qq.js.map +1 -0
  282. package/dist/chunks/text-input-B4pTv6SU.js +2 -0
  283. package/dist/chunks/text-input-B4pTv6SU.js.map +1 -0
  284. package/dist/chunks/textarea-1A1nABQE.js +2 -0
  285. package/dist/chunks/textarea-1A1nABQE.js.map +1 -0
  286. package/dist/chunks/time-field-B3MA7ED_.js +2 -0
  287. package/dist/chunks/time-field-B3MA7ED_.js.map +1 -0
  288. package/dist/chunks/toast-CGHl3-oU.js +2 -0
  289. package/dist/chunks/toast-CGHl3-oU.js.map +1 -0
  290. package/dist/chunks/tooltip-Bc-u6nIW.js +2 -0
  291. package/dist/chunks/tooltip-Bc-u6nIW.js.map +1 -0
  292. package/dist/chunks/tree-Cql1veeZ.js +2 -0
  293. package/dist/chunks/tree-Cql1veeZ.js.map +1 -0
  294. package/dist/chunks/{types-CS_40Txv.d.ts → types-D6FM7bYR.d.ts} +16 -1
  295. package/dist/chunks/unhandledProps-9Kdj7WVf.js +2 -0
  296. package/dist/chunks/unhandledProps-9Kdj7WVf.js.map +1 -0
  297. package/dist/chunks/useButtonSemantics-CILM_lhi.js +2 -1
  298. package/dist/chunks/useButtonSemantics-CILM_lhi.js.map +1 -0
  299. package/dist/chunks/useControllableState-CPUJxfKW.js +2 -0
  300. package/dist/chunks/useControllableState-CPUJxfKW.js.map +1 -0
  301. package/dist/chunks/useDialogElement-CgOnJAzu.js +2 -0
  302. package/dist/chunks/useDialogElement-CgOnJAzu.js.map +1 -0
  303. package/dist/chunks/useDisabledAnchorGuard-Cz58UCXy.js +2 -1
  304. package/dist/chunks/useDisabledAnchorGuard-Cz58UCXy.js.map +1 -0
  305. package/dist/chunks/useFloatingOverlay-DLIvwx-8.js +2 -0
  306. package/dist/chunks/useFloatingOverlay-DLIvwx-8.js.map +1 -0
  307. package/dist/chunks/useForkedRef-DVEfT-KI.js +2 -1
  308. package/dist/chunks/useForkedRef-DVEfT-KI.js.map +1 -0
  309. package/dist/chunks/useFormField-BOqmBTC4.js +2 -1
  310. package/dist/chunks/useFormField-BOqmBTC4.js.map +1 -0
  311. package/dist/chunks/useIsomorphicLayoutEffect-BbqRwuqn.js +2 -1
  312. package/dist/chunks/useIsomorphicLayoutEffect-BbqRwuqn.js.map +1 -0
  313. package/dist/chunks/useOpenStateProps-DykUbnPJ.js +2 -0
  314. package/dist/chunks/useOpenStateProps-DykUbnPJ.js.map +1 -0
  315. package/dist/chunks/useToastRegionQueue-CIV5SdiE.js +2 -0
  316. package/dist/chunks/useToastRegionQueue-CIV5SdiE.js.map +1 -0
  317. package/dist/chunks/useTransitionState-e5ToY7eX.js +2 -0
  318. package/dist/chunks/useTransitionState-e5ToY7eX.js.map +1 -0
  319. package/dist/chunks/validationClassName-gRGs4KBm.js +2 -1
  320. package/dist/chunks/validationClassName-gRGs4KBm.js.map +1 -0
  321. package/dist/chunks/visibleState-B_i1zHu2.js +2 -0
  322. package/dist/chunks/visibleState-B_i1zHu2.js.map +1 -0
  323. package/dist/close-button.d.ts +1 -1
  324. package/dist/close-button.js +1 -1
  325. package/dist/collapse.js +1 -1
  326. package/dist/color-input.js +1 -1
  327. package/dist/combobox.js +1 -1
  328. package/dist/context-menu.d.ts +2 -0
  329. package/dist/context-menu.js +1 -0
  330. package/dist/datagrid.d.ts +1 -1
  331. package/dist/datagrid.js +1 -1
  332. package/dist/datepicker.d.ts +1 -1
  333. package/dist/datepicker.js +1 -1
  334. package/dist/divider.d.ts +2 -0
  335. package/dist/divider.js +1 -0
  336. package/dist/drawer.d.ts +1 -1
  337. package/dist/drawer.js +1 -1
  338. package/dist/file-input.js +1 -1
  339. package/dist/flex.d.ts +1 -1
  340. package/dist/flex.js +1 -1
  341. package/dist/floating-input.d.ts +1 -1
  342. package/dist/floating-input.js +1 -1
  343. package/dist/form-field.d.ts +1 -1
  344. package/dist/form-field.js +1 -1
  345. package/dist/form.js +1 -1
  346. package/dist/grid.d.ts +2 -2
  347. package/dist/grid.js +1 -1
  348. package/dist/icon.d.ts +2 -2
  349. package/dist/icon.js +1 -1
  350. package/dist/index.d.ts +61 -49
  351. package/dist/index.js +1 -1
  352. package/dist/input-adorn.js +1 -1
  353. package/dist/input-group.js +1 -1
  354. package/dist/link.d.ts +1 -1
  355. package/dist/link.js +1 -1
  356. package/dist/list.d.ts +1 -1
  357. package/dist/list.js +1 -1
  358. package/dist/menu.d.ts +2 -1
  359. package/dist/menu.js +1 -1
  360. package/dist/modal.d.ts +1 -1
  361. package/dist/modal.js +1 -1
  362. package/dist/nav-overflow.d.ts +2 -0
  363. package/dist/nav-overflow.js +1 -0
  364. package/dist/nav.d.ts +2 -2
  365. package/dist/nav.js +1 -1
  366. package/dist/navbar.d.ts +1 -1
  367. package/dist/navbar.js +1 -1
  368. package/dist/notification.d.ts +1 -1
  369. package/dist/notification.js +1 -1
  370. package/dist/number-field.d.ts +2 -0
  371. package/dist/number-field.js +1 -0
  372. package/dist/otp-input.js +1 -1
  373. package/dist/pagination.d.ts +1 -1
  374. package/dist/pagination.js +1 -1
  375. package/dist/password-strength.d.ts +1 -1
  376. package/dist/password-strength.js +1 -1
  377. package/dist/placeholder.d.ts +1 -1
  378. package/dist/placeholder.js +1 -1
  379. package/dist/popover.d.ts +1 -1
  380. package/dist/popover.js +1 -1
  381. package/dist/portal.d.ts +2 -0
  382. package/dist/portal.js +1 -0
  383. package/dist/progress.d.ts +1 -1
  384. package/dist/progress.js +1 -1
  385. package/dist/radio.d.ts +1 -1
  386. package/dist/radio.js +1 -1
  387. package/dist/range-input.js +1 -1
  388. package/dist/scrollspy.d.ts +2 -0
  389. package/dist/scrollspy.js +1 -0
  390. package/dist/search-field.d.ts +2 -0
  391. package/dist/search-field.js +1 -0
  392. package/dist/select.js +1 -1
  393. package/dist/skeleton.d.ts +1 -1
  394. package/dist/skeleton.js +1 -1
  395. package/dist/spinner.d.ts +1 -1
  396. package/dist/spinner.js +1 -1
  397. package/dist/stack.d.ts +1 -1
  398. package/dist/stack.js +1 -1
  399. package/dist/static-table.d.ts +1 -1
  400. package/dist/stepper.d.ts +1 -1
  401. package/dist/stepper.js +1 -1
  402. package/dist/style.css +1 -1
  403. package/dist/switch.d.ts +1 -1
  404. package/dist/switch.js +1 -1
  405. package/dist/table.d.ts +1 -1
  406. package/dist/table.js +1 -1
  407. package/dist/tabs.d.ts +1 -1
  408. package/dist/tabs.js +1 -1
  409. package/dist/text-input.js +1 -1
  410. package/dist/textarea.js +1 -1
  411. package/dist/time-field.d.ts +2 -0
  412. package/dist/time-field.js +1 -0
  413. package/dist/toast.d.ts +1 -1
  414. package/dist/toast.js +1 -1
  415. package/dist/tooltip.d.ts +1 -1
  416. package/dist/tooltip.js +1 -1
  417. package/dist/tree.d.ts +2 -0
  418. package/dist/tree.js +1 -0
  419. package/dist/visually-hidden.d.ts +2 -0
  420. package/dist/visually-hidden.js +1 -0
  421. package/package.json +61 -52
  422. package/dist/chunks/Button-I0aUy5h-.js +0 -1
  423. package/dist/chunks/Chip-D0Cw0mAr.js +0 -1
  424. package/dist/chunks/CloseButton-DJM7FRKh.js +0 -1
  425. package/dist/chunks/ComboboxListBox-BhO8uRNg.js +0 -1
  426. package/dist/chunks/Icon-BIwkD-kx.js +0 -1
  427. package/dist/chunks/Link-Cq7FNWpm.js +0 -1
  428. package/dist/chunks/RangeCalendar-COnSfurr.js +0 -1
  429. package/dist/chunks/accordion-okRicuG5.js +0 -1
  430. package/dist/chunks/autocomplete-B0xTc6kg.js +0 -1
  431. package/dist/chunks/avatar-Bjm0DlPO.js +0 -1
  432. package/dist/chunks/breakpoints-SLMTNHF9.d.ts +0 -5
  433. package/dist/chunks/breakpoints-o_2Ev7ir.js +0 -1
  434. package/dist/chunks/button-group-CPZYA6aZ.js +0 -1
  435. package/dist/chunks/card-DfF2K_5p.js +0 -1
  436. package/dist/chunks/carousel-DEvwcA7H.js +0 -1
  437. package/dist/chunks/checkbox-BFPS0pD6.js +0 -1
  438. package/dist/chunks/chip-input-CB1lE6vP.js +0 -1
  439. package/dist/chunks/collapse-WifcChO8.js +0 -1
  440. package/dist/chunks/combobox-DWEj-Sv7.js +0 -1
  441. package/dist/chunks/datagrid-nbnNThsT.js +0 -2
  442. package/dist/chunks/datepicker-CslLKMm1.js +0 -1
  443. package/dist/chunks/direction-CPhdeL3A.js +0 -1
  444. package/dist/chunks/drawer-zReFjoJG.js +0 -1
  445. package/dist/chunks/flex-BTvpgaRv.js +0 -1
  446. package/dist/chunks/floating-input-CIC9Lm2a.js +0 -1
  447. package/dist/chunks/form-field-BjQ9SIjx.js +0 -1
  448. package/dist/chunks/grid-CuFw89yV.js +0 -1
  449. package/dist/chunks/iconSlot-BmWxJh27.js +0 -1
  450. package/dist/chunks/index-BDfh8YBc.d.ts +0 -39
  451. package/dist/chunks/index-CVUMS0x7.d.ts +0 -73
  452. package/dist/chunks/index-D949AidR.d.ts +0 -40
  453. package/dist/chunks/index-DEb9zXlC.d.ts +0 -210
  454. package/dist/chunks/list-CMr-wB9d.js +0 -1
  455. package/dist/chunks/menu-CXUc-Gva.js +0 -1
  456. package/dist/chunks/modal-ByIj71Mq.js +0 -1
  457. package/dist/chunks/nav-BldxFo_B.js +0 -1
  458. package/dist/chunks/navbar-BwcsQuBk.js +0 -1
  459. package/dist/chunks/notification-DdqigVB1.js +0 -1
  460. package/dist/chunks/otp-input-CXe_wkII.js +0 -1
  461. package/dist/chunks/pagination-BOpEAYW2.js +0 -1
  462. package/dist/chunks/password-strength-BfLiYiGj.js +0 -1
  463. package/dist/chunks/placeholder-pg95KELl.js +0 -1
  464. package/dist/chunks/polymorphic-CACPOv1_.js +0 -1
  465. package/dist/chunks/popover-BpSfnZzk.js +0 -1
  466. package/dist/chunks/radio-BV7Sq6D1.js +0 -1
  467. package/dist/chunks/renderFormCheck-BXBs6_ov.js +0 -1
  468. package/dist/chunks/renderFormField-wiaxvvLG.js +0 -1
  469. package/dist/chunks/select-CclIIux8.js +0 -1
  470. package/dist/chunks/skeleton-CKq76sE_.js +0 -1
  471. package/dist/chunks/spinner-BEq4PAlu.js +0 -1
  472. package/dist/chunks/stack-D3retZ-W.js +0 -1
  473. package/dist/chunks/stepper-CTa6e8uv.js +0 -1
  474. package/dist/chunks/switch-BmHpq4tL.js +0 -1
  475. package/dist/chunks/table-Fme9GbAR.js +0 -1
  476. package/dist/chunks/tabs-BnbMJM_b.js +0 -1
  477. package/dist/chunks/text-input-DD3d08Yf.js +0 -1
  478. package/dist/chunks/textarea-C0qQdCcu.js +0 -1
  479. package/dist/chunks/toast-BQhZ2pv5.js +0 -1
  480. package/dist/chunks/tooltip-DHtVAYUo.js +0 -1
  481. package/dist/chunks/triggerElement-BIqA4KqZ.js +0 -1
  482. package/dist/chunks/useDialogElement-BRIU60cT.js +0 -1
  483. package/dist/chunks/useFloatingOverlay-CcmDZKMK.js +0 -1
  484. package/dist/chunks/useToastRegionQueue-BH6bWZ73.js +0 -1
  485. package/src/components/accordion/Accordion.tsx +0 -190
  486. package/src/components/accordion/AccordionBody.tsx +0 -46
  487. package/src/components/accordion/AccordionHeader.tsx +0 -21
  488. package/src/components/accordion/AccordionItem.tsx +0 -59
  489. package/src/components/accordion/context.ts +0 -8
  490. package/src/components/accordion/index.ts +0 -12
  491. package/src/components/autocomplete/Autocomplete.tsx +0 -464
  492. package/src/components/autocomplete/AutocompleteGroup.tsx +0 -20
  493. package/src/components/autocomplete/AutocompleteItem.tsx +0 -18
  494. package/src/components/autocomplete/index.ts +0 -10
  495. package/src/components/avatar/Avatar.tsx +0 -137
  496. package/src/components/avatar/AvatarImage.tsx +0 -19
  497. package/src/components/avatar/AvatarStack.tsx +0 -98
  498. package/src/components/avatar/index.ts +0 -10
  499. package/src/components/badge/Badge.tsx +0 -94
  500. package/src/components/badge/index.ts +0 -6
  501. package/src/components/breadcrumb/Breadcrumb.tsx +0 -68
  502. package/src/components/breadcrumb/BreadcrumbItem.tsx +0 -38
  503. package/src/components/breadcrumb/index.ts +0 -8
  504. package/src/components/button/Button.tsx +0 -232
  505. package/src/components/button/index.ts +0 -6
  506. package/src/components/button-group/ButtonGroup.tsx +0 -55
  507. package/src/components/button-group/ButtonToolbar.tsx +0 -47
  508. package/src/components/button-group/index.ts +0 -8
  509. package/src/components/calendar/Calendar.scss +0 -57
  510. package/src/components/calendar/Calendar.tsx +0 -338
  511. package/src/components/calendar/CalendarMonthBlock.tsx +0 -57
  512. package/src/components/calendar/CalendarMonthGrid.tsx +0 -94
  513. package/src/components/calendar/CalendarMonthYearPicker.tsx +0 -164
  514. package/src/components/calendar/CalendarNavButton.tsx +0 -24
  515. package/src/components/calendar/CalendarWeekGrid.tsx +0 -58
  516. package/src/components/calendar/CalendarYearGrid.tsx +0 -128
  517. package/src/components/calendar/RangeCalendar.scss +0 -95
  518. package/src/components/calendar/RangeCalendar.tsx +0 -373
  519. package/src/components/calendar/index.ts +0 -10
  520. package/src/components/calendar/labels.tsx +0 -71
  521. package/src/components/card/Card.tsx +0 -173
  522. package/src/components/card/CardBody.tsx +0 -75
  523. package/src/components/card/CardFooter.tsx +0 -47
  524. package/src/components/card/CardGroup.tsx +0 -51
  525. package/src/components/card/CardHeader.tsx +0 -47
  526. package/src/components/card/CardImage.tsx +0 -70
  527. package/src/components/card/CardImageOverlay.tsx +0 -47
  528. package/src/components/card/CardLink.tsx +0 -40
  529. package/src/components/card/CardSubtitle.tsx +0 -47
  530. package/src/components/card/CardText.tsx +0 -47
  531. package/src/components/card/CardTitle.tsx +0 -47
  532. package/src/components/card/index.ts +0 -26
  533. package/src/components/carousel/Carousel.tsx +0 -753
  534. package/src/components/carousel/CarouselControlButton.tsx +0 -81
  535. package/src/components/carousel/CarouselControlNext.tsx +0 -28
  536. package/src/components/carousel/CarouselControlPrev.tsx +0 -28
  537. package/src/components/carousel/CarouselIndicators.tsx +0 -44
  538. package/src/components/carousel/CarouselInner.tsx +0 -56
  539. package/src/components/carousel/CarouselItem.tsx +0 -51
  540. package/src/components/carousel/CarouselOverlay.tsx +0 -51
  541. package/src/components/carousel/CarouselPlayPause.tsx +0 -84
  542. package/src/components/carousel/carouselEngine.ts +0 -170
  543. package/src/components/carousel/context.ts +0 -29
  544. package/src/components/carousel/index.ts +0 -25
  545. package/src/components/checkbox/Checkbox.tsx +0 -252
  546. package/src/components/checkbox/CheckboxGroup.tsx +0 -145
  547. package/src/components/checkbox/context.ts +0 -14
  548. package/src/components/checkbox/index.ts +0 -8
  549. package/src/components/chip/Chip.tsx +0 -184
  550. package/src/components/chip/index.ts +0 -6
  551. package/src/components/chip-input/ChipInput.tsx +0 -371
  552. package/src/components/chip-input/ChipList.tsx +0 -95
  553. package/src/components/chip-input/index.ts +0 -6
  554. package/src/components/close-button/CloseButton.tsx +0 -205
  555. package/src/components/close-button/index.ts +0 -6
  556. package/src/components/collapse/Collapse.tsx +0 -128
  557. package/src/components/collapse/index.ts +0 -6
  558. package/src/components/color-input/ColorInput.tsx +0 -106
  559. package/src/components/color-input/index.ts +0 -6
  560. package/src/components/combobox/Combobox.tsx +0 -320
  561. package/src/components/combobox/ComboboxGroup.tsx +0 -27
  562. package/src/components/combobox/ComboboxItem.tsx +0 -44
  563. package/src/components/combobox/ComboboxListBox.tsx +0 -98
  564. package/src/components/combobox/index.ts +0 -10
  565. package/src/components/datagrid/DataGrid.scss +0 -203
  566. package/src/components/datagrid/DataGrid.tsx +0 -259
  567. package/src/components/datagrid/DataGridBody.tsx +0 -162
  568. package/src/components/datagrid/DataGridCell.tsx +0 -47
  569. package/src/components/datagrid/DataGridColumn.tsx +0 -109
  570. package/src/components/datagrid/DataGridHeader.tsx +0 -47
  571. package/src/components/datagrid/DataGridPinBehavior.tsx +0 -225
  572. package/src/components/datagrid/DataGridRow.tsx +0 -48
  573. package/src/components/datagrid/DataGridSelectionCell.tsx +0 -74
  574. package/src/components/datagrid/DataGridTableLayout.ts +0 -30
  575. package/src/components/datagrid/index.ts +0 -18
  576. package/src/components/datagrid/useColumnGeometry.ts +0 -161
  577. package/src/components/datepicker/CalendarToggleButton.tsx +0 -58
  578. package/src/components/datepicker/ClearButton.tsx +0 -38
  579. package/src/components/datepicker/DateField.tsx +0 -54
  580. package/src/components/datepicker/DatePicker.scss +0 -51
  581. package/src/components/datepicker/DatePicker.tsx +0 -606
  582. package/src/components/datepicker/DateRangePicker.scss +0 -11
  583. package/src/components/datepicker/DateRangePicker.tsx +0 -361
  584. package/src/components/datepicker/index.ts +0 -8
  585. package/src/components/datepicker/renderDatePickerShell.tsx +0 -104
  586. package/src/components/drawer/Drawer.tsx +0 -213
  587. package/src/components/drawer/DrawerBody.tsx +0 -47
  588. package/src/components/drawer/DrawerFooter.tsx +0 -51
  589. package/src/components/drawer/DrawerHeader.tsx +0 -60
  590. package/src/components/drawer/DrawerTitle.tsx +0 -49
  591. package/src/components/drawer/index.ts +0 -18
  592. package/src/components/file-input/FileInput.tsx +0 -100
  593. package/src/components/file-input/index.ts +0 -6
  594. package/src/components/flex/Flex.tsx +0 -134
  595. package/src/components/flex/index.ts +0 -6
  596. package/src/components/floating-input/FloatingInput.tsx +0 -94
  597. package/src/components/floating-input/index.ts +0 -6
  598. package/src/components/form/Form.tsx +0 -26
  599. package/src/components/form/FormFeedback.tsx +0 -64
  600. package/src/components/form/FormHelp.tsx +0 -46
  601. package/src/components/form/FormLabel.tsx +0 -26
  602. package/src/components/form/index.ts +0 -12
  603. package/src/components/form/renderFormCheck.tsx +0 -86
  604. package/src/components/form-field/FormField.tsx +0 -84
  605. package/src/components/form-field/index.ts +0 -6
  606. package/src/components/form-field/renderFormField.tsx +0 -85
  607. package/src/components/grid/Col.tsx +0 -69
  608. package/src/components/grid/Container.tsx +0 -59
  609. package/src/components/grid/Grid.tsx +0 -86
  610. package/src/components/grid/GridItem.tsx +0 -123
  611. package/src/components/grid/Row.tsx +0 -71
  612. package/src/components/grid/gap.ts +0 -8
  613. package/src/components/grid/index.ts +0 -14
  614. package/src/components/icon/Icon.tsx +0 -105
  615. package/src/components/icon/IconProvider.tsx +0 -40
  616. package/src/components/icon/index.ts +0 -9
  617. package/src/components/input-adorn/InputAdorn.tsx +0 -55
  618. package/src/components/input-adorn/index.ts +0 -6
  619. package/src/components/input-group/InputGroup.tsx +0 -50
  620. package/src/components/input-group/InputGroupAddon.tsx +0 -50
  621. package/src/components/input-group/index.ts +0 -8
  622. package/src/components/link/Link.tsx +0 -148
  623. package/src/components/link/index.ts +0 -6
  624. package/src/components/list/List.tsx +0 -193
  625. package/src/components/list/ListItem.tsx +0 -91
  626. package/src/components/list/index.ts +0 -8
  627. package/src/components/menu/Menu.tsx +0 -408
  628. package/src/components/menu/MenuDivider.tsx +0 -19
  629. package/src/components/menu/MenuHeader.tsx +0 -55
  630. package/src/components/menu/MenuItem.tsx +0 -85
  631. package/src/components/menu/MenuItemDef.ts +0 -83
  632. package/src/components/menu/MenuList.tsx +0 -142
  633. package/src/components/menu/MenuSubmenu.tsx +0 -284
  634. package/src/components/menu/MenuSubmenuBack.tsx +0 -39
  635. package/src/components/menu/MenuText.tsx +0 -47
  636. package/src/components/menu/MenuToggle.tsx +0 -148
  637. package/src/components/menu/index.ts +0 -23
  638. package/src/components/menu/menuNavigation.ts +0 -106
  639. package/src/components/menu/submenuGroup.ts +0 -43
  640. package/src/components/modal/Modal.tsx +0 -164
  641. package/src/components/modal/ModalBody.tsx +0 -47
  642. package/src/components/modal/ModalFooter.tsx +0 -51
  643. package/src/components/modal/ModalHeader.tsx +0 -60
  644. package/src/components/modal/ModalTitle.tsx +0 -49
  645. package/src/components/modal/index.ts +0 -18
  646. package/src/components/nav/Nav.tsx +0 -97
  647. package/src/components/nav/NavItem.tsx +0 -42
  648. package/src/components/nav/NavLink.tsx +0 -48
  649. package/src/components/nav/NavTitle.tsx +0 -22
  650. package/src/components/nav/index.ts +0 -11
  651. package/src/components/navbar/Navbar.tsx +0 -112
  652. package/src/components/navbar/NavbarBrand.tsx +0 -58
  653. package/src/components/navbar/NavbarNav.tsx +0 -47
  654. package/src/components/navbar/NavbarText.tsx +0 -47
  655. package/src/components/navbar/NavbarToggler.tsx +0 -40
  656. package/src/components/navbar/index.ts +0 -14
  657. package/src/components/notification/Notification.scss +0 -15
  658. package/src/components/notification/Notification.tsx +0 -188
  659. package/src/components/notification/NotificationIcon.tsx +0 -21
  660. package/src/components/notification/NotificationStack.tsx +0 -66
  661. package/src/components/notification/NotificationText.tsx +0 -47
  662. package/src/components/notification/NotificationTitle.tsx +0 -47
  663. package/src/components/notification/context.ts +0 -14
  664. package/src/components/notification/index.ts +0 -25
  665. package/src/components/notification/notificationQueue.ts +0 -48
  666. package/src/components/otp-input/OtpBox.tsx +0 -68
  667. package/src/components/otp-input/OtpInput.tsx +0 -342
  668. package/src/components/otp-input/index.ts +0 -6
  669. package/src/components/pagination/Pagination.tsx +0 -212
  670. package/src/components/pagination/PaginationItem.tsx +0 -152
  671. package/src/components/pagination/index.ts +0 -12
  672. package/src/components/password-strength/PasswordStrength.tsx +0 -155
  673. package/src/components/password-strength/index.ts +0 -6
  674. package/src/components/password-strength/strengthScore.ts +0 -79
  675. package/src/components/placeholder/Placeholder.tsx +0 -178
  676. package/src/components/placeholder/index.ts +0 -6
  677. package/src/components/popover/Popover.tsx +0 -269
  678. package/src/components/popover/index.ts +0 -6
  679. package/src/components/progress/Progress.tsx +0 -154
  680. package/src/components/progress/ProgressBar.tsx +0 -88
  681. package/src/components/progress/index.ts +0 -8
  682. package/src/components/radio/Radio.tsx +0 -98
  683. package/src/components/radio/RadioGroup.tsx +0 -142
  684. package/src/components/radio/context.ts +0 -14
  685. package/src/components/radio/index.ts +0 -8
  686. package/src/components/range-input/RangeInput.tsx +0 -109
  687. package/src/components/range-input/index.ts +0 -6
  688. package/src/components/select/Select.tsx +0 -277
  689. package/src/components/select/index.ts +0 -6
  690. package/src/components/skeleton/Skeleton.tsx +0 -89
  691. package/src/components/skeleton/SkeletonLoader.tsx +0 -98
  692. package/src/components/skeleton/index.ts +0 -8
  693. package/src/components/spinner/Spinner.tsx +0 -77
  694. package/src/components/spinner/index.ts +0 -6
  695. package/src/components/stack/Stack.tsx +0 -81
  696. package/src/components/stack/index.ts +0 -6
  697. package/src/components/static-table/StaticTable.tsx +0 -78
  698. package/src/components/static-table/index.ts +0 -8
  699. package/src/components/stepper/Stepper.tsx +0 -172
  700. package/src/components/stepper/StepperItem.tsx +0 -66
  701. package/src/components/stepper/index.ts +0 -8
  702. package/src/components/switch/Switch.tsx +0 -259
  703. package/src/components/switch/index.ts +0 -6
  704. package/src/components/table/Table.css +0 -39
  705. package/src/components/table/Table.tsx +0 -405
  706. package/src/components/table/TableBody.tsx +0 -25
  707. package/src/components/table/TableCell.tsx +0 -27
  708. package/src/components/table/TableColumn.tsx +0 -31
  709. package/src/components/table/TableHeader.tsx +0 -26
  710. package/src/components/table/TableRow.tsx +0 -24
  711. package/src/components/table/index.ts +0 -16
  712. package/src/components/tabs/Tab.tsx +0 -36
  713. package/src/components/tabs/TabList.tsx +0 -76
  714. package/src/components/tabs/TabPanel.tsx +0 -68
  715. package/src/components/tabs/Tabs.tsx +0 -136
  716. package/src/components/tabs/context.ts +0 -24
  717. package/src/components/tabs/index.ts +0 -12
  718. package/src/components/text-input/TextInput.tsx +0 -188
  719. package/src/components/text-input/index.ts +0 -6
  720. package/src/components/textarea/Textarea.tsx +0 -145
  721. package/src/components/textarea/index.ts +0 -6
  722. package/src/components/toast/Toast.tsx +0 -220
  723. package/src/components/toast/ToastBody.tsx +0 -64
  724. package/src/components/toast/ToastFooter.tsx +0 -47
  725. package/src/components/toast/ToastHeader.tsx +0 -105
  726. package/src/components/toast/ToastIcon.tsx +0 -21
  727. package/src/components/toast/Toaster.tsx +0 -87
  728. package/src/components/toast/context.ts +0 -14
  729. package/src/components/toast/index.ts +0 -26
  730. package/src/components/toast/toastQueue.ts +0 -56
  731. package/src/components/tooltip/Tooltip.tsx +0 -171
  732. package/src/components/tooltip/index.ts +0 -6
  733. package/src/global.d.ts +0 -2
  734. package/src/hooks/index.ts +0 -57
  735. package/src/hooks/useAutoDismiss.ts +0 -91
  736. package/src/hooks/useButtonSemantics.ts +0 -33
  737. package/src/hooks/useControllableState.ts +0 -24
  738. package/src/hooks/useDialogElement.ts +0 -226
  739. package/src/hooks/useDisabledAnchorGuard.ts +0 -22
  740. package/src/hooks/useDismissibleTransition.ts +0 -126
  741. package/src/hooks/useDrawer.ts +0 -9
  742. package/src/hooks/useFloatingOverlay.ts +0 -125
  743. package/src/hooks/useForkedRef.ts +0 -50
  744. package/src/hooks/useFormField.ts +0 -89
  745. package/src/hooks/useIconConfig.ts +0 -6
  746. package/src/hooks/useIsomorphicLayoutEffect.ts +0 -9
  747. package/src/hooks/useModal.ts +0 -9
  748. package/src/hooks/useNotification.ts +0 -10
  749. package/src/hooks/useOverlayPlacement.ts +0 -93
  750. package/src/hooks/usePagination.ts +0 -89
  751. package/src/hooks/useToast.ts +0 -9
  752. package/src/hooks/useToastRegionQueue.ts +0 -27
  753. package/src/index.ts +0 -522
  754. package/src/types.ts +0 -133
  755. package/src/utils/breakpoints.ts +0 -43
  756. package/src/utils/comboboxCollection.tsx +0 -152
  757. package/src/utils/dateRangePresets.ts +0 -6
  758. package/src/utils/devWarning.ts +0 -58
  759. package/src/utils/dialogTransition.ts +0 -39
  760. package/src/utils/direction.ts +0 -14
  761. package/src/utils/focusRedirect.ts +0 -23
  762. package/src/utils/iconConfig.ts +0 -88
  763. package/src/utils/iconSlot.tsx +0 -41
  764. package/src/utils/isWholeUnitDisabled.ts +0 -17
  765. package/src/utils/mergeIsDateUnavailable.ts +0 -15
  766. package/src/utils/overlayPlacement.ts +0 -93
  767. package/src/utils/pointerInteraction.ts +0 -21
  768. package/src/utils/polymorphic.ts +0 -100
  769. package/src/utils/renderMenuItemContent.tsx +0 -57
  770. package/src/utils/setVisibleRangeStart.ts +0 -64
  771. package/src/utils/slot.tsx +0 -78
  772. package/src/utils/spacingClassName.ts +0 -14
  773. package/src/utils/suppressFocusRingGlobally.ts +0 -84
  774. package/src/utils/tableClassName.ts +0 -93
  775. package/src/utils/triggerElement.ts +0 -25
  776. package/src/utils/validationClassName.ts +0 -8
  777. package/src/utils/virtualFocusStyle.ts +0 -16
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-input-B4pTv6SU.js","names":[],"sources":["../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import React, { forwardRef, InputHTMLAttributes, ReactNode, useRef } from 'react'\nimport classNames from 'classnames'\nimport { AriaTextFieldProps, useTextField } from 'react-aria'\n\nimport { useForkedRef, useFormField } from '../../hooks'\nimport { mergeUnhandledProps, TEXT_FIELD_PROPS } from '../../utils/unhandledProps'\nimport { validationClassName } from '../../utils/validationClassName'\nimport { renderFormField } from '../form-field/renderFormField'\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'defaultValue' | 'onChange' | 'size' | 'value'\n> {\n /**\n * Content rendered at the input's trailing edge, e.g. a `InputAdorn` icon, text, or button.\n * Setting either `adornStart` or `adornEnd` renders a `.form-input` wrapper around a\n * `.ghost-input`, matching chassis-css's [input help](https://chassis-ui.com/css/docs/forms/input-adorn) pattern.\n */\n adornEnd?: ReactNode\n /**\n * Content rendered at the input's leading edge, e.g. a `InputAdorn` icon, text, or button.\n * Setting either `adornStart` or `adornEnd` renders a `.form-input` wrapper around a\n * `.ghost-input`, matching chassis-css's [input help](https://chassis-ui.com/css/docs/forms/input-adorn) pattern.\n */\n adornStart?: ReactNode\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * The value of the input, uncontrolled.\n */\n defaultValue?: string\n /**\n * Toggle the disabled state for the component.\n */\n disabled?: boolean\n /**\n * A description for the field, rendered below the input.\n */\n help?: ReactNode\n /**\n * Set component validation state to invalid.\n */\n invalid?: boolean\n /**\n * An error message for the field, rendered below the input when `invalid` is set.\n */\n invalidFeedback?: ReactNode\n /**\n * The field's caption, rendered as a `FormLabel` associated with this input.\n */\n label?: ReactNode\n /**\n * Handler that is called when the value changes.\n */\n onChange?: (value: string) => void\n /**\n * Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly` [docs]\n */\n plainText?: boolean\n /**\n * Toggle the readonly state for the component.\n */\n readOnly?: boolean\n /**\n * Size the component sm or lg.\n */\n size?: 'sm' | 'lg'\n /**\n * Specifies the type of component. For `color` or `file` inputs, use the dedicated `ColorInput` or `FileInput` components instead.\n */\n type?:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'month'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week'\n | (string & {})\n /**\n * Set component validation state to valid.\n */\n valid?: boolean\n /**\n * A success message for the field, rendered below the input when `valid` is set.\n */\n validFeedback?: ReactNode\n /**\n * The value of the input, controlled.\n */\n value?: string\n}\n\nexport const TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n adornEnd,\n adornStart,\n className,\n disabled,\n help,\n id,\n invalid,\n invalidFeedback,\n label,\n plainText,\n readOnly,\n size,\n style,\n type = 'text',\n valid,\n validFeedback,\n ...rest\n },\n ref\n ) => {\n const inputRef = useRef<HTMLInputElement>(null)\n const forkedRef = useForkedRef(ref, inputRef)\n\n const { describedBy, feedbackId, helpId, inputId, labelId, labelledBy } = useFormField({\n ariaDescribedBy: rest['aria-describedby'],\n ariaLabelledBy: rest['aria-labelledby'],\n help,\n id,\n invalid,\n invalidFeedback,\n label,\n valid,\n validFeedback\n })\n\n const { inputProps } = useTextField(\n {\n ...rest,\n 'aria-describedby': describedBy,\n 'aria-labelledby': labelledBy,\n id: inputId,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n type\n } as AriaTextFieldProps,\n inputRef\n )\n\n const hasAdorn = adornStart != null || adornEnd != null\n\n // chassis-css's `.form-input:has(.ghost-input.is-valid)` selector reads validation state off\n // the inner input, not the wrapper, once adorns turn `.form-input` into a flex container - see\n // https://chassis-ui.com/css/docs/forms/input-adorn.\n const inputClassName = classNames(\n hasAdorn ? 'ghost-input' : 'form-input',\n !hasAdorn && plainText && 'plaintext',\n !hasAdorn && size,\n validationClassName(invalid, valid),\n !hasAdorn && className\n )\n\n // `aria-describedby` after the spread: react-aria's own adds ids it never renders (FORMS.md,\n // gotcha 6). `style` goes where `className` does, on the outermost element.\n const input = (\n <input\n {...mergeUnhandledProps(inputProps, rest, TEXT_FIELD_PROPS)}\n aria-describedby={describedBy}\n className={inputClassName}\n ref={forkedRef}\n style={hasAdorn ? undefined : style}\n />\n )\n\n const children = hasAdorn ? (\n <div\n className={classNames('form-input', plainText && 'plaintext', size, className)}\n style={style}\n >\n {adornStart}\n {input}\n {adornEnd}\n </div>\n ) : (\n input\n )\n\n return renderFormField({\n children,\n help,\n ids: { feedback: feedbackId, help: helpId, input: inputId, label: labelId },\n invalid,\n invalidFeedback,\n label,\n valid,\n validFeedback\n })\n }\n)\n\nTextInput.displayName = 'TextInput'\n"],"mappings":"gZAmGA,MAAa,EAAY,GAErB,CACE,WACA,aACA,YACA,WACA,OACA,KACA,UACA,kBACA,QACA,YACA,WACA,OACA,QACA,OAAO,OACP,QACA,gBACA,GAAG,GAEL,IACG,CACH,IAAM,EAAW,EAAyB,IAAI,EACxC,EAAY,EAAa,EAAK,CAAQ,EAEtC,CAAE,cAAa,aAAY,SAAQ,UAAS,UAAS,cAAe,EAAa,CACrF,gBAAiB,EAAK,oBACtB,eAAgB,EAAK,mBACrB,OACA,KACA,UACA,kBACA,QACA,QACA,eACF,CAAC,EAEK,CAAE,cAAe,EACrB,CACE,GAAG,EACH,mBAAoB,EACpB,kBAAmB,EACnB,GAAI,EACJ,WAAY,EACZ,UAAW,EACX,WAAY,EACZ,MACF,EACA,CACF,EAEM,EAAW,GAAc,MAAQ,GAAY,KAK7C,EAAiB,EACrB,EAAW,cAAgB,aAC3B,CAAC,GAAY,GAAa,YAC1B,CAAC,GAAY,EACb,EAAoB,EAAS,CAAK,EAClC,CAAC,GAAY,CACf,EAIM,EACJ,EAAA,cAAC,QAAD,CACE,GAAI,EAAoB,EAAY,EAAM,CAAgB,EAC1D,mBAAkB,EAClB,UAAW,EACX,IAAK,EACL,MAAO,EAAW,IAAA,GAAY,CAC/B,CAAA,EAGG,EAAW,EACf,EAAA,cAAC,MAAD,CACE,UAAW,EAAW,aAAc,GAAa,YAAa,EAAM,CAAS,EACtE,OAKJ,EAHF,EACA,EACA,CACE,EAEL,EAGF,OAAO,EAAgB,CACrB,WACA,OACA,IAAK,CAAE,SAAU,EAAY,KAAM,EAAQ,MAAO,EAAS,MAAO,CAAQ,EAC1E,UACA,kBACA,QACA,QACA,eACF,CAAC,CACH,CACF,EAEA,EAAU,YAAc"}
@@ -0,0 +1,2 @@
1
+ import"./focus-ring-SR_LwaN7.js";import{t as e}from"./useForkedRef-DVEfT-KI.js";import{t}from"./useFormField-BOqmBTC4.js";import{t as n}from"./renderFormField-Brkw1yA6.js";import{t as r}from"./validationClassName-gRGs4KBm.js";import{r as i,t as a}from"./unhandledProps-9Kdj7WVf.js";import o,{forwardRef as s,useRef as c}from"react";import l from"classnames";import{useTextField as u}from"react-aria";const d=s(({className:s,disabled:d,help:f,id:p,invalid:m,invalidFeedback:h,label:g,plainText:_,readOnly:v,rows:y,size:b,valid:x,validFeedback:S,...C},w)=>{let T=c(null),E=e(w,T),{describedBy:D,feedbackId:O,helpId:k,inputId:A,labelId:j,labelledBy:M}=t({ariaDescribedBy:C[`aria-describedby`],ariaLabelledBy:C[`aria-labelledby`],help:f,id:p,invalid:m,invalidFeedback:h,label:g,valid:x,validFeedback:S}),{inputProps:N}=u({...C,"aria-describedby":D,"aria-labelledby":M,id:A,inputElementType:`textarea`,isDisabled:d,isInvalid:m,isReadOnly:v},T),P=l(`form-input`,_&&`plaintext`,b,r(m,x),s);return n({children:o.createElement(`textarea`,{...i(N,C,a),"aria-describedby":D,rows:y,className:P,ref:E}),help:f,ids:{feedback:O,help:k,input:A,label:j},invalid:m,invalidFeedback:h,label:g,valid:x,validFeedback:S})});d.displayName=`Textarea`;export{d as t};
2
+ //# sourceMappingURL=textarea-1A1nABQE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea-1A1nABQE.js","names":[],"sources":["../../src/components/textarea/Textarea.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode, TextareaHTMLAttributes, useRef } from 'react'\nimport classNames from 'classnames'\nimport { AriaTextFieldOptions, useTextField } from 'react-aria'\n\nimport { useForkedRef, useFormField } from '../../hooks'\nimport { mergeUnhandledProps, TEXT_FIELD_PROPS } from '../../utils/unhandledProps'\nimport { validationClassName } from '../../utils/validationClassName'\nimport { renderFormField } from '../form-field/renderFormField'\n\nexport interface TextareaProps extends Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'defaultValue' | 'onChange' | 'value'\n> {\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * The value of the textarea, uncontrolled.\n */\n defaultValue?: string\n /**\n * Toggle the disabled state for the component.\n */\n disabled?: boolean\n /**\n * A description for the field, rendered below the textarea.\n */\n help?: ReactNode\n /**\n * Set component validation state to invalid.\n */\n invalid?: boolean\n /**\n * An error message for the field, rendered below the textarea when `invalid` is set.\n */\n invalidFeedback?: ReactNode\n /**\n * The field's caption, rendered as a `FormLabel` associated with this textarea.\n */\n label?: ReactNode\n /**\n * Handler that is called when the value changes.\n */\n onChange?: (value: string) => void\n /**\n * Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly`.\n */\n plainText?: boolean\n /**\n * Toggle the readonly state for the component.\n */\n readOnly?: boolean\n /**\n * The number of visible text lines for the control.\n */\n rows?: number\n /**\n * Size the component sm or lg.\n */\n size?: 'sm' | 'lg'\n /**\n * Set component validation state to valid.\n */\n valid?: boolean\n /**\n * A success message for the field, rendered below the textarea when `valid` is set.\n */\n validFeedback?: ReactNode\n /**\n * The value of the textarea, controlled.\n */\n value?: string\n}\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n className,\n disabled,\n help,\n id,\n invalid,\n invalidFeedback,\n label,\n plainText,\n readOnly,\n rows,\n size,\n valid,\n validFeedback,\n ...rest\n },\n ref\n ) => {\n const textareaRef = useRef<HTMLTextAreaElement>(null)\n const forkedRef = useForkedRef(ref, textareaRef)\n\n const { describedBy, feedbackId, helpId, inputId, labelId, labelledBy } = useFormField({\n ariaDescribedBy: rest['aria-describedby'],\n ariaLabelledBy: rest['aria-labelledby'],\n help,\n id,\n invalid,\n invalidFeedback,\n label,\n valid,\n validFeedback\n })\n\n const { inputProps } = useTextField<'textarea'>(\n {\n ...rest,\n 'aria-describedby': describedBy,\n 'aria-labelledby': labelledBy,\n id: inputId,\n inputElementType: 'textarea',\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly\n } as AriaTextFieldOptions<'textarea'>,\n textareaRef\n )\n\n const _className = classNames(\n 'form-input',\n plainText && 'plaintext',\n size,\n validationClassName(invalid, valid),\n className\n )\n\n return renderFormField({\n // `aria-describedby` after the spread: see `TextInput`.\n children: (\n <textarea\n {...mergeUnhandledProps(inputProps, rest, TEXT_FIELD_PROPS)}\n aria-describedby={describedBy}\n rows={rows}\n className={_className}\n ref={forkedRef}\n />\n ),\n help,\n ids: { feedback: feedbackId, help: helpId, input: inputId, label: labelId },\n invalid,\n invalidFeedback,\n label,\n valid,\n validFeedback\n })\n }\n)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":"gZA2EA,MAAa,EAAW,GAEpB,CACE,YACA,WACA,OACA,KACA,UACA,kBACA,QACA,YACA,WACA,OACA,OACA,QACA,gBACA,GAAG,GAEL,IACG,CACH,IAAM,EAAc,EAA4B,IAAI,EAC9C,EAAY,EAAa,EAAK,CAAW,EAEzC,CAAE,cAAa,aAAY,SAAQ,UAAS,UAAS,cAAe,EAAa,CACrF,gBAAiB,EAAK,oBACtB,eAAgB,EAAK,mBACrB,OACA,KACA,UACA,kBACA,QACA,QACA,eACF,CAAC,EAEK,CAAE,cAAe,EACrB,CACE,GAAG,EACH,mBAAoB,EACpB,kBAAmB,EACnB,GAAI,EACJ,iBAAkB,WAClB,WAAY,EACZ,UAAW,EACX,WAAY,CACd,EACA,CACF,EAEM,EAAa,EACjB,aACA,GAAa,YACb,EACA,EAAoB,EAAS,CAAK,EAClC,CACF,EAEA,OAAO,EAAgB,CAErB,SACE,EAAA,cAAC,WAAD,CACE,GAAI,EAAoB,EAAY,EAAM,CAAgB,EAC1D,mBAAkB,EACZ,OACN,UAAW,EACX,IAAK,CACN,CAAA,EAEH,OACA,IAAK,CAAE,SAAU,EAAY,KAAM,EAAQ,MAAO,EAAS,MAAO,CAAQ,EAC1E,UACA,kBACA,QACA,QACA,eACF,CAAC,CACH,CACF,EAEA,EAAS,YAAc"}
@@ -0,0 +1,2 @@
1
+ import"./focus-ring-SR_LwaN7.js";import{l as e}from"./slot-CNhFZdHF.js";import{t}from"./useForkedRef-DVEfT-KI.js";import{t as n}from"./useFormField-BOqmBTC4.js";import{t as r}from"./renderFormField-Brkw1yA6.js";import{t as i}from"./validationClassName-gRGs4KBm.js";import{t as a}from"./DateSegment-2agXAd0f.js";import o,{forwardRef as s,useRef as c}from"react";import ee from"classnames";import{mergeProps as l,useLocale as te,useTimeField as u}from"react-aria";import{useTimeFieldState as ne}from"react-stately";const d=s(({autoFocus:s,className:d,defaultValue:f,disabled:p,form:m,granularity:h,help:g,hideTimeZone:_,hourCycle:re,id:ie,invalid:v,invalidFeedback:y,label:b,maxValue:x,minValue:S,name:C,onBlur:w,onChange:T,onFocus:E,onKeyDown:D,onKeyUp:O,placeholderValue:k,readOnly:A,required:j,shouldForceLeadingZeros:M,size:N,valid:P,validFeedback:F,value:I,...L},R)=>{let z=c(null),B=t(R,z),V=c(null),{locale:H}=te(),U={"aria-label":L[`aria-label`],autoFocus:s,defaultValue:f,form:m,granularity:h,hideTimeZone:_,hourCycle:re,inputRef:V,isDisabled:p,isInvalid:v||void 0,isReadOnly:A,isRequired:j,maxValue:x,minValue:S,name:C,onBlur:w,onChange:T,onFocus:E,onKeyDown:D,onKeyUp:O,placeholderValue:k,shouldForceLeadingZeros:M,value:I},W=ne({...U,locale:H}),G=v||W.displayValidation.isInvalid,K=P&&!G,{describedBy:q,feedbackId:J,helpId:Y,inputId:ae,labelId:oe,labelledBy:X}=n({ariaDescribedBy:L[`aria-describedby`],ariaLabelledBy:L[`aria-labelledby`],help:g,id:ie,invalid:G,invalidFeedback:y,label:b,valid:K,validFeedback:F}),{descriptionProps:Z,errorMessageProps:Q,fieldProps:se,inputProps:ce}=u({...U,"aria-describedby":q,"aria-labelledby":X,id:ae},W,z),$=e(se,Z,Q);return r({children:o.createElement(o.Fragment,null,o.createElement(`div`,{...l($,L),"aria-describedby":$[`aria-describedby`],"aria-labelledby":X,className:ee(`form-input`,`time-field`,N,{disabled:p},i(G,K),d),ref:B,style:{...$.style,...L.style}},o.createElement(`div`,{className:`datepicker-field`},W.segments.map((e,t)=>o.createElement(a,{fieldLabelledBy:X,key:t,segment:e,slots:[Z,Q],state:W})))),o.createElement(`input`,{...ce,ref:V})),help:g,ids:{feedback:J,help:Y,label:oe},invalid:G,invalidFeedback:y,label:b,valid:K,validFeedback:F})});d.displayName=`TimeField`;export{d as t};
2
+ //# sourceMappingURL=time-field-B3MA7ED_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-field-B3MA7ED_.js","names":[],"sources":["../../src/components/time-field/TimeField.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, ReactNode, useRef } from 'react'\nimport classNames from 'classnames'\nimport { AriaTimeFieldProps, mergeProps, TimeValue, useLocale, useTimeField } from 'react-aria'\nimport { useTimeFieldState } from 'react-stately'\n\nimport { useForkedRef, useFormField } from '../../hooks'\nimport { withoutSlotIds } from '../../utils/idRefs'\nimport { validationClassName } from '../../utils/validationClassName'\nimport { DateSegment } from '../datepicker/DateSegment'\nimport { renderFormField } from '../form-field/renderFormField'\n\nexport interface TimeFieldProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange'\n> {\n /**\n * An accessible label for the field, used when there's no visible `label`.\n */\n 'aria-label'?: string\n /**\n * Identifies a visible element that labels the field.\n */\n 'aria-labelledby'?: string\n /**\n * Focus the first segment when the field mounts.\n */\n autoFocus?: boolean\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * The value of the field, uncontrolled.\n */\n defaultValue?: TimeValue | null\n /**\n * Toggle the disabled state for the component.\n */\n disabled?: boolean\n /**\n * The id of a form elsewhere on the page that the field belongs to.\n */\n form?: string\n /**\n * The smallest unit shown and edited.\n *\n * @default 'minute'\n */\n granularity?: 'hour' | 'minute' | 'second'\n /**\n * A description for the field, rendered below it.\n */\n help?: ReactNode\n /**\n * Hide the time zone of a `ZonedDateTime` value.\n */\n hideTimeZone?: boolean\n /**\n * Show 12 or 24 hours. Defaults to the locale's.\n */\n hourCycle?: 12 | 24\n /**\n * Set component validation state to invalid.\n */\n invalid?: boolean\n /**\n * An error message for the field, rendered below it when `invalid` is set.\n */\n invalidFeedback?: ReactNode\n /**\n * The field's caption, rendered as a `FormLabel` that names the field.\n */\n label?: ReactNode\n /**\n * The latest time. A later one entered marks the field invalid.\n */\n maxValue?: TimeValue | null\n /**\n * The earliest time. An earlier one entered marks the field invalid.\n */\n minValue?: TimeValue | null\n /**\n * The name the value is submitted under with a form, as an ISO 8601 time (`09:30:00`).\n */\n name?: string\n /**\n * Handler that is called when the value changes: once every segment has a value, and with\n * `null` once every segment is empty. A partly emptied field keeps its last value.\n */\n onChange?: (value: TimeValue | null) => void\n /**\n * The time the segments start from when the field is empty, such as `new Time(9)`. It also\n * sets the type of value `onChange` receives.\n */\n placeholderValue?: TimeValue\n /**\n * Toggle the readonly state for the component.\n */\n readOnly?: boolean\n /**\n * Toggle the required state for the component.\n */\n required?: boolean\n /**\n * Show a leading zero on the hour, as `09:30` rather than `9:30`, whatever the locale does.\n */\n shouldForceLeadingZeros?: boolean\n /**\n * Size the component sm or lg.\n */\n size?: 'sm' | 'lg'\n /**\n * Set component validation state to valid.\n */\n valid?: boolean\n /**\n * A success message for the field, rendered below it when `valid` is set.\n */\n validFeedback?: ReactNode\n /**\n * The value of the field, controlled: a `Time`, or a `CalendarDateTime` or `ZonedDateTime`\n * whose date is kept. `null` for an empty field.\n */\n value?: TimeValue | null\n}\n\ntype FieldProps = AriaTimeFieldProps<TimeValue>\n\n// A time as `DateField` renders a date for the date pickers: a `.form-input` holding one editable\n// segment per unit, with the segments' styles shared (`DateSegment`). The `.form-input` is the\n// field's group, named by the label; each segment is a spin button named by its unit and the\n// label.\nexport const TimeField = forwardRef<HTMLDivElement, TimeFieldProps>(\n (\n {\n autoFocus,\n className,\n defaultValue,\n disabled,\n form,\n granularity,\n help,\n hideTimeZone,\n hourCycle,\n id,\n invalid,\n invalidFeedback,\n label,\n maxValue,\n minValue,\n name,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholderValue,\n readOnly,\n required,\n shouldForceLeadingZeros,\n size,\n valid,\n validFeedback,\n value,\n ...rest\n },\n ref\n ) => {\n const fieldRef = useRef<HTMLDivElement>(null)\n const forkedRef = useForkedRef(ref, fieldRef)\n const inputRef = useRef<HTMLInputElement>(null)\n const { locale } = useLocale()\n\n // `label` stays out, as the other fields keep it: react-aria would name the field by a label\n // element of its own, which this component doesn't render.\n // `inputRef` is the hidden input's: react-aria resets the field with that input's form and\n // reports validity through it, as react-aria-components passes it, outside the public type.\n const baseProps: FieldProps & { inputRef: typeof inputRef } = {\n 'aria-label': rest['aria-label'],\n autoFocus,\n defaultValue,\n form,\n granularity,\n hideTimeZone,\n hourCycle,\n inputRef,\n isDisabled: disabled,\n // `false` would override react-aria's own range check: react-stately takes a defined\n // `isInvalid` as the whole validation state.\n isInvalid: invalid || undefined,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue,\n minValue,\n name,\n onBlur: onBlur as FieldProps['onBlur'],\n onChange,\n onFocus: onFocus as FieldProps['onFocus'],\n onKeyDown: onKeyDown as FieldProps['onKeyDown'],\n onKeyUp: onKeyUp as FieldProps['onKeyUp'],\n placeholderValue,\n shouldForceLeadingZeros,\n value\n }\n const state = useTimeFieldState({ ...baseProps, locale })\n // A time outside `minValue`/`maxValue` is invalid too, shown as `invalid` is: the state\n // knows before the ids are built, so the feedback describes the field either way.\n const showInvalid = invalid || state.displayValidation.isInvalid\n // A time outside the range isn't valid, whatever `valid` says.\n const showValid = valid && !showInvalid\n\n const { describedBy, feedbackId, helpId, inputId, labelId, labelledBy } = useFormField({\n ariaDescribedBy: rest['aria-describedby'],\n ariaLabelledBy: rest['aria-labelledby'],\n help,\n id,\n invalid: showInvalid,\n invalidFeedback,\n label,\n valid: showValid,\n validFeedback\n })\n\n const {\n descriptionProps,\n errorMessageProps,\n fieldProps: groupProps,\n inputProps\n } = useTimeField(\n { ...baseProps, 'aria-describedby': describedBy, 'aria-labelledby': labelledBy, id: inputId },\n state,\n fieldRef\n )\n\n // The field's `aria-describedby` from react-aria holds its description of the value, added\n // once mounted, and the help and feedback given to it; the slot ids come out (FORMS.md, gotcha\n // 6). It's set again after the spread, where the caller's own value would replace it (gotcha\n // 4).\n const group = withoutSlotIds(groupProps, descriptionProps, errorMessageProps)\n\n return renderFormField({\n children: (\n <>\n <div\n {...mergeProps(group, rest)}\n aria-describedby={group['aria-describedby']}\n aria-labelledby={labelledBy}\n className={classNames(\n 'form-input',\n 'time-field',\n size,\n { disabled },\n validationClassName(showInvalid, showValid),\n className\n )}\n ref={forkedRef}\n style={{ ...group.style, ...rest.style }}\n >\n <div className=\"datepicker-field\">\n {state.segments.map((segment, index) => (\n <DateSegment\n fieldLabelledBy={labelledBy}\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n segment={segment}\n slots={[descriptionProps, errorMessageProps]}\n state={state}\n />\n ))}\n </div>\n </div>\n <input {...inputProps} ref={inputRef} />\n </>\n ),\n help,\n ids: { feedback: feedbackId, help: helpId, label: labelId },\n invalid: showInvalid,\n invalidFeedback,\n label,\n valid: showValid,\n validFeedback\n })\n }\n)\n\nTimeField.displayName = 'TimeField'\n"],"mappings":"igBAoIA,MAAa,EAAY,GAErB,CACE,YACA,YACA,eACA,WACA,OACA,cACA,OACA,eACA,aACA,MACA,UACA,kBACA,QACA,WACA,WACA,OACA,SACA,WACA,UACA,YACA,UACA,mBACA,WACA,WACA,0BACA,OACA,QACA,gBACA,QACA,GAAG,GAEL,IACG,CACH,IAAM,EAAW,EAAuB,IAAI,EACtC,EAAY,EAAa,EAAK,CAAQ,EACtC,EAAW,EAAyB,IAAI,EACxC,CAAE,UAAW,GAAU,EAMvB,EAAwD,CAC5D,aAAc,EAAK,cACnB,YACA,eACA,OACA,cACA,eACA,aACA,WACA,WAAY,EAGZ,UAAW,GAAW,IAAA,GACtB,WAAY,EACZ,WAAY,EACZ,WACA,WACA,OACQ,SACR,WACS,UACE,YACF,UACT,mBACA,0BACA,OACF,EACM,EAAQ,GAAkB,CAAE,GAAG,EAAW,QAAO,CAAC,EAGlD,EAAc,GAAW,EAAM,kBAAkB,UAEjD,EAAY,GAAS,CAAC,EAEtB,CAAE,cAAa,aAAY,SAAQ,WAAS,WAAS,cAAe,EAAa,CACrF,gBAAiB,EAAK,oBACtB,eAAgB,EAAK,mBACrB,OACA,MACA,QAAS,EACT,kBACA,QACA,MAAO,EACP,eACF,CAAC,EAEK,CACJ,mBACA,oBACA,WAAY,GACZ,eACE,EACF,CAAE,GAAG,EAAW,mBAAoB,EAAa,kBAAmB,EAAY,GAAI,EAAQ,EAC5F,EACA,CACF,EAMM,EAAQ,EAAe,GAAY,EAAkB,CAAiB,EAE5E,OAAO,EAAgB,CACrB,SACE,EAAA,cAAA,EAAA,SAAA,KACE,EAAA,cAAC,MAAD,CACE,GAAI,EAAW,EAAO,CAAI,EAC1B,mBAAkB,EAAM,oBACxB,kBAAiB,EACjB,UAAW,GACT,aACA,aACA,EACA,CAAE,UAAS,EACX,EAAoB,EAAa,CAAS,EAC1C,CACF,EACA,IAAK,EACL,MAAO,CAAE,GAAG,EAAM,MAAO,GAAG,EAAK,KAAM,CAcpC,EAZH,EAAA,cAAC,MAAD,CAAK,UAAU,kBAWV,EAVF,EAAM,SAAS,KAAK,EAAS,IAC5B,EAAA,cAAC,EAAD,CACE,gBAAiB,EAEjB,IAAK,EACI,UACT,MAAO,CAAC,EAAkB,CAAiB,EACpC,OACR,CAAA,CACF,CACE,CACF,EACL,EAAA,cAAC,QAAD,CAAO,GAAI,GAAY,IAAK,CAAW,CAAA,CACvC,EAEJ,OACA,IAAK,CAAE,SAAU,EAAY,KAAM,EAAQ,MAAO,EAAQ,EAC1D,QAAS,EACT,kBACA,QACA,MAAO,EACP,eACF,CAAC,CACH,CACF,EAEA,EAAU,YAAc"}
@@ -0,0 +1,2 @@
1
+ import"./focus-ring-SR_LwaN7.js";import{t as e}from"./polymorphic-BhGNZQja.js";import{n as t,r as n,t as r}from"./useToastRegionQueue-CIV5SdiE.js";import{t as i}from"./Portal-CgeR1WXV.js";import{t as a}from"./Icon-DLB1f88W.js";import{n as o}from"./iconSlot-BNu2MrFI.js";import{t as s}from"./CloseButton-DPgQztE0.js";import c,{createContext as l,forwardRef as u,useContext as d}from"react";import f from"classnames";import{mergeProps as p}from"react-aria";import{ToastQueue as m}from"react-stately";const h=l({close:()=>{}}),g=()=>d(h);function _({children:e,className:t,closeButton:n,closeLabel:r,component:i,...a},o){let{close:l}=g(),u=i??`div`,d=f(`toast-body`,{"d-flex align-items-start justify-content-between gap-sm":n},t);return c.createElement(u,{className:d,...a,ref:o},n?c.createElement(`div`,null,e):e,n&&c.createElement(s,{label:r,onClick:l}))}const v=e(_,`ToastBody`);function y({children:e,className:t,component:n,...r},i){let a=n??`div`,o=f(`toast-footer`,t);return c.createElement(a,{className:o,...r,ref:i},e)}const b=e(y,`ToastFooter`);function x({children:e,className:t,closeButton:n,closeLabel:r,component:i,icon:a,time:l,titleId:u,...d},p){let{close:m}=g(),h=i??`div`,_=f(`toast-header`,t);return c.createElement(h,{className:_,...d,ref:p},a!=null&&(typeof a==`string`?c.createElement(`span`,{"aria-hidden":`true`,className:`me-sm`},c.createElement(o,{value:a,className:`toast-icon`})):c.createElement(`span`,{className:`me-sm`},a)),e!=null&&c.createElement(`strong`,{id:u,className:`me-auto`},e),l!=null&&c.createElement(`small`,null,l),n&&c.createElement(s,{label:r,onClick:m}))}const S=e(x,`ToastHeader`),C=u(({children:e,animation:r=!0,autohide:i=!0,className:a,closeButton:o,closeLabel:s,color:l,defaultVisible:u=!1,delay:d=5e3,footer:m,icon:g,message:_,role:y=`status`,solid:x,time:C,title:w,translucent:T,visible:E,onClose:D,onShow:O,onVisibleChange:k,...A},j)=>{let{close:M,entered:N,forkedRef:P,isMounted:F,textId:I,titleId:L,transitionClass:R,visible:z}=t({defaultVisible:u,displayName:`Toast`,onClose:D,onShow:O,onVisibleChange:k,ref:j,visible:E}),B=n({enabled:i,delay:d,visible:z&&N,onHide:M}),V={visible:z,close:M},H=f(`toast`,{fade:r,context:!!l,solid:!!(x&&l),translucent:T},l,a),U=g!=null||w!=null||C!=null,W=o&&(U||_==null),G=o&&!U&&_!=null,K=U||W;return F?c.createElement(h.Provider,{value:V},c.createElement(`div`,{className:f(H,R),role:y,"aria-labelledby":w==null?void 0:L,"aria-describedby":w!=null&&_!=null?I:void 0,...p(A,B),ref:P},K&&c.createElement(S,{icon:g,time:C,titleId:w==null?void 0:L,closeButton:W,closeLabel:s},w),_!=null&&c.createElement(v,{id:w!=null&&_!=null?I:void 0,closeButton:G,closeLabel:s},_),e,m!=null&&c.createElement(b,null,typeof m==`function`?m(M):m))):null});C.displayName=`Toast`;const w=u(({className:e,...t},n)=>{let r=f(`toast-icon`,e);return c.createElement(a,{className:r,...t,ref:n})});w.displayName=`ToastIcon`;const T=new m;function E(e,t={}){return T.add({children:e,...t})}function D(e){T.close(e)}const O=u(({children:e,className:t,placement:n,...a},o)=>{let{forkedRef:s,regionProps:l,state:u}=r(T,o),d=f(`toaster toast-container p-md`,{"position-fixed":n,"position-static":!n,"top-0":n&&n.includes(`top`),"top-50 translate-middle-y":n&&n.includes(`middle`),"bottom-0":n&&n.includes(`bottom`),"start-0":n&&n.includes(`start`),"start-50 translate-middle-x":n&&n.includes(`center`),"end-0":n&&n.includes(`end`)},t),p=t=>u.visibleToasts.length>0||e?c.createElement(`div`,{className:d,...l,...a,ref:t},e,u.visibleToasts.map(e=>{let{children:t,...n}=e.content;return c.createElement(C,{key:e.key,defaultVisible:!0,...n,onClose:()=>u.close(e.key)},t)})):null;return n?c.createElement(i,null,p(s)):p(s)});O.displayName=`Toaster`;export{w as a,b as c,T as i,v as l,E as n,C as o,D as r,S as s,O as t,g as u};
2
+ //# sourceMappingURL=toast-CGHl3-oU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast-CGHl3-oU.js","names":[],"sources":["../../src/components/toast/context.ts","../../src/hooks/useToast.ts","../../src/components/toast/ToastBody.tsx","../../src/components/toast/ToastFooter.tsx","../../src/components/toast/ToastHeader.tsx","../../src/components/toast/Toast.tsx","../../src/components/toast/ToastIcon.tsx","../../src/components/toast/toastQueue.ts","../../src/components/toast/Toaster.tsx"],"sourcesContent":["import { createContext } from 'react'\n\nexport interface ToastContextProps {\n /**\n * Whether the toast is currently visible.\n */\n visible?: boolean\n /**\n * Dismisses the toast. Wire this to any element's `onClick` — see `useToast`.\n */\n close: () => void\n}\n\nexport const ToastContext = createContext<ToastContextProps>({ close: () => {} })\n","import { useContext } from 'react'\nimport { ToastContext, ToastContextProps } from '../components/toast/context'\n\nexport type UseToastResult = ToastContextProps\n\n// Reach the enclosing `Toast`'s dismiss handler from anywhere in its composed markup — e.g. to\n// close it from a plain `Button` placed in a `ToastFooter`, instead of a dedicated close\n// component. Only meaningful inside a `Toast`; outside one it returns a no-op `close`.\nexport const useToast = (): UseToastResult => useContext(ToastContext)\n","import React, { ElementType, ForwardRefRenderFunction, ReactElement } from 'react'\nimport classNames from 'classnames'\n\nimport { CloseButton } from '../close-button/CloseButton'\nimport { useToast } from '../../hooks'\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef\n} from '../../utils/polymorphic'\n\ntype ToastBodyOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Adds a close button alongside the body content, so a toast composed without a\n * `ToastHeader` still gets a dismiss control without any manual layout markup.\n */\n closeButton?: boolean\n /**\n * Overrides the close button's accessible name (defaults to `'Close'`). Set this for\n * non-English UIs.\n */\n closeLabel?: string\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n */\n component?: C\n}\n\nexport type ToastBodyProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n ToastBodyOwnProps<C>\n>\n\ntype ToastBodyComponent = (<C extends ElementType = 'div'>(\n props: ToastBodyProps<C> & { ref?: PolymorphicRef<C> }\n) => ReactElement | null) & { displayName?: string }\n\nfunction ToastBodyRender<C extends ElementType = 'div'>(\n { children, className, closeButton, closeLabel, component, ...rest }: ToastBodyProps<C>,\n ref: PolymorphicRef<C>\n) {\n const { close } = useToast()\n const Component = component ?? 'div'\n const _className = classNames(\n 'toast-body',\n { 'd-flex align-items-start justify-content-between gap-sm': closeButton },\n className\n )\n return (\n <Component className={_className} {...rest} ref={ref}>\n {closeButton ? <div>{children}</div> : children}\n {closeButton && <CloseButton label={closeLabel} onClick={close} />}\n </Component>\n )\n}\n\nexport const ToastBody = createPolymorphicComponent<ToastBodyComponent>(\n ToastBodyRender as ForwardRefRenderFunction<Element, ToastBodyProps<ElementType>>,\n 'ToastBody'\n)\n","import React, { ElementType, ForwardRefRenderFunction, ReactElement } from 'react'\nimport classNames from 'classnames'\n\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef\n} from '../../utils/polymorphic'\n\ntype ToastFooterOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n */\n component?: C\n}\n\nexport type ToastFooterProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n ToastFooterOwnProps<C>\n>\n\ntype ToastFooterComponent = (<C extends ElementType = 'div'>(\n props: ToastFooterProps<C> & { ref?: PolymorphicRef<C> }\n) => ReactElement | null) & { displayName?: string }\n\nfunction ToastFooterRender<C extends ElementType = 'div'>(\n { children, className, component, ...rest }: ToastFooterProps<C>,\n ref: PolymorphicRef<C>\n) {\n const Component = component ?? 'div'\n const _className = classNames('toast-footer', className)\n\n return (\n <Component className={_className} {...rest} ref={ref}>\n {children}\n </Component>\n )\n}\n\nexport const ToastFooter = createPolymorphicComponent<ToastFooterComponent>(\n ToastFooterRender as ForwardRefRenderFunction<Element, ToastFooterProps<ElementType>>,\n 'ToastFooter'\n)\n","import React, { ElementType, ForwardRefRenderFunction, ReactElement, ReactNode } from 'react'\nimport classNames from 'classnames'\n\nimport { CloseButton } from '../close-button/CloseButton'\nimport { useToast } from '../../hooks'\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef\n} from '../../utils/polymorphic'\nimport { ResolvedIcon } from '../../utils/iconSlot'\n\ntype ToastHeaderOwnProps<C extends ElementType> = {\n /**\n * Heading, rendered before `time` as a `<strong>`.\n */\n children?: ReactNode\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Automatically add a close button to the header.\n */\n closeButton?: boolean\n /**\n * Overrides the close button's accessible name (defaults to `'Close'`). Set this for\n * non-English UIs.\n */\n closeLabel?: string\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n */\n component?: C\n /**\n * Leading icon. A string is an icon name, rendered like `<ToastIcon name={icon} />` (or by\n * `IconProvider`'s `component`) and hidden from\n * assistive technology by default, since it duplicates the heading visually. Pass any other\n * node for a fully custom icon (typically a logo or avatar) — a custom node is left as-is,\n * since it may carry its own meaningful accessible name (e.g. an avatar's `alt` text).\n */\n icon?: string | ReactNode\n /**\n * Trailing timestamp, rendered after the heading.\n */\n time?: ReactNode\n /**\n * Sets the `id` on the rendered heading element, for `aria-labelledby` wiring. Set\n * automatically by `Toast` when both `title` and `message` are used together; only needed\n * here for manual wiring in a fully custom composition.\n */\n titleId?: string\n}\n\nexport type ToastHeaderProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n ToastHeaderOwnProps<C>\n>\n\ntype ToastHeaderComponent = (<C extends ElementType = 'div'>(\n props: ToastHeaderProps<C> & { ref?: PolymorphicRef<C> }\n) => ReactElement | null) & { displayName?: string }\n\nfunction ToastHeaderRender<C extends ElementType = 'div'>(\n {\n children,\n className,\n closeButton,\n closeLabel,\n component,\n icon,\n time,\n titleId,\n ...rest\n }: ToastHeaderProps<C>,\n ref: PolymorphicRef<C>\n) {\n const { close } = useToast()\n const Component = component ?? 'div'\n const _className = classNames('toast-header', className)\n return (\n <Component className={_className} {...rest} ref={ref}>\n {icon != null &&\n (typeof icon === 'string' ? (\n <span aria-hidden=\"true\" className=\"me-sm\">\n <ResolvedIcon value={icon} className=\"toast-icon\" />\n </span>\n ) : (\n <span className=\"me-sm\">{icon}</span>\n ))}\n {children != null && (\n <strong id={titleId} className=\"me-auto\">\n {children}\n </strong>\n )}\n {time != null && <small>{time}</small>}\n {closeButton && <CloseButton label={closeLabel} onClick={close} />}\n </Component>\n )\n}\n\nexport const ToastHeader = createPolymorphicComponent<ToastHeaderComponent>(\n ToastHeaderRender as ForwardRefRenderFunction<Element, ToastHeaderProps<ElementType>>,\n 'ToastHeader'\n)\n","import React, { forwardRef, HTMLAttributes, ReactNode } from 'react'\nimport { mergeProps } from 'react-aria'\nimport classNames from 'classnames'\n\nimport { ContextColor } from '../../types'\nimport { useAutoDismiss, useDismissibleTransition } from '../../hooks'\nimport { ToastContext } from './context'\nimport { ToastBody } from './ToastBody'\nimport { ToastFooter } from './ToastFooter'\nimport { ToastHeader } from './ToastHeader'\n\nexport interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Apply a CSS fade transition to the toast.\n */\n animation?: boolean\n /**\n * Auto hide the toast. The timer starts once the show transition completes and pauses\n * while the pointer is over the toast or focus is within it.\n */\n autohide?: boolean\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Adds a close button — shorthand for `ToastHeader`'s/`ToastBody`'s `closeButton` prop.\n * Placed in the header when `icon`/`title`/`time` is set; otherwise placed in the body\n * alongside `message`, or in a header containing only the close button if `message` is\n * also unset.\n */\n closeButton?: boolean\n /**\n * Overrides the close button's accessible name (defaults to `'Close'`). Set this for\n * non-English UIs. Shorthand for `ToastHeader`'s `closeLabel` prop.\n */\n closeLabel?: string\n /**\n * Sets the color of the component to one of Chassis context colors.\n */\n color?: ContextColor\n /**\n * Whether the toast is shown when it first renders. Such a toast is uncontrolled: its close\n * button and the `autohide` timer hide it. Use `visible` to show and hide it from outside.\n */\n defaultVisible?: boolean\n /**\n * Delay hiding the toast (ms).\n */\n delay?: number\n /**\n * Trailing content — typically a row of `Button`s — rendered via a single `ToastFooter`,\n * after `message`/`children`. Pass a function to receive `close` directly, instead of\n * calling `useToast()` from a child component to wire up a \"Close\" action.\n */\n footer?: ReactNode | ((close: () => void) => ReactNode)\n /**\n * Leading icon for the header. A string is an icon name, rendered like\n * `<ToastIcon name={icon} />` (or by `IconProvider`'s `component`); pass\n * any other node for a fully custom icon (typically a logo or avatar). Shorthand for\n * `ToastHeader`'s `icon` prop; hidden from assistive technology by default, since it\n * duplicates `title` visually.\n */\n icon?: string | ReactNode\n /**\n * Message body, rendered via a single `ToastBody`. For multi-block content, compose\n * `children` manually instead — `message` wraps everything in one element.\n */\n message?: ReactNode\n /**\n * Header timestamp, rendered after `title`. Shorthand for `ToastHeader`'s `time` prop.\n */\n time?: ReactNode\n /**\n * Header heading, rendered before `time`. Shorthand for `ToastHeader`'s children. When set\n * alongside `message`, wires the toast's `aria-labelledby`/`aria-describedby` to them\n * automatically.\n */\n title?: ReactNode\n /**\n * Callback fired once the toast has hidden: after its exit transition.\n */\n onClose?: () => void\n /**\n * Callback fired when the toast starts to show.\n */\n onShow?: () => void\n /**\n * Callback fired with `false` when the toast asks to hide: its close button, `close` from\n * `useToast` or `footer`, or the `autohide` timer. With `visible` set, the toast hides only\n * when `visible` becomes `false`.\n */\n onVisibleChange?: (visible: boolean) => void\n /**\n * ARIA live-region role. Use `status` (the default) for confirmation, progress, and\n * informational messages, which announce politely. Use `alert` for messages that need\n * immediate attention — validation errors, failed operations — which interrupt speech.\n */\n role?: 'status' | 'alert'\n /**\n * Apply a full-color background with inverted text. Only meaningful alongside `color`.\n */\n solid?: boolean\n /**\n * Apply a semi-transparent background.\n */\n translucent?: boolean\n /**\n * Whether the toast is shown. Setting it makes the toast controlled: it hides only when this\n * becomes `false`, so pair it with `onVisibleChange`. Without either `visible` or\n * `defaultVisible` a toast renders nothing.\n */\n visible?: boolean\n}\n\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(\n (\n {\n children,\n animation = true,\n autohide = true,\n className,\n closeButton,\n closeLabel,\n color,\n defaultVisible = false,\n delay = 5000,\n footer,\n icon,\n message,\n role = 'status',\n solid,\n time,\n title,\n translucent,\n visible,\n onClose,\n onShow,\n onVisibleChange,\n ...rest\n },\n ref\n ) => {\n const {\n close,\n entered,\n forkedRef,\n isMounted,\n textId,\n titleId,\n transitionClass,\n visible: _visible\n } = useDismissibleTransition({\n defaultVisible,\n displayName: 'Toast',\n onClose,\n onShow,\n onVisibleChange,\n ref,\n visible\n })\n\n // The autohide timer is only meaningful once the show transition has actually finished (see\n // `autohide`'s JSDoc) — gating on `_visible` alone would start it the instant the toast is\n // asked to show, while it is still fading/sliding in.\n const autoDismissProps = useAutoDismiss({\n enabled: autohide,\n delay,\n visible: _visible && entered,\n onHide: close\n })\n\n const contextValues = {\n visible: _visible,\n close\n }\n\n const _className = classNames(\n 'toast',\n {\n fade: animation,\n context: !!color,\n solid: Boolean(solid && color),\n translucent\n },\n color,\n className\n )\n\n const hasHeaderShorthand = icon != null || title != null || time != null\n const headerGetsCloseButton = closeButton && (hasHeaderShorthand || message == null)\n const bodyGetsCloseButton = closeButton && !hasHeaderShorthand && message != null\n const hasHeaderContent = hasHeaderShorthand || headerGetsCloseButton\n\n if (!isMounted) return null\n\n return (\n <ToastContext.Provider value={contextValues}>\n <div\n className={classNames(_className, transitionClass)}\n role={role}\n aria-labelledby={title != null ? titleId : undefined}\n aria-describedby={title != null && message != null ? textId : undefined}\n {...mergeProps(rest, autoDismissProps)}\n ref={forkedRef}\n >\n {hasHeaderContent && (\n <ToastHeader\n icon={icon}\n time={time}\n titleId={title != null ? titleId : undefined}\n closeButton={headerGetsCloseButton}\n closeLabel={closeLabel}\n >\n {title}\n </ToastHeader>\n )}\n {message != null && (\n <ToastBody\n id={title != null && message != null ? textId : undefined}\n closeButton={bodyGetsCloseButton}\n closeLabel={closeLabel}\n >\n {message}\n </ToastBody>\n )}\n {children}\n {footer != null && (\n <ToastFooter>{typeof footer === 'function' ? footer(close) : footer}</ToastFooter>\n )}\n </div>\n </ToastContext.Provider>\n )\n }\n)\n\nToast.displayName = 'Toast'\n","import React, { forwardRef } from 'react'\nimport classNames from 'classnames'\n\nimport { Icon, IconProps } from '../icon/Icon'\n\nexport type ToastIconProps = IconProps & {\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n}\n\nexport const ToastIcon = forwardRef<HTMLSpanElement | SVGSVGElement, ToastIconProps>(\n ({ className, ...rest }, ref) => {\n const _className = classNames('toast-icon', className)\n\n return <Icon className={_className} {...rest} ref={ref} />\n }\n)\n\nToastIcon.displayName = 'ToastIcon'\n","import { ReactNode } from 'react'\nimport { ToastQueue } from 'react-stately'\n\nimport { ToastProps } from './Toast'\n\n// What `Toaster` spreads onto the `<Toast>` it renders for a queued toast: every `Toast` prop\n// that describes the toast itself. The queue owns whether it is shown.\nexport interface ToastContent extends Pick<\n ToastProps,\n | 'animation'\n | 'autohide'\n | 'closeButton'\n | 'closeLabel'\n | 'color'\n | 'delay'\n | 'footer'\n | 'icon'\n | 'message'\n | 'role'\n | 'solid'\n | 'time'\n | 'title'\n | 'translucent'\n> {\n /**\n * Content of the toast. Compose manually (typically a `ToastHeader`/`ToastBody`/\n * `ToastFooter`), or leave empty and use the `title`/`message`/`footer` shorthand options\n * instead.\n */\n children?: ReactNode\n}\n\n// The queue backing `Toaster` — a module-level singleton so `addToast()` is callable from\n// anywhere (an event handler, an async callback) without threading a `push` prop through\n// render. `Toaster` subscribes to it via `useToastQueue`; nothing renders until a\n// `<Toaster />` is actually mounted somewhere to display the queue's contents.\nexport const toastQueue = new ToastQueue<ToastContent>()\n\n// Adds a toast to the queue. Returns the toast's key, which can be passed to `closeToast` to\n// dismiss it programmatically. `children` is optional — omit it for a toast composed entirely\n// from the `title`/`message`/`footer` shorthand options.\nexport function addToast(\n children?: ReactNode,\n options: Omit<ToastContent, 'children'> = {}\n): string {\n return toastQueue.add({ children, ...options })\n}\n\n// Removes a queued toast immediately, bypassing its own exit animation.\nexport function closeToast(key: string): void {\n toastQueue.close(key)\n}\n","import React, { forwardRef, HTMLAttributes } from 'react'\nimport classNames from 'classnames'\n\nimport { useToastRegionQueue } from '../../hooks'\nimport { Portal } from '../portal/Portal'\nimport { Toast } from './Toast'\nimport { toastQueue } from './toastQueue'\n\nexport interface ToasterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Overrides the toast region's accessible name (defaults to `'Notifications'`, per\n * react-aria). Set this for non-English UIs, or to distinguish multiple toasters on the\n * same page.\n */\n 'aria-label'?: string\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Describes the placement of your component.\n *\n * @type 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end' | string\n */\n placement?:\n | 'top-start'\n | 'top-center'\n | 'top-end'\n | 'middle-start'\n | 'middle-center'\n | 'middle-end'\n | 'bottom-start'\n | 'bottom-center'\n | 'bottom-end'\n | string\n}\n\n// Renders the shared `toastQueue` (see `toastQueue.ts` — `addToast()` is how toasts get added\n// to it from anywhere in the app) plus any statically-passed `children`, e.g. a permanently\n// pinned toast alongside dynamic ones.\nexport const Toaster = forwardRef<HTMLDivElement, ToasterProps>(\n ({ children, className, placement, ...rest }, ref) => {\n const { forkedRef, regionProps, state } = useToastRegionQueue(toastQueue, ref)\n\n const _className = classNames(\n 'toaster toast-container p-md',\n {\n 'position-fixed': placement,\n 'position-static': !placement,\n 'top-0': placement && placement.includes('top'),\n 'top-50 translate-middle-y': placement && placement.includes('middle'),\n 'bottom-0': placement && placement.includes('bottom'),\n 'start-0': placement && placement.includes('start'),\n 'start-50 translate-middle-x': placement && placement.includes('center'),\n 'end-0': placement && placement.includes('end')\n },\n className\n )\n\n const toaster = (toasterRef?: React.Ref<HTMLDivElement>) => {\n return state.visibleToasts.length > 0 || children ? (\n <div className={_className} {...regionProps} {...rest} ref={toasterRef}>\n {children}\n {state.visibleToasts.map((queued) => {\n const { children: toastChildren, ...toastProps } = queued.content\n return (\n <Toast\n key={queued.key}\n defaultVisible\n {...toastProps}\n onClose={() => state.close(queued.key)}\n >\n {toastChildren}\n </Toast>\n )\n })}\n </div>\n ) : null\n }\n\n // A placed region is portaled to `document.body`, on the server as on the client: it renders\n // nothing until hydration has finished, instead of rendering inline on the server and moving\n // on the client, which discarded the server's markup.\n return placement ? <Portal>{toaster(forkedRef)}</Portal> : toaster(forkedRef)\n }\n)\n\nToaster.displayName = 'Toaster'\n"],"mappings":"kfAaA,MAAa,EAAe,EAAiC,CAAE,UAAa,CAAC,CAAE,CAAC,ECLnE,MAAiC,EAAW,CAAY,ECiCrE,SAAS,EACP,CAAE,WAAU,YAAW,cAAa,aAAY,YAAW,GAAG,GAC9D,EACA,CACA,GAAM,CAAE,SAAU,EAAS,EACrB,EAAY,GAAa,MACzB,EAAa,EACjB,aACA,CAAE,0DAA2D,CAAY,EACzE,CACF,EACA,OACE,EAAA,cAAC,EAAD,CAAW,UAAW,EAAY,GAAI,EAAW,KAGtC,EAFR,EAAc,EAAA,cAAC,MAAA,KAAK,CAAc,EAAI,EACtC,GAAe,EAAA,cAAC,EAAD,CAAa,MAAO,EAAY,QAAS,CAAQ,CAAA,CACxD,CAEf,CAEA,MAAa,EAAY,EACvB,EACA,WACF,EClCA,SAAS,EACP,CAAE,WAAU,YAAW,YAAW,GAAG,GACrC,EACA,CACA,IAAM,EAAY,GAAa,MACzB,EAAa,EAAW,eAAgB,CAAS,EAEvD,OACE,EAAA,cAAC,EAAD,CAAW,UAAW,EAAY,GAAI,EAAW,KAEtC,EADR,CACQ,CAEf,CAEA,MAAa,EAAc,EACzB,EACA,aACF,ECiBA,SAAS,EACP,CACE,WACA,YACA,cACA,aACA,YACA,OACA,OACA,UACA,GAAG,GAEL,EACA,CACA,GAAM,CAAE,SAAU,EAAS,EACrB,EAAY,GAAa,MACzB,EAAa,EAAW,eAAgB,CAAS,EACvD,OACE,EAAA,cAAC,EAAD,CAAW,UAAW,EAAY,GAAI,EAAW,KAgBtC,EAfR,GAAQ,OACN,OAAO,GAAS,SACf,EAAA,cAAC,OAAD,CAAM,cAAY,OAAO,UAAU,OAE7B,EADJ,EAAA,cAAC,EAAD,CAAc,MAAO,EAAM,UAAU,YAAc,CAAA,CAC/C,EAEN,EAAA,cAAC,OAAD,CAAM,UAAU,OAAoB,EAAX,CAAW,GAEvC,GAAY,MACX,EAAA,cAAC,SAAD,CAAQ,GAAI,EAAS,UAAU,SAEvB,EADL,CACK,EAET,GAAQ,MAAQ,EAAA,cAAC,QAAA,KAAO,CAAY,EACpC,GAAe,EAAA,cAAC,EAAD,CAAa,MAAO,EAAY,QAAS,CAAQ,CAAA,CACxD,CAEf,CAEA,MAAa,EAAc,EACzB,EACA,aACF,ECWa,EAAQ,GAEjB,CACE,WACA,YAAY,GACZ,WAAW,GACX,YACA,cACA,aACA,QACA,iBAAiB,GACjB,QAAQ,IACR,SACA,OACA,UACA,OAAO,SACP,QACA,OACA,QACA,cACA,UACA,UACA,SACA,kBACA,GAAG,GAEL,IACG,CACH,GAAM,CACJ,QACA,UACA,YACA,YACA,SACA,UACA,kBACA,QAAS,GACP,EAAyB,CAC3B,iBACA,YAAa,QACb,UACA,SACA,kBACA,MACA,SACF,CAAC,EAKK,EAAmB,EAAe,CACtC,QAAS,EACT,QACA,QAAS,GAAY,EACrB,OAAQ,CACV,CAAC,EAEK,EAAgB,CACpB,QAAS,EACT,OACF,EAEM,EAAa,EACjB,QACA,CACE,KAAM,EACN,QAAS,CAAC,CAAC,EACX,MAAO,GAAQ,GAAS,GACxB,aACF,EACA,EACA,CACF,EAEM,EAAqB,GAAQ,MAAQ,GAAS,MAAQ,GAAQ,KAC9D,EAAwB,IAAgB,GAAsB,GAAW,MACzE,EAAsB,GAAe,CAAC,GAAsB,GAAW,KACvE,EAAmB,GAAsB,EAI/C,OAFK,EAGH,EAAA,cAAC,EAAa,SAAd,CAAuB,MAAO,CAkCP,EAjCrB,EAAA,cAAC,MAAD,CACE,UAAW,EAAW,EAAY,CAAe,EAC3C,OACN,kBAAiB,GAAS,KAAiB,IAAA,GAAV,EACjC,mBAAkB,GAAS,MAAQ,GAAW,KAAO,EAAS,IAAA,GAC9D,GAAI,EAAW,EAAM,CAAgB,EACrC,IAAK,CA0BF,EAxBF,GACC,EAAA,cAAC,EAAD,CACQ,OACA,OACN,QAAS,GAAS,KAAiB,IAAA,GAAV,EACzB,YAAa,EACD,YAGD,EADV,CACU,EAEd,GAAW,MACV,EAAA,cAAC,EAAD,CACE,GAAI,GAAS,MAAQ,GAAW,KAAO,EAAS,IAAA,GAChD,YAAa,EACD,YAGH,EADR,CACQ,EAEZ,EACA,GAAU,MACT,EAAA,cAAC,EAAA,KAAa,OAAO,GAAW,WAAa,EAAO,CAAK,EAAI,CAAoB,CAEhF,CACgB,EArCF,IAuCzB,CACF,EAEA,EAAM,YAAc,QChOpB,MAAa,EAAY,GACtB,CAAE,YAAW,GAAG,GAAQ,IAAQ,CAC/B,IAAM,EAAa,EAAW,aAAc,CAAS,EAErD,OAAO,EAAA,cAAC,EAAD,CAAM,UAAW,EAAY,GAAI,EAAW,KAAM,CAAA,CAC3D,CACF,EAEA,EAAU,YAAc,YCgBxB,MAAa,EAAa,IAAI,EAK9B,SAAgB,EACd,EACA,EAA0C,CAAC,EACnC,CACR,OAAO,EAAW,IAAI,CAAE,WAAU,GAAG,CAAQ,CAAC,CAChD,CAGA,SAAgB,EAAW,EAAmB,CAC5C,EAAW,MAAM,CAAG,CACtB,CCXA,MAAa,EAAU,GACpB,CAAE,WAAU,YAAW,YAAW,GAAG,GAAQ,IAAQ,CACpD,GAAM,CAAE,YAAW,cAAa,SAAU,EAAoB,EAAY,CAAG,EAEvE,EAAa,EACjB,+BACA,CACE,iBAAkB,EAClB,kBAAmB,CAAC,EACpB,QAAS,GAAa,EAAU,SAAS,KAAK,EAC9C,4BAA6B,GAAa,EAAU,SAAS,QAAQ,EACrE,WAAY,GAAa,EAAU,SAAS,QAAQ,EACpD,UAAW,GAAa,EAAU,SAAS,OAAO,EAClD,8BAA+B,GAAa,EAAU,SAAS,QAAQ,EACvE,QAAS,GAAa,EAAU,SAAS,KAAK,CAChD,EACA,CACF,EAEM,EAAW,GACR,EAAM,cAAc,OAAS,GAAK,EACvC,EAAA,cAAC,MAAD,CAAK,UAAW,EAAY,GAAI,EAAa,GAAI,EAAM,IAAK,CAevD,EAdF,EACA,EAAM,cAAc,IAAK,GAAW,CACnC,GAAM,CAAE,SAAU,EAAe,GAAG,GAAe,EAAO,QAC1D,OACE,EAAA,cAAC,EAAD,CACE,IAAK,EAAO,IACZ,eAAA,GACA,GAAI,EACJ,YAAe,EAAM,MAAM,EAAO,GAAG,CAGhC,EADJ,CACI,CAEX,CAAC,CACE,EACH,KAMN,OAAO,EAAY,EAAA,cAAC,EAAA,KAAQ,EAAQ,CAAS,CAAU,EAAI,EAAQ,CAAS,CAC9E,CACF,EAEA,EAAQ,YAAc"}
@@ -0,0 +1,2 @@
1
+ import"./focus-ring-SR_LwaN7.js";import{i as e,o as t}from"./slot-CNhFZdHF.js";import{t as n}from"./useForkedRef-DVEfT-KI.js";import{n as ee,t as r}from"./Portal-CgeR1WXV.js";import{t as i}from"./useTransitionState-e5ToY7eX.js";import{n as a,r as o,t as s}from"./useFloatingOverlay-DLIvwx-8.js";import{t as c}from"./useOpenStateProps-DykUbnPJ.js";import{i as l,n as u}from"./overlayPlacement-BtS90IVf.js";import d,{forwardRef as f,useEffect as p,useRef as m}from"react";import h from"classnames";import{mergeProps as g,useOverlayPosition as _,useTooltip as v,useTooltipTrigger as y}from"react-aria";import{useTooltipTriggerState as b}from"react-stately";const x=f(function({children:f,className:x,content:S,defaultVisible:C,placement:w=`top`,offset:T=[0,6],onHide:E,onShow:D,onVisibleChange:O,style:k,trigger:A,visible:j,...M},N){let P=m(null),F=m(null),I=m(null),L=n(N,I),R=e(f,`Tooltip`),z=b({...c({defaultVisible:C,onVisibleChange:O,visible:j},`Tooltip`),trigger:A,delay:0,closeDelay:0}),B=j!==void 0&&!O,{triggerProps:V,tooltipProps:H}=y({trigger:A},B?{...z,isOpen:!1}:z,F),{tooltipProps:U}=v({},z),W=z.open;p(()=>{z.isOpen&&W(!0)},[z.isOpen]);let G=o({close:()=>z.close(!0),isOpen:z.isOpen,onHide:E,onShow:D,triggerRef:F}),{overlayProps:K,arrowProps:q,placement:J}=_({targetRef:F,overlayRef:I,placement:l(w),offset:T[1],crossOffset:T[0],arrowSize:8,arrowRef:P,isOpen:z.isOpen}),Y={...k,position:K.style?.position,top:K.style?.top,left:K.style?.left},X=u(w,J),{isMounted:Z,phase:Q}=i({in:z.isOpen,mountOnEnter:!0,nodeRef:I,unmountOnExit:!0}),$=ee();return d.createElement(d.Fragment,null,R?t(R,g($?V:{...V,"aria-describedby":void 0},$&&B&&z.isOpen?{"aria-describedby":H.id}:{}),F):f,d.createElement(r,{container:G},Z&&d.createElement(`div`,{...g(H,U,M),className:h(`tooltip cx-tooltip-auto`,a(Q),x),"data-cx-placement":X,ref:L,style:Y},d.createElement(`div`,{className:`tooltip-arrow`,...q,style:s(q)}),d.createElement(`div`,{className:`tooltip-inner`},S))))});x.displayName=`Tooltip`;export{x as t};
2
+ //# sourceMappingURL=tooltip-Bc-u6nIW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip-Bc-u6nIW.js","names":[],"sources":["../../src/components/tooltip/Tooltip.tsx"],"sourcesContent":["import React, {\n forwardRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n useEffect,\n useRef\n} from 'react'\nimport classNames from 'classnames'\nimport { mergeProps, useOverlayPosition, useTooltip, useTooltipTrigger } from 'react-aria'\nimport { useTooltipTriggerState } from 'react-stately'\n\nimport {\n getOverlayArrowStyle,\n getOverlayTransitionClass,\n useFloatingOverlay,\n useForkedRef,\n useOpenStateProps,\n useTransitionState\n} from '../../hooks'\nimport { Placement, resolveDataPlacement, toAriaPlacement } from '../../utils/overlayPlacement'\nimport { Portal, useHydrated } from '../portal/Portal'\nimport { getTriggerChild, renderSlotted } from '../../utils/slot'\n\nexport type { Placement }\n\n// Every attribute besides the component's own props goes to the panel, the `.tooltip` element:\n// `className`, `style`, `id`, `data-*`, ARIA attributes and event handlers. So does the ref.\nexport interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'content'> {\n /**\n * The trigger: a single element, which shows the tooltip on hover and focus.\n */\n children: ReactElement\n /**\n * Content node for your component.\n */\n content: ReactNode | string\n /**\n * Whether the tooltip is shown when it first renders. Use it instead of `visible` when nothing\n * outside needs to control the tooltip.\n */\n defaultVisible?: boolean\n /**\n * Offset of the tooltip relative to its target, as `[crossAxis, mainAxis]`.\n */\n offset?: [number, number]\n /**\n * Callback fired when the tooltip hides.\n */\n onHide?: () => void\n /**\n * Callback fired when the tooltip shows.\n */\n onShow?: () => void\n /**\n * Callback fired when the tooltip asks to show or hide: hover, focus, blur, the Escape key, or\n * the closing of the dialog it is in. Receives the state it asks for. With `visible` set, the\n * tooltip changes only when `visible` does.\n */\n onVisibleChange?: (visible: boolean) => void\n /**\n * Describes the preferred placement of your component. Chassis will flip it to keep it in\n * view.\n */\n placement?: Placement\n /**\n * Tooltips always show on focus, since keyboard/screen-reader users need them too. Set to\n * `'focus'` to disable the hover trigger and show on focus only.\n */\n trigger?: 'hover' | 'focus'\n /**\n * Whether the tooltip is shown. Setting it makes the tooltip controlled: it shows and hides\n * only when this changes, so pair it with `onVisibleChange`. Leave it unset, or use\n * `defaultVisible`, for a tooltip that shows and hides itself.\n */\n visible?: boolean\n}\n\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(function Tooltip(\n {\n children,\n className,\n content,\n defaultVisible,\n placement = 'top',\n offset: offsetProp = [0, 6],\n onHide,\n onShow,\n onVisibleChange,\n style,\n trigger,\n visible,\n ...rest\n },\n ref\n) {\n const arrowRef = useRef<HTMLDivElement>(null)\n const triggerRef = useRef<HTMLElement | null>(null)\n const floatingRef = useRef<HTMLDivElement>(null)\n const forkedFloatingRef = useForkedRef(ref, floatingRef)\n\n // The trigger is rendered as `asChild` renders a child (`renderSlotted`): `triggerProps` merge\n // into the child's own props, so its handlers chain and its `aria-describedby` adds up, and\n // `triggerRef` is forked with the ref the caller put on the child.\n const triggerElement = getTriggerChild(children, 'Tooltip')\n\n // react-stately defaults to a 1500ms warmup delay (and 500ms cooldown) before a first tooltip\n // shows, spectrum-style — chassis-css's own JS plugin defaults to instant (`delay: 0`), so\n // match that here rather than leaving new adopters to wonder why the first hover lags.\n const state = useTooltipTriggerState({\n ...useOpenStateProps({ defaultVisible, onVisibleChange, visible }, 'Tooltip'),\n trigger,\n delay: 0,\n closeDelay: 0\n })\n // While a tooltip is open, react-aria stops every Escape at the document and closes the\n // tooltip with it. One held open by `visible` with no `onVisibleChange` never closes, so it\n // would swallow Escape for the whole page: a popover, a menu or a dialog beside it could no\n // longer be closed by it. Such a tooltip is passed as closed, which is all the hook reads the\n // state for besides `aria-describedby`, set below.\n const isHeld = visible !== undefined && !onVisibleChange\n const { triggerProps, tooltipProps: tooltipTriggerProps } = useTooltipTrigger(\n { trigger },\n isHeld ? { ...state, isOpen: false } : state,\n triggerRef\n )\n const { tooltipProps } = useTooltip({}, state)\n\n // react-stately shows one tooltip at a time, but counts only a tooltip it opened through\n // `open()`. One shown by `visible` or `defaultVisible` joins here, so the next tooltip to open\n // asks it to hide, and it closes the ones already open.\n const registerOpen = state.open\n useEffect(() => {\n if (state.isOpen) registerOpen(true)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.isOpen])\n\n // Bypasses the hook's hover-warmup delay (`close`'s `immediate` argument): a containing dialog\n // closing applies right away.\n const portalContainer = useFloatingOverlay({\n close: () => state.close(true),\n isOpen: state.isOpen,\n onHide,\n onShow,\n triggerRef\n })\n\n const {\n overlayProps,\n arrowProps,\n placement: resolvedPlacement\n } = useOverlayPosition({\n targetRef: triggerRef,\n overlayRef: floatingRef,\n placement: toAriaPlacement(placement),\n offset: offsetProp[1],\n crossOffset: offsetProp[0],\n arrowSize: 8,\n arrowRef,\n isOpen: state.isOpen\n })\n\n // The caller's `style` first: the position is the component's to set.\n const floatingStyle: React.CSSProperties = {\n ...style,\n position: overlayProps.style?.position as React.CSSProperties['position'],\n top: overlayProps.style?.top,\n left: overlayProps.style?.left\n }\n const placementAttr = resolveDataPlacement(placement, resolvedPlacement)\n\n const { isMounted, phase } = useTransitionState({\n in: state.isOpen,\n mountOnEnter: true,\n nodeRef: floatingRef,\n unmountOnExit: true\n })\n\n // The tooltip is portaled, so it exists only once hydration has finished: until then the\n // trigger isn't described by it, or its HTML would refer to an id no element has.\n const hydrated = useHydrated()\n\n return (\n <>\n {triggerElement\n ? renderSlotted(\n triggerElement,\n mergeProps(\n hydrated ? triggerProps : { ...triggerProps, 'aria-describedby': undefined },\n hydrated && isHeld && state.isOpen\n ? { 'aria-describedby': tooltipTriggerProps.id }\n : {}\n ),\n triggerRef\n )\n : children}\n <Portal container={portalContainer}>\n {isMounted && (\n <div\n {...mergeProps(tooltipTriggerProps, tooltipProps, rest)}\n className={classNames(\n 'tooltip cx-tooltip-auto',\n getOverlayTransitionClass(phase),\n className\n )}\n data-cx-placement={placementAttr}\n ref={forkedFloatingRef}\n style={floatingStyle}\n >\n <div\n className=\"tooltip-arrow\"\n {...arrowProps}\n style={getOverlayArrowStyle(arrowProps)}\n ></div>\n <div className=\"tooltip-inner\">{content}</div>\n </div>\n )}\n </Portal>\n </>\n )\n})\n\nTooltip.displayName = 'Tooltip'\n"],"mappings":"8oBA8EA,MAAa,EAAU,EAAyC,SAC9D,CACE,WACA,YACA,UACA,iBACA,YAAY,MACZ,OAAQ,EAAa,CAAC,EAAG,CAAC,EAC1B,SACA,SACA,kBACA,QACA,UACA,UACA,GAAG,GAEL,EACA,CACA,IAAM,EAAW,EAAuB,IAAI,EACtC,EAAa,EAA2B,IAAI,EAC5C,EAAc,EAAuB,IAAI,EACzC,EAAoB,EAAa,EAAK,CAAW,EAKjD,EAAiB,EAAgB,EAAU,SAAS,EAKpD,EAAQ,EAAuB,CACnC,GAAG,EAAkB,CAAE,iBAAgB,kBAAiB,SAAQ,EAAG,SAAS,EAC5E,UACA,MAAO,EACP,WAAY,CACd,CAAC,EAMK,EAAS,IAAY,IAAA,IAAa,CAAC,EACnC,CAAE,eAAc,aAAc,GAAwB,EAC1D,CAAE,SAAQ,EACV,EAAS,CAAE,GAAG,EAAO,OAAQ,EAAM,EAAI,EACvC,CACF,EACM,CAAE,gBAAiB,EAAW,CAAC,EAAG,CAAK,EAKvC,EAAe,EAAM,KAC3B,MAAgB,CACV,EAAM,QAAQ,EAAa,EAAI,CAErC,EAAG,CAAC,EAAM,MAAM,CAAC,EAIjB,IAAM,EAAkB,EAAmB,CACzC,UAAa,EAAM,MAAM,EAAI,EAC7B,OAAQ,EAAM,OACd,SACA,SACA,YACF,CAAC,EAEK,CACJ,eACA,aACA,UAAW,GACT,EAAmB,CACrB,UAAW,EACX,WAAY,EACZ,UAAW,EAAgB,CAAS,EACpC,OAAQ,EAAW,GACnB,YAAa,EAAW,GACxB,UAAW,EACX,WACA,OAAQ,EAAM,MAChB,CAAC,EAGK,EAAqC,CACzC,GAAG,EACH,SAAU,EAAa,OAAO,SAC9B,IAAK,EAAa,OAAO,IACzB,KAAM,EAAa,OAAO,IAC5B,EACM,EAAgB,EAAqB,EAAW,CAAiB,EAEjE,CAAE,YAAW,SAAU,EAAmB,CAC9C,GAAI,EAAM,OACV,aAAc,GACd,QAAS,EACT,cAAe,EACjB,CAAC,EAIK,EAAW,GAAY,EAE7B,OACE,EAAA,cAAA,EAAA,SAAA,KACG,EACG,EACE,EACA,EACE,EAAW,EAAe,CAAE,GAAG,EAAc,mBAAoB,IAAA,EAAU,EAC3E,GAAY,GAAU,EAAM,OACxB,CAAE,mBAAoB,EAAoB,EAAG,EAC7C,CAAC,CACP,EACA,CACF,EACA,EACJ,EAAA,cAAC,EAAD,CAAQ,UAAW,CAqBX,EApBL,GACC,EAAA,cAAC,MAAD,CACE,GAAI,EAAW,EAAqB,EAAc,CAAI,EACtD,UAAW,EACT,0BACA,EAA0B,CAAK,EAC/B,CACF,EACA,oBAAmB,EACnB,IAAK,EACL,MAAO,CAQJ,EANH,EAAA,cAAC,MAAD,CACE,UAAU,gBACV,GAAI,EACJ,MAAO,EAAqB,CAAU,CAClC,CAAA,EACN,EAAA,cAAC,MAAD,CAAK,UAAU,eAA8B,EAAb,CAAa,CAC1C,CAED,CACR,CAEN,CAAC,EAED,EAAQ,YAAc"}
@@ -0,0 +1,2 @@
1
+ import"./focus-ring-SR_LwaN7.js";import{t as e}from"./iconSlot-BNu2MrFI.js";import t,{createContext as n,forwardRef as r,useContext as i,useMemo as a,useRef as o}from"react";import s from"classnames";import{useButton as c,useCheckbox as l}from"react-aria";import{useToggleState as u}from"react-stately";import{ButtonContext as d,CheckboxContext as f,Collection as p,Tree as m,TreeItem as h,TreeItemContent as g,useContextProps as _,useSlottedContext as v}from"react-aria-components";const y=n({checkboxes:!1}),b=r(({autoFocus:e,checkboxes:n,children:r,className:i,expandIcon:o,renderEmptyState:c,selectionBehavior:l=`toggle`,selectionMode:u=`none`,...d},f)=>{let p=a(()=>({checkboxes:n??(u===`multiple`&&l===`toggle`),expandIcon:o}),[n,o,l,u]);return t.createElement(y.Provider,{value:p},t.createElement(m,{...d,autoFocus:e===!0?`first`:e,className:s(`tree`,i),ref:f,renderEmptyState:c&&(()=>c()),selectionBehavior:l,selectionMode:u},r))});b.displayName=`Tree`;const x=({disabled:n})=>{let{expandIcon:r}=i(y),[a,o]=_({slot:`chevron`},null,d),{buttonProps:s}=c({...a,isDisabled:n},o);return t.createElement(`button`,{...s,className:`tree-item-toggle`,ref:o},t.createElement(e,{className:`tree-item-toggle-icon`,icon:`expand`,override:r}))},S=()=>{let e=v(f,`selection`),n=u(e),r=o(null),{inputProps:i}=l(e,n,r);return t.createElement(`input`,{...i,"aria-describedby":void 0,className:`check-input tree-item-check`,ref:r})},C=e=>t.createElement(`div`,{...e,"aria-labelledby":void 0}),w=({hasChildItems:e,icon:n,isDisabled:r,label:a,selectionMode:o})=>{let{checkboxes:s}=i(y);return t.createElement(t.Fragment,null,e?t.createElement(x,{disabled:r}):t.createElement(`span`,{className:`tree-item-spacer`}),s&&o!==`none`&&t.createElement(S,null),n!=null&&t.createElement(`span`,{"aria-hidden":`true`,className:`tree-item-icon`},n),t.createElement(`span`,{className:`tree-item-label`},a))},T=r(({children:e,className:n,dependencies:r,disabled:i,icon:a,id:o,items:c,label:l,onAction:u,style:d,textValue:f},m)=>{let _=f??(typeof l==`string`||typeof l==`number`?String(l):``);return t.createElement(h,{className:({isDisabled:e,isExpanded:t,isSelected:r})=>s(`tree-item`,{active:r,disabled:e,expanded:t},n),id:o,isDisabled:i,onAction:u,ref:m,render:C,style:({level:e})=>({...d,"--cx-tree-level":e}),textValue:_},t.createElement(g,null,({hasChildItems:e,isDisabled:n,selectionMode:r})=>t.createElement(w,{hasChildItems:e,icon:a,isDisabled:n,label:l,selectionMode:r})),c?t.createElement(p,{dependencies:r,items:c},e):typeof e==`function`?null:e)});T.displayName=`TreeItem`;export{b as n,T as t};
2
+ //# sourceMappingURL=tree-Cql1veeZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-Cql1veeZ.js","names":["AriaTree","Tree","AriaTreeItem","TreeItem"],"sources":["../../src/components/tree/context.ts","../../src/components/tree/Tree.tsx","../../src/components/tree/TreeItem.tsx"],"sourcesContent":["import { createContext } from 'react'\n\nimport { IconValue } from '../../utils/iconConfig'\n\n// What a `Tree` tells its items: whether a selectable item draws a checkbox, and the chevron to\n// draw. Private to this folder: an item reads it, nothing outside the tree does.\nexport interface TreeConfig {\n checkboxes: boolean\n expandIcon?: IconValue\n}\n\nexport const TreeConfigContext = createContext<TreeConfig>({ checkboxes: false })\n","import React, { CSSProperties, forwardRef, ReactElement, ReactNode, Ref, useMemo } from 'react'\nimport classNames from 'classnames'\nimport { Key, Selection, Tree as AriaTree } from 'react-aria-components'\n\nimport { IconValue } from '../../utils/iconConfig'\nimport { TreeConfigContext } from './context'\nimport './Tree.scss'\n\nexport interface TreeProps<T extends object> {\n /**\n * An accessible name for the tree, when no visible heading names it.\n */\n 'aria-label'?: string\n /**\n * The id of the visible heading that names the tree.\n */\n 'aria-labelledby'?: string\n /**\n * Focus the tree when it mounts: `true` or `'first'` focuses its first item, `'last'` its last.\n */\n autoFocus?: boolean | 'first' | 'last'\n /**\n * Draw a checkbox in every item, which selects the item. On by default with\n * `selectionMode=\"multiple\"` and the `'toggle'` selection behavior, off otherwise.\n */\n checkboxes?: boolean\n /**\n * `TreeItem` elements, or a render function called once per entry of `items`, returning that\n * entry's `TreeItem`.\n */\n children: ReactNode | ((item: T) => ReactElement)\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * The keys of the items expanded at first (uncontrolled).\n */\n defaultExpandedKeys?: Iterable<Key>\n /**\n * The keys of the items selected at first (uncontrolled): `'all'`, or an iterable of keys.\n */\n defaultSelectedKeys?: 'all' | Iterable<Key>\n /**\n * Values that should rebuild the items when using the `items`/render-function form of\n * `children` — e.g. a value from outside `items` that the render function reads. Without this,\n * changing that value won't re-render the items, which are only rebuilt when `items` or\n * `dependencies` change by reference.\n */\n dependencies?: ReadonlyArray<unknown>\n /**\n * Whether `disabledKeys` disables every interaction with an item, or only its selection.\n *\n * @default 'all'\n */\n disabledBehavior?: 'all' | 'selection'\n /**\n * The keys of the items that are disabled.\n */\n disabledKeys?: Iterable<Key>\n /**\n * Keep at least one item selected: the last selected item can't be deselected.\n */\n disallowEmptySelection?: boolean\n /**\n * The keys of the expanded items (controlled).\n */\n expandedKeys?: Iterable<Key>\n /**\n * The chevron of an item with child items, in place of `IconProvider`'s `expand` icon: an icon\n * name, or an element.\n */\n expandIcon?: IconValue\n /**\n * The id of the tree element.\n */\n id?: string\n /**\n * The data to render as items, through the function form of `children`.\n */\n items?: Iterable<T>\n /**\n * Called with an item's key when the item is activated: with Enter, or with a click when the\n * tree has no selection. An item's own `onAction` is called too.\n */\n onAction?: (key: Key) => void\n /**\n * Called with the keys of the expanded items when an item expands or collapses.\n */\n onExpandedChange?: (keys: Set<Key>) => void\n /**\n * Called with the keys of the selected items (`'all'`, or a `Set`) when the selection changes.\n */\n onSelectionChange?: (keys: Selection) => void\n /**\n * What to render in place of the items when there are none.\n */\n renderEmptyState?: () => ReactNode\n /**\n * The keys of the selected items (controlled): `'all'`, or an iterable of keys.\n */\n selectedKeys?: 'all' | Iterable<Key>\n /**\n * How a click changes a multiple selection: `'toggle'` adds or removes the clicked item,\n * `'replace'` selects it alone, with Ctrl, Cmd and Shift for more, as a file manager does.\n *\n * @default 'toggle'\n */\n selectionBehavior?: 'toggle' | 'replace'\n /**\n * Whether items can be selected, and how many at a time.\n *\n * @default 'none'\n */\n selectionMode?: 'none' | 'single' | 'multiple'\n /**\n * Inline styles for the tree element.\n */\n style?: CSSProperties\n}\n\nconst TreeInner = <T extends object>(\n {\n autoFocus,\n checkboxes,\n children,\n className,\n expandIcon,\n renderEmptyState,\n selectionBehavior = 'toggle',\n selectionMode = 'none',\n ...rest\n }: TreeProps<T>,\n ref: Ref<HTMLDivElement>\n) => {\n // A checkbox per item is the toggle behavior's way of selecting several; the replace behavior\n // selects by click, as a file manager does.\n const config = useMemo(\n () => ({\n checkboxes: checkboxes ?? (selectionMode === 'multiple' && selectionBehavior === 'toggle'),\n expandIcon\n }),\n [checkboxes, expandIcon, selectionBehavior, selectionMode]\n )\n\n // react-aria-components builds the collection from `children`, flattens it by `expandedKeys`\n // and renders every visible item as a row of a `treegrid`, on the server too, so the server's\n // HTML holds the expanded items.\n return (\n <TreeConfigContext.Provider value={config}>\n <AriaTree\n {...rest}\n // react-aria focuses the tree element itself for `true`; the first item is what a\n // keyboard user expects.\n autoFocus={autoFocus === true ? 'first' : autoFocus}\n className={classNames('tree', className)}\n ref={ref}\n renderEmptyState={renderEmptyState && (() => renderEmptyState())}\n selectionBehavior={selectionBehavior}\n selectionMode={selectionMode}\n >\n {children}\n </AriaTree>\n </TreeConfigContext.Provider>\n )\n}\n\n// `forwardRef` erases type parameters, so the generic component is cast back to a generic\n// signature for callers — the pattern `DataGrid` uses.\nexport const Tree = forwardRef(TreeInner) as <T extends object>(\n props: TreeProps<T> & { ref?: Ref<HTMLDivElement> }\n) => ReactElement\n\n;(Tree as { displayName?: string }).displayName = 'Tree'\n","import React, {\n CSSProperties,\n forwardRef,\n ReactElement,\n ReactNode,\n Ref,\n useContext,\n useRef\n} from 'react'\nimport classNames from 'classnames'\nimport { AriaButtonProps, AriaCheckboxProps, useButton, useCheckbox } from 'react-aria'\nimport { useToggleState } from 'react-stately'\nimport {\n ButtonContext,\n ButtonProps,\n CheckboxContext,\n CheckboxProps,\n Collection,\n Key,\n TreeItem as AriaTreeItem,\n TreeItemContent,\n TreeItemContentRenderProps,\n useContextProps,\n useSlottedContext\n} from 'react-aria-components'\n\nimport { IconSlot } from '../../utils/iconSlot'\nimport { TreeConfigContext } from './context'\n\nexport interface TreeItemProps<T extends object = object> {\n /**\n * The item's child items: `TreeItem` elements, or a render function called once per entry of\n * `items`, returning that entry's `TreeItem`.\n */\n children?: ReactNode | ((item: T) => ReactElement)\n /**\n * A string of all className you want applied to the item.\n */\n className?: string\n /**\n * Values that should rebuild the child items when using the `items`/render-function form of\n * `children`, as `Tree`'s `dependencies`.\n */\n dependencies?: ReadonlyArray<unknown>\n /**\n * Toggle the disabled state for the item, as a key in the tree's `disabledKeys` does.\n */\n disabled?: boolean\n /**\n * An icon drawn before the label.\n */\n icon?: ReactNode\n /**\n * The item's key, named by `expandedKeys`, `selectedKeys` and `disabledKeys`. Defaults to the\n * key of the data entry the item renders, or to the item's position.\n */\n id?: Key\n /**\n * The data to render as child items, through the function form of `children`.\n */\n items?: Iterable<T>\n /**\n * The item's content.\n */\n label: ReactNode\n /**\n * Called when the item is activated: with Enter, or with a click when the tree has no\n * selection.\n */\n onAction?: () => void\n /**\n * Inline styles for the item's row.\n */\n style?: CSSProperties\n /**\n * The item's text, which typing a letter in the tree searches. Defaults to `label` when it is a\n * string.\n */\n textValue?: string\n}\n\n// The chevron: a button react-aria-components hands its props (the toggle, \"Expand\"/\"Collapse\"\n// named after the row, out of the tab order) through `ButtonContext`'s `chevron` slot, and whose\n// ref it checks for, so it is read from that slot rather than rendered as its own `Button`. The\n// icon goes through `IconSlot`, so `IconProvider` and the tree's `expandIcon` can replace it.\nconst TreeItemToggle = ({ disabled }: { disabled: boolean }) => {\n const { expandIcon } = useContext(TreeConfigContext)\n const [props, ref] = useContextProps({ slot: 'chevron' } as ButtonProps, null, ButtonContext)\n // The slot's `onPress` does nothing on a disabled row, but says nothing of it: the button is\n // disabled too.\n const { buttonProps } = useButton({ ...(props as AriaButtonProps), isDisabled: disabled }, ref)\n return (\n <button {...buttonProps} className=\"tree-item-toggle\" ref={ref}>\n <IconSlot className=\"tree-item-toggle-icon\" icon=\"expand\" override={expandIcon} />\n </button>\n )\n}\n\n// The selection checkbox: react-aria-components publishes its props (selected, disabled, named\n// \"Select\" after the row) on `CheckboxContext`'s `selection` slot, as `DataGridSelectionCell`\n// reads them. A native `<input class=\"check-input\">` takes chassis-css's checkbox styles as is.\nconst TreeItemCheckbox = () => {\n const props = useSlottedContext(CheckboxContext, 'selection') as CheckboxProps\n const state = useToggleState(props as AriaCheckboxProps)\n const ref = useRef<HTMLInputElement>(null)\n const { inputProps } = useCheckbox(props as AriaCheckboxProps, state, ref)\n // `aria-describedby` after the spread: react-aria's own adds ids it never renders (FORMS.md,\n // gotcha 6), on the server only.\n return (\n <input\n {...inputProps}\n aria-describedby={undefined}\n className=\"check-input tree-item-check\"\n ref={ref}\n />\n )\n}\n\n// The row's element. react-aria's `useGridListItem` names the row by itself and a description\n// slot (`aria-labelledby=\"<row> <description>\"`) that nothing renders: the slot id is written on\n// the server and dropped once the browser finds no element with it (FORMS.md, gotcha 6), so the\n// settled row has `aria-label` alone. react-aria-components' `TreeItem` doesn't declare the\n// `render` prop its elements take, hence the cast where it is passed.\nconst renderRow = (props: React.JSX.IntrinsicElements['div']) => (\n <div {...props} aria-labelledby={undefined} />\n)\n\nconst TreeItemBody = ({\n hasChildItems,\n icon,\n isDisabled,\n label,\n selectionMode\n}: Pick<TreeItemContentRenderProps, 'hasChildItems' | 'isDisabled' | 'selectionMode'> & {\n icon?: ReactNode\n label: ReactNode\n}) => {\n const { checkboxes } = useContext(TreeConfigContext)\n return (\n <>\n {hasChildItems ? (\n <TreeItemToggle disabled={isDisabled} />\n ) : (\n <span className=\"tree-item-spacer\" />\n )}\n {checkboxes && selectionMode !== 'none' && <TreeItemCheckbox />}\n {icon != null && (\n <span aria-hidden=\"true\" className=\"tree-item-icon\">\n {icon}\n </span>\n )}\n <span className=\"tree-item-label\">{label}</span>\n </>\n )\n}\n\nconst TreeItemInner = <T extends object>(\n {\n children,\n className,\n dependencies,\n disabled,\n icon,\n id,\n items,\n label,\n onAction,\n style,\n textValue\n }: TreeItemProps<T>,\n ref: Ref<HTMLDivElement>\n) => {\n const text =\n textValue ?? (typeof label === 'string' || typeof label === 'number' ? String(label) : '')\n\n // The row is a `div` with `role=\"row\"`, holding one `gridcell` with the content; child items\n // render as the rows after it, not inside it. `--cx-tree-level` carries the level to the\n // stylesheet, which indents by it; written prefixed here because the build prefixes the\n // stylesheet's custom properties, not this inline one.\n return (\n <AriaTreeItem\n className={({ isDisabled, isExpanded, isSelected }) =>\n classNames(\n 'tree-item',\n { active: isSelected, disabled: isDisabled, expanded: isExpanded },\n className\n )\n }\n id={id}\n isDisabled={disabled}\n onAction={onAction}\n ref={ref}\n {...({ render: renderRow } as object)}\n style={({ level }) => ({ ...style, '--cx-tree-level': level }) as CSSProperties}\n textValue={text}\n >\n <TreeItemContent>\n {({ hasChildItems, isDisabled, selectionMode }) => (\n <TreeItemBody\n hasChildItems={hasChildItems}\n icon={icon}\n isDisabled={isDisabled}\n label={label}\n selectionMode={selectionMode}\n />\n )}\n </TreeItemContent>\n {items ? (\n <Collection dependencies={dependencies} items={items}>\n {children as (item: T) => ReactElement}\n </Collection>\n ) : typeof children === 'function' ? null : (\n // A render function with no `items` has nothing to render: the leaf of a tree whose\n // one function renders every level.\n children\n )}\n </AriaTreeItem>\n )\n}\n\n/**\n * An item of a `Tree`: a row with a label, an optional icon, and child items among its children.\n */\nexport const TreeItem = forwardRef(TreeItemInner) as <T extends object = object>(\n props: TreeItemProps<T> & { ref?: Ref<HTMLDivElement> }\n) => ReactElement\n\n;(TreeItem as { displayName?: string }).displayName = 'TreeItem'\n"],"mappings":"meAWA,MAAa,EAAoB,EAA0B,CAAE,WAAY,EAAM,CAAC,EC8JnEC,EAAO,GA/ClB,CACE,YACA,aACA,WACA,YACA,aACA,mBACA,oBAAoB,SACpB,gBAAgB,OAChB,GAAG,GAEL,IACG,CAGH,IAAM,EAAS,OACN,CACL,WAAY,IAAe,IAAkB,YAAc,IAAsB,UACjF,YACF,GACA,CAAC,EAAY,EAAY,EAAmB,CAAa,CAC3D,EAKA,OACE,EAAA,cAAC,EAAkB,SAAnB,CAA4B,MAAO,CAcP,EAb1B,EAAA,cAACD,EAAD,CACE,GAAI,EAGJ,UAAW,IAAc,GAAO,QAAU,EAC1C,UAAW,EAAW,OAAQ,CAAS,EAClC,MACL,iBAAkB,QAA2B,EAAiB,GAC3C,oBACJ,eAGP,EADP,CACO,CACgB,CAEhC,CAIwC,EAIvC,EAAmC,YAAc,OCxFlD,MAAM,GAAkB,CAAE,cAAsC,CAC9D,GAAM,CAAE,cAAe,EAAW,CAAiB,EAC7C,CAAC,EAAO,GAAO,EAAgB,CAAE,KAAM,SAAU,EAAkB,KAAM,CAAa,EAGtF,CAAE,eAAgB,EAAU,CAAE,GAAI,EAA2B,WAAY,CAAS,EAAG,CAAG,EAC9F,OACE,EAAA,cAAC,SAAD,CAAQ,GAAI,EAAa,UAAU,mBAAwB,KAEnD,EADN,EAAA,cAAC,EAAD,CAAU,UAAU,wBAAwB,KAAK,SAAS,SAAU,CAAa,CAAA,CAC3E,CAEZ,EAKM,MAAyB,CAC7B,IAAM,EAAQ,EAAkB,EAAiB,WAAW,EACtD,EAAQ,EAAe,CAA0B,EACjD,EAAM,EAAyB,IAAI,EACnC,CAAE,cAAe,EAAY,EAA4B,EAAO,CAAG,EAGzE,OACE,EAAA,cAAC,QAAD,CACE,GAAI,EACJ,mBAAkB,IAAA,GAClB,UAAU,8BACL,KACN,CAAA,CAEL,EAOM,EAAa,GACjB,EAAA,cAAC,MAAD,CAAK,GAAI,EAAO,kBAAiB,IAAA,EAAY,CAAA,EAGzC,GAAgB,CACpB,gBACA,OACA,aACA,QACA,mBAII,CACJ,GAAM,CAAE,cAAe,EAAW,CAAiB,EACnD,OACE,EAAA,cAAA,EAAA,SAAA,KACG,EACC,EAAA,cAAC,EAAD,CAAgB,SAAU,CAAa,CAAA,EAEvC,EAAA,cAAC,OAAD,CAAM,UAAU,kBAAoB,CAAA,EAErC,GAAc,IAAkB,QAAU,EAAA,cAAC,EAAA,IAAkB,EAC7D,GAAQ,MACP,EAAA,cAAC,OAAD,CAAM,cAAY,OAAO,UAAU,gBAE7B,EADH,CACG,EAER,EAAA,cAAC,OAAD,CAAM,UAAU,iBAA+B,EAAZ,CAAY,CAC/C,CAEN,EAqEaG,EAAW,GAlEtB,CACE,WACA,YACA,eACA,WACA,OACA,KACA,QACA,QACA,WACA,QACA,aAEF,IACG,CACH,IAAM,EACJ,IAAc,OAAO,GAAU,UAAY,OAAO,GAAU,SAAW,OAAO,CAAK,EAAI,IAMzF,OACE,EAAA,cAACD,EAAD,CACE,WAAY,CAAE,aAAY,aAAY,gBACpC,EACE,YACA,CAAE,OAAQ,EAAY,SAAU,EAAY,SAAU,CAAW,EACjE,CACF,EAEE,KACJ,WAAY,EACF,WACL,MACE,OAAQ,EACf,OAAQ,CAAE,YAAa,CAAE,GAAG,EAAO,kBAAmB,CAAM,GAC5D,UAAW,CAsBC,EApBZ,EAAA,cAAC,EAAA,MACG,CAAE,gBAAe,aAAY,mBAC7B,EAAA,cAAC,EAAD,CACiB,gBACT,OACM,aACL,QACQ,eAChB,CAAA,CAEY,EAChB,EACC,EAAA,cAAC,EAAD,CAA0B,eAAqB,OAEnC,EADT,CACS,EACV,OAAO,GAAa,WAAa,KAGnC,CAEU,CAElB,CAKgD,EAI/C,EAAuC,YAAc"}
@@ -3,6 +3,20 @@
3
3
  * Breakpoints
4
4
  */
5
5
  type Breakpoint = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
6
+ /**
7
+ * Container breakpoints: the same widths, measured on the nearest query container instead of the
8
+ * viewport. chassis-css's `@md:` classes.
9
+ */
10
+ type ContainerBreakpoint = '@sm' | '@md' | '@lg' | '@xl' | '@2xl';
11
+ /**
12
+ * A prop value that can change with the width. A plain value applies at every width. An object
13
+ * holds one value per width: `base` from the narrowest, each breakpoint key from that breakpoint
14
+ * up, as in `{ base: 'column', md: 'row' }`. `K` is the keys the prop reads: the viewport
15
+ * breakpoints unless the component also takes the container ones.
16
+ */
17
+ type Responsive<T, K extends string = Breakpoint> = T | ({
18
+ base?: T;
19
+ } & Partial<Record<K, T>>);
6
20
  /**
7
21
  * Context colors
8
22
  */
@@ -31,4 +45,5 @@ type Spacing = (typeof SPACING)[number];
31
45
  */
32
46
  type Shapes = 'rounded' | 'rounded-top' | 'rounded-end' | 'rounded-bottom' | 'rounded-start' | 'rounded-circle' | 'rounded-pill' | 'rounded-0' | 'rounded-1' | 'rounded-2' | 'rounded-3';
33
47
  //#endregion
34
- export { Shapes as a, ExtendedSizing as i, ContextColor as n, Sizing as o, ContextStyle as r, Spacing as s, Breakpoint as t };
48
+ export { ExtendedSizing as a, Sizing as c, ContextStyle as i, Spacing as l, ContainerBreakpoint as n, Responsive as o, ContextColor as r, Shapes as s, Breakpoint as t };
49
+ //# sourceMappingURL=types-D6FM7bYR.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{mergeProps as e}from"react-aria";const t=[`aria-describedby`,`aria-details`,`aria-label`,`aria-labelledby`,`id`],n=[`autoFocus`,`onBlur`,`onFocus`,`onKeyDown`,`onKeyUp`],r=[...n,`defaultValue`,`onBeforeInput`,`onChange`,`onCompositionEnd`,`onCompositionStart`,`onCompositionUpdate`,`onCopy`,`onCut`,`onInput`,`onPaste`,`onSelect`,`value`],i=[...n,`onChange`,`onClick`,`value`],a=(n,r,i=[])=>{let a={};for(let[e,n]of Object.entries(r))!t.includes(e)&&!i.includes(e)&&(a[e]=n);return e(n,a)};export{i as n,a as r,r as t};
2
+ //# sourceMappingURL=unhandledProps-9Kdj7WVf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unhandledProps-9Kdj7WVf.js","names":[],"sources":["../../src/utils/unhandledProps.ts"],"sourcesContent":["import { mergeProps } from 'react-aria'\n\n// Every hook reads these through `filterDOMProps`' `labelable` option, and a component merges\n// its own ids into them (`useFormField`'s `labelledBy`/`describedBy`, `useField`'s label id), so\n// the caller's raw value must not win again (FORMS.md, gotcha 4).\nconst LABELLING_PROPS = ['aria-describedby', 'aria-details', 'aria-label', 'aria-labelledby', 'id']\n\n// Read by `useFocusable`, which every focusable input hook calls.\nconst FOCUSABLE_PROPS = ['autoFocus', 'onBlur', 'onFocus', 'onKeyDown', 'onKeyUp']\n\n// Read by `useTextField`, and by `useNumberField` through it.\nexport const TEXT_FIELD_PROPS = [\n ...FOCUSABLE_PROPS,\n 'defaultValue',\n 'onBeforeInput',\n 'onChange',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onCopy',\n 'onCut',\n 'onInput',\n 'onPaste',\n 'onSelect',\n 'value'\n]\n\n// Read by `useToggle` (`useCheckbox`, `useCheckboxGroupItem`, `useSwitch`) and by `useRadio`.\nexport const TOGGLE_PROPS = [...FOCUSABLE_PROPS, 'onChange', 'onClick', 'value']\n\n// A react-aria hook's DOM props, with the props it didn't handle merged after them. A hook\n// returns only the few props it knows (`filterDOMProps` without its `global` and `events`\n// options), so a `title`, `dir`, `lang`, `onClick` or `tabIndex` given to the component never\n// reached the element. `mergeProps` runs both of two event handlers and lets the caller's value\n// win otherwise. `handled` names the props the hook reads itself: its handlers would run twice,\n// and its values would undo what the hook made of them.\nexport const mergeUnhandledProps = <T extends object>(\n hookProps: T,\n props: object,\n handled: readonly string[] = []\n): T => {\n const unhandled: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(props)) {\n if (!LABELLING_PROPS.includes(key) && !handled.includes(key)) unhandled[key] = value\n }\n return mergeProps(hookProps, unhandled) as T\n}\n"],"mappings":"wCAKA,MAAM,EAAkB,CAAC,mBAAoB,eAAgB,aAAc,kBAAmB,IAAI,EAG5F,EAAkB,CAAC,YAAa,SAAU,UAAW,YAAa,SAAS,EAGpE,EAAmB,CAC9B,GAAG,EACH,eACA,gBACA,WACA,mBACA,qBACA,sBACA,SACA,QACA,UACA,UACA,WACA,OACF,EAGa,EAAe,CAAC,GAAG,EAAiB,WAAY,UAAW,OAAO,EAQlE,GACX,EACA,EACA,EAA6B,CAAC,IACxB,CACN,IAAM,EAAqC,CAAC,EAC5C,IAAK,GAAM,CAAC,EAAK,KAAU,OAAO,QAAQ,CAAK,EACzC,CAAC,EAAgB,SAAS,CAAG,GAAK,CAAC,EAAQ,SAAS,CAAG,IAAG,EAAU,GAAO,GAEjF,OAAO,EAAW,EAAW,CAAS,CACxC"}
@@ -1 +1,2 @@
1
- import{t as e}from"./useForkedRef-DVEfT-KI.js";import{useRef as t}from"react";import{useButton as n}from"react-aria";const r=(r,{disabled:i,onClick:a})=>{let o=t(null),s=e(r,o),{buttonProps:c}=n({elementType:`div`,isDisabled:i,onClick:a},o);return{buttonProps:c,forkedRef:s}};export{r as t};
1
+ import{t as e}from"./useForkedRef-DVEfT-KI.js";import{useRef as t}from"react";import{useButton as n}from"react-aria";const r=(r,{disabled:i,onClick:a})=>{let o=t(null),s=e(r,o),{buttonProps:c}=n({elementType:`div`,isDisabled:i,onClick:a},o);return{buttonProps:c,forkedRef:s}};export{r as t};
2
+ //# sourceMappingURL=useButtonSemantics-CILM_lhi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useButtonSemantics-CILM_lhi.js","names":[],"sources":["../../src/hooks/useButtonSemantics.ts"],"sourcesContent":["import { MouseEventHandler, Ref, RefObject, useRef } from 'react'\nimport { AriaButtonProps, useButton } from 'react-aria'\n\nimport { useForkedRef } from './useForkedRef'\n\ninterface UseButtonSemanticsOptions<T extends HTMLElement> {\n disabled?: boolean\n onClick?: MouseEventHandler<T>\n}\n\n// Synthesizes native button semantics (role, tabIndex, Enter/Space activation) for a\n// non-native `component` — a `<button>`/`<a>`/`<input>` gets all of this for free from the\n// browser, but an arbitrary `component` (e.g. `'div'`, `'span'`) doesn't. Shared by\n// `Link`/`Button`/`CloseButton`, which otherwise duplicated this ref/hook wiring near-verbatim.\n// `elementType: 'div'` and the `HTMLDivElement` cast below are fixed regardless of the actual\n// rendered tag — `useButton` only uses `elementType` to pick which ARIA attributes apply\n// (a `div`-shaped set is the right one for an arbitrary non-native element either way), not to\n// constrain the ref's real type.\nexport const useButtonSemantics = <T extends HTMLElement>(\n ref: Ref<T>,\n { disabled, onClick }: UseButtonSemanticsOptions<T>\n) => {\n const buttonRef = useRef<T | null>(null)\n const forkedRef = useForkedRef(ref, buttonRef)\n const buttonAriaProps: AriaButtonProps<'div'> = {\n elementType: 'div',\n isDisabled: disabled,\n onClick: onClick as unknown as AriaButtonProps<'div'>['onClick']\n }\n const { buttonProps } = useButton(buttonAriaProps, buttonRef as RefObject<HTMLDivElement | null>)\n\n return { buttonProps, forkedRef }\n}\n"],"mappings":"qHAkBA,MAAa,GACX,EACA,CAAE,WAAU,aACT,CACH,IAAM,EAAY,EAAiB,IAAI,EACjC,EAAY,EAAa,EAAK,CAAS,EAMvC,CAAE,eAAgB,EAAU,CAJhC,YAAa,MACb,WAAY,EACH,SAEqC,EAAG,CAA6C,EAEhG,MAAO,CAAE,cAAa,WAAU,CAClC"}
@@ -0,0 +1,2 @@
1
+ import{useState as e}from"react";function t(t,n,r){let i=t!==void 0,[a,o]=e(n);return[i?t:a,e=>{i||o(e),r?.(e)}]}export{t};
2
+ //# sourceMappingURL=useControllableState-CPUJxfKW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useControllableState-CPUJxfKW.js","names":[],"sources":["../../src/hooks/useControllableState.ts"],"sourcesContent":["import { useState } from 'react'\n\n/**\n * Shared controlled/uncontrolled state pattern: `value` present means controlled (the returned\n * state always mirrors it), otherwise state is tracked internally starting from `defaultValue`.\n * The returned setter updates internal state (when uncontrolled) and always calls `onChange`,\n * leaving the caller free to layer additional logic (e.g. an `onComplete` callback) around it.\n */\nexport function useControllableState<T>(\n value: T | undefined,\n defaultValue: T,\n onChange?: (value: T) => void\n): [T, (next: T) => void] {\n const isControlled = value !== undefined\n const [uncontrolledValue, setUncontrolledValue] = useState<T>(defaultValue)\n const state = isControlled ? (value as T) : uncontrolledValue\n\n const setState = (next: T) => {\n if (!isControlled) setUncontrolledValue(next)\n onChange?.(next)\n }\n\n return [state, setState]\n}\n"],"mappings":"iCAQA,SAAgB,EACd,EACA,EACA,EACwB,CACxB,IAAM,EAAe,IAAU,IAAA,GACzB,CAAC,EAAmB,GAAwB,EAAY,CAAY,EAQ1E,MAAO,CAPO,EAAgB,EAAc,EAE1B,GAAY,CACvB,GAAc,EAAqB,CAAI,EAC5C,IAAW,CAAI,CACjB,CAEuB,CACzB"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./useForkedRef-DVEfT-KI.js";import{t}from"./useControllableState-CPUJxfKW.js";import{t as n}from"./useIsomorphicLayoutEffect-BbqRwuqn.js";import{t as r}from"./dialogTransition-i9vw0i2Z.js";import{useEffect as i,useRef as a,useState as o}from"react";import{usePreventScroll as s}from"react-aria";const c=new WeakMap;function l(e){let t=new Set,n=e,r=n?.closest(`dialog`)??null;for(;n&&r&&!r.open;){if(t.has(r))return null;t.add(r),n=c.get(r)??null,r=n?.closest(`dialog`)??null}return n}const u=({backdrop:u,defaultVisible:d,instant:f,isModal:p,keyboard:m=!0,onBeforeShow:h,onClick:g,onClose:_,onClosePrevented:v,onHidden:y,onShow:b,onShown:x,onVisibleChange:S,open:C,ref:w,visible:T})=>{let E=a(null),D=e(w,E),[O,k]=t(T,d??C??!1,S),[A,j]=o(!1),[M,N]=o(!1),[P,F]=o(!1),I=a(!1),L=a(null);s({isDisabled:!P});let R=()=>{_?.(),O&&k(!1)},z=()=>{v?.();let e=E.current;e&&(N(!0),r(e,()=>N(!1),!f))},B=a(R);B.current=R;let V=a(z);return V.current=z,n(()=>{let e=E.current;if(e){if(O){if(e.open)return;h?.(e),L.current=document.activeElement instanceof HTMLElement?document.activeElement:null,c.set(e,L.current),I.current=p,p?(e.showModal(),F(!0)):e.show();let t=[...e.querySelectorAll(`[autofocus], [data-autofocus]:not([data-autofocus="false"])`)].find(t=>t.closest(`dialog`)===e);return t?t.focus():(e.setAttribute(`tabindex`,`-1`),e.focus()),b?.(),j(!1),r(e,()=>x?.(),!f)}e.open&&j(!0)}},[O]),i(()=>{let e=E.current;if(A&&e)return r(e,()=>{let t=document.activeElement,n=!t||t===document.body||e.contains(t);e.open&&e.close(),I.current&&F(!1),j(!1),y?.();let r=n?l(L.current):null;r&&document.contains(r)&&r.focus()},!f)},[A]),i(()=>{let e=E.current;if(!e)return;let t=e=>{if(!(e.key!==`Escape`||I.current)){if(e.preventDefault(),!m){V.current();return}B.current()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[m]),{close:R,dialogRef:E,forkedRef:D,handleBackdropClick:e=>{if(g?.(e),e.target===E.current&&I.current){if(u===`static`){z();return}R()}},handleCancel:e=>{if(e.preventDefault(),!m){z();return}R()},hiding:A,staticBounce:M}};export{u as t};
2
+ //# sourceMappingURL=useDialogElement-CgOnJAzu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialogElement-CgOnJAzu.js","names":[],"sources":["../../src/hooks/useDialogElement.ts"],"sourcesContent":["import {\n ForwardedRef,\n MouseEvent as ReactMouseEvent,\n MouseEventHandler,\n SyntheticEvent,\n useEffect,\n useRef,\n useState\n} from 'react'\nimport { usePreventScroll } from 'react-aria'\n\nimport { useControllableState } from './useControllableState'\nimport { useForkedRef } from './useForkedRef'\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'\nimport { executeAfterTransition } from '../utils/dialogTransition'\n\nexport interface UseDialogElementOptions {\n /**\n * Same-named prop from the caller (`Modal`/`Drawer`) — only ever consulted here to\n * distinguish `'static'` from everything else for the backdrop-click/Escape bounce.\n */\n backdrop?: boolean | 'static'\n /**\n * Initial open state of an uncontrolled dialog.\n */\n defaultVisible?: boolean\n /**\n * Disables the open/close transition entirely.\n */\n instant?: boolean\n /**\n * Whether this open should use `showModal()` (top-layer, native backdrop, scroll-locked) or\n * `show()` — `Modal` passes its own `modal` prop straight through; `Drawer` derives it from\n * `backdrop`/`scroll` instead, since its vanilla chassis-css counterpart does the same.\n */\n isModal: boolean\n /**\n * Closes on the escape key / native `cancel` event.\n */\n keyboard?: boolean\n /**\n * Fires synchronously right before a closed dialog actually opens (after the \"already open\"\n * bail-out, before capturing the pre-open trigger element) — `Drawer`'s only hook into the\n * show effect, used to auto-close every other open drawer first.\n */\n onBeforeShow?: (dialog: HTMLDialogElement) => void\n /**\n * The caller's own `onClick`, chained ahead of the backdrop-click handling below rather than\n * left in the props spread — a `<dialog>` needs `onClick` for its own backdrop detection, so\n * spreading the caller's alongside it silently dropped one of the two. Fires for every click\n * on the dialog, not just backdrop ones.\n */\n onClick?: MouseEventHandler<HTMLDialogElement>\n onClose?: () => void\n onClosePrevented?: () => void\n onHidden?: () => void\n onShow?: () => void\n onShown?: () => void\n /**\n * Fired with `false` for each close request, beside `onClose`.\n */\n onVisibleChange?: (visible: boolean) => void\n /**\n * The native `open` attribute the caller renders. Without `visible` or `defaultVisible`, it is\n * the initial state: the dialog is rendered open (non-modal) from the first paint, server HTML\n * included, and stays open until a close request, instead of being closed on mount.\n */\n open?: boolean\n ref: ForwardedRef<HTMLDialogElement>\n /**\n * Controlled open state; `undefined` means uncontrolled.\n */\n visible?: boolean\n}\n\n// The element each open dialog returns focus to when it closes.\nconst restoreTargets = new WeakMap<HTMLDialogElement, HTMLElement | null>()\n\n// The element a closing dialog returns focus to. A dialog opened from another dialog that has\n// closed since (the second alert of a chain) can't return focus to its trigger, which is hidden,\n// so it follows that dialog's own target, and so on. A loop (going back and forth between two\n// dialogs) gives up.\nfunction resolveRestoreTarget(trigger: HTMLElement | null): HTMLElement | null {\n const seen = new Set<HTMLDialogElement>()\n let target = trigger\n let owner = target?.closest('dialog') ?? null\n while (target && owner && !owner.open) {\n if (seen.has(owner)) return null\n seen.add(owner)\n target = restoreTargets.get(owner) ?? null\n owner = target?.closest('dialog') ?? null\n }\n return target\n}\n\n// Shared open/close machinery for a native `<dialog>`-based component — `Modal` and `Drawer`\n// otherwise duplicated this near-verbatim: forked ref, the show/begin-hide effect (showModal()\n// vs. show(), initial focus, scroll lock), the finish-hide effect (waits out the exit\n// transition), the non-modal Escape-key listener (the native `cancel` event only fires for\n// dialogs opened with `showModal()`), and the static-backdrop \"bounce\" used by both the\n// backdrop-click handler and the Escape/`cancel` handler. What's left in each caller is only\n// what's genuinely component-specific: `Modal`/`Drawer`'s own `_className` building, and\n// `Drawer`'s cross-instance \"auto-close every other open drawer\" registry (wired in via\n// `onBeforeShow`, since it needs to run at one precise point inside the show effect).\n//\n// A dialog has no trigger of its own, so the only change it asks for is a close: Escape, a\n// backdrop click, a close button. That request fires `onClose` and `onVisibleChange(false)`.\n// Controlled by `visible`, the dialog stays open until the caller sets it to `false`; with\n// `defaultVisible` it closes itself.\nexport const useDialogElement = ({\n backdrop,\n defaultVisible,\n instant,\n isModal,\n keyboard = true,\n onBeforeShow,\n onClick,\n onClose,\n onClosePrevented,\n onHidden,\n onShow,\n onShown,\n onVisibleChange,\n open,\n ref,\n visible\n}: UseDialogElementOptions) => {\n const dialogRef = useRef<HTMLDialogElement>(null)\n const forkedRef = useForkedRef(ref, dialogRef)\n\n const [_visible, setVisible] = useControllableState(\n visible,\n defaultVisible ?? open ?? false,\n onVisibleChange\n )\n const [hiding, setHiding] = useState(false)\n const [staticBounce, setStaticBounce] = useState(false)\n const [scrollLocked, setScrollLocked] = useState(false)\n const openedAsModalRef = useRef(false)\n const triggerRef = useRef<HTMLElement | null>(null)\n\n // Locked from showModal() until the exit transition finishes (see the show/hide effect\n // below) — usePreventScroll releases it automatically on unmount too, even mid-transition.\n usePreventScroll({ isDisabled: !scrollLocked })\n\n const close = () => {\n onClose?.()\n // Several things can ask an open dialog to close while it is closing; only the first is a\n // change.\n if (_visible) setVisible(false)\n }\n\n const triggerStaticBounce = () => {\n onClosePrevented?.()\n const dialog = dialogRef.current\n if (!dialog) return\n setStaticBounce(true)\n executeAfterTransition(dialog, () => setStaticBounce(false), !instant)\n }\n\n // Read through refs, kept current every render, so the keydown listener below — which only\n // resubscribes when `keyboard` changes — never invokes a stale `close`/`triggerStaticBounce`\n // closure if `onClose`/`onClosePrevented`/`instant` change identity without `keyboard` also\n // changing. Same pattern as `Drawer`'s own `closeRef` and `useFloatingOverlay`'s `closeRef`.\n const closeRef = useRef(close)\n closeRef.current = close\n const triggerStaticBounceRef = useRef(triggerStaticBounce)\n triggerStaticBounceRef.current = triggerStaticBounce\n\n // Show / begin-hide\n useIsomorphicLayoutEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return undefined\n\n if (_visible) {\n if (dialog.open) return undefined\n\n onBeforeShow?.(dialog)\n\n triggerRef.current =\n document.activeElement instanceof HTMLElement ? document.activeElement : null\n\n restoreTargets.set(dialog, triggerRef.current)\n\n openedAsModalRef.current = isModal\n if (isModal) {\n dialog.showModal()\n setScrollLocked(true)\n } else {\n dialog.show()\n }\n\n // `data-autofocus` too: React doesn't write the `autofocus` attribute in a client render (it\n // calls `focus()` on mount, which a closed dialog ignores), so `autoFocus` alone only works\n // in server-rendered HTML.\n // Only this dialog's own: one inside a nested dialog (an `Alert` in a `Modal`) is hidden\n // while that dialog is closed, and focusing it would fail silently.\n const autofocusEl = [\n ...dialog.querySelectorAll<HTMLElement>(\n '[autofocus], [data-autofocus]:not([data-autofocus=\"false\"])'\n )\n ].find((element) => element.closest('dialog') === dialog)\n if (autofocusEl) {\n autofocusEl.focus()\n } else {\n dialog.setAttribute('tabindex', '-1')\n dialog.focus()\n }\n\n onShow?.()\n setHiding(false)\n\n return executeAfterTransition(dialog, () => onShown?.(), !instant)\n }\n\n if (!dialog.open) return undefined\n setHiding(true)\n return undefined\n }, [_visible])\n\n // Finish hide once the exit transition (or lack thereof) completes\n useEffect(() => {\n const dialog = dialogRef.current\n if (!hiding || !dialog) return undefined\n\n return executeAfterTransition(\n dialog,\n () => {\n // Focus goes back only if this dialog still has it, or nothing does: another dialog\n // opened from this one (the next alert of a chain) keeps its own. Mirrors `Popover`.\n const active = document.activeElement\n const ownsFocus = !active || active === document.body || dialog.contains(active)\n if (dialog.open) {\n dialog.close()\n }\n if (openedAsModalRef.current) {\n setScrollLocked(false)\n }\n setHiding(false)\n onHidden?.()\n const trigger = ownsFocus ? resolveRestoreTarget(triggerRef.current) : null\n if (trigger && document.contains(trigger)) {\n trigger.focus()\n }\n },\n !instant\n )\n }, [hiding])\n\n // Escape key for non-modal (show()) dialogs — the native `cancel` event below only\n // fires for dialogs opened with showModal().\n useEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return undefined\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || openedAsModalRef.current) return\n event.preventDefault()\n if (!keyboard) {\n triggerStaticBounceRef.current()\n return\n }\n closeRef.current()\n }\n\n dialog.addEventListener('keydown', handleKeyDown)\n return () => dialog.removeEventListener('keydown', handleKeyDown)\n }, [keyboard])\n\n const handleCancel = (event: SyntheticEvent<HTMLDialogElement>) => {\n event.preventDefault()\n if (!keyboard) {\n triggerStaticBounce()\n return\n }\n close()\n }\n\n const handleBackdropClick = (event: ReactMouseEvent<HTMLDialogElement>) => {\n onClick?.(event)\n if (event.target !== dialogRef.current || !openedAsModalRef.current) return\n if (backdrop === 'static') {\n triggerStaticBounce()\n return\n }\n close()\n }\n\n return { close, dialogRef, forkedRef, handleBackdropClick, handleCancel, hiding, staticBounce }\n}\n"],"mappings":"0TA4EA,MAAM,EAAiB,IAAI,QAM3B,SAAS,EAAqB,EAAiD,CAC7E,IAAM,EAAO,IAAI,IACb,EAAS,EACT,EAAQ,GAAQ,QAAQ,QAAQ,GAAK,KACzC,KAAO,GAAU,GAAS,CAAC,EAAM,MAAM,CACrC,GAAI,EAAK,IAAI,CAAK,EAAG,OAAO,KAC5B,EAAK,IAAI,CAAK,EACd,EAAS,EAAe,IAAI,CAAK,GAAK,KACtC,EAAQ,GAAQ,QAAQ,QAAQ,GAAK,IACvC,CACA,OAAO,CACT,CAgBA,MAAa,GAAoB,CAC/B,WACA,iBACA,UACA,UACA,WAAW,GACX,eACA,UACA,UACA,mBACA,WACA,SACA,UACA,kBACA,OACA,MACA,aAC6B,CAC7B,IAAM,EAAY,EAA0B,IAAI,EAC1C,EAAY,EAAa,EAAK,CAAS,EAEvC,CAAC,EAAU,GAAc,EAC7B,EACA,GAAkB,GAAQ,GAC1B,CACF,EACM,CAAC,EAAQ,GAAa,EAAS,EAAK,EACpC,CAAC,EAAc,GAAmB,EAAS,EAAK,EAChD,CAAC,EAAc,GAAmB,EAAS,EAAK,EAChD,EAAmB,EAAO,EAAK,EAC/B,EAAa,EAA2B,IAAI,EAIlD,EAAiB,CAAE,WAAY,CAAC,CAAa,CAAC,EAE9C,IAAM,MAAc,CAClB,IAAU,EAGN,GAAU,EAAW,EAAK,CAChC,EAEM,MAA4B,CAChC,IAAmB,EACnB,IAAM,EAAS,EAAU,QACpB,IACL,EAAgB,EAAI,EACpB,EAAuB,MAAc,EAAgB,EAAK,EAAG,CAAC,CAAO,EACvE,EAMM,EAAW,EAAO,CAAK,EAC7B,EAAS,QAAU,EACnB,IAAM,EAAyB,EAAO,CAAmB,EA0HzD,MAzHA,GAAuB,QAAU,EAGjC,MAAgC,CAC9B,IAAM,EAAS,EAAU,QACpB,KAEL,IAAI,EAAU,CACZ,GAAI,EAAO,KAAM,OAEjB,IAAe,CAAM,EAErB,EAAW,QACT,SAAS,yBAAyB,YAAc,SAAS,cAAgB,KAE3E,EAAe,IAAI,EAAQ,EAAW,OAAO,EAE7C,EAAiB,QAAU,EACvB,GACF,EAAO,UAAU,EACjB,EAAgB,EAAI,GAEpB,EAAO,KAAK,EAQd,IAAM,EAAc,CAClB,GAAG,EAAO,iBACR,6DACF,CACF,CAAC,CAAC,KAAM,GAAY,EAAQ,QAAQ,QAAQ,IAAM,CAAM,EAWxD,OAVI,EACF,EAAY,MAAM,GAElB,EAAO,aAAa,WAAY,IAAI,EACpC,EAAO,MAAM,GAGf,IAAS,EACT,EAAU,EAAK,EAER,EAAuB,MAAc,IAAU,EAAG,CAAC,CAAO,CACnE,CAEK,EAAO,MACZ,EAAU,EAAI,CAHd,CAKF,EAAG,CAAC,CAAQ,CAAC,EAGb,MAAgB,CACd,IAAM,EAAS,EAAU,QACrB,GAAC,GAAW,EAEhB,OAAO,EACL,MACM,CAGJ,IAAM,EAAS,SAAS,cAClB,EAAY,CAAC,GAAU,IAAW,SAAS,MAAQ,EAAO,SAAS,CAAM,EAC3E,EAAO,MACT,EAAO,MAAM,EAEX,EAAiB,SACnB,EAAgB,EAAK,EAEvB,EAAU,EAAK,EACf,IAAW,EACX,IAAM,EAAU,EAAY,EAAqB,EAAW,OAAO,EAAI,KACnE,GAAW,SAAS,SAAS,CAAO,GACtC,EAAQ,MAAM,CAElB,EACA,CAAC,CACH,CACF,EAAG,CAAC,CAAM,CAAC,EAIX,MAAgB,CACd,IAAM,EAAS,EAAU,QACzB,GAAI,CAAC,EAAQ,OAEb,IAAM,EAAiB,GAAyB,CAC1C,OAAM,MAAQ,UAAY,EAAiB,SAE/C,IADA,EAAM,eAAe,EACjB,CAAC,EAAU,CACb,EAAuB,QAAQ,EAC/B,MACF,CACA,EAAS,QAAQ,CADjB,CAEF,EAGA,OADA,EAAO,iBAAiB,UAAW,CAAa,MACnC,EAAO,oBAAoB,UAAW,CAAa,CAClE,EAAG,CAAC,CAAQ,CAAC,EAqBN,CAAE,QAAO,YAAW,YAAW,oBAVT,GAA8C,CACzE,OAAU,CAAK,EACX,EAAM,SAAW,EAAU,SAAY,EAAiB,QAC5D,IAAI,IAAa,SAAU,CACzB,EAAoB,EACpB,MACF,CACA,EAAM,CADN,CAEF,EAE2D,aAnBrC,GAA6C,CAEjE,GADA,EAAM,eAAe,EACjB,CAAC,EAAU,CACb,EAAoB,EACpB,MACF,CACA,EAAM,CACR,EAYyE,SAAQ,cAAa,CAChG"}
@@ -1 +1,2 @@
1
- const e=(e,t,n)=>r=>{if(e&&t){r.preventDefault();return}n?.(r)};export{e as t};
1
+ const e=(e,t,n)=>r=>{if(e&&t){r.preventDefault();return}n?.(r)};export{e as t};
2
+ //# sourceMappingURL=useDisabledAnchorGuard-Cz58UCXy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDisabledAnchorGuard-Cz58UCXy.js","names":[],"sources":["../../src/hooks/useDisabledAnchorGuard.ts"],"sourcesContent":["import { MouseEvent, MouseEventHandler } from 'react'\n\n// A native `<button>`/`<input>` stops firing `click` on its own once `disabled` is set — an\n// `<a>` (or any other non-native-button element standing in for one) has no real `disabled`\n// attribute, so it still fires click (and an anchor still navigates) unless blocked by hand.\n// `guard` is the caller's own \"is this rendering as a non-native-button element\" check (e.g.\n// `Component === 'a'` for `Button`/`CloseButton`, `!isButton` for `Chip`) — kept as an explicit\n// parameter rather than inferred here, since each caller's own set of native, guard-free elements\n// differs slightly.\nexport const useDisabledAnchorGuard = <T extends HTMLElement>(\n guard: boolean,\n disabled: boolean | undefined,\n onClick: MouseEventHandler<T> | undefined\n): MouseEventHandler<T> => {\n return (event: MouseEvent<T>) => {\n if (guard && disabled) {\n event.preventDefault()\n return\n }\n onClick?.(event)\n }\n}\n"],"mappings":"AASA,MAAa,GACX,EACA,EACA,IAEQ,GAAyB,CAC/B,GAAI,GAAS,EAAU,CACrB,EAAM,eAAe,EACrB,MACF,CACA,IAAU,CAAK,CACjB"}
@@ -0,0 +1,2 @@
1
+ import{useEffect as e,useRef as t,useState as n}from"react";function r({close:r,isOpen:i,onHide:a,onShow:o,triggerRef:s}){let[c,l]=n(null),u=()=>s.current?.closest(`dialog[open]`)??document.body,d=t(!1);e(()=>{let e=!d.current;d.current=!0,i?(l(u()),e||o?.()):e||a?.()},[i]);let f=t(r);return f.current=r,e(()=>{let e=c?.closest(`dialog`);if(!i||!e)return;let t=()=>f.current();return e.addEventListener(`close`,t),()=>e.removeEventListener(`close`,t)},[i,c]),c}function i(e){return{position:`absolute`,...e.style,transform:e.style?.top===void 0?`translateX(-50%)`:`translateY(-50%)`}}function a(e){return e===`entering`||e===`entered`?`fade show`:`fade`}export{a as n,r,i as t};
2
+ //# sourceMappingURL=useFloatingOverlay-DLIvwx-8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFloatingOverlay-DLIvwx-8.js","names":[],"sources":["../../src/hooks/useFloatingOverlay.ts"],"sourcesContent":["import { CSSProperties, HTMLAttributes, RefObject, useEffect, useRef, useState } from 'react'\n\nimport { TransitionPhase } from './useTransitionState'\n\nexport interface UseFloatingOverlayOptions {\n /**\n * Imperatively closes the overlay — called when the containing `<dialog>` fires its native\n * `close` event. Pass a stable callback (e.g. the trigger state's own `close`) where possible;\n * an inline arrow is fine too, since only its latest value is ever invoked.\n */\n close: () => void\n /**\n * Whether the overlay is currently open — drives `onShow`/`onHide` and portal-container\n * resolution.\n */\n isOpen: boolean\n onHide?: () => void\n onShow?: () => void\n /**\n * Ref to the element that triggers the overlay, used to resolve which `<dialog>` (if any) it\n * lives inside.\n */\n triggerRef: RefObject<HTMLElement | null>\n}\n\n/**\n * Shared portal-container/visibility wiring for `Popover` and `Tooltip`: resolves the `<dialog>`\n * a trigger lives inside (if any), fires `onShow`/`onHide`, and resets on the containing dialog's\n * native `close` event. The open state itself is the trigger state's, which each component builds\n * from `visible`/`defaultVisible`/`onVisibleChange` (`toOpenStateProps`). Positioning-specific\n * concerns (placement, arrow, escape/outside-click dismissal) stay in each component.\n */\nexport function useFloatingOverlay({\n close,\n isOpen,\n onHide,\n onShow,\n triggerRef\n}: UseFloatingOverlayOptions) {\n const [portalContainer, setPortalContainer] = useState<Element | null>(null)\n\n // Overlays inside an open `<dialog>` are appended to that dialog instead of `document.body`,\n // so they render in its top layer and close with it automatically.\n const resolvePortalContainer = () => triggerRef.current?.closest('dialog[open]') ?? document.body\n\n // `onShow`/`onHide` report *transitions*, so neither fires for the initial commit — mounting\n // closed is not a hide. Without this guard the `else` branch ran on mount and every\n // `<Popover onHide>`/`<Tooltip onHide>` on the page reported a close that never happened,\n // before `onShow` had ever fired once. The portal container still resolves on mount, since\n // an overlay mounted already-open needs one immediately.\n const mountedRef = useRef(false)\n\n useEffect(() => {\n const isInitialCommit = !mountedRef.current\n mountedRef.current = true\n\n if (isOpen) {\n setPortalContainer(resolvePortalContainer())\n if (!isInitialCommit) onShow?.()\n } else if (!isInitialCommit) {\n onHide?.()\n }\n }, [isOpen])\n\n // `close` is read through a ref so this effect only re-subscribes when `isOpen`/\n // `portalContainer` actually change, regardless of whether the caller passes a stable\n // callback or a fresh inline arrow each render.\n const closeRef = useRef(close)\n closeRef.current = close\n\n // A dialog fires a native `close` event on ESC, backdrop click, or `.close()`, so resetting\n // on it keeps a reopened dialog from showing a stale, already-open overlay.\n useEffect(() => {\n const dialog = portalContainer?.closest('dialog')\n if (!isOpen || !dialog) return\n\n const handleClose = () => closeRef.current()\n dialog.addEventListener('close', handleClose)\n return () => dialog.removeEventListener('close', handleClose)\n }, [isOpen, portalContainer])\n\n return portalContainer\n}\n\n// `useOverlayPosition`'s `arrowProps.style` sets a single cross-axis offset (`top` for a\n// left/right overlay, `left` for a top/bottom one) to the trigger's center point, not the arrow\n// element's top-left corner — so it must be recentered by half the arrow's own size on that\n// axis. Chassis-css's JS plugin never has this problem since Floating UI's `arrow` middleware\n// returns a top-left-corner coordinate directly; react-aria's is center-based. Unlike the\n// chassis-css JS plugin, react-aria also never sets `position: absolute` on the arrow element\n// itself, so without it the offset has no effect and the arrow renders in normal document flow.\nexport function getOverlayArrowStyle(arrowProps: HTMLAttributes<HTMLDivElement>): CSSProperties {\n return {\n position: 'absolute',\n ...arrowProps.style,\n transform: arrowProps.style?.top !== undefined ? 'translateY(-50%)' : 'translateX(-50%)'\n }\n}\n\n// Mounted without `show`, shown once those styles are computed, and without it again for as\n// long as the exit lasts: chassis-css's `.fade` transitions the opacity between the two.\nexport function getOverlayTransitionClass(phase: TransitionPhase): string {\n return phase === 'entering' || phase === 'entered' ? 'fade show' : 'fade'\n}\n"],"mappings":"4DAgCA,SAAgB,EAAmB,CACjC,QACA,SACA,SACA,SACA,cAC4B,CAC5B,GAAM,CAAC,EAAiB,GAAsB,EAAyB,IAAI,EAIrE,MAA+B,EAAW,SAAS,QAAQ,cAAc,GAAK,SAAS,KAOvF,EAAa,EAAO,EAAK,EAE/B,MAAgB,CACd,IAAM,EAAkB,CAAC,EAAW,QACpC,EAAW,QAAU,GAEjB,GACF,EAAmB,EAAuB,CAAC,EACtC,GAAiB,IAAS,GACrB,GACV,IAAS,CAEb,EAAG,CAAC,CAAM,CAAC,EAKX,IAAM,EAAW,EAAO,CAAK,EAc7B,MAbA,GAAS,QAAU,EAInB,MAAgB,CACd,IAAM,EAAS,GAAiB,QAAQ,QAAQ,EAChD,GAAI,CAAC,GAAU,CAAC,EAAQ,OAExB,IAAM,MAAoB,EAAS,QAAQ,EAE3C,OADA,EAAO,iBAAiB,QAAS,CAAW,MAC/B,EAAO,oBAAoB,QAAS,CAAW,CAC9D,EAAG,CAAC,EAAQ,CAAe,CAAC,EAErB,CACT,CASA,SAAgB,EAAqB,EAA2D,CAC9F,MAAO,CACL,SAAU,WACV,GAAG,EAAW,MACd,UAAW,EAAW,OAAO,MAAQ,IAAA,GAAiC,mBAArB,kBACnD,CACF,CAIA,SAAgB,EAA0B,EAAgC,CACxE,OAAO,IAAU,YAAc,IAAU,UAAY,YAAc,MACrE"}
@@ -1 +1,2 @@
1
- import{useMemo as e}from"react";function t(...t){return e(()=>t.every(e=>e==null)?null:e=>{t.forEach(t=>{n(t,e)})},t)}function n(e,t){if(e!=null){if(r(e))e(t);else try{e.current=t}catch(n){throw Error(`Cannot assign value "${t}" to ref "${e}"`,{cause:n})}}}function r(e){return!!(e&&{}.toString.call(e)==`[object Function]`)}export{t};
1
+ import{useMemo as e}from"react";function t(...t){return e(()=>t.every(e=>e==null)?null:e=>{t.forEach(t=>{n(t,e)})},t)}function n(e,t){if(e!=null){if(r(e))e(t);else try{e.current=t}catch(n){throw Error(`Cannot assign value "${t}" to ref "${e}"`,{cause:n})}}}function r(e){return!!(e&&{}.toString.call(e)==`[object Function]`)}export{t};
2
+ //# sourceMappingURL=useForkedRef-DVEfT-KI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForkedRef-DVEfT-KI.js","names":[],"sources":["../../src/hooks/useForkedRef.ts"],"sourcesContent":["// code borrowed from https://github.com/reach/reach-ui\n// problem described https://github.com/facebook/react/issues/13029\n\nimport { useMemo } from 'react'\n\nexport type AssignableRef<ValueType> =\n | {\n bivarianceHack(instance: ValueType | null): void\n }['bivarianceHack']\n | React.MutableRefObject<ValueType | null>\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function useForkedRef<RefValueType = any>(\n ...refs: (AssignableRef<RefValueType> | null | undefined)[]\n) {\n return useMemo(() => {\n if (refs.every((ref) => ref == null)) {\n return null\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (node: any) => {\n refs.forEach((ref) => {\n assignRef(ref, node)\n })\n }\n }, refs)\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function assignRef<RefValueType = any>(\n ref: AssignableRef<RefValueType> | null | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n) {\n if (ref == null) return\n if (isFunction(ref)) {\n ref(value)\n } else {\n try {\n ref.current = value\n } catch (error) {\n throw new Error(`Cannot assign value \"${value}\" to ref \"${ref}\"`, { cause: error })\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-function-type\nexport function isFunction(value: any): value is Function {\n return !!(value && {}.toString.call(value) == '[object Function]')\n}\n"],"mappings":"gCAYA,SAAgB,EACd,GAAG,EACH,CACA,OAAO,MACD,EAAK,MAAO,GAAQ,GAAO,IAAI,EAC1B,KAGD,GAAc,CACpB,EAAK,QAAS,GAAQ,CACpB,EAAU,EAAK,CAAI,CACrB,CAAC,CACH,EACC,CAAI,CACT,CAGA,SAAgB,EACd,EAEA,EACA,CACI,MAAO,KACX,IAAI,EAAW,CAAG,EAChB,EAAI,CAAK,OAET,GAAI,CACF,EAAI,QAAU,CAChB,OAAS,EAAO,CACd,MAAU,MAAM,wBAAwB,EAAM,YAAY,EAAI,GAAI,CAAE,MAAO,CAAM,CAAC,CACpF,EAEJ,CAGA,SAAgB,EAAW,EAA+B,CACxD,MAAO,CAAC,EAAE,GAAS,CAAC,EAAE,SAAS,KAAK,CAAK,GAAK,oBAChD"}
@@ -1 +1,2 @@
1
- import{useId as e}from"react";const t=({ariaDescribedBy:t,ariaLabelledBy:n,help:r,id:i,invalid:a,invalidFeedback:o,label:s,valid:c,validFeedback:l})=>{let u=e(),d=i??u,f=`${u}-label`,p=`${u}-help`,m=`${u}-feedback`;return{describedBy:[r&&p,(a&&o||c&&l)&&m,t].filter(Boolean).join(` `)||void 0,feedbackId:m,helpId:p,inputId:d,labelId:f,labelledBy:[s&&f,n].filter(Boolean).join(` `)||void 0}};export{t};
1
+ import{useId as e}from"react";const t=({ariaDescribedBy:t,ariaLabelledBy:n,help:r,id:i,invalid:a,invalidFeedback:o,label:s,valid:c,validFeedback:l})=>{let u=e(),d=i??u,f=`${u}-label`,p=`${u}-help`,m=`${u}-feedback`;return{describedBy:[r&&p,(a&&o||c&&l)&&m,t].filter(Boolean).join(` `)||void 0,feedbackId:m,helpId:p,inputId:d,labelId:f,labelledBy:[s&&f,n].filter(Boolean).join(` `)||void 0}};export{t};
2
+ //# sourceMappingURL=useFormField-BOqmBTC4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormField-BOqmBTC4.js","names":[],"sources":["../../src/hooks/useFormField.ts"],"sourcesContent":["import { ReactNode, useId } from 'react'\n\nexport interface UseFormFieldOptions {\n /**\n * A caller-supplied `aria-describedby` to merge in alongside the generated help/feedback ids\n * (e.g. `rest['aria-describedby']`).\n */\n ariaDescribedBy?: string\n /**\n * A caller-supplied `aria-labelledby` to merge in alongside `labelId` (e.g.\n * `rest['aria-labelledby']`). Relevant for the `role=\"group\"` shape and for any single-input\n * component backed by a react-aria hook — see `labelledBy`.\n */\n ariaLabelledBy?: string\n help?: ReactNode\n id?: string\n invalid?: boolean\n invalidFeedback?: ReactNode\n label?: ReactNode\n valid?: boolean\n validFeedback?: ReactNode\n}\n\nexport interface UseFormFieldResult {\n /**\n * Merged `aria-describedby` value (help id + feedback id, if shown + `ariaDescribedBy`), or\n * `undefined` when none apply. Safe to spread straight onto the real control:\n * `aria-describedby={describedBy}`.\n */\n describedBy?: string\n feedbackId: string\n helpId: string\n /**\n * Id for the one real focusable control — pair with `<FormLabel htmlFor={inputId}>` (via\n * `ids.input`). Ignore this and use `labelId`/`labelledBy` instead for a `role=\"group\"` wrapper\n * with no single input to target — see FORMS.md's \"`htmlFor` vs `aria-labelledby`\" section.\n */\n inputId: string\n /**\n * This field's own label id, for a control to reference via its own `aria-labelledby` (via\n * `ids.label`) instead of `htmlFor`.\n */\n labelId: string\n /**\n * Merged `aria-labelledby` value (`labelId`, only when `label` is set + `ariaLabelledBy`), or\n * `undefined` when neither applies. Feed this into the underlying react-aria hook's own\n * `aria-labelledby` (in addition to any `htmlFor`-based association) so its own dev-mode\n * \"no accessible label\" warning knows about a visible `label` it can't otherwise see.\n */\n labelledBy?: string\n}\n\n// Shared id-generation and aria-describedby/aria-labelledby merge logic behind every\n// renderFormField-based component (see FORMS.md's \"The two engines\" section). Every id is\n// generated with React's own useId(), not react-aria's — see FORMS.md for why that's deliberate.\n//\n// If you spread the result of a react-aria hook via mergeProps(hookProps, rest) instead of\n// directly onto the control, re-apply `describedBy`/`labelledBy` as explicit props *after* that\n// spread — mergeProps lets the later argument win, so rest's raw (un-merged) aria-describedby/\n// aria-labelledby can silently overwrite these otherwise. See FORMS.md gotcha #4.\nexport const useFormField = ({\n ariaDescribedBy,\n ariaLabelledBy,\n help,\n id,\n invalid,\n invalidFeedback,\n label,\n valid,\n validFeedback\n}: UseFormFieldOptions): UseFormFieldResult => {\n const generatedId = useId()\n const inputId = id ?? generatedId\n const labelId = `${generatedId}-label`\n const helpId = `${generatedId}-help`\n const feedbackId = `${generatedId}-feedback`\n\n const showInvalidFeedback = invalid && invalidFeedback\n const showValidFeedback = valid && validFeedback\n\n const describedBy =\n [help && helpId, (showInvalidFeedback || showValidFeedback) && feedbackId, ariaDescribedBy]\n .filter(Boolean)\n .join(' ') || undefined\n\n const labelledBy = [label && labelId, ariaLabelledBy].filter(Boolean).join(' ') || undefined\n\n return { describedBy, feedbackId, helpId, inputId, labelId, labelledBy }\n}\n"],"mappings":"8BA4DA,MAAa,GAAgB,CAC3B,kBACA,iBACA,OACA,KACA,UACA,kBACA,QACA,QACA,mBAC6C,CAC7C,IAAM,EAAc,EAAM,EACpB,EAAU,GAAM,EAChB,EAAU,GAAG,EAAY,QACzB,EAAS,GAAG,EAAY,OACxB,EAAa,GAAG,EAAY,WAYlC,MAAO,CAAE,YANP,CAAC,GAAQ,GAJiB,GAAW,GACb,GAAS,IAG8B,EAAY,CAAe,CAAC,CACxF,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,GAAK,IAAA,GAII,aAAY,SAAQ,UAAS,UAAS,WAFzC,CAAC,GAAS,EAAS,CAAc,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,GAAK,IAAA,EAEZ,CACzE"}
@@ -1 +1,2 @@
1
- import{useEffect as e,useLayoutEffect as t}from"react";const n=typeof window>`u`?e:t;export{n as t};
1
+ import{useEffect as e,useLayoutEffect as t}from"react";const n=typeof window>`u`?e:t;export{n as t};
2
+ //# sourceMappingURL=useIsomorphicLayoutEffect-BbqRwuqn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsomorphicLayoutEffect-BbqRwuqn.js","names":[],"sources":["../../src/hooks/useIsomorphicLayoutEffect.ts"],"sourcesContent":["import { useEffect, useLayoutEffect } from 'react'\n\n// `useLayoutEffect` logs a console warning (\"does nothing on the server\") whenever it's called\n// during SSR, even though no effect — layout or otherwise — ever actually runs server-side;\n// React only cares that the hook itself was invoked under `renderToString`/\n// `renderToPipeableStream`. Swapping to `useEffect` in that environment silences the warning with\n// no behavior change, since neither hook runs server-side anyway — this only picks which one\n// no-ops there.\nexport const useIsomorphicLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect\n"],"mappings":"uDAQA,MAAa,EAA4B,OAAO,OAAW,IAAc,EAAY"}
@@ -0,0 +1,2 @@
1
+ import{v as e}from"./slot-CNhFZdHF.js";import{t}from"./visibleState-B_i1zHu2.js";import{useCallback as n,useRef as r}from"react";const i=[[`isOpen`,`visible`],[`defaultOpen`,`defaultVisible`],[`onOpenChange`,`onVisibleChange`]];function a(a,o){for(let[t,n]of i)e(a[t]!==void 0,`${o}: the ${t} prop is deprecated, use ${n} instead. It will be removed in a future major version.`);let s=r(a);s.current=a;let c=n(e=>{let n=s.current;t({onVisibleChange:n.onVisibleChange??n.onOpenChange,visible:n.visible??n.isOpen},e,o),n.onVisibleChange?.(e),n.onOpenChange?.(e)},[o]);return{defaultOpen:a.defaultVisible??a.defaultOpen,isOpen:a.visible??a.isOpen,onOpenChange:c}}export{a as t};
2
+ //# sourceMappingURL=useOpenStateProps-DykUbnPJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOpenStateProps-DykUbnPJ.js","names":[],"sources":["../../src/hooks/useOpenStateProps.ts"],"sourcesContent":["import { useCallback, useRef } from 'react'\n\nimport { devWarning } from '../utils/devWarning'\nimport { VisibleStateProps, warnDroppedVisibleRequest } from '../utils/visibleState'\n\n// The names react-aria gives the same three props. `DatePicker` and `DateRangePicker` took them\n// under these names first; they are deprecated in favour of the `visible` ones, which win when\n// both are passed.\nexport interface DeprecatedOpenStateProps {\n defaultOpen?: boolean\n isOpen?: boolean\n onOpenChange?: (isOpen: boolean) => void\n}\n\nconst DEPRECATED_OPEN_STATE_PROPS = [\n ['isOpen', 'visible'],\n ['defaultOpen', 'defaultVisible'],\n ['onOpenChange', 'onVisibleChange']\n] as const\n\n/**\n * `visible`/`defaultVisible`/`onVisibleChange` as react-stately's trigger states take them\n * (`useOverlayTriggerState`, `useTooltipTriggerState`, `useMenuTriggerState`, the date picker\n * states). Those states are controlled by `isOpen` already, and call `onOpenChange` only for a\n * value that differs from the current one.\n *\n * `onOpenChange` keeps one identity. The state's `open`/`close`/`toggle` are rebuilt whenever it\n * changes, and components subscribe to window events in effects that depend on them.\n */\nexport function useOpenStateProps(\n props: VisibleStateProps & DeprecatedOpenStateProps,\n displayName: string\n) {\n for (const [deprecated, replacement] of DEPRECATED_OPEN_STATE_PROPS) {\n devWarning(\n props[deprecated] !== undefined,\n `${displayName}: the ${deprecated} prop is deprecated, use ${replacement} instead. It ` +\n 'will be removed in a future major version.'\n )\n }\n\n const propsRef = useRef(props)\n propsRef.current = props\n\n const onOpenChange = useCallback(\n (next: boolean) => {\n const current = propsRef.current\n warnDroppedVisibleRequest(\n {\n onVisibleChange: current.onVisibleChange ?? current.onOpenChange,\n visible: current.visible ?? current.isOpen\n },\n next,\n displayName\n )\n current.onVisibleChange?.(next)\n current.onOpenChange?.(next)\n },\n [displayName]\n )\n\n return {\n defaultOpen: props.defaultVisible ?? props.defaultOpen,\n isOpen: props.visible ?? props.isOpen,\n onOpenChange\n }\n}\n"],"mappings":"iIAcA,MAAM,EAA8B,CAClC,CAAC,SAAU,SAAS,EACpB,CAAC,cAAe,gBAAgB,EAChC,CAAC,eAAgB,iBAAiB,CACpC,EAWA,SAAgB,EACd,EACA,EACA,CACA,IAAK,GAAM,CAAC,EAAY,KAAgB,EACtC,EACE,EAAM,KAAgB,IAAA,GACtB,GAAG,EAAY,QAAQ,EAAW,2BAA2B,EAAY,wDAE3E,EAGF,IAAM,EAAW,EAAO,CAAK,EAC7B,EAAS,QAAU,EAEnB,IAAM,EAAe,EAClB,GAAkB,CACjB,IAAM,EAAU,EAAS,QACzB,EACE,CACE,gBAAiB,EAAQ,iBAAmB,EAAQ,aACpD,QAAS,EAAQ,SAAW,EAAQ,MACtC,EACA,EACA,CACF,EACA,EAAQ,kBAAkB,CAAI,EAC9B,EAAQ,eAAe,CAAI,CAC7B,EACA,CAAC,CAAW,CACd,EAEA,MAAO,CACL,YAAa,EAAM,gBAAkB,EAAM,YAC3C,OAAQ,EAAM,SAAW,EAAM,OAC/B,cACF,CACF"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./useForkedRef-DVEfT-KI.js";import{t}from"./useControllableState-CPUJxfKW.js";import{n}from"./Portal-CgeR1WXV.js";import{t as r}from"./visibleState-B_i1zHu2.js";import{t as i}from"./useTransitionState-e5ToY7eX.js";import{useCallback as a,useEffect as o,useId as s,useRef as c}from"react";import{useToastRegion as l}from"react-aria";import{useToastQueue as u}from"react-stately";function d({enabled:e=!1,delay:t=5e3,visible:n,onHide:r}){let i=c(void 0),s=c(!1),l=c(!1),u=a(()=>{clearTimeout(i.current),i.current=void 0},[]),d=a(()=>{u(),!(!e||s.current||l.current)&&(i.current=window.setTimeout(r,t))},[e,t,r,u]);return o(()=>u,[u]),o(()=>{n?d():u()},[n,e,t,d,u]),{onMouseEnter:a(()=>{s.current=!0,u()},[u]),onMouseLeave:a(()=>{s.current=!1,d()},[d]),onFocus:a(()=>{l.current=!0,u()},[u]),onBlur:a(()=>{l.current=!1,d()},[d])}}function f({defaultVisible:l,displayName:u,onClose:d,onShow:f,onVisibleChange:p,ref:m,visible:h}){let g=h!==void 0,[_,v]=t(h,l,p),y=c(null),b=e(m,y),x=s(),S=s(),C=c(!1),w=c(d);w.current=d;let T=a(()=>{C.current&&(C.current=!1,w.current?.())},[]),E=c(()=>{});E.current=()=>{_&&(g||(C.current=!0),r({onVisibleChange:p,visible:h},!1,u),v(!1))};let D=a(()=>E.current(),[]),O=n(),{isMounted:k,phase:A}=i({appear:O,in:_,nodeRef:y,onEnter:()=>{C.current=!1,f?.()},onExit:()=>{C.current=!0},onExited:T,unmountOnExit:!0});o(()=>T,[T]);let j=c(!O&&_);return o(()=>{j.current&&(j.current=!1,f?.())},[]),{close:D,entered:A===`entered`,forkedRef:b,isMounted:k,textId:S,titleId:x,transitionClass:A===`entering`||A===`exiting`?`show showing`:A===`entered`?`show`:void 0,visible:_}}function p(t,n){let r=u(t),i=c(null),{regionProps:a}=l({},r,i);return{forkedRef:e(n,i),regionProps:a,state:r}}export{f as n,d as r,p as t};
2
+ //# sourceMappingURL=useToastRegionQueue-CIV5SdiE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToastRegionQueue-CIV5SdiE.js","names":[],"sources":["../../src/hooks/useAutoDismiss.ts","../../src/hooks/useDismissibleTransition.ts","../../src/hooks/useToastRegionQueue.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nexport interface UseAutoDismissOptions {\n /**\n * Enables the auto-dismiss timer. When `false`, `onHide` is never called and the returned\n * handlers are no-ops.\n */\n enabled?: boolean\n /**\n * Delay in ms before `onHide` fires once the timer is (re)started.\n */\n delay?: number\n /**\n * Whether the dismissible element is currently visible. The timer only runs while `true`.\n */\n visible: boolean\n /**\n * Called once the delay elapses without an intervening pointer/focus interaction.\n */\n onHide: () => void\n}\n\nexport interface UseAutoDismissResult {\n onMouseEnter: () => void\n onMouseLeave: () => void\n onFocus: () => void\n onBlur: () => void\n}\n\n// Shared timer logic for components that auto-dismiss after a delay, pausing while the pointer\n// or focus is on the element (mirrors the behavior `Toast` already implements). Extracted so new\n// auto-dismissing components don't reimplement the pause/resume bookkeeping.\nexport function useAutoDismiss({\n enabled = false,\n delay = 5000,\n visible,\n onHide\n}: UseAutoDismissOptions): UseAutoDismissResult {\n // `useRef<number>()` (no argument) isn't valid under @types/react 19 — the overload requires\n // an initial value, and the ref has to admit `undefined` for `clearAutoDismissTimeout` to reset\n // it back to \"no timer scheduled\".\n const timeout = useRef<number | undefined>(undefined)\n const hasMouseInteraction = useRef(false)\n const hasKeyboardInteraction = useRef(false)\n\n const clearAutoDismissTimeout = useCallback(() => {\n clearTimeout(timeout.current)\n timeout.current = undefined\n }, [])\n\n const maybeScheduleHide = useCallback(() => {\n clearAutoDismissTimeout()\n if (!enabled || hasMouseInteraction.current || hasKeyboardInteraction.current) {\n return\n }\n timeout.current = window.setTimeout(onHide, delay)\n }, [enabled, delay, onHide, clearAutoDismissTimeout])\n\n // Clears on unmount.\n useEffect(() => clearAutoDismissTimeout, [clearAutoDismissTimeout])\n\n useEffect(() => {\n if (visible) {\n maybeScheduleHide()\n } else {\n clearAutoDismissTimeout()\n }\n }, [visible, enabled, delay, maybeScheduleHide, clearAutoDismissTimeout])\n\n const onMouseEnter = useCallback(() => {\n hasMouseInteraction.current = true\n clearAutoDismissTimeout()\n }, [clearAutoDismissTimeout])\n\n const onMouseLeave = useCallback(() => {\n hasMouseInteraction.current = false\n maybeScheduleHide()\n }, [maybeScheduleHide])\n\n const onFocus = useCallback(() => {\n hasKeyboardInteraction.current = true\n clearAutoDismissTimeout()\n }, [clearAutoDismissTimeout])\n\n const onBlur = useCallback(() => {\n hasKeyboardInteraction.current = false\n maybeScheduleHide()\n }, [maybeScheduleHide])\n\n return { onMouseEnter, onMouseLeave, onFocus, onBlur }\n}\n","import { ForwardedRef, useCallback, useEffect, useId, useRef } from 'react'\n\nimport { useHydrated } from '../components/portal/Portal'\nimport { warnDroppedVisibleRequest } from '../utils/visibleState'\nimport { useControllableState } from './useControllableState'\nimport { useForkedRef } from './useForkedRef'\nimport { useTransitionState } from './useTransitionState'\n\nexport interface UseDismissibleTransitionOptions {\n /**\n * Initial state of an uncontrolled component. `Toast` starts hidden, `Notification` shown.\n */\n defaultVisible: boolean\n /**\n * The component's name, for the development warning about a dropped close request.\n */\n displayName: string\n /**\n * Callback fired once the exit transition completes and the component is fully hidden, or\n * when the component unmounts before its exit could complete.\n */\n onClose?: () => void\n /**\n * Callback fired when the component starts to show.\n */\n onShow?: () => void\n /**\n * Callback fired with `false` when the component asks to hide: its close button, `close()`\n * from its context, or the autohide timer.\n */\n onVisibleChange?: (visible: boolean) => void\n ref: ForwardedRef<HTMLDivElement>\n /**\n * Controlled state; `undefined` means uncontrolled.\n */\n visible?: boolean\n}\n\nexport interface UseDismissibleTransitionResult {\n /**\n * Requests the component be closed. Uncontrolled, that hides it: the exit transition starts\n * and `onClose` fires once it finishes. Controlled by `visible`, it only reports to\n * `onVisibleChange`. Stable across re-renders (see the hook's own doc comment for why that\n * matters).\n */\n close: () => void\n /**\n * Whether the entrance transition has actually finished — `false` while still fading/sliding\n * in, even though `visible` is already `true`. Gate anything that should only start once the\n * component is fully, visibly present (e.g. an autohide timer) on this rather than `visible`\n * alone.\n */\n entered: boolean\n forkedRef: ReturnType<typeof useForkedRef<HTMLDivElement>>\n /**\n * `false` before the component first shows and after it has exited: render nothing.\n */\n isMounted: boolean\n textId: string\n titleId: string\n /**\n * chassis-css's classes for the current phase: `show showing` while entering or exiting,\n * `show` once settled, none while hidden.\n */\n transitionClass: string | undefined\n /**\n * The state that drives the transition: the `visible` prop when it is set, the component's own\n * state otherwise.\n */\n visible: boolean\n}\n\n// Shared dismiss/transition machinery for `Toast` and `Notification` — both otherwise duplicated\n// this near-verbatim: visible-state + prop-sync effect, a forked ref, the phase-to-class mapping,\n// `titleId`/`textId` via `useId()`, and the enter/exit callback wiring of `useTransitionState`.\n//\n// `close` is memoized once here with `useCallback` (empty deps — it reads everything it needs\n// through refs) specifically so it has a stable identity across re-renders. Previously each component built its own unmemoized\n// `() => setVisible(false)` inline and passed it straight into `useAutoDismiss`, whose scheduling\n// effect depends on that closure's identity — since `Toaster`/`NotificationStack` re-render every\n// mounted item whenever the shared queue changes (`ToastQueue.add()`/`.close()` notify all\n// subscribers synchronously), that meant adding or dismissing any one toast/notification silently\n// restarted every other visible one's autohide countdown, with no code change needed to trigger\n// it beyond normal multi-item usage.\n//\n// `entered` similarly gates \"has the entrance transition actually finished\" uniformly for both —\n// `Toast` already had this (gating on `visible` alone would start the autohide timer the instant\n// `visible` flips true, while still fading/sliding in); `Notification` didn't, so this extraction\n// gives it the same fix for free.\n//\n// `onClose` normally fires when the exit transition has finished. A component that unmounts\n// before that (a `Toaster` remounted by a navigation 50 ms after its toast's action was clicked,\n// issue #40) would never report the close it was asked for, and a queued toast would come back\n// with the next `Toaster`. So an unmount with a close still owed reports it then. It is owed from\n// the `close()` call itself, not from the start of the exit, because the unmount can land in the\n// same commit as the state change `close()` asked for. That holds for an uncontrolled component,\n// where `close()` is the change. A controlled one owes `onClose` only once `visible` has become\n// `false` and the exit has started: until then `close()` is a request its owner may decline.\nexport function useDismissibleTransition({\n defaultVisible,\n displayName,\n onClose,\n onShow,\n onVisibleChange,\n ref,\n visible\n}: UseDismissibleTransitionOptions): UseDismissibleTransitionResult {\n const isControlled = visible !== undefined\n const [_visible, setVisible] = useControllableState(visible, defaultVisible, onVisibleChange)\n const nodeRef = useRef<HTMLDivElement>(null)\n const forkedRef = useForkedRef(ref, nodeRef)\n const titleId = useId()\n const textId = useId()\n\n const closeOwedRef = useRef(false)\n const onCloseRef = useRef(onClose)\n onCloseRef.current = onClose\n\n const reportClose = useCallback(() => {\n if (!closeOwedRef.current) return\n closeOwedRef.current = false\n onCloseRef.current?.()\n }, [])\n\n // Replaced every render, so the stable `close` below always reports to the current props.\n const requestHideRef = useRef(() => {})\n requestHideRef.current = () => {\n // Closing what is already hidden asks for nothing, so it owes no `onClose`.\n if (!_visible) return\n if (!isControlled) closeOwedRef.current = true\n warnDroppedVisibleRequest({ onVisibleChange, visible }, false, displayName)\n setVisible(false)\n }\n\n const close = useCallback(() => requestHideRef.current(), [])\n\n // A component mounted visible plays its enter transition, except in the server's HTML and\n // while hydrating it: there is nothing on screen to animate from, and starting hidden left the\n // page without the component until the JavaScript had loaded. It starts settled, with `show`.\n const hydrated = useHydrated()\n\n const { isMounted, phase } = useTransitionState({\n appear: hydrated,\n in: _visible,\n nodeRef,\n onEnter: () => {\n closeOwedRef.current = false\n onShow?.()\n },\n onExit: () => {\n closeOwedRef.current = true\n },\n onExited: reportClose,\n unmountOnExit: true\n })\n\n useEffect(() => reportClose, [reportClose])\n\n // Settled from the start, the component never enters, which is where `onShow` fires: fire it\n // once on mount instead, since it did show. The ref keeps StrictMode's second run from firing\n // it again.\n const showOwedRef = useRef(!hydrated && _visible)\n useEffect(() => {\n if (!showOwedRef.current) return\n showOwedRef.current = false\n onShow?.()\n }, [])\n\n return {\n close,\n entered: phase === 'entered',\n forkedRef,\n isMounted,\n textId,\n titleId,\n transitionClass:\n phase === 'entering' || phase === 'exiting'\n ? 'show showing'\n : phase === 'entered'\n ? 'show'\n : undefined,\n visible: _visible\n }\n}\n","import { ForwardedRef, useRef } from 'react'\nimport { ToastRegionAria, useToastRegion } from 'react-aria'\nimport { ToastQueue, ToastState, useToastQueue } from 'react-stately'\n\nimport { useForkedRef } from './useForkedRef'\n\nexport interface UseToastRegionQueueResult<T> {\n forkedRef: ReturnType<typeof useForkedRef<HTMLDivElement>>\n regionProps: ToastRegionAria['regionProps']\n state: ToastState<T>\n}\n\n// Shared setup for `Toaster`/`NotificationStack` — both otherwise duplicated this near-verbatim:\n// subscribe to a `ToastQueue` singleton, wire up react-aria's toast-region accessibility\n// plumbing, and fork the caller's ref onto the same node the region hook needs. Differs only in\n// which queue is passed.\nexport function useToastRegionQueue<T>(\n queue: ToastQueue<T>,\n ref: ForwardedRef<HTMLDivElement>\n): UseToastRegionQueueResult<T> {\n const state = useToastQueue(queue)\n const regionRef = useRef<HTMLDivElement>(null)\n const { regionProps } = useToastRegion({}, state, regionRef)\n const forkedRef = useForkedRef(ref, regionRef)\n\n return { forkedRef, regionProps, state }\n}\n"],"mappings":"6YAgCA,SAAgB,EAAe,CAC7B,UAAU,GACV,QAAQ,IACR,UACA,UAC8C,CAI9C,IAAM,EAAU,EAA2B,IAAA,EAAS,EAC9C,EAAsB,EAAO,EAAK,EAClC,EAAyB,EAAO,EAAK,EAErC,EAA0B,MAAkB,CAChD,aAAa,EAAQ,OAAO,EAC5B,EAAQ,QAAU,IAAA,EACpB,EAAG,CAAC,CAAC,EAEC,EAAoB,MAAkB,CAC1C,EAAwB,EACpB,GAAC,GAAW,EAAoB,SAAW,EAAuB,WAGtE,EAAQ,QAAU,OAAO,WAAW,EAAQ,CAAK,EACnD,EAAG,CAAC,EAAS,EAAO,EAAQ,CAAuB,CAAC,EAiCpD,OA9BA,MAAgB,EAAyB,CAAC,CAAuB,CAAC,EAElE,MAAgB,CACV,EACF,EAAkB,EAElB,EAAwB,CAE5B,EAAG,CAAC,EAAS,EAAS,EAAO,EAAmB,CAAuB,CAAC,EAsBjE,CAAE,aApBY,MAAkB,CACrC,EAAoB,QAAU,GAC9B,EAAwB,CAC1B,EAAG,CAAC,CAAuB,CAiBP,EAAG,aAfF,MAAkB,CACrC,EAAoB,QAAU,GAC9B,EAAkB,CACpB,EAAG,CAAC,CAAiB,CAYa,EAAG,QAVrB,MAAkB,CAChC,EAAuB,QAAU,GACjC,EAAwB,CAC1B,EAAG,CAAC,CAAuB,CAOgB,EAAG,OAL/B,MAAkB,CAC/B,EAAuB,QAAU,GACjC,EAAkB,CACpB,EAAG,CAAC,CAAiB,CAE8B,CAAE,CACvD,CCQA,SAAgB,EAAyB,CACvC,iBACA,cACA,UACA,SACA,kBACA,MACA,WACkE,CAClE,IAAM,EAAe,IAAY,IAAA,GAC3B,CAAC,EAAU,GAAc,EAAqB,EAAS,EAAgB,CAAe,EACtF,EAAU,EAAuB,IAAI,EACrC,EAAY,EAAa,EAAK,CAAO,EACrC,EAAU,EAAM,EAChB,EAAS,EAAM,EAEf,EAAe,EAAO,EAAK,EAC3B,EAAa,EAAO,CAAO,EACjC,EAAW,QAAU,EAErB,IAAM,EAAc,MAAkB,CAC/B,EAAa,UAClB,EAAa,QAAU,GACvB,EAAW,UAAU,EACvB,EAAG,CAAC,CAAC,EAGC,EAAiB,MAAa,CAAC,CAAC,EACtC,EAAe,YAAgB,CAExB,IACA,IAAc,EAAa,QAAU,IAC1C,EAA0B,CAAE,kBAAiB,SAAQ,EAAG,GAAO,CAAW,EAC1E,EAAW,EAAK,EAClB,EAEA,IAAM,EAAQ,MAAkB,EAAe,QAAQ,EAAG,CAAC,CAAC,EAKtD,EAAW,EAAY,EAEvB,CAAE,YAAW,SAAU,EAAmB,CAC9C,OAAQ,EACR,GAAI,EACJ,UACA,YAAe,CACb,EAAa,QAAU,GACvB,IAAS,CACX,EACA,WAAc,CACZ,EAAa,QAAU,EACzB,EACA,SAAU,EACV,cAAe,EACjB,CAAC,EAED,MAAgB,EAAa,CAAC,CAAW,CAAC,EAK1C,IAAM,EAAc,EAAO,CAAC,GAAY,CAAQ,EAOhD,OANA,MAAgB,CACT,EAAY,UACjB,EAAY,QAAU,GACtB,IAAS,EACX,EAAG,CAAC,CAAC,EAEE,CACL,QACA,QAAS,IAAU,UACnB,YACA,YACA,SACA,UACA,gBACE,IAAU,YAAc,IAAU,UAC9B,eACA,IAAU,UACR,OACA,IAAA,GACR,QAAS,CACX,CACF,CCvKA,SAAgB,EACd,EACA,EAC8B,CAC9B,IAAM,EAAQ,EAAc,CAAK,EAC3B,EAAY,EAAuB,IAAI,EACvC,CAAE,eAAgB,EAAe,CAAC,EAAG,EAAO,CAAS,EAG3D,MAAO,CAAE,UAFS,EAAa,EAAK,CAEnB,EAAG,cAAa,OAAM,CACzC"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./useIsomorphicLayoutEffect-BbqRwuqn.js";import{t}from"./dialogTransition-i9vw0i2Z.js";import{useRef as n,useState as r}from"react";const i=e=>void e?.offsetHeight;function a({appear:a=!1,in:o,mountOnEnter:s=!1,nodeRef:c,onEnter:l,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,unmountOnExit:h=!1}){let[g,_]=r(()=>o?a?`exited`:`entered`:s||h?`unmounted`:`exited`),v=n(g),y=e=>{v.current=e,_(e)},b={onEnter:l,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m},x=n(b);x.current=b,e(()=>{let e=v.current;o!==(e===`entering`||e===`entered`)&&(o?(i(c.current),x.current.onEnter?.(),y(`entering`)):(x.current.onExit?.(),y(`exiting`)))},[o]),e(()=>{if(g!==`entering`&&g!==`exiting`)return;let e=()=>{g===`entering`?(y(`entered`),x.current.onEntered?.()):(y(h?`unmounted`:`exited`),x.current.onExited?.())};g===`entering`?x.current.onEntering?.():x.current.onExiting?.();let n=c.current;if(!n){e();return}return t(n,e,!0)},[g]);let S=o&&g===`unmounted`?`exited`:g;return{isMounted:S!==`unmounted`,phase:S}}export{a as t};
2
+ //# sourceMappingURL=useTransitionState-e5ToY7eX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTransitionState-e5ToY7eX.js","names":[],"sources":["../../src/hooks/useTransitionState.ts"],"sourcesContent":["import { RefObject, useRef, useState } from 'react'\n\nimport { executeAfterTransition } from '../utils/dialogTransition'\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'\n\n/**\n * Where a component is in its show/hide cycle. `exited` is mounted and hidden, `unmounted` is\n * not rendered at all.\n */\nexport type TransitionPhase = 'unmounted' | 'exited' | 'entering' | 'entered' | 'exiting'\n\nexport interface UseTransitionStateOptions {\n /**\n * Plays the enter transition on the first mount too, when `in` is already `true`. Without it\n * a component mounted visible starts settled, in `entered`.\n */\n appear?: boolean\n /**\n * Whether the component is shown.\n */\n in: boolean\n /**\n * Keeps the component out of the DOM until it is first shown.\n */\n mountOnEnter?: boolean\n /**\n * The element the classes are applied to. Its own CSS transition decides how long `entering`\n * and `exiting` last.\n */\n nodeRef: RefObject<HTMLElement | null>\n /**\n * Fires before `entering` is rendered, while the element still has its hidden styles.\n */\n onEnter?: () => void\n /**\n * Fires once `entering` is in the DOM, before the browser paints it.\n */\n onEntering?: () => void\n /**\n * Fires when the enter transition has finished.\n */\n onEntered?: () => void\n /**\n * Fires before `exiting` is rendered, while the element still has its shown styles.\n */\n onExit?: () => void\n /**\n * Fires once `exiting` is in the DOM, before the browser paints it.\n */\n onExiting?: () => void\n /**\n * Fires when the exit transition has finished. With `unmountOnExit` the element is still in\n * the DOM at this point.\n */\n onExited?: () => void\n /**\n * Takes the component out of the DOM once it has exited.\n */\n unmountOnExit?: boolean\n}\n\nexport interface UseTransitionStateResult {\n /**\n * `false` while there is nothing to render.\n */\n isMounted: boolean\n phase: TransitionPhase\n}\n\nconst forceReflow = (node: HTMLElement | null) => void node?.offsetHeight\n\n// The show/hide state machine behind `Collapse`, `TabPanel`, `Toast`, `Notification`, `Tooltip`\n// and `Popover`. It only reports a phase. Each component maps phases to chassis-css's classes\n// (`fade`, `show`, `showing`, `collapsing`), because those mappings differ.\n//\n// A phase lasts as long as the element's own CSS transition: it ends on `transitionend`, or\n// after the computed duration when that event never comes (`executeAfterTransition`, which\n// chassis-css's own plugins and `Modal`/`Drawer`/`Menu` use too). Nothing here holds a duration,\n// so a theme that changes one, and `prefers-reduced-motion`, under which chassis-css sets\n// `transition: none`, are followed without a second source of truth.\n//\n// Every step runs in a layout effect, so the browser never paints a state between two steps,\n// and a step that needs the previous styles computed first (an element that was just mounted,\n// or `display: none` a moment ago) forces a reflow itself.\nexport function useTransitionState({\n appear = false,\n in: inProp,\n mountOnEnter = false,\n nodeRef,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n unmountOnExit = false\n}: UseTransitionStateOptions): UseTransitionStateResult {\n const [phase, setPhaseState] = useState<TransitionPhase>(() => {\n if (inProp) return appear ? 'exited' : 'entered'\n return mountOnEnter || unmountOnExit ? 'unmounted' : 'exited'\n })\n\n // Mirrors `phase` at the moment it is set, not at the next render: StrictMode runs the effect\n // below twice on mount, and the second run has to see that the first already started.\n const phaseRef = useRef(phase)\n const setPhase = (next: TransitionPhase) => {\n phaseRef.current = next\n setPhaseState(next)\n }\n\n // Read through a ref so a caller can pass inline callbacks without restarting a transition.\n const callbacks = { onEnter, onEntering, onEntered, onExit, onExiting, onExited }\n const callbacksRef = useRef(callbacks)\n callbacksRef.current = callbacks\n\n useIsomorphicLayoutEffect(() => {\n const current = phaseRef.current\n const isIn = current === 'entering' || current === 'entered'\n if (inProp === isIn) return\n\n if (inProp) {\n forceReflow(nodeRef.current)\n callbacksRef.current.onEnter?.()\n setPhase('entering')\n } else {\n callbacksRef.current.onExit?.()\n setPhase('exiting')\n }\n }, [inProp])\n\n useIsomorphicLayoutEffect(() => {\n if (phase !== 'entering' && phase !== 'exiting') return undefined\n\n const finish = () => {\n if (phase === 'entering') {\n setPhase('entered')\n callbacksRef.current.onEntered?.()\n } else {\n setPhase(unmountOnExit ? 'unmounted' : 'exited')\n callbacksRef.current.onExited?.()\n }\n }\n\n if (phase === 'entering') callbacksRef.current.onEntering?.()\n else callbacksRef.current.onExiting?.()\n\n // Nothing rendered means nothing to wait for.\n const node = nodeRef.current\n if (!node) {\n finish()\n return undefined\n }\n return executeAfterTransition(node, finish, true)\n }, [phase])\n\n // Shown while still `unmounted`: render it hidden in this same pass, so the element exists\n // when the effect above starts the enter from it.\n const rendered = inProp && phase === 'unmounted' ? 'exited' : phase\n\n return { isMounted: rendered !== 'unmounted', phase: rendered }\n}\n"],"mappings":"uJAqEA,MAAM,EAAe,GAA6B,KAAK,GAAM,aAe7D,SAAgB,EAAmB,CACjC,SAAS,GACT,GAAI,EACJ,eAAe,GACf,UACA,UACA,aACA,YACA,SACA,YACA,WACA,gBAAgB,IACsC,CACtD,GAAM,CAAC,EAAO,GAAiB,MACzB,EAAe,EAAS,SAAW,UAChC,GAAgB,EAAgB,YAAc,QACtD,EAIK,EAAW,EAAO,CAAK,EACvB,EAAY,GAA0B,CAC1C,EAAS,QAAU,EACnB,EAAc,CAAI,CACpB,EAGM,EAAY,CAAE,UAAS,aAAY,YAAW,SAAQ,YAAW,UAAS,EAC1E,EAAe,EAAO,CAAS,EACrC,EAAa,QAAU,EAEvB,MAAgC,CAC9B,IAAM,EAAU,EAAS,QAErB,KADS,IAAY,YAAc,IAAY,aAG/C,GACF,EAAY,EAAQ,OAAO,EAC3B,EAAa,QAAQ,UAAU,EAC/B,EAAS,UAAU,IAEnB,EAAa,QAAQ,SAAS,EAC9B,EAAS,SAAS,GAEtB,EAAG,CAAC,CAAM,CAAC,EAEX,MAAgC,CAC9B,GAAI,IAAU,YAAc,IAAU,UAAW,OAEjD,IAAM,MAAe,CACf,IAAU,YACZ,EAAS,SAAS,EAClB,EAAa,QAAQ,YAAY,IAEjC,EAAS,EAAgB,YAAc,QAAQ,EAC/C,EAAa,QAAQ,WAAW,EAEpC,EAEI,IAAU,WAAY,EAAa,QAAQ,aAAa,EACvD,EAAa,QAAQ,YAAY,EAGtC,IAAM,EAAO,EAAQ,QACrB,GAAI,CAAC,EAAM,CACT,EAAO,EACP,MACF,CACA,OAAO,EAAuB,EAAM,EAAQ,EAAI,CAClD,EAAG,CAAC,CAAK,CAAC,EAIV,IAAM,EAAW,GAAU,IAAU,YAAc,SAAW,EAE9D,MAAO,CAAE,UAAW,IAAa,YAAa,MAAO,CAAS,CAChE"}
@@ -1 +1,2 @@
1
- const e=(e,t)=>({"is-invalid":e,"is-valid":t});export{e as t};
1
+ const e=(e,t)=>({"is-invalid":e,"is-valid":t});export{e as t};
2
+ //# sourceMappingURL=validationClassName-gRGs4KBm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validationClassName-gRGs4KBm.js","names":[],"sources":["../../src/utils/validationClassName.ts"],"sourcesContent":["// Chassis-css's validation-state classes, shared by every form control that supports\n// `invalid`/`valid` (Radio, Switch, RangeInput, Select, TextInput, Textarea). Returns a\n// `classNames`-compatible object rather than a resolved string so callers can still combine it\n// with their own base/size classes and `className` in one `classNames(...)` call.\nexport const validationClassName = (invalid?: boolean, valid?: boolean) => ({\n 'is-invalid': invalid,\n 'is-valid': valid\n})\n"],"mappings":"AAIA,MAAa,GAAuB,EAAmB,KAAqB,CAC1E,aAAc,EACd,WAAY,CACd"}
@@ -0,0 +1,2 @@
1
+ import{v as e}from"./slot-CNhFZdHF.js";function t({onVisibleChange:t,visible:n},r,i){e(n!==void 0&&!t,`${i}: asked to ${r?`show`:`hide`}, but \`visible\` is set and there is no \`onVisibleChange\`, so nothing changed. Pass \`onVisibleChange\` to follow its requests, or \`defaultVisible\` to set only the initial state.`)}export{t};
2
+ //# sourceMappingURL=visibleState-B_i1zHu2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibleState-B_i1zHu2.js","names":[],"sources":["../../src/utils/visibleState.ts"],"sourcesContent":["import { devWarning } from './devWarning'\n\n// The open-state props of every component that can show and hide itself (see `CONVENTIONS.md`):\n// `visible` is controlled, `defaultVisible` is the initial state of an uncontrolled component, and\n// `onVisibleChange` reports each change the component asks for. Each component declares the three\n// itself, so its prop table says what asks for a change there.\nexport interface VisibleStateProps {\n defaultVisible?: boolean\n onVisibleChange?: (visible: boolean) => void\n visible?: boolean\n}\n\n/**\n * Warns when a component asks to show or hide and nothing can follow the request: `visible` is\n * set and there is no `onVisibleChange`. Holding a component open or closed that way is allowed,\n * so this reports only a request that was dropped, not the props themselves.\n */\nexport function warnDroppedVisibleRequest(\n { onVisibleChange, visible }: VisibleStateProps,\n next: boolean,\n displayName: string\n): void {\n devWarning(\n visible !== undefined && !onVisibleChange,\n `${displayName}: asked to ${next ? 'show' : 'hide'}, but \\`visible\\` is set and there is no ` +\n '`onVisibleChange`, so nothing changed. Pass `onVisibleChange` to follow its requests, or ' +\n '`defaultVisible` to set only the initial state.'\n )\n}\n"],"mappings":"uCAiBA,SAAgB,EACd,CAAE,kBAAiB,WACnB,EACA,EACM,CACN,EACE,IAAY,IAAA,IAAa,CAAC,EAC1B,GAAG,EAAY,aAAa,EAAO,OAAS,OAAO,wLAGrD,CACF"}
@@ -1,2 +1,2 @@
1
- import { n as CloseButtonProps, t as CloseButton } from "./chunks/index-XjLvaH4G.js";
1
+ import { n as CloseButtonProps, t as CloseButton } from "./chunks/index-BfEJYF4c.js";
2
2
  export { CloseButton, type CloseButtonProps };
@@ -1 +1 @@
1
- "use client";import"./chunks/focus-ring-SR_LwaN7.js";import{t as e}from"./chunks/CloseButton-DJM7FRKh.js";export{e as CloseButton};
1
+ "use client";import"./chunks/focus-ring-SR_LwaN7.js";import{t as e}from"./chunks/CloseButton-DPgQztE0.js";export{e as CloseButton};
package/dist/collapse.js CHANGED
@@ -1 +1 @@
1
- "use client";import{t as e}from"./chunks/collapse-WifcChO8.js";export{e as Collapse};
1
+ "use client";import{t as e}from"./chunks/collapse--Go2Y73B.js";export{e as Collapse};
@@ -1 +1 @@
1
- "use client";import{t as e}from"./chunks/color-input-CyRaLR_G.js";export{e as ColorInput};
1
+ "use client";import{t as e}from"./chunks/color-input-Bwl5ef5B.js";export{e as ColorInput};