@jfrader/ui 0.5.0 → 0.6.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 (314) hide show
  1. package/README.md +18 -1
  2. package/dist/accordion-D6myONB9.js +206 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/activity-rings-Uszvwqdl.js +528 -0
  5. package/dist/activity-rings.js +2 -0
  6. package/dist/{alert-DS_einpy.js → alert-Bhj-qSMs.js} +15 -14
  7. package/dist/alert.js +1 -1
  8. package/dist/{announcement-bar-B58xempt.js → announcement-bar-B5J33QUh.js} +132 -131
  9. package/dist/announcement-bar.js +1 -1
  10. package/dist/avatar-B6idYC59.js +146 -0
  11. package/dist/{avatar-group-DOQQuV51.js → avatar-group-DvP8mAE-.js} +10 -9
  12. package/dist/avatar-group.js +1 -1
  13. package/dist/avatar.js +1 -1
  14. package/dist/badge-CfhTcA-Z.js +120 -0
  15. package/dist/badge.js +1 -1
  16. package/dist/billing-toggle-CgC7yxxo.js +349 -0
  17. package/dist/billing-toggle.js +2 -0
  18. package/dist/{bottom-sheet-DPJBFkie.js → bottom-sheet-BFQKO0Wo.js} +287 -268
  19. package/dist/bottom-sheet.js +1 -1
  20. package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-CG3akw-b.js} +28 -20
  21. package/dist/breadcrumbs.js +1 -1
  22. package/dist/{button-C92uYFJW.js → button-C6OV0C7J.js} +21 -20
  23. package/dist/button-group-B9wP2ddS.js +611 -0
  24. package/dist/button-group.js +2 -0
  25. package/dist/button.js +1 -1
  26. package/dist/calendar-Bg6D2sul.js +377 -0
  27. package/dist/calendar.js +1 -1
  28. package/dist/calendar.utils-azmB4Ej7.js +79 -0
  29. package/dist/card-C008OQCp.js +164 -0
  30. package/dist/card.js +1 -1
  31. package/dist/carousel-lTH4Foke.js +475 -0
  32. package/dist/carousel.js +1 -1
  33. package/dist/chat-thread-DVa17BRC.js +864 -0
  34. package/dist/chat-thread.js +2 -0
  35. package/dist/{checkbox-cFquiSdy.js → checkbox-CClE61GV.js} +23 -21
  36. package/dist/checkbox.js +1 -1
  37. package/dist/{chip-group-DTQd_M-G.js → chip-group-BZUX9KPF.js} +19 -17
  38. package/dist/chip-group.js +1 -1
  39. package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
  40. package/dist/{code-block-ahnRi-g8.js → code-block-CYP89_6h.js} +99 -97
  41. package/dist/code-block.js +1 -1
  42. package/dist/{combobox-Bhzvu9ma.js → combobox-D2Oc-co7.js} +131 -125
  43. package/dist/combobox.js +1 -1
  44. package/dist/command-palette-BrT1n9bb.js +394 -0
  45. package/dist/command-palette.js +1 -1
  46. package/dist/comment-thread-BnUHxviq.js +772 -0
  47. package/dist/comment-thread.js +2 -0
  48. package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
  49. package/dist/container.js +1 -1
  50. package/dist/context-menu-I4i0LRpm.js +371 -0
  51. package/dist/context-menu.js +2 -0
  52. package/dist/{copy-button-ByiA6D3R.js → copy-button-C0p_qrgf.js} +4 -4
  53. package/dist/copy-button.js +1 -1
  54. package/dist/{countdown-Dp_TD1VP.js → countdown-EcpV6rXy.js} +18 -17
  55. package/dist/countdown.js +1 -1
  56. package/dist/css-BYJhdGh-.js +2 -0
  57. package/dist/{date-picker-5zKSSuFF.js → date-picker-D-bn-iHs.js} +15 -14
  58. package/dist/date-picker.js +1 -1
  59. package/dist/date-range-picker-rXcZsI1Y.js +589 -0
  60. package/dist/date-range-picker.js +1 -1
  61. package/dist/dialog-CR1xdkrC.js +222 -0
  62. package/dist/dialog.js +1 -1
  63. package/dist/{divider-DYoJf0I_.js → divider-zOJzkcHh.js} +23 -21
  64. package/dist/divider.js +1 -1
  65. package/dist/drawer-CceaEhCr.js +590 -0
  66. package/dist/drawer.js +1 -1
  67. package/dist/{empty-state-CDgrjPPf.js → empty-state-DO0ApylK.js} +2 -1
  68. package/dist/empty-state.js +1 -1
  69. package/dist/{expandable-card-C-qJcZ14.js → expandable-card-W97vjix9.js} +59 -51
  70. package/dist/expandable-card.js +1 -1
  71. package/dist/expanding-search-Bb2_YfNx.js +239 -0
  72. package/dist/expanding-search.js +2 -0
  73. package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
  74. package/dist/file-dropzone-Bi5ikRIz.js +458 -0
  75. package/dist/file-dropzone.js +1 -1
  76. package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-QRnC4S_H.js} +36 -33
  77. package/dist/filter-toolbar.js +1 -1
  78. package/dist/{flex-Dh-_J5-U.js → flex-CS7eMRcK.js} +2 -2
  79. package/dist/flex.js +1 -1
  80. package/dist/{hold-to-confirm-DjB2EVjM.js → hold-to-confirm-CVBA0wNT.js} +18 -17
  81. package/dist/hold-to-confirm.js +1 -1
  82. package/dist/{hover-card-B-nrCIy2.js → hover-card-DN1EAlQA.js} +26 -25
  83. package/dist/hover-card.js +1 -1
  84. package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
  85. package/dist/{image-compare-ciuhPtQZ.js → image-compare-Ln2UUqTU.js} +20 -19
  86. package/dist/image-compare.js +1 -1
  87. package/dist/index.js +98 -78
  88. package/dist/{inline-edit-C0eeml65.js → inline-edit-D-pR2RPC.js} +22 -21
  89. package/dist/inline-edit.js +1 -1
  90. package/dist/{input-control-DmMuAuPS.js → input-control-B6HVBgwl.js} +1 -1
  91. package/dist/{json-viewer-BcySQfjZ.js → json-viewer-Dro3WrjS.js} +34 -29
  92. package/dist/json-viewer.js +1 -1
  93. package/dist/{kbd-C3ACoMoE.js → kbd-BI_9qzYr.js} +2 -1
  94. package/dist/kbd.js +1 -1
  95. package/dist/keycap-keyboard-Cdx-OAS1.js +311 -0
  96. package/dist/keycap-keyboard.js +2 -0
  97. package/dist/{layout-style-Cbd1Vilw.js → layout-style-BE0gSqrH.js} +1 -1
  98. package/dist/lightbox-gallery-D0YaSTut.js +777 -0
  99. package/dist/lightbox-gallery.js +2 -0
  100. package/dist/link-unfurl-CReyIjyy.js +695 -0
  101. package/dist/link-unfurl.js +2 -0
  102. package/dist/{listbox-style-WX-RASp1.js → listbox-style-DNOxAulu.js} +1 -1
  103. package/dist/{loading-ring-B8-30Dl1.js → loading-ring-D0lGrK8z.js} +1 -1
  104. package/dist/locale-switcher-CZF7XNYG.js +295 -0
  105. package/dist/locale-switcher.js +2 -0
  106. package/dist/mention-input-BjjAbJCf.js +600 -0
  107. package/dist/mention-input.js +1 -1
  108. package/dist/menu-CVzpsyXn.js +312 -0
  109. package/dist/menu.js +1 -1
  110. package/dist/{metric-card-Bh9K4fZs.js → metric-card-BnFssTXj.js} +12 -11
  111. package/dist/metric-card.js +1 -1
  112. package/dist/{multi-select-Pce_IYnz.js → multi-select-B3puEVo0.js} +78 -69
  113. package/dist/multi-select.js +1 -1
  114. package/dist/{navigation-sP5fiuQS.js → navigation-C_JD43gA.js} +56 -49
  115. package/dist/navigation.js +1 -1
  116. package/dist/next.js +65 -0
  117. package/dist/now-playing-DjVm1Phm.js +439 -0
  118. package/dist/now-playing.js +2 -0
  119. package/dist/{overlay-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
  120. package/dist/overlay-motion-Cr77ihn2.js +90 -0
  121. package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
  122. package/dist/{pagination-DmXZ8E85.js → pagination-Dkh4bJQh.js} +31 -29
  123. package/dist/pagination.js +1 -1
  124. package/dist/{password-field-03pWRkuY.js → password-field-Da58GP1g.js} +4 -4
  125. package/dist/password-field.js +1 -1
  126. package/dist/photo-grid-Dtl17D74.js +830 -0
  127. package/dist/photo-grid.js +2 -0
  128. package/dist/pill-Dd7pog19.js +59 -0
  129. package/dist/pill.js +1 -1
  130. package/dist/popover-CUMOcMtj.js +126 -0
  131. package/dist/popover.js +1 -1
  132. package/dist/presence-spring-4zwtUDQN.js +12 -0
  133. package/dist/{progress-CbOWBUdA.js → progress-Bcuz3Ob4.js} +12 -11
  134. package/dist/progress.js +1 -1
  135. package/dist/{radio-cards-D2QZENI_.js → radio-cards-FkAhESb5.js} +65 -63
  136. package/dist/radio-cards.js +1 -1
  137. package/dist/{radio-group-E6mMRgo7.js → radio-group-DItMf2YM.js} +32 -28
  138. package/dist/radio-group.js +1 -1
  139. package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-61h9hA3B.js} +16 -14
  140. package/dist/resizable-panels.js +1 -1
  141. package/dist/{scroll-area-CcZyiSOQ.js → scroll-area-B8KkCPOM.js} +16 -15
  142. package/dist/scroll-area.js +1 -1
  143. package/dist/{search-field-IxF0IJXm.js → search-field-CbsajaZb.js} +94 -93
  144. package/dist/search-field.js +1 -1
  145. package/dist/{segmented-control-yO1K1nbi.js → segmented-control-DCh-4ca-.js} +28 -26
  146. package/dist/segmented-control.js +1 -1
  147. package/dist/{select-n_H52W1Z.js → select-SrcQqZjo.js} +29 -27
  148. package/dist/select.js +1 -1
  149. package/dist/sheet-stack-DYX1SGSB.js +820 -0
  150. package/dist/sheet-stack.js +2 -0
  151. package/dist/shortcut-recorder-VgTQdjjn.js +688 -0
  152. package/dist/shortcut-recorder.js +2 -0
  153. package/dist/signature-pad-khL2yhQI.js +646 -0
  154. package/dist/signature-pad.js +1 -1
  155. package/dist/{skeleton-XQQDkCHd.js → skeleton-LJsQsveI.js} +9 -8
  156. package/dist/skeleton.js +1 -1
  157. package/dist/slider-DjAnGmlC.js +535 -0
  158. package/dist/slider.js +1 -1
  159. package/dist/{sortable-data-table-tirqlLY2.js → sortable-data-table-Bpitup_d.js} +29 -28
  160. package/dist/sortable-data-table.js +1 -1
  161. package/dist/{spinner-DtxvDPdM.js → spinner-CvzajSg9.js} +11 -10
  162. package/dist/spinner.js +1 -1
  163. package/dist/{split-button-Cb3EHs64.js → split-button-Bu41f2AY.js} +88 -93
  164. package/dist/split-button.js +1 -1
  165. package/dist/{stack-DC3IbtWk.js → stack-Bac4sJeI.js} +2 -2
  166. package/dist/stack.js +1 -1
  167. package/dist/{stepper-CruHbXxX.js → stepper-C8Ncavbr.js} +22 -21
  168. package/dist/stepper.js +1 -1
  169. package/dist/stretch-refresh-OrnTEj7P.js +349 -0
  170. package/dist/stretch-refresh.js +2 -0
  171. package/dist/{surface-DZ4d-2aL.js → surface-C69kwSuk.js} +13 -3
  172. package/dist/{swipe-actions-DiZC57-3.js → swipe-actions-1H5UOZKE.js} +29 -26
  173. package/dist/swipe-actions.js +1 -1
  174. package/dist/switch-79-hkQqg.js +146 -0
  175. package/dist/switch.js +1 -1
  176. package/dist/sx-BJXJ2xJK.js +23 -0
  177. package/dist/tabs-Bb5-noYE.js +211 -0
  178. package/dist/tabs.js +1 -1
  179. package/dist/{tag-input-DSRCyrX2.js → tag-input-BQaueKEb.js} +5 -5
  180. package/dist/tag-input.js +1 -1
  181. package/dist/{text-field-C8TWG-tY.js → text-field-D0VP7b4P.js} +18 -16
  182. package/dist/text-field.js +1 -1
  183. package/dist/{textarea-BrW0XcG_.js → textarea-D1YwEPmn.js} +21 -19
  184. package/dist/textarea.js +1 -1
  185. package/dist/theme-provider-BvcY-iJu.js +20 -0
  186. package/dist/theme-root-BrYVcTzt.js +163 -0
  187. package/dist/theme-root.js +1 -1
  188. package/dist/theme-scope-DGWy4H0C.js +62 -0
  189. package/dist/theme-switch-CP42mVDb.js +167 -0
  190. package/dist/theme-switch.js +2 -0
  191. package/dist/thread-parts-DfZNz70v.js +683 -0
  192. package/dist/{time-picker-Db8D49cP.js → time-picker-Tnd-JBLC.js} +39 -32
  193. package/dist/time-picker.js +1 -1
  194. package/dist/{timeline-k3nURuCP.js → timeline-DaldDMX7.js} +28 -21
  195. package/dist/timeline.js +1 -1
  196. package/dist/{toast-BHxI32ZA.js → toast-CSAbl5yK.js} +107 -87
  197. package/dist/{toast-stack-DqrAzdg5.js → toast-stack-BCR4Cu7V.js} +25 -10
  198. package/dist/toast-stack.js +1 -1
  199. package/dist/toast.js +1 -1
  200. package/dist/{toggle-group-fcjzpifI.js → toggle-group-C7ye1v4s.js} +24 -23
  201. package/dist/toggle-group.js +1 -1
  202. package/dist/tooltip-IajLwdUb.js +129 -0
  203. package/dist/tooltip.js +1 -1
  204. package/dist/{tree-view-C2liIxqy.js → tree-view-CoW4oJIZ.js} +18 -13
  205. package/dist/tree-view.js +1 -1
  206. package/dist/{trigger-style-B1KVC8O1.js → trigger-style-CtOrdPk4.js} +1 -1
  207. package/dist/types/components/activity-rings/activity-rings.d.ts +115 -0
  208. package/dist/types/components/activity-rings/index.d.ts +2 -0
  209. package/dist/types/components/billing-toggle/billing-toggle.d.ts +57 -0
  210. package/dist/types/components/billing-toggle/index.d.ts +2 -0
  211. package/dist/types/components/button-group/button-group.d.ts +72 -0
  212. package/dist/types/components/button-group/index.d.ts +2 -0
  213. package/dist/types/components/card/card.d.ts +4 -1
  214. package/dist/types/components/chat-thread/chat-thread.d.ts +130 -0
  215. package/dist/types/components/chat-thread/index.d.ts +2 -0
  216. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  217. package/dist/types/components/command-palette/command-palette.d.ts +1 -1
  218. package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
  219. package/dist/types/components/comment-thread/index.d.ts +1 -0
  220. package/dist/types/components/context-menu/context-menu.d.ts +55 -0
  221. package/dist/types/components/context-menu/index.d.ts +2 -0
  222. package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
  223. package/dist/types/components/drawer/drawer.d.ts +7 -1
  224. package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
  225. package/dist/types/components/expanding-search/index.d.ts +1 -0
  226. package/dist/types/components/keycap-keyboard/index.d.ts +2 -0
  227. package/dist/types/components/keycap-keyboard/keycap-keyboard.d.ts +32 -0
  228. package/dist/types/components/lightbox-gallery/index.d.ts +2 -0
  229. package/dist/types/components/lightbox-gallery/lightbox-gallery.d.ts +74 -0
  230. package/dist/types/components/link-unfurl/index.d.ts +2 -0
  231. package/dist/types/components/link-unfurl/link-unfurl.d.ts +94 -0
  232. package/dist/types/components/locale-switcher/index.d.ts +2 -0
  233. package/dist/types/components/locale-switcher/locale-switcher.d.ts +58 -0
  234. package/dist/types/components/menu/menu.d.ts +74 -7
  235. package/dist/types/components/next/emotion-registry.d.ts +16 -0
  236. package/dist/types/components/next/index.d.ts +2 -0
  237. package/dist/types/components/next/registry.d.ts +21 -0
  238. package/dist/types/components/now-playing/index.d.ts +1 -0
  239. package/dist/types/components/now-playing/now-playing.d.ts +88 -0
  240. package/dist/types/components/pagination/pagination.d.ts +1 -1
  241. package/dist/types/components/photo-grid/index.d.ts +2 -0
  242. package/dist/types/components/photo-grid/photo-grid.d.ts +82 -0
  243. package/dist/types/components/radio-cards/radio-cards.d.ts +1 -1
  244. package/dist/types/components/radio-group/radio-group.d.ts +1 -1
  245. package/dist/types/components/sheet-stack/index.d.ts +2 -0
  246. package/dist/types/components/sheet-stack/sheet-stack.d.ts +78 -0
  247. package/dist/types/components/shortcut-recorder/index.d.ts +2 -0
  248. package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +117 -0
  249. package/dist/types/components/slider/slider-style.d.ts +14 -0
  250. package/dist/types/components/slider/slider.d.ts +2 -10
  251. package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
  252. package/dist/types/components/split-button/split-button.d.ts +2 -2
  253. package/dist/types/components/stretch-refresh/index.d.ts +1 -0
  254. package/dist/types/components/stretch-refresh/stretch-refresh.d.ts +49 -0
  255. package/dist/types/components/tabs/tabs.d.ts +1 -1
  256. package/dist/types/components/text-field/text-field.d.ts +1 -1
  257. package/dist/types/components/textarea/textarea.d.ts +1 -1
  258. package/dist/types/components/theme-root/index.d.ts +1 -0
  259. package/dist/types/components/theme-root/theme-root.d.ts +9 -1
  260. package/dist/types/components/theme-switch/index.d.ts +1 -0
  261. package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
  262. package/dist/types/components/thread/thread-core.d.ts +96 -0
  263. package/dist/types/components/thread/thread-parts.d.ts +119 -0
  264. package/dist/types/components/tooltip/tooltip.d.ts +9 -2
  265. package/dist/types/components/usage-meter/usage-meter.d.ts +2 -12
  266. package/dist/types/components/usage-meter/usage-model.d.ts +30 -0
  267. package/dist/types/components/user-menu/index.d.ts +2 -0
  268. package/dist/types/components/user-menu/user-menu.d.ts +119 -0
  269. package/dist/types/index.d.ts +18 -0
  270. package/dist/types/overlay/exit-motion.d.ts +24 -0
  271. package/dist/types/overlay/overlay-layer.d.ts +20 -0
  272. package/dist/types/overlay/presence-spring.d.ts +12 -0
  273. package/dist/types/overlay/use-native-dialog.d.ts +10 -1
  274. package/dist/types/overlay/use-overlay-floating.d.ts +9 -2
  275. package/dist/types/styling/create-theme.d.ts +24 -0
  276. package/dist/types/styling/css.d.ts +1 -1
  277. package/dist/types/styling/overlay-motion.d.ts +95 -0
  278. package/dist/types/styling/surface.d.ts +7 -0
  279. package/dist/types/styling/theme-scope.d.ts +29 -3
  280. package/dist/types/styling/theme.d.ts +5 -0
  281. package/dist/{usage-meter-qyQ3rYVv.js → usage-meter-CYvlB6l3.js} +165 -175
  282. package/dist/usage-meter.js +1 -1
  283. package/dist/usage-model-C0fS47w4.js +32 -0
  284. package/dist/use-native-dialog-FB0p7lkg.js +93 -0
  285. package/dist/{use-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
  286. package/dist/use-scroll-lock-40gXwwAy.js +23 -0
  287. package/dist/user-menu-DzELTg1x.js +757 -0
  288. package/dist/user-menu.js +2 -0
  289. package/dist/{visually-hidden-BJdvqqvn.js → visually-hidden-DgVO3NaB.js} +1 -1
  290. package/package.json +88 -2
  291. package/dist/accordion-xCI_u0BV.js +0 -198
  292. package/dist/avatar-BahDVO9t.js +0 -132
  293. package/dist/badge-B_sLygxU.js +0 -108
  294. package/dist/calendar-B3Svu0X2.js +0 -447
  295. package/dist/card-D-aI2QHx.js +0 -158
  296. package/dist/carousel-IvPqN-oM.js +0 -472
  297. package/dist/command-palette-BQ5LleGb.js +0 -384
  298. package/dist/date-range-picker-B5uFWsm-.js +0 -562
  299. package/dist/dialog-ciiv9H2b.js +0 -218
  300. package/dist/drawer-DsASTiP-.js +0 -553
  301. package/dist/file-dropzone-pR4v7owg.js +0 -457
  302. package/dist/mention-input-BcQKX2EJ.js +0 -599
  303. package/dist/menu-xwOOUtWP.js +0 -275
  304. package/dist/pill-DO2gHzMb.js +0 -56
  305. package/dist/popover-QHcEvf9c.js +0 -119
  306. package/dist/signature-pad-q2SAsrdD.js +0 -640
  307. package/dist/slider-t0B5cecO.js +0 -477
  308. package/dist/switch-qwv8jQnR.js +0 -142
  309. package/dist/sx-Dx9JUKp5.js +0 -23
  310. package/dist/tabs-CAVJndX1.js +0 -203
  311. package/dist/theme-root-BbTBuLMQ.js +0 -46
  312. package/dist/theme-scope-t7nAKc2c.js +0 -27
  313. package/dist/tooltip-CkeiW9C1.js +0 -113
  314. package/dist/use-native-dialog-DWpIUVO1.js +0 -84
@@ -1,27 +1,29 @@
1
1
  'use client';
2
- import { r as e, t } from "./sx-Dx9JUKp5.js";
3
- import { n } from "./focus-ring-BK5W5_NY.js";
4
- import { n as r, r as i } from "./media-8yrN85VT.js";
2
+ import { i as e } from "./css-BYJhdGh-.js";
3
+ import { n as t } from "./focus-ring-BK5W5_NY.js";
4
+ import { n, r } from "./media-8yrN85VT.js";
5
+ import { t as i } from "./sx-BJXJ2xJK.js";
5
6
  import { t as a } from "./use-controlled-state-DpeVQZNR.js";
6
- import { t as o } from "./visually-hidden-BJdvqqvn.js";
7
+ import { t as o } from "./visually-hidden-DgVO3NaB.js";
7
8
  import { t as s } from "./renderable-DzcIj1Lo.js";
8
- import { n as c, t as l } from "./surface-DZ4d-2aL.js";
9
- import { t as u } from "./trigger-style-B1KVC8O1.js";
10
- import { n as d, r as f } from "./overlay-layer-SeUyyEPD.js";
11
- import { i as p, r as m, t as h } from "./use-native-dialog-DWpIUVO1.js";
12
- import { createContext as g, useCallback as _, useContext as v, useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
13
- import { vars as w } from "@jfrader/tokens/vars";
14
- import { jsx as T, jsxs as E } from "@emotion/react/jsx-runtime";
15
- import { useFloating as D, useFloatingTree as O, useInteractions as k, useMergeRefs as A } from "@floating-ui/react";
16
- import { getDeepestNode as j } from "@floating-ui/react/utils";
17
- import { MotionConfig as M, animate as N, useMotionValue as P, useReducedMotion as F } from "motion/react";
9
+ import { n as c, t as l } from "./surface-C69kwSuk.js";
10
+ import { t as u } from "./trigger-style-CtOrdPk4.js";
11
+ import { a as d, i as f } from "./overlay-layer-qEbpEtb8.js";
12
+ import { i as p, r as m, t as h } from "./use-native-dialog-FB0p7lkg.js";
13
+ import { t as g } from "./presence-spring-4zwtUDQN.js";
14
+ import { createContext as _, useCallback as v, useContext as y, useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
15
+ import { vars as T } from "@jfrader/tokens/vars";
16
+ import { jsx as E, jsxs as D } from "@emotion/react/jsx-runtime";
17
+ import { MotionConfig as O, animate as k, useMotionValue as A, useReducedMotion as j } from "motion/react";
18
+ import { useFloating as M, useFloatingTree as N, useInteractions as P, useMergeRefs as F } from "@floating-ui/react";
19
+ import { getDeepestNode as I } from "@floating-ui/react/utils";
18
20
  //#region src/components/bottom-sheet/bottom-sheet.tsx
19
- var I = [.45, .92], L = "36rem", R = {
21
+ var ee = [.45, .92], L = "36rem", R = {
20
22
  type: "spring",
21
23
  stiffness: 400,
22
24
  damping: 40,
23
25
  mass: 1
24
- }, z = .2, ee = 320, B = 80, V = 120, H = 8, U = [
26
+ }, z = .2, B = 320, V = 80, H = 120, U = 8, te = [
25
27
  "button:not([data-ui=\"bottom-sheet-handle\"])",
26
28
  "a[href]",
27
29
  "input",
@@ -31,7 +33,7 @@ var I = [.45, .92], L = "36rem", R = {
31
33
  "[contenteditable]:not([contenteditable=\"false\"])",
32
34
  "[data-ui=\"bottom-sheet-title\"]",
33
35
  "[data-ui=\"bottom-sheet-description\"]"
34
- ].join(", "), te = "button, a[href], input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])", ne = e({
36
+ ].join(", "), ne = "button, a[href], input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])", re = e({
35
37
  ...l,
36
38
  position: "fixed",
37
39
  inset: 0,
@@ -40,15 +42,15 @@ var I = [.45, .92], L = "36rem", R = {
40
42
  blockSize: "100dvh",
41
43
  maxInlineSize: "none",
42
44
  maxBlockSize: "none",
43
- overflow: "hidden",
45
+ overflow: "clip",
44
46
  "&::backdrop": { backgroundColor: "transparent" }
45
- }), re = e({
47
+ }), ie = e({
46
48
  position: "absolute",
47
49
  inset: 0,
48
- backgroundColor: w.color.scrim,
50
+ backgroundColor: T.color.scrim,
49
51
  pointerEvents: "none",
50
52
  opacity: "var(--sheet-scrim, 1)"
51
- }), ie = e({
53
+ }), ae = e({
52
54
  ...c,
53
55
  position: "absolute",
54
56
  insetBlockStart: 0,
@@ -60,22 +62,23 @@ var I = [.45, .92], L = "36rem", R = {
60
62
  display: "flex",
61
63
  flexDirection: "column",
62
64
  minBlockSize: 0,
63
- borderStartStartRadius: w.radius.lg,
64
- borderStartEndRadius: w.radius.lg,
65
- boxShadow: w.shadow.floating,
65
+ borderStartStartRadius: T.radius.lg,
66
+ borderStartEndRadius: T.radius.lg,
67
+ boxShadow: T.shadow.floating,
66
68
  paddingBlockEnd: "env(safe-area-inset-bottom, 0px)",
67
- "&:focus-visible": n,
68
- [r]: {
69
+ "&:focus-visible": t,
70
+ [n]: {
69
71
  boxShadow: "none",
70
72
  borderColor: "CanvasText"
71
73
  }
72
- }), ae = e({
74
+ }), oe = e({
73
75
  flexShrink: 0,
74
76
  display: "grid",
75
77
  gridTemplateColumns: "minmax(0, 1fr) auto",
76
- gap: w.space[2],
77
- paddingInline: w.space[6],
78
- paddingBlock: w.space[2],
78
+ gap: T.space[2],
79
+ paddingInline: T.space[6],
80
+ paddingBlock: T.space[2],
81
+ "&[data-dragging]": { userSelect: "none" },
79
82
  "& > [data-ui=\"bottom-sheet-handle\"]": {
80
83
  gridColumn: "1 / -1",
81
84
  justifySelf: "center",
@@ -85,158 +88,158 @@ var I = [.45, .92], L = "36rem", R = {
85
88
  gridColumn: 2,
86
89
  gridRow: 2
87
90
  }
88
- }), oe = e({
91
+ }), se = e({
89
92
  flex: "1 1 auto",
90
93
  minBlockSize: 0,
91
94
  overflow: "auto",
92
95
  overscrollBehavior: "contain",
93
- paddingInline: w.space[6],
94
- paddingBlock: w.space[4],
95
- fontSize: w.textSize.sm,
96
- "&:focus-visible": n
97
- }), se = e({
96
+ paddingInline: T.space[6],
97
+ paddingBlock: T.space[4],
98
+ fontSize: T.textSize.sm,
99
+ "&:focus-visible": t
100
+ }), ce = e({
98
101
  flexShrink: 0,
99
102
  display: "flex",
100
103
  flexWrap: "wrap",
101
- gap: w.space[2],
102
- paddingInline: w.space[6],
103
- paddingBlock: w.space[4],
104
- borderBlockStart: `1px solid ${w.color.border}`
105
- }), ce = e({
106
- margin: 0,
107
- fontSize: w.textSize.lg,
108
- lineHeight: w.lineHeight.tight,
109
- fontWeight: w.fontWeight.semibold
104
+ gap: T.space[2],
105
+ paddingInline: T.space[6],
106
+ paddingBlock: T.space[4],
107
+ borderBlockStart: `1px solid ${T.color.border}`
110
108
  }), le = e({
111
109
  margin: 0,
112
- color: w.color.textMuted,
113
- fontSize: w.textSize.sm
110
+ fontSize: T.textSize.lg,
111
+ lineHeight: T.lineHeight.tight,
112
+ fontWeight: T.fontWeight.semibold
113
+ }), ue = e({
114
+ margin: 0,
115
+ color: T.color.textMuted,
116
+ fontSize: T.textSize.sm
114
117
  }), W = e({
115
118
  appearance: "none",
116
- minInlineSize: w.space[8],
117
- minBlockSize: w.space[8],
119
+ minInlineSize: T.space[8],
120
+ minBlockSize: T.space[8],
118
121
  display: "inline-flex",
119
122
  alignItems: "center",
120
123
  justifyContent: "center",
121
- paddingInline: w.space[3],
122
- paddingBlock: w.space[1],
124
+ paddingInline: T.space[3],
125
+ paddingBlock: T.space[1],
123
126
  border: "1px solid transparent",
124
- borderRadius: w.radius.md,
125
- color: w.color.textMuted,
127
+ borderRadius: T.radius.md,
128
+ color: T.color.textMuted,
126
129
  backgroundColor: "transparent",
127
130
  font: "inherit",
128
131
  cursor: "pointer",
129
- "&:focus-visible": n,
132
+ "&:focus-visible": t,
130
133
  "&:disabled": { cursor: "not-allowed" },
131
- [r]: { borderColor: "ButtonText" },
132
- [i]: { transition: "none" }
133
- }), ue = e({
134
+ [n]: { borderColor: "ButtonText" },
135
+ [r]: { transition: "none" }
136
+ }), de = e({
134
137
  "&::after": {
135
138
  content: "\"\"",
136
- inlineSize: w.space[10],
137
- blockSize: w.space[1],
138
- borderRadius: w.radius.full,
139
- backgroundColor: w.color.borderControl
139
+ inlineSize: T.space[10],
140
+ blockSize: T.space[1],
141
+ borderRadius: T.radius.full,
142
+ backgroundColor: T.color.borderControl
140
143
  },
141
- [r]: { "&::after": {
144
+ [n]: { "&::after": {
142
145
  backgroundColor: "ButtonText",
143
146
  outline: "1px solid ButtonText"
144
147
  } }
145
- }), G = o, K = g(null), q = g(null);
148
+ }), G = o, K = _(null), q = _(null);
146
149
  function J(e) {
147
- let t = v(K);
150
+ let t = y(K);
148
151
  if (!t) throw Error(`BottomSheet.${e} must be rendered inside <BottomSheet>.`);
149
152
  return t;
150
153
  }
151
- function de(e) {
154
+ function fe(e) {
152
155
  if (!e.length || e.some((t, n) => !Number.isFinite(t) || t <= 0 || t > 1 || n > 0 && t <= e[n - 1])) throw Error("BottomSheet.detents must be nonempty, finite, strictly ascending unique fractions in (0, 1].");
153
156
  }
154
- function fe({ nodeId: e, open: t, defaultOpen: n = !1, onOpenChange: r, detents: i = I, value: o, defaultValue: s = 0, onValueChange: c, locale: l, getValueText: u, children: d }) {
155
- de(i);
156
- let m = S([...i]);
157
+ function pe({ nodeId: e, open: t, defaultOpen: n = !1, onOpenChange: r, detents: i = ee, value: o, defaultValue: s = 0, onValueChange: c, locale: l, getValueText: u, children: f }) {
158
+ fe(i);
159
+ let m = C([...i]);
157
160
  if (i.length !== m.current.length || i.some((e, t) => e !== m.current[t])) throw Error("BottomSheet.detents numeric contents require remount to change.");
158
161
  let [h = 0, g] = a(o, s, c);
159
162
  if (!Number.isInteger(h) || h < 0 || h >= i.length || !Number.isInteger(s) || s < 0 || s >= i.length) throw Error("BottomSheet value/defaultValue must be valid detent indices.");
160
- let [v = !1, w] = a(t, n, r), E = p(v, w), [O, A] = C(null), [j, M] = C(!1), N = _((e) => {
161
- E.setDialogElement(e), A(e);
162
- }, [E.setDialogElement]);
163
- y(() => {
164
- let e = () => M(O?.open ?? !1);
165
- if (e(), !O) return;
166
- let t = O.ownerDocument.defaultView?.MutationObserver;
163
+ let [_ = !1, y] = a(t, n, r), T = p(_, y), [D, O] = w(null), [k, A] = w(!1), j = v((e) => {
164
+ T.setDialogElement(e), O(e);
165
+ }, [T.setDialogElement]);
166
+ b(() => {
167
+ let e = () => A(D?.open ?? !1);
168
+ if (e(), !D) return;
169
+ let t = D.ownerDocument.defaultView?.MutationObserver;
167
170
  if (!t) return;
168
171
  let n = new t(e);
169
- return n.observe(O, {
172
+ return n.observe(D, {
170
173
  attributes: !0,
171
174
  attributeFilter: ["open"]
172
175
  }), () => n.disconnect();
173
- }, [O]);
174
- let P = D({
176
+ }, [D]);
177
+ let N = M({
175
178
  nodeId: e,
176
- open: v && j,
177
- onOpenChange: (e) => e ? E.setOpen(!0) : E.requestClose()
178
- }), F = f(P.context, "container"), L = k(F), R = b(), [z, ee] = C(!1), [B, V] = C(!1), H = x(() => {
179
+ open: _ && k,
180
+ onOpenChange: (e) => e ? T.setOpen(!0) : T.requestClose()
181
+ }), F = d(N.context, "container"), I = P(F), L = x(), [R, z] = w(!1), [B, V] = w(!1), H = S(() => {
179
182
  let e = m.current[h];
180
183
  return u?.(e, h) ?? new Intl.NumberFormat(l, { style: "percent" }).format(e);
181
184
  }, [
182
185
  u,
183
186
  l,
184
187
  h
185
- ]), U = x(() => ({
186
- ...E,
187
- setDialogElement: N,
188
- open: v,
188
+ ]), U = S(() => ({
189
+ ...T,
190
+ setDialogElement: j,
191
+ open: _,
189
192
  detents: m.current,
190
193
  value: h,
191
194
  requestValue: g,
192
195
  valueText: H,
193
- panelId: `${R}-panel`,
194
- valueTextId: `${R}-value`,
195
- titleId: `${R}-title`,
196
- descriptionId: `${R}-description`,
197
- hasTitle: z,
196
+ panelId: `${L}-panel`,
197
+ valueTextId: `${L}-value`,
198
+ titleId: `${L}-title`,
199
+ descriptionId: `${L}-description`,
200
+ hasTitle: R,
198
201
  hasDescription: B,
199
- setHasTitle: ee,
202
+ setHasTitle: z,
200
203
  setHasDescription: V,
201
- floating: P,
202
- interactions: L
204
+ floating: N,
205
+ interactions: I
203
206
  }), [
204
- E.setOpen,
205
- E.requestClose,
206
- E.repairToken,
207
- N,
208
- v,
207
+ T.setOpen,
208
+ T.requestClose,
209
+ T.repairToken,
210
+ j,
211
+ _,
209
212
  h,
210
213
  g,
211
214
  H,
215
+ L,
212
216
  R,
213
- z,
214
217
  B,
215
- P,
216
- L
218
+ N,
219
+ I
217
220
  ]);
218
- return /* @__PURE__ */ T(K.Provider, {
221
+ return /* @__PURE__ */ E(K.Provider, {
219
222
  value: U,
220
- children: d
223
+ children: f
221
224
  });
222
225
  }
223
226
  function Y(e) {
224
- return /* @__PURE__ */ T(M, {
227
+ return /* @__PURE__ */ E(O, {
225
228
  reducedMotion: "user",
226
- children: /* @__PURE__ */ T(d, { children: (t) => /* @__PURE__ */ T(fe, {
229
+ children: /* @__PURE__ */ E(f, { children: (t) => /* @__PURE__ */ E(pe, {
227
230
  ...e,
228
231
  nodeId: t
229
232
  }) })
230
233
  });
231
234
  }
232
235
  Y.displayName = "BottomSheet";
233
- function X({ ref: e, onClick: n, className: r, sx: i, ...a }) {
234
- let o = J("Trigger"), s = A([e, o.floating.refs.setReference]);
235
- return /* @__PURE__ */ T(t, {
236
- className: r,
236
+ function X({ ref: e, onClick: t, className: n, sx: r, ...a }) {
237
+ let o = J("Trigger"), s = F([e, o.floating.refs.setReference]);
238
+ return /* @__PURE__ */ E(i, {
239
+ className: n,
237
240
  styles: u,
238
- sx: i,
239
- children: (e) => /* @__PURE__ */ T("button", {
241
+ sx: r,
242
+ children: (e) => /* @__PURE__ */ E("button", {
240
243
  type: "button",
241
244
  ...a,
242
245
  ref: s,
@@ -245,14 +248,14 @@ function X({ ref: e, onClick: n, className: r, sx: i, ...a }) {
245
248
  "aria-expanded": o.open,
246
249
  className: e,
247
250
  onClick: (e) => {
248
- n?.(e), e.defaultPrevented || o.setOpen(!0);
251
+ t?.(e), e.defaultPrevented || o.setOpen(!0);
249
252
  }
250
253
  })
251
254
  });
252
255
  }
253
256
  X.displayName = "BottomSheet.Trigger";
254
- function pe(e, t) {
255
- let n = S(null), r = S(null), i = P(0), a = S(0), o = S(0), s = S(null), c = S(null), l = S(!1), u = F(), d = S({
257
+ function me(e, t) {
258
+ let n = C(null), r = C(null), i = A(0), a = C(0), o = C(0), s = C(null), c = C(null), l = C(!1), u = j(), d = C({
256
259
  context: e,
257
260
  reduced: u
258
261
  });
@@ -260,47 +263,59 @@ function pe(e, t) {
260
263
  context: e,
261
264
  reduced: u
262
265
  };
263
- let f = () => a.current * (1 - d.current.context.detents[d.current.context.value]), p = _(() => {
264
- s.current?.stop(), d.current.reduced ? i.set(f()) : s.current = N(i, f(), R);
265
- }, [i]), m = _(() => {
266
+ let f = C(!1), p = () => a.current * (1 - d.current.context.detents[d.current.context.value]), m = () => t.current?.open ? p() : a.current, h = v((e = R) => {
267
+ f.current || (s.current?.stop(), d.current.reduced || !t.current?.open ? i.set(m()) : s.current = k(i, p(), e));
268
+ }, [i, t]), _ = v(() => {
266
269
  let e = c.current;
267
- return e ? (c.current = null, e.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.current = !0, p(), !0) : !1;
268
- }, [p]);
269
- y(() => {
270
+ return e ? (c.current = null, e.capture?.removeAttribute("data-dragging"), e.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.current = !0, h(), !0) : !1;
271
+ }, [h]);
272
+ b(() => {
270
273
  let e = t.current, r = n.current, l = e?.ownerDocument.defaultView;
271
274
  if (!e || !r || !l) return;
272
275
  let u = (t) => {
273
276
  r.style.transform = `translateY(${t}px)`, r.style.setProperty("--sheet-height", `${Math.max(0, a.current - t) + o.current}px`), e.style.setProperty("--sheet-scrim", String(Math.min(1, Math.max(0, (a.current - t) / Math.max(1, a.current)))));
274
277
  }, d = () => {
275
278
  let t = l.visualViewport;
276
- m();
279
+ _();
277
280
  let n = t?.height ?? l.innerHeight;
278
- o.current = Number.parseFloat(l.getComputedStyle(r).paddingBottom) || 0, a.current = Math.max(1, n - o.current), e.style.blockSize = `${n}px`, e.style.insetBlockStart = `${t?.offsetTop ?? 0}px`, s.current?.stop(), c.current = null, i.set(f()), u(i.get());
281
+ o.current = Number.parseFloat(l.getComputedStyle(r).paddingBottom) || 0, a.current = Math.max(1, n - o.current), e.style.blockSize = `${n}px`, e.style.insetBlockStart = `${t?.offsetTop ?? 0}px`, f.current || (s.current?.stop(), c.current = null, i.set(m())), u(i.get());
279
282
  };
280
283
  d();
281
284
  let p = i.on("change", u), h = (e) => {
282
- c.current && c.current.id !== e.pointerId && m();
285
+ c.current && c.current.id !== e.pointerId && _();
283
286
  };
284
287
  return l.addEventListener("pointerdown", h, !0), l.addEventListener("resize", d), l.visualViewport?.addEventListener("resize", d), l.visualViewport?.addEventListener("scroll", d), () => {
285
288
  p(), s.current?.stop();
286
289
  let e = c.current;
287
- c.current = null, e?.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.removeEventListener("pointerdown", h, !0), l.removeEventListener("resize", d), l.visualViewport?.removeEventListener("resize", d), l.visualViewport?.removeEventListener("scroll", d);
290
+ c.current = null, e?.capture?.removeAttribute("data-dragging"), e?.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.removeEventListener("pointerdown", h, !0), l.removeEventListener("resize", d), l.visualViewport?.removeEventListener("resize", d), l.visualViewport?.removeEventListener("scroll", d);
288
291
  };
289
292
  }, [
290
293
  t,
291
294
  i,
292
- m
293
- ]), y(() => {
294
- m(), p();
295
+ _
296
+ ]), b(() => {
297
+ _(), h();
295
298
  }, [
296
299
  e.value,
297
- e.open,
298
- p,
300
+ h,
299
301
  u,
300
- m
302
+ _
301
303
  ]);
302
- let h = (e, t, n, r = null) => {
303
- s.current?.stop(), l.current = !1, c.current = {
304
+ let y = S(() => ({
305
+ enter: () => {
306
+ f.current = !1, h(g);
307
+ },
308
+ exit: () => {
309
+ if (_(), !d.current.reduced) return f.current = !0, s.current?.stop(), s.current = k(i, a.current, g), s.current.finished;
310
+ }
311
+ }), [
312
+ h,
313
+ _,
314
+ i
315
+ ]), x = v(() => {
316
+ f.current = !1, s.current?.stop(), s.current = null, i.set(a.current);
317
+ }, [i]), w = (e, t, n, r = null) => {
318
+ f.current || (s.current?.stop(), l.current = !1, r?.setAttribute("data-dragging", ""), c.current = {
304
319
  id: e,
305
320
  start: t,
306
321
  origin: i.get(),
@@ -310,35 +325,35 @@ function pe(e, t) {
310
325
  }],
311
326
  moved: !1,
312
327
  capture: r
313
- };
314
- }, g = (e, t) => {
328
+ });
329
+ }, T = (e, t) => {
315
330
  let n = c.current;
316
331
  if (!n) return;
317
332
  let r = e - n.start;
318
- n.moved ||= Math.abs(r) > H;
333
+ n.moved ||= Math.abs(r) > U;
319
334
  let o = n.origin + r, s = a.current * (1 - d.current.context.detents.at(-1)), l = s - o;
320
- i.set(o < s ? d.current.reduced ? s : s - V * l / (V + l) : o), n.samples = [...n.samples, {
335
+ i.set(o < s ? d.current.reduced ? s : s - H * l / (H + l) : o), n.samples = [...n.samples, {
321
336
  position: e,
322
337
  time: t
323
- }].filter((e) => t - e.time <= B);
324
- }, v = (e, t) => {
338
+ }].filter((e) => t - e.time <= V);
339
+ }, E = (e, t) => {
325
340
  let n = c.current;
326
341
  if (!n) return;
327
- c.current = null, l.current = n.moved;
342
+ c.current = null, n.capture?.removeAttribute("data-dragging"), l.current = n.moved;
328
343
  let r = [...n.samples, {
329
344
  position: e,
330
345
  time: t
331
- }].filter((e) => t - e.time <= B)[0], o = r ? (t - r.time) / 1e3 : 0, s = r && o > 0 ? (e - r.position) / o : 0, u = i.get() + s * z, { detents: f, requestClose: m, requestValue: h } = d.current.context, g = a.current * f[0], _ = a.current - g / 2;
332
- n.moved && (u > _ || s >= ee && i.get() > a.current * (1 - f[0])) ? m() : n.moved && h(f.reduce((e, t, n) => Math.abs(a.current * (1 - t) - u) < Math.abs(a.current * (1 - f[e]) - u) ? n : e, 0)), p();
346
+ }].filter((e) => t - e.time <= V)[0], o = r ? (t - r.time) / 1e3 : 0, s = r && o > 0 ? (e - r.position) / o : 0, u = i.get() + s * z, { detents: f, requestClose: p, requestValue: m } = d.current.context, g = a.current * f[0], _ = a.current - g / 2;
347
+ n.moved && (u > _ || s >= B && i.get() > a.current * (1 - f[0])) ? p() : n.moved && m(f.reduce((e, t, n) => Math.abs(a.current * (1 - t) - u) < Math.abs(a.current * (1 - f[e]) - u) ? n : e, 0)), h();
333
348
  };
334
- return y(() => {
349
+ return b(() => {
335
350
  let e = r.current, t = e?.ownerDocument.defaultView;
336
351
  if (!e || !t) return;
337
352
  let n = null, i = !1, a = () => {
338
353
  e.removeEventListener("touchmove", o), i = !1;
339
354
  }, o = (t) => {
340
355
  if (!n || t.touches.length !== 1) {
341
- m(), a();
356
+ _(), a();
342
357
  return;
343
358
  }
344
359
  let r = t.touches[0], i = r.clientX - n.x, o = r.clientY - n.y;
@@ -346,20 +361,20 @@ function pe(e, t) {
346
361
  a(), n = null;
347
362
  return;
348
363
  }
349
- if (Math.abs(o) < H) return;
364
+ if (Math.abs(o) < U) return;
350
365
  if (c.current) {
351
- t.cancelable && t.preventDefault(), g(r.clientY, t.timeStamp);
366
+ t.cancelable && t.preventDefault(), T(r.clientY, t.timeStamp);
352
367
  return;
353
368
  }
354
369
  let s = d.current.context;
355
- s.value < s.detents.length - 1 ? (s.requestValue(s.detents.length - 1), a()) : o > 0 && e.scrollTop <= 0 && (h(n.id, n.y, t.timeStamp), t.cancelable && t.preventDefault(), g(r.clientY, t.timeStamp));
370
+ s.value < s.detents.length - 1 ? (s.requestValue(s.detents.length - 1), a()) : o > 0 && e.scrollTop <= 0 && (w(n.id, n.y, t.timeStamp), t.cancelable && t.preventDefault(), T(r.clientY, t.timeStamp));
356
371
  }, s = (r) => {
357
372
  if (a(), r.touches.length !== 1) {
358
- m();
373
+ _();
359
374
  return;
360
375
  }
361
376
  let s = r.target;
362
- if (s.closest(te) || t.getSelection()?.toString()) return;
377
+ if (s.closest(ne) || t.getSelection()?.toString()) return;
363
378
  for (let n = s; n && n !== e; n = n.parentElement) {
364
379
  let e = t.getComputedStyle(n);
365
380
  if (n.scrollWidth > n.clientWidth && /auto|scroll/.test(e.overflowX) || n.scrollHeight > n.clientHeight && /auto|scroll/.test(e.overflowY)) return;
@@ -373,98 +388,102 @@ function pe(e, t) {
373
388
  }, e.addEventListener("touchmove", o, { passive: !1 }), i = !0;
374
389
  }, l = (e) => {
375
390
  let t = e.changedTouches[0];
376
- c.current && t && v(t.clientY, e.timeStamp), a(), n = null;
391
+ c.current && t && E(t.clientY, e.timeStamp), a(), n = null;
377
392
  }, u = () => {
378
- m(), a(), n = null;
393
+ _(), a(), n = null;
379
394
  };
380
395
  return e.addEventListener("touchstart", s, { passive: !0 }), e.addEventListener("touchend", l), e.addEventListener("touchcancel", u), () => {
381
396
  i && a(), e.removeEventListener("touchstart", s), e.removeEventListener("touchend", l), e.removeEventListener("touchcancel", u);
382
397
  };
383
- }, [m]), {
398
+ }, [_]), {
384
399
  panelRef: n,
385
400
  bodyRef: r,
386
401
  gesture: {
387
402
  onPointerDown: (e) => {
388
- c.current || !e.isPrimary ? m() : e.button !== 0 || e.defaultPrevented || e.target.closest(U) || (h(e.pointerId, e.clientY, e.timeStamp, e.currentTarget), e.currentTarget.setPointerCapture?.(e.pointerId));
403
+ c.current || !e.isPrimary ? _() : e.button !== 0 || e.defaultPrevented || e.target.closest(te) || (w(e.pointerId, e.clientY, e.timeStamp, e.currentTarget), e.currentTarget.setPointerCapture?.(e.pointerId));
389
404
  },
390
405
  onPointerMove: (e) => {
391
- c.current?.id === e.pointerId && g(e.clientY, e.timeStamp);
406
+ c.current?.id === e.pointerId && T(e.clientY, e.timeStamp);
392
407
  },
393
408
  onPointerUp: (e) => {
394
- c.current?.id === e.pointerId && (v(e.clientY, e.timeStamp), e.currentTarget.hasPointerCapture?.(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
409
+ c.current?.id === e.pointerId && (E(e.clientY, e.timeStamp), e.currentTarget.hasPointerCapture?.(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
395
410
  },
396
411
  onPointerCancel: (e) => {
397
- c.current?.id === e.pointerId && m();
412
+ c.current?.id === e.pointerId && _();
398
413
  },
399
414
  onLostPointerCapture: (e) => {
400
- c.current?.id === e.pointerId && m();
415
+ c.current?.id === e.pointerId && _();
401
416
  }
402
417
  },
403
- cancelDrag: m,
404
- suppressClick: l
418
+ cancelDrag: _,
419
+ suppressClick: l,
420
+ transition: y,
421
+ reset: x
405
422
  };
406
423
  }
407
- function Z({ ref: e, sx: n, className: r, ...i }) {
408
- let { children: a, withDescription: o = !0, onCancel: s, onClose: c, onClick: l, onKeyDownCapture: u, onPointerDownCapture: d, "aria-labelledby": f, "aria-describedby": p, ...g } = h(i), _ = J("Content"), v = S(null), b = pe(_, v), x = O(), w = S(!1), D = m(_, {
424
+ function Z({ ref: e, sx: t, className: n, ...r }) {
425
+ let { children: a, withDescription: o = !0, onCancel: s, onClose: c, onClick: l, onKeyDownCapture: u, onPointerDownCapture: d, "aria-labelledby": f, "aria-describedby": p, ...g } = h(r), _ = J("Content"), v = C(null), y = me(_, v), x = N(), S = C(!1), T = m(_, {
409
426
  onCancel: s,
410
427
  onClick: (e) => {
411
- l?.(e), w.current && (w.current = !1, e.preventDefault());
428
+ l?.(e), S.current && (S.current = !1, e.preventDefault());
412
429
  },
413
- onClose: c
414
- }, e, v), k = A([D.ref, _.floating.refs.setFloating]), M = S(_.value), [N, P] = C("");
415
- y(() => {
416
- M.current !== _.value && (M.current = _.value, P(_.valueText));
430
+ onClose: (e) => {
431
+ y.reset(), c?.(e);
432
+ }
433
+ }, e, v, y.transition), O = F([T.ref, _.floating.refs.setFloating]), k = C(_.value), [A, j] = w("");
434
+ b(() => {
435
+ k.current !== _.value && (k.current = _.value, j(_.valueText));
417
436
  }, [_.value, _.valueText]);
418
- let F = {
437
+ let M = {
419
438
  ...g,
420
- ...D,
439
+ ...T,
421
440
  onCancel: (e) => {
422
- e.target === v.current ? D.onCancel(e) : s?.(e);
441
+ e.target === v.current ? T.onCancel(e) : s?.(e);
423
442
  },
424
443
  onClose: (e) => {
425
- e.target === v.current ? D.onClose(e) : c?.(e);
444
+ e.target === v.current ? T.onClose(e) : c?.(e);
426
445
  },
427
446
  onPointerDownCapture: (e) => {
428
447
  d?.(e);
429
- let t = x && j(x.nodesRef.current, _.floating.context.nodeId);
430
- w.current = !!(t && t.id !== _.floating.context.nodeId);
448
+ let t = x && I(x.nodesRef.current, _.floating.context.nodeId);
449
+ S.current = !!(t && t.id !== _.floating.context.nodeId);
431
450
  },
432
451
  onKeyDownCapture: (e) => {
433
452
  if (u?.(e), e.key !== "Escape" || e.defaultPrevented || e.nativeEvent.isComposing) return;
434
453
  e.preventDefault();
435
- let t = x && j(x.nodesRef.current, _.floating.context.nodeId);
436
- (!t || t.id === _.floating.context.nodeId) && b.cancelDrag() && e.stopPropagation();
454
+ let t = x && I(x.nodesRef.current, _.floating.context.nodeId);
455
+ (!t || t.id === _.floating.context.nodeId) && y.cancelDrag() && e.stopPropagation();
437
456
  }
438
- }, I = _.interactions.getFloatingProps(F);
439
- return /* @__PURE__ */ T(t, {
440
- className: r,
441
- styles: ne,
442
- sx: n,
443
- children: (e) => /* @__PURE__ */ E("dialog", {
444
- ...I,
445
- ref: k,
457
+ }, P = _.interactions.getFloatingProps(M);
458
+ return /* @__PURE__ */ E(i, {
459
+ className: n,
460
+ styles: re,
461
+ sx: t,
462
+ children: (e) => /* @__PURE__ */ D("dialog", {
463
+ ...P,
464
+ ref: O,
446
465
  className: e,
447
466
  "data-ui": "bottom-sheet",
448
467
  "aria-modal": "true",
449
468
  "aria-labelledby": [f, _.hasTitle && _.titleId].filter(Boolean).join(" ") || void 0,
450
469
  "aria-describedby": [p, o && _.hasDescription && _.descriptionId].filter(Boolean).join(" ") || void 0,
451
470
  children: [
452
- /* @__PURE__ */ T("div", {
453
- css: re,
471
+ /* @__PURE__ */ E("div", {
472
+ css: ie,
454
473
  "aria-hidden": "true"
455
474
  }),
456
- /* @__PURE__ */ T(q.Provider, {
457
- value: b,
475
+ /* @__PURE__ */ E(q.Provider, {
476
+ value: y,
458
477
  children: a
459
478
  }),
460
- /* @__PURE__ */ T("span", {
479
+ /* @__PURE__ */ E("span", {
461
480
  css: G,
462
481
  role: "status",
463
482
  "aria-live": "polite",
464
483
  "aria-atomic": "true",
465
- children: N
484
+ children: A
466
485
  }),
467
- /* @__PURE__ */ T("span", {
486
+ /* @__PURE__ */ E("span", {
468
487
  css: G,
469
488
  id: _.valueTextId,
470
489
  children: _.valueText
@@ -474,19 +493,19 @@ function Z({ ref: e, sx: n, className: r, ...i }) {
474
493
  });
475
494
  }
476
495
  Z.displayName = "BottomSheet.Content";
477
- function Q({ ref: e, sx: n, className: r, autoFocus: i = !0, ...a }) {
478
- let o = J("Panel"), s = v(q), c = _((e) => {
479
- i && e && !e.querySelector("[autofocus]") && e.setAttribute("autofocus", "");
480
- }, [i]), l = A([
496
+ function Q({ ref: e, sx: t, className: n, autoFocus: r = !0, ...a }) {
497
+ let o = J("Panel"), s = y(q), c = v((e) => {
498
+ r && e && !e.querySelector("[autofocus]") && e.setAttribute("autofocus", "");
499
+ }, [r]), l = F([
481
500
  e,
482
501
  s?.panelRef,
483
502
  c
484
503
  ]);
485
- return /* @__PURE__ */ T(t, {
486
- className: r,
487
- styles: ie,
488
- sx: n,
489
- children: (e) => /* @__PURE__ */ T("div", {
504
+ return /* @__PURE__ */ E(i, {
505
+ className: n,
506
+ styles: ae,
507
+ sx: t,
508
+ children: (e) => /* @__PURE__ */ E("div", {
490
509
  tabIndex: -1,
491
510
  ...a,
492
511
  ref: l,
@@ -497,17 +516,17 @@ function Q({ ref: e, sx: n, className: r, autoFocus: i = !0, ...a }) {
497
516
  });
498
517
  }
499
518
  Q.displayName = "BottomSheet.Panel";
500
- function $({ ref: e, sx: n, className: r, ...i }) {
519
+ function $({ ref: e, sx: t, className: n, ...r }) {
501
520
  J("Header");
502
- let a = v(q), o = Object.fromEntries(Object.entries(a?.gesture ?? {}).map(([e, t]) => [e, (n) => {
503
- i[e]?.(n), n.defaultPrevented || t?.(n);
521
+ let a = y(q), o = Object.fromEntries(Object.entries(a?.gesture ?? {}).map(([e, t]) => [e, (n) => {
522
+ r[e]?.(n), n.defaultPrevented || t?.(n);
504
523
  }]));
505
- return /* @__PURE__ */ T(t, {
506
- className: r,
507
- styles: ae,
508
- sx: n,
509
- children: (t) => /* @__PURE__ */ T("div", {
510
- ...i,
524
+ return /* @__PURE__ */ E(i, {
525
+ className: n,
526
+ styles: oe,
527
+ sx: t,
528
+ children: (t) => /* @__PURE__ */ E("div", {
529
+ ...r,
511
530
  ...o,
512
531
  ref: e,
513
532
  "data-ui": "bottom-sheet-header",
@@ -516,22 +535,22 @@ function $({ ref: e, sx: n, className: r, ...i }) {
516
535
  });
517
536
  }
518
537
  $.displayName = "BottomSheet.Header";
519
- function me({ ref: e, sx: n, className: r, onKeyDown: i, onFocusCapture: a, ...o }) {
520
- let s = J("Body"), c = v(q), l = A([e, c?.bodyRef]), u = S(null);
521
- return y(() => () => {
538
+ function he({ ref: e, sx: t, className: n, onKeyDown: r, onFocusCapture: a, ...o }) {
539
+ let s = J("Body"), c = y(q), l = F([e, c?.bodyRef]), u = C(null);
540
+ return b(() => () => {
522
541
  let e = u.current;
523
542
  e && e.window.cancelAnimationFrame(e.id);
524
- }, []), /* @__PURE__ */ T(t, {
525
- className: r,
526
- styles: oe,
527
- sx: n,
528
- children: (e) => /* @__PURE__ */ T("div", {
543
+ }, []), /* @__PURE__ */ E(i, {
544
+ className: n,
545
+ styles: se,
546
+ sx: t,
547
+ children: (e) => /* @__PURE__ */ E("div", {
529
548
  ...o,
530
549
  ref: l,
531
550
  "data-ui": "bottom-sheet-body",
532
551
  className: e,
533
552
  onKeyDown: (e) => {
534
- i?.(e), !e.defaultPrevented && e.target === e.currentTarget && (e.key === "PageDown" || e.key === " " && !e.shiftKey) && s.value < s.detents.length - 1 && (e.preventDefault(), s.requestValue(s.detents.length - 1));
553
+ r?.(e), !e.defaultPrevented && e.target === e.currentTarget && (e.key === "PageDown" || e.key === " " && !e.shiftKey) && s.value < s.detents.length - 1 && (e.preventDefault(), s.requestValue(s.detents.length - 1));
535
554
  },
536
555
  onFocusCapture: (e) => {
537
556
  if (a?.(e), e.defaultPrevented || e.target === e.currentTarget) return;
@@ -551,66 +570,66 @@ function me({ ref: e, sx: n, className: r, onKeyDown: i, onFocusCapture: a, ...o
551
570
  })
552
571
  });
553
572
  }
554
- me.displayName = "BottomSheet.Body";
555
- function he({ ref: e, sx: n, className: r, ...i }) {
556
- return J("Footer"), /* @__PURE__ */ T(t, {
557
- className: r,
558
- styles: se,
559
- sx: n,
560
- children: (t) => /* @__PURE__ */ T("div", {
561
- ...i,
573
+ he.displayName = "BottomSheet.Body";
574
+ function ge({ ref: e, sx: t, className: n, ...r }) {
575
+ return J("Footer"), /* @__PURE__ */ E(i, {
576
+ className: n,
577
+ styles: ce,
578
+ sx: t,
579
+ children: (t) => /* @__PURE__ */ E("div", {
580
+ ...r,
562
581
  ref: e,
563
582
  "data-ui": "bottom-sheet-footer",
564
583
  className: t
565
584
  })
566
585
  });
567
586
  }
568
- he.displayName = "BottomSheet.Footer";
569
- function ge({ ref: e, sx: n, className: r, children: i, ...a }) {
570
- let { titleId: o, setHasTitle: c } = J("Title"), l = s(i) && i !== "";
571
- return y(() => {
587
+ ge.displayName = "BottomSheet.Footer";
588
+ function _e({ ref: e, sx: t, className: n, children: r, ...a }) {
589
+ let { titleId: o, setHasTitle: c } = J("Title"), l = s(r) && r !== "";
590
+ return b(() => {
572
591
  if (l) return c(!0), () => c(!1);
573
- }, [l, c]), l ? /* @__PURE__ */ T(t, {
574
- className: r,
575
- styles: ce,
576
- sx: n,
577
- children: (t) => /* @__PURE__ */ T("h2", {
592
+ }, [l, c]), l ? /* @__PURE__ */ E(i, {
593
+ className: n,
594
+ styles: le,
595
+ sx: t,
596
+ children: (t) => /* @__PURE__ */ E("h2", {
578
597
  ...a,
579
598
  ref: e,
580
599
  id: o,
581
600
  "data-ui": "bottom-sheet-title",
582
601
  className: t,
583
- children: i
602
+ children: r
584
603
  })
585
604
  }) : null;
586
605
  }
587
- ge.displayName = "BottomSheet.Title";
588
- function _e({ ref: e, sx: n, className: r, children: i, ...a }) {
589
- let { descriptionId: o, setHasDescription: c } = J("Description"), l = s(i) && i !== "";
590
- return y(() => {
606
+ _e.displayName = "BottomSheet.Title";
607
+ function ve({ ref: e, sx: t, className: n, children: r, ...a }) {
608
+ let { descriptionId: o, setHasDescription: c } = J("Description"), l = s(r) && r !== "";
609
+ return b(() => {
591
610
  if (l) return c(!0), () => c(!1);
592
- }, [l, c]), l ? /* @__PURE__ */ T(t, {
593
- className: r,
594
- styles: le,
595
- sx: n,
596
- children: (t) => /* @__PURE__ */ T("p", {
611
+ }, [l, c]), l ? /* @__PURE__ */ E(i, {
612
+ className: n,
613
+ styles: ue,
614
+ sx: t,
615
+ children: (t) => /* @__PURE__ */ E("p", {
597
616
  ...a,
598
617
  ref: e,
599
618
  id: o,
600
619
  "data-ui": "bottom-sheet-description",
601
620
  className: t,
602
- children: i
621
+ children: r
603
622
  })
604
623
  }) : null;
605
624
  }
606
- _e.displayName = "BottomSheet.Description";
607
- function ve({ ref: e, sx: n, className: r, onClick: i, onKeyDown: a, "aria-describedby": o, ...s }) {
608
- let c = J("Handle"), l = v(q), u = c.detents.length - 1;
609
- return /* @__PURE__ */ T(t, {
610
- className: r,
611
- styles: [W, ue],
612
- sx: n,
613
- children: (t) => /* @__PURE__ */ T("button", {
625
+ ve.displayName = "BottomSheet.Description";
626
+ function ye({ ref: e, sx: t, className: n, onClick: r, onKeyDown: a, "aria-describedby": o, ...s }) {
627
+ let c = J("Handle"), l = y(q), u = c.detents.length - 1;
628
+ return /* @__PURE__ */ E(i, {
629
+ className: n,
630
+ styles: [W, de],
631
+ sx: t,
632
+ children: (t) => /* @__PURE__ */ E("button", {
614
633
  type: "button",
615
634
  ...s,
616
635
  ref: e,
@@ -621,7 +640,7 @@ function ve({ ref: e, sx: n, className: r, onClick: i, onKeyDown: a, "aria-descr
621
640
  "aria-expanded": c.value === u,
622
641
  "aria-describedby": [o, c.valueTextId].filter(Boolean).join(" "),
623
642
  onClick: (e) => {
624
- i?.(e), l?.suppressClick.current ? l.suppressClick.current = !1 : e.defaultPrevented || c.requestValue(c.value === u ? 0 : u);
643
+ r?.(e), l?.suppressClick.current ? l.suppressClick.current = !1 : e.defaultPrevented || c.requestValue(c.value === u ? 0 : u);
625
644
  },
626
645
  onKeyDown: (e) => {
627
646
  if (a?.(e), e.defaultPrevented) return;
@@ -637,37 +656,37 @@ function ve({ ref: e, sx: n, className: r, onClick: i, onKeyDown: a, "aria-descr
637
656
  })
638
657
  });
639
658
  }
640
- ve.displayName = "BottomSheet.Handle";
641
- function ye({ ref: e, sx: n, className: r, onClick: i, ...a }) {
659
+ ye.displayName = "BottomSheet.Handle";
660
+ function be({ ref: e, sx: t, className: n, onClick: r, ...a }) {
642
661
  let o = J("Close");
643
- return /* @__PURE__ */ T(t, {
644
- className: r,
662
+ return /* @__PURE__ */ E(i, {
663
+ className: n,
645
664
  styles: W,
646
- sx: n,
647
- children: (t) => /* @__PURE__ */ T("button", {
665
+ sx: t,
666
+ children: (t) => /* @__PURE__ */ E("button", {
648
667
  type: "button",
649
668
  ...a,
650
669
  ref: e,
651
670
  "data-ui": "bottom-sheet-close",
652
671
  className: t,
653
672
  onClick: (e) => {
654
- i?.(e), e.defaultPrevented || o.requestClose();
673
+ r?.(e), e.defaultPrevented || o.requestClose();
655
674
  }
656
675
  })
657
676
  });
658
677
  }
659
- ye.displayName = "BottomSheet.Close";
660
- var be = Object.assign(Y, {
678
+ be.displayName = "BottomSheet.Close";
679
+ var xe = Object.assign(Y, {
661
680
  Trigger: X,
662
681
  Content: Z,
663
682
  Panel: Q,
664
683
  Header: $,
665
- Body: me,
666
- Footer: he,
667
- Title: ge,
668
- Description: _e,
669
- Handle: ve,
670
- Close: ye
684
+ Body: he,
685
+ Footer: ge,
686
+ Title: _e,
687
+ Description: ve,
688
+ Handle: ye,
689
+ Close: be
671
690
  });
672
691
  //#endregion
673
- export { be as t };
692
+ export { xe as t };