@vlrc-fe/components 3.0.5 → 3.1.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 (482) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +6 -2
  3. package/dist/ConfirmModal.cjs +49 -18
  4. package/dist/ConfirmModal.d.ts +14 -2
  5. package/dist/ConfirmModal.d.ts.map +1 -1
  6. package/dist/ConfirmModal.js +49 -18
  7. package/dist/DataTable/components/DataTableFacetedFilter.cjs +0 -2
  8. package/dist/DataTable/components/DataTableFacetedFilter.js +0 -2
  9. package/dist/DataTable/components/DataTablePagination.cjs +0 -1
  10. package/dist/DataTable/components/DataTablePagination.js +0 -1
  11. package/dist/DataTable/components/DataTableRowActions.cjs +1 -1
  12. package/dist/DataTable/components/DataTableRowActions.js +1 -1
  13. package/dist/DataTable/components/DataTableTable.cjs +3 -2
  14. package/dist/DataTable/components/DataTableTable.d.ts.map +1 -1
  15. package/dist/DataTable/components/DataTableTable.js +3 -2
  16. package/dist/DataTable/render/createColumns.cjs +1 -1
  17. package/dist/DataTable/render/createColumns.js +1 -1
  18. package/dist/Dropdown/Dropdown.cjs +14 -12
  19. package/dist/Dropdown/Dropdown.js +14 -12
  20. package/dist/Form/Form.cjs +3 -4
  21. package/dist/Form/Form.js +2 -3
  22. package/dist/Form/FormDatePicker/DatePickerTrigger.cjs +263 -0
  23. package/dist/Form/FormDatePicker/DatePickerTrigger.d.ts +111 -0
  24. package/dist/Form/FormDatePicker/DatePickerTrigger.d.ts.map +1 -0
  25. package/dist/Form/FormDatePicker/DatePickerTrigger.js +259 -0
  26. package/dist/Form/FormDatePicker/FormDatePicker.cjs +65 -66
  27. package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
  28. package/dist/Form/FormDatePicker/FormDatePicker.js +66 -65
  29. package/dist/Form/FormDatePicker/RangeDatePicker.cjs +25 -68
  30. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +5 -2
  31. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
  32. package/dist/Form/FormDatePicker/RangeDatePicker.js +26 -69
  33. package/dist/Form/FormDatePicker/SingleDatePicker.cjs +43 -66
  34. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -2
  35. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
  36. package/dist/Form/FormDatePicker/SingleDatePicker.js +44 -67
  37. package/dist/Form/FormDatePicker/TimeInput.cjs +44 -59
  38. package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
  39. package/dist/Form/FormDatePicker/TimeInput.js +44 -59
  40. package/dist/Form/FormDatePicker/TimePicker.cjs +39 -17
  41. package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
  42. package/dist/Form/FormDatePicker/TimePicker.js +39 -17
  43. package/dist/Form/FormDatePicker/types.d.ts +5 -0
  44. package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
  45. package/dist/Form/FormDatePicker/useFormDatePicker.cjs +3 -4
  46. package/dist/Form/FormDatePicker/useFormDatePicker.js +1 -2
  47. package/dist/Form/FormFileUpload/FileUpload.cjs +24 -29
  48. package/dist/Form/FormFileUpload/FileUpload.js +24 -29
  49. package/dist/Form/FormFileUpload/index.cjs +2 -2
  50. package/dist/Form/FormFileUpload/index.js +1 -1
  51. package/dist/Form/FormMultiSelect/FormMultiSelect.d.ts +6 -1
  52. package/dist/Form/FormMultiSelect/FormMultiSelect.d.ts.map +1 -1
  53. package/dist/Form/FormNumberInput/FormNumberInput.cjs +21 -11
  54. package/dist/Form/FormNumberInput/FormNumberInput.d.ts.map +1 -1
  55. package/dist/Form/FormNumberInput/FormNumberInput.js +20 -10
  56. package/dist/Form/FormSelect/FormSelect.cjs +45 -18
  57. package/dist/Form/FormSelect/FormSelect.js +45 -18
  58. package/dist/Form/FormSelect/types.d.ts +2 -0
  59. package/dist/Form/FormSelect/types.d.ts.map +1 -1
  60. package/dist/Icons/Icons.cjs +47 -0
  61. package/dist/Icons/Icons.d.ts +46 -0
  62. package/dist/Icons/Icons.d.ts.map +1 -1
  63. package/dist/Icons/Icons.js +48 -1
  64. package/dist/Icons/JiraIcons.cjs +251 -0
  65. package/dist/Icons/JiraIcons.d.ts +25 -0
  66. package/dist/Icons/JiraIcons.d.ts.map +1 -0
  67. package/dist/Icons/JiraIcons.js +248 -0
  68. package/dist/Icons/index.d.ts +1 -0
  69. package/dist/Icons/index.d.ts.map +1 -1
  70. package/dist/Modal.cjs +12 -9
  71. package/dist/Modal.d.ts +11 -1
  72. package/dist/Modal.d.ts.map +1 -1
  73. package/dist/Modal.js +12 -9
  74. package/dist/MultiSelect/MultiSelect.cjs +20 -9
  75. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  76. package/dist/MultiSelect/MultiSelect.js +20 -9
  77. package/dist/MultiSelect/renderers.cjs +95 -52
  78. package/dist/MultiSelect/renderers.d.ts.map +1 -1
  79. package/dist/MultiSelect/renderers.js +95 -52
  80. package/dist/Select/BaseSelect.cjs +68 -21
  81. package/dist/Select/BaseSelect.d.ts.map +1 -1
  82. package/dist/Select/BaseSelect.js +69 -22
  83. package/dist/Select/MultiSelectTags.cjs +0 -1
  84. package/dist/Select/MultiSelectTags.d.ts.map +1 -1
  85. package/dist/Select/MultiSelectTags.js +0 -1
  86. package/dist/Tag/Tag.cjs +154 -0
  87. package/dist/Tag/Tag.d.ts +19 -0
  88. package/dist/Tag/Tag.d.ts.map +1 -0
  89. package/dist/Tag/Tag.js +151 -0
  90. package/dist/Tag/index.d.ts +3 -0
  91. package/dist/Tag/index.d.ts.map +1 -0
  92. package/dist/Typography/Blockquote.cjs +2 -1
  93. package/dist/Typography/Blockquote.d.ts +1 -1
  94. package/dist/Typography/Blockquote.d.ts.map +1 -1
  95. package/dist/Typography/Blockquote.js +2 -1
  96. package/dist/Typography/Code.cjs +2 -2
  97. package/dist/Typography/Code.d.ts +1 -1
  98. package/dist/Typography/Code.d.ts.map +1 -1
  99. package/dist/Typography/Code.js +2 -2
  100. package/dist/Typography/Link.cjs +2 -1
  101. package/dist/Typography/Link.d.ts +1 -1
  102. package/dist/Typography/Link.d.ts.map +1 -1
  103. package/dist/Typography/Link.js +2 -1
  104. package/dist/Typography/Paragraph.cjs +2 -1
  105. package/dist/Typography/Paragraph.d.ts +1 -1
  106. package/dist/Typography/Paragraph.d.ts.map +1 -1
  107. package/dist/Typography/Paragraph.js +2 -1
  108. package/dist/Typography/Text.cjs +2 -1
  109. package/dist/Typography/Text.d.ts +1 -1
  110. package/dist/Typography/Text.d.ts.map +1 -1
  111. package/dist/Typography/Text.js +2 -1
  112. package/dist/Typography/types.d.ts +2 -0
  113. package/dist/Typography/types.d.ts.map +1 -1
  114. package/dist/assets/stylex.css +139 -31
  115. package/dist/index.cjs +27 -7
  116. package/dist/index.d.ts +5 -2
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +15 -12
  119. package/dist/layout/index.js +2 -2
  120. package/dist/theme/index.cjs +4 -0
  121. package/dist/theme/index.js +4 -2
  122. package/dist/theme/tokens.stylex.cjs +33 -0
  123. package/dist/theme/tokens.stylex.d.ts +53 -0
  124. package/dist/theme/tokens.stylex.d.ts.map +1 -1
  125. package/dist/theme/tokens.stylex.js +32 -1
  126. package/dist/theme.css +160 -37
  127. package/dist/ui/accordion.cjs +0 -1
  128. package/dist/ui/accordion.d.ts.map +1 -1
  129. package/dist/ui/accordion.js +0 -1
  130. package/dist/ui/alert-dialog.cjs +11 -11
  131. package/dist/ui/alert-dialog.js +9 -9
  132. package/dist/ui/aspect-ratio.cjs +2 -2
  133. package/dist/ui/aspect-ratio.js +1 -1
  134. package/dist/ui/avatar.cjs +110 -41
  135. package/dist/ui/avatar.d.ts +7 -1
  136. package/dist/ui/avatar.d.ts.map +1 -1
  137. package/dist/ui/avatar.js +110 -41
  138. package/dist/ui/badge-overflow.cjs +33 -8
  139. package/dist/ui/badge-overflow.d.ts.map +1 -1
  140. package/dist/ui/badge-overflow.js +33 -8
  141. package/dist/ui/breadcrumb.cjs +18 -8
  142. package/dist/ui/breadcrumb.d.ts.map +1 -1
  143. package/dist/ui/breadcrumb.js +18 -8
  144. package/dist/ui/card.cjs +23 -88
  145. package/dist/ui/card.d.ts +11 -4
  146. package/dist/ui/card.d.ts.map +1 -1
  147. package/dist/ui/card.js +23 -88
  148. package/dist/ui/carousel.cjs +27 -8
  149. package/dist/ui/carousel.d.ts.map +1 -1
  150. package/dist/ui/carousel.js +25 -7
  151. package/dist/ui/code-block.cjs +6 -12
  152. package/dist/ui/code-block.js +6 -12
  153. package/dist/ui/collapsible.cjs +4 -4
  154. package/dist/ui/collapsible.js +6 -6
  155. package/dist/ui/command.cjs +1 -2
  156. package/dist/ui/command.d.ts.map +1 -1
  157. package/dist/ui/command.js +1 -2
  158. package/dist/ui/context-menu.cjs +42 -48
  159. package/dist/ui/context-menu.d.ts.map +1 -1
  160. package/dist/ui/context-menu.js +41 -47
  161. package/dist/ui/copy-button.cjs +0 -1
  162. package/dist/ui/copy-button.js +0 -1
  163. package/dist/ui/dialog.cjs +3 -3
  164. package/dist/ui/dialog.js +3 -3
  165. package/dist/ui/drawer.cjs +9 -9
  166. package/dist/ui/drawer.js +11 -11
  167. package/dist/ui/dropdown-menu.cjs +4 -4
  168. package/dist/ui/dropdown-menu.d.ts +3 -1
  169. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  170. package/dist/ui/dropdown-menu.js +4 -4
  171. package/dist/ui/editable.cjs +0 -1
  172. package/dist/ui/editable.d.ts.map +1 -1
  173. package/dist/ui/editable.js +0 -1
  174. package/dist/ui/empty.cjs +6 -5
  175. package/dist/ui/empty.d.ts +2 -0
  176. package/dist/ui/empty.d.ts.map +1 -1
  177. package/dist/ui/empty.js +6 -6
  178. package/dist/ui/field.cjs +0 -2
  179. package/dist/ui/field.d.ts.map +1 -1
  180. package/dist/ui/field.js +0 -2
  181. package/dist/ui/file-upload.cjs +88 -85
  182. package/dist/ui/file-upload.d.ts +1 -0
  183. package/dist/ui/file-upload.d.ts.map +1 -1
  184. package/dist/ui/file-upload.js +88 -86
  185. package/dist/ui/form.cjs +54 -66
  186. package/dist/ui/form.d.ts.map +1 -1
  187. package/dist/ui/form.js +50 -62
  188. package/dist/ui/hover-card.cjs +5 -5
  189. package/dist/ui/hover-card.js +3 -3
  190. package/dist/ui/input-group.cjs +0 -1
  191. package/dist/ui/input-group.d.ts.map +1 -1
  192. package/dist/ui/input-group.js +0 -1
  193. package/dist/ui/input-otp.cjs +3 -3
  194. package/dist/ui/input-otp.js +3 -3
  195. package/dist/ui/input.cjs +69 -7
  196. package/dist/ui/input.d.ts +3 -1
  197. package/dist/ui/input.d.ts.map +1 -1
  198. package/dist/ui/input.js +69 -7
  199. package/dist/ui/kbd.cjs +22 -16
  200. package/dist/ui/kbd.d.ts.map +1 -1
  201. package/dist/ui/kbd.js +22 -16
  202. package/dist/ui/menubar.cjs +42 -48
  203. package/dist/ui/menubar.d.ts.map +1 -1
  204. package/dist/ui/menubar.js +40 -46
  205. package/dist/ui/navigation-menu.cjs +9 -9
  206. package/dist/ui/navigation-menu.js +4 -4
  207. package/dist/ui/pagination.cjs +7 -7
  208. package/dist/ui/pagination.d.ts.map +1 -1
  209. package/dist/ui/pagination.js +7 -7
  210. package/dist/ui/progress.cjs +27 -12
  211. package/dist/ui/progress.d.ts +3 -1
  212. package/dist/ui/progress.d.ts.map +1 -1
  213. package/dist/ui/progress.js +27 -12
  214. package/dist/ui/resizable.cjs +4 -4
  215. package/dist/ui/resizable.js +1 -1
  216. package/dist/ui/responsive-dialog.cjs +1 -1
  217. package/dist/ui/responsive-dialog.js +1 -1
  218. package/dist/ui/segmented.cjs +19 -10
  219. package/dist/ui/segmented.d.ts.map +1 -1
  220. package/dist/ui/segmented.js +20 -11
  221. package/dist/ui/sheet.cjs +1 -1
  222. package/dist/ui/sheet.js +1 -1
  223. package/dist/ui/sidebar.cjs +9 -5
  224. package/dist/ui/sidebar.d.ts.map +1 -1
  225. package/dist/ui/sidebar.js +9 -5
  226. package/dist/ui/signature-pad.cjs +3 -0
  227. package/dist/ui/signature-pad.d.ts.map +1 -1
  228. package/dist/ui/signature-pad.js +3 -0
  229. package/dist/ui/slider.cjs +7 -8
  230. package/dist/ui/slider.js +7 -8
  231. package/dist/ui/sonner.cjs +6 -0
  232. package/dist/ui/sonner.d.ts +1 -0
  233. package/dist/ui/sonner.d.ts.map +1 -1
  234. package/dist/ui/sonner.js +2 -2
  235. package/dist/ui/stat.cjs +2 -3
  236. package/dist/ui/stat.d.ts.map +1 -1
  237. package/dist/ui/stat.js +2 -3
  238. package/dist/ui/stepper.cjs +107 -70
  239. package/dist/ui/stepper.d.ts +2 -2
  240. package/dist/ui/stepper.d.ts.map +1 -1
  241. package/dist/ui/stepper.js +108 -71
  242. package/dist/ui/switch.cjs +3 -3
  243. package/dist/ui/switch.js +3 -3
  244. package/dist/ui/tabs.cjs +150 -64
  245. package/dist/ui/tabs.d.ts +34 -5
  246. package/dist/ui/tabs.d.ts.map +1 -1
  247. package/dist/ui/tabs.js +148 -62
  248. package/dist/ui/timeline.cjs +2 -3
  249. package/dist/ui/timeline.d.ts.map +1 -1
  250. package/dist/ui/timeline.js +2 -3
  251. package/dist/ui/toggle-group.cjs +3 -3
  252. package/dist/ui/toggle-group.js +3 -3
  253. package/dist/ui/toggle.cjs +2 -2
  254. package/dist/ui/toggle.js +1 -1
  255. package/dist/ui/tooltip.cjs +61 -11
  256. package/dist/ui/tooltip.d.ts +10 -2
  257. package/dist/ui/tooltip.d.ts.map +1 -1
  258. package/dist/ui/tooltip.js +61 -11
  259. package/dist/utils.cjs +72 -0
  260. package/dist/utils.d.ts +63 -1
  261. package/dist/utils.d.ts.map +1 -1
  262. package/dist/utils.js +68 -1
  263. package/dist/vlrc-theme.css +21 -1
  264. package/package.json +16 -3
  265. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +0 -551
  266. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -542
  267. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +0 -546
  268. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -537
  269. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +0 -330
  270. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -319
  271. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +0 -150
  272. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +0 -132
  273. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -113
  274. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
  275. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +0 -11
  276. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +0 -11
  277. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +0 -48
  278. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +0 -43
  279. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +0 -145
  280. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -125
  281. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +0 -38
  282. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +0 -34
  283. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.cjs +0 -126
  284. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.js +0 -118
  285. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.cjs +0 -134
  286. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.js +0 -128
  287. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.cjs +0 -541
  288. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.js +0 -537
  289. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -39
  290. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -35
  291. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.cjs +0 -304
  292. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.js +0 -272
  293. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.cjs +0 -108
  294. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.js +0 -104
  295. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.cjs +0 -19
  296. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.js +0 -16
  297. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -275
  298. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -271
  299. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +0 -53
  300. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -48
  301. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +0 -215
  302. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -212
  303. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.cjs +0 -219
  304. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -209
  305. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.cjs +0 -22
  306. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.js +0 -19
  307. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.cjs +0 -802
  308. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.js +0 -769
  309. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.cjs +0 -410
  310. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.js +0 -376
  311. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +0 -741
  312. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.js +0 -722
  313. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.cjs +0 -246
  314. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.js +0 -237
  315. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.cjs +0 -27
  316. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.js +0 -23
  317. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.cjs +0 -148
  318. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.js +0 -145
  319. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -55
  320. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.js +0 -50
  321. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +0 -223
  322. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -216
  323. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.cjs +0 -576
  324. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.js +0 -560
  325. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.cjs +0 -202
  326. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.js +0 -190
  327. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.cjs +0 -159
  328. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.js +0 -149
  329. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +0 -158
  330. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.js +0 -152
  331. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.cjs +0 -39
  332. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.js +0 -35
  333. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -19
  334. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
  335. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -109
  336. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -105
  337. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +0 -28
  338. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.js +0 -25
  339. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +0 -33
  340. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -30
  341. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -7
  342. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -4
  343. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.cjs +0 -25
  344. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -22
  345. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.cjs +0 -47
  346. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +0 -44
  347. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +0 -38
  348. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -33
  349. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +0 -106
  350. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +0 -106
  351. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +0 -5
  352. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +0 -5
  353. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +0 -6
  354. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +0 -6
  355. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +0 -423
  356. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +0 -423
  357. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +0 -45
  358. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +0 -45
  359. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +0 -42
  360. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +0 -42
  361. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +0 -20
  362. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -20
  363. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +0 -7
  364. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +0 -7
  365. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +0 -27
  366. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +0 -25
  367. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +0 -45
  368. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +0 -42
  369. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +0 -45
  370. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +0 -44
  371. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +0 -49
  372. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +0 -48
  373. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +0 -358
  374. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +0 -354
  375. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +0 -31
  376. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +0 -30
  377. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +0 -35
  378. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +0 -34
  379. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +0 -44
  380. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +0 -43
  381. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +0 -49
  382. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +0 -48
  383. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +0 -61
  384. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +0 -60
  385. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +0 -38
  386. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +0 -37
  387. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +0 -39
  388. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +0 -38
  389. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +0 -8
  390. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -8
  391. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +0 -50
  392. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -50
  393. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +0 -27
  394. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -27
  395. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +0 -18
  396. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -18
  397. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +0 -77
  398. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -77
  399. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +0 -31
  400. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -31
  401. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +0 -11
  402. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
  403. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +0 -210
  404. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -210
  405. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +0 -122
  406. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +0 -123
  407. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +0 -28
  408. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +0 -27
  409. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +0 -34
  410. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +0 -33
  411. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +0 -37
  412. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +0 -36
  413. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +0 -41
  414. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +0 -40
  415. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +0 -45
  416. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +0 -44
  417. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +0 -56
  418. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +0 -55
  419. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +0 -35
  420. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +0 -34
  421. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +0 -45
  422. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +0 -44
  423. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +0 -34
  424. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +0 -34
  425. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +0 -39
  426. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +0 -36
  427. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +0 -1391
  428. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +0 -1391
  429. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +0 -7
  430. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +0 -4
  431. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.cjs +0 -387
  432. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.js +0 -383
  433. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +0 -625
  434. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +0 -616
  435. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.cjs +0 -1033
  436. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js +0 -1026
  437. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +0 -47
  438. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -43
  439. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +0 -13
  440. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -10
  441. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.cjs +0 -4
  442. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.js +0 -3
  443. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +0 -36
  444. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -35
  445. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +0 -15
  446. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -13
  447. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +0 -167
  448. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -163
  449. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.cjs +0 -63
  450. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -61
  451. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +0 -14
  452. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -14
  453. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +0 -84
  454. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -83
  455. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.cjs +0 -3
  456. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -4
  457. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +0 -6
  458. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -6
  459. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.cjs +0 -1617
  460. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +0 -1600
  461. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.cjs +0 -18
  462. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.js +0 -18
  463. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.cjs +0 -26
  464. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +0 -24
  465. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.cjs +0 -4
  466. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.js +0 -3
  467. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.cjs +0 -40
  468. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -40
  469. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +0 -36
  470. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -29
  471. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +0 -20
  472. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -20
  473. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +0 -46
  474. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -44
  475. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.cjs +0 -39
  476. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -39
  477. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.cjs +0 -18
  478. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.js +0 -16
  479. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.cjs +0 -81
  480. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.js +0 -81
  481. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.cjs +0 -1252
  482. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.js +0 -1243
@@ -1,1252 +0,0 @@
1
- "use client";
2
- const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
3
- let react = require("react");
4
- let react$1 = require_runtime.__toESM(react, 1);
5
- react = require_runtime.__toESM(react);
6
- let _radix_ui_react_dialog = require("@radix-ui/react-dialog");
7
- _radix_ui_react_dialog = require_runtime.__toESM(_radix_ui_react_dialog, 1);
8
- // ../../node_modules/.pnpm/vaul@1.1.2_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.mjs
9
- function __insertCSS(code) {
10
- if (!code || typeof document == "undefined") return;
11
- let head = document.head || document.getElementsByTagName("head")[0];
12
- let style = document.createElement("style");
13
- style.type = "text/css";
14
- head.appendChild(style);
15
- style.styleSheet ? style.styleSheet.cssText = code : style.appendChild(document.createTextNode(code));
16
- }
17
- var DrawerContext = react$1.default.createContext({
18
- drawerRef: { current: null },
19
- overlayRef: { current: null },
20
- onPress: () => {},
21
- onRelease: () => {},
22
- onDrag: () => {},
23
- onNestedDrag: () => {},
24
- onNestedOpenChange: () => {},
25
- onNestedRelease: () => {},
26
- openProp: void 0,
27
- dismissible: false,
28
- isOpen: false,
29
- isDragging: false,
30
- keyboardIsOpen: { current: false },
31
- snapPointsOffset: null,
32
- snapPoints: null,
33
- handleOnly: false,
34
- modal: false,
35
- shouldFade: false,
36
- activeSnapPoint: null,
37
- onOpenChange: () => {},
38
- setActiveSnapPoint: () => {},
39
- closeDrawer: () => {},
40
- direction: "bottom",
41
- shouldAnimate: { current: true },
42
- shouldScaleBackground: false,
43
- setBackgroundColorOnScale: true,
44
- noBodyStyles: false,
45
- container: null,
46
- autoFocus: false
47
- });
48
- var useDrawerContext = () => {
49
- const context = react$1.default.useContext(DrawerContext);
50
- if (!context) throw new Error("useDrawerContext must be used within a Drawer.Root");
51
- return context;
52
- };
53
- __insertCSS("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");
54
- function isMobileFirefox() {
55
- const userAgent = navigator.userAgent;
56
- return typeof window !== "undefined" && (/Firefox/.test(userAgent) && /Mobile/.test(userAgent) || /FxiOS/.test(userAgent));
57
- }
58
- function isMac() {
59
- return testPlatform(/^Mac/);
60
- }
61
- function isIPhone() {
62
- return testPlatform(/^iPhone/);
63
- }
64
- function isSafari() {
65
- return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
66
- }
67
- function isIPad() {
68
- return testPlatform(/^iPad/) || isMac() && navigator.maxTouchPoints > 1;
69
- }
70
- function isIOS() {
71
- return isIPhone() || isIPad();
72
- }
73
- function testPlatform(re) {
74
- return typeof window !== "undefined" && window.navigator != null ? re.test(window.navigator.platform) : void 0;
75
- }
76
- var KEYBOARD_BUFFER = 24;
77
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? react$1.useLayoutEffect : react$1.useEffect;
78
- function chain$1(...callbacks) {
79
- return (...args) => {
80
- for (let callback of callbacks) if (typeof callback === "function") callback(...args);
81
- };
82
- }
83
- var visualViewport = typeof document !== "undefined" && window.visualViewport;
84
- function isScrollable(node) {
85
- let style = window.getComputedStyle(node);
86
- return /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
87
- }
88
- function getScrollParent(node) {
89
- if (isScrollable(node)) node = node.parentElement;
90
- while (node && !isScrollable(node)) node = node.parentElement;
91
- return node || document.scrollingElement || document.documentElement;
92
- }
93
- var nonTextInputTypes = /* @__PURE__ */ new Set([
94
- "checkbox",
95
- "radio",
96
- "range",
97
- "color",
98
- "file",
99
- "image",
100
- "button",
101
- "submit",
102
- "reset"
103
- ]);
104
- var preventScrollCount = 0;
105
- var restore;
106
- /**
107
- * Prevents scrolling on the document body on mount, and
108
- * restores it on unmount. Also ensures that content does not
109
- * shift due to the scrollbars disappearing.
110
- */ function usePreventScroll(options = {}) {
111
- let { isDisabled } = options;
112
- useIsomorphicLayoutEffect(() => {
113
- if (isDisabled) return;
114
- preventScrollCount++;
115
- if (preventScrollCount === 1) {
116
- if (isIOS()) restore = preventScrollMobileSafari();
117
- }
118
- return () => {
119
- preventScrollCount--;
120
- if (preventScrollCount === 0) restore?.();
121
- };
122
- }, [isDisabled]);
123
- }
124
- function preventScrollMobileSafari() {
125
- let scrollable;
126
- let lastY = 0;
127
- let onTouchStart = (e) => {
128
- scrollable = getScrollParent(e.target);
129
- if (scrollable === document.documentElement && scrollable === document.body) return;
130
- lastY = e.changedTouches[0].pageY;
131
- };
132
- let onTouchMove = (e) => {
133
- if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
134
- e.preventDefault();
135
- return;
136
- }
137
- let y = e.changedTouches[0].pageY;
138
- let scrollTop = scrollable.scrollTop;
139
- let bottom = scrollable.scrollHeight - scrollable.clientHeight;
140
- if (bottom === 0) return;
141
- if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) e.preventDefault();
142
- lastY = y;
143
- };
144
- let onTouchEnd = (e) => {
145
- let target = e.target;
146
- if (isInput(target) && target !== document.activeElement) {
147
- e.preventDefault();
148
- target.style.transform = "translateY(-2000px)";
149
- target.focus();
150
- requestAnimationFrame(() => {
151
- target.style.transform = "";
152
- });
153
- }
154
- };
155
- let onFocus = (e) => {
156
- let target = e.target;
157
- if (isInput(target)) {
158
- target.style.transform = "translateY(-2000px)";
159
- requestAnimationFrame(() => {
160
- target.style.transform = "";
161
- if (visualViewport) {
162
- if (visualViewport.height < window.innerHeight) requestAnimationFrame(() => {
163
- scrollIntoView(target);
164
- });
165
- else visualViewport.addEventListener("resize", () => scrollIntoView(target), { once: true });
166
- }
167
- });
168
- }
169
- };
170
- let onWindowScroll = () => {
171
- window.scrollTo(0, 0);
172
- };
173
- let scrollX = window.pageXOffset;
174
- let scrollY = window.pageYOffset;
175
- let restoreStyles = chain$1(setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
176
- window.scrollTo(0, 0);
177
- let removeEvents = chain$1(addEvent(document, "touchstart", onTouchStart, {
178
- passive: false,
179
- capture: true
180
- }), addEvent(document, "touchmove", onTouchMove, {
181
- passive: false,
182
- capture: true
183
- }), addEvent(document, "touchend", onTouchEnd, {
184
- passive: false,
185
- capture: true
186
- }), addEvent(document, "focus", onFocus, true), addEvent(window, "scroll", onWindowScroll));
187
- return () => {
188
- restoreStyles();
189
- removeEvents();
190
- window.scrollTo(scrollX, scrollY);
191
- };
192
- }
193
- function setStyle(element, style, value) {
194
- let cur = element.style[style];
195
- element.style[style] = value;
196
- return () => {
197
- element.style[style] = cur;
198
- };
199
- }
200
- function addEvent(target, event, handler, options) {
201
- target.addEventListener(event, handler, options);
202
- return () => {
203
- target.removeEventListener(event, handler, options);
204
- };
205
- }
206
- function scrollIntoView(target) {
207
- let root = document.scrollingElement || document.documentElement;
208
- while (target && target !== root) {
209
- let scrollable = getScrollParent(target);
210
- if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== target) {
211
- let scrollableTop = scrollable.getBoundingClientRect().top;
212
- let targetTop = target.getBoundingClientRect().top;
213
- if (target.getBoundingClientRect().bottom > scrollable.getBoundingClientRect().bottom + KEYBOARD_BUFFER) scrollable.scrollTop += targetTop - scrollableTop;
214
- }
215
- target = scrollable.parentElement;
216
- }
217
- }
218
- function isInput(target) {
219
- return target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
220
- }
221
- /**
222
- * Set a given ref to a given value
223
- * This utility takes care of different types of refs: callback refs and RefObject(s)
224
- */ function setRef(ref, value) {
225
- if (typeof ref === "function") ref(value);
226
- else if (ref !== null && ref !== void 0) ref.current = value;
227
- }
228
- /**
229
- * A utility to compose multiple refs together
230
- * Accepts callback refs and RefObject(s)
231
- */ function composeRefs(...refs) {
232
- return (node) => refs.forEach((ref) => setRef(ref, node));
233
- }
234
- /**
235
- * A custom hook that composes multiple refs
236
- * Accepts callback refs and RefObject(s)
237
- */ function useComposedRefs(...refs) {
238
- return react$1.useCallback(composeRefs(...refs), refs);
239
- }
240
- var cache = /* @__PURE__ */ new WeakMap();
241
- function set(el, styles, ignoreCache = false) {
242
- if (!el || !(el instanceof HTMLElement)) return;
243
- let originalStyles = {};
244
- Object.entries(styles).forEach(([key, value]) => {
245
- if (key.startsWith("--")) {
246
- el.style.setProperty(key, value);
247
- return;
248
- }
249
- originalStyles[key] = el.style[key];
250
- el.style[key] = value;
251
- });
252
- if (ignoreCache) return;
253
- cache.set(el, originalStyles);
254
- }
255
- function reset(el, prop) {
256
- if (!el || !(el instanceof HTMLElement)) return;
257
- let originalStyles = cache.get(el);
258
- if (!originalStyles) return;
259
- el.style[prop] = originalStyles[prop];
260
- }
261
- var isVertical = (direction) => {
262
- switch (direction) {
263
- case "top":
264
- case "bottom": return true;
265
- case "left":
266
- case "right": return false;
267
- default: return direction;
268
- }
269
- };
270
- function getTranslate(element, direction) {
271
- if (!element) return null;
272
- const style = window.getComputedStyle(element);
273
- const transform = style.transform || style.webkitTransform || style.mozTransform;
274
- let mat = transform.match(/^matrix3d\((.+)\)$/);
275
- if (mat) return parseFloat(mat[1].split(", ")[isVertical(direction) ? 13 : 12]);
276
- mat = transform.match(/^matrix\((.+)\)$/);
277
- return mat ? parseFloat(mat[1].split(", ")[isVertical(direction) ? 5 : 4]) : null;
278
- }
279
- function dampenValue(v) {
280
- return 8 * (Math.log(v + 1) - 2);
281
- }
282
- function assignStyle(element, style) {
283
- if (!element) return () => {};
284
- const prevStyle = element.style.cssText;
285
- Object.assign(element.style, style);
286
- return () => {
287
- element.style.cssText = prevStyle;
288
- };
289
- }
290
- var TRANSITIONS = {
291
- DURATION: .5,
292
- EASE: [
293
- .32,
294
- .72,
295
- 0,
296
- 1
297
- ]
298
- };
299
- var VELOCITY_THRESHOLD = .4;
300
- var CLOSE_THRESHOLD = .25;
301
- var SCROLL_LOCK_TIMEOUT = 100;
302
- var BORDER_RADIUS = 8;
303
- var NESTED_DISPLACEMENT = 16;
304
- var WINDOW_TOP_OFFSET = 26;
305
- var DRAG_CLASS = "vaul-dragging";
306
- function useCallbackRef(callback) {
307
- const callbackRef = react$1.default.useRef(callback);
308
- react$1.default.useEffect(() => {
309
- callbackRef.current = callback;
310
- });
311
- return react$1.default.useMemo(() => (...args) => callbackRef.current == null ? void 0 : callbackRef.current.call(callbackRef, ...args), []);
312
- }
313
- function useUncontrolledState({ defaultProp, onChange }) {
314
- const uncontrolledState = react$1.default.useState(defaultProp);
315
- const [value] = uncontrolledState;
316
- const prevValueRef = react$1.default.useRef(value);
317
- const handleChange = useCallbackRef(onChange);
318
- react$1.default.useEffect(() => {
319
- if (prevValueRef.current !== value) {
320
- handleChange(value);
321
- prevValueRef.current = value;
322
- }
323
- }, [
324
- value,
325
- prevValueRef,
326
- handleChange
327
- ]);
328
- return uncontrolledState;
329
- }
330
- function useControllableState({ prop, defaultProp, onChange = () => {} }) {
331
- const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({
332
- defaultProp,
333
- onChange
334
- });
335
- const isControlled = prop !== void 0;
336
- const value = isControlled ? prop : uncontrolledProp;
337
- const handleChange = useCallbackRef(onChange);
338
- return [value, react$1.default.useCallback((nextValue) => {
339
- if (isControlled) {
340
- const value = typeof nextValue === "function" ? nextValue(prop) : nextValue;
341
- if (value !== prop) handleChange(value);
342
- } else setUncontrolledProp(nextValue);
343
- }, [
344
- isControlled,
345
- prop,
346
- setUncontrolledProp,
347
- handleChange
348
- ])];
349
- }
350
- function useSnapPoints({ activeSnapPointProp, setActiveSnapPointProp, snapPoints, drawerRef, overlayRef, fadeFromIndex, onSnapPointChange, direction = "bottom", container, snapToSequentialPoint }) {
351
- const [activeSnapPoint, setActiveSnapPoint] = useControllableState({
352
- prop: activeSnapPointProp,
353
- defaultProp: snapPoints == null ? void 0 : snapPoints[0],
354
- onChange: setActiveSnapPointProp
355
- });
356
- const [windowDimensions, setWindowDimensions] = react$1.default.useState(typeof window !== "undefined" ? {
357
- innerWidth: window.innerWidth,
358
- innerHeight: window.innerHeight
359
- } : void 0);
360
- react$1.default.useEffect(() => {
361
- function onResize() {
362
- setWindowDimensions({
363
- innerWidth: window.innerWidth,
364
- innerHeight: window.innerHeight
365
- });
366
- }
367
- window.addEventListener("resize", onResize);
368
- return () => window.removeEventListener("resize", onResize);
369
- }, []);
370
- const isLastSnapPoint = react$1.default.useMemo(() => activeSnapPoint === (snapPoints == null ? void 0 : snapPoints[snapPoints.length - 1]) || null, [snapPoints, activeSnapPoint]);
371
- const activeSnapPointIndex = react$1.default.useMemo(() => {
372
- var _snapPoints_findIndex;
373
- return (_snapPoints_findIndex = snapPoints == null ? void 0 : snapPoints.findIndex((snapPoint) => snapPoint === activeSnapPoint)) != null ? _snapPoints_findIndex : null;
374
- }, [snapPoints, activeSnapPoint]);
375
- const shouldFade = snapPoints && snapPoints.length > 0 && (fadeFromIndex || fadeFromIndex === 0) && !Number.isNaN(fadeFromIndex) && snapPoints[fadeFromIndex] === activeSnapPoint || !snapPoints;
376
- const snapPointsOffset = react$1.default.useMemo(() => {
377
- const containerSize = container ? {
378
- width: container.getBoundingClientRect().width,
379
- height: container.getBoundingClientRect().height
380
- } : typeof window !== "undefined" ? {
381
- width: window.innerWidth,
382
- height: window.innerHeight
383
- } : {
384
- width: 0,
385
- height: 0
386
- };
387
- var _snapPoints_map;
388
- return (_snapPoints_map = snapPoints == null ? void 0 : snapPoints.map((snapPoint) => {
389
- const isPx = typeof snapPoint === "string";
390
- let snapPointAsNumber = 0;
391
- if (isPx) snapPointAsNumber = parseInt(snapPoint, 10);
392
- if (isVertical(direction)) {
393
- const height = isPx ? snapPointAsNumber : windowDimensions ? snapPoint * containerSize.height : 0;
394
- if (windowDimensions) return direction === "bottom" ? containerSize.height - height : -containerSize.height + height;
395
- return height;
396
- }
397
- const width = isPx ? snapPointAsNumber : windowDimensions ? snapPoint * containerSize.width : 0;
398
- if (windowDimensions) return direction === "right" ? containerSize.width - width : -containerSize.width + width;
399
- return width;
400
- })) != null ? _snapPoints_map : [];
401
- }, [
402
- snapPoints,
403
- windowDimensions,
404
- container
405
- ]);
406
- const activeSnapPointOffset = react$1.default.useMemo(() => activeSnapPointIndex !== null ? snapPointsOffset == null ? void 0 : snapPointsOffset[activeSnapPointIndex] : null, [snapPointsOffset, activeSnapPointIndex]);
407
- const snapToPoint = react$1.default.useCallback((dimension) => {
408
- var _snapPointsOffset_findIndex;
409
- const newSnapPointIndex = (_snapPointsOffset_findIndex = snapPointsOffset == null ? void 0 : snapPointsOffset.findIndex((snapPointDim) => snapPointDim === dimension)) != null ? _snapPointsOffset_findIndex : null;
410
- onSnapPointChange(newSnapPointIndex);
411
- set(drawerRef.current, {
412
- transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
413
- transform: isVertical(direction) ? `translate3d(0, ${dimension}px, 0)` : `translate3d(${dimension}px, 0, 0)`
414
- });
415
- if (snapPointsOffset && newSnapPointIndex !== snapPointsOffset.length - 1 && fadeFromIndex !== void 0 && newSnapPointIndex !== fadeFromIndex && newSnapPointIndex < fadeFromIndex) set(overlayRef.current, {
416
- transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
417
- opacity: "0"
418
- });
419
- else set(overlayRef.current, {
420
- transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
421
- opacity: "1"
422
- });
423
- setActiveSnapPoint(snapPoints == null ? void 0 : snapPoints[Math.max(newSnapPointIndex, 0)]);
424
- }, [
425
- drawerRef.current,
426
- snapPoints,
427
- snapPointsOffset,
428
- fadeFromIndex,
429
- overlayRef,
430
- setActiveSnapPoint
431
- ]);
432
- react$1.default.useEffect(() => {
433
- if (activeSnapPoint || activeSnapPointProp) {
434
- var _snapPoints_findIndex;
435
- const newIndex = (_snapPoints_findIndex = snapPoints == null ? void 0 : snapPoints.findIndex((snapPoint) => snapPoint === activeSnapPointProp || snapPoint === activeSnapPoint)) != null ? _snapPoints_findIndex : -1;
436
- if (snapPointsOffset && newIndex !== -1 && typeof snapPointsOffset[newIndex] === "number") snapToPoint(snapPointsOffset[newIndex]);
437
- }
438
- }, [
439
- activeSnapPoint,
440
- activeSnapPointProp,
441
- snapPoints,
442
- snapPointsOffset,
443
- snapToPoint
444
- ]);
445
- function onRelease({ draggedDistance, closeDrawer, velocity, dismissible }) {
446
- if (fadeFromIndex === void 0) return;
447
- const currentPosition = direction === "bottom" || direction === "right" ? (activeSnapPointOffset != null ? activeSnapPointOffset : 0) - draggedDistance : (activeSnapPointOffset != null ? activeSnapPointOffset : 0) + draggedDistance;
448
- const isOverlaySnapPoint = activeSnapPointIndex === fadeFromIndex - 1;
449
- const isFirst = activeSnapPointIndex === 0;
450
- const hasDraggedUp = draggedDistance > 0;
451
- if (isOverlaySnapPoint) set(overlayRef.current, { transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})` });
452
- if (!snapToSequentialPoint && velocity > 2 && !hasDraggedUp) {
453
- if (dismissible) closeDrawer();
454
- else snapToPoint(snapPointsOffset[0]);
455
- return;
456
- }
457
- if (!snapToSequentialPoint && velocity > 2 && hasDraggedUp && snapPointsOffset && snapPoints) {
458
- snapToPoint(snapPointsOffset[snapPoints.length - 1]);
459
- return;
460
- }
461
- const closestSnapPoint = snapPointsOffset == null ? void 0 : snapPointsOffset.reduce((prev, curr) => {
462
- if (typeof prev !== "number" || typeof curr !== "number") return prev;
463
- return Math.abs(curr - currentPosition) < Math.abs(prev - currentPosition) ? curr : prev;
464
- });
465
- const dim = isVertical(direction) ? window.innerHeight : window.innerWidth;
466
- if (velocity > VELOCITY_THRESHOLD && Math.abs(draggedDistance) < dim * .4) {
467
- const dragDirection = hasDraggedUp ? 1 : -1;
468
- if (dragDirection > 0 && isLastSnapPoint && snapPoints) {
469
- snapToPoint(snapPointsOffset[snapPoints.length - 1]);
470
- return;
471
- }
472
- if (isFirst && dragDirection < 0 && dismissible) closeDrawer();
473
- if (activeSnapPointIndex === null) return;
474
- snapToPoint(snapPointsOffset[activeSnapPointIndex + dragDirection]);
475
- return;
476
- }
477
- snapToPoint(closestSnapPoint);
478
- }
479
- function onDrag({ draggedDistance }) {
480
- if (activeSnapPointOffset === null) return;
481
- const newValue = direction === "bottom" || direction === "right" ? activeSnapPointOffset - draggedDistance : activeSnapPointOffset + draggedDistance;
482
- if ((direction === "bottom" || direction === "right") && newValue < snapPointsOffset[snapPointsOffset.length - 1]) return;
483
- if ((direction === "top" || direction === "left") && newValue > snapPointsOffset[snapPointsOffset.length - 1]) return;
484
- set(drawerRef.current, { transform: isVertical(direction) ? `translate3d(0, ${newValue}px, 0)` : `translate3d(${newValue}px, 0, 0)` });
485
- }
486
- function getPercentageDragged(absDraggedDistance, isDraggingDown) {
487
- if (!snapPoints || typeof activeSnapPointIndex !== "number" || !snapPointsOffset || fadeFromIndex === void 0) return null;
488
- const isOverlaySnapPoint = activeSnapPointIndex === fadeFromIndex - 1;
489
- if (activeSnapPointIndex >= fadeFromIndex && isDraggingDown) return 0;
490
- if (isOverlaySnapPoint && !isDraggingDown) return 1;
491
- if (!shouldFade && !isOverlaySnapPoint) return null;
492
- const targetSnapPointIndex = isOverlaySnapPoint ? activeSnapPointIndex + 1 : activeSnapPointIndex - 1;
493
- const snapPointDistance = isOverlaySnapPoint ? snapPointsOffset[targetSnapPointIndex] - snapPointsOffset[targetSnapPointIndex - 1] : snapPointsOffset[targetSnapPointIndex + 1] - snapPointsOffset[targetSnapPointIndex];
494
- const percentageDragged = absDraggedDistance / Math.abs(snapPointDistance);
495
- if (isOverlaySnapPoint) return 1 - percentageDragged;
496
- else return percentageDragged;
497
- }
498
- return {
499
- isLastSnapPoint,
500
- activeSnapPoint,
501
- shouldFade,
502
- getPercentageDragged,
503
- setActiveSnapPoint,
504
- activeSnapPointIndex,
505
- onRelease,
506
- onDrag,
507
- snapPointsOffset
508
- };
509
- }
510
- function useScaleBackground() {
511
- const { direction, isOpen, shouldScaleBackground, setBackgroundColorOnScale, noBodyStyles } = useDrawerContext();
512
- const timeoutIdRef = react$1.default.useRef(null);
513
- const initialBackgroundColor = (0, react$1.useMemo)(() => document.body.style.backgroundColor, []);
514
- function getScale() {
515
- return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth;
516
- }
517
- react$1.default.useEffect(() => {
518
- if (isOpen && shouldScaleBackground) {
519
- if (timeoutIdRef.current) clearTimeout(timeoutIdRef.current);
520
- const wrapper = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
521
- if (!wrapper) return;
522
- setBackgroundColorOnScale && !noBodyStyles && assignStyle(document.body, { background: "black" }), assignStyle(wrapper, {
523
- transformOrigin: isVertical(direction) ? "top" : "left",
524
- transitionProperty: "transform, border-radius",
525
- transitionDuration: `${TRANSITIONS.DURATION}s`,
526
- transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`
527
- });
528
- const wrapperStylesCleanup = assignStyle(wrapper, {
529
- borderRadius: `${BORDER_RADIUS}px`,
530
- overflow: "hidden",
531
- ...isVertical(direction) ? { transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)` } : { transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)` }
532
- });
533
- return () => {
534
- wrapperStylesCleanup();
535
- timeoutIdRef.current = window.setTimeout(() => {
536
- if (initialBackgroundColor) document.body.style.background = initialBackgroundColor;
537
- else document.body.style.removeProperty("background");
538
- }, TRANSITIONS.DURATION * 1e3);
539
- };
540
- }
541
- }, [
542
- isOpen,
543
- shouldScaleBackground,
544
- initialBackgroundColor
545
- ]);
546
- }
547
- var previousBodyPosition = null;
548
- /**
549
- * This hook is necessary to prevent buggy behavior on iOS devices (need to test on Android).
550
- * I won't get into too much detail about what bugs it solves, but so far I've found that setting the body to `position: fixed` is the most reliable way to prevent those bugs.
551
- * Issues that this hook solves:
552
- * https://github.com/emilkowalski/vaul/issues/435
553
- * https://github.com/emilkowalski/vaul/issues/433
554
- * And more that I discovered, but were just not reported.
555
- */ function usePositionFixed({ isOpen, modal, nested, hasBeenOpened, preventScrollRestoration, noBodyStyles }) {
556
- const [activeUrl, setActiveUrl] = react$1.default.useState(() => typeof window !== "undefined" ? window.location.href : "");
557
- const scrollPos = react$1.default.useRef(0);
558
- const setPositionFixed = react$1.default.useCallback(() => {
559
- if (!isSafari()) return;
560
- if (previousBodyPosition === null && isOpen && !noBodyStyles) {
561
- previousBodyPosition = {
562
- position: document.body.style.position,
563
- top: document.body.style.top,
564
- left: document.body.style.left,
565
- height: document.body.style.height,
566
- right: "unset"
567
- };
568
- const { scrollX, innerHeight } = window;
569
- document.body.style.setProperty("position", "fixed", "important");
570
- Object.assign(document.body.style, {
571
- top: `${-scrollPos.current}px`,
572
- left: `${-scrollX}px`,
573
- right: "0px",
574
- height: "auto"
575
- });
576
- window.setTimeout(() => window.requestAnimationFrame(() => {
577
- const bottomBarHeight = innerHeight - window.innerHeight;
578
- if (bottomBarHeight && scrollPos.current >= innerHeight) document.body.style.top = `${-(scrollPos.current + bottomBarHeight)}px`;
579
- }), 300);
580
- }
581
- }, [isOpen]);
582
- const restorePositionSetting = react$1.default.useCallback(() => {
583
- if (!isSafari()) return;
584
- if (previousBodyPosition !== null && !noBodyStyles) {
585
- const y = -parseInt(document.body.style.top, 10);
586
- const x = -parseInt(document.body.style.left, 10);
587
- Object.assign(document.body.style, previousBodyPosition);
588
- window.requestAnimationFrame(() => {
589
- if (preventScrollRestoration && activeUrl !== window.location.href) {
590
- setActiveUrl(window.location.href);
591
- return;
592
- }
593
- window.scrollTo(x, y);
594
- });
595
- previousBodyPosition = null;
596
- }
597
- }, [activeUrl]);
598
- react$1.default.useEffect(() => {
599
- function onScroll() {
600
- scrollPos.current = window.scrollY;
601
- }
602
- onScroll();
603
- window.addEventListener("scroll", onScroll);
604
- return () => {
605
- window.removeEventListener("scroll", onScroll);
606
- };
607
- }, []);
608
- react$1.default.useEffect(() => {
609
- if (!modal) return;
610
- return () => {
611
- if (typeof document === "undefined") return;
612
- if (!!document.querySelector("[data-vaul-drawer]")) return;
613
- restorePositionSetting();
614
- };
615
- }, [modal, restorePositionSetting]);
616
- react$1.default.useEffect(() => {
617
- if (nested || !hasBeenOpened) return;
618
- if (isOpen) {
619
- !window.matchMedia("(display-mode: standalone)").matches && setPositionFixed();
620
- if (!modal) window.setTimeout(() => {
621
- restorePositionSetting();
622
- }, 500);
623
- } else restorePositionSetting();
624
- }, [
625
- isOpen,
626
- hasBeenOpened,
627
- activeUrl,
628
- modal,
629
- nested,
630
- setPositionFixed,
631
- restorePositionSetting
632
- ]);
633
- return { restorePositionSetting };
634
- }
635
- function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground = false, setBackgroundColorOnScale = true, closeThreshold = CLOSE_THRESHOLD, scrollLockTimeout = SCROLL_LOCK_TIMEOUT, dismissible = true, handleOnly = false, fadeFromIndex = snapPoints && snapPoints.length - 1, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal = true, onClose, nested, noBodyStyles = false, direction = "bottom", defaultOpen = false, disablePreventScroll = true, snapToSequentialPoint = false, preventScrollRestoration = false, repositionInputs = true, onAnimationEnd, container, autoFocus = false }) {
636
- var _drawerRef_current, _drawerRef_current1;
637
- const [isOpen = false, setIsOpen] = useControllableState({
638
- defaultProp: defaultOpen,
639
- prop: openProp,
640
- onChange: (o) => {
641
- onOpenChange?.(o);
642
- if (!o && !nested) restorePositionSetting();
643
- setTimeout(() => {
644
- onAnimationEnd?.(o);
645
- }, TRANSITIONS.DURATION * 1e3);
646
- if (o && !modal) {
647
- if (typeof window !== "undefined") window.requestAnimationFrame(() => {
648
- document.body.style.pointerEvents = "auto";
649
- });
650
- }
651
- if (!o) document.body.style.pointerEvents = "auto";
652
- }
653
- });
654
- const [hasBeenOpened, setHasBeenOpened] = react$1.default.useState(false);
655
- const [isDragging, setIsDragging] = react$1.default.useState(false);
656
- const [justReleased, setJustReleased] = react$1.default.useState(false);
657
- const overlayRef = react$1.default.useRef(null);
658
- const openTime = react$1.default.useRef(null);
659
- const dragStartTime = react$1.default.useRef(null);
660
- const dragEndTime = react$1.default.useRef(null);
661
- const lastTimeDragPrevented = react$1.default.useRef(null);
662
- const isAllowedToDrag = react$1.default.useRef(false);
663
- const nestedOpenChangeTimer = react$1.default.useRef(null);
664
- const pointerStart = react$1.default.useRef(0);
665
- const keyboardIsOpen = react$1.default.useRef(false);
666
- const shouldAnimate = react$1.default.useRef(!defaultOpen);
667
- const previousDiffFromInitial = react$1.default.useRef(0);
668
- const drawerRef = react$1.default.useRef(null);
669
- const drawerHeightRef = react$1.default.useRef(((_drawerRef_current = drawerRef.current) == null ? void 0 : _drawerRef_current.getBoundingClientRect().height) || 0);
670
- const drawerWidthRef = react$1.default.useRef(((_drawerRef_current1 = drawerRef.current) == null ? void 0 : _drawerRef_current1.getBoundingClientRect().width) || 0);
671
- const initialDrawerHeight = react$1.default.useRef(0);
672
- const { activeSnapPoint, activeSnapPointIndex, setActiveSnapPoint, onRelease: onReleaseSnapPoints, snapPointsOffset, onDrag: onDragSnapPoints, shouldFade, getPercentageDragged: getSnapPointsPercentageDragged } = useSnapPoints({
673
- snapPoints,
674
- activeSnapPointProp,
675
- setActiveSnapPointProp,
676
- drawerRef,
677
- fadeFromIndex,
678
- overlayRef,
679
- onSnapPointChange: react$1.default.useCallback((activeSnapPointIndex) => {
680
- if (snapPoints && activeSnapPointIndex === snapPointsOffset.length - 1) openTime.current = /* @__PURE__ */ new Date();
681
- }, []),
682
- direction,
683
- container,
684
- snapToSequentialPoint
685
- });
686
- usePreventScroll({ isDisabled: !isOpen || isDragging || !modal || justReleased || !hasBeenOpened || !repositionInputs || !disablePreventScroll });
687
- const { restorePositionSetting } = usePositionFixed({
688
- isOpen,
689
- modal,
690
- nested: nested != null ? nested : false,
691
- hasBeenOpened,
692
- preventScrollRestoration,
693
- noBodyStyles
694
- });
695
- function getScale() {
696
- return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth;
697
- }
698
- function onPress(event) {
699
- var _drawerRef_current, _drawerRef_current1;
700
- if (!dismissible && !snapPoints) return;
701
- if (drawerRef.current && !drawerRef.current.contains(event.target)) return;
702
- drawerHeightRef.current = ((_drawerRef_current = drawerRef.current) == null ? void 0 : _drawerRef_current.getBoundingClientRect().height) || 0;
703
- drawerWidthRef.current = ((_drawerRef_current1 = drawerRef.current) == null ? void 0 : _drawerRef_current1.getBoundingClientRect().width) || 0;
704
- setIsDragging(true);
705
- dragStartTime.current = /* @__PURE__ */ new Date();
706
- if (isIOS()) window.addEventListener("touchend", () => isAllowedToDrag.current = false, { once: true });
707
- event.target.setPointerCapture(event.pointerId);
708
- pointerStart.current = isVertical(direction) ? event.pageY : event.pageX;
709
- }
710
- function shouldDrag(el, isDraggingInDirection) {
711
- var _window_getSelection;
712
- let element = el;
713
- const highlightedText = (_window_getSelection = window.getSelection()) == null ? void 0 : _window_getSelection.toString();
714
- const swipeAmount = drawerRef.current ? getTranslate(drawerRef.current, direction) : null;
715
- const date = /* @__PURE__ */ new Date();
716
- if (element.tagName === "SELECT") return false;
717
- if (element.hasAttribute("data-vaul-no-drag") || element.closest("[data-vaul-no-drag]")) return false;
718
- if (direction === "right" || direction === "left") return true;
719
- if (openTime.current && date.getTime() - openTime.current.getTime() < 500) return false;
720
- if (swipeAmount !== null) {
721
- if (direction === "bottom" ? swipeAmount > 0 : swipeAmount < 0) return true;
722
- }
723
- if (highlightedText && highlightedText.length > 0) return false;
724
- if (lastTimeDragPrevented.current && date.getTime() - lastTimeDragPrevented.current.getTime() < scrollLockTimeout && swipeAmount === 0) {
725
- lastTimeDragPrevented.current = date;
726
- return false;
727
- }
728
- if (isDraggingInDirection) {
729
- lastTimeDragPrevented.current = date;
730
- return false;
731
- }
732
- while (element) {
733
- if (element.scrollHeight > element.clientHeight) {
734
- if (element.scrollTop !== 0) {
735
- lastTimeDragPrevented.current = /* @__PURE__ */ new Date();
736
- return false;
737
- }
738
- if (element.getAttribute("role") === "dialog") return true;
739
- }
740
- element = element.parentNode;
741
- }
742
- return true;
743
- }
744
- function onDrag(event) {
745
- if (!drawerRef.current) return;
746
- if (isDragging) {
747
- const directionMultiplier = direction === "bottom" || direction === "right" ? 1 : -1;
748
- const draggedDistance = (pointerStart.current - (isVertical(direction) ? event.pageY : event.pageX)) * directionMultiplier;
749
- const isDraggingInDirection = draggedDistance > 0;
750
- const noCloseSnapPointsPreCondition = snapPoints && !dismissible && !isDraggingInDirection;
751
- if (noCloseSnapPointsPreCondition && activeSnapPointIndex === 0) return;
752
- const absDraggedDistance = Math.abs(draggedDistance);
753
- const wrapper = document.querySelector("[data-vaul-drawer-wrapper]");
754
- let percentageDragged = absDraggedDistance / (direction === "bottom" || direction === "top" ? drawerHeightRef.current : drawerWidthRef.current);
755
- const snapPointPercentageDragged = getSnapPointsPercentageDragged(absDraggedDistance, isDraggingInDirection);
756
- if (snapPointPercentageDragged !== null) percentageDragged = snapPointPercentageDragged;
757
- if (noCloseSnapPointsPreCondition && percentageDragged >= 1) return;
758
- if (!isAllowedToDrag.current && !shouldDrag(event.target, isDraggingInDirection)) return;
759
- drawerRef.current.classList.add(DRAG_CLASS);
760
- isAllowedToDrag.current = true;
761
- set(drawerRef.current, { transition: "none" });
762
- set(overlayRef.current, { transition: "none" });
763
- if (snapPoints) onDragSnapPoints({ draggedDistance });
764
- if (isDraggingInDirection && !snapPoints) {
765
- const dampenedDraggedDistance = dampenValue(draggedDistance);
766
- const translateValue = Math.min(dampenedDraggedDistance * -1, 0) * directionMultiplier;
767
- set(drawerRef.current, { transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)` });
768
- return;
769
- }
770
- const opacityValue = 1 - percentageDragged;
771
- if (shouldFade || fadeFromIndex && activeSnapPointIndex === fadeFromIndex - 1) {
772
- onDragProp?.(event, percentageDragged);
773
- set(overlayRef.current, {
774
- opacity: `${opacityValue}`,
775
- transition: "none"
776
- }, true);
777
- }
778
- if (wrapper && overlayRef.current && shouldScaleBackground) {
779
- const scaleValue = Math.min(getScale() + percentageDragged * (1 - getScale()), 1);
780
- const borderRadiusValue = 8 - percentageDragged * 8;
781
- const translateValue = Math.max(0, 14 - percentageDragged * 14);
782
- set(wrapper, {
783
- borderRadius: `${borderRadiusValue}px`,
784
- transform: isVertical(direction) ? `scale(${scaleValue}) translate3d(0, ${translateValue}px, 0)` : `scale(${scaleValue}) translate3d(${translateValue}px, 0, 0)`,
785
- transition: "none"
786
- }, true);
787
- }
788
- if (!snapPoints) {
789
- const translateValue = absDraggedDistance * directionMultiplier;
790
- set(drawerRef.current, { transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)` });
791
- }
792
- }
793
- }
794
- react$1.default.useEffect(() => {
795
- window.requestAnimationFrame(() => {
796
- shouldAnimate.current = true;
797
- });
798
- }, []);
799
- react$1.default.useEffect(() => {
800
- var _window_visualViewport;
801
- function onVisualViewportChange() {
802
- if (!drawerRef.current || !repositionInputs) return;
803
- const focusedElement = document.activeElement;
804
- if (isInput(focusedElement) || keyboardIsOpen.current) {
805
- var _window_visualViewport;
806
- const visualViewportHeight = ((_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.height) || 0;
807
- const totalHeight = window.innerHeight;
808
- let diffFromInitial = totalHeight - visualViewportHeight;
809
- const drawerHeight = drawerRef.current.getBoundingClientRect().height || 0;
810
- const isTallEnough = drawerHeight > totalHeight * .8;
811
- if (!initialDrawerHeight.current) initialDrawerHeight.current = drawerHeight;
812
- const offsetFromTop = drawerRef.current.getBoundingClientRect().top;
813
- if (Math.abs(previousDiffFromInitial.current - diffFromInitial) > 60) keyboardIsOpen.current = !keyboardIsOpen.current;
814
- if (snapPoints && snapPoints.length > 0 && snapPointsOffset && activeSnapPointIndex) {
815
- const activeSnapPointHeight = snapPointsOffset[activeSnapPointIndex] || 0;
816
- diffFromInitial += activeSnapPointHeight;
817
- }
818
- previousDiffFromInitial.current = diffFromInitial;
819
- if (drawerHeight > visualViewportHeight || keyboardIsOpen.current) {
820
- const height = drawerRef.current.getBoundingClientRect().height;
821
- let newDrawerHeight = height;
822
- if (height > visualViewportHeight) newDrawerHeight = visualViewportHeight - (isTallEnough ? offsetFromTop : WINDOW_TOP_OFFSET);
823
- if (fixed) drawerRef.current.style.height = `${height - Math.max(diffFromInitial, 0)}px`;
824
- else drawerRef.current.style.height = `${Math.max(newDrawerHeight, visualViewportHeight - offsetFromTop)}px`;
825
- } else if (!isMobileFirefox()) drawerRef.current.style.height = `${initialDrawerHeight.current}px`;
826
- if (snapPoints && snapPoints.length > 0 && !keyboardIsOpen.current) drawerRef.current.style.bottom = `0px`;
827
- else drawerRef.current.style.bottom = `${Math.max(diffFromInitial, 0)}px`;
828
- }
829
- }
830
- (_window_visualViewport = window.visualViewport) == null || _window_visualViewport.addEventListener("resize", onVisualViewportChange);
831
- return () => {
832
- var _window_visualViewport;
833
- return (_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.removeEventListener("resize", onVisualViewportChange);
834
- };
835
- }, [
836
- activeSnapPointIndex,
837
- snapPoints,
838
- snapPointsOffset
839
- ]);
840
- function closeDrawer(fromWithin) {
841
- cancelDrag();
842
- onClose?.();
843
- if (!fromWithin) setIsOpen(false);
844
- setTimeout(() => {
845
- if (snapPoints) setActiveSnapPoint(snapPoints[0]);
846
- }, TRANSITIONS.DURATION * 1e3);
847
- }
848
- function resetDrawer() {
849
- if (!drawerRef.current) return;
850
- const wrapper = document.querySelector("[data-vaul-drawer-wrapper]");
851
- const currentSwipeAmount = getTranslate(drawerRef.current, direction);
852
- set(drawerRef.current, {
853
- transform: "translate3d(0, 0, 0)",
854
- transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`
855
- });
856
- set(overlayRef.current, {
857
- transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
858
- opacity: "1"
859
- });
860
- if (shouldScaleBackground && currentSwipeAmount && currentSwipeAmount > 0 && isOpen) set(wrapper, {
861
- borderRadius: `${BORDER_RADIUS}px`,
862
- overflow: "hidden",
863
- ...isVertical(direction) ? {
864
- transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
865
- transformOrigin: "top"
866
- } : {
867
- transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
868
- transformOrigin: "left"
869
- },
870
- transitionProperty: "transform, border-radius",
871
- transitionDuration: `${TRANSITIONS.DURATION}s`,
872
- transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`
873
- }, true);
874
- }
875
- function cancelDrag() {
876
- if (!isDragging || !drawerRef.current) return;
877
- drawerRef.current.classList.remove(DRAG_CLASS);
878
- isAllowedToDrag.current = false;
879
- setIsDragging(false);
880
- dragEndTime.current = /* @__PURE__ */ new Date();
881
- }
882
- function onRelease(event) {
883
- if (!isDragging || !drawerRef.current) return;
884
- drawerRef.current.classList.remove(DRAG_CLASS);
885
- isAllowedToDrag.current = false;
886
- setIsDragging(false);
887
- dragEndTime.current = /* @__PURE__ */ new Date();
888
- const swipeAmount = getTranslate(drawerRef.current, direction);
889
- if (!event || !shouldDrag(event.target, false) || !swipeAmount || Number.isNaN(swipeAmount)) return;
890
- if (dragStartTime.current === null) return;
891
- const timeTaken = dragEndTime.current.getTime() - dragStartTime.current.getTime();
892
- const distMoved = pointerStart.current - (isVertical(direction) ? event.pageY : event.pageX);
893
- const velocity = Math.abs(distMoved) / timeTaken;
894
- if (velocity > .05) {
895
- setJustReleased(true);
896
- setTimeout(() => {
897
- setJustReleased(false);
898
- }, 200);
899
- }
900
- if (snapPoints) {
901
- onReleaseSnapPoints({
902
- draggedDistance: distMoved * (direction === "bottom" || direction === "right" ? 1 : -1),
903
- closeDrawer,
904
- velocity,
905
- dismissible
906
- });
907
- onReleaseProp?.(event, true);
908
- return;
909
- }
910
- if (direction === "bottom" || direction === "right" ? distMoved > 0 : distMoved < 0) {
911
- resetDrawer();
912
- onReleaseProp?.(event, true);
913
- return;
914
- }
915
- if (velocity > VELOCITY_THRESHOLD) {
916
- closeDrawer();
917
- onReleaseProp?.(event, false);
918
- return;
919
- }
920
- var _drawerRef_current_getBoundingClientRect_height;
921
- const visibleDrawerHeight = Math.min((_drawerRef_current_getBoundingClientRect_height = drawerRef.current.getBoundingClientRect().height) != null ? _drawerRef_current_getBoundingClientRect_height : 0, window.innerHeight);
922
- var _drawerRef_current_getBoundingClientRect_width;
923
- const visibleDrawerWidth = Math.min((_drawerRef_current_getBoundingClientRect_width = drawerRef.current.getBoundingClientRect().width) != null ? _drawerRef_current_getBoundingClientRect_width : 0, window.innerWidth);
924
- if (Math.abs(swipeAmount) >= (direction === "left" || direction === "right" ? visibleDrawerWidth : visibleDrawerHeight) * closeThreshold) {
925
- closeDrawer();
926
- onReleaseProp?.(event, false);
927
- return;
928
- }
929
- onReleaseProp?.(event, true);
930
- resetDrawer();
931
- }
932
- react$1.default.useEffect(() => {
933
- if (isOpen) {
934
- set(document.documentElement, { scrollBehavior: "auto" });
935
- openTime.current = /* @__PURE__ */ new Date();
936
- }
937
- return () => {
938
- reset(document.documentElement, "scrollBehavior");
939
- };
940
- }, [isOpen]);
941
- function onNestedOpenChange(o) {
942
- const scale = o ? (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth : 1;
943
- const initialTranslate = o ? -16 : 0;
944
- if (nestedOpenChangeTimer.current) window.clearTimeout(nestedOpenChangeTimer.current);
945
- set(drawerRef.current, {
946
- transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
947
- transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${initialTranslate}px, 0)` : `scale(${scale}) translate3d(${initialTranslate}px, 0, 0)`
948
- });
949
- if (!o && drawerRef.current) nestedOpenChangeTimer.current = setTimeout(() => {
950
- const translateValue = getTranslate(drawerRef.current, direction);
951
- set(drawerRef.current, {
952
- transition: "none",
953
- transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`
954
- });
955
- }, 500);
956
- }
957
- function onNestedDrag(_event, percentageDragged) {
958
- if (percentageDragged < 0) return;
959
- const initialScale = (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth;
960
- const newScale = initialScale + percentageDragged * (1 - initialScale);
961
- const newTranslate = -16 + percentageDragged * NESTED_DISPLACEMENT;
962
- set(drawerRef.current, {
963
- transform: isVertical(direction) ? `scale(${newScale}) translate3d(0, ${newTranslate}px, 0)` : `scale(${newScale}) translate3d(${newTranslate}px, 0, 0)`,
964
- transition: "none"
965
- });
966
- }
967
- function onNestedRelease(_event, o) {
968
- const dim = isVertical(direction) ? window.innerHeight : window.innerWidth;
969
- const scale = o ? (dim - NESTED_DISPLACEMENT) / dim : 1;
970
- const translate = o ? -16 : 0;
971
- if (o) set(drawerRef.current, {
972
- transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
973
- transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${translate}px, 0)` : `scale(${scale}) translate3d(${translate}px, 0, 0)`
974
- });
975
- }
976
- react$1.default.useEffect(() => {
977
- if (!modal) window.requestAnimationFrame(() => {
978
- document.body.style.pointerEvents = "auto";
979
- });
980
- }, [modal]);
981
- return /*#__PURE__*/ react$1.default.createElement(_radix_ui_react_dialog.Root, {
982
- defaultOpen,
983
- onOpenChange: (open) => {
984
- if (!dismissible && !open) return;
985
- if (open) setHasBeenOpened(true);
986
- else closeDrawer(true);
987
- setIsOpen(open);
988
- },
989
- open: isOpen
990
- }, /*#__PURE__*/ react$1.default.createElement(DrawerContext.Provider, { value: {
991
- activeSnapPoint,
992
- snapPoints,
993
- setActiveSnapPoint,
994
- drawerRef,
995
- overlayRef,
996
- onOpenChange,
997
- onPress,
998
- onRelease,
999
- onDrag,
1000
- dismissible,
1001
- shouldAnimate,
1002
- handleOnly,
1003
- isOpen,
1004
- isDragging,
1005
- shouldFade,
1006
- closeDrawer,
1007
- onNestedDrag,
1008
- onNestedOpenChange,
1009
- onNestedRelease,
1010
- keyboardIsOpen,
1011
- modal,
1012
- snapPointsOffset,
1013
- activeSnapPointIndex,
1014
- direction,
1015
- shouldScaleBackground,
1016
- setBackgroundColorOnScale,
1017
- noBodyStyles,
1018
- container,
1019
- autoFocus
1020
- } }, children));
1021
- }
1022
- var Overlay = /*#__PURE__*/ react$1.default.forwardRef(function({ ...rest }, ref) {
1023
- const { overlayRef, snapPoints, onRelease, shouldFade, isOpen, modal, shouldAnimate } = useDrawerContext();
1024
- const composedRef = useComposedRefs(ref, overlayRef);
1025
- const hasSnapPoints = snapPoints && snapPoints.length > 0;
1026
- if (!modal) return null;
1027
- const onMouseUp = react$1.default.useCallback((event) => onRelease(event), [onRelease]);
1028
- return /*#__PURE__*/ react$1.default.createElement(_radix_ui_react_dialog.Overlay, {
1029
- onMouseUp,
1030
- ref: composedRef,
1031
- "data-vaul-overlay": "",
1032
- "data-vaul-snap-points": isOpen && hasSnapPoints ? "true" : "false",
1033
- "data-vaul-snap-points-overlay": isOpen && shouldFade ? "true" : "false",
1034
- "data-vaul-animate": (shouldAnimate == null ? void 0 : shouldAnimate.current) ? "true" : "false",
1035
- ...rest
1036
- });
1037
- });
1038
- Overlay.displayName = "Drawer.Overlay";
1039
- var Content = /*#__PURE__*/ react$1.default.forwardRef(function({ onPointerDownOutside, style, onOpenAutoFocus, ...rest }, ref) {
1040
- const { drawerRef, onPress, onRelease, onDrag, keyboardIsOpen, snapPointsOffset, activeSnapPointIndex, modal, isOpen, direction, snapPoints, container, handleOnly, shouldAnimate, autoFocus } = useDrawerContext();
1041
- const [delayedSnapPoints, setDelayedSnapPoints] = react$1.default.useState(false);
1042
- const composedRef = useComposedRefs(ref, drawerRef);
1043
- const pointerStartRef = react$1.default.useRef(null);
1044
- const lastKnownPointerEventRef = react$1.default.useRef(null);
1045
- const wasBeyondThePointRef = react$1.default.useRef(false);
1046
- const hasSnapPoints = snapPoints && snapPoints.length > 0;
1047
- useScaleBackground();
1048
- const isDeltaInDirection = (delta, direction, threshold = 0) => {
1049
- if (wasBeyondThePointRef.current) return true;
1050
- const deltaY = Math.abs(delta.y);
1051
- const deltaX = Math.abs(delta.x);
1052
- const isDeltaX = deltaX > deltaY;
1053
- const dFactor = ["bottom", "right"].includes(direction) ? 1 : -1;
1054
- if (direction === "left" || direction === "right") {
1055
- if (!(delta.x * dFactor < 0) && deltaX >= 0 && deltaX <= threshold) return isDeltaX;
1056
- } else if (!(delta.y * dFactor < 0) && deltaY >= 0 && deltaY <= threshold) return !isDeltaX;
1057
- wasBeyondThePointRef.current = true;
1058
- return true;
1059
- };
1060
- react$1.default.useEffect(() => {
1061
- if (hasSnapPoints) window.requestAnimationFrame(() => {
1062
- setDelayedSnapPoints(true);
1063
- });
1064
- }, []);
1065
- function handleOnPointerUp(event) {
1066
- pointerStartRef.current = null;
1067
- wasBeyondThePointRef.current = false;
1068
- onRelease(event);
1069
- }
1070
- return /*#__PURE__*/ react$1.default.createElement(_radix_ui_react_dialog.Content, {
1071
- "data-vaul-drawer-direction": direction,
1072
- "data-vaul-drawer": "",
1073
- "data-vaul-delayed-snap-points": delayedSnapPoints ? "true" : "false",
1074
- "data-vaul-snap-points": isOpen && hasSnapPoints ? "true" : "false",
1075
- "data-vaul-custom-container": container ? "true" : "false",
1076
- "data-vaul-animate": (shouldAnimate == null ? void 0 : shouldAnimate.current) ? "true" : "false",
1077
- ...rest,
1078
- ref: composedRef,
1079
- style: snapPointsOffset && snapPointsOffset.length > 0 ? {
1080
- "--snap-point-height": `${snapPointsOffset[activeSnapPointIndex != null ? activeSnapPointIndex : 0]}px`,
1081
- ...style
1082
- } : style,
1083
- onPointerDown: (event) => {
1084
- if (handleOnly) return;
1085
- rest.onPointerDown == null || rest.onPointerDown.call(rest, event);
1086
- pointerStartRef.current = {
1087
- x: event.pageX,
1088
- y: event.pageY
1089
- };
1090
- onPress(event);
1091
- },
1092
- onOpenAutoFocus: (e) => {
1093
- onOpenAutoFocus?.(e);
1094
- if (!autoFocus) e.preventDefault();
1095
- },
1096
- onPointerDownOutside: (e) => {
1097
- onPointerDownOutside?.(e);
1098
- if (!modal || e.defaultPrevented) {
1099
- e.preventDefault();
1100
- return;
1101
- }
1102
- if (keyboardIsOpen.current) keyboardIsOpen.current = false;
1103
- },
1104
- onFocusOutside: (e) => {
1105
- if (!modal) {
1106
- e.preventDefault();
1107
- return;
1108
- }
1109
- },
1110
- onPointerMove: (event) => {
1111
- lastKnownPointerEventRef.current = event;
1112
- if (handleOnly) return;
1113
- rest.onPointerMove == null || rest.onPointerMove.call(rest, event);
1114
- if (!pointerStartRef.current) return;
1115
- const yPosition = event.pageY - pointerStartRef.current.y;
1116
- const xPosition = event.pageX - pointerStartRef.current.x;
1117
- const swipeStartThreshold = event.pointerType === "touch" ? 10 : 2;
1118
- if (isDeltaInDirection({
1119
- x: xPosition,
1120
- y: yPosition
1121
- }, direction, swipeStartThreshold)) onDrag(event);
1122
- else if (Math.abs(xPosition) > swipeStartThreshold || Math.abs(yPosition) > swipeStartThreshold) pointerStartRef.current = null;
1123
- },
1124
- onPointerUp: (event) => {
1125
- rest.onPointerUp == null || rest.onPointerUp.call(rest, event);
1126
- pointerStartRef.current = null;
1127
- wasBeyondThePointRef.current = false;
1128
- onRelease(event);
1129
- },
1130
- onPointerOut: (event) => {
1131
- rest.onPointerOut == null || rest.onPointerOut.call(rest, event);
1132
- handleOnPointerUp(lastKnownPointerEventRef.current);
1133
- },
1134
- onContextMenu: (event) => {
1135
- rest.onContextMenu == null || rest.onContextMenu.call(rest, event);
1136
- if (lastKnownPointerEventRef.current) handleOnPointerUp(lastKnownPointerEventRef.current);
1137
- }
1138
- });
1139
- });
1140
- Content.displayName = "Drawer.Content";
1141
- var LONG_HANDLE_PRESS_TIMEOUT = 250;
1142
- var DOUBLE_TAP_TIMEOUT = 120;
1143
- var Handle = /*#__PURE__*/ react$1.default.forwardRef(function({ preventCycle = false, children, ...rest }, ref) {
1144
- const { closeDrawer, isDragging, snapPoints, activeSnapPoint, setActiveSnapPoint, dismissible, handleOnly, isOpen, onPress, onDrag } = useDrawerContext();
1145
- const closeTimeoutIdRef = react$1.default.useRef(null);
1146
- const shouldCancelInteractionRef = react$1.default.useRef(false);
1147
- function handleStartCycle() {
1148
- if (shouldCancelInteractionRef.current) {
1149
- handleCancelInteraction();
1150
- return;
1151
- }
1152
- window.setTimeout(() => {
1153
- handleCycleSnapPoints();
1154
- }, DOUBLE_TAP_TIMEOUT);
1155
- }
1156
- function handleCycleSnapPoints() {
1157
- if (isDragging || preventCycle || shouldCancelInteractionRef.current) {
1158
- handleCancelInteraction();
1159
- return;
1160
- }
1161
- handleCancelInteraction();
1162
- if (!snapPoints || snapPoints.length === 0) {
1163
- if (!dismissible) closeDrawer();
1164
- return;
1165
- }
1166
- if (activeSnapPoint === snapPoints[snapPoints.length - 1] && dismissible) {
1167
- closeDrawer();
1168
- return;
1169
- }
1170
- const currentSnapIndex = snapPoints.findIndex((point) => point === activeSnapPoint);
1171
- if (currentSnapIndex === -1) return;
1172
- const nextSnapPoint = snapPoints[currentSnapIndex + 1];
1173
- setActiveSnapPoint(nextSnapPoint);
1174
- }
1175
- function handleStartInteraction() {
1176
- closeTimeoutIdRef.current = window.setTimeout(() => {
1177
- shouldCancelInteractionRef.current = true;
1178
- }, LONG_HANDLE_PRESS_TIMEOUT);
1179
- }
1180
- function handleCancelInteraction() {
1181
- if (closeTimeoutIdRef.current) window.clearTimeout(closeTimeoutIdRef.current);
1182
- shouldCancelInteractionRef.current = false;
1183
- }
1184
- return /*#__PURE__*/ react$1.default.createElement("div", {
1185
- onClick: handleStartCycle,
1186
- onPointerCancel: handleCancelInteraction,
1187
- onPointerDown: (e) => {
1188
- if (handleOnly) onPress(e);
1189
- handleStartInteraction();
1190
- },
1191
- onPointerMove: (e) => {
1192
- if (handleOnly) onDrag(e);
1193
- },
1194
- ref,
1195
- "data-vaul-drawer-visible": isOpen ? "true" : "false",
1196
- "data-vaul-handle": "",
1197
- "aria-hidden": "true",
1198
- ...rest
1199
- }, /*#__PURE__*/ react$1.default.createElement("span", {
1200
- "data-vaul-handle-hitarea": "",
1201
- "aria-hidden": "true"
1202
- }, children));
1203
- });
1204
- Handle.displayName = "Drawer.Handle";
1205
- function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }) {
1206
- const { onNestedDrag, onNestedOpenChange, onNestedRelease } = useDrawerContext();
1207
- if (!onNestedDrag) throw new Error("Drawer.NestedRoot must be placed in another drawer");
1208
- return /*#__PURE__*/ react$1.default.createElement(Root, {
1209
- nested: true,
1210
- open: nestedIsOpen,
1211
- onClose: () => {
1212
- onNestedOpenChange(false);
1213
- },
1214
- onDrag: (e, p) => {
1215
- onNestedDrag(e, p);
1216
- onDrag?.(e, p);
1217
- },
1218
- onOpenChange: (o) => {
1219
- if (o) onNestedOpenChange(o);
1220
- onOpenChange?.(o);
1221
- },
1222
- onRelease: onNestedRelease,
1223
- ...rest
1224
- });
1225
- }
1226
- function Portal(props) {
1227
- const context = useDrawerContext();
1228
- const { container = context.container, ...portalProps } = props;
1229
- return /*#__PURE__*/ react$1.default.createElement(_radix_ui_react_dialog.Portal, {
1230
- container,
1231
- ...portalProps
1232
- });
1233
- }
1234
- var Drawer = {
1235
- Root,
1236
- NestedRoot,
1237
- Content,
1238
- Overlay,
1239
- Trigger: _radix_ui_react_dialog.Trigger,
1240
- Portal,
1241
- Handle,
1242
- Close: _radix_ui_react_dialog.Close,
1243
- Title: _radix_ui_react_dialog.Title,
1244
- Description: _radix_ui_react_dialog.Description
1245
- };
1246
- exports.Content = Content;
1247
- exports.Drawer = Drawer;
1248
- exports.Handle = Handle;
1249
- exports.NestedRoot = NestedRoot;
1250
- exports.Overlay = Overlay;
1251
- exports.Portal = Portal;
1252
- exports.Root = Root;