@televet/kibble-ui 4.0.0-beta.65 → 4.0.0-beta.67

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 (405) hide show
  1. package/dist/chunks/{alert.types-Dth5h5qO.js → alert.types-B7BlPX2-.js} +10 -11
  2. package/dist/chunks/{alert.types-Dth5h5qO.js.map → alert.types-B7BlPX2-.js.map} +1 -1
  3. package/dist/chunks/alert.types-BsvcbTZD.js +2 -0
  4. package/dist/chunks/{alert.types-BvnpOwve.js.map → alert.types-BsvcbTZD.js.map} +1 -1
  5. package/dist/chunks/{avatar.component-BPCJZRyT.js → avatar.component-CB5m8zha.js} +27 -27
  6. package/dist/chunks/{avatar.component-BPCJZRyT.js.map → avatar.component-CB5m8zha.js.map} +1 -1
  7. package/dist/chunks/avatar.component-RKtP3MZt.js +2 -0
  8. package/dist/chunks/{avatar.component-y7gTa1dV.js.map → avatar.component-RKtP3MZt.js.map} +1 -1
  9. package/dist/chunks/{avatarGroup.component-BnRXVOIV.js → avatarGroup.component-CKFjjo2R.js} +2 -2
  10. package/dist/chunks/{avatarGroup.component-BnRXVOIV.js.map → avatarGroup.component-CKFjjo2R.js.map} +1 -1
  11. package/dist/chunks/{avatarGroup.component-Mfl8jvgp.js → avatarGroup.component-CjBeAxHZ.js} +2 -2
  12. package/dist/chunks/{avatarGroup.component-Mfl8jvgp.js.map → avatarGroup.component-CjBeAxHZ.js.map} +1 -1
  13. package/dist/chunks/{button.component-Dd9AfGox.js → button.component-BQA_MGYQ.js} +2 -2
  14. package/dist/chunks/{button.component-Dd9AfGox.js.map → button.component-BQA_MGYQ.js.map} +1 -1
  15. package/dist/chunks/{button.component-BpF3MzbZ.js → button.component-DahLrK9h.js} +3 -3
  16. package/dist/chunks/{button.component-BpF3MzbZ.js.map → button.component-DahLrK9h.js.map} +1 -1
  17. package/dist/chunks/{buttonGroup.component-6ZBOJbfR.js → buttonGroup.component-BI44nuxH.js} +2 -2
  18. package/dist/chunks/{buttonGroup.component-6ZBOJbfR.js.map → buttonGroup.component-BI44nuxH.js.map} +1 -1
  19. package/dist/chunks/{buttonGroup.component-DQfB4Nj3.js → buttonGroup.component-UKmJh2zn.js} +5 -5
  20. package/dist/chunks/{buttonGroup.component-DQfB4Nj3.js.map → buttonGroup.component-UKmJh2zn.js.map} +1 -1
  21. package/dist/chunks/characterCounter.component-B8efVNy4.js +2 -0
  22. package/dist/chunks/{characterCounter.component-4T8NHb11.js.map → characterCounter.component-B8efVNy4.js.map} +1 -1
  23. package/dist/chunks/{characterCounter.component-Cs0y0DOj.js → characterCounter.component-xgc8P1mp.js} +2 -2
  24. package/dist/chunks/{characterCounter.component-Cs0y0DOj.js.map → characterCounter.component-xgc8P1mp.js.map} +1 -1
  25. package/dist/chunks/{checkbox.component-DqlWmIyY.js → checkbox.component-5GtlYTnJ.js} +16 -16
  26. package/dist/chunks/{checkbox.component-DqlWmIyY.js.map → checkbox.component-5GtlYTnJ.js.map} +1 -1
  27. package/dist/chunks/checkbox.component-DO9NDbmM.js +2 -0
  28. package/dist/chunks/{checkbox.component-CFuJaYmY.js.map → checkbox.component-DO9NDbmM.js.map} +1 -1
  29. package/dist/chunks/{checkbox.records-08YIiUZO.js → checkbox.records-69wNHjsY.js} +8 -8
  30. package/dist/chunks/{checkbox.records-08YIiUZO.js.map → checkbox.records-69wNHjsY.js.map} +1 -1
  31. package/dist/chunks/checkbox.records-D7NUtCRR.js +2 -0
  32. package/dist/chunks/{checkbox.records-B7refmmT.js.map → checkbox.records-D7NUtCRR.js.map} +1 -1
  33. package/dist/chunks/{checkboxGroup.component-DaxmsqdZ.js → checkboxGroup.component-C1sPgVro.js} +2 -2
  34. package/dist/chunks/{checkboxGroup.component-DaxmsqdZ.js.map → checkboxGroup.component-C1sPgVro.js.map} +1 -1
  35. package/dist/chunks/{checkboxGroup.component-DBqDJvPC.js → checkboxGroup.component-Dq3jCGDU.js} +3 -3
  36. package/dist/chunks/{checkboxGroup.component-DBqDJvPC.js.map → checkboxGroup.component-Dq3jCGDU.js.map} +1 -1
  37. package/dist/chunks/{conversationCard.component-Bg1Q9FdN.js → conversationCard.component-LpR5eSru.js} +18 -20
  38. package/dist/chunks/{conversationCard.component-Bg1Q9FdN.js.map → conversationCard.component-LpR5eSru.js.map} +1 -1
  39. package/dist/chunks/conversationCard.component-qWYvoxVn.js +2 -0
  40. package/dist/chunks/{conversationCard.component-CBrw3VnT.js.map → conversationCard.component-qWYvoxVn.js.map} +1 -1
  41. package/dist/chunks/datePicker.component-CLR0tErm.js +15 -0
  42. package/dist/chunks/{datePicker.component-u52NQcza.js.map → datePicker.component-CLR0tErm.js.map} +1 -1
  43. package/dist/chunks/{datePicker.component-DfQNebKg.js → datePicker.component-DVR8Ech4.js} +85 -87
  44. package/dist/chunks/{datePicker.component-DfQNebKg.js.map → datePicker.component-DVR8Ech4.js.map} +1 -1
  45. package/dist/chunks/{dialog-trigger-BPlPzPU-.js → dialog-trigger-C6rpz6Do.js} +9 -9
  46. package/dist/chunks/{dialog-trigger-BPlPzPU-.js.map → dialog-trigger-C6rpz6Do.js.map} +1 -1
  47. package/dist/chunks/dialog-trigger-JNnMRY13.js +2 -0
  48. package/dist/chunks/{dialog-trigger-B5NK0lr-.js.map → dialog-trigger-JNnMRY13.js.map} +1 -1
  49. package/dist/chunks/{group-DPCVolOl.js → group-DKypflCt.js} +2 -2
  50. package/dist/chunks/{group-DPCVolOl.js.map → group-DKypflCt.js.map} +1 -1
  51. package/dist/chunks/group-Dv1hO5IW.js +2 -0
  52. package/dist/chunks/{group-Cv7AQw1b.js.map → group-Dv1hO5IW.js.map} +1 -1
  53. package/dist/chunks/heading.component-DkT5GYvU.js +2 -0
  54. package/dist/chunks/heading.component-DkT5GYvU.js.map +1 -0
  55. package/dist/chunks/heading.component-d5jKnwm5.js +976 -0
  56. package/dist/chunks/heading.component-d5jKnwm5.js.map +1 -0
  57. package/dist/chunks/icon-button-BTDZq0Tr.js +121 -0
  58. package/dist/chunks/icon-button-BTDZq0Tr.js.map +1 -0
  59. package/dist/chunks/icon-button-khcu437F.js +2 -0
  60. package/dist/chunks/icon-button-khcu437F.js.map +1 -0
  61. package/dist/chunks/{typography-Cqrokog3.js → icon.component-D84o075X.js} +43 -6
  62. package/dist/chunks/icon.component-D84o075X.js.map +1 -0
  63. package/dist/chunks/icon.component-DjiNNeqF.js +2 -0
  64. package/dist/chunks/icon.component-DjiNNeqF.js.map +1 -0
  65. package/dist/chunks/{index-Co91SHhW.js → index-B9cDqm2a.js} +3 -3
  66. package/dist/chunks/{index-Co91SHhW.js.map → index-B9cDqm2a.js.map} +1 -1
  67. package/dist/chunks/index-BDCLWoQU.js +2 -0
  68. package/dist/chunks/{index-ZaGEDS_0.js.map → index-BDCLWoQU.js.map} +1 -1
  69. package/dist/chunks/index-BIjZoyJk.js +70 -0
  70. package/dist/chunks/index-BIjZoyJk.js.map +1 -0
  71. package/dist/chunks/{index-D9DU-5GF.js → index-BL1VW2oK.js} +54 -55
  72. package/dist/chunks/{index-D9DU-5GF.js.map → index-BL1VW2oK.js.map} +1 -1
  73. package/dist/chunks/index-BiyIeWSg.js +2 -0
  74. package/dist/chunks/{index-BDnnTdaJ.js.map → index-BiyIeWSg.js.map} +1 -1
  75. package/dist/chunks/index-BlGAWSIX.js +3 -0
  76. package/dist/chunks/index-BlGAWSIX.js.map +1 -0
  77. package/dist/chunks/{index-DcJZ8q0f.js → index-Bn03tQNC.js} +19 -20
  78. package/dist/chunks/{index-DcJZ8q0f.js.map → index-Bn03tQNC.js.map} +1 -1
  79. package/dist/chunks/index-BpKhRg2I.js +2 -0
  80. package/dist/chunks/{index-COoMV9Mh.js.map → index-BpKhRg2I.js.map} +1 -1
  81. package/dist/chunks/index-Cb49D-ky.js +1328 -0
  82. package/dist/chunks/index-Cb49D-ky.js.map +1 -0
  83. package/dist/chunks/{index-MDMqrELk.js → index-Ciu8P7c-.js} +7 -7
  84. package/dist/chunks/{index-MDMqrELk.js.map → index-Ciu8P7c-.js.map} +1 -1
  85. package/dist/chunks/index-CmVbgcH8.js +2 -0
  86. package/dist/chunks/{index-Dyxhds_1.js.map → index-CmVbgcH8.js.map} +1 -1
  87. package/dist/chunks/{index-C2kxTsiE.js → index-CxHMu1In.js} +21 -23
  88. package/dist/chunks/{index-C2kxTsiE.js.map → index-CxHMu1In.js.map} +1 -1
  89. package/dist/chunks/index-CzzrUbmu.js +2 -0
  90. package/dist/chunks/{index-MlhL0PDC.js.map → index-CzzrUbmu.js.map} +1 -1
  91. package/dist/chunks/index-DFbSzgk8.js +8 -0
  92. package/dist/chunks/{index-UWtj4ULm.js.map → index-DFbSzgk8.js.map} +1 -1
  93. package/dist/chunks/{index-CjNAJEk5.js → index-DRABh-Lp.js} +105 -106
  94. package/dist/chunks/{index-CjNAJEk5.js.map → index-DRABh-Lp.js.map} +1 -1
  95. package/dist/chunks/index-DeprNCOL.js +2 -0
  96. package/dist/chunks/{index-BYf7SZUC.js.map → index-DeprNCOL.js.map} +1 -1
  97. package/dist/chunks/index-Fztcdoo_.js +2 -0
  98. package/dist/chunks/index-Fztcdoo_.js.map +1 -0
  99. package/dist/chunks/{index-S1uNQPZj.js → index-YfA5zlSf.js} +5 -5
  100. package/dist/chunks/{index-S1uNQPZj.js.map → index-YfA5zlSf.js.map} +1 -1
  101. package/dist/chunks/{link.component-CCFg-LIe.js → link.component-BQJI6gPi.js} +2 -2
  102. package/dist/chunks/{link.component-CCFg-LIe.js.map → link.component-BQJI6gPi.js.map} +1 -1
  103. package/dist/chunks/{link.component-DprieyUG.js → link.component-Cs05IsXP.js} +2 -2
  104. package/dist/chunks/{link.component-DprieyUG.js.map → link.component-Cs05IsXP.js.map} +1 -1
  105. package/dist/chunks/menu.component-BgAx3SsR.js +2 -0
  106. package/dist/chunks/{menu.component-CiZzHc2D.js.map → menu.component-BgAx3SsR.js.map} +1 -1
  107. package/dist/chunks/{menu.component-D4gknsq1.js → menu.component-CAr2xdZY.js} +28 -28
  108. package/dist/chunks/{menu.component-D4gknsq1.js.map → menu.component-CAr2xdZY.js.map} +1 -1
  109. package/dist/chunks/modal.context-DSKLfsJK.js +12 -0
  110. package/dist/chunks/modal.context-DSKLfsJK.js.map +1 -0
  111. package/dist/chunks/modal.context-EJ67QNzq.js +2 -0
  112. package/dist/chunks/modal.context-EJ67QNzq.js.map +1 -0
  113. package/dist/chunks/{modal.types-BV8Eand2.js → modal.types-B7PDc2GJ.js} +6 -6
  114. package/dist/chunks/{modal.types-BV8Eand2.js.map → modal.types-B7PDc2GJ.js.map} +1 -1
  115. package/dist/chunks/modal.types-CtHJAyfq.js +2 -0
  116. package/dist/chunks/{modal.types-9-Bz6ybC.js.map → modal.types-CtHJAyfq.js.map} +1 -1
  117. package/dist/chunks/{pinInput.types-U7Tfj5It.js → pinInput.types-TfkrphC7.js} +17 -17
  118. package/dist/chunks/{pinInput.types-U7Tfj5It.js.map → pinInput.types-TfkrphC7.js.map} +1 -1
  119. package/dist/chunks/pinInput.types-a0_2OLBO.js +2 -0
  120. package/dist/chunks/{pinInput.types-B-RchRm_.js.map → pinInput.types-a0_2OLBO.js.map} +1 -1
  121. package/dist/chunks/portal-CtkZ5xTm.js +3087 -0
  122. package/dist/chunks/portal-CtkZ5xTm.js.map +1 -0
  123. package/dist/chunks/portal-kmAjRmaV.js +22 -0
  124. package/dist/chunks/portal-kmAjRmaV.js.map +1 -0
  125. package/dist/chunks/{radio.records-D7VFHW-s.js → radio.records-DBS_lqNe.js} +9 -9
  126. package/dist/chunks/{radio.records-D7VFHW-s.js.map → radio.records-DBS_lqNe.js.map} +1 -1
  127. package/dist/chunks/radio.records-zKzNxtns.js +2 -0
  128. package/dist/chunks/{radio.records-DLffZyeq.js.map → radio.records-zKzNxtns.js.map} +1 -1
  129. package/dist/chunks/{radioGroup.component-DVsMiHFI.js → radioGroup.component-DBLLIgCZ.js} +17 -17
  130. package/dist/chunks/{radioGroup.component-DVsMiHFI.js.map → radioGroup.component-DBLLIgCZ.js.map} +1 -1
  131. package/dist/chunks/radioGroup.component-fpo_KMOY.js +2 -0
  132. package/dist/chunks/{radioGroup.component-CZwrCppd.js.map → radioGroup.component-fpo_KMOY.js.map} +1 -1
  133. package/dist/chunks/{ratingDots.component-1U-hoEpC.js → ratingDots.component-DG2nCpxT.js} +5 -5
  134. package/dist/chunks/{ratingDots.component-1U-hoEpC.js.map → ratingDots.component-DG2nCpxT.js.map} +1 -1
  135. package/dist/chunks/ratingDots.component-DJEDUD_9.js +2 -0
  136. package/dist/chunks/{ratingDots.component-qbroWQhZ.js.map → ratingDots.component-DJEDUD_9.js.map} +1 -1
  137. package/dist/chunks/render-strategy-C80bGq2n.js +2 -0
  138. package/dist/chunks/{render-strategy-BmWbSgqh.js.map → render-strategy-C80bGq2n.js.map} +1 -1
  139. package/dist/chunks/{render-strategy-C8hwN3bm.js → render-strategy-DN75XQJB.js} +2 -2
  140. package/dist/chunks/{render-strategy-C8hwN3bm.js.map → render-strategy-DN75XQJB.js.map} +1 -1
  141. package/dist/chunks/select.component-Bmop2_tX.js +2 -0
  142. package/dist/chunks/{select.component-C_Fs6Xeq.js.map → select.component-Bmop2_tX.js.map} +1 -1
  143. package/dist/chunks/{select.component-5vAzdrZa.js → select.component-DyXwbDeO.js} +46 -46
  144. package/dist/chunks/{select.component-5vAzdrZa.js.map → select.component-DyXwbDeO.js.map} +1 -1
  145. package/dist/chunks/{sortableList.component-BX3EvpRM.js → sortableList.component-CbZAQrKl.js} +4 -4
  146. package/dist/chunks/{sortableList.component-BX3EvpRM.js.map → sortableList.component-CbZAQrKl.js.map} +1 -1
  147. package/dist/chunks/{sortableList.component-B_O-YB3I.js → sortableList.component-b2t_K7ho.js} +2 -2
  148. package/dist/chunks/{sortableList.component-B_O-YB3I.js.map → sortableList.component-b2t_K7ho.js.map} +1 -1
  149. package/dist/chunks/{spinner.component-lHj69hIF.js → spinner.component-B1vU-FCd.js} +4 -4
  150. package/dist/chunks/{spinner.component-lHj69hIF.js.map → spinner.component-B1vU-FCd.js.map} +1 -1
  151. package/dist/chunks/spinner.component-CjQb7JjK.js +2 -0
  152. package/dist/chunks/{spinner.component-CzhcJOwX.js.map → spinner.component-CjQb7JjK.js.map} +1 -1
  153. package/dist/chunks/{styledAvatar.types-BvHm6hKS.js → styledAvatar.types-D8VWyELN.js} +2 -2
  154. package/dist/chunks/{styledAvatar.types-BvHm6hKS.js.map → styledAvatar.types-D8VWyELN.js.map} +1 -1
  155. package/dist/chunks/{styledAvatar.types-B9SHiNfg.js → styledAvatar.types-DstfmllC.js} +2 -2
  156. package/dist/chunks/{styledAvatar.types-B9SHiNfg.js.map → styledAvatar.types-DstfmllC.js.map} +1 -1
  157. package/dist/chunks/switch.component-ARZzuYrq.js +2 -0
  158. package/dist/chunks/{switch.component-B3Gfgft9.js.map → switch.component-ARZzuYrq.js.map} +1 -1
  159. package/dist/chunks/{switch.component-DjOGsCIQ.js → switch.component-DO9fxk_-.js} +22 -22
  160. package/dist/chunks/{switch.component-DjOGsCIQ.js.map → switch.component-DO9fxk_-.js.map} +1 -1
  161. package/dist/chunks/{tabs.component-Ca9jVGv0.js → tabs.component-BWTDtLWN.js} +55 -55
  162. package/dist/chunks/{tabs.component-Ca9jVGv0.js.map → tabs.component-BWTDtLWN.js.map} +1 -1
  163. package/dist/chunks/tabs.component-DRpNF8p-.js +2 -0
  164. package/dist/chunks/{tabs.component-pl0kO5_M.js.map → tabs.component-DRpNF8p-.js.map} +1 -1
  165. package/dist/chunks/tagBlock.component-Bahf1v33.js +2 -0
  166. package/dist/chunks/{tagBlock.component-C2DAQrQE.js.map → tagBlock.component-Bahf1v33.js.map} +1 -1
  167. package/dist/chunks/{tagBlock.component-CnPbyaGH.js → tagBlock.component-C3BrjwNJ.js} +16 -17
  168. package/dist/chunks/{tagBlock.component-CnPbyaGH.js.map → tagBlock.component-C3BrjwNJ.js.map} +1 -1
  169. package/dist/chunks/textInput.component-DDo9eUvp.js +2 -0
  170. package/dist/chunks/{textInput.component-D-galjwy.js.map → textInput.component-DDo9eUvp.js.map} +1 -1
  171. package/dist/chunks/{textInput.component-DXtEgbkr.js → textInput.component-LPGbDHwZ.js} +14 -14
  172. package/dist/chunks/{textInput.component-DXtEgbkr.js.map → textInput.component-LPGbDHwZ.js.map} +1 -1
  173. package/dist/chunks/textarea.component-5Ou5g_MJ.js +2 -0
  174. package/dist/chunks/{textarea.component-DmxMuMCU.js.map → textarea.component-5Ou5g_MJ.js.map} +1 -1
  175. package/dist/chunks/{textarea.component-Do0zHf-1.js → textarea.component-ClYqhTJX.js} +12 -12
  176. package/dist/chunks/{textarea.component-Do0zHf-1.js.map → textarea.component-ClYqhTJX.js.map} +1 -1
  177. package/dist/chunks/theme.provider-DWJTtjw5.js +26 -0
  178. package/dist/chunks/theme.provider-DWJTtjw5.js.map +1 -0
  179. package/dist/chunks/{theme.provider-Dj4pZ815.js → theme.provider-vZgSb-q5.js} +1827 -1699
  180. package/dist/chunks/theme.provider-vZgSb-q5.js.map +1 -0
  181. package/dist/chunks/{timePicker.component-DTs3MjOx.js → timePicker.component-AgnrqtFu.js} +4 -4
  182. package/dist/chunks/{timePicker.component-DTs3MjOx.js.map → timePicker.component-AgnrqtFu.js.map} +1 -1
  183. package/dist/chunks/{timePicker.component-CophNE3d.js → timePicker.component-Bx0fHgrN.js} +2 -2
  184. package/dist/chunks/{timePicker.component-CophNE3d.js.map → timePicker.component-Bx0fHgrN.js.map} +1 -1
  185. package/dist/chunks/{timeRange.component-C5wSyUiZ.js → timeRange.component-B3Nv-nLB.js} +2 -2
  186. package/dist/chunks/{timeRange.component-C5wSyUiZ.js.map → timeRange.component-B3Nv-nLB.js.map} +1 -1
  187. package/dist/chunks/{timeRange.component-C5dt8sZn.js → timeRange.component-C14RiUcS.js} +2 -2
  188. package/dist/chunks/{timeRange.component-C5dt8sZn.js.map → timeRange.component-C14RiUcS.js.map} +1 -1
  189. package/dist/chunks/timestamp.component-DEx0cUkA.js +2 -0
  190. package/dist/chunks/{timestamp.component-rTLrzBPA.js.map → timestamp.component-DEx0cUkA.js.map} +1 -1
  191. package/dist/chunks/timestamp.component-Kxi_bKp1.js +53 -0
  192. package/dist/chunks/{timestamp.component-BPU8bf7p.js.map → timestamp.component-Kxi_bKp1.js.map} +1 -1
  193. package/dist/chunks/toaster.records-CGym-iT-.js +2 -0
  194. package/dist/chunks/{toaster.records-BJo0j1IZ.js.map → toaster.records-CGym-iT-.js.map} +1 -1
  195. package/dist/chunks/{toaster.records-BGfpUOVt.js → toaster.records-CKeu_PyD.js} +21 -22
  196. package/dist/chunks/{toaster.records-BGfpUOVt.js.map → toaster.records-CKeu_PyD.js.map} +1 -1
  197. package/dist/chunks/{typography.records-C6G_65b4.js → typography.records-BeoK0Uyj.js} +2 -2
  198. package/dist/chunks/{typography.records-C6G_65b4.js.map → typography.records-BeoK0Uyj.js.map} +1 -1
  199. package/dist/chunks/{typography.records-jnjWfTLS.js → typography.records-XkUlmiSk.js} +2 -2
  200. package/dist/chunks/{typography.records-jnjWfTLS.js.map → typography.records-XkUlmiSk.js.map} +1 -1
  201. package/dist/chunks/{use-field-context-B_G7Yziz.js → use-field-context-1gfMkjvo.js} +2 -2
  202. package/dist/chunks/{use-field-context-B_G7Yziz.js.map → use-field-context-1gfMkjvo.js.map} +1 -1
  203. package/dist/chunks/use-field-context-DnTe9gdc.js +2 -0
  204. package/dist/chunks/{use-field-context--wBJQY1R.js.map → use-field-context-DnTe9gdc.js.map} +1 -1
  205. package/dist/chunks/{withFormControl-BDuV97Vb.js → withFormControl-DfqMqkSU.js} +39 -39
  206. package/dist/chunks/{withFormControl-BDuV97Vb.js.map → withFormControl-DfqMqkSU.js.map} +1 -1
  207. package/dist/chunks/withFormControl-kyGjRFza.js +2 -0
  208. package/dist/chunks/{withFormControl-DpytztWF.js.map → withFormControl-kyGjRFza.js.map} +1 -1
  209. package/dist/cjs/chakra/index.cjs +1 -1
  210. package/dist/cjs/chakra/index.cjs.map +1 -1
  211. package/dist/cjs/components/Alert/index.cjs +1 -1
  212. package/dist/cjs/components/Avatar/index.cjs +1 -1
  213. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  214. package/dist/cjs/components/Button/index.cjs +1 -1
  215. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  216. package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
  217. package/dist/cjs/components/Checkbox/index.cjs +1 -1
  218. package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
  219. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  220. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  221. package/dist/cjs/components/Heading/index.cjs +1 -1
  222. package/dist/cjs/components/Icon/index.cjs +1 -1
  223. package/dist/cjs/components/Link/index.cjs +1 -1
  224. package/dist/cjs/components/Menu/index.cjs +1 -1
  225. package/dist/cjs/components/Modal/index.cjs +1 -1
  226. package/dist/cjs/components/PinInput/index.cjs +1 -1
  227. package/dist/cjs/components/Popover/index.cjs +1 -1
  228. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  229. package/dist/cjs/components/RatingDots/index.cjs +1 -1
  230. package/dist/cjs/components/Select/index.cjs +1 -1
  231. package/dist/cjs/components/SortableList/index.cjs +1 -1
  232. package/dist/cjs/components/Spinner/index.cjs +1 -1
  233. package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
  234. package/dist/cjs/components/Switch/index.cjs +1 -1
  235. package/dist/cjs/components/Tabs/index.cjs +1 -1
  236. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  237. package/dist/cjs/components/Text/index.cjs +1 -1
  238. package/dist/cjs/components/TextInput/index.cjs +1 -1
  239. package/dist/cjs/components/Textarea/index.cjs +1 -1
  240. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  241. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  242. package/dist/cjs/components/Timestamp/index.cjs +1 -1
  243. package/dist/cjs/components/Toast/index.cjs +1 -1
  244. package/dist/cjs/components/Tooltip/index.cjs +1 -1
  245. package/dist/cjs/components/index.cjs +1 -1
  246. package/dist/cjs/index.cjs +1 -1
  247. package/dist/cjs/theme/index.cjs +1 -1
  248. package/dist/esm/chakra/index.js +146 -147
  249. package/dist/esm/chakra/index.js.map +1 -1
  250. package/dist/esm/components/Alert/index.js +1 -1
  251. package/dist/esm/components/Avatar/index.js +1 -1
  252. package/dist/esm/components/AvatarGroup/index.js +1 -1
  253. package/dist/esm/components/Button/index.js +1 -1
  254. package/dist/esm/components/ButtonGroup/index.js +1 -1
  255. package/dist/esm/components/CharacterCounter/index.js +1 -1
  256. package/dist/esm/components/Checkbox/index.js +1 -1
  257. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  258. package/dist/esm/components/ConversationCard/index.js +1 -1
  259. package/dist/esm/components/DatePicker/index.js +1 -1
  260. package/dist/esm/components/Heading/index.js +1 -1
  261. package/dist/esm/components/Icon/index.js +1 -1
  262. package/dist/esm/components/Link/index.js +1 -1
  263. package/dist/esm/components/Menu/index.js +1 -1
  264. package/dist/esm/components/Modal/index.js +1 -1
  265. package/dist/esm/components/PinInput/index.js +1 -1
  266. package/dist/esm/components/Popover/index.js +1 -1
  267. package/dist/esm/components/RadioGroup/index.js +1 -1
  268. package/dist/esm/components/RatingDots/index.js +1 -1
  269. package/dist/esm/components/Select/index.js +1 -1
  270. package/dist/esm/components/SortableList/index.js +1 -1
  271. package/dist/esm/components/Spinner/index.js +1 -1
  272. package/dist/esm/components/StyledAvatar/index.js +1 -1
  273. package/dist/esm/components/Switch/index.js +1 -1
  274. package/dist/esm/components/Tabs/index.js +1 -1
  275. package/dist/esm/components/TagBlock/index.js +1 -1
  276. package/dist/esm/components/Text/index.js +2 -2
  277. package/dist/esm/components/TextInput/index.js +1 -1
  278. package/dist/esm/components/Textarea/index.js +1 -1
  279. package/dist/esm/components/TimePicker/index.js +1 -1
  280. package/dist/esm/components/TimeRange/index.js +1 -1
  281. package/dist/esm/components/Timestamp/index.js +1 -1
  282. package/dist/esm/components/Toast/index.js +1 -1
  283. package/dist/esm/components/Tooltip/index.js +1 -1
  284. package/dist/esm/components/index.js +89 -92
  285. package/dist/esm/components/index.js.map +1 -1
  286. package/dist/esm/index.js +111 -114
  287. package/dist/esm/index.js.map +1 -1
  288. package/dist/esm/theme/index.js +1 -1
  289. package/dist/types/components/Menu/menu.recipe.d.ts +1 -1
  290. package/dist/types/components/Modal/modal.recipe.d.ts +1 -1
  291. package/dist/types/components/TimePicker/timePicker.recipe.d.ts +1 -1
  292. package/dist/types/components/Tooltip/tooltip.component.d.ts +5 -6
  293. package/dist/types/theme/tokens/shadows/shadows.config.d.ts +3 -3
  294. package/dist/types/theme/tokens/sizes/sizes.config.d.ts +2 -2
  295. package/dist/types/theme/tokens/zIndices/zIndices.config.d.ts +11 -11
  296. package/package.json +1 -1
  297. package/dist/chunks/alert.types-BvnpOwve.js +0 -2
  298. package/dist/chunks/attr-BMs6szZx.js +0 -2
  299. package/dist/chunks/attr-BMs6szZx.js.map +0 -1
  300. package/dist/chunks/attr-sm10PXOd.js +0 -5
  301. package/dist/chunks/attr-sm10PXOd.js.map +0 -1
  302. package/dist/chunks/avatar.component-y7gTa1dV.js +0 -2
  303. package/dist/chunks/characterCounter.component-4T8NHb11.js +0 -2
  304. package/dist/chunks/checkbox.component-CFuJaYmY.js +0 -2
  305. package/dist/chunks/checkbox.records-B7refmmT.js +0 -2
  306. package/dist/chunks/conversationCard.component-CBrw3VnT.js +0 -2
  307. package/dist/chunks/datePicker.component-u52NQcza.js +0 -15
  308. package/dist/chunks/dialog-trigger-B5NK0lr-.js +0 -2
  309. package/dist/chunks/group-Cv7AQw1b.js +0 -2
  310. package/dist/chunks/heading.component-BXcyhAEU.js +0 -12
  311. package/dist/chunks/heading.component-BXcyhAEU.js.map +0 -1
  312. package/dist/chunks/heading.component-ZD_UVarx.js +0 -2
  313. package/dist/chunks/heading.component-ZD_UVarx.js.map +0 -1
  314. package/dist/chunks/icon-button-DTZOklQ9.js +0 -119
  315. package/dist/chunks/icon-button-DTZOklQ9.js.map +0 -1
  316. package/dist/chunks/icon-button-DtjZ-SdQ.js +0 -2
  317. package/dist/chunks/icon-button-DtjZ-SdQ.js.map +0 -1
  318. package/dist/chunks/icon.component-C0e0UGBw.js +0 -2
  319. package/dist/chunks/icon.component-C0e0UGBw.js.map +0 -1
  320. package/dist/chunks/icon.component-DGNCL1Yc.js +0 -42
  321. package/dist/chunks/icon.component-DGNCL1Yc.js.map +0 -1
  322. package/dist/chunks/index-BBZxmcrY.js +0 -2
  323. package/dist/chunks/index-BBZxmcrY.js.map +0 -1
  324. package/dist/chunks/index-BDnnTdaJ.js +0 -2
  325. package/dist/chunks/index-BGwwyukg.js +0 -2
  326. package/dist/chunks/index-BGwwyukg.js.map +0 -1
  327. package/dist/chunks/index-BNYygzo-.js +0 -376
  328. package/dist/chunks/index-BNYygzo-.js.map +0 -1
  329. package/dist/chunks/index-BYf7SZUC.js +0 -2
  330. package/dist/chunks/index-COoMV9Mh.js +0 -2
  331. package/dist/chunks/index-CYk-7wwG.js +0 -1018
  332. package/dist/chunks/index-CYk-7wwG.js.map +0 -1
  333. package/dist/chunks/index-CZ42b9rT.js +0 -3
  334. package/dist/chunks/index-CZ42b9rT.js.map +0 -1
  335. package/dist/chunks/index-CZz7hHWb.js +0 -2
  336. package/dist/chunks/index-CZz7hHWb.js.map +0 -1
  337. package/dist/chunks/index-DUHFrLMI.js +0 -389
  338. package/dist/chunks/index-DUHFrLMI.js.map +0 -1
  339. package/dist/chunks/index-Dyxhds_1.js +0 -2
  340. package/dist/chunks/index-MlhL0PDC.js +0 -2
  341. package/dist/chunks/index-UWtj4ULm.js +0 -8
  342. package/dist/chunks/index-ZaGEDS_0.js +0 -2
  343. package/dist/chunks/index-j7W9Hyzx.js +0 -322
  344. package/dist/chunks/index-j7W9Hyzx.js.map +0 -1
  345. package/dist/chunks/menu.component-CiZzHc2D.js +0 -2
  346. package/dist/chunks/modal.types-9-Bz6ybC.js +0 -2
  347. package/dist/chunks/pinInput.types-B-RchRm_.js +0 -2
  348. package/dist/chunks/popover-80QH8HEJ.js +0 -2
  349. package/dist/chunks/popover-80QH8HEJ.js.map +0 -1
  350. package/dist/chunks/popover-B9rNOU0g.js +0 -110
  351. package/dist/chunks/popover-B9rNOU0g.js.map +0 -1
  352. package/dist/chunks/popover-root-provider-CeLLpesI.js +0 -43
  353. package/dist/chunks/popover-root-provider-CeLLpesI.js.map +0 -1
  354. package/dist/chunks/popover-root-provider-DAMDDAHQ.js +0 -2
  355. package/dist/chunks/popover-root-provider-DAMDDAHQ.js.map +0 -1
  356. package/dist/chunks/popover.component-A8In7d2B.js +0 -2
  357. package/dist/chunks/popover.component-A8In7d2B.js.map +0 -1
  358. package/dist/chunks/popover.component-BR8W3Jb8.js +0 -322
  359. package/dist/chunks/popover.component-BR8W3Jb8.js.map +0 -1
  360. package/dist/chunks/popover.recipe--gMRcQTS.js +0 -479
  361. package/dist/chunks/popover.recipe--gMRcQTS.js.map +0 -1
  362. package/dist/chunks/popover.recipe-DLeyokHo.js +0 -2
  363. package/dist/chunks/popover.recipe-DLeyokHo.js.map +0 -1
  364. package/dist/chunks/radio.records-DLffZyeq.js +0 -2
  365. package/dist/chunks/radioGroup.component-CZwrCppd.js +0 -2
  366. package/dist/chunks/ratingDots.component-qbroWQhZ.js +0 -2
  367. package/dist/chunks/render-strategy-BmWbSgqh.js +0 -2
  368. package/dist/chunks/select.component-C_Fs6Xeq.js +0 -2
  369. package/dist/chunks/spinner-BWqSIW6m.js +0 -8
  370. package/dist/chunks/spinner-BWqSIW6m.js.map +0 -1
  371. package/dist/chunks/spinner-BnpL14kK.js +0 -2
  372. package/dist/chunks/spinner-BnpL14kK.js.map +0 -1
  373. package/dist/chunks/spinner.component-CzhcJOwX.js +0 -2
  374. package/dist/chunks/switch.component-B3Gfgft9.js +0 -2
  375. package/dist/chunks/tabs.component-pl0kO5_M.js +0 -2
  376. package/dist/chunks/tagBlock.component-C2DAQrQE.js +0 -2
  377. package/dist/chunks/text.component-CnnBhB3c.js +0 -2
  378. package/dist/chunks/text.component-CnnBhB3c.js.map +0 -1
  379. package/dist/chunks/text.component-Cpruo7MB.js +0 -12
  380. package/dist/chunks/text.component-Cpruo7MB.js.map +0 -1
  381. package/dist/chunks/textInput.component-D-galjwy.js +0 -2
  382. package/dist/chunks/textarea.component-DmxMuMCU.js +0 -2
  383. package/dist/chunks/theme.provider-CIJGn9Kh.js +0 -26
  384. package/dist/chunks/theme.provider-CIJGn9Kh.js.map +0 -1
  385. package/dist/chunks/theme.provider-Dj4pZ815.js.map +0 -1
  386. package/dist/chunks/timestamp.component-BPU8bf7p.js +0 -54
  387. package/dist/chunks/timestamp.component-rTLrzBPA.js +0 -2
  388. package/dist/chunks/toaster.records-BJo0j1IZ.js +0 -2
  389. package/dist/chunks/tooltip.component-CwrXAVEq.js +0 -2
  390. package/dist/chunks/tooltip.component-CwrXAVEq.js.map +0 -1
  391. package/dist/chunks/tooltip.component-DgOzrNG3.js +0 -758
  392. package/dist/chunks/tooltip.component-DgOzrNG3.js.map +0 -1
  393. package/dist/chunks/typography-Cqrokog3.js.map +0 -1
  394. package/dist/chunks/typography-CtiaGoJG.js +0 -2
  395. package/dist/chunks/typography-CtiaGoJG.js.map +0 -1
  396. package/dist/chunks/use-field-context--wBJQY1R.js +0 -2
  397. package/dist/chunks/use-locale-context-BdqHZ8L8.js +0 -22
  398. package/dist/chunks/use-locale-context-BdqHZ8L8.js.map +0 -1
  399. package/dist/chunks/use-locale-context-D-agiW5E.js +0 -2301
  400. package/dist/chunks/use-locale-context-D-agiW5E.js.map +0 -1
  401. package/dist/chunks/withFormControl-DpytztWF.js +0 -2
  402. package/dist/chunks/withTruncation-DPbMF-jg.js +0 -2
  403. package/dist/chunks/withTruncation-DPbMF-jg.js.map +0 -1
  404. package/dist/chunks/withTruncation-DoQriKuH.js +0 -67
  405. package/dist/chunks/withTruncation-DoQriKuH.js.map +0 -1
@@ -1,389 +0,0 @@
1
- import { r as K, a2 as R, ai as M, aj as L, ak as v, al as m, R as g, D as O, am as S, a6 as A, an as _, ao as W, ab as P, ap as $ } from "./index-CYk-7wwG.js";
2
- var N = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), k = {}, D = 0, B = (e) => e && (e.host || B(e.parentNode)), V = (e, i) => i.map((o) => {
3
- if (e.contains(o)) return o;
4
- const t = B(o);
5
- return t && e.contains(t) ? t : (console.error("[zag-js > ariaHidden] target", o, "in not contained inside", e, ". Doing nothing"), null);
6
- }).filter((o) => !!o), H = (e) => e.localName === "next-route-announcer" || e.localName === "script" || e.hasAttribute("aria-live") ? !0 : e.matches("[data-live-announcer]"), U = (e, i) => {
7
- const { parentNode: o, markerName: t, controlAttribute: s } = i, n = V(o, Array.isArray(e) ? e : [e]);
8
- k[t] || (k[t] = /* @__PURE__ */ new WeakMap());
9
- const a = k[t], u = [], l = /* @__PURE__ */ new Set(), r = new Set(n), d = (c) => {
10
- !c || l.has(c) || (l.add(c), d(c.parentNode));
11
- };
12
- n.forEach(d);
13
- const b = (c) => {
14
- !c || r.has(c) || Array.prototype.forEach.call(c.children, (f) => {
15
- if (l.has(f))
16
- b(f);
17
- else
18
- try {
19
- if (H(f)) return;
20
- const w = f.getAttribute(s) === "true", T = (N.get(f) || 0) + 1, x = (a.get(f) || 0) + 1;
21
- N.set(f, T), a.set(f, x), u.push(f), T === 1 && w && I.set(f, !0), x === 1 && f.setAttribute(t, ""), w || f.setAttribute(s, "true");
22
- } catch (p) {
23
- console.error("[zag-js > ariaHidden] cannot operate on ", f, p);
24
- }
25
- });
26
- };
27
- return b(o), l.clear(), D++, () => {
28
- u.forEach((c) => {
29
- const f = N.get(c) - 1, p = a.get(c) - 1;
30
- N.set(c, f), a.set(c, p), f || (I.has(c) || c.removeAttribute(s), I.delete(c)), p || c.removeAttribute(t);
31
- }), D--, D || (N = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), k = {});
32
- };
33
- }, X = (e) => (Array.isArray(e) ? e[0] : e).ownerDocument.body, Y = (e, i = X(e), o = "data-aria-hidden") => {
34
- if (i)
35
- return U(e, {
36
- parentNode: i,
37
- markerName: o,
38
- controlAttribute: "aria-hidden"
39
- });
40
- }, j = (e) => {
41
- const i = requestAnimationFrame(() => e());
42
- return () => cancelAnimationFrame(i);
43
- };
44
- function it(e, i = {}) {
45
- const { defer: o = !0 } = i, t = o ? j : (n) => n(), s = [];
46
- return s.push(
47
- t(() => {
48
- const a = (typeof e == "function" ? e() : e).filter(Boolean);
49
- a.length !== 0 && s.push(Y(a));
50
- })
51
- ), () => {
52
- s.forEach((n) => n?.());
53
- };
54
- }
55
- var q = Object.defineProperty, z = (e, i, o) => i in e ? q(e, i, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[i] = o, h = (e, i, o) => z(e, typeof i != "symbol" ? i + "" : i, o), G = {
56
- activateTrap(e, i) {
57
- if (e.length > 0) {
58
- const t = e[e.length - 1];
59
- t !== i && t.pause();
60
- }
61
- const o = e.indexOf(i);
62
- o === -1 || e.splice(o, 1), e.push(i);
63
- },
64
- deactivateTrap(e, i) {
65
- const o = e.indexOf(i);
66
- o !== -1 && e.splice(o, 1), e.length > 0 && e[e.length - 1].unpause();
67
- }
68
- }, J = [], Q = class {
69
- constructor(e, i) {
70
- h(this, "trapStack"), h(this, "config"), h(this, "doc"), h(this, "state", {
71
- containers: [],
72
- containerGroups: [],
73
- tabbableGroups: [],
74
- nodeFocusedBeforeActivation: null,
75
- mostRecentlyFocusedNode: null,
76
- active: !1,
77
- paused: !1,
78
- delayInitialFocusTimer: void 0,
79
- recentNavEvent: void 0
80
- }), h(this, "listenerCleanups", []), h(this, "handleFocus", (t) => {
81
- const s = O(t), n = this.findContainerIndex(s, t) >= 0;
82
- if (n || S(s))
83
- n && (this.state.mostRecentlyFocusedNode = s);
84
- else {
85
- t.stopImmediatePropagation();
86
- let a, u = !0;
87
- if (this.state.mostRecentlyFocusedNode)
88
- if (m(this.state.mostRecentlyFocusedNode) > 0) {
89
- const l = this.findContainerIndex(this.state.mostRecentlyFocusedNode), { tabbableNodes: r } = this.state.containerGroups[l];
90
- if (r.length > 0) {
91
- const d = r.findIndex((b) => b === this.state.mostRecentlyFocusedNode);
92
- d >= 0 && (this.config.isKeyForward(this.state.recentNavEvent) ? d + 1 < r.length && (a = r[d + 1], u = !1) : d - 1 >= 0 && (a = r[d - 1], u = !1));
93
- }
94
- } else
95
- this.state.containerGroups.some((l) => l.tabbableNodes.some((r) => m(r) > 0)) || (u = !1);
96
- else
97
- u = !1;
98
- u && (a = this.findNextNavNode({
99
- // move FROM the MRU node, not event-related node (which will be the node that is
100
- // outside the trap causing the focus escape we're trying to fix)
101
- target: this.state.mostRecentlyFocusedNode,
102
- isBackward: this.config.isKeyBackward(this.state.recentNavEvent)
103
- })), a ? this.tryFocus(a) : this.tryFocus(this.state.mostRecentlyFocusedNode || this.getInitialFocusNode());
104
- }
105
- this.state.recentNavEvent = void 0;
106
- }), h(this, "handlePointerDown", (t) => {
107
- const s = O(t);
108
- if (!(this.findContainerIndex(s, t) >= 0)) {
109
- if (y(this.config.clickOutsideDeactivates, t)) {
110
- this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });
111
- return;
112
- }
113
- y(this.config.allowOutsideClick, t) || t.preventDefault();
114
- }
115
- }), h(this, "handleClick", (t) => {
116
- const s = O(t);
117
- this.findContainerIndex(s, t) >= 0 || y(this.config.clickOutsideDeactivates, t) || y(this.config.allowOutsideClick, t) || (t.preventDefault(), t.stopImmediatePropagation());
118
- }), h(this, "handleTabKey", (t) => {
119
- if (this.config.isKeyForward(t) || this.config.isKeyBackward(t)) {
120
- this.state.recentNavEvent = t;
121
- const s = this.config.isKeyBackward(t), n = this.findNextNavNode({ event: t, isBackward: s });
122
- if (!n) return;
123
- F(t) && t.preventDefault(), this.tryFocus(n);
124
- }
125
- }), h(this, "handleEscapeKey", (t) => {
126
- Z(t) && y(this.config.escapeDeactivates, t) !== !1 && (t.preventDefault(), this.deactivate());
127
- }), h(this, "_mutationObserver"), h(this, "setupMutationObserver", () => {
128
- const t = this.doc.defaultView || window;
129
- this._mutationObserver = new t.MutationObserver((s) => {
130
- s.some((a) => Array.from(a.removedNodes).some((l) => l === this.state.mostRecentlyFocusedNode)) && this.tryFocus(this.getInitialFocusNode());
131
- });
132
- }), h(this, "updateObservedNodes", () => {
133
- this._mutationObserver?.disconnect(), this.state.active && !this.state.paused && this.state.containers.map((t) => {
134
- this._mutationObserver?.observe(t, { subtree: !0, childList: !0 });
135
- });
136
- }), h(this, "getInitialFocusNode", () => {
137
- let t = this.getNodeForOption("initialFocus", { hasFallback: !0 });
138
- if (t === !1)
139
- return !1;
140
- if (t === void 0 || t && !A(t))
141
- if (this.findContainerIndex(this.doc.activeElement) >= 0)
142
- t = this.doc.activeElement;
143
- else {
144
- const s = this.state.tabbableGroups[0];
145
- t = s && s.firstTabbableNode || this.getNodeForOption("fallbackFocus");
146
- }
147
- else t === null && (t = this.getNodeForOption("fallbackFocus"));
148
- if (!t)
149
- throw new Error("Your focus-trap needs to have at least one focusable element");
150
- return t.isConnected || (t = this.getNodeForOption("fallbackFocus")), t;
151
- }), h(this, "tryFocus", (t) => {
152
- if (t !== !1 && t !== _(this.doc)) {
153
- if (!t || !t.focus) {
154
- this.tryFocus(this.getInitialFocusNode());
155
- return;
156
- }
157
- t.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = t, tt(t) && t.select();
158
- }
159
- }), h(this, "deactivate", (t) => {
160
- if (!this.state.active) return this;
161
- const s = {
162
- onDeactivate: this.config.onDeactivate,
163
- onPostDeactivate: this.config.onPostDeactivate,
164
- checkCanReturnFocus: this.config.checkCanReturnFocus,
165
- ...t
166
- };
167
- clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(), G.deactivateTrap(this.trapStack, this);
168
- const n = this.getOption(s, "onDeactivate"), a = this.getOption(s, "onPostDeactivate"), u = this.getOption(s, "checkCanReturnFocus"), l = this.getOption(s, "returnFocus", "returnFocusOnDeactivate");
169
- n?.();
170
- const r = () => {
171
- E(() => {
172
- if (l) {
173
- const d = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
174
- this.tryFocus(d);
175
- }
176
- a?.();
177
- });
178
- };
179
- if (l && u) {
180
- const d = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
181
- return u(d).then(r, r), this;
182
- }
183
- return r(), this;
184
- }), h(this, "pause", (t) => {
185
- if (this.state.paused || !this.state.active)
186
- return this;
187
- const s = this.getOption(t, "onPause"), n = this.getOption(t, "onPostPause");
188
- return this.state.paused = !0, s?.(), this.removeListeners(), this.updateObservedNodes(), n?.(), this;
189
- }), h(this, "unpause", (t) => {
190
- if (!this.state.paused || !this.state.active)
191
- return this;
192
- const s = this.getOption(t, "onUnpause"), n = this.getOption(t, "onPostUnpause");
193
- return this.state.paused = !1, s?.(), this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), n?.(), this;
194
- }), h(this, "updateContainerElements", (t) => (this.state.containers = Array.isArray(t) ? t.filter(Boolean) : [t].filter(Boolean), this.state.active && this.updateTabbableNodes(), this.updateObservedNodes(), this)), h(this, "getReturnFocusNode", (t) => {
195
- const s = this.getNodeForOption("setReturnFocus", {
196
- params: [t]
197
- });
198
- return s || (s === !1 ? !1 : t);
199
- }), h(this, "getOption", (t, s, n) => t && t[s] !== void 0 ? t[s] : (
200
- // @ts-expect-error
201
- this.config[n || s]
202
- )), h(this, "getNodeForOption", (t, { hasFallback: s = !1, params: n = [] } = {}) => {
203
- let a = this.config[t];
204
- if (typeof a == "function" && (a = a(...n)), a === !0 && (a = void 0), !a) {
205
- if (a === void 0 || a === !1)
206
- return a;
207
- throw new Error(`\`${t}\` was specified but was not a node, or did not return a node`);
208
- }
209
- let u = a;
210
- if (typeof a == "string") {
211
- try {
212
- u = this.doc.querySelector(a);
213
- } catch (l) {
214
- throw new Error(`\`${t}\` appears to be an invalid selector; error="${l.message}"`);
215
- }
216
- if (!u && !s)
217
- throw new Error(`\`${t}\` as selector refers to no known node`);
218
- }
219
- return u;
220
- }), h(this, "findNextNavNode", (t) => {
221
- const { event: s, isBackward: n = !1 } = t, a = t.target || O(s);
222
- this.updateTabbableNodes();
223
- let u = null;
224
- if (this.state.tabbableGroups.length > 0) {
225
- const l = this.findContainerIndex(a, s), r = l >= 0 ? this.state.containerGroups[l] : void 0;
226
- if (l < 0)
227
- n ? u = this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode : u = this.state.tabbableGroups[0].firstTabbableNode;
228
- else if (n) {
229
- let d = this.state.tabbableGroups.findIndex(
230
- ({ firstTabbableNode: b }) => a === b
231
- );
232
- if (d < 0 && (r?.container === a || A(a) && !v(a) && !r?.nextTabbableNode(a, !1)) && (d = l), d >= 0) {
233
- const b = d === 0 ? this.state.tabbableGroups.length - 1 : d - 1, c = this.state.tabbableGroups[b];
234
- u = m(a) >= 0 ? c.lastTabbableNode : c.lastDomTabbableNode;
235
- } else F(s) || (u = r?.nextTabbableNode(a, !1));
236
- } else {
237
- let d = this.state.tabbableGroups.findIndex(
238
- ({ lastTabbableNode: b }) => a === b
239
- );
240
- if (d < 0 && (r?.container === a || A(a) && !v(a) && !r?.nextTabbableNode(a)) && (d = l), d >= 0) {
241
- const b = d === this.state.tabbableGroups.length - 1 ? 0 : d + 1, c = this.state.tabbableGroups[b];
242
- u = m(a) >= 0 ? c.firstTabbableNode : c.firstDomTabbableNode;
243
- } else F(s) || (u = r?.nextTabbableNode(a));
244
- }
245
- } else
246
- u = this.getNodeForOption("fallbackFocus");
247
- return u;
248
- }), this.trapStack = i.trapStack || J;
249
- const o = {
250
- returnFocusOnDeactivate: !0,
251
- escapeDeactivates: !0,
252
- delayInitialFocus: !0,
253
- isKeyForward(t) {
254
- return F(t) && !t.shiftKey;
255
- },
256
- isKeyBackward(t) {
257
- return F(t) && t.shiftKey;
258
- },
259
- ...i
260
- };
261
- this.doc = o.document || R(Array.isArray(e) ? e[0] : e), this.config = o, this.updateContainerElements(e), this.setupMutationObserver();
262
- }
263
- get active() {
264
- return this.state.active;
265
- }
266
- get paused() {
267
- return this.state.paused;
268
- }
269
- findContainerIndex(e, i) {
270
- const o = typeof i?.composedPath == "function" ? i.composedPath() : void 0;
271
- return this.state.containerGroups.findIndex(
272
- ({ container: t, tabbableNodes: s }) => t.contains(e) || o?.includes(t) || s.find((n) => n === e)
273
- );
274
- }
275
- updateTabbableNodes() {
276
- if (this.state.containerGroups = this.state.containers.map((e) => {
277
- const i = M(e), o = L(e), t = i.length > 0 ? i[0] : void 0, s = i.length > 0 ? i[i.length - 1] : void 0, n = o.find((r) => v(r)), a = o.slice().reverse().find((r) => v(r)), u = !!i.find((r) => m(r) > 0);
278
- function l(r, d = !0) {
279
- const b = i.indexOf(r);
280
- return b < 0 ? d ? o.slice(o.indexOf(r) + 1).find((c) => v(c)) : o.slice(0, o.indexOf(r)).reverse().find((c) => v(c)) : i[b + (d ? 1 : -1)];
281
- }
282
- return {
283
- container: e,
284
- tabbableNodes: i,
285
- focusableNodes: o,
286
- posTabIndexesFound: u,
287
- firstTabbableNode: t,
288
- lastTabbableNode: s,
289
- firstDomTabbableNode: n,
290
- lastDomTabbableNode: a,
291
- nextTabbableNode: l
292
- };
293
- }), this.state.tabbableGroups = this.state.containerGroups.filter((e) => e.tabbableNodes.length > 0), this.state.tabbableGroups.length <= 0 && !this.getNodeForOption("fallbackFocus"))
294
- throw new Error(
295
- "Your focus-trap must have at least one container with at least one tabbable node in it at all times"
296
- );
297
- if (this.state.containerGroups.find((e) => e.posTabIndexesFound) && this.state.containerGroups.length > 1)
298
- throw new Error(
299
- "At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps."
300
- );
301
- }
302
- addListeners() {
303
- if (this.state.active)
304
- return G.activateTrap(this.trapStack, this), this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? E(() => {
305
- this.tryFocus(this.getInitialFocusNode());
306
- }) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(
307
- g(this.doc, "focusin", this.handleFocus, !0),
308
- g(this.doc, "mousedown", this.handlePointerDown, { capture: !0, passive: !1 }),
309
- g(this.doc, "touchstart", this.handlePointerDown, { capture: !0, passive: !1 }),
310
- g(this.doc, "click", this.handleClick, { capture: !0, passive: !1 }),
311
- g(this.doc, "keydown", this.handleTabKey, { capture: !0, passive: !1 }),
312
- g(this.doc, "keydown", this.handleEscapeKey)
313
- ), this;
314
- }
315
- removeListeners() {
316
- if (this.state.active)
317
- return this.listenerCleanups.forEach((e) => e()), this.listenerCleanups = [], this;
318
- }
319
- activate(e) {
320
- if (this.state.active)
321
- return this;
322
- const i = this.getOption(e, "onActivate"), o = this.getOption(e, "onPostActivate"), t = this.getOption(e, "checkCanFocusTrap");
323
- t || this.updateTabbableNodes(), this.state.active = !0, this.state.paused = !1, this.state.nodeFocusedBeforeActivation = this.doc.activeElement || null, i?.();
324
- const s = () => {
325
- t && this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), o?.();
326
- };
327
- return t ? (t(this.state.containers.concat()).then(s, s), this) : (s(), this);
328
- }
329
- }, F = (e) => e.key === "Tab", y = (e, ...i) => typeof e == "function" ? e(...i) : e, Z = (e) => !e.isComposing && e.key === "Escape", E = (e) => setTimeout(e, 0), tt = (e) => e.localName === "input" && "select" in e && typeof e.select == "function";
330
- function at(e, i = {}) {
331
- let o;
332
- const t = K(() => {
333
- const s = typeof e == "function" ? e() : e;
334
- if (s) {
335
- o = new Q(s, {
336
- escapeDeactivates: !1,
337
- allowOutsideClick: !0,
338
- preventScroll: !0,
339
- returnFocusOnDeactivate: !0,
340
- delayInitialFocus: !1,
341
- fallbackFocus: s,
342
- ...i,
343
- document: R(s)
344
- });
345
- try {
346
- o.activate();
347
- } catch {
348
- }
349
- }
350
- });
351
- return function() {
352
- o?.deactivate(), t();
353
- };
354
- }
355
- var C = "data-scroll-lock";
356
- function et(e) {
357
- const i = e.getBoundingClientRect().left;
358
- return Math.round(i) + e.scrollLeft ? "paddingLeft" : "paddingRight";
359
- }
360
- function ot(e) {
361
- const i = e ?? document, o = i.defaultView ?? window, { documentElement: t, body: s } = i;
362
- if (s.hasAttribute(C)) return;
363
- s.setAttribute(C, "");
364
- const a = o.innerWidth - t.clientWidth, u = () => W(t, "--scrollbar-width", `${a}px`), l = et(t), r = () => P(s, {
365
- overflow: "hidden",
366
- [l]: `${a}px`
367
- }), d = () => {
368
- const { scrollX: c, scrollY: f, visualViewport: p } = o, w = p?.offsetLeft ?? 0, T = p?.offsetTop ?? 0, x = P(s, {
369
- position: "fixed",
370
- overflow: "hidden",
371
- top: `${-(f - Math.floor(T))}px`,
372
- left: `${-(c - Math.floor(w))}px`,
373
- right: "0",
374
- [l]: `${a}px`
375
- });
376
- return () => {
377
- x?.(), o.scrollTo({ left: c, top: f, behavior: "instant" });
378
- };
379
- }, b = [u(), $() ? d() : r()];
380
- return () => {
381
- b.forEach((c) => c?.()), s.removeAttribute(C);
382
- };
383
- }
384
- export {
385
- it as a,
386
- ot as p,
387
- at as t
388
- };
389
- //# sourceMappingURL=index-DUHFrLMI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DUHFrLMI.js","sources":["../../node_modules/@zag-js/aria-hidden/dist/index.mjs","../../node_modules/@zag-js/focus-trap/dist/index.mjs","../../node_modules/@zag-js/remove-scroll/dist/index.mjs"],"sourcesContent":["// src/walk-tree-outside.ts\nvar counterMap = /* @__PURE__ */ new WeakMap();\nvar uncontrolledNodes = /* @__PURE__ */ new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = (node) => node && (node.host || unwrapHost(node.parentNode));\nvar correctTargets = (parent, targets) => targets.map((target) => {\n if (parent.contains(target)) return target;\n const correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error(\"[zag-js > ariaHidden] target\", target, \"in not contained inside\", parent, \". Doing nothing\");\n return null;\n}).filter((x) => Boolean(x));\nvar isIgnoredNode = (node) => {\n if (node.localName === \"next-route-announcer\") return true;\n if (node.localName === \"script\") return true;\n if (node.hasAttribute(\"aria-live\")) return true;\n return node.matches(\"[data-live-announcer]\");\n};\nvar walkTreeOutside = (originalTarget, props) => {\n const { parentNode, markerName, controlAttribute} = props;\n const targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n markerMap[markerName] || (markerMap[markerName] = /* @__PURE__ */ new WeakMap());\n const markerCounter = markerMap[markerName];\n const hiddenNodes = [];\n const elementsToKeep = /* @__PURE__ */ new Set();\n const elementsToStop = new Set(targets);\n const keep = (el) => {\n if (!el || elementsToKeep.has(el)) return;\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n const deep = (parent) => {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, (node) => {\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n try {\n if (isIgnoredNode(node)) return;\n const attr = node.getAttribute(controlAttribute);\n const alreadyHidden = attr === \"true\" ;\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, \"\");\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, \"true\" );\n }\n } catch (e) {\n console.error(\"[zag-js > ariaHidden] cannot operate on \", node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return () => {\n hiddenNodes.forEach((node) => {\n const counterValue = counterMap.get(node) - 1;\n const markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n counterMap = /* @__PURE__ */ new WeakMap();\n counterMap = /* @__PURE__ */ new WeakMap();\n uncontrolledNodes = /* @__PURE__ */ new WeakMap();\n markerMap = {};\n }\n };\n};\n\n// src/aria-hidden.ts\nvar getParentNode = (originalTarget) => {\n const target = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return target.ownerDocument.body;\n};\nvar hideOthers = (originalTarget, parentNode = getParentNode(originalTarget), markerName = \"data-aria-hidden\") => {\n if (!parentNode) return;\n return walkTreeOutside(originalTarget, {\n parentNode,\n markerName,\n controlAttribute: \"aria-hidden\"});\n};\n\n// src/index.ts\nvar raf = (fn) => {\n const frameId = requestAnimationFrame(() => fn());\n return () => cancelAnimationFrame(frameId);\n};\nfunction ariaHidden(targetsOrFn, options = {}) {\n const { defer = true } = options;\n const func = defer ? raf : (v) => v();\n const cleanups = [];\n cleanups.push(\n func(() => {\n const targets = typeof targetsOrFn === \"function\" ? targetsOrFn() : targetsOrFn;\n const elements = targets.filter(Boolean);\n if (elements.length === 0) return;\n cleanups.push(hideOthers(elements));\n })\n );\n return () => {\n cleanups.forEach((fn) => fn?.());\n };\n}\n\nexport { ariaHidden };\n","import { getDocument, getTabbables, getFocusables, isTabbable, getTabIndex, addDomEvent, raf, getEventTarget, isDocument, isFocusable, getActiveElement } from '@zag-js/dom-query';\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar activeFocusTraps = {\n activateTrap(trapStack, trap) {\n if (trapStack.length > 0) {\n const activeTrap = trapStack[trapStack.length - 1];\n if (activeTrap !== trap) {\n activeTrap.pause();\n }\n }\n const trapIndex = trapStack.indexOf(trap);\n if (trapIndex === -1) {\n trapStack.push(trap);\n } else {\n trapStack.splice(trapIndex, 1);\n trapStack.push(trap);\n }\n },\n deactivateTrap(trapStack, trap) {\n const trapIndex = trapStack.indexOf(trap);\n if (trapIndex !== -1) {\n trapStack.splice(trapIndex, 1);\n }\n if (trapStack.length > 0) {\n trapStack[trapStack.length - 1].unpause();\n }\n }\n};\nvar sharedTrapStack = [];\nvar FocusTrap = class {\n constructor(elements, options) {\n __publicField(this, \"trapStack\");\n __publicField(this, \"config\");\n __publicField(this, \"doc\");\n __publicField(this, \"state\", {\n containers: [],\n containerGroups: [],\n tabbableGroups: [],\n nodeFocusedBeforeActivation: null,\n mostRecentlyFocusedNode: null,\n active: false,\n paused: false,\n delayInitialFocusTimer: void 0,\n recentNavEvent: void 0\n });\n __publicField(this, \"listenerCleanups\", []);\n __publicField(this, \"handleFocus\", (event) => {\n const target = getEventTarget(event);\n const targetContained = this.findContainerIndex(target, event) >= 0;\n if (targetContained || isDocument(target)) {\n if (targetContained) {\n this.state.mostRecentlyFocusedNode = target;\n }\n } else {\n event.stopImmediatePropagation();\n let nextNode;\n let navAcrossContainers = true;\n if (this.state.mostRecentlyFocusedNode) {\n if (getTabIndex(this.state.mostRecentlyFocusedNode) > 0) {\n const mruContainerIdx = this.findContainerIndex(this.state.mostRecentlyFocusedNode);\n const { tabbableNodes } = this.state.containerGroups[mruContainerIdx];\n if (tabbableNodes.length > 0) {\n const mruTabIdx = tabbableNodes.findIndex((node) => node === this.state.mostRecentlyFocusedNode);\n if (mruTabIdx >= 0) {\n if (this.config.isKeyForward(this.state.recentNavEvent)) {\n if (mruTabIdx + 1 < tabbableNodes.length) {\n nextNode = tabbableNodes[mruTabIdx + 1];\n navAcrossContainers = false;\n }\n } else {\n if (mruTabIdx - 1 >= 0) {\n nextNode = tabbableNodes[mruTabIdx - 1];\n navAcrossContainers = false;\n }\n }\n }\n }\n } else {\n if (!this.state.containerGroups.some((g) => g.tabbableNodes.some((n) => getTabIndex(n) > 0))) {\n navAcrossContainers = false;\n }\n }\n } else {\n navAcrossContainers = false;\n }\n if (navAcrossContainers) {\n nextNode = this.findNextNavNode({\n // move FROM the MRU node, not event-related node (which will be the node that is\n // outside the trap causing the focus escape we're trying to fix)\n target: this.state.mostRecentlyFocusedNode,\n isBackward: this.config.isKeyBackward(this.state.recentNavEvent)\n });\n }\n if (nextNode) {\n this.tryFocus(nextNode);\n } else {\n this.tryFocus(this.state.mostRecentlyFocusedNode || this.getInitialFocusNode());\n }\n }\n this.state.recentNavEvent = void 0;\n });\n __publicField(this, \"handlePointerDown\", (event) => {\n const target = getEventTarget(event);\n if (this.findContainerIndex(target, event) >= 0) {\n return;\n }\n if (valueOrHandler(this.config.clickOutsideDeactivates, event)) {\n this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });\n return;\n }\n if (valueOrHandler(this.config.allowOutsideClick, event)) {\n return;\n }\n event.preventDefault();\n });\n __publicField(this, \"handleClick\", (event) => {\n const target = getEventTarget(event);\n if (this.findContainerIndex(target, event) >= 0) {\n return;\n }\n if (valueOrHandler(this.config.clickOutsideDeactivates, event)) {\n return;\n }\n if (valueOrHandler(this.config.allowOutsideClick, event)) {\n return;\n }\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n __publicField(this, \"handleTabKey\", (event) => {\n if (this.config.isKeyForward(event) || this.config.isKeyBackward(event)) {\n this.state.recentNavEvent = event;\n const isBackward = this.config.isKeyBackward(event);\n const destinationNode = this.findNextNavNode({ event, isBackward });\n if (!destinationNode) return;\n if (isTabEvent(event)) {\n event.preventDefault();\n }\n this.tryFocus(destinationNode);\n }\n });\n __publicField(this, \"handleEscapeKey\", (event) => {\n if (isEscapeEvent(event) && valueOrHandler(this.config.escapeDeactivates, event) !== false) {\n event.preventDefault();\n this.deactivate();\n }\n });\n __publicField(this, \"_mutationObserver\");\n __publicField(this, \"setupMutationObserver\", () => {\n const win = this.doc.defaultView || window;\n this._mutationObserver = new win.MutationObserver((mutations) => {\n const isFocusedNodeRemoved = mutations.some((mutation) => {\n const removedNodes = Array.from(mutation.removedNodes);\n return removedNodes.some((node) => node === this.state.mostRecentlyFocusedNode);\n });\n if (isFocusedNodeRemoved) {\n this.tryFocus(this.getInitialFocusNode());\n }\n });\n });\n __publicField(this, \"updateObservedNodes\", () => {\n this._mutationObserver?.disconnect();\n if (this.state.active && !this.state.paused) {\n this.state.containers.map((container) => {\n this._mutationObserver?.observe(container, { subtree: true, childList: true });\n });\n }\n });\n __publicField(this, \"getInitialFocusNode\", () => {\n let node = this.getNodeForOption(\"initialFocus\", { hasFallback: true });\n if (node === false) {\n return false;\n }\n if (node === void 0 || node && !isFocusable(node)) {\n if (this.findContainerIndex(this.doc.activeElement) >= 0) {\n node = this.doc.activeElement;\n } else {\n const firstTabbableGroup = this.state.tabbableGroups[0];\n const firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n node = firstTabbableNode || this.getNodeForOption(\"fallbackFocus\");\n }\n } else if (node === null) {\n node = this.getNodeForOption(\"fallbackFocus\");\n }\n if (!node) {\n throw new Error(\"Your focus-trap needs to have at least one focusable element\");\n }\n if (!node.isConnected) {\n node = this.getNodeForOption(\"fallbackFocus\");\n }\n return node;\n });\n __publicField(this, \"tryFocus\", (node) => {\n if (node === false) return;\n if (node === getActiveElement(this.doc)) return;\n if (!node || !node.focus) {\n this.tryFocus(this.getInitialFocusNode());\n return;\n }\n node.focus({ preventScroll: !!this.config.preventScroll });\n this.state.mostRecentlyFocusedNode = node;\n if (isSelectableInput(node)) {\n node.select();\n }\n });\n __publicField(this, \"deactivate\", (deactivateOptions) => {\n if (!this.state.active) return this;\n const options = {\n onDeactivate: this.config.onDeactivate,\n onPostDeactivate: this.config.onPostDeactivate,\n checkCanReturnFocus: this.config.checkCanReturnFocus,\n ...deactivateOptions\n };\n clearTimeout(this.state.delayInitialFocusTimer);\n this.state.delayInitialFocusTimer = void 0;\n this.removeListeners();\n this.state.active = false;\n this.state.paused = false;\n this.updateObservedNodes();\n activeFocusTraps.deactivateTrap(this.trapStack, this);\n const onDeactivate = this.getOption(options, \"onDeactivate\");\n const onPostDeactivate = this.getOption(options, \"onPostDeactivate\");\n const checkCanReturnFocus = this.getOption(options, \"checkCanReturnFocus\");\n const returnFocus = this.getOption(options, \"returnFocus\", \"returnFocusOnDeactivate\");\n onDeactivate?.();\n const finishDeactivation = () => {\n delay(() => {\n if (returnFocus) {\n const returnFocusNode = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);\n this.tryFocus(returnFocusNode);\n }\n onPostDeactivate?.();\n });\n };\n if (returnFocus && checkCanReturnFocus) {\n const returnFocusNode = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);\n checkCanReturnFocus(returnFocusNode).then(finishDeactivation, finishDeactivation);\n return this;\n }\n finishDeactivation();\n return this;\n });\n __publicField(this, \"pause\", (pauseOptions) => {\n if (this.state.paused || !this.state.active) {\n return this;\n }\n const onPause = this.getOption(pauseOptions, \"onPause\");\n const onPostPause = this.getOption(pauseOptions, \"onPostPause\");\n this.state.paused = true;\n onPause?.();\n this.removeListeners();\n this.updateObservedNodes();\n onPostPause?.();\n return this;\n });\n __publicField(this, \"unpause\", (unpauseOptions) => {\n if (!this.state.paused || !this.state.active) {\n return this;\n }\n const onUnpause = this.getOption(unpauseOptions, \"onUnpause\");\n const onPostUnpause = this.getOption(unpauseOptions, \"onPostUnpause\");\n this.state.paused = false;\n onUnpause?.();\n this.updateTabbableNodes();\n this.addListeners();\n this.updateObservedNodes();\n onPostUnpause?.();\n return this;\n });\n __publicField(this, \"updateContainerElements\", (containerElements) => {\n this.state.containers = Array.isArray(containerElements) ? containerElements.filter(Boolean) : [containerElements].filter(Boolean);\n if (this.state.active) {\n this.updateTabbableNodes();\n }\n this.updateObservedNodes();\n return this;\n });\n __publicField(this, \"getReturnFocusNode\", (previousActiveElement) => {\n const node = this.getNodeForOption(\"setReturnFocus\", {\n params: [previousActiveElement]\n });\n return node ? node : node === false ? false : previousActiveElement;\n });\n __publicField(this, \"getOption\", (configOverrideOptions, optionName, configOptionName) => {\n return configOverrideOptions && configOverrideOptions[optionName] !== void 0 ? configOverrideOptions[optionName] : (\n // @ts-expect-error\n this.config[configOptionName || optionName]\n );\n });\n __publicField(this, \"getNodeForOption\", (optionName, { hasFallback = false, params = [] } = {}) => {\n let optionValue = this.config[optionName];\n if (typeof optionValue === \"function\") optionValue = optionValue(...params);\n if (optionValue === true) optionValue = void 0;\n if (!optionValue) {\n if (optionValue === void 0 || optionValue === false) {\n return optionValue;\n }\n throw new Error(`\\`${optionName}\\` was specified but was not a node, or did not return a node`);\n }\n let node = optionValue;\n if (typeof optionValue === \"string\") {\n try {\n node = this.doc.querySelector(optionValue);\n } catch (err) {\n throw new Error(`\\`${optionName}\\` appears to be an invalid selector; error=\"${err.message}\"`);\n }\n if (!node) {\n if (!hasFallback) {\n throw new Error(`\\`${optionName}\\` as selector refers to no known node`);\n }\n }\n }\n return node;\n });\n __publicField(this, \"findNextNavNode\", (opts) => {\n const { event, isBackward = false } = opts;\n const target = opts.target || getEventTarget(event);\n this.updateTabbableNodes();\n let destinationNode = null;\n if (this.state.tabbableGroups.length > 0) {\n const containerIndex = this.findContainerIndex(target, event);\n const containerGroup = containerIndex >= 0 ? this.state.containerGroups[containerIndex] : void 0;\n if (containerIndex < 0) {\n if (isBackward) {\n destinationNode = this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode;\n } else {\n destinationNode = this.state.tabbableGroups[0].firstTabbableNode;\n }\n } else if (isBackward) {\n let startOfGroupIndex = this.state.tabbableGroups.findIndex(\n ({ firstTabbableNode }) => target === firstTabbableNode\n );\n if (startOfGroupIndex < 0 && (containerGroup?.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup?.nextTabbableNode(target, false))) {\n startOfGroupIndex = containerIndex;\n }\n if (startOfGroupIndex >= 0) {\n const destinationGroupIndex = startOfGroupIndex === 0 ? this.state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n const destinationGroup = this.state.tabbableGroups[destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;\n } else if (!isTabEvent(event)) {\n destinationNode = containerGroup?.nextTabbableNode(target, false);\n }\n } else {\n let lastOfGroupIndex = this.state.tabbableGroups.findIndex(\n ({ lastTabbableNode }) => target === lastTabbableNode\n );\n if (lastOfGroupIndex < 0 && (containerGroup?.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup?.nextTabbableNode(target))) {\n lastOfGroupIndex = containerIndex;\n }\n if (lastOfGroupIndex >= 0) {\n const destinationGroupIndex = lastOfGroupIndex === this.state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n const destinationGroup = this.state.tabbableGroups[destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? destinationGroup.firstTabbableNode : destinationGroup.firstDomTabbableNode;\n } else if (!isTabEvent(event)) {\n destinationNode = containerGroup?.nextTabbableNode(target);\n }\n }\n } else {\n destinationNode = this.getNodeForOption(\"fallbackFocus\");\n }\n return destinationNode;\n });\n this.trapStack = options.trapStack || sharedTrapStack;\n const config = {\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true,\n isKeyForward(e) {\n return isTabEvent(e) && !e.shiftKey;\n },\n isKeyBackward(e) {\n return isTabEvent(e) && e.shiftKey;\n },\n ...options\n };\n this.doc = config.document || getDocument(Array.isArray(elements) ? elements[0] : elements);\n this.config = config;\n this.updateContainerElements(elements);\n this.setupMutationObserver();\n }\n get active() {\n return this.state.active;\n }\n get paused() {\n return this.state.paused;\n }\n findContainerIndex(element, event) {\n const composedPath = typeof event?.composedPath === \"function\" ? event.composedPath() : void 0;\n return this.state.containerGroups.findIndex(\n ({ container, tabbableNodes }) => container.contains(element) || composedPath?.includes(container) || tabbableNodes.find((node) => node === element)\n );\n }\n updateTabbableNodes() {\n this.state.containerGroups = this.state.containers.map((container) => {\n const tabbableNodes = getTabbables(container);\n const focusableNodes = getFocusables(container);\n const firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : void 0;\n const lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : void 0;\n const firstDomTabbableNode = focusableNodes.find((node) => isTabbable(node));\n const lastDomTabbableNode = focusableNodes.slice().reverse().find((node) => isTabbable(node));\n const posTabIndexesFound = !!tabbableNodes.find((node) => getTabIndex(node) > 0);\n function nextTabbableNode(node, forward = true) {\n const nodeIdx = tabbableNodes.indexOf(node);\n if (nodeIdx < 0) {\n if (forward) {\n return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find((el) => isTabbable(el));\n }\n return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find((el) => isTabbable(el));\n }\n return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\n }\n return {\n container,\n tabbableNodes,\n focusableNodes,\n posTabIndexesFound,\n firstTabbableNode,\n lastTabbableNode,\n firstDomTabbableNode,\n lastDomTabbableNode,\n nextTabbableNode\n };\n });\n this.state.tabbableGroups = this.state.containerGroups.filter((group) => group.tabbableNodes.length > 0);\n if (this.state.tabbableGroups.length <= 0 && !this.getNodeForOption(\"fallbackFocus\")) {\n throw new Error(\n \"Your focus-trap must have at least one container with at least one tabbable node in it at all times\"\n );\n }\n if (this.state.containerGroups.find((g) => g.posTabIndexesFound) && this.state.containerGroups.length > 1) {\n throw new Error(\n \"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\"\n );\n }\n }\n addListeners() {\n if (!this.state.active) return;\n activeFocusTraps.activateTrap(this.trapStack, this);\n this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? delay(() => {\n this.tryFocus(this.getInitialFocusNode());\n }) : this.tryFocus(this.getInitialFocusNode());\n this.listenerCleanups.push(\n addDomEvent(this.doc, \"focusin\", this.handleFocus, true),\n addDomEvent(this.doc, \"mousedown\", this.handlePointerDown, { capture: true, passive: false }),\n addDomEvent(this.doc, \"touchstart\", this.handlePointerDown, { capture: true, passive: false }),\n addDomEvent(this.doc, \"click\", this.handleClick, { capture: true, passive: false }),\n addDomEvent(this.doc, \"keydown\", this.handleTabKey, { capture: true, passive: false }),\n addDomEvent(this.doc, \"keydown\", this.handleEscapeKey)\n );\n return this;\n }\n removeListeners() {\n if (!this.state.active) return;\n this.listenerCleanups.forEach((cleanup) => cleanup());\n this.listenerCleanups = [];\n return this;\n }\n activate(activateOptions) {\n if (this.state.active) {\n return this;\n }\n const onActivate = this.getOption(activateOptions, \"onActivate\");\n const onPostActivate = this.getOption(activateOptions, \"onPostActivate\");\n const checkCanFocusTrap = this.getOption(activateOptions, \"checkCanFocusTrap\");\n if (!checkCanFocusTrap) {\n this.updateTabbableNodes();\n }\n this.state.active = true;\n this.state.paused = false;\n this.state.nodeFocusedBeforeActivation = this.doc.activeElement || null;\n onActivate?.();\n const finishActivation = () => {\n if (checkCanFocusTrap) {\n this.updateTabbableNodes();\n }\n this.addListeners();\n this.updateObservedNodes();\n onPostActivate?.();\n };\n if (checkCanFocusTrap) {\n checkCanFocusTrap(this.state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n finishActivation();\n return this;\n }\n};\nvar isTabEvent = (event) => event.key === \"Tab\";\nvar valueOrHandler = (value, ...params) => typeof value === \"function\" ? value(...params) : value;\nvar isEscapeEvent = (event) => !event.isComposing && event.key === \"Escape\";\nvar delay = (fn) => setTimeout(fn, 0);\nvar isSelectableInput = (node) => node.localName === \"input\" && \"select\" in node && typeof node.select === \"function\";\n\n// src/index.ts\nfunction trapFocus(el, options = {}) {\n let trap;\n const cleanup = raf(() => {\n const contentEl = typeof el === \"function\" ? el() : el;\n if (!contentEl) return;\n trap = new FocusTrap(contentEl, {\n escapeDeactivates: false,\n allowOutsideClick: true,\n preventScroll: true,\n returnFocusOnDeactivate: true,\n delayInitialFocus: false,\n fallbackFocus: contentEl,\n ...options,\n document: getDocument(contentEl)\n });\n try {\n trap.activate();\n } catch {\n }\n });\n return function destroy() {\n trap?.deactivate();\n cleanup();\n };\n}\n\nexport { FocusTrap, trapFocus };\n","import { setStyleProperty, setStyle, isIos } from '@zag-js/dom-query';\n\n// src/index.ts\nvar LOCK_CLASSNAME = \"data-scroll-lock\";\nfunction getPaddingProperty(documentElement) {\n const documentLeft = documentElement.getBoundingClientRect().left;\n const scrollbarX = Math.round(documentLeft) + documentElement.scrollLeft;\n return scrollbarX ? \"paddingLeft\" : \"paddingRight\";\n}\nfunction preventBodyScroll(_document) {\n const doc = _document ?? document;\n const win = doc.defaultView ?? window;\n const { documentElement, body } = doc;\n const locked = body.hasAttribute(LOCK_CLASSNAME);\n if (locked) return;\n body.setAttribute(LOCK_CLASSNAME, \"\");\n const scrollbarWidth = win.innerWidth - documentElement.clientWidth;\n const setScrollbarWidthProperty = () => setStyleProperty(documentElement, \"--scrollbar-width\", `${scrollbarWidth}px`);\n const paddingProperty = getPaddingProperty(documentElement);\n const setBodyStyle = () => setStyle(body, {\n overflow: \"hidden\",\n [paddingProperty]: `${scrollbarWidth}px`\n });\n const setBodyStyleIOS = () => {\n const { scrollX, scrollY, visualViewport } = win;\n const offsetLeft = visualViewport?.offsetLeft ?? 0;\n const offsetTop = visualViewport?.offsetTop ?? 0;\n const restoreStyle = setStyle(body, {\n position: \"fixed\",\n overflow: \"hidden\",\n top: `${-(scrollY - Math.floor(offsetTop))}px`,\n left: `${-(scrollX - Math.floor(offsetLeft))}px`,\n right: \"0\",\n [paddingProperty]: `${scrollbarWidth}px`\n });\n return () => {\n restoreStyle?.();\n win.scrollTo({ left: scrollX, top: scrollY, behavior: \"instant\" });\n };\n };\n const cleanups = [setScrollbarWidthProperty(), isIos() ? setBodyStyleIOS() : setBodyStyle()];\n return () => {\n cleanups.forEach((fn) => fn?.());\n body.removeAttribute(LOCK_CLASSNAME);\n };\n}\n\nexport { preventBodyScroll };\n"],"names":["counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","isIgnoredNode","walkTreeOutside","originalTarget","props","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","alreadyHidden","counterValue","markerValue","e","getParentNode","hideOthers","raf","fn","frameId","ariaHidden","targetsOrFn","options","defer","func","v","cleanups","elements","__defProp","__defNormalProp","obj","key","value","__publicField","activeFocusTraps","trapStack","trap","activeTrap","trapIndex","sharedTrapStack","FocusTrap","event","getEventTarget","targetContained","isDocument","nextNode","navAcrossContainers","getTabIndex","mruContainerIdx","tabbableNodes","mruTabIdx","g","n","valueOrHandler","isBackward","destinationNode","isTabEvent","isEscapeEvent","win","mutations","mutation","container","isFocusable","firstTabbableGroup","getActiveElement","isSelectableInput","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","returnFocus","finishDeactivation","delay","returnFocusNode","pauseOptions","onPause","onPostPause","unpauseOptions","onUnpause","onPostUnpause","containerElements","previousActiveElement","configOverrideOptions","optionName","configOptionName","hasFallback","params","optionValue","err","opts","containerIndex","containerGroup","startOfGroupIndex","firstTabbableNode","isTabbable","destinationGroupIndex","destinationGroup","lastOfGroupIndex","lastTabbableNode","config","getDocument","element","composedPath","getTabbables","focusableNodes","getFocusables","firstDomTabbableNode","lastDomTabbableNode","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","group","addDomEvent","cleanup","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","trapFocus","contentEl","LOCK_CLASSNAME","getPaddingProperty","documentElement","documentLeft","preventBodyScroll","_document","doc","body","scrollbarWidth","setScrollbarWidthProperty","setStyleProperty","paddingProperty","setBodyStyle","setStyle","setBodyStyleIOS","scrollX","scrollY","visualViewport","offsetLeft","offsetTop","restoreStyle","isIos"],"mappings":";AACA,IAAIA,IAA6B,oBAAI,QAAS,GAC1CC,IAAoC,oBAAI,QAAS,GACjDC,IAAY,CAAE,GACdC,IAAY,GACZC,IAAa,CAACC,MAASA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU,IACvEC,IAAiB,CAACC,GAAQC,MAAYA,EAAQ,IAAI,CAACC,MAAW;AAChE,MAAI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;AAAA,MACV,KAAK,GAAG,EAAES,IAAU,KAAK,MAAMG,CAAS,EAAE;AAAA,MAC1C,MAAM,GAAG,EAAEJ,IAAU,KAAK,MAAMG,CAAU,EAAE;AAAA,MAC5C,OAAO;AAAA,MACP,CAACP,CAAe,GAAG,GAAGH,CAAc;AAAA,IAC1C,CAAK;AACD,WAAO,MAAM;AACX,MAAAY,IAAgB,GAChBpF,EAAI,SAAS,EAAE,MAAM+E,GAAS,KAAKC,GAAS,UAAU,WAAW;AAAA,IAClE;AAAA,EACF,GACKhH,IAAW,CAACyG,EAA2B,GAAEY,EAAK,IAAKP,EAAe,IAAKF,GAAc;AAC3F,SAAO,MAAM;AACX,IAAA5G,EAAS,QAAQ,CAACR,MAAOA,IAAE,CAAI,GAC/B+G,EAAK,gBAAgBP,CAAc;AAAA,EACpC;AACH;","x_google_ignoreList":[0,1,2]}
@@ -1,2 +0,0 @@
1
- "use strict";const d=require("./index-CZ42b9rT.js"),p=require("./tooltip.component-CwrXAVEq.js"),y=require("./use-locale-context-BdqHZ8L8.js");var b=d.createAnatomy("switch").parts("root","label","control","thumb"),h=b.build(),T=e=>e.ids?.root??`switch:${e.id}`,v=e=>e.ids?.label??`switch:${e.id}:label`,V=e=>e.ids?.thumb??`switch:${e.id}:thumb`,I=e=>e.ids?.control??`switch:${e.id}:control`,f=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,P=e=>e.getById(T(e)),n=e=>e.getById(f(e));function S(e,t){const{context:a,send:s,prop:r,scope:c}=e,o=r("disabled"),k=r("readOnly"),l=!!a.get("checked"),g=!o&&a.get("focused"),m=!o&&a.get("focusVisible"),u={"data-active":d.dataAttr(a.get("active")),"data-focus":d.dataAttr(g),"data-focus-visible":d.dataAttr(m),"data-readonly":d.dataAttr(k),"data-hover":d.dataAttr(a.get("hovered")),"data-disabled":d.dataAttr(o),"data-state":l?"checked":"unchecked","data-invalid":d.dataAttr(r("invalid"))};return{checked:l,disabled:o,focused:g,setChecked(i){s({type:"CHECKED.SET",checked:i,isTrusted:!1})},toggleChecked(){s({type:"CHECKED.TOGGLE",checked:l,isTrusted:!1})},getRootProps(){return t.label({...h.root.attrs,...u,dir:r("dir"),id:T(c),htmlFor:f(c),onPointerMove(){o||s({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){o||s({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(i){if(o)return;d.getEventTarget(i)===n(c)&&i.stopPropagation(),d.isSafari()&&n(c)?.focus()}})},getLabelProps(){return t.element({...h.label.attrs,...u,dir:r("dir"),id:v(c)})},getThumbProps(){return t.element({...h.thumb.attrs,...u,dir:r("dir"),id:V(c),"aria-hidden":!0})},getControlProps(){return t.element({...h.control.attrs,...u,dir:r("dir"),id:I(c),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:f(c),type:"checkbox",required:r("required"),defaultChecked:l,disabled:o,"aria-labelledby":v(c),"aria-invalid":r("invalid"),name:r("name"),form:r("form"),value:r("value"),style:d.visuallyHiddenStyle,onFocus(){const i=p.isFocusVisible();s({type:"CONTEXT.SET",context:{focused:!0,focusVisible:i}})},onBlur(){s({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(i){if(k){i.preventDefault();return}const C=i.currentTarget.checked;s({type:"CHECKED.SET",checked:C,isTrusted:!0})}})}}}var{not:E}=d.createGuards(),D=d.createMachine({props({props:e}){return{defaultChecked:!1,label:"switch",value:"on",...e}},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(a){e("onCheckedChange")?.({checked:a})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:a,action:s}){e([()=>t("disabled")],()=>{s(["removeFocusIfNeeded"])}),e([()=>a.get("checked")],()=>{s(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:E("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:E("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:a}){if(!e("isDisabled"))return d.trackPress({pointerNode:P(t),keyboardNode:n(t),isValidKey:s=>s.key===" ",onPress:()=>a.set("active",!1),onPressStart:()=>a.set("active",!0),onPressEnd:()=>a.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return p.trackFocusVisible({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:a}){return d.trackFormControl(n(a),{onFieldsetDisabledChange(s){e.set("fieldsetDisabled",s)},onFormReset(){const s=e.initial("checked");t({type:"CHECKED.SET",checked:!!s,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(const a in t.context)e.set(a,t.context[a])},syncInputElement({context:e,scope:t}){const a=n(t);a&&d.setElementChecked(a,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){const a=n(t);d.dispatchInputCheckedEvent(a,{checked:e.get("checked")})}}}});y.createProps()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);exports.anatomy=b;exports.connect=S;exports.machine=D;
2
- //# sourceMappingURL=index-Dyxhds_1.js.map
@@ -1,2 +0,0 @@
1
- "use strict";const c=require("./index-CZ42b9rT.js"),g=require("./index-BBZxmcrY.js"),I=require("./index-BGwwyukg.js"),b=require("./use-locale-context-BdqHZ8L8.js");var C=c.createAnatomy("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),l=C.build(),y=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,m=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,p=e=>e.ids?.content??`dialog:${e.id}:content`,f=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,O=e=>e.ids?.title??`dialog:${e.id}:title`,E=e=>e.ids?.description??`dialog:${e.id}:description`,k=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,u=e=>e.getById(p(e)),D=e=>e.getById(y(e)),P=e=>e.getById(m(e)),F=e=>e.getById(f(e)),L=e=>e.getById(O(e)),T=e=>e.getById(E(e)),h=e=>e.getById(k(e));function S(e,t){const{state:n,send:i,context:s,prop:a,scope:r}=e,v=a("aria-label"),d=n.matches("open");return{open:d,setOpen(o){n.matches("open")!==o&&i({type:o?"OPEN":"CLOSE"})},getTriggerProps(){return t.button({...l.trigger.attrs,dir:a("dir"),id:f(r),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":p(r),onClick(o){o.defaultPrevented||i({type:"TOGGLE"})}})},getBackdropProps(){return t.element({...l.backdrop.attrs,dir:a("dir"),hidden:!d,id:m(r),"data-state":d?"open":"closed"})},getPositionerProps(){return t.element({...l.positioner.attrs,dir:a("dir"),id:y(r),style:{pointerEvents:d?void 0:"none"}})},getContentProps(){const o=s.get("rendered");return t.element({...l.content.attrs,dir:a("dir"),role:a("role"),hidden:!d,id:p(r),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":v||void 0,"aria-labelledby":v||!o.title?void 0:O(r),"aria-describedby":o.description?E(r):void 0})},getTitleProps(){return t.element({...l.title.attrs,dir:a("dir"),id:O(r)})},getDescriptionProps(){return t.element({...l.description.attrs,dir:a("dir"),id:E(r)})},getCloseTriggerProps(){return t.button({...l.closeTrigger.attrs,dir:a("dir"),id:k(r),type:"button",onClick(o){o.defaultPrevented||(o.stopPropagation(),i({type:"CLOSE"}))}})}}}var B=c.createMachine({props({props:e,scope:t}){const n=e.role==="alertdialog";return{role:"dialog",modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:n?()=>h(t):void 0,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){const i=()=>u(e);return I.trackDismissableElement(i,{defer:!0,pointerBlocking:n("modal"),exclude:[F(e)],onInteractOutside(s){n("onInteractOutside")?.(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onEscapeKeyDown(s){n("onEscapeKeyDown")?.(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return g.preventBodyScroll(e.getDoc())},trapFocus({scope:e,prop:t}){if(!t("trapFocus")||!t("modal"))return;const n=()=>u(e);return g.trapFocus(n,{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:i=>t("finalFocusEl")?.()??i})},hideContentBelow({scope:e,prop:t}){if(!t("modal"))return;const n=()=>[u(e)];return g.ariaHidden(n,{defer:!0})}},actions:{checkRenderedElements({context:e,scope:t}){c.raf(()=>{e.set("rendered",{title:!!L(t),description:!!T(t)})})},syncZIndex({scope:e}){c.raf(()=>{const t=u(e);if(!t)return;const n=c.getComputedStyle(t);[D(e),P(e)].forEach(s=>{s?.style.setProperty("--z-index",n.zIndex)})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}});b.createProps()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);exports.anatomy=C;exports.connect=S;exports.machine=B;
2
- //# sourceMappingURL=index-MlhL0PDC.js.map