@vlrc-fe/components 3.0.3 → 3.0.5

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 (701) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +10 -1
  3. package/bin/registry.mjs +1124 -0
  4. package/bin/vlrc.mjs +102 -7
  5. package/dist/ConfirmModal.cjs +268 -1
  6. package/dist/ConfirmModal.d.ts +5 -21
  7. package/dist/ConfirmModal.d.ts.map +1 -1
  8. package/dist/ConfirmModal.js +120 -111
  9. package/dist/DataTable/DataTable.cjs +203 -1
  10. package/dist/DataTable/DataTable.js +161 -120
  11. package/dist/DataTable/components/DataTableColumnHeader.cjs +214 -1
  12. package/dist/DataTable/components/DataTableColumnHeader.d.ts +3 -3
  13. package/dist/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
  14. package/dist/DataTable/components/DataTableColumnHeader.js +201 -103
  15. package/dist/DataTable/components/DataTableFacetedFilter.cjs +332 -1
  16. package/dist/DataTable/components/DataTableFacetedFilter.d.ts +3 -3
  17. package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
  18. package/dist/DataTable/components/DataTableFacetedFilter.js +285 -181
  19. package/dist/DataTable/components/DataTablePagination.cjs +200 -1
  20. package/dist/DataTable/components/DataTablePagination.js +188 -91
  21. package/dist/DataTable/components/DataTableRowActions.cjs +172 -1
  22. package/dist/DataTable/components/DataTableRowActions.js +161 -62
  23. package/dist/DataTable/components/DataTableTable.cjs +100 -1
  24. package/dist/DataTable/components/DataTableTable.js +87 -35
  25. package/dist/DataTable/components/DataTableToolbar.cjs +112 -1
  26. package/dist/DataTable/components/DataTableToolbar.js +106 -44
  27. package/dist/DataTable/components/DataTableViewOptions.cjs +113 -1
  28. package/dist/DataTable/components/DataTableViewOptions.js +105 -44
  29. package/dist/DataTable/render/createColumns.cjs +84 -1
  30. package/dist/DataTable/render/createColumns.js +65 -44
  31. package/dist/DataTable/render/defaults.cjs +38 -1
  32. package/dist/DataTable/render/defaults.js +18 -13
  33. package/dist/Dropdown/Dropdown.cjs +255 -1
  34. package/dist/Dropdown/Dropdown.js +138 -108
  35. package/dist/Form/Form.cjs +439 -1
  36. package/dist/Form/Form.js +417 -206
  37. package/dist/Form/FormDatePicker/FormDatePicker.cjs +84 -1
  38. package/dist/Form/FormDatePicker/FormDatePicker.js +68 -65
  39. package/dist/Form/FormDatePicker/MonthPickerPanel.cjs +217 -1
  40. package/dist/Form/FormDatePicker/MonthPickerPanel.js +194 -101
  41. package/dist/Form/FormDatePicker/RangeDatePicker.cjs +144 -1
  42. package/dist/Form/FormDatePicker/RangeDatePicker.js +94 -77
  43. package/dist/Form/FormDatePicker/SingleDatePicker.cjs +191 -1
  44. package/dist/Form/FormDatePicker/SingleDatePicker.js +144 -114
  45. package/dist/Form/FormDatePicker/TimeInput.cjs +172 -1
  46. package/dist/Form/FormDatePicker/TimeInput.js +162 -79
  47. package/dist/Form/FormDatePicker/TimePicker.cjs +107 -1
  48. package/dist/Form/FormDatePicker/TimePicker.js +58 -43
  49. package/dist/Form/FormDatePicker/YearPickerPanel.cjs +184 -1
  50. package/dist/Form/FormDatePicker/YearPickerPanel.js +164 -84
  51. package/dist/Form/FormDatePicker/types.cjs +10 -1
  52. package/dist/Form/FormDatePicker/types.js +8 -3
  53. package/dist/Form/FormDatePicker/useFormDatePicker.cjs +70 -1
  54. package/dist/Form/FormDatePicker/useFormDatePicker.js +58 -31
  55. package/dist/Form/FormFileUpload/FileUpload.cjs +603 -1
  56. package/dist/Form/FormFileUpload/FileUpload.js +452 -306
  57. package/dist/Form/FormFileUpload/index.cjs +175 -1
  58. package/dist/Form/FormFileUpload/index.js +164 -50
  59. package/dist/Form/FormMultiSelect/FormMultiSelect.cjs +46 -1
  60. package/dist/Form/FormMultiSelect/FormMultiSelect.js +42 -22
  61. package/dist/Form/FormNumberInput/FormNumberInput.cjs +71 -1
  62. package/dist/Form/FormNumberInput/FormNumberInput.js +60 -58
  63. package/dist/Form/FormNumberInput/StepperControls.cjs +104 -1
  64. package/dist/Form/FormNumberInput/StepperControls.js +78 -43
  65. package/dist/Form/FormNumberInput/useFormNumberInput.cjs +72 -1
  66. package/dist/Form/FormNumberInput/useFormNumberInput.js +68 -39
  67. package/dist/Form/FormRadioGroup/FormRadio.cjs +65 -1
  68. package/dist/Form/FormRadioGroup/FormRadio.js +38 -38
  69. package/dist/Form/FormRadioGroup/useFormRadio.cjs +38 -1
  70. package/dist/Form/FormRadioGroup/useFormRadio.js +27 -16
  71. package/dist/Form/FormSelect/FormSelect.cjs +46 -1
  72. package/dist/Form/FormSelect/FormSelect.js +40 -26
  73. package/dist/Form/FormSelect/useFormSelect.cjs +58 -1
  74. package/dist/Form/FormSelect/useFormSelect.js +52 -43
  75. package/dist/Icons/Icons.cjs +155 -1
  76. package/dist/Icons/Icons.js +142 -142
  77. package/dist/Modal.cjs +131 -1
  78. package/dist/Modal.d.ts +2 -14
  79. package/dist/Modal.d.ts.map +1 -1
  80. package/dist/Modal.js +63 -54
  81. package/dist/MultiSelect/MultiSelect.cjs +210 -1
  82. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  83. package/dist/MultiSelect/MultiSelect.js +126 -117
  84. package/dist/MultiSelect/renderers.cjs +571 -1
  85. package/dist/MultiSelect/renderers.js +508 -309
  86. package/dist/MultiSelect/useMultiSelect.cjs +244 -1
  87. package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
  88. package/dist/MultiSelect/useMultiSelect.js +208 -127
  89. package/dist/MultiSelect/utils.cjs +123 -1
  90. package/dist/MultiSelect/utils.js +79 -51
  91. package/dist/Select/BaseSelect.cjs +265 -1
  92. package/dist/Select/BaseSelect.js +165 -126
  93. package/dist/Select/MultiSelectTags.cjs +129 -1
  94. package/dist/Select/MultiSelectTags.js +82 -56
  95. package/dist/Typography/Blockquote.cjs +79 -1
  96. package/dist/Typography/Blockquote.js +40 -38
  97. package/dist/Typography/Code.cjs +131 -1
  98. package/dist/Typography/Code.js +64 -58
  99. package/dist/Typography/Link.cjs +139 -1
  100. package/dist/Typography/Link.d.ts +1 -2
  101. package/dist/Typography/Link.d.ts.map +1 -1
  102. package/dist/Typography/Link.js +73 -64
  103. package/dist/Typography/Paragraph.cjs +224 -1
  104. package/dist/Typography/Paragraph.d.ts +1 -2
  105. package/dist/Typography/Paragraph.d.ts.map +1 -1
  106. package/dist/Typography/Paragraph.js +118 -108
  107. package/dist/Typography/Text.cjs +223 -1
  108. package/dist/Typography/Text.d.ts +1 -2
  109. package/dist/Typography/Text.d.ts.map +1 -1
  110. package/dist/Typography/Text.js +117 -101
  111. package/dist/Typography/Title.cjs +220 -1
  112. package/dist/Typography/Title.d.ts +1 -2
  113. package/dist/Typography/Title.d.ts.map +1 -1
  114. package/dist/Typography/Title.js +126 -104
  115. package/dist/Typography/Typography.cjs +17 -1
  116. package/dist/Typography/Typography.d.ts +8 -4
  117. package/dist/Typography/Typography.d.ts.map +1 -1
  118. package/dist/Typography/Typography.js +14 -14
  119. package/dist/Typography/index.d.ts +1 -4
  120. package/dist/Typography/index.d.ts.map +1 -1
  121. package/dist/Typography/index.js +10 -13
  122. package/dist/Typography/tooltip.cjs +42 -1
  123. package/dist/Typography/tooltip.js +34 -14
  124. package/dist/Typography/types.cjs +20 -1
  125. package/dist/Typography/types.d.ts +4 -0
  126. package/dist/Typography/types.d.ts.map +1 -1
  127. package/dist/Typography/types.js +5 -2
  128. package/dist/Typography/utils.cjs +52 -1
  129. package/dist/Typography/utils.js +48 -21
  130. package/dist/Typography/weightStyles.cjs +58 -1
  131. package/dist/Typography/weightStyles.js +26 -25
  132. package/dist/_virtual/_rolldown/runtime.cjs +32 -1
  133. package/dist/_virtual/_rolldown/runtime.js +9 -7
  134. package/dist/assets/stylex.css +167 -9
  135. package/dist/astryx.cjs +9 -1
  136. package/dist/astryx.d.ts +0 -1
  137. package/dist/astryx.d.ts.map +1 -1
  138. package/dist/astryx.js +0 -1
  139. package/dist/index.cjs +779 -1
  140. package/dist/index.d.ts +2 -3
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.js +119 -118
  143. package/dist/layout/Box.cjs +180 -1
  144. package/dist/layout/Box.d.ts +6 -8
  145. package/dist/layout/Box.d.ts.map +1 -1
  146. package/dist/layout/Box.js +116 -50
  147. package/dist/layout/Center.cjs +40 -1
  148. package/dist/layout/Center.d.ts +3 -3
  149. package/dist/layout/Center.d.ts.map +1 -1
  150. package/dist/layout/Center.js +39 -21
  151. package/dist/layout/Container.cjs +92 -1
  152. package/dist/layout/Container.d.ts +6 -8
  153. package/dist/layout/Container.d.ts.map +1 -1
  154. package/dist/layout/Container.js +46 -31
  155. package/dist/layout/Stack.cjs +199 -1
  156. package/dist/layout/Stack.d.ts +9 -9
  157. package/dist/layout/Stack.d.ts.map +1 -1
  158. package/dist/layout/Stack.js +186 -79
  159. package/dist/layout/index.d.ts +1 -1
  160. package/dist/layout/index.js +9 -9
  161. package/dist/lazyLoad.cjs +13 -1
  162. package/dist/lazyLoad.d.ts.map +1 -1
  163. package/dist/lazyLoad.js +9 -9
  164. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +551 -1
  165. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +440 -234
  166. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +546 -1
  167. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +452 -236
  168. 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 +330 -1
  169. 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 +272 -164
  170. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +150 -1
  171. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +132 -1
  172. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +90 -74
  173. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +92 -67
  174. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +11 -1
  175. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +8 -7
  176. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +48 -1
  177. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +34 -31
  178. 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 +145 -1
  179. 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 +111 -73
  180. 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 +38 -1
  181. 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 +19 -16
  182. 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 +126 -1
  183. 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 +103 -72
  184. 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 +134 -1
  185. 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 +113 -79
  186. 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 +541 -1
  187. 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 +459 -331
  188. 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 +39 -1
  189. 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 +26 -22
  190. 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 +304 -1
  191. 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 +234 -160
  192. 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 +108 -1
  193. 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 +82 -67
  194. 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 +19 -1
  195. 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 +12 -10
  196. 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 +275 -1
  197. 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 +228 -127
  198. 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 +53 -1
  199. 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 +40 -22
  200. 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 +215 -1
  201. 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 +171 -117
  202. 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 +219 -1
  203. 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 +178 -118
  204. 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 +22 -1
  205. 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 +17 -13
  206. 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 +802 -1
  207. 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 +648 -422
  208. 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 +410 -1
  209. 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 +313 -212
  210. 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 +741 -1
  211. 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 +602 -417
  212. 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 +246 -1
  213. 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 +195 -121
  214. 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 +27 -1
  215. 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 +20 -17
  216. 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 +148 -1
  217. 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 +115 -67
  218. 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 +55 -1
  219. 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 +27 -21
  220. 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 +223 -1
  221. 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 +179 -131
  222. 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 +576 -1
  223. 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 +437 -308
  224. 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 +202 -1
  225. 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 +160 -125
  226. 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 +159 -1
  227. 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 +125 -93
  228. 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 +158 -1
  229. 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 +128 -98
  230. 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 +39 -1
  231. 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 +29 -24
  232. 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 +19 -1
  233. 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 +13 -11
  234. 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 +109 -1
  235. 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 +91 -68
  236. 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 +28 -1
  237. 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 +22 -17
  238. 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 +33 -1
  239. 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 +25 -19
  240. 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 +7 -1
  241. 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 +3 -3
  242. 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 +25 -1
  243. 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 +18 -11
  244. 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 +47 -1
  245. 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 +38 -28
  246. 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 +38 -1
  247. 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 +19 -15
  248. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +106 -1
  249. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +95 -34
  250. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +5 -1
  251. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +3 -3
  252. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +6 -1
  253. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +4 -4
  254. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +423 -1
  255. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +237 -202
  256. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +45 -1
  257. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +35 -32
  258. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +42 -1
  259. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +37 -32
  260. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +20 -1
  261. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -5
  262. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +7 -1
  263. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +5 -5
  264. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +27 -1
  265. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +15 -12
  266. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +45 -1
  267. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +41 -4
  268. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +45 -1
  269. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +42 -4
  270. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +49 -1
  271. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +46 -8
  272. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +358 -1
  273. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +341 -45
  274. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +31 -1
  275. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +28 -7
  276. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +35 -1
  277. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +32 -8
  278. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +44 -1
  279. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +41 -11
  280. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +49 -1
  281. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +46 -8
  282. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +61 -1
  283. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +58 -12
  284. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +38 -1
  285. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +35 -3
  286. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +39 -1
  287. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +36 -5
  288. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +8 -1
  289. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +5 -5
  290. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +50 -1
  291. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +45 -11
  292. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +27 -1
  293. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +20 -14
  294. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +18 -1
  295. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +13 -12
  296. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +77 -1
  297. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +14 -5
  298. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +31 -1
  299. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +6 -6
  300. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +11 -1
  301. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +4 -3
  302. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +210 -1
  303. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +197 -188
  304. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +122 -1
  305. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +12 -12
  306. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +28 -1
  307. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +20 -12
  308. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +34 -1
  309. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +31 -5
  310. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +37 -1
  311. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +32 -5
  312. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +41 -1
  313. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +38 -7
  314. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +45 -1
  315. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +42 -6
  316. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +56 -1
  317. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +53 -8
  318. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +35 -1
  319. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +32 -5
  320. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +45 -1
  321. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +42 -4
  322. 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 +34 -1
  323. 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 +32 -21
  324. 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 +39 -1
  325. 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 +27 -20
  326. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1391 -1
  327. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1178 -803
  328. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +7 -1
  329. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +3 -4
  330. 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 +369 -2
  331. 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 +282 -238
  332. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +625 -1
  333. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +545 -276
  334. 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 +1033 -9
  335. 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 +898 -460
  336. 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 +47 -38
  337. 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 +38 -64
  338. 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 +13 -1
  339. 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 +9 -2
  340. 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 +4 -1
  341. 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 +36 -1
  342. 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 +25 -16
  343. 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 +15 -1
  344. 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 +10 -10
  345. 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 +167 -4
  346. 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 +144 -93
  347. 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 +63 -1
  348. 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 +45 -35
  349. 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 +14 -1
  350. 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 +11 -9
  351. 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 +84 -1
  352. 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 +75 -43
  353. 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 +3 -1
  354. 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 +3 -3
  355. 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 +6 -1
  356. 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 +5 -5
  357. 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 +1617 -1
  358. 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 +1332 -874
  359. 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 +18 -1
  360. 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 +15 -7
  361. 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 +26 -1
  362. 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 +20 -10
  363. 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 +4 -1
  364. 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 +40 -1
  365. 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 +29 -16
  366. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +36 -1
  367. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +25 -14
  368. 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 +20 -1
  369. 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 +18 -3
  370. 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 +46 -1
  371. 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 +38 -19
  372. 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 +39 -1
  373. 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 +29 -11
  374. 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 +18 -1
  375. 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 +13 -12
  376. 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 +81 -1
  377. 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 +58 -45
  378. 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 +1252 -3
  379. 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 +1003 -648
  380. package/dist/theme/index.cjs +63 -1
  381. package/dist/theme/index.js +31 -31
  382. package/dist/theme/spacing.cjs +93 -1
  383. package/dist/theme/spacing.js +52 -26
  384. package/dist/theme/tokens.stylex.cjs +210 -1
  385. package/dist/theme/tokens.stylex.js +58 -26
  386. package/dist/theme/types.cjs +13 -1
  387. package/dist/theme/types.js +4 -3
  388. package/dist/theme/width.cjs +39 -1
  389. package/dist/theme/width.js +16 -4
  390. package/dist/theme/zIndex.cjs +62 -1
  391. package/dist/theme/zIndex.d.ts +4 -4
  392. package/dist/theme/zIndex.d.ts.map +1 -1
  393. package/dist/theme/zIndex.js +44 -15
  394. package/dist/theme.css +167 -9
  395. package/dist/ui/accordion.cjs +431 -1
  396. package/dist/ui/accordion.d.ts +10 -10
  397. package/dist/ui/accordion.d.ts.map +1 -1
  398. package/dist/ui/accordion.js +276 -136
  399. package/dist/ui/action-bar.cjs +274 -1
  400. package/dist/ui/action-bar.d.ts +11 -11
  401. package/dist/ui/action-bar.d.ts.map +1 -1
  402. package/dist/ui/action-bar.js +204 -98
  403. package/dist/ui/alert-dialog.cjs +538 -1
  404. package/dist/ui/alert-dialog.d.ts +19 -19
  405. package/dist/ui/alert-dialog.d.ts.map +1 -1
  406. package/dist/ui/alert-dialog.js +459 -167
  407. package/dist/ui/alert.cjs +163 -1
  408. package/dist/ui/alert.d.ts +7 -7
  409. package/dist/ui/alert.d.ts.map +1 -1
  410. package/dist/ui/alert.js +111 -50
  411. package/dist/ui/aspect-ratio.cjs +24 -1
  412. package/dist/ui/aspect-ratio.d.ts +2 -2
  413. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  414. package/dist/ui/aspect-ratio.js +22 -13
  415. package/dist/ui/avatar.cjs +340 -1
  416. package/dist/ui/avatar.d.ts +10 -10
  417. package/dist/ui/avatar.d.ts.map +1 -1
  418. package/dist/ui/avatar.js +226 -115
  419. package/dist/ui/badge-overflow.cjs +66 -1
  420. package/dist/ui/badge-overflow.d.ts +5 -5
  421. package/dist/ui/badge-overflow.d.ts.map +1 -1
  422. package/dist/ui/badge-overflow.js +34 -27
  423. package/dist/ui/badge.cjs +167 -1
  424. package/dist/ui/badge.d.ts +3 -3
  425. package/dist/ui/badge.d.ts.map +1 -1
  426. package/dist/ui/badge.js +48 -42
  427. package/dist/ui/breadcrumb.cjs +508 -1
  428. package/dist/ui/breadcrumb.d.ts +15 -15
  429. package/dist/ui/breadcrumb.d.ts.map +1 -1
  430. package/dist/ui/breadcrumb.js +386 -159
  431. package/dist/ui/button.cjs +425 -1
  432. package/dist/ui/button.d.ts +3 -3
  433. package/dist/ui/button.d.ts.map +1 -1
  434. package/dist/ui/button.js +137 -117
  435. package/dist/ui/calendar.cjs +625 -1
  436. package/dist/ui/calendar.d.ts +5 -5
  437. package/dist/ui/calendar.d.ts.map +1 -1
  438. package/dist/ui/calendar.js +309 -193
  439. package/dist/ui/card.cjs +401 -1
  440. package/dist/ui/card.d.ts +15 -15
  441. package/dist/ui/card.d.ts.map +1 -1
  442. package/dist/ui/card.js +300 -119
  443. package/dist/ui/carousel.cjs +332 -1
  444. package/dist/ui/carousel.d.ts +10 -10
  445. package/dist/ui/carousel.d.ts.map +1 -1
  446. package/dist/ui/carousel.js +245 -127
  447. package/dist/ui/checkbox.cjs +163 -1
  448. package/dist/ui/checkbox.d.ts +4 -4
  449. package/dist/ui/checkbox.d.ts.map +1 -1
  450. package/dist/ui/checkbox.js +62 -58
  451. package/dist/ui/circular-progress.cjs +144 -1
  452. package/dist/ui/circular-progress.d.ts +5 -5
  453. package/dist/ui/circular-progress.d.ts.map +1 -1
  454. package/dist/ui/circular-progress.js +85 -67
  455. package/dist/ui/code-block.cjs +823 -0
  456. package/dist/ui/code-block.d.ts +89 -0
  457. package/dist/ui/code-block.d.ts.map +1 -0
  458. package/dist/ui/code-block.js +813 -0
  459. package/dist/ui/collapsible.cjs +64 -1
  460. package/dist/ui/collapsible.d.ts +4 -4
  461. package/dist/ui/collapsible.d.ts.map +1 -1
  462. package/dist/ui/collapsible.js +58 -29
  463. package/dist/ui/command.cjs +556 -1
  464. package/dist/ui/command.d.ts +19 -19
  465. package/dist/ui/command.d.ts.map +1 -1
  466. package/dist/ui/command.js +432 -163
  467. package/dist/ui/compare-slider.cjs +169 -1
  468. package/dist/ui/compare-slider.d.ts +8 -7
  469. package/dist/ui/compare-slider.d.ts.map +1 -1
  470. package/dist/ui/compare-slider.js +106 -73
  471. package/dist/ui/context-menu.cjs +810 -1
  472. package/dist/ui/context-menu.d.ts +26 -26
  473. package/dist/ui/context-menu.d.ts.map +1 -1
  474. package/dist/ui/context-menu.js +693 -229
  475. package/dist/ui/copy-button.cjs +93 -1
  476. package/dist/ui/copy-button.d.ts +1 -2
  477. package/dist/ui/copy-button.d.ts.map +1 -1
  478. package/dist/ui/copy-button.js +56 -45
  479. package/dist/ui/dialog.cjs +411 -1
  480. package/dist/ui/dialog.d.ts +18 -18
  481. package/dist/ui/dialog.d.ts.map +1 -1
  482. package/dist/ui/dialog.js +319 -131
  483. package/dist/ui/drawer.cjs +478 -1
  484. package/dist/ui/drawer.d.ts +17 -17
  485. package/dist/ui/drawer.d.ts.map +1 -1
  486. package/dist/ui/drawer.js +396 -151
  487. package/dist/ui/dropdown-menu.cjs +638 -1
  488. package/dist/ui/dropdown-menu.d.ts +26 -26
  489. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  490. package/dist/ui/dropdown-menu.js +511 -208
  491. package/dist/ui/editable.cjs +609 -1
  492. package/dist/ui/editable.d.ts +14 -14
  493. package/dist/ui/editable.d.ts.map +1 -1
  494. package/dist/ui/editable.js +479 -218
  495. package/dist/ui/empty.cjs +295 -1
  496. package/dist/ui/empty.d.ts +15 -15
  497. package/dist/ui/empty.d.ts.map +1 -1
  498. package/dist/ui/empty.js +267 -112
  499. package/dist/ui/field.cjs +621 -1
  500. package/dist/ui/field.d.ts +21 -21
  501. package/dist/ui/field.d.ts.map +1 -1
  502. package/dist/ui/field.js +468 -198
  503. package/dist/ui/file-upload-adapters.cjs +289 -1
  504. package/dist/ui/file-upload-adapters.d.ts +1 -2
  505. package/dist/ui/file-upload-adapters.d.ts.map +1 -1
  506. package/dist/ui/file-upload-adapters.js +244 -170
  507. package/dist/ui/file-upload.cjs +1480 -1
  508. package/dist/ui/file-upload.d.ts +22 -22
  509. package/dist/ui/file-upload.d.ts.map +1 -1
  510. package/dist/ui/file-upload.js +1064 -599
  511. package/dist/ui/flex.cjs +202 -1
  512. package/dist/ui/flex.d.ts +7 -6
  513. package/dist/ui/flex.d.ts.map +1 -1
  514. package/dist/ui/flex.js +111 -93
  515. package/dist/ui/form.cjs +453 -1
  516. package/dist/ui/form.d.ts +11 -11
  517. package/dist/ui/form.d.ts.map +1 -1
  518. package/dist/ui/form.js +421 -136
  519. package/dist/ui/gauge.cjs +125 -1
  520. package/dist/ui/gauge.d.ts +7 -6
  521. package/dist/ui/gauge.d.ts.map +1 -1
  522. package/dist/ui/gauge.js +60 -53
  523. package/dist/ui/grid.cjs +224 -1
  524. package/dist/ui/grid.d.ts +11 -7
  525. package/dist/ui/grid.d.ts.map +1 -1
  526. package/dist/ui/grid.js +126 -96
  527. package/dist/ui/hover-card.cjs +85 -1
  528. package/dist/ui/hover-card.d.ts +6 -6
  529. package/dist/ui/hover-card.d.ts.map +1 -1
  530. package/dist/ui/hover-card.js +57 -37
  531. package/dist/ui/index.d.ts +4 -0
  532. package/dist/ui/index.d.ts.map +1 -1
  533. package/dist/ui/input-group.cjs +322 -1
  534. package/dist/ui/input-group.d.ts +12 -12
  535. package/dist/ui/input-group.d.ts.map +1 -1
  536. package/dist/ui/input-group.js +203 -107
  537. package/dist/ui/input-otp.cjs +312 -1
  538. package/dist/ui/input-otp.d.ts +10 -10
  539. package/dist/ui/input-otp.d.ts.map +1 -1
  540. package/dist/ui/input-otp.js +217 -94
  541. package/dist/ui/input.cjs +388 -1
  542. package/dist/ui/input.d.ts +3 -3
  543. package/dist/ui/input.d.ts.map +1 -1
  544. package/dist/ui/input.js +137 -119
  545. package/dist/ui/item.cjs +585 -1
  546. package/dist/ui/item.d.ts +20 -20
  547. package/dist/ui/item.d.ts.map +1 -1
  548. package/dist/ui/item.js +460 -162
  549. package/dist/ui/kbd.cjs +115 -1
  550. package/dist/ui/kbd.d.ts +5 -5
  551. package/dist/ui/kbd.d.ts.map +1 -1
  552. package/dist/ui/kbd.js +42 -37
  553. package/dist/ui/label.cjs +67 -1
  554. package/dist/ui/label.d.ts +4 -4
  555. package/dist/ui/label.d.ts.map +1 -1
  556. package/dist/ui/label.js +51 -21
  557. package/dist/ui/marker.cjs +297 -0
  558. package/dist/ui/marker.d.ts +25 -0
  559. package/dist/ui/marker.d.ts.map +1 -0
  560. package/dist/ui/marker.js +293 -0
  561. package/dist/ui/masonry.cjs +56 -1
  562. package/dist/ui/masonry.d.ts +4 -4
  563. package/dist/ui/masonry.d.ts.map +1 -1
  564. package/dist/ui/masonry.js +40 -37
  565. package/dist/ui/menubar.cjs +907 -1
  566. package/dist/ui/menubar.d.ts +29 -29
  567. package/dist/ui/menubar.d.ts.map +1 -1
  568. package/dist/ui/menubar.js +737 -252
  569. package/dist/ui/navigation-menu.cjs +560 -1
  570. package/dist/ui/navigation-menu.d.ts +18 -18
  571. package/dist/ui/navigation-menu.d.ts.map +1 -1
  572. package/dist/ui/navigation-menu.js +442 -148
  573. package/dist/ui/pagination.cjs +575 -1
  574. package/dist/ui/pagination.d.ts +13 -13
  575. package/dist/ui/pagination.d.ts.map +1 -1
  576. package/dist/ui/pagination.js +422 -172
  577. package/dist/ui/popover.cjs +93 -1
  578. package/dist/ui/popover.d.ts +7 -7
  579. package/dist/ui/popover.d.ts.map +1 -1
  580. package/dist/ui/popover.js +61 -42
  581. package/dist/ui/progress.cjs +34 -1
  582. package/dist/ui/progress.d.ts +3 -3
  583. package/dist/ui/progress.d.ts.map +1 -1
  584. package/dist/ui/progress.js +21 -18
  585. package/dist/ui/questionnaire.cjs +682 -0
  586. package/dist/ui/questionnaire.d.ts +111 -0
  587. package/dist/ui/questionnaire.d.ts.map +1 -0
  588. package/dist/ui/questionnaire.js +670 -0
  589. package/dist/ui/radio-group.cjs +221 -1
  590. package/dist/ui/radio-group.d.ts +6 -6
  591. package/dist/ui/radio-group.d.ts.map +1 -1
  592. package/dist/ui/radio-group.js +125 -74
  593. package/dist/ui/rating.cjs +190 -1
  594. package/dist/ui/rating.d.ts +4 -3
  595. package/dist/ui/rating.d.ts.map +1 -1
  596. package/dist/ui/rating.js +96 -79
  597. package/dist/ui/resizable.cjs +174 -1
  598. package/dist/ui/resizable.d.ts +7 -7
  599. package/dist/ui/resizable.d.ts.map +1 -1
  600. package/dist/ui/resizable.js +150 -55
  601. package/dist/ui/responsive-dialog.cjs +400 -1
  602. package/dist/ui/responsive-dialog.d.ts +17 -17
  603. package/dist/ui/responsive-dialog.d.ts.map +1 -1
  604. package/dist/ui/responsive-dialog.js +372 -155
  605. package/dist/ui/row-col.cjs +508 -1
  606. package/dist/ui/row-col.d.ts +13 -11
  607. package/dist/ui/row-col.d.ts.map +1 -1
  608. package/dist/ui/row-col.js +238 -207
  609. package/dist/ui/scroll-area.cjs +129 -1
  610. package/dist/ui/scroll-area.d.ts +6 -6
  611. package/dist/ui/scroll-area.d.ts.map +1 -1
  612. package/dist/ui/scroll-area.js +92 -49
  613. package/dist/ui/segmented.cjs +169 -1
  614. package/dist/ui/segmented.d.ts +6 -5
  615. package/dist/ui/segmented.d.ts.map +1 -1
  616. package/dist/ui/segmented.js +75 -63
  617. package/dist/ui/select.cjs +484 -1
  618. package/dist/ui/select.d.ts +17 -17
  619. package/dist/ui/select.d.ts.map +1 -1
  620. package/dist/ui/select.js +353 -160
  621. package/dist/ui/separator.cjs +44 -1
  622. package/dist/ui/separator.d.ts +4 -4
  623. package/dist/ui/separator.d.ts.map +1 -1
  624. package/dist/ui/separator.js +17 -17
  625. package/dist/ui/sheet.cjs +462 -1
  626. package/dist/ui/sheet.d.ts +16 -16
  627. package/dist/ui/sheet.d.ts.map +1 -1
  628. package/dist/ui/sheet.js +331 -141
  629. package/dist/ui/sidebar.cjs +1452 -1
  630. package/dist/ui/sidebar.d.ts +48 -48
  631. package/dist/ui/sidebar.d.ts.map +1 -1
  632. package/dist/ui/sidebar.js +1057 -439
  633. package/dist/ui/signature-pad.cjs +741 -0
  634. package/dist/ui/signature-pad.d.ts +115 -0
  635. package/dist/ui/signature-pad.d.ts.map +1 -0
  636. package/dist/ui/signature-pad.js +731 -0
  637. package/dist/ui/skeleton.cjs +62 -1
  638. package/dist/ui/skeleton.d.ts +3 -3
  639. package/dist/ui/skeleton.d.ts.map +1 -1
  640. package/dist/ui/skeleton.js +50 -20
  641. package/dist/ui/slider.cjs +47 -1
  642. package/dist/ui/slider.d.ts +4 -4
  643. package/dist/ui/slider.d.ts.map +1 -1
  644. package/dist/ui/slider.js +27 -26
  645. package/dist/ui/sonner.cjs +28 -1
  646. package/dist/ui/sonner.js +24 -22
  647. package/dist/ui/spinner.cjs +73 -1
  648. package/dist/ui/spinner.d.ts +3 -3
  649. package/dist/ui/spinner.d.ts.map +1 -1
  650. package/dist/ui/spinner.js +29 -28
  651. package/dist/ui/stat.cjs +320 -1
  652. package/dist/ui/stat.d.ts +15 -15
  653. package/dist/ui/stat.d.ts.map +1 -1
  654. package/dist/ui/stat.js +275 -148
  655. package/dist/ui/stepper.cjs +785 -1
  656. package/dist/ui/stepper.d.ts +24 -24
  657. package/dist/ui/stepper.d.ts.map +1 -1
  658. package/dist/ui/stepper.js +594 -281
  659. package/dist/ui/switch.cjs +199 -1
  660. package/dist/ui/switch.d.ts +4 -4
  661. package/dist/ui/switch.d.ts.map +1 -1
  662. package/dist/ui/switch.js +79 -72
  663. package/dist/ui/table.cjs +435 -1
  664. package/dist/ui/table.d.ts +17 -17
  665. package/dist/ui/table.d.ts.map +1 -1
  666. package/dist/ui/table.js +369 -129
  667. package/dist/ui/tabs.cjs +340 -1
  668. package/dist/ui/tabs.d.ts +10 -10
  669. package/dist/ui/tabs.d.ts.map +1 -1
  670. package/dist/ui/tabs.js +204 -95
  671. package/dist/ui/tags-input.cjs +585 -1
  672. package/dist/ui/tags-input.d.ts +13 -13
  673. package/dist/ui/tags-input.d.ts.map +1 -1
  674. package/dist/ui/tags-input.js +446 -221
  675. package/dist/ui/textarea.cjs +119 -1
  676. package/dist/ui/textarea.d.ts +3 -3
  677. package/dist/ui/textarea.d.ts.map +1 -1
  678. package/dist/ui/textarea.js +37 -33
  679. package/dist/ui/timeline.cjs +583 -1
  680. package/dist/ui/timeline.d.ts +22 -22
  681. package/dist/ui/timeline.d.ts.map +1 -1
  682. package/dist/ui/timeline.js +409 -198
  683. package/dist/ui/toggle-group.cjs +128 -1
  684. package/dist/ui/toggle-group.d.ts +7 -7
  685. package/dist/ui/toggle-group.d.ts.map +1 -1
  686. package/dist/ui/toggle-group.js +92 -41
  687. package/dist/ui/toggle.cjs +145 -1
  688. package/dist/ui/toggle.d.ts +4 -4
  689. package/dist/ui/toggle.d.ts.map +1 -1
  690. package/dist/ui/toggle.js +38 -34
  691. package/dist/ui/tooltip.cjs +81 -1
  692. package/dist/ui/tooltip.d.ts +7 -7
  693. package/dist/ui/tooltip.d.ts.map +1 -1
  694. package/dist/ui/tooltip.js +50 -37
  695. package/dist/ui/useBreakpoint.cjs +91 -1
  696. package/dist/ui/useBreakpoint.js +66 -43
  697. package/dist/utils.cjs +4 -1
  698. package/dist/utils.d.ts +2 -12
  699. package/dist/utils.d.ts.map +1 -1
  700. package/dist/utils.js +3 -6
  701. package/package.json +10 -2
@@ -1,21 +1,29 @@
1
- "use client";
2
- import { Icons as e } from "../Icons/Icons.js";
3
- import { Text as t } from "../Typography/Text.js";
4
- import { createApiUploadHandler as n, createS3PresignedUploadHandler as r, createUploadThingUploadHandler as i, formatFileSize as a, useUploadFile as o } from "./file-upload-adapters.js";
5
- import * as s from "@stylexjs/stylex";
6
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
- import * as d from "react";
8
- import { c as f } from "react/compiler-runtime";
9
- import { Slot as p } from "@radix-ui/react-slot";
1
+ import { Icons } from "../Icons/Icons.js";
2
+ import { Text } from "../Typography/Text.js";
3
+ import { createApiUploadHandler, createS3PresignedUploadHandler, createUploadThingUploadHandler, formatFileSize, useUploadFile } from "./file-upload-adapters.js";
4
+ import * as stylex from "@stylexjs/stylex";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
7
+ import { c } from "react/compiler-runtime";
8
+ import { Slot } from "@radix-ui/react-slot";
10
9
  // src/ui/file-upload.tsx
11
- var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "FileUploadList", v = "FileUploadItem", y = "FileUploadItemPreview", b = "FileUploadItemMetadata", x = "FileUploadItemProgress", S = "FileUploadItemDelete", C = {
10
+ var ROOT_NAME = "FileUpload";
11
+ var DROPZONE_NAME = "FileUploadDropzone";
12
+ var TRIGGER_NAME = "FileUploadTrigger";
13
+ var LIST_NAME = "FileUploadList";
14
+ var ITEM_NAME = "FileUploadItem";
15
+ var ITEM_PREVIEW_NAME = "FileUploadItemPreview";
16
+ var ITEM_METADATA_NAME = "FileUploadItemMetadata";
17
+ var ITEM_PROGRESS_NAME = "FileUploadItemProgress";
18
+ var ITEM_DELETE_NAME = "FileUploadItemDelete";
19
+ var styles = {
12
20
  root: {
13
21
  kVAEAm: "x1n2onr6",
14
22
  k1xSpc: "x78zum5",
15
23
  kXwgrk: "xdt5ytf",
16
24
  kOIVth: "x8233eu",
17
25
  kzqmXN: "xh8yej3",
18
- $$css: !0
26
+ $$css: true
19
27
  },
20
28
  dropzone: {
21
29
  kVAEAm: "x1n2onr6",
@@ -39,25 +47,25 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
39
47
  kaVNsj: "x14aqmuz",
40
48
  kOJeXU: "x156qtes",
41
49
  kEtg5x: "xik21o4",
42
- $$css: !0
50
+ $$css: true
43
51
  },
44
52
  dropzoneDragging: {
45
53
  kWkggS: "x1jgryid",
46
54
  kVAM5u: "x1khvrlk",
47
55
  kGVxlE: "xf0oo4t",
48
- $$css: !0
56
+ $$css: true
49
57
  },
50
58
  dropzoneInvalid: {
51
59
  kVAM5u: "x1uwefn5",
52
60
  kWkggS: "x6lw6w7",
53
61
  kGVxlE: "x1r3qo2b",
54
- $$css: !0
62
+ $$css: true
55
63
  },
56
64
  dropzoneDisabled: {
57
65
  kfzvcC: "x47corl",
58
66
  kSiTet: "xbyyjgo",
59
67
  kkrTdU: "x1h6gzvc",
60
- $$css: !0
68
+ $$css: true
61
69
  },
62
70
  avatarDropzone: {
63
71
  kVAEAm: "x1n2onr6",
@@ -78,32 +86,32 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
78
86
  kIyJzY: "x13dflua",
79
87
  kmVPX3: "x1717udv",
80
88
  kaVNsj: "x14aqmuz",
81
- $$css: !0
89
+ $$css: true
82
90
  },
83
91
  avatarItem: {
84
92
  kzqmXN: "xh8yej3",
85
93
  kZKoxP: "x5yr21d",
86
94
  kmVPX3: "x1717udv",
87
95
  kMzoRj: "xc342km",
88
- $$css: !0
96
+ $$css: true
89
97
  },
90
98
  avatarPreview: {
91
99
  kzqmXN: "xh8yej3",
92
100
  kZKoxP: "x5yr21d",
93
101
  kaIpWk: "x9psvww",
94
- $$css: !0
102
+ $$css: true
95
103
  },
96
104
  list: {
97
105
  k1xSpc: "x78zum5",
98
106
  kXwgrk: "xdt5ytf",
99
107
  kOIVth: "x13z6uf9",
100
108
  kzqmXN: "xh8yej3",
101
- $$css: !0
109
+ $$css: true
102
110
  },
103
111
  listHorizontal: {
104
112
  kXwgrk: "x1q0g3np",
105
113
  kwnvtZ: "x1a02dak",
106
- $$css: !0
114
+ $$css: true
107
115
  },
108
116
  item: {
109
117
  kVAEAm: "x1n2onr6",
@@ -120,7 +128,7 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
120
128
  kVQacm: "xb3r6kr",
121
129
  k1ekBW: "xq90yva",
122
130
  kIyJzY: "xx6bhzk",
123
- $$css: !0
131
+ $$css: true
124
132
  },
125
133
  itemPreview: {
126
134
  kVAEAm: "x1n2onr6",
@@ -134,7 +142,7 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
134
142
  kWkggS: "x1qry0bl",
135
143
  kMwMTN: "xw3nh4a",
136
144
  kVQacm: "xb3r6kr",
137
- $$css: !0
145
+ $$css: true
138
146
  },
139
147
  itemMetadata: {
140
148
  k1xSpc: "x78zum5",
@@ -142,7 +150,7 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
142
150
  kUk6DE: "x98rzlu",
143
151
  k7Eaqz: "xeuugli",
144
152
  kOIVth: "x1enigpx",
145
- $$css: !0
153
+ $$css: true
146
154
  },
147
155
  itemName: {
148
156
  kGuDYH: "xkpwil5",
@@ -151,17 +159,17 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
151
159
  kVQacm: "xb3r6kr",
152
160
  kg5iWk: "xlyipyv",
153
161
  khDVqt: "xuxw1ft",
154
- $$css: !0
162
+ $$css: true
155
163
  },
156
164
  itemSize: {
157
165
  kGuDYH: "xboafo0",
158
166
  kMwMTN: "xw3nh4a",
159
- $$css: !0
167
+ $$css: true
160
168
  },
161
169
  itemError: {
162
170
  kGuDYH: "xboafo0",
163
171
  kMwMTN: "xuuroe4",
164
- $$css: !0
172
+ $$css: true
165
173
  },
166
174
  itemDeleteBtn: {
167
175
  k1xSpc: "x3nfvp2",
@@ -179,7 +187,7 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
179
187
  kIyJzY: "xx6bhzk",
180
188
  kGzVvX: "x9p52ec",
181
189
  kDPRdz: "x1mqvv6a",
182
- $$css: !0
190
+ $$css: true
183
191
  },
184
192
  progressRoot: {
185
193
  kVAEAm: "x1n2onr6",
@@ -188,7 +196,7 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
188
196
  kaIpWk: "x9psvww",
189
197
  kWkggS: "x1qry0bl",
190
198
  kVQacm: "xb3r6kr",
191
- $$css: !0
199
+ $$css: true
192
200
  },
193
201
  progressBottom: {
194
202
  kVAEAm: "x10l6tqk",
@@ -197,7 +205,7 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
197
205
  kCIrl2: "x3m8u43",
198
206
  kaIpWk: "x2u8bby",
199
207
  kZKoxP: "xuoj239",
200
- $$css: !0
208
+ $$css: true
201
209
  },
202
210
  progressFill: {
203
211
  kVAEAm: "x10l6tqk",
@@ -206,655 +214,1111 @@ var m = "FileUpload", h = "FileUploadDropzone", g = "FileUploadTrigger", _ = "Fi
206
214
  kaIpWk: "x2u8bby",
207
215
  kWkggS: "xa0uij2",
208
216
  kfzvcC: "x47corl",
209
- $$css: !0
217
+ $$css: true
210
218
  },
211
219
  dropzoneTitle: {
212
220
  kGuDYH: "xkpwil5",
213
221
  k63SB2: "xk50ysn",
214
222
  kMwMTN: "x84br7x",
215
223
  kogj98: "x1ghz6dp",
216
- $$css: !0
224
+ $$css: true
217
225
  },
218
226
  dropzoneSubtitle: {
219
227
  kGuDYH: "xboafo0",
220
228
  kMwMTN: "xw3nh4a",
221
229
  kogj98: "x1ghz6dp",
222
230
  k9WMMc: "x2b8uid",
223
- $$css: !0
231
+ $$css: true
224
232
  },
225
233
  whiteText: {
226
234
  kMwMTN: "xstwp1q",
227
- $$css: !0
235
+ $$css: true
228
236
  },
229
237
  compactDropzone: {
230
238
  kmVPX3: "x19btat0",
231
239
  kXwgrk: "x1q0g3np",
232
240
  kOIVth: "x8233eu",
233
- $$css: !0
241
+ $$css: true
234
242
  }
235
243
  };
236
- function w(e, t, n, r, i) {
237
- let a = {
238
- files: t,
239
- dragOver: !1,
240
- invalid: r
244
+ function createStore(listeners, files, urlCache, invalid, onValueChange) {
245
+ let state = {
246
+ files,
247
+ dragOver: false,
248
+ invalid
241
249
  };
242
- function o(e, r) {
243
- switch (r.type) {
250
+ function reducer(state, action) {
251
+ switch (action.type) {
244
252
  case "ADD_FILES":
245
- for (let e of r.files) t.set(e, {
246
- file: e,
253
+ for (const file of action.files) files.set(file, {
254
+ file,
247
255
  progress: 0,
248
256
  status: "idle"
249
257
  });
250
- return i && i(Array.from(t.values()).map((e) => e.file)), {
251
- ...e,
252
- files: t
258
+ if (onValueChange) onValueChange(Array.from(files.values()).map((fileState) => fileState.file));
259
+ return {
260
+ ...state,
261
+ files
253
262
  };
254
263
  case "SET_FILES": {
255
- let n = new Set(r.files);
256
- for (let e of t.keys()) n.has(e) || t.delete(e);
257
- for (let e of r.files) t.get(e) || t.set(e, {
258
- file: e,
264
+ const newFileSet = new Set(action.files);
265
+ for (const existingFile of files.keys()) if (!newFileSet.has(existingFile)) files.delete(existingFile);
266
+ for (const file of action.files) if (!files.get(file)) files.set(file, {
267
+ file,
259
268
  progress: 0,
260
269
  status: "idle"
261
270
  });
262
271
  return {
263
- ...e,
264
- files: t
272
+ ...state,
273
+ files
265
274
  };
266
275
  }
267
276
  case "SET_PROGRESS": {
268
- let n = t.get(r.file);
269
- return n && t.set(r.file, {
270
- ...n,
271
- progress: r.progress,
277
+ const fileState = files.get(action.file);
278
+ if (fileState) files.set(action.file, {
279
+ ...fileState,
280
+ progress: action.progress,
272
281
  status: "uploading"
273
- }), {
274
- ...e,
275
- files: t
282
+ });
283
+ return {
284
+ ...state,
285
+ files
276
286
  };
277
287
  }
278
288
  case "SET_SUCCESS": {
279
- let n = t.get(r.file);
280
- return n && t.set(r.file, {
281
- ...n,
289
+ const fileState = files.get(action.file);
290
+ if (fileState) files.set(action.file, {
291
+ ...fileState,
282
292
  progress: 100,
283
293
  status: "success"
284
- }), {
285
- ...e,
286
- files: t
294
+ });
295
+ return {
296
+ ...state,
297
+ files
287
298
  };
288
299
  }
289
300
  case "SET_ERROR": {
290
- let n = t.get(r.file);
291
- return n && t.set(r.file, {
292
- ...n,
293
- error: r.error,
301
+ const fileState = files.get(action.file);
302
+ if (fileState) files.set(action.file, {
303
+ ...fileState,
304
+ error: action.error,
294
305
  status: "error"
295
- }), {
296
- ...e,
297
- files: t
306
+ });
307
+ return {
308
+ ...state,
309
+ files
298
310
  };
299
311
  }
300
312
  case "REMOVE_FILE":
301
- if (n) {
302
- let e = n.get(r.file);
303
- e && (URL.revokeObjectURL(e), n.delete(r.file));
313
+ if (urlCache) {
314
+ const cachedUrl = urlCache.get(action.file);
315
+ if (cachedUrl) {
316
+ URL.revokeObjectURL(cachedUrl);
317
+ urlCache.delete(action.file);
318
+ }
304
319
  }
305
- return t.delete(r.file), i && i(Array.from(t.values()).map((e) => e.file)), {
306
- ...e,
307
- files: t
320
+ files.delete(action.file);
321
+ if (onValueChange) onValueChange(Array.from(files.values()).map((fileState) => fileState.file));
322
+ return {
323
+ ...state,
324
+ files
308
325
  };
309
326
  case "SET_DRAG_OVER": return {
310
- ...e,
311
- dragOver: r.dragOver
327
+ ...state,
328
+ dragOver: action.dragOver
312
329
  };
313
330
  case "SET_INVALID": return {
314
- ...e,
315
- invalid: r.invalid
331
+ ...state,
332
+ invalid: action.invalid
316
333
  };
317
334
  case "CLEAR":
318
- for (let e of t.keys()) if (n) {
319
- let t = n.get(e);
320
- t && (URL.revokeObjectURL(t), n.delete(e));
335
+ for (const file of files.keys()) if (urlCache) {
336
+ const cachedUrl = urlCache.get(file);
337
+ if (cachedUrl) {
338
+ URL.revokeObjectURL(cachedUrl);
339
+ urlCache.delete(file);
340
+ }
321
341
  }
322
- return t.clear(), i && i([]), {
323
- ...e,
324
- files: t
342
+ files.clear();
343
+ if (onValueChange) onValueChange([]);
344
+ return {
345
+ ...state,
346
+ files
325
347
  };
326
- default: return e;
348
+ default: return state;
327
349
  }
328
350
  }
329
- function s() {
330
- e.forEach((e) => e());
351
+ function notify() {
352
+ listeners.forEach((listener) => listener());
331
353
  }
332
354
  return {
333
- getState: () => a,
334
- dispatch: (e) => {
335
- a = o(a, e), s();
355
+ getState: () => state,
356
+ dispatch: (action) => {
357
+ state = reducer(state, action);
358
+ notify();
336
359
  },
337
- subscribe: (t) => (e.add(t), () => {
338
- e.delete(t);
339
- })
360
+ subscribe: (listener) => {
361
+ listeners.add(listener);
362
+ return () => {
363
+ listeners.delete(listener);
364
+ };
365
+ }
340
366
  };
341
367
  }
342
- var T = d.createContext(null);
343
- function E(e) {
344
- let t = f(3), n = d.useContext(T);
345
- if (!n) throw Error("useStore must be used within FileUploadRoot");
346
- let r = d.useRef(null), i = d.useRef(void 0), a;
347
- t[0] !== e || t[1] !== n ? (a = () => {
348
- let t = n.getState();
349
- if (t === r.current && i.current !== void 0) return i.current;
350
- let a = e(t);
351
- return r.current = t, i.current = a, a;
352
- }, t[0] = e, t[1] = n, t[2] = a) : a = t[2];
353
- let o = a;
354
- return d.useSyncExternalStore(n.subscribe, o, o);
368
+ var StoreContext = createContext(null);
369
+ function useStore(selector) {
370
+ const $ = c(3);
371
+ const store = useContext(StoreContext);
372
+ if (!store) throw new Error("useStore must be used within FileUploadRoot");
373
+ const lastStateRef = useRef(null);
374
+ const lastSelectedRef = useRef(void 0);
375
+ let t0;
376
+ if ($[0] !== selector || $[1] !== store) {
377
+ t0 = () => {
378
+ const currentState = store.getState();
379
+ if (currentState === lastStateRef.current && lastSelectedRef.current !== void 0) return lastSelectedRef.current;
380
+ const nextSelected = selector(currentState);
381
+ lastStateRef.current = currentState;
382
+ lastSelectedRef.current = nextSelected;
383
+ return nextSelected;
384
+ };
385
+ $[0] = selector;
386
+ $[1] = store;
387
+ $[2] = t0;
388
+ } else t0 = $[2];
389
+ const getSnapshot = t0;
390
+ return useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
355
391
  }
356
- function D(e) {
357
- return E(e);
392
+ function useFileUpload(selector) {
393
+ return useStore(selector);
358
394
  }
359
- var O = d.createContext(null);
360
- function k(e) {
361
- let t = d.useContext(O);
362
- if (!t) throw Error(`${e} must be within ${m}`);
363
- return t;
395
+ var FileUploadContext = createContext(null);
396
+ function useFileUploadContext(name) {
397
+ const context = useContext(FileUploadContext);
398
+ if (!context) throw new Error(`${name} must be within ${ROOT_NAME}`);
399
+ return context;
364
400
  }
365
- function A(e) {
366
- let { asChild: t, value: n, defaultValue: r, onValueChange: i, onAccept: o, onFileReject: c, onUpload: f, accept: m, maxFiles: h = 0, maxSize: g = Infinity, minSize: _ = 0, multiple: v = !1, disabled: y = !1, name: b, required: x, invalid: S = !1, label: E, dir: D = "ltr", className: k, sx: A, children: j, ...M } = e, N = d.useId(), P = d.useId(), F = d.useId(), I = d.useId(), L = d.useRef(null), R = d.useRef(/* @__PURE__ */ new Set()).current, z = d.useRef(/* @__PURE__ */ new WeakMap()).current, B = d.useMemo(() => {
367
- let e = /* @__PURE__ */ new Map(), t = n ?? r ?? [];
368
- for (let n of t) e.set(n, {
369
- file: n,
401
+ function FileUploadRoot(props) {
402
+ const { asChild, value, defaultValue, onValueChange, onAccept, onFileReject, onUpload, accept, maxFiles = 0, maxSize = Infinity, minSize = 0, multiple = false, disabled = false, name, required, invalid = false, label, dir = "ltr", className, sx, children, ...rootProps } = props;
403
+ const dropzoneId = useId();
404
+ const inputId = useId();
405
+ const listId = useId();
406
+ const labelId = useId();
407
+ const inputRef = useRef(null);
408
+ const listeners = useRef(/* @__PURE__ */ new Set()).current;
409
+ const urlCache = useRef(/* @__PURE__ */ new WeakMap()).current;
410
+ const initialFilesMap = useMemo(() => {
411
+ const map = /* @__PURE__ */ new Map();
412
+ const initialFiles = value ?? defaultValue ?? [];
413
+ for (const file of initialFiles) map.set(file, {
414
+ file,
370
415
  progress: 0,
371
416
  status: "idle"
372
417
  });
373
- return e;
374
- }, []), V = d.useMemo(() => w(R, B, z, S, i), []);
375
- d.useEffect(() => {
376
- n !== void 0 && V.dispatch({
418
+ return map;
419
+ }, []);
420
+ const store = useMemo(() => createStore(listeners, initialFilesMap, urlCache, invalid, onValueChange), []);
421
+ useEffect(() => {
422
+ if (value !== void 0) store.dispatch({
377
423
  type: "SET_FILES",
378
- files: n
424
+ files: value
379
425
  });
380
- }, [n, V]), d.useEffect(() => {
381
- V.dispatch({
426
+ }, [value, store]);
427
+ useEffect(() => {
428
+ store.dispatch({
382
429
  type: "SET_INVALID",
383
- invalid: S
430
+ invalid
384
431
  });
385
- }, [S, V]);
386
- let H = d.useCallback((e) => {
387
- if (m) {
388
- let t = m.split(",").map((e) => e.trim().toLowerCase()), n = e.type.toLowerCase(), r = e.name.toLowerCase();
389
- if (!t.some((e) => {
390
- if (e.startsWith(".")) return r.endsWith(e);
391
- if (e.endsWith("/*")) {
392
- let t = e.slice(0, -2);
393
- return n.startsWith(t);
432
+ }, [invalid, store]);
433
+ const validateFile = useCallback((file_0) => {
434
+ if (accept) {
435
+ const acceptedTypes = accept.split(",").map((t) => t.trim().toLowerCase());
436
+ const fileType = file_0.type.toLowerCase();
437
+ const fileName = file_0.name.toLowerCase();
438
+ if (!acceptedTypes.some((type) => {
439
+ if (type.startsWith(".")) return fileName.endsWith(type);
440
+ if (type.endsWith("/*")) {
441
+ const baseType = type.slice(0, -2);
442
+ return fileType.startsWith(baseType);
394
443
  }
395
- return n === e;
396
- })) return `File "${e.name}" is not an accepted format (${m})`;
444
+ return fileType === type;
445
+ })) return `File "${file_0.name}" is not an accepted format (${accept})`;
397
446
  }
398
- return e.size > g ? `File "${e.name}" exceeds maximum allowed size of ${a(g)}` : e.size < _ ? `File "${e.name}" is smaller than minimum required size of ${a(_)}` : null;
447
+ if (file_0.size > maxSize) return `File "${file_0.name}" exceeds maximum allowed size of ${formatFileSize(maxSize)}`;
448
+ if (file_0.size < minSize) return `File "${file_0.name}" is smaller than minimum required size of ${formatFileSize(minSize)}`;
449
+ return null;
399
450
  }, [
400
- m,
401
- g,
402
- _
403
- ]), U = d.useCallback(async (e) => {
404
- if (y) return;
405
- let t = Array.from(V.getState().files.keys()), n = v ? h > 0 ? h : Infinity : 1, r = n - t.length;
406
- if (r <= 0 && n === 1) V.dispatch({ type: "CLEAR" });
407
- else if (r <= 0) {
408
- c?.(e[0], `Maximum file limit (${h}) reached`);
451
+ accept,
452
+ maxSize,
453
+ minSize
454
+ ]);
455
+ const processFiles = useCallback(async (rawFiles) => {
456
+ if (disabled) return;
457
+ const currentFiles = Array.from(store.getState().files.keys());
458
+ const maxAllowed = multiple ? maxFiles > 0 ? maxFiles : Infinity : 1;
459
+ const availableSlots = maxAllowed - currentFiles.length;
460
+ if (availableSlots <= 0 && maxAllowed === 1) store.dispatch({ type: "CLEAR" });
461
+ else if (availableSlots <= 0) {
462
+ onFileReject?.(rawFiles[0], `Maximum file limit (${maxFiles}) reached`);
409
463
  return;
410
464
  }
411
- let i = v ? e.slice(0, r <= 0 ? 1 : r) : [e[0]], a = [];
412
- for (let e of i) {
413
- let t = H(e);
414
- t ? c?.(e, t) : a.push(e);
465
+ const filesToConsider = multiple ? rawFiles.slice(0, availableSlots <= 0 ? 1 : availableSlots) : [rawFiles[0]];
466
+ const validFiles = [];
467
+ for (const file_1 of filesToConsider) {
468
+ const error = validateFile(file_1);
469
+ if (error) onFileReject?.(file_1, error);
470
+ else validFiles.push(file_1);
415
471
  }
416
- if (a.length > 0 && (V.dispatch({
417
- type: "ADD_FILES",
418
- files: a
419
- }), o?.(a), f)) {
420
- for (let e of a) V.dispatch({
421
- type: "SET_PROGRESS",
422
- file: e,
423
- progress: 0
472
+ if (validFiles.length > 0) {
473
+ store.dispatch({
474
+ type: "ADD_FILES",
475
+ files: validFiles
424
476
  });
425
- try {
426
- await f(a, {
427
- onProgress: (e, t) => {
428
- V.dispatch({
429
- type: "SET_PROGRESS",
430
- file: e,
431
- progress: t
432
- });
433
- },
434
- onSuccess: (e) => {
435
- V.dispatch({
436
- type: "SET_SUCCESS",
437
- file: e
438
- });
439
- },
440
- onError: (e, t) => {
441
- V.dispatch({
442
- type: "SET_ERROR",
443
- file: e,
444
- error: t.message
445
- });
446
- }
477
+ onAccept?.(validFiles);
478
+ if (onUpload) {
479
+ for (const file_2 of validFiles) store.dispatch({
480
+ type: "SET_PROGRESS",
481
+ file: file_2,
482
+ progress: 0
447
483
  });
448
- } catch {}
484
+ try {
485
+ await onUpload(validFiles, {
486
+ onProgress: (file_3, progress) => {
487
+ store.dispatch({
488
+ type: "SET_PROGRESS",
489
+ file: file_3,
490
+ progress
491
+ });
492
+ },
493
+ onSuccess: (file_4) => {
494
+ store.dispatch({
495
+ type: "SET_SUCCESS",
496
+ file: file_4
497
+ });
498
+ },
499
+ onError: (file_5, error_0) => {
500
+ store.dispatch({
501
+ type: "SET_ERROR",
502
+ file: file_5,
503
+ error: error_0.message
504
+ });
505
+ }
506
+ });
507
+ } catch {}
508
+ }
449
509
  }
450
510
  }, [
451
- y,
452
- h,
453
- v,
454
- o,
455
- c,
456
- f,
457
- V,
458
- H
459
- ]), W = d.useCallback((e) => {
460
- let t = e.target.files ? Array.from(e.target.files) : [];
461
- t.length > 0 && U(t), e.target.value = "";
462
- }, [U]), G = d.useMemo(() => ({
463
- dropzoneId: N,
464
- inputId: P,
465
- listId: F,
466
- labelId: I,
467
- dir: D,
468
- disabled: y,
469
- inputRef: L,
470
- urlCache: z,
471
- processFiles: U
511
+ disabled,
512
+ maxFiles,
513
+ multiple,
514
+ onAccept,
515
+ onFileReject,
516
+ onUpload,
517
+ store,
518
+ validateFile
519
+ ]);
520
+ const onInputChange = useCallback((event) => {
521
+ const files = event.target.files ? Array.from(event.target.files) : [];
522
+ if (files.length > 0) processFiles(files);
523
+ event.target.value = "";
524
+ }, [processFiles]);
525
+ const contextValue = useMemo(() => ({
526
+ dropzoneId,
527
+ inputId,
528
+ listId,
529
+ labelId,
530
+ dir,
531
+ disabled,
532
+ inputRef,
533
+ urlCache,
534
+ processFiles
472
535
  }), [
473
- N,
474
- P,
475
- F,
476
- I,
477
- D,
478
- y,
479
- z,
480
- U
481
- ]), K = t ? p : "div", q = s.props(C.root, A);
482
- return /* @__PURE__ */ l(T.Provider, {
483
- value: V,
484
- children: /* @__PURE__ */ l(O.Provider, {
485
- value: G,
486
- children: /* @__PURE__ */ u(K, {
487
- "data-disabled": y ? "" : void 0,
536
+ dropzoneId,
537
+ inputId,
538
+ listId,
539
+ labelId,
540
+ dir,
541
+ disabled,
542
+ urlCache,
543
+ processFiles
544
+ ]);
545
+ const RootPrimitive = asChild ? Slot : "div";
546
+ const sxProps = stylex.props(styles.root, sx);
547
+ return /* @__PURE__ */ jsx(StoreContext.Provider, {
548
+ value: store,
549
+ children: /* @__PURE__ */ jsx(FileUploadContext.Provider, {
550
+ value: contextValue,
551
+ children: /* @__PURE__ */ jsxs(RootPrimitive, {
552
+ "data-disabled": disabled ? "" : void 0,
488
553
  "data-slot": "file-upload",
489
- dir: D,
490
- ...M,
491
- ...q,
492
- className: k ? `${q.className || ""} ${k}`.trim() : q.className,
554
+ dir,
555
+ ...rootProps,
556
+ ...sxProps,
557
+ className: className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className,
493
558
  children: [
494
- j,
495
- /* @__PURE__ */ l("input", {
559
+ children,
560
+ /* @__PURE__ */ jsx("input", {
496
561
  type: "file",
497
- id: P,
498
- "aria-labelledby": I,
499
- "aria-describedby": N,
500
- ref: L,
562
+ id: inputId,
563
+ "aria-labelledby": labelId,
564
+ "aria-describedby": dropzoneId,
565
+ ref: inputRef,
501
566
  tabIndex: -1,
502
- accept: m,
503
- name: b,
567
+ accept,
568
+ name,
504
569
  className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km",
505
- disabled: y,
506
- multiple: v,
507
- required: x,
508
- onChange: W
570
+ disabled,
571
+ multiple,
572
+ required,
573
+ onChange: onInputChange
509
574
  }),
510
- /* @__PURE__ */ l("span", {
511
- id: I,
575
+ /* @__PURE__ */ jsx("span", {
576
+ id: labelId,
512
577
  className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km",
513
- children: E ?? "File upload"
578
+ children: label ?? "File upload"
514
579
  })
515
580
  ]
516
581
  })
517
582
  })
518
583
  });
519
584
  }
520
- function j(e) {
521
- let { asChild: t, className: n, sx: r, onClick: i, onDragOver: a, onDragEnter: o, onDragLeave: c, onDrop: u, onKeyDown: f, children: m, ...g } = e, _ = k(h), v = d.useContext(T), y = E((e) => e.dragOver), b = E((e) => e.invalid), x = d.useCallback((e) => {
522
- if (i?.(e), e.defaultPrevented) return;
523
- let t = e.target;
524
- t instanceof HTMLElement && t.closest("[data-slot=\"file-upload-trigger\"]") || _.inputRef.current?.click();
525
- }, [_.inputRef, i]), S = d.useCallback((e) => {
526
- a?.(e), !e.defaultPrevented && (e.preventDefault(), v?.dispatch({
585
+ function FileUploadDropzone(props) {
586
+ const { asChild, className, sx, onClick: onClickProp, onDragOver: onDragOverProp, onDragEnter: onDragEnterProp, onDragLeave: onDragLeaveProp, onDrop: onDropProp, onKeyDown: onKeyDownProp, children, ...dropzoneProps } = props;
587
+ const context = useFileUploadContext(DROPZONE_NAME);
588
+ const store = useContext(StoreContext);
589
+ const dragOver = useStore((state) => state.dragOver);
590
+ const invalid = useStore((state_0) => state_0.invalid);
591
+ const onClick = useCallback((event) => {
592
+ onClickProp?.(event);
593
+ if (event.defaultPrevented) return;
594
+ const target = event.target;
595
+ if (!(target instanceof HTMLElement && target.closest("[data-slot=\"file-upload-trigger\"]"))) context.inputRef.current?.click();
596
+ }, [context.inputRef, onClickProp]);
597
+ const onDragOver = useCallback((event_0) => {
598
+ onDragOverProp?.(event_0);
599
+ if (event_0.defaultPrevented) return;
600
+ event_0.preventDefault();
601
+ store?.dispatch({
527
602
  type: "SET_DRAG_OVER",
528
- dragOver: !0
529
- }));
530
- }, [v, a]), w = d.useCallback((e) => {
531
- o?.(e), !e.defaultPrevented && (e.preventDefault(), v?.dispatch({
603
+ dragOver: true
604
+ });
605
+ }, [store, onDragOverProp]);
606
+ const onDragEnter = useCallback((event_1) => {
607
+ onDragEnterProp?.(event_1);
608
+ if (event_1.defaultPrevented) return;
609
+ event_1.preventDefault();
610
+ store?.dispatch({
532
611
  type: "SET_DRAG_OVER",
533
- dragOver: !0
534
- }));
535
- }, [v, o]), D = d.useCallback((e) => {
536
- if (c?.(e), e.defaultPrevented) return;
537
- let t = e.relatedTarget;
538
- t && t instanceof Node && e.currentTarget.contains(t) || (e.preventDefault(), v?.dispatch({
612
+ dragOver: true
613
+ });
614
+ }, [store, onDragEnterProp]);
615
+ const onDragLeave = useCallback((event_2) => {
616
+ onDragLeaveProp?.(event_2);
617
+ if (event_2.defaultPrevented) return;
618
+ const relatedTarget = event_2.relatedTarget;
619
+ if (relatedTarget && relatedTarget instanceof Node && event_2.currentTarget.contains(relatedTarget)) return;
620
+ event_2.preventDefault();
621
+ store?.dispatch({
539
622
  type: "SET_DRAG_OVER",
540
- dragOver: !1
541
- }));
542
- }, [v, c]), O = d.useCallback((e) => {
543
- if (u?.(e), e.defaultPrevented) return;
544
- e.preventDefault(), v?.dispatch({
623
+ dragOver: false
624
+ });
625
+ }, [store, onDragLeaveProp]);
626
+ const onDrop = useCallback((event_3) => {
627
+ onDropProp?.(event_3);
628
+ if (event_3.defaultPrevented) return;
629
+ event_3.preventDefault();
630
+ store?.dispatch({
545
631
  type: "SET_DRAG_OVER",
546
- dragOver: !1
632
+ dragOver: false
547
633
  });
548
- let t = e.dataTransfer?.files ? Array.from(e.dataTransfer.files) : [];
549
- t.length !== 0 && _.processFiles(t);
634
+ const files = event_3.dataTransfer?.files ? Array.from(event_3.dataTransfer.files) : [];
635
+ if (files.length === 0) return;
636
+ context.processFiles(files);
550
637
  }, [
551
- v,
552
- _.processFiles,
553
- u
554
- ]), A = d.useCallback((e) => {
555
- f?.(e), e.defaultPrevented || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), _.inputRef.current?.click());
556
- }, [_.inputRef, f]), j = t ? p : "div", M = s.props(C.dropzone, y && C.dropzoneDragging, b && C.dropzoneInvalid, _.disabled && C.dropzoneDisabled, r);
557
- return /* @__PURE__ */ l(j, {
638
+ store,
639
+ context.processFiles,
640
+ onDropProp
641
+ ]);
642
+ const onKeyDown = useCallback((event_4) => {
643
+ onKeyDownProp?.(event_4);
644
+ if (!event_4.defaultPrevented && (event_4.key === "Enter" || event_4.key === " ")) {
645
+ event_4.preventDefault();
646
+ context.inputRef.current?.click();
647
+ }
648
+ }, [context.inputRef, onKeyDownProp]);
649
+ const DropzonePrimitive = asChild ? Slot : "div";
650
+ const sxProps = stylex.props(styles.dropzone, dragOver && styles.dropzoneDragging, invalid && styles.dropzoneInvalid, context.disabled && styles.dropzoneDisabled, sx);
651
+ return /* @__PURE__ */ jsx(DropzonePrimitive, {
558
652
  role: "region",
559
- id: _.dropzoneId,
560
- "aria-controls": `${_.inputId} ${_.listId}`,
561
- "aria-disabled": _.disabled,
562
- "aria-invalid": b,
563
- "data-disabled": _.disabled ? "" : void 0,
564
- "data-dragging": y ? "" : void 0,
565
- "data-invalid": b ? "" : void 0,
653
+ id: context.dropzoneId,
654
+ "aria-controls": `${context.inputId} ${context.listId}`,
655
+ "aria-disabled": context.disabled,
656
+ "aria-invalid": invalid,
657
+ "data-disabled": context.disabled ? "" : void 0,
658
+ "data-dragging": dragOver ? "" : void 0,
659
+ "data-invalid": invalid ? "" : void 0,
566
660
  "data-slot": "file-upload-dropzone",
567
- tabIndex: _.disabled ? void 0 : 0,
568
- ...g,
569
- ...M,
570
- className: n ? `${M.className || ""} ${n}`.trim() : M.className,
571
- onClick: x,
572
- onDragEnter: w,
573
- onDragLeave: D,
574
- onDragOver: S,
575
- onDrop: O,
576
- onKeyDown: A,
577
- children: m
661
+ tabIndex: context.disabled ? void 0 : 0,
662
+ ...dropzoneProps,
663
+ ...sxProps,
664
+ className: className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className,
665
+ onClick,
666
+ onDragEnter,
667
+ onDragLeave,
668
+ onDragOver,
669
+ onDrop,
670
+ onKeyDown,
671
+ children
578
672
  });
579
673
  }
580
- function M(e) {
581
- let t = f(23), n, r, i, a, o;
582
- t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({asChild: n, onClick: i, className: r, sx: a, ...o} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
583
- let c = k(g), u;
584
- t[6] !== c.inputRef || t[7] !== i ? (u = (e) => {
585
- i?.(e), !e.defaultPrevented && c.inputRef.current?.click();
586
- }, t[6] = c.inputRef, t[7] = i, t[8] = u) : u = t[8];
587
- let d = u, m = n ? p : "button", h;
588
- t[9] === a ? h = t[10] : (h = s.props(a), t[9] = a, t[10] = h);
589
- let _ = h, v = c.disabled ? "" : void 0, y;
590
- t[11] !== r || t[12] !== _.className ? (y = r ? `${_.className || ""} ${r}`.trim() : _.className, t[11] = r, t[12] = _.className, t[13] = y) : y = t[13];
591
- let b;
592
- return t[14] !== m || t[15] !== c.disabled || t[16] !== c.inputId || t[17] !== d || t[18] !== _ || t[19] !== v || t[20] !== y || t[21] !== o ? (b = /* @__PURE__ */ l(m, {
593
- type: "button",
594
- "aria-controls": c.inputId,
595
- "data-disabled": v,
596
- "data-slot": "file-upload-trigger",
597
- disabled: c.disabled,
598
- ...o,
599
- ..._,
600
- className: y,
601
- onClick: d
602
- }), t[14] = m, t[15] = c.disabled, t[16] = c.inputId, t[17] = d, t[18] = _, t[19] = v, t[20] = y, t[21] = o, t[22] = b) : b = t[22], b;
674
+ function FileUploadTrigger(props) {
675
+ const $ = c(23);
676
+ let asChild;
677
+ let className;
678
+ let onClickProp;
679
+ let sx;
680
+ let triggerProps;
681
+ if ($[0] !== props) {
682
+ ({asChild, onClick: onClickProp, className, sx, ...triggerProps} = props);
683
+ $[0] = props;
684
+ $[1] = asChild;
685
+ $[2] = className;
686
+ $[3] = onClickProp;
687
+ $[4] = sx;
688
+ $[5] = triggerProps;
689
+ } else {
690
+ asChild = $[1];
691
+ className = $[2];
692
+ onClickProp = $[3];
693
+ sx = $[4];
694
+ triggerProps = $[5];
695
+ }
696
+ const context = useFileUploadContext(TRIGGER_NAME);
697
+ let t0;
698
+ if ($[6] !== context.inputRef || $[7] !== onClickProp) {
699
+ t0 = (event) => {
700
+ onClickProp?.(event);
701
+ if (event.defaultPrevented) return;
702
+ context.inputRef.current?.click();
703
+ };
704
+ $[6] = context.inputRef;
705
+ $[7] = onClickProp;
706
+ $[8] = t0;
707
+ } else t0 = $[8];
708
+ const onClick = t0;
709
+ const TriggerPrimitive = asChild ? Slot : "button";
710
+ let t1;
711
+ if ($[9] !== sx) {
712
+ t1 = stylex.props(sx);
713
+ $[9] = sx;
714
+ $[10] = t1;
715
+ } else t1 = $[10];
716
+ const sxProps = t1;
717
+ const t2 = context.disabled ? "" : void 0;
718
+ let t3;
719
+ if ($[11] !== className || $[12] !== sxProps.className) {
720
+ t3 = className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className;
721
+ $[11] = className;
722
+ $[12] = sxProps.className;
723
+ $[13] = t3;
724
+ } else t3 = $[13];
725
+ let t4;
726
+ if ($[14] !== TriggerPrimitive || $[15] !== context.disabled || $[16] !== context.inputId || $[17] !== onClick || $[18] !== sxProps || $[19] !== t2 || $[20] !== t3 || $[21] !== triggerProps) {
727
+ t4 = /* @__PURE__ */ jsx(TriggerPrimitive, {
728
+ type: "button",
729
+ "aria-controls": context.inputId,
730
+ "data-disabled": t2,
731
+ "data-slot": "file-upload-trigger",
732
+ disabled: context.disabled,
733
+ ...triggerProps,
734
+ ...sxProps,
735
+ className: t3,
736
+ onClick
737
+ });
738
+ $[14] = TriggerPrimitive;
739
+ $[15] = context.disabled;
740
+ $[16] = context.inputId;
741
+ $[17] = onClick;
742
+ $[18] = sxProps;
743
+ $[19] = t2;
744
+ $[20] = t3;
745
+ $[21] = triggerProps;
746
+ $[22] = t4;
747
+ } else t4 = $[22];
748
+ return t4;
603
749
  }
604
- function N(e) {
605
- let { asChild: t, orientation: n = "vertical", className: r, sx: i, children: a, ...o } = e, c = k(_), u = t ? p : "div", d = s.props(C.list, n === "horizontal" && C.listHorizontal, i);
606
- return /* @__PURE__ */ l(u, {
607
- id: c.listId,
750
+ function FileUploadList(props) {
751
+ const { asChild, orientation = "vertical", className, sx, children, ...listProps } = props;
752
+ const context = useFileUploadContext(LIST_NAME);
753
+ const ListPrimitive = asChild ? Slot : "div";
754
+ const sxProps = stylex.props(styles.list, orientation === "horizontal" && styles.listHorizontal, sx);
755
+ return /* @__PURE__ */ jsx(ListPrimitive, {
756
+ id: context.listId,
608
757
  role: "list",
609
758
  "data-slot": "file-upload-list",
610
- ...o,
611
- ...d,
612
- className: r ? `${d.className || ""} ${r}`.trim() : d.className,
613
- children: a
759
+ ...listProps,
760
+ ...sxProps,
761
+ className: className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className,
762
+ children
614
763
  });
615
764
  }
616
- var P = d.createContext(null);
617
- function F(e) {
618
- let t = d.useContext(P);
619
- if (!t) throw Error(`${e} must be within ${v}`);
620
- return t;
765
+ var FileUploadItemContext = createContext(null);
766
+ function useFileUploadItemContext(name) {
767
+ const context = useContext(FileUploadItemContext);
768
+ if (!context) throw new Error(`${name} must be within ${ITEM_NAME}`);
769
+ return context;
621
770
  }
622
- function I(e) {
623
- let t = f(31), n, r, i, a, o, c;
624
- t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], c = t[6]) : ({asChild: n, value: c, className: i, sx: o, children: r, ...a} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = c), k(v);
625
- let u = E(L), m;
626
- t[7] !== u || t[8] !== c ? (m = u.get(c), t[7] = u, t[8] = c, t[9] = m) : m = t[9];
627
- let h = m, g = d.useId(), _ = d.useId(), y = d.useId(), b;
628
- t[10] !== h || t[11] !== _ || t[12] !== y || t[13] !== g || t[14] !== c ? (b = {
629
- file: c,
630
- fileState: h,
631
- statusId: g,
632
- nameId: _,
633
- sizeId: y
634
- }, t[10] = h, t[11] = _, t[12] = y, t[13] = g, t[14] = c, t[15] = b) : b = t[15];
635
- let x = b, S = n ? p : "div", w;
636
- t[16] === o ? w = t[17] : (w = s.props(C.item, o), t[16] = o, t[17] = w);
637
- let T = w, D = h?.status || "idle", O;
638
- t[18] !== i || t[19] !== T.className ? (O = i ? `${T.className || ""} ${i}`.trim() : T.className, t[18] = i, t[19] = T.className, t[20] = O) : O = t[20];
639
- let A;
640
- t[21] !== S || t[22] !== r || t[23] !== a || t[24] !== T || t[25] !== D || t[26] !== O ? (A = /* @__PURE__ */ l(S, {
641
- role: "listitem",
642
- "data-slot": "file-upload-item",
643
- "data-status": D,
644
- ...a,
645
- ...T,
646
- className: O,
647
- children: r
648
- }), t[21] = S, t[22] = r, t[23] = a, t[24] = T, t[25] = D, t[26] = O, t[27] = A) : A = t[27];
649
- let j;
650
- return t[28] !== x || t[29] !== A ? (j = /* @__PURE__ */ l(P.Provider, {
651
- value: x,
652
- children: A
653
- }), t[28] = x, t[29] = A, t[30] = j) : j = t[30], j;
771
+ function FileUploadItem(props) {
772
+ const $ = c(31);
773
+ let asChild;
774
+ let children;
775
+ let className;
776
+ let itemProps;
777
+ let sx;
778
+ let value;
779
+ if ($[0] !== props) {
780
+ ({asChild, value, className, sx, children, ...itemProps} = props);
781
+ $[0] = props;
782
+ $[1] = asChild;
783
+ $[2] = children;
784
+ $[3] = className;
785
+ $[4] = itemProps;
786
+ $[5] = sx;
787
+ $[6] = value;
788
+ } else {
789
+ asChild = $[1];
790
+ children = $[2];
791
+ className = $[3];
792
+ itemProps = $[4];
793
+ sx = $[5];
794
+ value = $[6];
795
+ }
796
+ useFileUploadContext(ITEM_NAME);
797
+ const files = useStore(_temp3);
798
+ let t0;
799
+ if ($[7] !== files || $[8] !== value) {
800
+ t0 = files.get(value);
801
+ $[7] = files;
802
+ $[8] = value;
803
+ $[9] = t0;
804
+ } else t0 = $[9];
805
+ const fileState = t0;
806
+ const statusId = useId();
807
+ const nameId = useId();
808
+ const sizeId = useId();
809
+ let t1;
810
+ if ($[10] !== fileState || $[11] !== nameId || $[12] !== sizeId || $[13] !== statusId || $[14] !== value) {
811
+ t1 = {
812
+ file: value,
813
+ fileState,
814
+ statusId,
815
+ nameId,
816
+ sizeId
817
+ };
818
+ $[10] = fileState;
819
+ $[11] = nameId;
820
+ $[12] = sizeId;
821
+ $[13] = statusId;
822
+ $[14] = value;
823
+ $[15] = t1;
824
+ } else t1 = $[15];
825
+ const contextValue = t1;
826
+ const ItemPrimitive = asChild ? Slot : "div";
827
+ let t2;
828
+ if ($[16] !== sx) {
829
+ t2 = stylex.props(styles.item, sx);
830
+ $[16] = sx;
831
+ $[17] = t2;
832
+ } else t2 = $[17];
833
+ const sxProps = t2;
834
+ const t3 = fileState?.status || "idle";
835
+ let t4;
836
+ if ($[18] !== className || $[19] !== sxProps.className) {
837
+ t4 = className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className;
838
+ $[18] = className;
839
+ $[19] = sxProps.className;
840
+ $[20] = t4;
841
+ } else t4 = $[20];
842
+ let t5;
843
+ if ($[21] !== ItemPrimitive || $[22] !== children || $[23] !== itemProps || $[24] !== sxProps || $[25] !== t3 || $[26] !== t4) {
844
+ t5 = /* @__PURE__ */ jsx(ItemPrimitive, {
845
+ role: "listitem",
846
+ "data-slot": "file-upload-item",
847
+ "data-status": t3,
848
+ ...itemProps,
849
+ ...sxProps,
850
+ className: t4,
851
+ children
852
+ });
853
+ $[21] = ItemPrimitive;
854
+ $[22] = children;
855
+ $[23] = itemProps;
856
+ $[24] = sxProps;
857
+ $[25] = t3;
858
+ $[26] = t4;
859
+ $[27] = t5;
860
+ } else t5 = $[27];
861
+ let t6;
862
+ if ($[28] !== contextValue || $[29] !== t5) {
863
+ t6 = /* @__PURE__ */ jsx(FileUploadItemContext.Provider, {
864
+ value: contextValue,
865
+ children: t5
866
+ });
867
+ $[28] = contextValue;
868
+ $[29] = t5;
869
+ $[30] = t6;
870
+ } else t6 = $[30];
871
+ return t6;
654
872
  }
655
- function L(e) {
656
- return e.files;
873
+ function _temp3(state) {
874
+ return state.files;
657
875
  }
658
- function R(t) {
659
- let n = f(31), r, i, a, o, c, u;
660
- n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4], c = n[5], u = n[6]) : ({asChild: r, render: c, className: a, sx: u, children: i, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = c, n[6] = u);
661
- let m = k(y), h = F(y).file, [g, _] = d.useState(null), v, b;
662
- n[7] !== m.urlCache || n[8] !== h ? (v = () => {
663
- let e = h;
664
- if (e.uploadedUrl && h.type.startsWith("image/")) _(e.uploadedUrl);
665
- else if (h.type.startsWith("image/") && typeof URL < "u" && URL.createObjectURL) {
666
- let e = m.urlCache.get(h);
667
- e || (e = URL.createObjectURL(h), m.urlCache.set(h, e)), _(e);
668
- }
669
- }, b = [h, m.urlCache], n[7] = m.urlCache, n[8] = h, n[9] = v, n[10] = b) : (v = n[9], b = n[10]), d.useEffect(v, b);
670
- let x;
671
- n[11] !== h.name || n[12] !== h.type ? (x = () => {
672
- let t = h.type, n = h.name.toLowerCase();
673
- return t.startsWith("video/") ? /* @__PURE__ */ l(e.FileVideoIcon, { size: 20 }) : t.startsWith("audio/") ? /* @__PURE__ */ l(e.FileAudioIcon, { size: 20 }) : n.endsWith(".zip") || n.endsWith(".tar") || n.endsWith(".gz") || n.endsWith(".rar") ? /* @__PURE__ */ l(e.FileArchiveIcon, { size: 20 }) : n.endsWith(".js") || n.endsWith(".ts") || n.endsWith(".tsx") || n.endsWith(".html") || n.endsWith(".css") || n.endsWith(".json") ? /* @__PURE__ */ l(e.FileCodeIcon, { size: 20 }) : t.startsWith("text/") || n.endsWith(".pdf") || n.endsWith(".doc") || n.endsWith(".docx") ? /* @__PURE__ */ l(e.FileTextIcon, { size: 20 }) : /* @__PURE__ */ l(e.FileIcon, { size: 20 });
674
- }, n[11] = h.name, n[12] = h.type, n[13] = x) : x = n[13];
675
- let S = x, w = r ? p : "div", T;
676
- n[14] === u ? T = n[15] : (T = s.props(C.itemPreview, u), n[14] = u, n[15] = T);
677
- let E = T, D;
678
- n[16] !== a || n[17] !== E.className ? (D = a ? `${E.className || ""} ${a}`.trim() : E.className, n[16] = a, n[17] = E.className, n[18] = D) : D = n[18];
679
- let O;
680
- n[19] !== i || n[20] !== S || n[21] !== h || n[22] !== g || n[23] !== c ? (O = c ? c(h, S) : g ? /* @__PURE__ */ l("img", {
681
- src: g,
682
- alt: h.name,
683
- className: "xh8yej3 x5yr21d xl1xv1r"
684
- }) : i || S(), n[19] = i, n[20] = S, n[21] = h, n[22] = g, n[23] = c, n[24] = O) : O = n[24];
685
- let A;
686
- return n[25] !== w || n[26] !== o || n[27] !== E || n[28] !== D || n[29] !== O ? (A = /* @__PURE__ */ l(w, {
687
- "data-slot": "file-upload-item-preview",
688
- ...o,
689
- ...E,
690
- className: D,
691
- children: O
692
- }), n[25] = w, n[26] = o, n[27] = E, n[28] = D, n[29] = O, n[30] = A) : A = n[30], A;
876
+ function FileUploadItemPreview(props) {
877
+ const $ = c(31);
878
+ let asChild;
879
+ let children;
880
+ let className;
881
+ let previewProps;
882
+ let render;
883
+ let sx;
884
+ if ($[0] !== props) {
885
+ ({asChild, render, className, sx, children, ...previewProps} = props);
886
+ $[0] = props;
887
+ $[1] = asChild;
888
+ $[2] = children;
889
+ $[3] = className;
890
+ $[4] = previewProps;
891
+ $[5] = render;
892
+ $[6] = sx;
893
+ } else {
894
+ asChild = $[1];
895
+ children = $[2];
896
+ className = $[3];
897
+ previewProps = $[4];
898
+ render = $[5];
899
+ sx = $[6];
900
+ }
901
+ const context = useFileUploadContext(ITEM_PREVIEW_NAME);
902
+ const file = useFileUploadItemContext(ITEM_PREVIEW_NAME).file;
903
+ const [objectUrl, setObjectUrl] = useState(null);
904
+ let t0;
905
+ let t1;
906
+ if ($[7] !== context.urlCache || $[8] !== file) {
907
+ t0 = () => {
908
+ const extended = file;
909
+ if (extended.uploadedUrl && file.type.startsWith("image/")) setObjectUrl(extended.uploadedUrl);
910
+ else if (file.type.startsWith("image/") && typeof URL !== "undefined" && URL.createObjectURL) {
911
+ let url = context.urlCache.get(file);
912
+ if (!url) {
913
+ url = URL.createObjectURL(file);
914
+ context.urlCache.set(file, url);
915
+ }
916
+ setObjectUrl(url);
917
+ }
918
+ };
919
+ t1 = [file, context.urlCache];
920
+ $[7] = context.urlCache;
921
+ $[8] = file;
922
+ $[9] = t0;
923
+ $[10] = t1;
924
+ } else {
925
+ t0 = $[9];
926
+ t1 = $[10];
927
+ }
928
+ useEffect(t0, t1);
929
+ let t2;
930
+ if ($[11] !== file.name || $[12] !== file.type) {
931
+ t2 = () => {
932
+ const type = file.type;
933
+ const name = file.name.toLowerCase();
934
+ if (type.startsWith("video/")) return /* @__PURE__ */ jsx(Icons.FileVideoIcon, { size: 20 });
935
+ if (type.startsWith("audio/")) return /* @__PURE__ */ jsx(Icons.FileAudioIcon, { size: 20 });
936
+ if (name.endsWith(".zip") || name.endsWith(".tar") || name.endsWith(".gz") || name.endsWith(".rar")) return /* @__PURE__ */ jsx(Icons.FileArchiveIcon, { size: 20 });
937
+ if (name.endsWith(".js") || name.endsWith(".ts") || name.endsWith(".tsx") || name.endsWith(".html") || name.endsWith(".css") || name.endsWith(".json")) return /* @__PURE__ */ jsx(Icons.FileCodeIcon, { size: 20 });
938
+ if (type.startsWith("text/") || name.endsWith(".pdf") || name.endsWith(".doc") || name.endsWith(".docx")) return /* @__PURE__ */ jsx(Icons.FileTextIcon, { size: 20 });
939
+ return /* @__PURE__ */ jsx(Icons.FileIcon, { size: 20 });
940
+ };
941
+ $[11] = file.name;
942
+ $[12] = file.type;
943
+ $[13] = t2;
944
+ } else t2 = $[13];
945
+ const defaultFallback = t2;
946
+ const PreviewPrimitive = asChild ? Slot : "div";
947
+ let t3;
948
+ if ($[14] !== sx) {
949
+ t3 = stylex.props(styles.itemPreview, sx);
950
+ $[14] = sx;
951
+ $[15] = t3;
952
+ } else t3 = $[15];
953
+ const sxProps = t3;
954
+ let t4;
955
+ if ($[16] !== className || $[17] !== sxProps.className) {
956
+ t4 = className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className;
957
+ $[16] = className;
958
+ $[17] = sxProps.className;
959
+ $[18] = t4;
960
+ } else t4 = $[18];
961
+ let t5;
962
+ if ($[19] !== children || $[20] !== defaultFallback || $[21] !== file || $[22] !== objectUrl || $[23] !== render) {
963
+ t5 = render ? render(file, defaultFallback) : objectUrl ? /* @__PURE__ */ jsx("img", {
964
+ src: objectUrl,
965
+ alt: file.name,
966
+ className: "xh8yej3 x5yr21d xl1xv1r"
967
+ }) : children || defaultFallback();
968
+ $[19] = children;
969
+ $[20] = defaultFallback;
970
+ $[21] = file;
971
+ $[22] = objectUrl;
972
+ $[23] = render;
973
+ $[24] = t5;
974
+ } else t5 = $[24];
975
+ let t6;
976
+ if ($[25] !== PreviewPrimitive || $[26] !== previewProps || $[27] !== sxProps || $[28] !== t4 || $[29] !== t5) {
977
+ t6 = /* @__PURE__ */ jsx(PreviewPrimitive, {
978
+ "data-slot": "file-upload-item-preview",
979
+ ...previewProps,
980
+ ...sxProps,
981
+ className: t4,
982
+ children: t5
983
+ });
984
+ $[25] = PreviewPrimitive;
985
+ $[26] = previewProps;
986
+ $[27] = sxProps;
987
+ $[28] = t4;
988
+ $[29] = t5;
989
+ $[30] = t6;
990
+ } else t6 = $[30];
991
+ return t6;
693
992
  }
694
- function z(e) {
695
- let n = f(23), r, i, o, d, m;
696
- n[0] === e ? (r = n[1], i = n[2], o = n[3], d = n[4], m = n[5]) : ({asChild: r, className: o, sx: m, children: i, ...d} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = o, n[4] = d, n[5] = m);
697
- let h = F(b), g = h.file, _ = h.fileState, v = r ? p : "div", y;
698
- n[6] === m ? y = n[7] : (y = s.props(C.itemMetadata, m), n[6] = m, n[7] = y);
699
- let x = y, S;
700
- n[8] !== o || n[9] !== x.className ? (S = o ? `${x.className || ""} ${o}`.trim() : x.className, n[8] = o, n[9] = x.className, n[10] = S) : S = n[10];
701
- let w;
702
- n[11] !== i || n[12] !== g || n[13] !== _ || n[14] !== h.nameId || n[15] !== h.sizeId ? (w = i || /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(t, {
703
- id: h.nameId,
704
- size: "sm",
705
- weight: "medium",
706
- ellipsis: !0,
707
- title: g.name,
708
- sx: C.itemName,
709
- children: g.name
710
- }), _?.error ? /* @__PURE__ */ l(t, {
711
- size: "xs",
712
- type: "danger",
713
- sx: C.itemError,
714
- children: _.error
715
- }) : /* @__PURE__ */ l(t, {
716
- id: h.sizeId,
717
- size: "xs",
718
- type: "muted",
719
- sx: C.itemSize,
720
- children: a(g.size)
721
- })] }), n[11] = i, n[12] = g, n[13] = _, n[14] = h.nameId, n[15] = h.sizeId, n[16] = w) : w = n[16];
722
- let T;
723
- return n[17] !== v || n[18] !== d || n[19] !== x || n[20] !== S || n[21] !== w ? (T = /* @__PURE__ */ l(v, {
724
- "data-slot": "file-upload-item-metadata",
725
- ...d,
726
- ...x,
727
- className: S,
728
- children: w
729
- }), n[17] = v, n[18] = d, n[19] = x, n[20] = S, n[21] = w, n[22] = T) : T = n[22], T;
993
+ function FileUploadItemMetadata(props) {
994
+ const $ = c(23);
995
+ let asChild;
996
+ let children;
997
+ let className;
998
+ let metadataProps;
999
+ let sx;
1000
+ if ($[0] !== props) {
1001
+ ({asChild, className, sx, children, ...metadataProps} = props);
1002
+ $[0] = props;
1003
+ $[1] = asChild;
1004
+ $[2] = children;
1005
+ $[3] = className;
1006
+ $[4] = metadataProps;
1007
+ $[5] = sx;
1008
+ } else {
1009
+ asChild = $[1];
1010
+ children = $[2];
1011
+ className = $[3];
1012
+ metadataProps = $[4];
1013
+ sx = $[5];
1014
+ }
1015
+ const itemContext = useFileUploadItemContext(ITEM_METADATA_NAME);
1016
+ const file = itemContext.file;
1017
+ const fileState = itemContext.fileState;
1018
+ const MetadataPrimitive = asChild ? Slot : "div";
1019
+ let t0;
1020
+ if ($[6] !== sx) {
1021
+ t0 = stylex.props(styles.itemMetadata, sx);
1022
+ $[6] = sx;
1023
+ $[7] = t0;
1024
+ } else t0 = $[7];
1025
+ const sxProps = t0;
1026
+ let t1;
1027
+ if ($[8] !== className || $[9] !== sxProps.className) {
1028
+ t1 = className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className;
1029
+ $[8] = className;
1030
+ $[9] = sxProps.className;
1031
+ $[10] = t1;
1032
+ } else t1 = $[10];
1033
+ let t2;
1034
+ if ($[11] !== children || $[12] !== file || $[13] !== fileState || $[14] !== itemContext.nameId || $[15] !== itemContext.sizeId) {
1035
+ t2 = children ? children : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
1036
+ id: itemContext.nameId,
1037
+ size: "sm",
1038
+ weight: "medium",
1039
+ ellipsis: true,
1040
+ title: file.name,
1041
+ sx: styles.itemName,
1042
+ children: file.name
1043
+ }), fileState?.error ? /* @__PURE__ */ jsx(Text, {
1044
+ size: "xs",
1045
+ type: "danger",
1046
+ sx: styles.itemError,
1047
+ children: fileState.error
1048
+ }) : /* @__PURE__ */ jsx(Text, {
1049
+ id: itemContext.sizeId,
1050
+ size: "xs",
1051
+ type: "muted",
1052
+ sx: styles.itemSize,
1053
+ children: formatFileSize(file.size)
1054
+ })] });
1055
+ $[11] = children;
1056
+ $[12] = file;
1057
+ $[13] = fileState;
1058
+ $[14] = itemContext.nameId;
1059
+ $[15] = itemContext.sizeId;
1060
+ $[16] = t2;
1061
+ } else t2 = $[16];
1062
+ let t3;
1063
+ if ($[17] !== MetadataPrimitive || $[18] !== metadataProps || $[19] !== sxProps || $[20] !== t1 || $[21] !== t2) {
1064
+ t3 = /* @__PURE__ */ jsx(MetadataPrimitive, {
1065
+ "data-slot": "file-upload-item-metadata",
1066
+ ...metadataProps,
1067
+ ...sxProps,
1068
+ className: t1,
1069
+ children: t2
1070
+ });
1071
+ $[17] = MetadataPrimitive;
1072
+ $[18] = metadataProps;
1073
+ $[19] = sxProps;
1074
+ $[20] = t1;
1075
+ $[21] = t2;
1076
+ $[22] = t3;
1077
+ } else t3 = $[22];
1078
+ return t3;
730
1079
  }
731
- function B(e) {
732
- let { asChild: t, variant: n = "linear", className: r, sx: i, ...a } = e, o = F(x), c = o.fileState?.progress ?? 0;
733
- if (o.fileState?.status !== "uploading" && n === "fill") return null;
734
- let u = t ? p : "div", d = s.props(n === "fill" ? C.progressFill : n === "bottom" ? [C.progressRoot, C.progressBottom] : C.progressRoot, i);
735
- return /* @__PURE__ */ l(u, {
1080
+ function FileUploadItemProgress(props) {
1081
+ const { asChild, variant = "linear", className, sx, ...progressProps } = props;
1082
+ const itemContext = useFileUploadItemContext(ITEM_PROGRESS_NAME);
1083
+ const progress = itemContext.fileState?.progress ?? 0;
1084
+ if (itemContext.fileState?.status !== "uploading" && variant === "fill") return null;
1085
+ const ProgressPrimitive = asChild ? Slot : "div";
1086
+ const sxProps = stylex.props(variant === "fill" ? styles.progressFill : variant === "bottom" ? [styles.progressRoot, styles.progressBottom] : styles.progressRoot, sx);
1087
+ return /* @__PURE__ */ jsx(ProgressPrimitive, {
736
1088
  role: "progressbar",
737
- "aria-valuenow": c,
1089
+ "aria-valuenow": progress,
738
1090
  "aria-valuemin": 0,
739
1091
  "aria-valuemax": 100,
740
1092
  "data-slot": "file-upload-item-progress",
741
- ...a,
742
- ...d,
743
- className: r ? `${d.className || ""} ${r}`.trim() : d.className,
744
- children: n !== "fill" && /* @__PURE__ */ l("div", {
1093
+ ...progressProps,
1094
+ ...sxProps,
1095
+ className: className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className,
1096
+ children: variant !== "fill" && /* @__PURE__ */ jsx("div", {
745
1097
  className: "x5yr21d x1j7ufkg x9psvww xxrbq2n x1d8287x xz4gly6",
746
- style: { width: `${Math.min(Math.max(c, 0), 100)}%` }
1098
+ style: { width: `${Math.min(Math.max(progress, 0), 100)}%` }
747
1099
  })
748
1100
  });
749
1101
  }
750
- function V(t) {
751
- let n = f(26), r, i, a, o, c, u;
752
- n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4], c = n[5], u = n[6]) : ({asChild: r, onClick: c, className: a, sx: u, children: i, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = c, n[6] = u);
753
- let m = d.useContext(T), h = F(S), g;
754
- n[7] !== h.file || n[8] !== c || n[9] !== m ? (g = (e) => {
755
- c?.(e), !e.defaultPrevented && m?.dispatch({
756
- type: "REMOVE_FILE",
757
- file: h.file
1102
+ function FileUploadItemDelete(props) {
1103
+ const $ = c(26);
1104
+ let asChild;
1105
+ let children;
1106
+ let className;
1107
+ let deleteProps;
1108
+ let onClickProp;
1109
+ let sx;
1110
+ if ($[0] !== props) {
1111
+ ({asChild, onClick: onClickProp, className, sx, children, ...deleteProps} = props);
1112
+ $[0] = props;
1113
+ $[1] = asChild;
1114
+ $[2] = children;
1115
+ $[3] = className;
1116
+ $[4] = deleteProps;
1117
+ $[5] = onClickProp;
1118
+ $[6] = sx;
1119
+ } else {
1120
+ asChild = $[1];
1121
+ children = $[2];
1122
+ className = $[3];
1123
+ deleteProps = $[4];
1124
+ onClickProp = $[5];
1125
+ sx = $[6];
1126
+ }
1127
+ const store = useContext(StoreContext);
1128
+ const itemContext = useFileUploadItemContext(ITEM_DELETE_NAME);
1129
+ let t0;
1130
+ if ($[7] !== itemContext.file || $[8] !== onClickProp || $[9] !== store) {
1131
+ t0 = (event) => {
1132
+ onClickProp?.(event);
1133
+ if (event.defaultPrevented) return;
1134
+ store?.dispatch({
1135
+ type: "REMOVE_FILE",
1136
+ file: itemContext.file
1137
+ });
1138
+ };
1139
+ $[7] = itemContext.file;
1140
+ $[8] = onClickProp;
1141
+ $[9] = store;
1142
+ $[10] = t0;
1143
+ } else t0 = $[10];
1144
+ const onClick = t0;
1145
+ const DeletePrimitive = asChild ? Slot : "button";
1146
+ let t1;
1147
+ if ($[11] !== sx) {
1148
+ t1 = stylex.props(styles.itemDeleteBtn, sx);
1149
+ $[11] = sx;
1150
+ $[12] = t1;
1151
+ } else t1 = $[12];
1152
+ const sxProps = t1;
1153
+ const t2 = `Remove ${itemContext.file.name}`;
1154
+ let t3;
1155
+ if ($[13] !== className || $[14] !== sxProps.className) {
1156
+ t3 = className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className;
1157
+ $[13] = className;
1158
+ $[14] = sxProps.className;
1159
+ $[15] = t3;
1160
+ } else t3 = $[15];
1161
+ let t4;
1162
+ if ($[16] !== children) {
1163
+ t4 = children || /* @__PURE__ */ jsx(Icons.X, { size: 15 });
1164
+ $[16] = children;
1165
+ $[17] = t4;
1166
+ } else t4 = $[17];
1167
+ let t5;
1168
+ if ($[18] !== DeletePrimitive || $[19] !== deleteProps || $[20] !== onClick || $[21] !== sxProps || $[22] !== t2 || $[23] !== t3 || $[24] !== t4) {
1169
+ t5 = /* @__PURE__ */ jsx(DeletePrimitive, {
1170
+ type: "button",
1171
+ "data-slot": "file-upload-item-delete",
1172
+ "aria-label": t2,
1173
+ ...deleteProps,
1174
+ ...sxProps,
1175
+ className: t3,
1176
+ onClick,
1177
+ children: t4
758
1178
  });
759
- }, n[7] = h.file, n[8] = c, n[9] = m, n[10] = g) : g = n[10];
760
- let _ = g, v = r ? p : "button", y;
761
- n[11] === u ? y = n[12] : (y = s.props(C.itemDeleteBtn, u), n[11] = u, n[12] = y);
762
- let b = y, x = `Remove ${h.file.name}`, w;
763
- n[13] !== a || n[14] !== b.className ? (w = a ? `${b.className || ""} ${a}`.trim() : b.className, n[13] = a, n[14] = b.className, n[15] = w) : w = n[15];
764
- let E;
765
- n[16] === i ? E = n[17] : (E = i || /* @__PURE__ */ l(e.X, { size: 15 }), n[16] = i, n[17] = E);
766
- let D;
767
- return n[18] !== v || n[19] !== o || n[20] !== _ || n[21] !== b || n[22] !== x || n[23] !== w || n[24] !== E ? (D = /* @__PURE__ */ l(v, {
768
- type: "button",
769
- "data-slot": "file-upload-item-delete",
770
- "aria-label": x,
771
- ...o,
772
- ...b,
773
- className: w,
774
- onClick: _,
775
- children: E
776
- }), n[18] = v, n[19] = o, n[20] = _, n[21] = b, n[22] = x, n[23] = w, n[24] = E, n[25] = D) : D = n[25], D;
1179
+ $[18] = DeletePrimitive;
1180
+ $[19] = deleteProps;
1181
+ $[20] = onClick;
1182
+ $[21] = sxProps;
1183
+ $[22] = t2;
1184
+ $[23] = t3;
1185
+ $[24] = t4;
1186
+ $[25] = t5;
1187
+ } else t5 = $[25];
1188
+ return t5;
777
1189
  }
778
- function H(e) {
779
- let t = f(20), n, r, i, a, o;
780
- t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({asChild: n, onClick: a, className: r, sx: o, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
781
- let c = d.useContext(T), u;
782
- t[6] !== a || t[7] !== c ? (u = (e) => {
783
- a?.(e), !e.defaultPrevented && c?.dispatch({ type: "CLEAR" });
784
- }, t[6] = a, t[7] = c, t[8] = u) : u = t[8];
785
- let m = u, h = n ? p : "button", g;
786
- t[9] === o ? g = t[10] : (g = s.props(o), t[9] = o, t[10] = g);
787
- let _ = g, v;
788
- t[11] !== r || t[12] !== _.className ? (v = r ? `${_.className || ""} ${r}`.trim() : _.className, t[11] = r, t[12] = _.className, t[13] = v) : v = t[13];
789
- let y;
790
- return t[14] !== h || t[15] !== i || t[16] !== m || t[17] !== _ || t[18] !== v ? (y = /* @__PURE__ */ l(h, {
791
- type: "button",
792
- "data-slot": "file-upload-clear",
793
- ...i,
794
- ..._,
795
- className: v,
796
- onClick: m
797
- }), t[14] = h, t[15] = i, t[16] = m, t[17] = _, t[18] = v, t[19] = y) : y = t[19], y;
1190
+ function FileUploadClear(props) {
1191
+ const $ = c(20);
1192
+ let asChild;
1193
+ let className;
1194
+ let clearProps;
1195
+ let onClickProp;
1196
+ let sx;
1197
+ if ($[0] !== props) {
1198
+ ({asChild, onClick: onClickProp, className, sx, ...clearProps} = props);
1199
+ $[0] = props;
1200
+ $[1] = asChild;
1201
+ $[2] = className;
1202
+ $[3] = clearProps;
1203
+ $[4] = onClickProp;
1204
+ $[5] = sx;
1205
+ } else {
1206
+ asChild = $[1];
1207
+ className = $[2];
1208
+ clearProps = $[3];
1209
+ onClickProp = $[4];
1210
+ sx = $[5];
1211
+ }
1212
+ const store = useContext(StoreContext);
1213
+ let t0;
1214
+ if ($[6] !== onClickProp || $[7] !== store) {
1215
+ t0 = (event) => {
1216
+ onClickProp?.(event);
1217
+ if (event.defaultPrevented) return;
1218
+ store?.dispatch({ type: "CLEAR" });
1219
+ };
1220
+ $[6] = onClickProp;
1221
+ $[7] = store;
1222
+ $[8] = t0;
1223
+ } else t0 = $[8];
1224
+ const onClick = t0;
1225
+ const ClearPrimitive = asChild ? Slot : "button";
1226
+ let t1;
1227
+ if ($[9] !== sx) {
1228
+ t1 = stylex.props(sx);
1229
+ $[9] = sx;
1230
+ $[10] = t1;
1231
+ } else t1 = $[10];
1232
+ const sxProps = t1;
1233
+ let t2;
1234
+ if ($[11] !== className || $[12] !== sxProps.className) {
1235
+ t2 = className ? `${sxProps.className || ""} ${className}`.trim() : sxProps.className;
1236
+ $[11] = className;
1237
+ $[12] = sxProps.className;
1238
+ $[13] = t2;
1239
+ } else t2 = $[13];
1240
+ let t3;
1241
+ if ($[14] !== ClearPrimitive || $[15] !== clearProps || $[16] !== onClick || $[17] !== sxProps || $[18] !== t2) {
1242
+ t3 = /* @__PURE__ */ jsx(ClearPrimitive, {
1243
+ type: "button",
1244
+ "data-slot": "file-upload-clear",
1245
+ ...clearProps,
1246
+ ...sxProps,
1247
+ className: t2,
1248
+ onClick
1249
+ });
1250
+ $[14] = ClearPrimitive;
1251
+ $[15] = clearProps;
1252
+ $[16] = onClick;
1253
+ $[17] = sxProps;
1254
+ $[18] = t2;
1255
+ $[19] = t3;
1256
+ } else t3 = $[19];
1257
+ return t3;
798
1258
  }
799
- function U({ variant: n = "default", dropzoneTitle: r, dropzoneSubtitle: i, icon: o, uploadHandler: s, showFileList: c = !0, showProgress: f = !0, showPreview: p = !0, showClear: m = !1, onUpload: h, maxFiles: g = 1, maxSize: _ = 10485760, accept: v = "image/*", value: y, onValueChange: b, sx: x, className: S, ...w }) {
800
- let [T, E] = d.useState(y || []), D = y === void 0 ? T : y, O = (e) => {
801
- E(e), b?.(e);
802
- }, k = d.useCallback(async (e, t) => {
803
- if (h) return h(e, t);
804
- s && await s(e, {
805
- onProgress: t.onProgress,
806
- onSuccess: (e) => t.onSuccess(e),
807
- onError: (e, n) => t.onError(e, n)
1259
+ function FileUploader({ variant = "default", dropzoneTitle, dropzoneSubtitle, icon, uploadHandler, showFileList = true, showProgress = true, showPreview = true, showClear = false, onUpload: onUploadProp, maxFiles = 1, maxSize = 10485760, accept = "image/*", value, onValueChange, sx, className, ...props }) {
1260
+ const [internalFiles, setInternalFiles] = useState(value || []);
1261
+ const activeFiles = value !== void 0 ? value : internalFiles;
1262
+ const handleValueChange = (newFiles) => {
1263
+ setInternalFiles(newFiles);
1264
+ onValueChange?.(newFiles);
1265
+ };
1266
+ const handleUpload = useCallback(async (files, options) => {
1267
+ if (onUploadProp) return onUploadProp(files, options);
1268
+ if (uploadHandler) await uploadHandler(files, {
1269
+ onProgress: options.onProgress,
1270
+ onSuccess: (f) => options.onSuccess(f),
1271
+ onError: (f_0, err) => options.onError(f_0, err)
808
1272
  });
809
- }, [h, s]);
810
- if (n === "avatar") {
811
- let n = D[0];
812
- return /* @__PURE__ */ l(A, {
813
- value: D,
814
- onValueChange: O,
1273
+ }, [onUploadProp, uploadHandler]);
1274
+ if (variant === "avatar") {
1275
+ const singleFile = activeFiles[0];
1276
+ return /* @__PURE__ */ jsx(FileUploadRoot, {
1277
+ value: activeFiles,
1278
+ onValueChange: handleValueChange,
815
1279
  maxFiles: 1,
816
- maxSize: _,
817
- accept: v,
818
- onUpload: k,
819
- sx: x,
820
- className: S,
821
- ...w,
822
- children: /* @__PURE__ */ l(j, {
823
- sx: C.avatarDropzone,
824
- children: n ? /* @__PURE__ */ u(I, {
825
- value: n,
826
- sx: C.avatarItem,
1280
+ maxSize,
1281
+ accept,
1282
+ onUpload: handleUpload,
1283
+ sx,
1284
+ className,
1285
+ ...props,
1286
+ children: /* @__PURE__ */ jsx(FileUploadDropzone, {
1287
+ sx: styles.avatarDropzone,
1288
+ children: singleFile ? /* @__PURE__ */ jsxs(FileUploadItem, {
1289
+ value: singleFile,
1290
+ sx: styles.avatarItem,
827
1291
  children: [
828
- /* @__PURE__ */ l(R, {
829
- sx: C.avatarPreview,
830
- render: (e) => {
831
- let t = URL.createObjectURL(e);
832
- return /* @__PURE__ */ l("img", {
833
- src: t,
834
- alt: e.name,
1292
+ /* @__PURE__ */ jsx(FileUploadItemPreview, {
1293
+ sx: styles.avatarPreview,
1294
+ render: (file) => {
1295
+ const url = URL.createObjectURL(file);
1296
+ return /* @__PURE__ */ jsx("img", {
1297
+ src: url,
1298
+ alt: file.name,
835
1299
  className: "xh8yej3 x5yr21d xl1xv1r"
836
1300
  });
837
1301
  }
838
1302
  }),
839
- /* @__PURE__ */ u("div", {
1303
+ /* @__PURE__ */ jsxs("div", {
840
1304
  className: "x10l6tqk x10a8y8t x78zum5 xdt5ytf x6s0dn4 xl56j7k xvh977a xa44r0r xstwp1q xg01cxk x19991ni x13dflua x1o7uuvo",
841
- children: [/* @__PURE__ */ l(e.Camera, { size: 22 }), /* @__PURE__ */ l(t, {
1305
+ children: [/* @__PURE__ */ jsx(Icons.Camera, { size: 22 }), /* @__PURE__ */ jsx(Text, {
842
1306
  size: "xs",
843
1307
  weight: "semibold",
844
- sx: C.whiteText,
1308
+ sx: styles.whiteText,
845
1309
  children: "Change"
846
1310
  })]
847
1311
  }),
848
- f && /* @__PURE__ */ l(B, { variant: "fill" })
1312
+ showProgress && /* @__PURE__ */ jsx(FileUploadItemProgress, { variant: "fill" })
849
1313
  ]
850
- }) : /* @__PURE__ */ u("div", {
1314
+ }) : /* @__PURE__ */ jsxs("div", {
851
1315
  style: {
852
1316
  display: "flex",
853
1317
  flexDirection: "column",
854
1318
  alignItems: "center",
855
1319
  gap: "0.25rem"
856
1320
  },
857
- children: [/* @__PURE__ */ l(e.Camera, { size: 28 }), /* @__PURE__ */ l(t, {
1321
+ children: [/* @__PURE__ */ jsx(Icons.Camera, { size: 28 }), /* @__PURE__ */ jsx(Text, {
858
1322
  size: "xs",
859
1323
  type: "muted",
860
1324
  weight: "medium",
@@ -864,44 +1328,44 @@ function U({ variant: n = "default", dropzoneTitle: r, dropzoneSubtitle: i, icon
864
1328
  })
865
1329
  });
866
1330
  }
867
- if (n === "compact") return /* @__PURE__ */ u(A, {
868
- value: D,
869
- onValueChange: O,
870
- maxFiles: g,
871
- maxSize: _,
872
- accept: v,
873
- multiple: g > 1,
874
- onUpload: k,
875
- sx: x,
876
- className: S,
877
- ...w,
878
- children: [/* @__PURE__ */ u(j, {
879
- sx: C.compactDropzone,
1331
+ if (variant === "compact") return /* @__PURE__ */ jsxs(FileUploadRoot, {
1332
+ value: activeFiles,
1333
+ onValueChange: handleValueChange,
1334
+ maxFiles,
1335
+ maxSize,
1336
+ accept,
1337
+ multiple: maxFiles > 1,
1338
+ onUpload: handleUpload,
1339
+ sx,
1340
+ className,
1341
+ ...props,
1342
+ children: [/* @__PURE__ */ jsxs(FileUploadDropzone, {
1343
+ sx: styles.compactDropzone,
880
1344
  children: [
881
- /* @__PURE__ */ l("div", {
1345
+ /* @__PURE__ */ jsx("div", {
882
1346
  className: "x78zum5 x6s0dn4 xl56j7k xvm51jw xwaiz5r x9psvww xmkeg23 x1y0btm7 xb30jbz x1rexohn xw3nh4a",
883
- children: o || /* @__PURE__ */ l(e.CloudUpload, { size: 18 })
1347
+ children: icon || /* @__PURE__ */ jsx(Icons.CloudUpload, { size: 18 })
884
1348
  }),
885
- /* @__PURE__ */ u("div", {
1349
+ /* @__PURE__ */ jsxs("div", {
886
1350
  style: {
887
1351
  display: "flex",
888
1352
  flexDirection: "column",
889
1353
  flex: 1,
890
1354
  minWidth: 0
891
1355
  },
892
- children: [/* @__PURE__ */ l(t, {
1356
+ children: [/* @__PURE__ */ jsx(Text, {
893
1357
  size: "sm",
894
1358
  weight: "medium",
895
- children: r || "Choose or drop files to upload"
896
- }), /* @__PURE__ */ l(t, {
1359
+ children: dropzoneTitle || "Choose or drop files to upload"
1360
+ }), /* @__PURE__ */ jsx(Text, {
897
1361
  size: "xs",
898
1362
  type: "muted",
899
- children: i || `${g > 1 ? `Up to ${g} files` : "1 file max"} ${_ ? `(Max ${a(_)})` : ""}`
1363
+ children: dropzoneSubtitle || `${maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file max"} ${maxSize ? `(Max ${formatFileSize(maxSize)})` : ""}`
900
1364
  })]
901
1365
  }),
902
- /* @__PURE__ */ l(M, {
903
- asChild: !0,
904
- children: /* @__PURE__ */ l("button", {
1366
+ /* @__PURE__ */ jsx(FileUploadTrigger, {
1367
+ asChild: true,
1368
+ children: /* @__PURE__ */ jsx("button", {
905
1369
  type: "button",
906
1370
  style: {
907
1371
  fontSize: "0.75rem",
@@ -917,81 +1381,82 @@ function U({ variant: n = "default", dropzoneTitle: r, dropzoneSubtitle: i, icon
917
1381
  })
918
1382
  })
919
1383
  ]
920
- }), c && D.length > 0 && /* @__PURE__ */ l(N, {
1384
+ }), showFileList && activeFiles.length > 0 && /* @__PURE__ */ jsx(FileUploadList, {
921
1385
  orientation: "horizontal",
922
- children: D.map((e, t) => /* @__PURE__ */ u(I, {
923
- value: e,
1386
+ children: activeFiles.map((file_0, index) => /* @__PURE__ */ jsxs(FileUploadItem, {
1387
+ value: file_0,
924
1388
  children: [
925
- p && /* @__PURE__ */ l(R, {}),
926
- /* @__PURE__ */ l(z, {}),
927
- f && /* @__PURE__ */ l(B, { variant: "bottom" }),
928
- /* @__PURE__ */ l(V, {})
1389
+ showPreview && /* @__PURE__ */ jsx(FileUploadItemPreview, {}),
1390
+ /* @__PURE__ */ jsx(FileUploadItemMetadata, {}),
1391
+ showProgress && /* @__PURE__ */ jsx(FileUploadItemProgress, { variant: "bottom" }),
1392
+ /* @__PURE__ */ jsx(FileUploadItemDelete, {})
929
1393
  ]
930
- }, `${e.name}-${t}`))
1394
+ }, `${file_0.name}-${index}`))
931
1395
  })]
932
1396
  });
933
- let P = `${g > 1 ? `Up to ${g} files` : "1 file max"} ${_ ? `(Max ${a(_)})` : ""}`;
934
- return /* @__PURE__ */ u(A, {
935
- value: D,
936
- onValueChange: O,
937
- maxFiles: g,
938
- maxSize: _,
939
- accept: v,
940
- multiple: g > 1,
941
- onUpload: k,
942
- sx: x,
943
- className: S,
944
- ...w,
1397
+ const defaultTitle = "Drag & drop files here, or click to browse";
1398
+ const defaultSubtitle = `${maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file max"} ${maxSize ? `(Max ${formatFileSize(maxSize)})` : ""}`;
1399
+ return /* @__PURE__ */ jsxs(FileUploadRoot, {
1400
+ value: activeFiles,
1401
+ onValueChange: handleValueChange,
1402
+ maxFiles,
1403
+ maxSize,
1404
+ accept,
1405
+ multiple: maxFiles > 1,
1406
+ onUpload: handleUpload,
1407
+ sx,
1408
+ className,
1409
+ ...props,
945
1410
  children: [
946
- /* @__PURE__ */ u(j, { children: [
947
- /* @__PURE__ */ l("div", {
1411
+ /* @__PURE__ */ jsxs(FileUploadDropzone, { children: [
1412
+ /* @__PURE__ */ jsx("div", {
948
1413
  className: "x78zum5 x6s0dn4 xl56j7k xvm51jw xwaiz5r x9psvww xmkeg23 x1y0btm7 xb30jbz x1rexohn xw3nh4a",
949
- children: o || /* @__PURE__ */ l(e.CloudUpload, { size: 20 })
1414
+ children: icon || /* @__PURE__ */ jsx(Icons.CloudUpload, { size: 20 })
950
1415
  }),
951
- /* @__PURE__ */ l(t, {
1416
+ /* @__PURE__ */ jsx(Text, {
952
1417
  size: "md",
953
1418
  weight: "medium",
954
- sx: C.dropzoneTitle,
955
- children: r || "Drag & drop files here, or click to browse"
1419
+ sx: styles.dropzoneTitle,
1420
+ children: dropzoneTitle || defaultTitle
956
1421
  }),
957
- /* @__PURE__ */ l(t, {
1422
+ /* @__PURE__ */ jsx(Text, {
958
1423
  size: "xs",
959
1424
  type: "muted",
960
- sx: C.dropzoneSubtitle,
961
- children: i || P
1425
+ sx: styles.dropzoneSubtitle,
1426
+ children: dropzoneSubtitle || defaultSubtitle
962
1427
  })
963
1428
  ] }),
964
- m && D.length > 0 && /* @__PURE__ */ l("div", {
1429
+ showClear && activeFiles.length > 0 && /* @__PURE__ */ jsx("div", {
965
1430
  className: "x78zum5 x13a6bvl xh8yej3",
966
- children: /* @__PURE__ */ l(H, {
967
- asChild: !0,
968
- children: /* @__PURE__ */ u("button", {
1431
+ children: /* @__PURE__ */ jsx(FileUploadClear, {
1432
+ asChild: true,
1433
+ children: /* @__PURE__ */ jsxs("button", {
969
1434
  type: "button",
970
1435
  className: "x3nfvp2 x6s0dn4 xvh977a xboafo0 xw3nh4a xjbqb8w xc342km x1ypdohk x48ff29 xqfady0 x9p52ec x1mqvv6a",
971
- children: [/* @__PURE__ */ l(e.Trash2, { size: 13 }), "Clear all"]
1436
+ children: [/* @__PURE__ */ jsx(Icons.Trash2, { size: 13 }), "Clear all"]
972
1437
  })
973
1438
  })
974
1439
  }),
975
- c && D.length > 0 && /* @__PURE__ */ l(N, { children: D.map((e, t) => /* @__PURE__ */ u(I, {
976
- value: e,
1440
+ showFileList && activeFiles.length > 0 && /* @__PURE__ */ jsx(FileUploadList, { children: activeFiles.map((file_1, index_0) => /* @__PURE__ */ jsxs(FileUploadItem, {
1441
+ value: file_1,
977
1442
  children: [
978
- p && /* @__PURE__ */ l(R, { render: (e, t) => {
979
- if (e.type.startsWith("image/")) {
980
- let t = URL.createObjectURL(e);
981
- return /* @__PURE__ */ l("img", {
982
- src: t,
983
- alt: e.name,
1443
+ showPreview && /* @__PURE__ */ jsx(FileUploadItemPreview, { render: (previewFile, fallback) => {
1444
+ if (previewFile.type.startsWith("image/")) {
1445
+ const url_0 = URL.createObjectURL(previewFile);
1446
+ return /* @__PURE__ */ jsx("img", {
1447
+ src: url_0,
1448
+ alt: previewFile.name,
984
1449
  className: "xh8yej3 x5yr21d xl1xv1r"
985
1450
  });
986
1451
  }
987
- return t();
1452
+ return fallback();
988
1453
  } }),
989
- /* @__PURE__ */ l(z, {}),
990
- f && /* @__PURE__ */ l(B, { variant: "bottom" }),
991
- /* @__PURE__ */ l(V, {})
1454
+ /* @__PURE__ */ jsx(FileUploadItemMetadata, {}),
1455
+ showProgress && /* @__PURE__ */ jsx(FileUploadItemProgress, { variant: "bottom" }),
1456
+ /* @__PURE__ */ jsx(FileUploadItemDelete, {})
992
1457
  ]
993
- }, `${e.name}-${t}`)) })
1458
+ }, `${file_1.name}-${index_0}`)) })
994
1459
  ]
995
1460
  });
996
1461
  }
997
- export { A as FileUpload, H as FileUploadClear, j as FileUploadDropzone, I as FileUploadItem, V as FileUploadItemDelete, z as FileUploadItemMetadata, R as FileUploadItemPreview, B as FileUploadItemProgress, N as FileUploadList, M as FileUploadTrigger, U as FileUploader, n as createApiUploadHandler, r as createS3PresignedUploadHandler, i as createUploadThingUploadHandler, a as formatFileSize, D as useFileUpload, o as useUploadFile };
1462
+ export { FileUploadRoot as FileUpload, FileUploadClear, FileUploadDropzone, FileUploadItem, FileUploadItemDelete, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, FileUploadList, FileUploadTrigger, FileUploader, createApiUploadHandler, createS3PresignedUploadHandler, createUploadThingUploadHandler, formatFileSize, useFileUpload, useUploadFile };