@spark-ui/components 14.0.0-beta.1 → 14.0.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 (382) hide show
  1. package/dist/Button-B6rA3-e5.js +2 -0
  2. package/dist/{Button-C3xHNaGl.js.map → Button-B6rA3-e5.js.map} +1 -1
  3. package/dist/{Button-D32Avk2j.mjs → Button-C3C0aixy.mjs} +4 -4
  4. package/dist/{Button-D32Avk2j.mjs.map → Button-C3C0aixy.mjs.map} +1 -1
  5. package/dist/DialogContent.styles-BSfXHt21.mjs +61 -0
  6. package/dist/DialogContent.styles-BSfXHt21.mjs.map +1 -0
  7. package/dist/DialogContent.styles-bBs6l8Cy.js +2 -0
  8. package/dist/DialogContent.styles-bBs6l8Cy.js.map +1 -0
  9. package/dist/Icon-CF0W0LKr.js +2 -0
  10. package/dist/{Icon-Bf0XrmiR.js.map → Icon-CF0W0LKr.js.map} +1 -1
  11. package/dist/{Icon-D1RueiPY.mjs → Icon-Ck-dhfLd.mjs} +6 -6
  12. package/dist/{Icon-D1RueiPY.mjs.map → Icon-Ck-dhfLd.mjs.map} +1 -1
  13. package/dist/{IconButton-BY3gYXtU.mjs → IconButton-C62-axzv.mjs} +6 -6
  14. package/dist/{IconButton-BY3gYXtU.mjs.map → IconButton-C62-axzv.mjs.map} +1 -1
  15. package/dist/IconButton-D3g86WpZ.js +2 -0
  16. package/dist/{IconButton-Bf-EDzpI.js.map → IconButton-D3g86WpZ.js.map} +1 -1
  17. package/dist/Slot-D2Bbf8Gw.mjs +14 -0
  18. package/dist/{Slot-C98rL4yy.mjs.map → Slot-D2Bbf8Gw.mjs.map} +1 -1
  19. package/dist/Slot-DQ8z2zsy.js +2 -0
  20. package/dist/{Slot-ghrohQLA.js.map → Slot-DQ8z2zsy.js.map} +1 -1
  21. package/dist/Spinner-_Kffli3B.js +2 -0
  22. package/dist/{Spinner-DK8VEsaR.js.map → Spinner-_Kffli3B.js.map} +1 -1
  23. package/dist/{Spinner-CYL5kyzM.mjs → Spinner-jF3-zoh_.mjs} +3 -3
  24. package/dist/{Spinner-CYL5kyzM.mjs.map → Spinner-jF3-zoh_.mjs.map} +1 -1
  25. package/dist/{TextLink-3MEVs3No.mjs → TextLink-BuzFRWO6.mjs} +3 -3
  26. package/dist/{TextLink-3MEVs3No.mjs.map → TextLink-BuzFRWO6.mjs.map} +1 -1
  27. package/dist/TextLink-C3xDLsbC.js +2 -0
  28. package/dist/{TextLink-DD0VO37q.js.map → TextLink-C3xDLsbC.js.map} +1 -1
  29. package/dist/{VisuallyHidden-AoRh4WRK.js → VisuallyHidden-CB6Nx76j.js} +2 -2
  30. package/dist/{VisuallyHidden-AoRh4WRK.js.map → VisuallyHidden-CB6Nx76j.js.map} +1 -1
  31. package/dist/{VisuallyHidden-ByNP7ZUI.mjs → VisuallyHidden-KH1biLx-.mjs} +2 -2
  32. package/dist/{VisuallyHidden-ByNP7ZUI.mjs.map → VisuallyHidden-KH1biLx-.mjs.map} +1 -1
  33. package/dist/accordion/index.d.mts +15 -0
  34. package/dist/accordion/index.js +1 -1
  35. package/dist/accordion/index.js.map +1 -1
  36. package/dist/accordion/index.mjs +90 -608
  37. package/dist/accordion/index.mjs.map +1 -1
  38. package/dist/alert-dialog/AlertDialogPortal.d.ts +1 -1
  39. package/dist/alert-dialog/index.d.mts +38 -0
  40. package/dist/alert-dialog/index.js +1 -34
  41. package/dist/alert-dialog/index.js.map +1 -1
  42. package/dist/alert-dialog/index.mjs +139 -2475
  43. package/dist/alert-dialog/index.mjs.map +1 -1
  44. package/dist/avatar/index.d.mts +15 -0
  45. package/dist/avatar/index.js +1 -1
  46. package/dist/avatar/index.js.map +1 -1
  47. package/dist/avatar/index.mjs +4 -4
  48. package/dist/badge/index.d.mts +1 -0
  49. package/dist/badge/index.js +1 -1
  50. package/dist/badge/index.js.map +1 -1
  51. package/dist/badge/index.mjs +6 -6
  52. package/dist/breadcrumb/index.d.mts +12 -0
  53. package/dist/breadcrumb/index.js +1 -1
  54. package/dist/breadcrumb/index.js.map +1 -1
  55. package/dist/breadcrumb/index.mjs +21 -21
  56. package/dist/button/Button.d.ts +1 -1
  57. package/dist/button/index.d.mts +1 -0
  58. package/dist/button/index.js +1 -1
  59. package/dist/button/index.mjs +1 -1
  60. package/dist/button/variants/index.d.mts +5 -0
  61. package/dist/card/index.d.mts +8 -0
  62. package/dist/card/index.js +1 -1
  63. package/dist/card/index.js.map +1 -1
  64. package/dist/card/index.mjs +2 -2
  65. package/dist/carousel/index.d.mts +19 -0
  66. package/dist/carousel/index.js +1 -1
  67. package/dist/carousel/index.js.map +1 -1
  68. package/dist/carousel/index.mjs +3 -3
  69. package/dist/checkbox/index.d.mts +2 -0
  70. package/dist/checkbox/index.js +1 -1
  71. package/dist/checkbox/index.js.map +1 -1
  72. package/dist/checkbox/index.mjs +128 -364
  73. package/dist/checkbox/index.mjs.map +1 -1
  74. package/dist/chip/index.d.mts +15 -0
  75. package/dist/chip/index.js +1 -1
  76. package/dist/chip/index.js.map +1 -1
  77. package/dist/chip/index.mjs +196 -370
  78. package/dist/chip/index.mjs.map +1 -1
  79. package/dist/chip/variants/index.d.mts +3 -0
  80. package/dist/collapsible/index.d.mts +7 -0
  81. package/dist/collapsible/index.js +1 -1
  82. package/dist/collapsible/index.js.map +1 -1
  83. package/dist/collapsible/index.mjs +38 -213
  84. package/dist/collapsible/index.mjs.map +1 -1
  85. package/dist/combobox/index.d.mts +35 -0
  86. package/dist/combobox/index.js +1 -1
  87. package/dist/combobox/index.js.map +1 -1
  88. package/dist/combobox/index.mjs +7 -7
  89. package/dist/combobox/utils/index.d.mts +14 -0
  90. package/dist/dialog/Dialog.d.ts +13 -13
  91. package/dist/dialog/DialogClose.d.ts +9 -8
  92. package/dist/dialog/DialogContent.d.ts +4 -4
  93. package/dist/dialog/DialogDescription.d.ts +3 -3
  94. package/dist/dialog/DialogOverlay.d.ts +5 -5
  95. package/dist/dialog/DialogPortal.d.ts +4 -4
  96. package/dist/dialog/DialogTitle.d.ts +3 -3
  97. package/dist/dialog/DialogTrigger.d.ts +5 -9
  98. package/dist/dialog/index.d.mts +37 -0
  99. package/dist/dialog/index.js +1 -1
  100. package/dist/dialog/index.js.map +1 -1
  101. package/dist/dialog/index.mjs +149 -159
  102. package/dist/dialog/index.mjs.map +1 -1
  103. package/dist/divider/index.d.mts +6 -0
  104. package/dist/divider/index.js +1 -1
  105. package/dist/divider/index.js.map +1 -1
  106. package/dist/divider/index.mjs +58 -76
  107. package/dist/divider/index.mjs.map +1 -1
  108. package/dist/drawer/Drawer.d.ts +12 -19
  109. package/dist/drawer/DrawerClose.d.ts +9 -5
  110. package/dist/drawer/DrawerContent.d.ts +5 -5
  111. package/dist/drawer/DrawerDescription.d.ts +4 -4
  112. package/dist/drawer/DrawerOverlay.d.ts +5 -5
  113. package/dist/drawer/DrawerPortal.d.ts +4 -4
  114. package/dist/drawer/DrawerTitle.d.ts +5 -5
  115. package/dist/drawer/DrawerTrigger.d.ts +5 -5
  116. package/dist/drawer/index.d.mts +37 -0
  117. package/dist/drawer/index.d.ts +2 -0
  118. package/dist/drawer/index.js +1 -1
  119. package/dist/drawer/index.js.map +1 -1
  120. package/dist/drawer/index.mjs +143 -114
  121. package/dist/drawer/index.mjs.map +1 -1
  122. package/dist/drawer/useRenderSlot.d.ts +3 -0
  123. package/dist/dropdown/index.d.mts +29 -0
  124. package/dist/dropdown/index.js +1 -1
  125. package/dist/dropdown/index.js.map +1 -1
  126. package/dist/dropdown/index.mjs +5 -5
  127. package/dist/file-upload/index.d.mts +22 -0
  128. package/dist/file-upload/index.js +1 -1
  129. package/dist/file-upload/index.js.map +1 -1
  130. package/dist/file-upload/index.mjs +6 -6
  131. package/dist/form-field/index.d.mts +31 -0
  132. package/dist/form-field/index.js +1 -1
  133. package/dist/form-field/index.js.map +1 -1
  134. package/dist/form-field/index.mjs +47 -47
  135. package/dist/icon/index.d.mts +1 -0
  136. package/dist/icon/index.js +1 -1
  137. package/dist/icon/index.mjs +1 -1
  138. package/dist/icon-button/index.d.mts +1 -0
  139. package/dist/icon-button/index.js +1 -1
  140. package/dist/icon-button/index.mjs +1 -1
  141. package/dist/input/index.d.mts +21 -0
  142. package/dist/input/index.js +1 -1
  143. package/dist/input/index.js.map +1 -1
  144. package/dist/input/index.mjs +4 -4
  145. package/dist/input-otp/index.d.mts +14 -0
  146. package/dist/input-otp/index.js +1 -1
  147. package/dist/input-otp/index.js.map +1 -1
  148. package/dist/input-otp/index.mjs +139 -137
  149. package/dist/input-otp/index.mjs.map +1 -1
  150. package/dist/kbd/index.d.mts +1 -0
  151. package/dist/label/index.d.mts +7 -0
  152. package/dist/label/index.js +1 -1
  153. package/dist/label/index.js.map +1 -1
  154. package/dist/label/index.mjs +37 -2
  155. package/dist/label/index.mjs.map +1 -1
  156. package/dist/link-box/index.d.mts +9 -0
  157. package/dist/link-box/index.js +1 -1
  158. package/dist/link-box/index.js.map +1 -1
  159. package/dist/link-box/index.mjs +7 -7
  160. package/dist/pagination/index.d.mts +18 -0
  161. package/dist/pagination/index.js +1 -1
  162. package/dist/pagination/index.js.map +1 -1
  163. package/dist/pagination/index.mjs +126 -844
  164. package/dist/pagination/index.mjs.map +1 -1
  165. package/dist/popover/index.d.mts +17 -0
  166. package/dist/popover/index.js +1 -1
  167. package/dist/popover/index.js.map +1 -1
  168. package/dist/popover/index.mjs +119 -1748
  169. package/dist/popover/index.mjs.map +1 -1
  170. package/dist/portal/index.d.mts +1 -0
  171. package/dist/portal/index.js +1 -1
  172. package/dist/portal/index.js.map +1 -1
  173. package/dist/portal/index.mjs +3 -3
  174. package/dist/portal/index.mjs.map +1 -1
  175. package/dist/progress/index.d.mts +13 -0
  176. package/dist/progress/index.js +1 -6
  177. package/dist/progress/index.js.map +1 -1
  178. package/dist/progress/index.mjs +87 -162
  179. package/dist/progress/index.mjs.map +1 -1
  180. package/dist/progress-tracker/index.d.mts +10 -0
  181. package/dist/progress-tracker/index.js +1 -1
  182. package/dist/progress-tracker/index.js.map +1 -1
  183. package/dist/progress-tracker/index.mjs +14 -14
  184. package/dist/radio-group/index.d.mts +7 -0
  185. package/dist/radio-group/index.js +1 -1
  186. package/dist/radio-group/index.js.map +1 -1
  187. package/dist/radio-group/index.mjs +85 -312
  188. package/dist/radio-group/index.mjs.map +1 -1
  189. package/dist/rating/index.d.mts +1 -0
  190. package/dist/rating/index.js +1 -1
  191. package/dist/rating/index.js.map +1 -1
  192. package/dist/rating/index.mjs +11 -11
  193. package/dist/scrolling-list/index.d.mts +15 -0
  194. package/dist/scrolling-list/index.js +1 -1
  195. package/dist/scrolling-list/index.js.map +1 -1
  196. package/dist/scrolling-list/index.mjs +168 -333
  197. package/dist/scrolling-list/index.mjs.map +1 -1
  198. package/dist/segmented-gauge/index.d.mts +13 -0
  199. package/dist/segmented-gauge/index.js +1 -1
  200. package/dist/segmented-gauge/index.js.map +1 -1
  201. package/dist/segmented-gauge/index.mjs +1 -1
  202. package/dist/select/index.d.mts +21 -0
  203. package/dist/select/index.js +1 -1
  204. package/dist/select/index.js.map +1 -1
  205. package/dist/select/index.mjs +21 -21
  206. package/dist/skeleton/index.d.mts +8 -0
  207. package/dist/skeleton/index.js +1 -1
  208. package/dist/skeleton/index.js.map +1 -1
  209. package/dist/skeleton/index.mjs +2 -2
  210. package/dist/slider/Slider.d.ts +6 -1
  211. package/dist/slider/SliderContext.d.ts +4 -1
  212. package/dist/slider/index.d.mts +8 -0
  213. package/dist/slider/index.js +1 -1
  214. package/dist/slider/index.js.map +1 -1
  215. package/dist/slider/index.mjs +96 -496
  216. package/dist/slider/index.mjs.map +1 -1
  217. package/dist/slot/index.d.mts +1 -0
  218. package/dist/slot/index.js +1 -1
  219. package/dist/slot/index.mjs +1 -1
  220. package/dist/snackbar/index.d.mts +13 -0
  221. package/dist/snackbar/index.js +1 -1
  222. package/dist/snackbar/index.js.map +1 -1
  223. package/dist/snackbar/index.mjs +189 -1105
  224. package/dist/snackbar/index.mjs.map +1 -1
  225. package/dist/spinner/index.d.mts +1 -0
  226. package/dist/spinner/index.js +1 -1
  227. package/dist/spinner/index.mjs +1 -1
  228. package/dist/stepper/index.d.mts +9 -0
  229. package/dist/stepper/index.js +1 -7
  230. package/dist/stepper/index.js.map +1 -1
  231. package/dist/stepper/index.mjs +137 -2317
  232. package/dist/stepper/index.mjs.map +1 -1
  233. package/dist/switch/index.d.mts +1 -0
  234. package/dist/switch/index.js +1 -1
  235. package/dist/switch/index.js.map +1 -1
  236. package/dist/switch/index.mjs +85 -208
  237. package/dist/switch/index.mjs.map +1 -1
  238. package/dist/tabs/index.d.mts +13 -0
  239. package/dist/tabs/index.js +1 -1
  240. package/dist/tabs/index.js.map +1 -1
  241. package/dist/tabs/index.mjs +179 -329
  242. package/dist/tabs/index.mjs.map +1 -1
  243. package/dist/tag/index.d.mts +1 -0
  244. package/dist/tag/index.js +1 -1
  245. package/dist/tag/index.js.map +1 -1
  246. package/dist/tag/index.mjs +2 -2
  247. package/dist/tag/variants/index.d.mts +3 -0
  248. package/dist/text-link/index.d.mts +1 -0
  249. package/dist/text-link/index.js +1 -1
  250. package/dist/text-link/index.mjs +1 -1
  251. package/dist/textarea/index.d.mts +14 -0
  252. package/dist/textarea/index.js +1 -1
  253. package/dist/textarea/index.js.map +1 -1
  254. package/dist/textarea/index.mjs +6 -6
  255. package/dist/toast/index.d.mts +20 -0
  256. package/dist/toast/index.js +1 -1
  257. package/dist/toast/index.js.map +1 -1
  258. package/dist/toast/index.mjs +146 -1008
  259. package/dist/toast/index.mjs.map +1 -1
  260. package/dist/useRenderSlot-DATwjgpo.js +2 -0
  261. package/dist/useRenderSlot-DATwjgpo.js.map +1 -0
  262. package/dist/useRenderSlot-LwWj8QbC.mjs +10 -0
  263. package/dist/useRenderSlot-LwWj8QbC.mjs.map +1 -0
  264. package/dist/visually-hidden/index.d.mts +1 -0
  265. package/dist/visually-hidden/index.js +1 -1
  266. package/dist/visually-hidden/index.mjs +1 -1
  267. package/package.json +7 -6
  268. package/dist/Button-C3xHNaGl.js +0 -2
  269. package/dist/DialogContent.styles-BrhKaHc_.js +0 -2
  270. package/dist/DialogContent.styles-BrhKaHc_.js.map +0 -1
  271. package/dist/DialogContent.styles-WGWJS9dj.mjs +0 -48
  272. package/dist/DialogContent.styles-WGWJS9dj.mjs.map +0 -1
  273. package/dist/Icon-Bf0XrmiR.js +0 -2
  274. package/dist/IconButton-Bf-EDzpI.js +0 -2
  275. package/dist/Slot-C98rL4yy.mjs +0 -14
  276. package/dist/Slot-ghrohQLA.js +0 -2
  277. package/dist/Spinner-DK8VEsaR.js +0 -2
  278. package/dist/TextLink-DD0VO37q.js +0 -2
  279. package/dist/composite-Br3kM5N9.mjs +0 -40
  280. package/dist/composite-Br3kM5N9.mjs.map +0 -1
  281. package/dist/composite-fJD9R7R0.js +0 -2
  282. package/dist/composite-fJD9R7R0.js.map +0 -1
  283. package/dist/detectBrowser-Bc7rk5fI.mjs +0 -44
  284. package/dist/detectBrowser-Bc7rk5fI.mjs.map +0 -1
  285. package/dist/detectBrowser-DTbs_30X.js +0 -2
  286. package/dist/detectBrowser-DTbs_30X.js.map +0 -1
  287. package/dist/downshift.esm-Ncwetv0s.mjs +0 -3038
  288. package/dist/downshift.esm-Ncwetv0s.mjs.map +0 -1
  289. package/dist/downshift.esm-PfCOUbxq.js +0 -37
  290. package/dist/downshift.esm-PfCOUbxq.js.map +0 -1
  291. package/dist/floating-ui.utils.dom-CCN4I08l.js +0 -2
  292. package/dist/floating-ui.utils.dom-CCN4I08l.js.map +0 -1
  293. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs +0 -136
  294. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs.map +0 -1
  295. package/dist/index-0KYGKeVg.js +0 -2
  296. package/dist/index-0KYGKeVg.js.map +0 -1
  297. package/dist/index-1WIgmEZh.js +0 -2
  298. package/dist/index-1WIgmEZh.js.map +0 -1
  299. package/dist/index-BRi38DTc.mjs +0 -21
  300. package/dist/index-BRi38DTc.mjs.map +0 -1
  301. package/dist/index-BZAtNKwE.mjs +0 -71
  302. package/dist/index-BZAtNKwE.mjs.map +0 -1
  303. package/dist/index-BZPx6jYI.mjs +0 -9
  304. package/dist/index-BZPx6jYI.mjs.map +0 -1
  305. package/dist/index-BlkdpEIe.mjs +0 -55
  306. package/dist/index-BlkdpEIe.mjs.map +0 -1
  307. package/dist/index-BmAFn37q.mjs +0 -49
  308. package/dist/index-BmAFn37q.mjs.map +0 -1
  309. package/dist/index-C-J_tHdS.js +0 -6
  310. package/dist/index-C-J_tHdS.js.map +0 -1
  311. package/dist/index-C1qb0595.mjs +0 -28
  312. package/dist/index-C1qb0595.mjs.map +0 -1
  313. package/dist/index-C34GgsKQ.mjs +0 -54
  314. package/dist/index-C34GgsKQ.mjs.map +0 -1
  315. package/dist/index-CCKe-Mpx.mjs +0 -7
  316. package/dist/index-CCKe-Mpx.mjs.map +0 -1
  317. package/dist/index-CDBBjNXc.js +0 -2
  318. package/dist/index-CDBBjNXc.js.map +0 -1
  319. package/dist/index-CYjGhVvU.mjs +0 -243
  320. package/dist/index-CYjGhVvU.mjs.map +0 -1
  321. package/dist/index-ChLwd62c.js +0 -2
  322. package/dist/index-ChLwd62c.js.map +0 -1
  323. package/dist/index-Cjj_rUPu.js +0 -2
  324. package/dist/index-Cjj_rUPu.js.map +0 -1
  325. package/dist/index-CyMbLkj0.js +0 -2
  326. package/dist/index-CyMbLkj0.js.map +0 -1
  327. package/dist/index-DFZozV_h.mjs +0 -69
  328. package/dist/index-DFZozV_h.mjs.map +0 -1
  329. package/dist/index-DKuHkHFX.js +0 -2
  330. package/dist/index-DKuHkHFX.js.map +0 -1
  331. package/dist/index-DLHLIYPI.mjs +0 -16
  332. package/dist/index-DLHLIYPI.mjs.map +0 -1
  333. package/dist/index-DO-atGp-.js +0 -2
  334. package/dist/index-DO-atGp-.js.map +0 -1
  335. package/dist/index-DWlg8lkk.mjs +0 -179
  336. package/dist/index-DWlg8lkk.mjs.map +0 -1
  337. package/dist/index-DYxWvftI.js +0 -2
  338. package/dist/index-DYxWvftI.js.map +0 -1
  339. package/dist/index-D_lWkK39.mjs +0 -803
  340. package/dist/index-D_lWkK39.mjs.map +0 -1
  341. package/dist/index-DdkVj7D0.js +0 -18
  342. package/dist/index-DdkVj7D0.js.map +0 -1
  343. package/dist/index-De-6atSi.js +0 -2
  344. package/dist/index-De-6atSi.js.map +0 -1
  345. package/dist/index-DhGWNzsz.mjs +0 -83
  346. package/dist/index-DhGWNzsz.mjs.map +0 -1
  347. package/dist/index-Dkj4QRX8.js +0 -2
  348. package/dist/index-Dkj4QRX8.js.map +0 -1
  349. package/dist/index-DlIFg0Eu.mjs +0 -60
  350. package/dist/index-DlIFg0Eu.mjs.map +0 -1
  351. package/dist/index-DnaHaH_0.js +0 -2
  352. package/dist/index-DnaHaH_0.js.map +0 -1
  353. package/dist/index-MHF2-CYX.js +0 -2
  354. package/dist/index-MHF2-CYX.js.map +0 -1
  355. package/dist/index-MQ0c3ZX_.js +0 -2
  356. package/dist/index-MQ0c3ZX_.js.map +0 -1
  357. package/dist/index-MSR-vgWR.mjs +0 -37
  358. package/dist/index-MSR-vgWR.mjs.map +0 -1
  359. package/dist/index-VL0YEmOW.mjs +0 -125
  360. package/dist/index-VL0YEmOW.mjs.map +0 -1
  361. package/dist/index-tXqxYME3.js +0 -42
  362. package/dist/index-tXqxYME3.js.map +0 -1
  363. package/dist/inertValue-Bif5Sqs6.mjs +0 -522
  364. package/dist/inertValue-Bif5Sqs6.mjs.map +0 -1
  365. package/dist/inertValue-ShwihJSN.js +0 -5
  366. package/dist/inertValue-ShwihJSN.js.map +0 -1
  367. package/dist/useCollapsiblePanel-D1dCo0lf.js +0 -4
  368. package/dist/useCollapsiblePanel-D1dCo0lf.js.map +0 -1
  369. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs +0 -287
  370. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs.map +0 -1
  371. package/dist/useFocusWithin-CFNEka2I.js +0 -2
  372. package/dist/useFocusWithin-CFNEka2I.js.map +0 -1
  373. package/dist/useFocusWithin-CoL4390f.mjs +0 -796
  374. package/dist/useFocusWithin-CoL4390f.mjs.map +0 -1
  375. package/dist/useOpenChangeComplete-Dk-u_f2y.js +0 -2
  376. package/dist/useOpenChangeComplete-Dk-u_f2y.js.map +0 -1
  377. package/dist/useOpenChangeComplete-RUbg6RBw.mjs +0 -582
  378. package/dist/useOpenChangeComplete-RUbg6RBw.mjs.map +0 -1
  379. package/dist/useTransitionStatus-CktVVKxz.mjs +0 -46
  380. package/dist/useTransitionStatus-CktVVKxz.mjs.map +0 -1
  381. package/dist/useTransitionStatus-CqbEyvIj.js +0 -2
  382. package/dist/useTransitionStatus-CqbEyvIj.js.map +0 -1
@@ -1,796 +0,0 @@
1
- import d, { useRef as v, useCallback as p, useState as k, useContext as D, useEffect as j, useMemo as pe } from "react";
2
- import { b as ve } from "./index-BmAFn37q.mjs";
3
- const S = typeof document < "u" ? d.useLayoutEffect : () => {
4
- };
5
- var V;
6
- const me = (V = d.useInsertionEffect) !== null && V !== void 0 ? V : S;
7
- function G(e) {
8
- const t = v(null);
9
- return me(() => {
10
- t.current = e;
11
- }, [
12
- e
13
- ]), p((...n) => {
14
- const r = t.current;
15
- return r?.(...n);
16
- }, []);
17
- }
18
- function ge(e) {
19
- let [t, n] = k(e), r = v(null), o = G(() => {
20
- if (!r.current) return;
21
- let a = r.current.next();
22
- if (a.done) {
23
- r.current = null;
24
- return;
25
- }
26
- t === a.value ? o() : n(a.value);
27
- });
28
- S(() => {
29
- r.current && o();
30
- });
31
- let i = G((a) => {
32
- r.current = a(t), o();
33
- });
34
- return [
35
- t,
36
- i
37
- ];
38
- }
39
- const P = {
40
- prefix: String(Math.round(Math.random() * 1e10)),
41
- current: 0
42
- }, ne = /* @__PURE__ */ d.createContext(P), he = /* @__PURE__ */ d.createContext(!1);
43
- let we = !!(typeof window < "u" && window.document && window.document.createElement), W = /* @__PURE__ */ new WeakMap();
44
- function ye(e = !1) {
45
- let t = D(ne), n = v(null);
46
- if (n.current === null && !e) {
47
- var r, o;
48
- let i = (o = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
49
- if (i) {
50
- let a = W.get(i);
51
- a == null ? W.set(i, {
52
- id: t.current,
53
- state: i.memoizedState
54
- }) : i.memoizedState !== a.state && (t.current = a.id, W.delete(i));
55
- }
56
- n.current = ++t.current;
57
- }
58
- return n.current;
59
- }
60
- function Ee(e) {
61
- let t = D(ne);
62
- t === P && !we && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
63
- let n = ye(!!e), r = t === P && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
64
- return e || `${r}-${n}`;
65
- }
66
- function Le(e) {
67
- let t = d.useId(), [n] = k(re()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${P.prefix}`;
68
- return e || `${r}-${t}`;
69
- }
70
- const xe = typeof d.useId == "function" ? Le : Ee;
71
- function Se() {
72
- return !1;
73
- }
74
- function Te() {
75
- return !0;
76
- }
77
- function Me(e) {
78
- return () => {
79
- };
80
- }
81
- function re() {
82
- return typeof d.useSyncExternalStore == "function" ? d.useSyncExternalStore(Me, Se, Te) : D(he);
83
- }
84
- let Pe = !!(typeof window < "u" && window.document && window.document.createElement), h = /* @__PURE__ */ new Map(), y;
85
- typeof FinalizationRegistry < "u" && (y = new FinalizationRegistry((e) => {
86
- h.delete(e);
87
- }));
88
- function Fe(e) {
89
- let [t, n] = k(e), r = v(null), o = xe(t), i = v(null);
90
- if (y && y.register(i, o), Pe) {
91
- const a = h.get(o);
92
- a && !a.includes(r) ? a.push(r) : h.set(o, [
93
- r
94
- ]);
95
- }
96
- return S(() => {
97
- let a = o;
98
- return () => {
99
- y && y.unregister(i), h.delete(a);
100
- };
101
- }, [
102
- o
103
- ]), j(() => {
104
- let a = r.current;
105
- return a && n(a), () => {
106
- a && (r.current = null);
107
- };
108
- }), o;
109
- }
110
- function Ce(e, t) {
111
- if (e === t) return e;
112
- let n = h.get(e);
113
- if (n)
114
- return n.forEach((o) => o.current = t), t;
115
- let r = h.get(t);
116
- return r ? (r.forEach((o) => o.current = e), e) : t;
117
- }
118
- function St(e = []) {
119
- let t = Fe(), [n, r] = ge(t), o = p(() => {
120
- r(function* () {
121
- yield t, yield document.getElementById(t) ? t : void 0;
122
- });
123
- }, [
124
- t,
125
- r
126
- ]);
127
- return S(o, [
128
- t,
129
- o,
130
- ...e
131
- ]), n;
132
- }
133
- function ke(...e) {
134
- return (...t) => {
135
- for (let n of e) typeof n == "function" && n(...t);
136
- };
137
- }
138
- const T = (e) => {
139
- var t;
140
- return (t = e?.ownerDocument) !== null && t !== void 0 ? t : document;
141
- }, x = (e) => e && "window" in e && e.window === e ? e : T(e).defaultView || window;
142
- function De(e) {
143
- return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
144
- }
145
- function Ae(e) {
146
- return De(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
147
- }
148
- let Ie = !1;
149
- function z() {
150
- return Ie;
151
- }
152
- function Ne(e, t) {
153
- if (!z()) return t && e ? e.contains(t) : !1;
154
- if (!e || !t) return !1;
155
- let n = t;
156
- for (; n !== null; ) {
157
- if (n === e) return !0;
158
- n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : Ae(n) ? n = n.host : n = n.parentNode;
159
- }
160
- return !1;
161
- }
162
- const Oe = (e = document) => {
163
- var t;
164
- if (!z()) return e.activeElement;
165
- let n = e.activeElement;
166
- for (; n && "shadowRoot" in n && (!((t = n.shadowRoot) === null || t === void 0) && t.activeElement); ) n = n.shadowRoot.activeElement;
167
- return n;
168
- };
169
- function Ve(e) {
170
- return z() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
171
- }
172
- function Tt(...e) {
173
- let t = {
174
- ...e[0]
175
- };
176
- for (let n = 1; n < e.length; n++) {
177
- let r = e[n];
178
- for (let o in r) {
179
- let i = t[o], a = r[o];
180
- typeof i == "function" && typeof a == "function" && // This is a lot faster than a regex.
181
- o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= /* 'A' */
182
- 65 && o.charCodeAt(2) <= /* 'Z' */
183
- 90 ? t[o] = ke(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = ve(i, a) : o === "id" && i && a ? t.id = Ce(i, a) : t[o] = a !== void 0 ? a : i;
184
- }
185
- }
186
- return t;
187
- }
188
- const We = /* @__PURE__ */ new Set([
189
- "id"
190
- ]), Ge = /* @__PURE__ */ new Set([
191
- "aria-label",
192
- "aria-labelledby",
193
- "aria-describedby",
194
- "aria-details"
195
- ]), He = /* @__PURE__ */ new Set([
196
- "href",
197
- "hrefLang",
198
- "target",
199
- "rel",
200
- "download",
201
- "ping",
202
- "referrerPolicy"
203
- ]), Re = /* @__PURE__ */ new Set([
204
- "dir",
205
- "lang",
206
- "hidden",
207
- "inert",
208
- "translate"
209
- ]), Q = /* @__PURE__ */ new Set([
210
- "onClick",
211
- "onAuxClick",
212
- "onContextMenu",
213
- "onDoubleClick",
214
- "onMouseDown",
215
- "onMouseEnter",
216
- "onMouseLeave",
217
- "onMouseMove",
218
- "onMouseOut",
219
- "onMouseOver",
220
- "onMouseUp",
221
- "onTouchCancel",
222
- "onTouchEnd",
223
- "onTouchMove",
224
- "onTouchStart",
225
- "onPointerDown",
226
- "onPointerMove",
227
- "onPointerUp",
228
- "onPointerCancel",
229
- "onPointerEnter",
230
- "onPointerLeave",
231
- "onPointerOver",
232
- "onPointerOut",
233
- "onGotPointerCapture",
234
- "onLostPointerCapture",
235
- "onScroll",
236
- "onWheel",
237
- "onAnimationStart",
238
- "onAnimationEnd",
239
- "onAnimationIteration",
240
- "onTransitionCancel",
241
- "onTransitionEnd",
242
- "onTransitionRun",
243
- "onTransitionStart"
244
- ]), je = /^(data-.*)$/;
245
- function Mt(e, t = {}) {
246
- let { labelable: n, isLink: r, global: o, events: i = o, propNames: a } = t, l = {};
247
- for (const c in e) Object.prototype.hasOwnProperty.call(e, c) && (We.has(c) || n && Ge.has(c) || r && He.has(c) || o && Re.has(c) || i && Q.has(c) || c.endsWith("Capture") && Q.has(c.slice(0, -7)) || a?.has(c) || je.test(c)) && (l[c] = e[c]);
248
- return l;
249
- }
250
- function X(e) {
251
- if (ze()) e.focus({
252
- preventScroll: !0
253
- });
254
- else {
255
- let t = Be(e);
256
- e.focus(), Ue(t);
257
- }
258
- }
259
- let M = null;
260
- function ze() {
261
- if (M == null) {
262
- M = !1;
263
- try {
264
- document.createElement("div").focus({
265
- get preventScroll() {
266
- return M = !0, !0;
267
- }
268
- });
269
- } catch {
270
- }
271
- }
272
- return M;
273
- }
274
- function Be(e) {
275
- let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
276
- for (; t instanceof HTMLElement && t !== r; )
277
- (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
278
- element: t,
279
- scrollTop: t.scrollTop,
280
- scrollLeft: t.scrollLeft
281
- }), t = t.parentNode;
282
- return r instanceof HTMLElement && n.push({
283
- element: r,
284
- scrollTop: r.scrollTop,
285
- scrollLeft: r.scrollLeft
286
- }), n;
287
- }
288
- function Ue(e) {
289
- for (let { element: t, scrollTop: n, scrollLeft: r } of e)
290
- t.scrollTop = n, t.scrollLeft = r;
291
- }
292
- function A(e) {
293
- var t;
294
- if (typeof window > "u" || window.navigator == null) return !1;
295
- let n = (t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands;
296
- return Array.isArray(n) && n.some((r) => e.test(r.brand)) || e.test(window.navigator.userAgent);
297
- }
298
- function B(e) {
299
- var t;
300
- return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
301
- }
302
- function $(e) {
303
- if (process.env.NODE_ENV === "test") return e;
304
- let t = null;
305
- return () => (t == null && (t = e()), t);
306
- }
307
- const U = $(function() {
308
- return B(/^Mac/i);
309
- }), Ke = $(function() {
310
- return B(/^iPhone/i);
311
- }), qe = $(function() {
312
- return B(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
313
- U() && navigator.maxTouchPoints > 1;
314
- }), Je = $(function() {
315
- return Ke() || qe();
316
- });
317
- $(function() {
318
- return U() || Je();
319
- });
320
- const Pt = $(function() {
321
- return A(/AppleWebKit/i) && !Qe();
322
- }), Qe = $(function() {
323
- return A(/Chrome/i);
324
- }), oe = $(function() {
325
- return A(/Android/i);
326
- }), Ft = $(function() {
327
- return A(/Firefox/i);
328
- });
329
- function Xe() {
330
- let e = v(/* @__PURE__ */ new Map()), t = p((o, i, a, l) => {
331
- let c = l?.once ? (...b) => {
332
- e.current.delete(a), a(...b);
333
- } : a;
334
- e.current.set(a, {
335
- type: i,
336
- eventTarget: o,
337
- fn: c,
338
- options: l
339
- }), o.addEventListener(i, c, l);
340
- }, []), n = p((o, i, a, l) => {
341
- var c;
342
- let b = ((c = e.current.get(a)) === null || c === void 0 ? void 0 : c.fn) || a;
343
- o.removeEventListener(i, b, l), e.current.delete(a);
344
- }, []), r = p(() => {
345
- e.current.forEach((o, i) => {
346
- n(o.eventTarget, o.type, i, o.options);
347
- });
348
- }, [
349
- n
350
- ]);
351
- return j(() => r, [
352
- r
353
- ]), {
354
- addGlobalListener: t,
355
- removeGlobalListener: n,
356
- removeAllGlobalListeners: r
357
- };
358
- }
359
- function Ze(e) {
360
- return e.pointerType === "" && e.isTrusted ? !0 : oe() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
361
- }
362
- function Ct(e) {
363
- return !oe() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
364
- }
365
- const Ye = typeof Element < "u" && "checkVisibility" in Element.prototype;
366
- function _e(e) {
367
- const t = x(e);
368
- if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
369
- let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
370
- if (o) {
371
- const { getComputedStyle: i } = e.ownerDocument.defaultView;
372
- let { display: a, visibility: l } = i(e);
373
- o = a !== "none" && l !== "hidden" && l !== "collapse";
374
- }
375
- return o;
376
- }
377
- function et(e, t) {
378
- return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
379
- !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
380
- }
381
- function ae(e, t) {
382
- return Ye ? e.checkVisibility({
383
- visibilityProperty: !0
384
- }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && _e(e) && et(e, t) && (!e.parentElement || ae(e.parentElement, e));
385
- }
386
- const ie = [
387
- "input:not([disabled]):not([type=hidden])",
388
- "select:not([disabled])",
389
- "textarea:not([disabled])",
390
- "button:not([disabled])",
391
- "a[href]",
392
- "area[href]",
393
- "summary",
394
- "iframe",
395
- "object",
396
- "embed",
397
- "audio[controls]",
398
- "video[controls]",
399
- '[contenteditable]:not([contenteditable^="false"])',
400
- "permission"
401
- ], tt = ie.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
402
- ie.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
403
- function nt(e) {
404
- return e.matches(tt) && ae(e) && !rt(e);
405
- }
406
- function rt(e) {
407
- let t = e;
408
- for (; t != null; ) {
409
- if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
410
- t = t.parentElement;
411
- }
412
- return !1;
413
- }
414
- const ot = /* @__PURE__ */ new Set([
415
- "Arab",
416
- "Syrc",
417
- "Samr",
418
- "Mand",
419
- "Thaa",
420
- "Mend",
421
- "Nkoo",
422
- "Adlm",
423
- "Rohg",
424
- "Hebr"
425
- ]), at = /* @__PURE__ */ new Set([
426
- "ae",
427
- "ar",
428
- "arc",
429
- "bcc",
430
- "bqi",
431
- "ckb",
432
- "dv",
433
- "fa",
434
- "glk",
435
- "he",
436
- "ku",
437
- "mzn",
438
- "nqo",
439
- "pnb",
440
- "ps",
441
- "sd",
442
- "ug",
443
- "ur",
444
- "yi"
445
- ]);
446
- function it(e) {
447
- if (Intl.Locale) {
448
- let n = new Intl.Locale(e).maximize(), r = typeof n.getTextInfo == "function" ? n.getTextInfo() : n.textInfo;
449
- if (r) return r.direction === "rtl";
450
- if (n.script) return ot.has(n.script);
451
- }
452
- let t = e.split("-")[0];
453
- return at.has(t);
454
- }
455
- const ct = Symbol.for("react-aria.i18n.locale");
456
- function ce() {
457
- let e = typeof window < "u" && window[ct] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
458
- try {
459
- Intl.DateTimeFormat.supportedLocalesOf([
460
- e
461
- ]);
462
- } catch {
463
- e = "en-US";
464
- }
465
- return {
466
- locale: e,
467
- direction: it(e) ? "rtl" : "ltr"
468
- };
469
- }
470
- let H = ce(), E = /* @__PURE__ */ new Set();
471
- function Z() {
472
- H = ce();
473
- for (let e of E) e(H);
474
- }
475
- function lt() {
476
- let e = re(), [t, n] = k(H);
477
- return j(() => (E.size === 0 && window.addEventListener("languagechange", Z), E.add(n), () => {
478
- E.delete(n), E.size === 0 && window.removeEventListener("languagechange", Z);
479
- }), []), e ? {
480
- locale: "en-US",
481
- direction: "ltr"
482
- } : t;
483
- }
484
- const ut = /* @__PURE__ */ d.createContext(null);
485
- function st() {
486
- let e = lt();
487
- return D(ut) || e;
488
- }
489
- const ft = Symbol.for("react-aria.i18n.locale"), dt = Symbol.for("react-aria.i18n.strings");
490
- let g;
491
- class I {
492
- /** Returns a localized string for the given key and locale. */
493
- getStringForLocale(t, n) {
494
- let o = this.getStringsForLocale(n)[t];
495
- if (!o) throw new Error(`Could not find intl message ${t} in ${n} locale`);
496
- return o;
497
- }
498
- /** Returns all localized strings for the given locale. */
499
- getStringsForLocale(t) {
500
- let n = this.strings[t];
501
- return n || (n = $t(t, this.strings, this.defaultLocale), this.strings[t] = n), n;
502
- }
503
- static getGlobalDictionaryForPackage(t) {
504
- if (typeof window > "u") return null;
505
- let n = window[ft];
506
- if (g === void 0) {
507
- let o = window[dt];
508
- if (!o) return null;
509
- g = {};
510
- for (let i in o) g[i] = new I({
511
- [n]: o[i]
512
- }, n);
513
- }
514
- let r = g?.[t];
515
- if (!r) throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
516
- return r;
517
- }
518
- constructor(t, n = "en-US") {
519
- this.strings = Object.fromEntries(Object.entries(t).filter(([, r]) => r)), this.defaultLocale = n;
520
- }
521
- }
522
- function $t(e, t, n = "en-US") {
523
- if (t[e]) return t[e];
524
- let r = bt(e);
525
- if (t[r]) return t[r];
526
- for (let o in t)
527
- if (o.startsWith(r + "-")) return t[o];
528
- return t[n];
529
- }
530
- function bt(e) {
531
- return Intl.Locale ? new Intl.Locale(e).language : e.split("-")[0];
532
- }
533
- const Y = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
534
- class pt {
535
- /** Formats a localized string for the given key with the provided variables. */
536
- format(t, n) {
537
- let r = this.strings.getStringForLocale(t, this.locale);
538
- return typeof r == "function" ? r(n, this) : r;
539
- }
540
- plural(t, n, r = "cardinal") {
541
- let o = n["=" + t];
542
- if (o) return typeof o == "function" ? o() : o;
543
- let i = this.locale + ":" + r, a = Y.get(i);
544
- a || (a = new Intl.PluralRules(this.locale, {
545
- type: r
546
- }), Y.set(i, a));
547
- let l = a.select(t);
548
- return o = n[l] || n.other, typeof o == "function" ? o() : o;
549
- }
550
- number(t) {
551
- let n = _.get(this.locale);
552
- return n || (n = new Intl.NumberFormat(this.locale), _.set(this.locale, n)), n.format(t);
553
- }
554
- select(t, n) {
555
- let r = t[n] || t.other;
556
- return typeof r == "function" ? r() : r;
557
- }
558
- constructor(t, n) {
559
- this.locale = t, this.strings = n;
560
- }
561
- }
562
- const ee = /* @__PURE__ */ new WeakMap();
563
- function vt(e) {
564
- let t = ee.get(e);
565
- return t || (t = new I(e), ee.set(e, t)), t;
566
- }
567
- function mt(e, t) {
568
- return t && I.getGlobalDictionaryForPackage(t) || vt(e);
569
- }
570
- function kt(e, t) {
571
- let { locale: n } = st(), r = mt(e, t);
572
- return pe(() => new pt(n, r), [
573
- n,
574
- r
575
- ]);
576
- }
577
- function le(e) {
578
- let t = e;
579
- return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
580
- }, t;
581
- }
582
- function gt(e, t) {
583
- Object.defineProperty(e, "target", {
584
- value: t
585
- }), Object.defineProperty(e, "currentTarget", {
586
- value: t
587
- });
588
- }
589
- function ht(e) {
590
- let t = v({
591
- isFocused: !1,
592
- observer: null
593
- });
594
- S(() => {
595
- const r = t.current;
596
- return () => {
597
- r.observer && (r.observer.disconnect(), r.observer = null);
598
- };
599
- }, []);
600
- let n = G((r) => {
601
- e?.(r);
602
- });
603
- return p((r) => {
604
- if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
605
- t.current.isFocused = !0;
606
- let o = r.target, i = (a) => {
607
- if (t.current.isFocused = !1, o.disabled) {
608
- let l = le(a);
609
- n(l);
610
- }
611
- t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
612
- };
613
- o.addEventListener("focusout", i, {
614
- once: !0
615
- }), t.current.observer = new MutationObserver(() => {
616
- if (t.current.isFocused && o.disabled) {
617
- var a;
618
- (a = t.current.observer) === null || a === void 0 || a.disconnect();
619
- let l = o === document.activeElement ? null : document.activeElement;
620
- o.dispatchEvent(new FocusEvent("blur", {
621
- relatedTarget: l
622
- })), o.dispatchEvent(new FocusEvent("focusout", {
623
- bubbles: !0,
624
- relatedTarget: l
625
- }));
626
- }
627
- }), t.current.observer.observe(o, {
628
- attributes: !0,
629
- attributeFilter: [
630
- "disabled"
631
- ]
632
- });
633
- }
634
- }, [
635
- n
636
- ]);
637
- }
638
- let F = !1;
639
- function Dt(e) {
640
- for (; e && !nt(e); ) e = e.parentElement;
641
- let t = x(e), n = t.document.activeElement;
642
- if (!n || n === e) return;
643
- F = !0;
644
- let r = !1, o = (u) => {
645
- (u.target === n || r) && u.stopImmediatePropagation();
646
- }, i = (u) => {
647
- (u.target === n || r) && (u.stopImmediatePropagation(), !e && !r && (r = !0, X(n), c()));
648
- }, a = (u) => {
649
- (u.target === e || r) && u.stopImmediatePropagation();
650
- }, l = (u) => {
651
- (u.target === e || r) && (u.stopImmediatePropagation(), r || (r = !0, X(n), c()));
652
- };
653
- t.addEventListener("blur", o, !0), t.addEventListener("focusout", i, !0), t.addEventListener("focusin", l, !0), t.addEventListener("focus", a, !0);
654
- let c = () => {
655
- cancelAnimationFrame(b), t.removeEventListener("blur", o, !0), t.removeEventListener("focusout", i, !0), t.removeEventListener("focusin", l, !0), t.removeEventListener("focus", a, !0), F = !1, r = !1;
656
- }, b = requestAnimationFrame(c);
657
- return c;
658
- }
659
- let w = null, wt = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map(), m = !1, R = !1;
660
- function N(e, t) {
661
- for (let n of wt) n(e, t);
662
- }
663
- function yt(e) {
664
- return !(e.metaKey || !U() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
665
- }
666
- function C(e) {
667
- m = !0, yt(e) && (w = "keyboard", N("keyboard", e));
668
- }
669
- function f(e) {
670
- w = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (m = !0, N("pointer", e));
671
- }
672
- function ue(e) {
673
- Ze(e) && (m = !0, w = "virtual");
674
- }
675
- function se(e) {
676
- e.target === window || e.target === document || F || !e.isTrusted || (!m && !R && (w = "virtual", N("virtual", e)), m = !1, R = !1);
677
- }
678
- function fe() {
679
- F || (m = !1, R = !0);
680
- }
681
- function te(e) {
682
- if (typeof window > "u" || typeof document > "u" || L.get(x(e))) return;
683
- const t = x(e), n = T(e);
684
- let r = t.HTMLElement.prototype.focus;
685
- t.HTMLElement.prototype.focus = function() {
686
- m = !0, r.apply(this, arguments);
687
- }, n.addEventListener("keydown", C, !0), n.addEventListener("keyup", C, !0), n.addEventListener("click", ue, !0), t.addEventListener("focus", se, !0), t.addEventListener("blur", fe, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", f, !0), n.addEventListener("pointermove", f, !0), n.addEventListener("pointerup", f, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", f, !0), n.addEventListener("mousemove", f, !0), n.addEventListener("mouseup", f, !0)), t.addEventListener("beforeunload", () => {
688
- de(e);
689
- }, {
690
- once: !0
691
- }), L.set(t, {
692
- focus: r
693
- });
694
- }
695
- const de = (e, t) => {
696
- const n = x(e), r = T(e);
697
- t && r.removeEventListener("DOMContentLoaded", t), L.has(n) && (n.HTMLElement.prototype.focus = L.get(n).focus, r.removeEventListener("keydown", C, !0), r.removeEventListener("keyup", C, !0), r.removeEventListener("click", ue, !0), n.removeEventListener("focus", se, !0), n.removeEventListener("blur", fe, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", f, !0), r.removeEventListener("pointermove", f, !0), r.removeEventListener("pointerup", f, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", f, !0), r.removeEventListener("mousemove", f, !0), r.removeEventListener("mouseup", f, !0)), L.delete(n));
698
- };
699
- function Et(e) {
700
- const t = T(e);
701
- let n;
702
- return t.readyState !== "loading" ? te(e) : (n = () => {
703
- te(e);
704
- }, t.addEventListener("DOMContentLoaded", n)), () => de(e, n);
705
- }
706
- typeof document < "u" && Et();
707
- function At() {
708
- return w;
709
- }
710
- function It(e) {
711
- w = e, N(e, null);
712
- }
713
- function Nt(e) {
714
- let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = v({
715
- isFocusWithin: !1
716
- }), { addGlobalListener: a, removeAllGlobalListeners: l } = Xe(), c = p((s) => {
717
- s.currentTarget.contains(s.target) && i.current.isFocusWithin && !s.currentTarget.contains(s.relatedTarget) && (i.current.isFocusWithin = !1, l(), n && n(s), o && o(!1));
718
- }, [
719
- n,
720
- o,
721
- i,
722
- l
723
- ]), b = ht(c), u = p((s) => {
724
- if (!s.currentTarget.contains(s.target)) return;
725
- const O = T(s.target), $e = Oe(O);
726
- if (!i.current.isFocusWithin && $e === Ve(s.nativeEvent)) {
727
- r && r(s), o && o(!0), i.current.isFocusWithin = !0, b(s);
728
- let K = s.currentTarget;
729
- a(O, "focus", (q) => {
730
- if (i.current.isFocusWithin && !Ne(K, q.target)) {
731
- let J = new O.defaultView.FocusEvent("blur", {
732
- relatedTarget: q.target
733
- });
734
- gt(J, K);
735
- let be = le(J);
736
- c(be);
737
- }
738
- }, {
739
- capture: !0
740
- });
741
- }
742
- }, [
743
- r,
744
- o,
745
- b,
746
- a,
747
- c
748
- ]);
749
- return t ? {
750
- focusWithinProps: {
751
- // These cannot be null, that would conflict in mergeProps
752
- onFocus: void 0,
753
- onBlur: void 0
754
- }
755
- } : {
756
- focusWithinProps: {
757
- onFocus: u,
758
- onBlur: c
759
- }
760
- };
761
- }
762
- export {
763
- Fe as $,
764
- Oe as A,
765
- ht as B,
766
- It as C,
767
- Ke as D,
768
- oe as E,
769
- St as a,
770
- kt as b,
771
- Mt as c,
772
- Xe as d,
773
- T as e,
774
- Ne as f,
775
- S as g,
776
- G as h,
777
- At as i,
778
- X as j,
779
- Nt as k,
780
- Tt as l,
781
- Ft as m,
782
- Pt as n,
783
- U as o,
784
- qe as p,
785
- st as q,
786
- Je as r,
787
- gt as s,
788
- le as t,
789
- Ve as u,
790
- Ct as v,
791
- Dt as w,
792
- Ze as x,
793
- x as y,
794
- ke as z
795
- };
796
- //# sourceMappingURL=useFocusWithin-CoL4390f.mjs.map