@vlrc-fe/components 3.0.2 → 3.0.4

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