@bricks-toolkit/toolkit 0.1.1 → 0.1.2

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 (332) hide show
  1. package/README.md +9 -9
  2. package/dist/avatar/index.cjs +11 -1
  3. package/dist/avatar/index.mjs +2 -1
  4. package/dist/badge/index.cjs +11 -1
  5. package/dist/badge/index.mjs +2 -1
  6. package/dist/breadcrumbs/index.cjs +11 -1
  7. package/dist/breadcrumbs/index.mjs +2 -1
  8. package/dist/button/index.cjs +13 -2
  9. package/dist/button/index.mjs +4 -2
  10. package/dist/card/index.cjs +31 -1
  11. package/dist/card/index.mjs +2 -1
  12. package/dist/checkbox/index.cjs +11 -1
  13. package/dist/checkbox/index.mjs +2 -1
  14. package/dist/chunk-2POU3NX4.mjs +192 -0
  15. package/dist/chunk-32SKYPQW.mjs +156 -0
  16. package/dist/chunk-446OJWC6.mjs +285 -0
  17. package/dist/chunk-4DA7CRNV.mjs +376 -0
  18. package/dist/chunk-4DR57X7U.mjs +182 -0
  19. package/dist/chunk-4QSDPHPI.mjs +285 -0
  20. package/dist/chunk-56ILK7Y4.cjs +315 -0
  21. package/dist/chunk-5J3OMAO4.cjs +222 -0
  22. package/dist/chunk-5RKET2JO.cjs +287 -0
  23. package/dist/chunk-65UZC3FK.mjs +312 -0
  24. package/dist/chunk-6CC5KIA5.cjs +148 -0
  25. package/dist/chunk-6R3OYBQ6.cjs +209 -0
  26. package/dist/chunk-6UO72EJA.cjs +2 -0
  27. package/dist/chunk-6ZCY4O5M.mjs +63 -0
  28. package/dist/chunk-7364SUK6.mjs +359 -0
  29. package/dist/chunk-7DDDQ3RH.cjs +66 -0
  30. package/dist/chunk-7PDGAIC3.cjs +189 -0
  31. package/dist/chunk-7R5JRJ2W.cjs +255 -0
  32. package/dist/chunk-7WNJ7L4Z.mjs +335 -0
  33. package/dist/chunk-AJXVELXK.cjs +218 -0
  34. package/dist/chunk-ARTXRQO6.mjs +1 -0
  35. package/dist/chunk-B4OV5GRT.cjs +510 -0
  36. package/dist/chunk-B5MYGYJY.mjs +122 -0
  37. package/dist/chunk-BBVWG5GH.cjs +75 -0
  38. package/dist/chunk-BVBCAAES.mjs +35 -0
  39. package/dist/chunk-CBA54EY4.mjs +508 -0
  40. package/dist/chunk-CMER5LO3.mjs +330 -0
  41. package/dist/chunk-DHC5LI2P.cjs +338 -0
  42. package/dist/chunk-DMLPA65B.mjs +107 -0
  43. package/dist/chunk-DN2GFJF4.mjs +175 -0
  44. package/dist/chunk-ECLNLPOR.cjs +70 -0
  45. package/dist/chunk-EV463QT5.cjs +53 -0
  46. package/dist/chunk-FOVJHEWH.mjs +51 -0
  47. package/dist/chunk-G4HVY6FM.mjs +203 -0
  48. package/dist/chunk-H77YWN3L.mjs +220 -0
  49. package/dist/chunk-HIWJDLIS.cjs +124 -0
  50. package/dist/chunk-HQGDSOSN.mjs +274 -0
  51. package/dist/chunk-JKPNJ4PZ.mjs +313 -0
  52. package/dist/chunk-JV6AWBN5.mjs +113 -0
  53. package/dist/chunk-KA35BV7V.mjs +207 -0
  54. package/dist/chunk-KLBABQEJ.cjs +378 -0
  55. package/dist/chunk-L5VQZZVR.cjs +3197 -0
  56. package/dist/chunk-LTG6YP5I.cjs +69 -0
  57. package/dist/chunk-MVUNJPGH.cjs +184 -0
  58. package/dist/chunk-NMJ5CVZH.cjs +2 -0
  59. package/dist/chunk-NRCNRHXL.cjs +109 -0
  60. package/dist/chunk-NRZIXK35.cjs +276 -0
  61. package/dist/chunk-OCPFOFJ4.mjs +3195 -0
  62. package/dist/chunk-OEU5VG3D.cjs +362 -0
  63. package/dist/chunk-OPOCCRJG.cjs +193 -0
  64. package/dist/chunk-OQPCL5XX.mjs +187 -0
  65. package/dist/chunk-PCYGJNEQ.cjs +280 -0
  66. package/dist/chunk-PJH2KEWK.mjs +200 -0
  67. package/dist/chunk-PJWELBN2.cjs +115 -0
  68. package/dist/chunk-Q3IFXFFD.cjs +202 -0
  69. package/dist/chunk-R72GDCWE.cjs +314 -0
  70. package/dist/chunk-RAD5VJHR.mjs +146 -0
  71. package/dist/chunk-RYWDZHKG.mjs +274 -0
  72. package/dist/chunk-S7VEND5Z.cjs +162 -0
  73. package/dist/chunk-SBNNV6FE.mjs +1 -0
  74. package/dist/chunk-SFUOCZJY.mjs +187 -0
  75. package/dist/chunk-SHQ2MPBE.mjs +73 -0
  76. package/dist/chunk-TIVSMCXZ.mjs +253 -0
  77. package/dist/chunk-TNGW5YHA.cjs +37 -0
  78. package/dist/chunk-VC7MOPU6.cjs +287 -0
  79. package/dist/chunk-VHVFRWF5.mjs +64 -0
  80. package/dist/chunk-VKQDW7C2.mjs +336 -0
  81. package/dist/chunk-VRZFAKSV.cjs +177 -0
  82. package/dist/chunk-W2ZAPLQH.cjs +337 -0
  83. package/dist/chunk-XFNRKHHF.cjs +332 -0
  84. package/dist/chunk-Y3NTKFUE.mjs +66 -0
  85. package/dist/chunk-Y6AN7AWX.cjs +205 -0
  86. package/dist/chunk-YMMNWJT6.cjs +134 -0
  87. package/dist/chunk-YOTCXSXL.mjs +132 -0
  88. package/dist/combo-box/index.cjs +11 -1
  89. package/dist/combo-box/index.mjs +2 -1
  90. package/dist/date-picker/index.cjs +11 -2
  91. package/dist/date-picker/index.mjs +2 -2
  92. package/dist/dialog/index.cjs +27 -1
  93. package/dist/dialog/index.mjs +2 -1
  94. package/dist/dropdown-menu/index.cjs +27 -1
  95. package/dist/dropdown-menu/index.mjs +2 -1
  96. package/dist/email/index.cjs +11 -2
  97. package/dist/email/index.mjs +2 -2
  98. package/dist/file-upload/index.cjs +11 -1
  99. package/dist/file-upload/index.mjs +2 -1
  100. package/dist/header/index.cjs +14 -2
  101. package/dist/header/index.mjs +5 -2
  102. package/dist/icon-button/index.cjs +13 -2
  103. package/dist/icon-button/index.mjs +4 -2
  104. package/dist/image/index.cjs +12 -1
  105. package/dist/image/index.mjs +3 -1
  106. package/dist/index.cjs +839 -2
  107. package/dist/index.d.ts +141 -75
  108. package/dist/index.mjs +601 -2
  109. package/dist/link/index.cjs +11 -1
  110. package/dist/link/index.mjs +2 -1
  111. package/dist/loader/index.cjs +11 -2
  112. package/dist/loader/index.mjs +2 -2
  113. package/dist/modal/index.cjs +27 -1
  114. package/dist/modal/index.mjs +2 -1
  115. package/dist/multi-select/index.cjs +11 -2
  116. package/dist/multi-select/index.mjs +2 -2
  117. package/dist/otp-input/index.cjs +11 -1
  118. package/dist/otp-input/index.mjs +2 -1
  119. package/dist/password-input/index.cjs +11 -2
  120. package/dist/password-input/index.mjs +2 -2
  121. package/dist/phone/index.cjs +11 -2
  122. package/dist/phone/index.mjs +2 -2
  123. package/dist/radio-button/index.cjs +11 -1
  124. package/dist/radio-button/index.mjs +2 -1
  125. package/dist/search-input/index.cjs +12 -2
  126. package/dist/search-input/index.mjs +3 -2
  127. package/dist/select/index.cjs +11 -2
  128. package/dist/select/index.mjs +2 -2
  129. package/dist/sidebar/index.cjs +11 -1
  130. package/dist/sidebar/index.mjs +2 -1
  131. package/dist/skeleton/index.cjs +27 -1
  132. package/dist/skeleton/index.mjs +2 -1
  133. package/dist/styles.css +5074 -1
  134. package/dist/table/index.cjs +15 -1
  135. package/dist/table/index.mjs +2 -1
  136. package/dist/tabs/index.cjs +14 -2
  137. package/dist/tabs/index.mjs +5 -2
  138. package/dist/text-input/index.cjs +11 -2
  139. package/dist/text-input/index.mjs +2 -2
  140. package/dist/theme-provider/index.cjs +14 -1
  141. package/dist/theme-provider/index.mjs +1 -1
  142. package/dist/time-picker/index.cjs +11 -2
  143. package/dist/time-picker/index.mjs +2 -2
  144. package/dist/toaster/index.cjs +11 -1
  145. package/dist/toaster/index.mjs +2 -1
  146. package/dist/tooltip/index.cjs +12 -1
  147. package/dist/tooltip/index.mjs +3 -1
  148. package/package.json +122 -141
  149. package/dist/components/Accordion/Accordion.d.ts +0 -5
  150. package/dist/components/Accordion/Accordion.types.d.ts +0 -32
  151. package/dist/components/Accordion/index.d.ts +0 -2
  152. package/dist/components/Avatar/Avatar.d.ts +0 -2
  153. package/dist/components/Avatar/Avatar.stories.d.ts +0 -11
  154. package/dist/components/Avatar/Avatar.test.d.ts +0 -1
  155. package/dist/components/Avatar/Avatar.types.d.ts +0 -24
  156. package/dist/components/Avatar/index.d.ts +0 -2
  157. package/dist/components/Badge/Badge.d.ts +0 -11
  158. package/dist/components/Badge/Badge.stories.d.ts +0 -21
  159. package/dist/components/Badge/Badge.test.d.ts +0 -1
  160. package/dist/components/Badge/Badge.types.d.ts +0 -43
  161. package/dist/components/Badge/index.d.ts +0 -2
  162. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -2
  163. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -13
  164. package/dist/components/Breadcrumbs/Breadcrumbs.test.d.ts +0 -1
  165. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +0 -27
  166. package/dist/components/Breadcrumbs/index.d.ts +0 -2
  167. package/dist/components/Button/Button.d.ts +0 -2
  168. package/dist/components/Button/Button.stories.d.ts +0 -20
  169. package/dist/components/Button/Button.test.d.ts +0 -1
  170. package/dist/components/Button/Button.types.d.ts +0 -24
  171. package/dist/components/Button/index.d.ts +0 -2
  172. package/dist/components/Card/Card.d.ts +0 -25
  173. package/dist/components/Card/Card.stories.d.ts +0 -8
  174. package/dist/components/Card/Card.test.d.ts +0 -1
  175. package/dist/components/Card/Card.types.d.ts +0 -14
  176. package/dist/components/Card/index.d.ts +0 -2
  177. package/dist/components/Checkbox/Checkbox.d.ts +0 -2
  178. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -16
  179. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
  180. package/dist/components/Checkbox/Checkbox.types.d.ts +0 -31
  181. package/dist/components/Checkbox/index.d.ts +0 -2
  182. package/dist/components/ComboBox/ComboBox.d.ts +0 -2
  183. package/dist/components/ComboBox/ComboBox.stories.d.ts +0 -12
  184. package/dist/components/ComboBox/ComboBox.test.d.ts +0 -1
  185. package/dist/components/ComboBox/ComboBox.types.d.ts +0 -57
  186. package/dist/components/ComboBox/index.d.ts +0 -2
  187. package/dist/components/DatePicker/DatePicker.d.ts +0 -2
  188. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -25
  189. package/dist/components/DatePicker/DatePicker.test.d.ts +0 -1
  190. package/dist/components/DatePicker/DatePicker.types.d.ts +0 -27
  191. package/dist/components/DatePicker/index.d.ts +0 -2
  192. package/dist/components/Dialog/Dialog.d.ts +0 -6
  193. package/dist/components/Dialog/Dialog.stories.d.ts +0 -9
  194. package/dist/components/Dialog/Dialog.test.d.ts +0 -1
  195. package/dist/components/Dialog/Dialog.types.d.ts +0 -52
  196. package/dist/components/Dialog/index.d.ts +0 -2
  197. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -7
  198. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +0 -9
  199. package/dist/components/DropdownMenu/DropdownMenu.test.d.ts +0 -1
  200. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +0 -24
  201. package/dist/components/DropdownMenu/index.d.ts +0 -2
  202. package/dist/components/Email/Email.d.ts +0 -2
  203. package/dist/components/Email/Email.stories.d.ts +0 -11
  204. package/dist/components/Email/Email.test.d.ts +0 -1
  205. package/dist/components/Email/Email.types.d.ts +0 -33
  206. package/dist/components/Email/index.d.ts +0 -2
  207. package/dist/components/FileUpload/FileUpload.d.ts +0 -2
  208. package/dist/components/FileUpload/FileUpload.stories.d.ts +0 -10
  209. package/dist/components/FileUpload/FileUpload.test.d.ts +0 -1
  210. package/dist/components/FileUpload/FileUpload.types.d.ts +0 -22
  211. package/dist/components/FileUpload/index.d.ts +0 -2
  212. package/dist/components/Header/Header.d.ts +0 -7
  213. package/dist/components/Header/Header.stories.d.ts +0 -8
  214. package/dist/components/Header/Header.test.d.ts +0 -1
  215. package/dist/components/Header/Header.types.d.ts +0 -19
  216. package/dist/components/Header/index.d.ts +0 -2
  217. package/dist/components/IconButton/IconButton.d.ts +0 -2
  218. package/dist/components/IconButton/IconButton.stories.d.ts +0 -17
  219. package/dist/components/IconButton/IconButton.types.d.ts +0 -10
  220. package/dist/components/IconButton/index.d.ts +0 -2
  221. package/dist/components/Image/Image.d.ts +0 -6
  222. package/dist/components/Image/Image.stories.d.ts +0 -13
  223. package/dist/components/Image/Image.test.d.ts +0 -1
  224. package/dist/components/Image/Image.types.d.ts +0 -40
  225. package/dist/components/Image/index.d.ts +0 -2
  226. package/dist/components/Link/Link.d.ts +0 -2
  227. package/dist/components/Link/Link.stories.d.ts +0 -15
  228. package/dist/components/Link/Link.test.d.ts +0 -1
  229. package/dist/components/Link/Link.types.d.ts +0 -20
  230. package/dist/components/Link/index.d.ts +0 -2
  231. package/dist/components/Loader/Loader.d.ts +0 -2
  232. package/dist/components/Loader/Loader.stories.d.ts +0 -12
  233. package/dist/components/Loader/Loader.test.d.ts +0 -1
  234. package/dist/components/Loader/Loader.types.d.ts +0 -17
  235. package/dist/components/Loader/index.d.ts +0 -2
  236. package/dist/components/Modal/Modal.d.ts +0 -14
  237. package/dist/components/Modal/Modal.stories.d.ts +0 -14
  238. package/dist/components/Modal/Modal.test.d.ts +0 -1
  239. package/dist/components/Modal/Modal.types.d.ts +0 -100
  240. package/dist/components/Modal/index.d.ts +0 -2
  241. package/dist/components/MultiSelect/MultiSelect.d.ts +0 -2
  242. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -15
  243. package/dist/components/MultiSelect/MultiSelect.test.d.ts +0 -1
  244. package/dist/components/MultiSelect/MultiSelect.types.d.ts +0 -55
  245. package/dist/components/MultiSelect/index.d.ts +0 -2
  246. package/dist/components/OtpInput/OtpInput.d.ts +0 -2
  247. package/dist/components/OtpInput/OtpInput.stories.d.ts +0 -10
  248. package/dist/components/OtpInput/OtpInput.test.d.ts +0 -1
  249. package/dist/components/OtpInput/OtpInput.types.d.ts +0 -53
  250. package/dist/components/OtpInput/index.d.ts +0 -2
  251. package/dist/components/PasswordInput/PasswordInput.d.ts +0 -2
  252. package/dist/components/PasswordInput/PasswordInput.stories.d.ts +0 -23
  253. package/dist/components/PasswordInput/PasswordInput.test.d.ts +0 -1
  254. package/dist/components/PasswordInput/PasswordInput.types.d.ts +0 -27
  255. package/dist/components/PasswordInput/index.d.ts +0 -2
  256. package/dist/components/Phone/Phone.d.ts +0 -2
  257. package/dist/components/Phone/Phone.stories.d.ts +0 -11
  258. package/dist/components/Phone/Phone.test.d.ts +0 -1
  259. package/dist/components/Phone/Phone.types.d.ts +0 -36
  260. package/dist/components/Phone/countries.d.ts +0 -8
  261. package/dist/components/Phone/index.d.ts +0 -2
  262. package/dist/components/RadioButton/RadioButton.d.ts +0 -2
  263. package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -21
  264. package/dist/components/RadioButton/RadioButton.test.d.ts +0 -1
  265. package/dist/components/RadioButton/RadioButton.types.d.ts +0 -51
  266. package/dist/components/RadioButton/index.d.ts +0 -2
  267. package/dist/components/SearchInput/SearchInput.d.ts +0 -6
  268. package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -8
  269. package/dist/components/SearchInput/SearchInput.test.d.ts +0 -1
  270. package/dist/components/SearchInput/SearchInput.types.d.ts +0 -12
  271. package/dist/components/SearchInput/index.d.ts +0 -2
  272. package/dist/components/Select/Select.d.ts +0 -2
  273. package/dist/components/Select/Select.stories.d.ts +0 -12
  274. package/dist/components/Select/Select.test.d.ts +0 -1
  275. package/dist/components/Select/Select.types.d.ts +0 -31
  276. package/dist/components/Select/index.d.ts +0 -2
  277. package/dist/components/Sidebar/Sidebar.d.ts +0 -7
  278. package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -10
  279. package/dist/components/Sidebar/Sidebar.test.d.ts +0 -1
  280. package/dist/components/Sidebar/Sidebar.types.d.ts +0 -87
  281. package/dist/components/Sidebar/index.d.ts +0 -2
  282. package/dist/components/Skeleton/Skeleton.d.ts +0 -26
  283. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -13
  284. package/dist/components/Skeleton/Skeleton.types.d.ts +0 -47
  285. package/dist/components/Skeleton/index.d.ts +0 -2
  286. package/dist/components/Stepper/Stepper.d.ts +0 -2
  287. package/dist/components/Stepper/Stepper.stories.d.ts +0 -23
  288. package/dist/components/Stepper/Stepper.test.d.ts +0 -1
  289. package/dist/components/Stepper/Stepper.types.d.ts +0 -47
  290. package/dist/components/Stepper/index.d.ts +0 -2
  291. package/dist/components/Table/Pagination.d.ts +0 -3
  292. package/dist/components/Table/Table.d.ts +0 -3
  293. package/dist/components/Table/Table.stories.d.ts +0 -13
  294. package/dist/components/Table/Table.test.d.ts +0 -1
  295. package/dist/components/Table/Table.types.d.ts +0 -85
  296. package/dist/components/Table/index.d.ts +0 -3
  297. package/dist/components/Tabs/Tabs.d.ts +0 -2
  298. package/dist/components/Tabs/Tabs.stories.d.ts +0 -17
  299. package/dist/components/Tabs/Tabs.test.d.ts +0 -1
  300. package/dist/components/Tabs/Tabs.types.d.ts +0 -21
  301. package/dist/components/Tabs/index.d.ts +0 -2
  302. package/dist/components/TextInput/TextInput.d.ts +0 -2
  303. package/dist/components/TextInput/TextInput.stories.d.ts +0 -25
  304. package/dist/components/TextInput/TextInput.test.d.ts +0 -1
  305. package/dist/components/TextInput/TextInput.types.d.ts +0 -29
  306. package/dist/components/TextInput/index.d.ts +0 -2
  307. package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -8
  308. package/dist/components/ThemeProvider/ThemeProvider.stories.d.ts +0 -16
  309. package/dist/components/ThemeProvider/ThemeProvider.test.d.ts +0 -1
  310. package/dist/components/ThemeProvider/ThemeProvider.types.d.ts +0 -112
  311. package/dist/components/ThemeProvider/index.d.ts +0 -2
  312. package/dist/components/TimePicker/TimePicker.d.ts +0 -2
  313. package/dist/components/TimePicker/TimePicker.stories.d.ts +0 -23
  314. package/dist/components/TimePicker/TimePicker.test.d.ts +0 -1
  315. package/dist/components/TimePicker/TimePicker.types.d.ts +0 -27
  316. package/dist/components/TimePicker/index.d.ts +0 -2
  317. package/dist/components/Toaster/Toaster.d.ts +0 -2
  318. package/dist/components/Toaster/Toaster.stories.d.ts +0 -13
  319. package/dist/components/Toaster/Toaster.test.d.ts +0 -1
  320. package/dist/components/Toaster/Toaster.types.d.ts +0 -23
  321. package/dist/components/Toaster/index.d.ts +0 -2
  322. package/dist/components/Toggle/Toggle.d.ts +0 -2
  323. package/dist/components/Toggle/Toggle.stories.d.ts +0 -11
  324. package/dist/components/Toggle/Toggle.types.d.ts +0 -10
  325. package/dist/components/Toggle/index.d.ts +0 -2
  326. package/dist/components/Tooltip/Tooltip.d.ts +0 -2
  327. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -13
  328. package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
  329. package/dist/components/Tooltip/Tooltip.types.d.ts +0 -33
  330. package/dist/components/Tooltip/index.d.ts +0 -2
  331. package/dist/utils/cn.d.ts +0 -2
  332. package/dist/utils/index.d.ts +0 -1
@@ -0,0 +1,312 @@
1
+ import { cn } from './chunk-OCPFOFJ4.mjs';
2
+ import { useState, useRef, useId, useCallback, useEffect, useLayoutEffect } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var EXIT_DURATION_MS = 150;
7
+ var placementClasses = {
8
+ top: "-translate-x-1/2 -translate-y-full",
9
+ bottom: "-translate-x-1/2",
10
+ left: "-translate-x-full -translate-y-1/2",
11
+ right: "-translate-y-1/2"
12
+ };
13
+ var arrowPositionClasses = {
14
+ top: "top-full left-1/2 -translate-x-1/2",
15
+ bottom: "bottom-full left-1/2 -translate-x-1/2",
16
+ left: "left-full top-1/2 -translate-y-1/2",
17
+ right: "right-full top-1/2 -translate-y-1/2"
18
+ };
19
+ var arrowBorderClasses = {
20
+ top: "border-l-transparent border-r-transparent border-b-transparent",
21
+ bottom: "border-l-transparent border-r-transparent border-t-transparent",
22
+ left: "border-t-transparent border-b-transparent border-r-transparent",
23
+ right: "border-t-transparent border-b-transparent border-l-transparent"
24
+ };
25
+ var entryTranslateClass = {
26
+ top: "translate-y-1",
27
+ bottom: "-translate-y-1",
28
+ left: "translate-x-1",
29
+ right: "-translate-x-1"
30
+ };
31
+ var sizeClasses = {
32
+ sm: "px-2 py-1 text-xs rounded-md",
33
+ md: "px-3 py-1.5 text-sm rounded-lg",
34
+ lg: "px-4 py-2 text-sm rounded-xl"
35
+ };
36
+ var variantBubbleClasses = {
37
+ dark: [
38
+ "bg-gray-900 text-gray-50",
39
+ "shadow-[0_4px_16px_rgba(0,0,0,0.35)]",
40
+ "ring-1 ring-white/10"
41
+ ].join(" "),
42
+ primary: [
43
+ "bg-gradient-to-b from-blue-500 to-blue-600 text-white",
44
+ "shadow-[0_4px_16px_rgba(59,130,246,0.45)]",
45
+ "ring-1 ring-blue-400/30"
46
+ ].join(" "),
47
+ light: [
48
+ "bg-white text-gray-800",
49
+ "border border-gray-200/80",
50
+ "shadow-[0_4px_16px_rgba(0,0,0,0.10)]"
51
+ ].join(" ")
52
+ };
53
+ var arrowVariantColor = {
54
+ dark: {
55
+ top: "border-t-gray-900",
56
+ bottom: "border-b-gray-900",
57
+ left: "border-l-gray-900",
58
+ right: "border-r-gray-900"
59
+ },
60
+ primary: {
61
+ top: "border-t-blue-600",
62
+ bottom: "border-b-blue-500",
63
+ left: "border-l-blue-600",
64
+ right: "border-r-blue-500"
65
+ },
66
+ light: {
67
+ top: "border-t-gray-200",
68
+ bottom: "border-b-gray-200",
69
+ left: "border-l-gray-200",
70
+ right: "border-r-gray-200"
71
+ }
72
+ };
73
+ function Tooltip({
74
+ content,
75
+ children,
76
+ placement = "top",
77
+ trigger = "hover",
78
+ showDelay = 0,
79
+ hideDelay = 100,
80
+ size = "md",
81
+ variant = "dark",
82
+ open: controlledOpen,
83
+ disabled = false,
84
+ maxWidth = 240,
85
+ className,
86
+ wrapperClassName
87
+ }) {
88
+ const [internalOpen, setInternalOpen] = useState(false);
89
+ const [mounted, setMounted] = useState(false);
90
+ const [visible, setVisible] = useState(false);
91
+ const [coords, setCoords] = useState({ top: 0, left: 0 });
92
+ const [actualPlacement, setActualPlacement] = useState(placement);
93
+ const isControlled = controlledOpen !== void 0;
94
+ const isOpen = isControlled ? controlledOpen : internalOpen;
95
+ const triggerRef = useRef(null);
96
+ const tooltipRef = useRef(null);
97
+ const showTimer = useRef(null);
98
+ const hideTimer = useRef(null);
99
+ const exitTimer = useRef(null);
100
+ const tooltipId = useId();
101
+ const clearTimers = useCallback(() => {
102
+ if (showTimer.current) clearTimeout(showTimer.current);
103
+ if (hideTimer.current) clearTimeout(hideTimer.current);
104
+ if (exitTimer.current) clearTimeout(exitTimer.current);
105
+ }, []);
106
+ const show = useCallback(() => {
107
+ if (disabled || isControlled) return;
108
+ clearTimers();
109
+ const open = () => {
110
+ setInternalOpen(true);
111
+ };
112
+ if (showDelay > 0) {
113
+ showTimer.current = setTimeout(open, showDelay);
114
+ } else {
115
+ open();
116
+ }
117
+ }, [disabled, isControlled, clearTimers, showDelay]);
118
+ const hide = useCallback(() => {
119
+ if (isControlled) return;
120
+ clearTimers();
121
+ hideTimer.current = setTimeout(() => {
122
+ setInternalOpen(false);
123
+ }, hideDelay);
124
+ }, [isControlled, clearTimers, hideDelay]);
125
+ const toggle = useCallback(() => {
126
+ if (disabled || isControlled) return;
127
+ setInternalOpen((prev) => !prev);
128
+ }, [disabled, isControlled]);
129
+ useEffect(() => {
130
+ let rafId = null;
131
+ if (isOpen && !disabled) {
132
+ clearTimers();
133
+ rafId = requestAnimationFrame(() => {
134
+ setMounted(true);
135
+ rafId = requestAnimationFrame(() => {
136
+ setVisible(true);
137
+ });
138
+ });
139
+ } else {
140
+ rafId = requestAnimationFrame(() => {
141
+ setVisible(false);
142
+ });
143
+ exitTimer.current = setTimeout(() => {
144
+ setMounted(false);
145
+ }, EXIT_DURATION_MS);
146
+ }
147
+ return () => {
148
+ if (rafId) cancelAnimationFrame(rafId);
149
+ if (exitTimer.current) clearTimeout(exitTimer.current);
150
+ };
151
+ }, [isOpen, disabled, clearTimers]);
152
+ const updatePosition = useCallback(() => {
153
+ if (!triggerRef.current || !isOpen) return;
154
+ const triggerRect = triggerRef.current.getBoundingClientRect();
155
+ const tooltipElement = tooltipRef.current;
156
+ const gap = 8;
157
+ let nextPlacement = placement;
158
+ const calculateBaseCoords = (p) => {
159
+ switch (p) {
160
+ case "top":
161
+ return { t: triggerRect.top - gap, l: triggerRect.left + triggerRect.width / 2 };
162
+ case "bottom":
163
+ return { t: triggerRect.bottom + gap, l: triggerRect.left + triggerRect.width / 2 };
164
+ case "left":
165
+ return { t: triggerRect.top + triggerRect.height / 2, l: triggerRect.left - gap };
166
+ case "right":
167
+ return { t: triggerRect.top + triggerRect.height / 2, l: triggerRect.right + gap };
168
+ }
169
+ };
170
+ const base = calculateBaseCoords(placement);
171
+ let top = base.t;
172
+ let left = base.l;
173
+ if (tooltipElement) {
174
+ const tooltipRect = tooltipElement.getBoundingClientRect();
175
+ const padding = 12;
176
+ if (placement === "top" && triggerRect.top - tooltipRect.height - gap < padding) {
177
+ nextPlacement = "bottom";
178
+ } else if (placement === "bottom" && triggerRect.bottom + tooltipRect.height + gap > window.innerHeight - padding) {
179
+ nextPlacement = "top";
180
+ } else if (placement === "left" && triggerRect.left - tooltipRect.width - gap < padding) {
181
+ nextPlacement = "right";
182
+ } else if (placement === "right" && triggerRect.right + tooltipRect.width + gap > window.innerWidth - padding) {
183
+ nextPlacement = "left";
184
+ }
185
+ if (nextPlacement !== placement) {
186
+ const flippedBase = calculateBaseCoords(nextPlacement);
187
+ top = flippedBase.t;
188
+ left = flippedBase.l;
189
+ }
190
+ const halfWidth = tooltipRect.width / 2;
191
+ const halfHeight = tooltipRect.height / 2;
192
+ if (nextPlacement === "top" || nextPlacement === "bottom") {
193
+ left = Math.max(
194
+ padding + halfWidth,
195
+ Math.min(window.innerWidth - padding - halfWidth, left)
196
+ );
197
+ } else {
198
+ top = Math.max(
199
+ padding + halfHeight,
200
+ Math.min(window.innerHeight - padding - halfHeight, top)
201
+ );
202
+ }
203
+ }
204
+ setActualPlacement(nextPlacement);
205
+ setCoords({ top, left });
206
+ }, [isOpen, placement]);
207
+ useLayoutEffect(() => {
208
+ if (!isOpen) return;
209
+ let rafId = null;
210
+ const handleUpdate = () => {
211
+ rafId = requestAnimationFrame(updatePosition);
212
+ };
213
+ handleUpdate();
214
+ window.addEventListener("resize", handleUpdate);
215
+ window.addEventListener("scroll", handleUpdate, true);
216
+ return () => {
217
+ if (rafId !== null) cancelAnimationFrame(rafId);
218
+ window.removeEventListener("resize", handleUpdate);
219
+ window.removeEventListener("scroll", handleUpdate, true);
220
+ };
221
+ }, [isOpen, updatePosition]);
222
+ useEffect(() => {
223
+ if (!isOpen) return;
224
+ const handleKey = (e) => {
225
+ if (e.key === "Escape") {
226
+ clearTimers();
227
+ setInternalOpen(false);
228
+ }
229
+ };
230
+ document.addEventListener("keydown", handleKey);
231
+ return () => {
232
+ document.removeEventListener("keydown", handleKey);
233
+ };
234
+ }, [isOpen, clearTimers]);
235
+ useEffect(() => clearTimers, [clearTimers]);
236
+ const triggerProps = {};
237
+ if (trigger === "hover" || trigger === "focus") {
238
+ triggerProps.onFocus = show;
239
+ triggerProps.onBlur = hide;
240
+ }
241
+ if (trigger === "hover") {
242
+ triggerProps.onMouseEnter = show;
243
+ triggerProps.onMouseLeave = hide;
244
+ } else if (trigger === "click") {
245
+ triggerProps.onClick = toggle;
246
+ }
247
+ triggerProps.onKeyDown = (e) => {
248
+ if (e.key === "Enter" || e.key === " ") toggle();
249
+ };
250
+ const child = children;
251
+ return /* @__PURE__ */ jsxs(
252
+ "span",
253
+ {
254
+ ref: triggerRef,
255
+ className: cn("relative inline-flex isolate z-0", wrapperClassName),
256
+ "aria-describedby": isOpen && !disabled ? tooltipId : void 0,
257
+ ...triggerProps,
258
+ children: [
259
+ /* @__PURE__ */ jsx("span", { className: "relative z-0", children: child }),
260
+ mounted && !disabled && createPortal(
261
+ /* @__PURE__ */ jsx(
262
+ "div",
263
+ {
264
+ ref: tooltipRef,
265
+ className: cn("pointer-events-none fixed z-[9999]", placementClasses[actualPlacement]),
266
+ style: { top: coords.top, left: coords.left },
267
+ children: /* @__PURE__ */ jsxs(
268
+ "div",
269
+ {
270
+ id: tooltipId,
271
+ role: "tooltip",
272
+ style: { maxWidth, transitionDuration: `${EXIT_DURATION_MS.toString()}ms` },
273
+ className: cn(
274
+ // Layout & typography
275
+ "relative min-w-max whitespace-normal break-words",
276
+ "font-sans font-medium tracking-tight text-center leading-snug",
277
+ // Smooth enter/exit transition
278
+ "transition-[opacity,transform] ease-out",
279
+ visible ? "opacity-100 translate-x-0 translate-y-0" : ["opacity-0", entryTranslateClass[actualPlacement]].join(" "),
280
+ // Visual styles
281
+ variantBubbleClasses[variant],
282
+ sizeClasses[size],
283
+ className
284
+ ),
285
+ children: [
286
+ /* @__PURE__ */ jsx(
287
+ "div",
288
+ {
289
+ "aria-hidden": "true",
290
+ className: cn(
291
+ "absolute border-[6px]",
292
+ "drop-shadow-sm",
293
+ arrowPositionClasses[actualPlacement],
294
+ arrowBorderClasses[actualPlacement],
295
+ arrowVariantColor[variant][actualPlacement]
296
+ )
297
+ }
298
+ ),
299
+ content
300
+ ]
301
+ }
302
+ )
303
+ }
304
+ ),
305
+ document.body
306
+ )
307
+ ]
308
+ }
309
+ );
310
+ }
311
+
312
+ export { Tooltip };
@@ -0,0 +1,148 @@
1
+ 'use strict';
2
+
3
+ var chunkR72GDCWE_cjs = require('./chunk-R72GDCWE.cjs');
4
+ var chunkL5VQZZVR_cjs = require('./chunk-L5VQZZVR.cjs');
5
+ var react = require('react');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ var sizeClasses = {
9
+ xs: "h-6 px-2.5 text-xs",
10
+ sm: "h-8 px-3 text-sm",
11
+ md: "h-10 px-4 text-sm",
12
+ lg: "h-11 px-6 text-base",
13
+ xl: "h-12 px-8 text-lg"
14
+ };
15
+ var iconSizeClasses = {
16
+ xs: "w-3 h-3",
17
+ sm: "w-3.5 h-3.5",
18
+ md: "w-4 h-4",
19
+ lg: "w-5 h-5",
20
+ xl: "w-5 h-5"
21
+ };
22
+ var variantClasses = {
23
+ primary: "bg-primary text-text-inverse hover:bg-primary-hover hover:shadow-xl hover:shadow-primary/20 active:scale-95 border border-transparent shadow-md focus-visible:ring-primary/40 transition-all duration-normal",
24
+ secondary: "bg-secondary text-text hover:bg-secondary-hover border border-transparent focus-visible:ring-primary/40",
25
+ outline: "bg-transparent text-text border border-border hover:bg-hover hover:text-text focus-visible:ring-primary/40",
26
+ ghost: "bg-transparent text-text border border-transparent hover:bg-hover hover:text-text focus-visible:ring-primary/40",
27
+ danger: "bg-error text-text-inverse hover:bg-error/90 border border-transparent shadow-sm focus-visible:ring-error/40",
28
+ success: "bg-success text-text-inverse hover:bg-success/90 border border-transparent shadow-sm focus-visible:ring-success/40",
29
+ warning: "bg-warning text-text-inverse hover:bg-warning/90 border border-transparent shadow-sm focus-visible:ring-warning/40",
30
+ info: "bg-info text-text-inverse hover:bg-info/90 border border-transparent shadow-sm focus-visible:ring-info/40"
31
+ };
32
+ var disabledClasses = "opacity-50 cursor-not-allowed shadow-none";
33
+ var Button = react.forwardRef(function Button2({
34
+ children,
35
+ className,
36
+ variant = "primary",
37
+ size = "md",
38
+ fullWidth = false,
39
+ isLoading = false,
40
+ loadingText,
41
+ disabled = false,
42
+ leftIcon,
43
+ rightIcon,
44
+ tooltip,
45
+ tooltipPlacement = "top",
46
+ type = "button",
47
+ ...rest
48
+ }, ref) {
49
+ const isDisabled = disabled || isLoading;
50
+ const spinnerElement = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkL5VQZZVR_cjs.cn("relative flex items-center justify-center", iconSizeClasses[size]), children: [
51
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full border-1 border-current opacity-20 animate-ping" }),
52
+ /* @__PURE__ */ jsxRuntime.jsxs(
53
+ "svg",
54
+ {
55
+ className: "animate-spin relative z-10 w-full h-full",
56
+ xmlns: "http://www.w3.org/2000/svg",
57
+ fill: "none",
58
+ viewBox: "0 0 24 24",
59
+ role: "status",
60
+ children: [
61
+ /* @__PURE__ */ jsxRuntime.jsx(
62
+ "circle",
63
+ {
64
+ className: "opacity-25",
65
+ cx: "12",
66
+ cy: "12",
67
+ r: "10",
68
+ stroke: "currentColor",
69
+ strokeWidth: "4"
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsxRuntime.jsx(
73
+ "path",
74
+ {
75
+ className: "opacity-90",
76
+ fill: "currentColor",
77
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
78
+ }
79
+ )
80
+ ]
81
+ }
82
+ )
83
+ ] });
84
+ const buttonElement = /* @__PURE__ */ jsxRuntime.jsx(
85
+ "button",
86
+ {
87
+ ref,
88
+ type,
89
+ disabled: isDisabled,
90
+ "aria-disabled": isDisabled,
91
+ "aria-busy": isLoading,
92
+ className: chunkL5VQZZVR_cjs.cn(
93
+ "relative inline-flex items-center justify-center gap-2 font-bold rounded-md transition-[background-color,border-color,color,box-shadow,transform,opacity] duration-normal focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-surface",
94
+ sizeClasses[size],
95
+ variantClasses[variant],
96
+ fullWidth ? "w-full" : "",
97
+ isDisabled ? disabledClasses : "",
98
+ className
99
+ ),
100
+ ...rest,
101
+ children: isLoading && loadingText ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
102
+ spinnerElement,
103
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
104
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
105
+ leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
106
+ "span",
107
+ {
108
+ className: chunkL5VQZZVR_cjs.cn(
109
+ "inline-flex shrink-0",
110
+ isLoading && "invisible opacity-0"
111
+ // Hide icons but keep layout width when loading without text
112
+ ),
113
+ children: leftIcon
114
+ }
115
+ ),
116
+ /* @__PURE__ */ jsxRuntime.jsx(
117
+ "span",
118
+ {
119
+ className: chunkL5VQZZVR_cjs.cn(
120
+ "truncate flex items-center justify-center",
121
+ // Added flex centering for icons
122
+ isLoading && "invisible opacity-0"
123
+ // Hide content but keep layout width
124
+ ),
125
+ children
126
+ }
127
+ ),
128
+ rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkL5VQZZVR_cjs.cn("inline-flex shrink-0", isLoading && "invisible opacity-0"), children: rightIcon }),
129
+ isLoading && !loadingText && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center", children: spinnerElement })
130
+ ] })
131
+ }
132
+ );
133
+ if (tooltip) {
134
+ return /* @__PURE__ */ jsxRuntime.jsx(
135
+ chunkR72GDCWE_cjs.Tooltip,
136
+ {
137
+ content: tooltip,
138
+ placement: tooltipPlacement,
139
+ wrapperClassName: fullWidth ? "w-full" : "",
140
+ children: buttonElement
141
+ }
142
+ );
143
+ }
144
+ return buttonElement;
145
+ });
146
+ Button.displayName = "Button";
147
+
148
+ exports.Button = Button;
@@ -0,0 +1,209 @@
1
+ 'use strict';
2
+
3
+ var chunkL5VQZZVR_cjs = require('./chunk-L5VQZZVR.cjs');
4
+ var react = require('react');
5
+ var outline = require('@heroicons/react/24/outline');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ var sizeClasses = {
9
+ sm: "p-4 text-sm",
10
+ md: "p-8 text-sm",
11
+ lg: "p-12 text-base"
12
+ };
13
+ var labelSizeClasses = {
14
+ sm: "text-xs",
15
+ md: "text-sm",
16
+ lg: "text-sm"
17
+ };
18
+ var stateClasses = {
19
+ default: "border-border hover:border-primary-hover bg-surface focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary",
20
+ error: "border-error bg-error/5 focus-within:ring-2 focus-within:ring-error/20",
21
+ success: "border-success bg-success/5 focus-within:ring-2 focus-within:ring-success/20",
22
+ warning: "border-warning bg-warning/5 focus-within:ring-2 focus-within:ring-warning/20"
23
+ };
24
+ var stateMessageClasses = {
25
+ default: "text-text-muted",
26
+ error: "text-error font-medium",
27
+ success: "text-success font-medium",
28
+ warning: "text-warning font-medium"
29
+ };
30
+ var FileUpload = react.forwardRef(function FileUpload2({
31
+ label,
32
+ required = false,
33
+ helperText,
34
+ errorMessage,
35
+ successMessage,
36
+ warningMessage,
37
+ size = "md",
38
+ state = "default",
39
+ fullWidth = true,
40
+ wrapperClassName,
41
+ labelClassName,
42
+ helperClassName,
43
+ dropzoneClassName,
44
+ icon,
45
+ maxSize,
46
+ maxFiles,
47
+ onFilesSelected,
48
+ accept,
49
+ multiple,
50
+ disabled,
51
+ id: idProp,
52
+ className,
53
+ ...rest
54
+ }, ref) {
55
+ const generatedId = react.useId();
56
+ const inputId = idProp ?? generatedId;
57
+ const internalRef = react.useRef(null);
58
+ const [isDragging, setIsDragging] = react.useState(false);
59
+ const handleDragOver = (e) => {
60
+ e.preventDefault();
61
+ if (!disabled) setIsDragging(true);
62
+ };
63
+ const handleDragLeave = () => {
64
+ setIsDragging(false);
65
+ };
66
+ const handleDrop = (e) => {
67
+ e.preventDefault();
68
+ setIsDragging(false);
69
+ if (disabled) return;
70
+ const droppedFiles = Array.from(e.dataTransfer.files);
71
+ handleFiles(droppedFiles);
72
+ };
73
+ const handleChange = (e) => {
74
+ if (e.target.files) {
75
+ handleFiles(Array.from(e.target.files));
76
+ }
77
+ };
78
+ const handleFiles = (files) => {
79
+ let filteredFiles = files;
80
+ if (maxFiles && files.length > maxFiles) {
81
+ filteredFiles = files.slice(0, maxFiles);
82
+ }
83
+ if (maxSize) {
84
+ filteredFiles = filteredFiles.filter((file) => file.size <= maxSize);
85
+ }
86
+ if (onFilesSelected) {
87
+ onFilesSelected(filteredFiles);
88
+ }
89
+ };
90
+ const handleClick = () => {
91
+ if (internalRef.current) {
92
+ internalRef.current.click();
93
+ }
94
+ };
95
+ const helperId = `${inputId}-helper`;
96
+ const stateMessageId = `${inputId}-state`;
97
+ const stateMsg = state === "error" ? errorMessage : state === "success" ? successMessage : state === "warning" ? warningMessage : void 0;
98
+ const handleKeyDown = (e) => {
99
+ if (e.key === "Enter" || e.key === " ") {
100
+ e.preventDefault();
101
+ handleClick();
102
+ }
103
+ };
104
+ return /* @__PURE__ */ jsxRuntime.jsxs(
105
+ "div",
106
+ {
107
+ className: chunkL5VQZZVR_cjs.cn(
108
+ "flex flex-col gap-1.5",
109
+ fullWidth ? "w-full" : "w-fit",
110
+ wrapperClassName,
111
+ className
112
+ ),
113
+ children: [
114
+ label && /* @__PURE__ */ jsxRuntime.jsxs(
115
+ "label",
116
+ {
117
+ htmlFor: inputId,
118
+ className: chunkL5VQZZVR_cjs.cn(
119
+ "font-black leading-none text-text uppercase tracking-widest",
120
+ labelSizeClasses[size],
121
+ labelClassName
122
+ ),
123
+ children: [
124
+ label,
125
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "ml-1 text-error", children: "*" })
126
+ ]
127
+ }
128
+ ),
129
+ /* @__PURE__ */ jsxRuntime.jsxs(
130
+ "div",
131
+ {
132
+ onDragOver: handleDragOver,
133
+ onDragLeave: handleDragLeave,
134
+ onDrop: handleDrop,
135
+ onClick: handleClick,
136
+ onKeyDown: handleKeyDown,
137
+ role: "button",
138
+ tabIndex: disabled ? -1 : 0,
139
+ "aria-disabled": disabled,
140
+ className: chunkL5VQZZVR_cjs.cn(
141
+ "relative flex flex-col items-center justify-center border-2 border-dashed rounded-lg transition-all cursor-pointer group",
142
+ sizeClasses[size],
143
+ stateClasses[state],
144
+ isDragging && "border-primary bg-primary/5 scale-[1.01] shadow-md",
145
+ disabled && "opacity-50 cursor-not-allowed bg-surface-secondary border-border",
146
+ dropzoneClassName
147
+ ),
148
+ children: [
149
+ /* @__PURE__ */ jsxRuntime.jsx(
150
+ "input",
151
+ {
152
+ ...rest,
153
+ ref: (node) => {
154
+ internalRef.current = node;
155
+ if (typeof ref === "function") ref(node);
156
+ else if (ref) ref.current = node;
157
+ },
158
+ id: inputId,
159
+ type: "file",
160
+ accept,
161
+ multiple,
162
+ disabled,
163
+ onChange: handleChange,
164
+ className: "sr-only"
165
+ }
166
+ ),
167
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2 text-center pointer-events-none", children: [
168
+ icon ?? /* @__PURE__ */ jsxRuntime.jsx(
169
+ outline.CloudArrowUpIcon,
170
+ {
171
+ className: chunkL5VQZZVR_cjs.cn(
172
+ "w-10 h-10 mb-2 transition-all duration-normal group-hover:scale-110",
173
+ state === "default" ? "text-text-muted" : stateMessageClasses[state]
174
+ )
175
+ }
176
+ ),
177
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-text transition-colors group-hover:text-primary", children: "Click to upload or drag and drop" }),
178
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-text-muted font-medium", children: [
179
+ accept ? `Available formats: ${accept}` : "Any file type",
180
+ maxSize && ` (Max ${String(Math.round(maxSize / 1024 / 1024))}MB)`
181
+ ] })
182
+ ] })
183
+ ]
184
+ }
185
+ ),
186
+ helperText && /* @__PURE__ */ jsxRuntime.jsx(
187
+ "p",
188
+ {
189
+ id: helperId,
190
+ className: chunkL5VQZZVR_cjs.cn("text-xs text-text-muted font-medium mt-1", helperClassName),
191
+ children: helperText
192
+ }
193
+ ),
194
+ stateMsg && /* @__PURE__ */ jsxRuntime.jsx(
195
+ "p",
196
+ {
197
+ id: stateMessageId,
198
+ role: state === "error" ? "alert" : void 0,
199
+ className: chunkL5VQZZVR_cjs.cn("text-xs font-bold mt-1", stateMessageClasses[state], helperClassName),
200
+ children: stateMsg
201
+ }
202
+ )
203
+ ]
204
+ }
205
+ );
206
+ });
207
+ FileUpload.displayName = "FileUpload";
208
+
209
+ exports.FileUpload = FileUpload;
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+