@vlrc-fe/components 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/ConfirmModal.d.ts +2 -3
  3. package/dist/ConfirmModal.d.ts.map +1 -1
  4. package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
  5. package/dist/DataTable/components/DataTablePagination.d.ts.map +1 -1
  6. package/dist/Dropdown/Dropdown.d.ts.map +1 -1
  7. package/dist/Dropdown/types.d.ts +1 -1
  8. package/dist/Dropdown/types.d.ts.map +1 -1
  9. package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
  10. package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts +2 -1
  11. package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts.map +1 -1
  12. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +7 -1
  13. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
  14. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -1
  15. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
  16. package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
  17. package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
  18. package/dist/Form/FormDatePicker/types.d.ts +5 -0
  19. package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
  20. package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
  21. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts +2 -2
  22. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
  23. package/dist/Form/FormSelect/FormSelect.d.ts.map +1 -1
  24. package/dist/Form/FormSelect/types.d.ts +1 -1
  25. package/dist/Form/FormSelect/types.d.ts.map +1 -1
  26. package/dist/Form/FormSelect/useFormSelect.d.ts +1 -1
  27. package/dist/Form/FormSelect/useFormSelect.d.ts.map +1 -1
  28. package/dist/MultiSelect/MultiSelect.d.ts +3 -31
  29. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  30. package/dist/MultiSelect/renderers.d.ts.map +1 -1
  31. package/dist/MultiSelect/type.d.ts +1 -0
  32. package/dist/MultiSelect/type.d.ts.map +1 -1
  33. package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
  34. package/dist/Select/BaseSelect.d.ts.map +1 -1
  35. package/dist/Select/MultiSelectTags.d.ts.map +1 -1
  36. package/dist/Select/type.d.ts +1 -1
  37. package/dist/Select/type.d.ts.map +1 -1
  38. package/dist/Typography/Code.d.ts.map +1 -1
  39. package/dist/Typography/Link.d.ts.map +1 -1
  40. package/dist/Typography/Paragraph.d.ts.map +1 -1
  41. package/dist/Typography/Text.d.ts.map +1 -1
  42. package/dist/Typography/Title.d.ts.map +1 -1
  43. package/dist/Typography/types.d.ts +37 -1
  44. package/dist/Typography/types.d.ts.map +1 -1
  45. package/dist/Typography/utils.d.ts +3 -2
  46. package/dist/Typography/utils.d.ts.map +1 -1
  47. package/dist/assets/stylex.css +36 -24
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.js +108 -108
  50. package/dist/index10.cjs +1 -1
  51. package/dist/index10.js +18 -55
  52. package/dist/index101.cjs +1 -1
  53. package/dist/index101.js +89 -89
  54. package/dist/index102.cjs +1 -1
  55. package/dist/index102.js +29 -29
  56. package/dist/index103.cjs +1 -1
  57. package/dist/index103.js +128 -124
  58. package/dist/index104.cjs +1 -1
  59. package/dist/index104.js +16 -16
  60. package/dist/index106.cjs +1 -1
  61. package/dist/index106.js +2 -2
  62. package/dist/index107.cjs +1 -1
  63. package/dist/index107.js +114 -117
  64. package/dist/index108.cjs +1 -1
  65. package/dist/index108.js +95 -92
  66. package/dist/index109.cjs +1 -1
  67. package/dist/index109.js +41 -41
  68. package/dist/index11.cjs +1 -1
  69. package/dist/index11.js +36 -164
  70. package/dist/index110.cjs +1 -1
  71. package/dist/index110.js +1 -1
  72. package/dist/index111.cjs +1 -1
  73. package/dist/index111.js +1 -1
  74. package/dist/index112.cjs +1 -1
  75. package/dist/index112.js +128 -120
  76. package/dist/index114.cjs +1 -1
  77. package/dist/index114.js +151 -151
  78. package/dist/index116.cjs +1 -1
  79. package/dist/index116.js +96 -91
  80. package/dist/index117.cjs +1 -1
  81. package/dist/index117.js +18 -18
  82. package/dist/index118.cjs +1 -1
  83. package/dist/index118.js +2 -2
  84. package/dist/index119.cjs +1 -1
  85. package/dist/index119.js +15 -15
  86. package/dist/index12.cjs +1 -1
  87. package/dist/index12.js +147 -103
  88. package/dist/index120.cjs +1 -1
  89. package/dist/index120.js +10 -10
  90. package/dist/index121.cjs +1 -1
  91. package/dist/index121.js +31 -31
  92. package/dist/index122.cjs +1 -1
  93. package/dist/index122.js +3 -3
  94. package/dist/index123.cjs +1 -1
  95. package/dist/index123.js +2 -2
  96. package/dist/index124.cjs +1 -1
  97. package/dist/index124.js +53 -49
  98. package/dist/index126.cjs +1 -1
  99. package/dist/index126.js +35 -38
  100. package/dist/index127.cjs +1 -1
  101. package/dist/index127.js +114 -107
  102. package/dist/index128.cjs +1 -1
  103. package/dist/index128.js +8 -8
  104. package/dist/index129.cjs +1 -1
  105. package/dist/index129.js +53 -53
  106. package/dist/index13.cjs +1 -1
  107. package/dist/index13.js +130 -102
  108. package/dist/index130.cjs +1 -1
  109. package/dist/index130.js +134 -130
  110. package/dist/index132.cjs +1 -1
  111. package/dist/index132.js +7 -7
  112. package/dist/index133.cjs +1 -1
  113. package/dist/index133.js +95 -95
  114. package/dist/index134.cjs +1 -1
  115. package/dist/index134.js +2 -2
  116. package/dist/index135.cjs +1 -1
  117. package/dist/index135.js +113 -99
  118. package/dist/index136.cjs +1 -1
  119. package/dist/index136.js +8 -8
  120. package/dist/index137.cjs +1 -1
  121. package/dist/index137.js +16 -16
  122. package/dist/index138.cjs +1 -1
  123. package/dist/index138.js +20 -20
  124. package/dist/index14.cjs +1 -1
  125. package/dist/index14.js +154 -80
  126. package/dist/index140.cjs +1 -1
  127. package/dist/index140.js +2 -2
  128. package/dist/index141.cjs +1 -1
  129. package/dist/index141.js +24 -24
  130. package/dist/index142.cjs +1 -1
  131. package/dist/index142.js +2 -2
  132. package/dist/index143.cjs +1 -1
  133. package/dist/index143.js +15 -15
  134. package/dist/index144.cjs +1 -1
  135. package/dist/index144.js +3 -3
  136. package/dist/index145.cjs +1 -1
  137. package/dist/index145.js +2 -2
  138. package/dist/index146.cjs +1 -1
  139. package/dist/index146.js +1 -1
  140. package/dist/index147.cjs +1 -1
  141. package/dist/index147.js +88 -88
  142. package/dist/index149.cjs +1 -1
  143. package/dist/index149.js +64 -64
  144. package/dist/index15.cjs +1 -1
  145. package/dist/index15.js +116 -63
  146. package/dist/index150.cjs +1 -1
  147. package/dist/index150.js +9 -9
  148. package/dist/index152.cjs +1 -1
  149. package/dist/index152.js +1 -1
  150. package/dist/index153.cjs +1 -1
  151. package/dist/index153.js +41 -41
  152. package/dist/index154.cjs +1 -1
  153. package/dist/index154.js +73 -73
  154. package/dist/index155.cjs +1 -1
  155. package/dist/index155.js +34 -34
  156. package/dist/index156.cjs +1 -1
  157. package/dist/index156.js +8 -8
  158. package/dist/index157.cjs +1 -1
  159. package/dist/index157.js +1 -1
  160. package/dist/index158.cjs +1 -1
  161. package/dist/index158.js +30 -30
  162. package/dist/index159.cjs +1 -1
  163. package/dist/index159.js +21 -21
  164. package/dist/index16.cjs +1 -1
  165. package/dist/index16.js +60 -91
  166. package/dist/index160.cjs +1 -1
  167. package/dist/index160.js +59 -59
  168. package/dist/index161.cjs +1 -1
  169. package/dist/index161.js +2 -2
  170. package/dist/index162.cjs +1 -1
  171. package/dist/index162.js +50 -50
  172. package/dist/index163.cjs +1 -1
  173. package/dist/index163.js +11 -11
  174. package/dist/index164.cjs +1 -1
  175. package/dist/index164.js +1 -1
  176. package/dist/index165.cjs +1 -1
  177. package/dist/index165.js +33 -33
  178. package/dist/index166.cjs +1 -1
  179. package/dist/index166.js +11 -11
  180. package/dist/index167.cjs +1 -1
  181. package/dist/index167.js +2 -2
  182. package/dist/index168.cjs +1 -1
  183. package/dist/index168.js +7 -7
  184. package/dist/index169.cjs +1 -1
  185. package/dist/index169.js +74 -65
  186. package/dist/index17.cjs +1 -1
  187. package/dist/index17.js +122 -15
  188. package/dist/index170.cjs +1 -1
  189. package/dist/index170.js +9 -9
  190. package/dist/index171.cjs +1 -1
  191. package/dist/index171.js +7 -7
  192. package/dist/index172.cjs +1 -1
  193. package/dist/index172.js +12 -12
  194. package/dist/index174.cjs +1 -1
  195. package/dist/index174.js +15 -15
  196. package/dist/index175.cjs +1 -1
  197. package/dist/index175.js +13 -13
  198. package/dist/index176.cjs +1 -1
  199. package/dist/index176.js +2 -2
  200. package/dist/index177.cjs +1 -1
  201. package/dist/index177.js +140 -115
  202. package/dist/index178.cjs +1 -1
  203. package/dist/index178.js +4 -4
  204. package/dist/index179.cjs +1 -1
  205. package/dist/index179.js +47 -47
  206. package/dist/index18.cjs +1 -1
  207. package/dist/index18.js +15 -268
  208. package/dist/index181.cjs +1 -1
  209. package/dist/index181.js +36 -25
  210. package/dist/index183.cjs +1 -1
  211. package/dist/index183.js +4 -4
  212. package/dist/index185.cjs +1 -1
  213. package/dist/index185.js +5 -8
  214. package/dist/index186.cjs +1 -1
  215. package/dist/index186.js +5 -15
  216. package/dist/index187.cjs +1 -1
  217. package/dist/index187.js +5 -20
  218. package/dist/index188.cjs +1 -1
  219. package/dist/index188.js +5 -16
  220. package/dist/index189.cjs +1 -1
  221. package/dist/index189.js +8 -5
  222. package/dist/index19.cjs +1 -1
  223. package/dist/index19.js +11 -281
  224. package/dist/index190.cjs +1 -1
  225. package/dist/index190.js +7 -4
  226. package/dist/index191.cjs +1 -1
  227. package/dist/index191.js +12 -6
  228. package/dist/index192.cjs +1 -1
  229. package/dist/index192.js +6 -5
  230. package/dist/index193.cjs +1 -1
  231. package/dist/index193.js +6 -5
  232. package/dist/index194.cjs +1 -1
  233. package/dist/index194.js +6 -7
  234. package/dist/index195.cjs +1 -1
  235. package/dist/index195.js +10 -68
  236. package/dist/index196.cjs +1 -1
  237. package/dist/index196.js +9 -10
  238. package/dist/index197.cjs +1 -1
  239. package/dist/index197.js +5 -201
  240. package/dist/index198.cjs +1 -1
  241. package/dist/index198.js +7 -123
  242. package/dist/index199.cjs +1 -1
  243. package/dist/index199.js +7 -31
  244. package/dist/index20.cjs +1 -1
  245. package/dist/index20.js +26 -11
  246. package/dist/index200.cjs +1 -1
  247. package/dist/index200.js +66 -17
  248. package/dist/index201.cjs +1 -1
  249. package/dist/index201.js +8 -68
  250. package/dist/index202.cjs +1 -1
  251. package/dist/index202.js +13 -13
  252. package/dist/index203.cjs +1 -1
  253. package/dist/index203.js +6 -6
  254. package/dist/index204.cjs +1 -1
  255. package/dist/index204.js +15 -278
  256. package/dist/index205.cjs +1 -1
  257. package/dist/index205.js +171 -126
  258. package/dist/index206.cjs +1 -1
  259. package/dist/index206.js +21 -19
  260. package/dist/index207.cjs +1 -1
  261. package/dist/index207.js +16 -8
  262. package/dist/index208.cjs +1 -1
  263. package/dist/index208.js +123 -13
  264. package/dist/index209.cjs +1 -1
  265. package/dist/index209.js +19 -7
  266. package/dist/index21.cjs +1 -1
  267. package/dist/index21.js +29 -26
  268. package/dist/index210.cjs +1 -1
  269. package/dist/index210.js +8 -6
  270. package/dist/index211.cjs +1 -1
  271. package/dist/index211.js +9 -9
  272. package/dist/index212.cjs +1 -1
  273. package/dist/index212.js +13 -8
  274. package/dist/index213.cjs +1 -1
  275. package/dist/index213.js +9 -4
  276. package/dist/index214.cjs +1 -1
  277. package/dist/index214.js +9 -6
  278. package/dist/index215.cjs +1 -1
  279. package/dist/index215.js +4 -6
  280. package/dist/index216.cjs +1 -1
  281. package/dist/index216.js +42 -9
  282. package/dist/index217.cjs +1 -1
  283. package/dist/index217.js +386 -8
  284. package/dist/index218.cjs +1 -1
  285. package/dist/index218.js +37 -14
  286. package/dist/index219.cjs +1 -1
  287. package/dist/index219.js +22 -10
  288. package/dist/index22.cjs +1 -1
  289. package/dist/index22.js +367 -59
  290. package/dist/index220.cjs +1 -1
  291. package/dist/index220.js +57 -9
  292. package/dist/index221.cjs +1 -1
  293. package/dist/index221.js +39 -4
  294. package/dist/index222.cjs +1 -1
  295. package/dist/index222.js +116 -35
  296. package/dist/index223.cjs +1 -1
  297. package/dist/index223.js +85 -387
  298. package/dist/index224.cjs +1 -1
  299. package/dist/index224.js +87 -35
  300. package/dist/index225.cjs +1 -1
  301. package/dist/index225.js +116 -18
  302. package/dist/index226.cjs +1 -1
  303. package/dist/index226.js +97 -55
  304. package/dist/index227.cjs +1 -1
  305. package/dist/index227.js +154 -37
  306. package/dist/index228.cjs +1 -1
  307. package/dist/index228.js +76 -121
  308. package/dist/index229.cjs +9 -1
  309. package/dist/index229.js +588 -77
  310. package/dist/index23.cjs +1 -1
  311. package/dist/index23.js +212 -29
  312. package/dist/index230.cjs +1 -1
  313. package/dist/index230.js +64 -68
  314. package/dist/index231.cjs +1 -1
  315. package/dist/index231.js +42 -115
  316. package/dist/index232.cjs +1 -1
  317. package/dist/index232.js +65 -98
  318. package/dist/index233.cjs +1 -1
  319. package/dist/index233.js +48 -149
  320. package/dist/index234.cjs +1 -1
  321. package/dist/index234.js +98 -68
  322. package/dist/index235.cjs +1 -9
  323. package/dist/index235.js +214 -580
  324. package/dist/index236.cjs +1 -1
  325. package/dist/index236.js +29 -66
  326. package/dist/index237.cjs +1 -1
  327. package/dist/index237.js +23 -40
  328. package/dist/index238.cjs +1 -1
  329. package/dist/index238.js +55 -59
  330. package/dist/index239.cjs +1 -1
  331. package/dist/index239.js +419 -46
  332. package/dist/index24.cjs +1 -1
  333. package/dist/index24.js +200 -312
  334. package/dist/index240.cjs +1 -1
  335. package/dist/index240.js +30 -97
  336. package/dist/index241.cjs +1 -1
  337. package/dist/index241.js +205 -196
  338. package/dist/index25.cjs +1 -1
  339. package/dist/index25.js +228 -124
  340. package/dist/index26.cjs +1 -1
  341. package/dist/index26.js +161 -86
  342. package/dist/index27.cjs +1 -1
  343. package/dist/index27.js +89 -143
  344. package/dist/index28.cjs +1 -1
  345. package/dist/index28.js +140 -76
  346. package/dist/index29.cjs +1 -1
  347. package/dist/index29.js +92 -84
  348. package/dist/index30.cjs +1 -1
  349. package/dist/index30.js +84 -26
  350. package/dist/index31.cjs +1 -1
  351. package/dist/index31.js +26 -35
  352. package/dist/index32.cjs +1 -1
  353. package/dist/index32.js +39 -86
  354. package/dist/index33.cjs +1 -1
  355. package/dist/index33.js +84 -231
  356. package/dist/index34.cjs +1 -1
  357. package/dist/index34.js +234 -44
  358. package/dist/index35.cjs +1 -1
  359. package/dist/index35.js +39 -26
  360. package/dist/index36.cjs +1 -1
  361. package/dist/index36.js +30 -14
  362. package/dist/index37.cjs +1 -1
  363. package/dist/index37.js +14 -13
  364. package/dist/index38.cjs +1 -1
  365. package/dist/index38.js +13 -3
  366. package/dist/index39.cjs +1 -1
  367. package/dist/index39.js +4 -87
  368. package/dist/index40.cjs +1 -1
  369. package/dist/index40.js +83 -174
  370. package/dist/index41.cjs +1 -1
  371. package/dist/index41.js +66 -142
  372. package/dist/index42.cjs +1 -1
  373. package/dist/index42.js +217 -62
  374. package/dist/index43.cjs +1 -1
  375. package/dist/index43.js +135 -47
  376. package/dist/index44.cjs +1 -1
  377. package/dist/index44.js +47 -260
  378. package/dist/index45.cjs +1 -1
  379. package/dist/index45.js +273 -8
  380. package/dist/index46.cjs +1 -1
  381. package/dist/index46.js +7 -4
  382. package/dist/index47.cjs +1 -1
  383. package/dist/index47.js +4 -503
  384. package/dist/index48.cjs +1 -1
  385. package/dist/index48.js +472 -177
  386. package/dist/index49.cjs +1 -1
  387. package/dist/index49.js +205 -23
  388. package/dist/index50.cjs +1 -1
  389. package/dist/index50.js +21 -1008
  390. package/dist/index51.cjs +1 -1
  391. package/dist/index51.js +1014 -21
  392. package/dist/index52.cjs +1 -1
  393. package/dist/index52.js +22 -207
  394. package/dist/index53.cjs +1 -1
  395. package/dist/index53.js +181 -130
  396. package/dist/index54.cjs +1 -1
  397. package/dist/index54.js +132 -99
  398. package/dist/index55.cjs +1 -1
  399. package/dist/index55.js +123 -19
  400. package/dist/index56.cjs +1 -1
  401. package/dist/index56.js +17 -79
  402. package/dist/index57.cjs +1 -1
  403. package/dist/index57.js +75 -90
  404. package/dist/index58.cjs +1 -1
  405. package/dist/index58.js +91 -9
  406. package/dist/index59.cjs +1 -1
  407. package/dist/index59.js +12 -91
  408. package/dist/index6.cjs +1 -1
  409. package/dist/index6.js +62 -5
  410. package/dist/index60.cjs +1 -1
  411. package/dist/index60.js +92 -31
  412. package/dist/index61.cjs +1 -1
  413. package/dist/index61.js +29 -208
  414. package/dist/index62.cjs +1 -1
  415. package/dist/index62.js +123 -99
  416. package/dist/index63.cjs +1 -1
  417. package/dist/index63.js +17 -17
  418. package/dist/index64.cjs +1 -1
  419. package/dist/index64.js +28 -28
  420. package/dist/index65.cjs +1 -1
  421. package/dist/index65.js +30 -30
  422. package/dist/index67.cjs +1 -1
  423. package/dist/index67.js +11 -11
  424. package/dist/index7.cjs +1 -1
  425. package/dist/index7.js +22 -28
  426. package/dist/index73.cjs +1 -1
  427. package/dist/index73.js +1 -1
  428. package/dist/index74.cjs +1 -1
  429. package/dist/index74.js +20 -20
  430. package/dist/index75.cjs +1 -1
  431. package/dist/index75.js +7 -7
  432. package/dist/index77.cjs +1 -1
  433. package/dist/index77.js +28 -28
  434. package/dist/index8.cjs +1 -1
  435. package/dist/index8.js +28 -61
  436. package/dist/index9.cjs +1 -1
  437. package/dist/index9.js +60 -15
  438. package/dist/ui/accordion.d.ts.map +1 -1
  439. package/dist/ui/avatar.d.ts.map +1 -1
  440. package/dist/ui/breadcrumb.d.ts.map +1 -1
  441. package/dist/ui/button.d.ts.map +1 -1
  442. package/dist/ui/calendar.d.ts +1 -1
  443. package/dist/ui/calendar.d.ts.map +1 -1
  444. package/dist/ui/command.d.ts +1 -1
  445. package/dist/ui/command.d.ts.map +1 -1
  446. package/dist/ui/context-menu.d.ts.map +1 -1
  447. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  448. package/dist/ui/editable.d.ts.map +1 -1
  449. package/dist/ui/field.d.ts.map +1 -1
  450. package/dist/ui/form.d.ts.map +1 -1
  451. package/dist/ui/input-group.d.ts.map +1 -1
  452. package/dist/ui/input-otp.d.ts +1 -1
  453. package/dist/ui/input-otp.d.ts.map +1 -1
  454. package/dist/ui/item.d.ts.map +1 -1
  455. package/dist/ui/menubar.d.ts.map +1 -1
  456. package/dist/ui/pagination.d.ts +3 -1
  457. package/dist/ui/pagination.d.ts.map +1 -1
  458. package/dist/ui/toggle-group.d.ts +1 -1
  459. package/dist/ui/toggle-group.d.ts.map +1 -1
  460. package/dist/ui/toggle.d.ts +1 -1
  461. package/dist/ui/toggle.d.ts.map +1 -1
  462. package/dist/ui/useBreakpoint.d.ts +0 -4
  463. package/dist/ui/useBreakpoint.d.ts.map +1 -1
  464. package/package.json +1 -1
  465. package/dist/index242.cjs +0 -1
  466. package/dist/index242.js +0 -25
  467. package/dist/index243.cjs +0 -1
  468. package/dist/index243.js +0 -26
  469. package/dist/index244.cjs +0 -1
  470. package/dist/index244.js +0 -63
  471. package/dist/index245.cjs +0 -1
  472. package/dist/index245.js +0 -422
  473. package/dist/index246.cjs +0 -1
  474. package/dist/index246.js +0 -25
  475. package/dist/index247.cjs +0 -1
  476. package/dist/index247.js +0 -209
package/dist/index239.js CHANGED
@@ -1,49 +1,422 @@
1
- import { get as e, isNil as t } from "lodash-es";
2
- // src/Form/FormSelect/useFormSelect.ts
3
- function n(e) {
4
- return e.isMulti === !0;
5
- }
6
- function r(r) {
7
- let { options: i, injectOptions: a, placeholder: o = "Select...", description: s, disabled: c, isClearable: l = !0, isSearchable: u = !0, isLoading: d = !1, className: f, rules: p, onSearchTextChange: m, hasNextPage: h, isFetchingNextPage: g, fetchNextPage: _, maxTagCount: v = "responsive", tagRender: y, showSelectAll: b = !1, allowClear: x, width: S } = r, C = e(p, "required"), w = !t(C) && C !== !1, T = {
8
- options: i,
9
- injectOptions: a,
10
- placeholder: o,
11
- isClearable: l,
12
- isSearchable: u,
13
- isLoading: d,
14
- className: f,
15
- disabled: c,
16
- onSearchTextChange: m,
17
- hasNextPage: h,
18
- isFetchingNextPage: g,
19
- fetchNextPage: _,
20
- maxTagCount: v,
21
- tagRender: y,
22
- showSelectAll: b,
23
- allowClear: x,
24
- width: S
25
- };
26
- return {
27
- isRequired: w,
28
- description: s,
29
- enhancedRules: (() => {
30
- if (!p) return p;
31
- let e = { ...p };
32
- return w && typeof e.required != "string" && typeof e.required != "object" ? e.required = "This field is required" : typeof e.required == "object" && !e.required.message && (e.required = {
33
- ...e.required,
34
- message: "This field is required"
35
- }), e;
36
- })(),
37
- baseSelectProps: T,
38
- isMulti: n(r),
39
- createChangeHandlers: (e) => ({
40
- onChangeMulti: (t) => {
41
- e.onChange(t), n(r) && r.onChange && r.onChange(t);
42
- },
43
- onChangeSingle: (t) => {
44
- e.onChange(t), !n(r) && r.onChange && r.onChange(t);
1
+ import { Icons as e } from "./index4.js";
2
+ import { Text as t } from "./index14.js";
3
+ import { Button as n } from "./index22.js";
4
+ import { createApiUploadHandler as r, createUploadThingUploadHandler as i, formatFileSize as a } from "./index113.js";
5
+ import { FileUpload as o, FileUploadClear as s, FileUploadDropzone as c, FileUploadItem as l, FileUploadItemDelete as u, FileUploadItemMetadata as d, FileUploadItemPreview as f, FileUploadItemProgress as p, FileUploadList as m, FileUploadTrigger as h, useFileUpload as g } from "./index114.js";
6
+ import * as _ from "@stylexjs/stylex";
7
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
8
+ import * as x from "react";
9
+ import { c as S } from "react/compiler-runtime";
10
+ // src/Form/FormFileUpload/FileUpload.tsx
11
+ var C = {
12
+ avatarDropzone: {
13
+ kVAEAm: "x1n2onr6",
14
+ kzqmXN: "x1eyvef",
15
+ kZKoxP: "xw76nk8",
16
+ kaIpWk: "x7xypw4",
17
+ kMzoRj: "xdh2fpr",
18
+ ksu8eU: "xbsl7fq",
19
+ kVAM5u: "xb30jbz",
20
+ kWkggS: "x1mlyrtw",
21
+ kVQacm: "xb3r6kr",
22
+ kmVPX3: "x1717udv",
23
+ kkrTdU: "x1ypdohk",
24
+ k1xSpc: "x78zum5",
25
+ kGNEyG: "x6s0dn4",
26
+ kjj79g: "xl56j7k",
27
+ k1ekBW: "xq90yva",
28
+ kIyJzY: "x13dflua",
29
+ kaVNsj: "x14aqmuz",
30
+ $$css: !0
31
+ },
32
+ avatarItem: {
33
+ kVAEAm: "x1n2onr6",
34
+ k1xSpc: "x78zum5",
35
+ kzqmXN: "xh8yej3",
36
+ kZKoxP: "x5yr21d",
37
+ kXwgrk: "xdt5ytf",
38
+ kaIpWk: "x2u8bby",
39
+ kMzoRj: "xc342km",
40
+ kmVPX3: "x1717udv",
41
+ $$css: !0
42
+ },
43
+ avatarPreview: {
44
+ kzqmXN: "xh8yej3",
45
+ kZKoxP: "x5yr21d",
46
+ kaIpWk: "x2u8bby",
47
+ kMzoRj: "xc342km",
48
+ kWkggS: "xjbqb8w",
49
+ $$css: !0
50
+ },
51
+ avatarImg: {
52
+ kzqmXN: "xh8yej3",
53
+ kZKoxP: "x5yr21d",
54
+ kVIFPx: "xl1xv1r",
55
+ $$css: !0
56
+ },
57
+ compactDropzone: {
58
+ kVAEAm: "x1n2onr6",
59
+ k1xSpc: "x78zum5",
60
+ kXwgrk: "x1q0g3np",
61
+ kGNEyG: "x6s0dn4",
62
+ kOIVth: "x8233eu",
63
+ kaIpWk: "x1mr5ieh",
64
+ kMzoRj: "xmkeg23",
65
+ ksu8eU: "xbsl7fq",
66
+ kVAM5u: "xb30jbz",
67
+ kWkggS: "x1mlyrtw",
68
+ kmVPX3: "x19btat0",
69
+ kkrTdU: "x1ypdohk",
70
+ k1ekBW: "xq90yva",
71
+ kIyJzY: "xx6bhzk",
72
+ kaVNsj: "x14aqmuz",
73
+ kGzVvX: "x9p52ec",
74
+ $$css: !0
75
+ },
76
+ clearBtnRow: {
77
+ k1xSpc: "x78zum5",
78
+ kjj79g: "x13a6bvl",
79
+ kzqmXN: "xh8yej3",
80
+ $$css: !0
81
+ },
82
+ clearBtn: {
83
+ k1xSpc: "x3nfvp2",
84
+ kGNEyG: "x6s0dn4",
85
+ kOIVth: "xvh977a",
86
+ kGuDYH: "xboafo0",
87
+ kMwMTN: "xw3nh4a",
88
+ kWkggS: "xjbqb8w",
89
+ kMzoRj: "xc342km",
90
+ kkrTdU: "x1ypdohk",
91
+ kmVPX3: "x48ff29",
92
+ kaIpWk: "x1q0v2j7",
93
+ kGzVvX: "x9p52ec",
94
+ kDPRdz: "x1mqvv6a",
95
+ $$css: !0
96
+ },
97
+ deleteBtn: {
98
+ k1xSpc: "x3nfvp2",
99
+ kGNEyG: "x6s0dn4",
100
+ kjj79g: "xl56j7k",
101
+ kzqmXN: "xs5h3dt",
102
+ kZKoxP: "xettwda",
103
+ kaIpWk: "x1q0v2j7",
104
+ kMzoRj: "xc342km",
105
+ kWkggS: "xjbqb8w",
106
+ kMwMTN: "xw3nh4a",
107
+ kkrTdU: "x1ypdohk",
108
+ kmuXW: "x2lah0s",
109
+ k1ekBW: "x1gbuem2",
110
+ kIyJzY: "xx6bhzk",
111
+ kGzVvX: "x9p52ec",
112
+ kDPRdz: "x1mqvv6a",
113
+ $$css: !0
114
+ },
115
+ whiteText: {
116
+ kMwMTN: "x1f7m26b",
117
+ $$css: !0
118
+ }
119
+ };
120
+ function w(e) {
121
+ let t = S(6), { onChange: n, autoUpload: r, maxFiles: i } = e, a = g(k), o = x.useRef(null), s = x.useRef(!0), c, l;
122
+ return t[0] !== r || t[1] !== i || t[2] !== n || t[3] !== a ? (c = () => {
123
+ if (!n) return;
124
+ let e = Array.from(a.files.values());
125
+ if (s.current && (s.current = !1, e.length === 0)) return;
126
+ let t = (() => {
127
+ if (r) {
128
+ let t = e.filter(O).map(D).filter(E);
129
+ return i === 1 ? t.length > 0 ? t[t.length - 1] : null : t;
45
130
  }
131
+ let t = e.map(T);
132
+ return i === 1 ? t.length > 0 ? t[t.length - 1] : null : t;
133
+ })(), c = o.current;
134
+ (r ? JSON.stringify(c) === JSON.stringify(t) : Array.isArray(t) && Array.isArray(c) ? t.length === c.length && t.every((e, t) => e === c[t]) : t === c) || (o.current = t, n(t));
135
+ }, l = [
136
+ a,
137
+ r,
138
+ i,
139
+ n
140
+ ], t[0] = r, t[1] = i, t[2] = n, t[3] = a, t[4] = c, t[5] = l) : (c = t[4], l = t[5]), x.useEffect(c, l), null;
141
+ }
142
+ function T(e) {
143
+ return e.file;
144
+ }
145
+ function E(e) {
146
+ return !!e;
147
+ }
148
+ function D(e) {
149
+ return e.file.uploadedUrl;
150
+ }
151
+ function O(e) {
152
+ return e.status === "success";
153
+ }
154
+ function k(e) {
155
+ return e;
156
+ }
157
+ function A(e, t = "") {
158
+ let n = e.split("/").pop()?.split("?")[0] || "file", r = n.split(".").pop()?.toLowerCase(), i = r && {
159
+ jpg: "image/jpeg",
160
+ jpeg: "image/jpeg",
161
+ png: "image/png",
162
+ gif: "image/gif",
163
+ webp: "image/webp",
164
+ pdf: "application/pdf"
165
+ }[r];
166
+ i ||= t.includes("image") ? "image/jpeg" : "application/octet-stream";
167
+ let a = new File([""], n, { type: i });
168
+ return a.isUploadedUrl = !0, a.uploadedUrl = e, a;
169
+ }
170
+ function j({ showPreview: t, showProgress: r, orientation: i = "vertical", avatarImgSx: a, deleteBtnSx: o }) {
171
+ let s = g((e) => Array.from(e.files.values()).map((e) => e.file));
172
+ return s.length === 0 ? null : /* @__PURE__ */ y(m, {
173
+ orientation: i,
174
+ children: s.map((s, c) => /* @__PURE__ */ b(l, {
175
+ value: s,
176
+ children: [
177
+ t && /* @__PURE__ */ y(f, { render: (e, t) => {
178
+ let n = e.uploadedUrl || (e.type.startsWith("image/") && typeof URL < "u" && URL.createObjectURL ? URL.createObjectURL(e) : null);
179
+ return n && e.type.startsWith("image/") ? /* @__PURE__ */ y("img", {
180
+ src: n,
181
+ alt: e.name,
182
+ ..._.props(a)
183
+ }) : t();
184
+ } }),
185
+ /* @__PURE__ */ y(d, {}),
186
+ r && /* @__PURE__ */ y(p, { variant: "bottom" }),
187
+ /* @__PURE__ */ y(u, {
188
+ asChild: !0,
189
+ children: /* @__PURE__ */ y(n, {
190
+ variant: "ghost",
191
+ size: "icon",
192
+ "aria-label": `Delete ${s.name}`,
193
+ sx: o,
194
+ children: /* @__PURE__ */ y(e.Trash2, { size: i === "horizontal" ? 15 : 16 })
195
+ })
196
+ })
197
+ ]
198
+ }, `${s.name}-${c}`))
199
+ });
200
+ }
201
+ function M(t) {
202
+ let n = S(10), { clearBtnRowSx: r, clearBtnSx: i } = t;
203
+ if (g(N) === 0) return null;
204
+ let a;
205
+ n[0] === r ? a = n[1] : (a = _.props(r), n[0] = r, n[1] = a);
206
+ let o;
207
+ n[2] === i ? o = n[3] : (o = _.props(i), n[2] = i, n[3] = o);
208
+ let c;
209
+ n[4] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ y(e.Trash2, { size: 13 }), n[4] = c) : c = n[4];
210
+ let l;
211
+ n[5] === o ? l = n[6] : (l = /* @__PURE__ */ y(s, {
212
+ asChild: !0,
213
+ children: /* @__PURE__ */ b("button", {
214
+ type: "button",
215
+ ...o,
216
+ children: [c, "Clear all"]
46
217
  })
47
- };
218
+ }), n[5] = o, n[6] = l);
219
+ let u;
220
+ return n[7] !== a || n[8] !== l ? (u = /* @__PURE__ */ y("div", {
221
+ ...a,
222
+ children: l
223
+ }), n[7] = a, n[8] = l, n[9] = u) : u = n[9], u;
224
+ }
225
+ function N(e) {
226
+ return e.files.size;
227
+ }
228
+ function P(n) {
229
+ let r = S(8), { showProgress: i, maxSize: o } = n, s = g(I), u;
230
+ r[0] !== s || r[1] !== i ? (u = /* @__PURE__ */ y(c, {
231
+ sx: C.avatarDropzone,
232
+ children: s ? /* @__PURE__ */ b(l, {
233
+ value: s,
234
+ sx: C.avatarItem,
235
+ children: [
236
+ /* @__PURE__ */ y(f, {
237
+ sx: C.avatarPreview,
238
+ render: F
239
+ }),
240
+ /* @__PURE__ */ b("div", {
241
+ className: "x10l6tqk x10a8y8t x78zum5 xdt5ytf x6s0dn4 xl56j7k xvh977a xa44r0r x1f7m26b xg01cxk x19991ni x13dflua x1o7uuvo",
242
+ children: [/* @__PURE__ */ y(e.Camera, { size: 22 }), /* @__PURE__ */ y(t, {
243
+ size: "xs",
244
+ weight: "semibold",
245
+ sx: C.whiteText,
246
+ children: "Change photo"
247
+ })]
248
+ }),
249
+ i && /* @__PURE__ */ y(p, {
250
+ variant: "fill",
251
+ style: { opacity: .5 }
252
+ })
253
+ ]
254
+ }) : /* @__PURE__ */ b("div", {
255
+ className: "x78zum5 xh8yej3 x5yr21d xdt5ytf x6s0dn4 xl56j7k xvh977a x1jgryid xw3nh4a x15406qy x13dflua",
256
+ children: [/* @__PURE__ */ y(e.Camera, { size: 24 }), /* @__PURE__ */ y(t, {
257
+ size: "xs",
258
+ weight: "medium",
259
+ children: "Upload"
260
+ })]
261
+ })
262
+ }), r[0] = s, r[1] = i, r[2] = u) : u = r[2];
263
+ let d;
264
+ r[3] === o ? d = r[4] : (d = o ? /* @__PURE__ */ b(t, {
265
+ size: "xs",
266
+ type: "muted",
267
+ children: ["Max ", a(o)]
268
+ }) : null, r[3] = o, r[4] = d);
269
+ let m;
270
+ return r[5] !== u || r[6] !== d ? (m = /* @__PURE__ */ b("div", {
271
+ className: "x78zum5 xdt5ytf x6s0dn4 x13z6uf9",
272
+ children: [u, d]
273
+ }), r[5] = u, r[6] = d, r[7] = m) : m = r[7], m;
274
+ }
275
+ function F(n) {
276
+ let r = n.uploadedUrl || (n.type.startsWith("image/") && typeof URL < "u" && URL.createObjectURL ? URL.createObjectURL(n) : null);
277
+ return r ? /* @__PURE__ */ y("img", {
278
+ src: r,
279
+ alt: "Avatar",
280
+ className: "xh8yej3 x5yr21d xl1xv1r"
281
+ }) : /* @__PURE__ */ b("div", {
282
+ className: "x78zum5 xh8yej3 x5yr21d xdt5ytf x6s0dn4 xl56j7k xvh977a x1jgryid xw3nh4a x15406qy x13dflua",
283
+ children: [/* @__PURE__ */ y(e.Camera, { size: 24 }), /* @__PURE__ */ y(t, {
284
+ size: "xs",
285
+ weight: "medium",
286
+ children: "Upload"
287
+ })]
288
+ });
289
+ }
290
+ function I(e) {
291
+ let t = e.files.values().next();
292
+ return t.done ? null : t.value.file;
293
+ }
294
+ function L({ value: s, onChange: l, autoUpload: u = !1, uploadFile: d, apiConfig: f, uploadThingConfig: p, uploadHandler: m, maxFiles: g = 1, maxSize: _ = 5242880, accept: S = "image/*", multiple: T, disabled: E, className: D, sx: O, variant: k = "default", dropzoneTitle: N, dropzoneSubtitle: F, icon: I, showFileList: L = !0, showProgress: R = !0, showPreview: z = !0, showClear: B = !1 }) {
295
+ let V = x.useRef(/* @__PURE__ */ new Map()), H = x.useMemo(() => (Array.isArray(s) ? s : s ? [s] : []).map((e) => {
296
+ if (e instanceof File) return e;
297
+ if (typeof e == "string") {
298
+ let t = V.current.get(e);
299
+ return t || (t = A(e, S), V.current.set(e, t)), t;
300
+ }
301
+ return e;
302
+ }), [s, S]), U = x.useMemo(() => m || (p ? i(p) : f ? r(f) : null), [
303
+ m,
304
+ p,
305
+ f
306
+ ]), W = async (e, t) => {
307
+ if (!u) e.forEach((e) => t.onSuccess(e));
308
+ else if (U) try {
309
+ (await U(e, {
310
+ onProgress: t.onProgress,
311
+ onSuccess: (e, n) => {
312
+ e.uploadedUrl = n.url, t.onSuccess(e);
313
+ },
314
+ onError: (e, n) => {
315
+ t.onError(e, n);
316
+ }
317
+ })).forEach((t, n) => {
318
+ let r = e[n];
319
+ r && (r.uploadedUrl = t.url);
320
+ });
321
+ } catch {}
322
+ else d ? await Promise.all(e.map(async (e) => {
323
+ let n = e;
324
+ if (n.isUploadedUrl) t.onSuccess(e);
325
+ else try {
326
+ t.onProgress(e, 20), n.uploadedUrl = await d(e), t.onProgress(e, 100), t.onSuccess(e);
327
+ } catch (n) {
328
+ t.onError(e, n instanceof Error ? n : /* @__PURE__ */ Error("Upload failed"));
329
+ }
330
+ })) : (console.warn("FileUpload: autoUpload is true but no upload handler or config was provided."), e.forEach((e) => t.onError(e, /* @__PURE__ */ Error("Missing upload configuration"))));
331
+ }, G = `${g > 1 ? `Up to ${g} files` : "1 file max"} ${_ ? `(Max ${a(_)})` : ""}`;
332
+ return /* @__PURE__ */ b(o, {
333
+ value: H,
334
+ maxFiles: k === "avatar" ? 1 : g,
335
+ maxSize: _,
336
+ accept: S,
337
+ multiple: k === "avatar" ? !1 : T ?? g > 1,
338
+ disabled: E,
339
+ onUpload: W,
340
+ className: D,
341
+ sx: O,
342
+ children: [/* @__PURE__ */ y(w, {
343
+ onChange: l,
344
+ autoUpload: !!u,
345
+ maxFiles: k === "avatar" ? 1 : g
346
+ }), k === "avatar" ? /* @__PURE__ */ y(P, {
347
+ showProgress: R,
348
+ maxSize: _
349
+ }) : k === "compact" ? /* @__PURE__ */ b(v, { children: [
350
+ /* @__PURE__ */ b(c, {
351
+ sx: C.compactDropzone,
352
+ children: [
353
+ /* @__PURE__ */ y("div", {
354
+ className: "x78zum5 x6s0dn4 xl56j7k xs5h3dt xettwda x7xypw4 xmkeg23 x1y0btm7 xb30jbz x1rexohn xw3nh4a x2lah0s",
355
+ children: I || /* @__PURE__ */ y(e.CloudUpload, { size: 18 })
356
+ }),
357
+ /* @__PURE__ */ b("div", {
358
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli",
359
+ children: [/* @__PURE__ */ y(t, {
360
+ size: "sm",
361
+ weight: "medium",
362
+ children: N || "Choose or drop files to upload"
363
+ }), /* @__PURE__ */ y(t, {
364
+ size: "xs",
365
+ type: "muted",
366
+ children: F || G
367
+ })]
368
+ }),
369
+ /* @__PURE__ */ y(h, {
370
+ asChild: !0,
371
+ children: /* @__PURE__ */ y(n, {
372
+ variant: "outline",
373
+ size: "sm",
374
+ disabled: E,
375
+ children: "Browse"
376
+ })
377
+ })
378
+ ]
379
+ }),
380
+ B && /* @__PURE__ */ y(M, {
381
+ clearBtnRowSx: C.clearBtnRow,
382
+ clearBtnSx: C.clearBtn
383
+ }),
384
+ L && /* @__PURE__ */ y(j, {
385
+ showPreview: z,
386
+ showProgress: R,
387
+ orientation: "horizontal",
388
+ avatarImgSx: C.avatarImg,
389
+ deleteBtnSx: C.deleteBtn
390
+ })
391
+ ] }) : /* @__PURE__ */ b(v, { children: [
392
+ /* @__PURE__ */ b(c, { children: [
393
+ /* @__PURE__ */ y("div", {
394
+ className: "x78zum5 x6s0dn4 xl56j7k xvm51jw xwaiz5r x7xypw4 xmkeg23 x1y0btm7 xb30jbz x1rexohn xw3nh4a x1hpqcdg",
395
+ children: I || /* @__PURE__ */ y(e.CloudUpload, { size: 20 })
396
+ }),
397
+ /* @__PURE__ */ y(t, {
398
+ size: "md",
399
+ weight: "medium",
400
+ children: N || "Drag & drop files here, or click to select"
401
+ }),
402
+ /* @__PURE__ */ y(t, {
403
+ size: "xs",
404
+ type: "muted",
405
+ children: F || G
406
+ })
407
+ ] }),
408
+ B && /* @__PURE__ */ y(M, {
409
+ clearBtnRowSx: C.clearBtnRow,
410
+ clearBtnSx: C.clearBtn
411
+ }),
412
+ L && /* @__PURE__ */ y(j, {
413
+ showPreview: z,
414
+ showProgress: R,
415
+ orientation: "vertical",
416
+ avatarImgSx: C.avatarImg,
417
+ deleteBtnSx: C.deleteBtn
418
+ })
419
+ ] })]
420
+ });
48
421
  }
49
- export { r as useFormSelect };
422
+ export { L as FileUpload };
package/dist/index24.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index2.cjs"),t=require("./index21.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@stylexjs/stylex");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-slot");var o={base:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kOIVth:`x13z6uf9`,khDVqt:`xuxw1ft`,kaIpWk:`xsda711`,kGuDYH:`xkpwil5`,k63SB2:`xk50ysn`,kkrTdU:`x1ypdohk`,k1ekBW:`xfagghw`,kIyJzY:`xx6bhzk`,kAMwcw:`xwwtwea`,kI3sdo:`x1a2a7pz`,kMzoRj:`xc342km`,ksu8eU:`x1y0btm7`,kmuXW:`x2lah0s`,k7HAVu:`xaqnwrm`,kWCcOm:`xijokvz`,kYPGJ8:`x1s07b3s`,kEtg5x:`x1ippke1`,$$css:!0},variantDefault:{kWkggS:`x1j7ufkg`,kMwMTN:`xstwp1q`,kKhh5M:`x18uuni6`,$$css:!0},variantDestructive:{kWkggS:`x57dptr`,kMwMTN:`x1f7m26b`,kKhh5M:`x18uuni6`,kEtg5x:`xi3z2r8`,$$css:!0},variantOutline:{kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xb30jbz`,kWkggS:`x1mlyrtw`,kGVxlE:`x1dsmnui`,kGzVvX:`x9p52ec`,kDPRdz:`x10ubyu6`,$$css:!0},variantSecondary:{kWkggS:`xr2cb9l`,kMwMTN:`x2mg7mp`,kKhh5M:`x5z6fxw`,$$css:!0},variantGhost:{kWkggS:`xjbqb8w`,kMwMTN:`x1heor9g`,kGzVvX:`x9p52ec`,kDPRdz:`x10ubyu6`,$$css:!0},variantLink:{kWkggS:`xjbqb8w`,kMwMTN:`x6gpbkk`,kcSHmL:`x3pynha`,k67Jb4:`xt0b8zv`,$$css:!0},variantAccent:{kWkggS:`x1jgryid`,kMwMTN:`xzeqxs3`,kKhh5M:`x18uuni6`,$$css:!0},variantAccentCta:{kWkggS:`x1jgryid`,kMwMTN:`xzeqxs3`,kGVxlE:`xe3tlyi`,kwmNyF:`x14snt5h`,kwh8RV:`x1ue318z`,$$css:!0},variantGradient:{kKwaWg:`x1d6nh5w`,kMwMTN:`xstwp1q`,kGVxlE:`xq2yyqn`,kKhh5M:`xclktvd`,kwh8RV:`x1l46q3f`,$$css:!0},variantGradientSuccess:{kKwaWg:`x14lf7vg`,kMwMTN:`x1f7m26b`,kGVxlE:`x1wvf0jk`,kKhh5M:`xclktvd`,kwh8RV:`x1cdh3jk`,$$css:!0},sizeXxs:{kZKoxP:`xam5rvr`,kaIpWk:`x1q0v2j7`,kOIVth:`xvh977a`,kg3NbH:`x97vtpp`,kGuDYH:`x12lo8hy`,$$css:!0},sizeXs:{kZKoxP:`xb8l8e1`,kaIpWk:`x1q0v2j7`,kOIVth:`xx7b8my`,kg3NbH:`xvpgqt4`,kGuDYH:`xboafo0`,$$css:!0},sizeSm:{kZKoxP:`xettwda`,kaIpWk:`xsda711`,kOIVth:`xpj7pl4`,kg3NbH:`x1ryrjj2`,kGuDYH:`x1dcheo9`,$$css:!0},sizeMd:{kZKoxP:`xk8t5le`,kaIpWk:`xsda711`,kOIVth:`x13z6uf9`,kg3NbH:`xnxx81d`,kGuDYH:`xkpwil5`,$$css:!0},sizeLg:{kZKoxP:`xwaiz5r`,kaIpWk:`xsda711`,kOIVth:`x13z6uf9`,kg3NbH:`x1qhpy6z`,kGuDYH:`x6u19be`,$$css:!0},sizeXl:{kZKoxP:`x12hms15`,kaIpWk:`x1f78wua`,kOIVth:`xb6y1gh`,kg3NbH:`xzsmjar`,kGuDYH:`x1jchvi3`,$$css:!0},sizeXxl:{kZKoxP:`x1j7fsof`,kaIpWk:`x1f78wua`,kOIVth:`x8233eu`,kg3NbH:`x129psgg`,kGuDYH:`x1c3i2sq`,$$css:!0},sizeIconXxs:{kZKoxP:`xam5rvr`,kzqmXN:`xp8d6y2`,kmVPX3:`x1717udv`,kaIpWk:`x1q0v2j7`,$$css:!0},sizeIconXs:{kZKoxP:`xb8l8e1`,kzqmXN:`xh29eag`,kmVPX3:`x1717udv`,kaIpWk:`x1q0v2j7`,$$css:!0},sizeIconSm:{kZKoxP:`xettwda`,kzqmXN:`xs5h3dt`,kmVPX3:`x1717udv`,$$css:!0},sizeIconMd:{kZKoxP:`xk8t5le`,kzqmXN:`x1s4ejo4`,kmVPX3:`x1717udv`,$$css:!0},sizeIconLg:{kZKoxP:`xwaiz5r`,kzqmXN:`xvm51jw`,kmVPX3:`x1717udv`,$$css:!0},sizeIconXl:{kZKoxP:`x12hms15`,kzqmXN:`xb1qrhf`,kmVPX3:`x1717udv`,$$css:!0},sizeIconXxl:{kZKoxP:`x1j7fsof`,kzqmXN:`x14cw3s8`,kmVPX3:`x1717udv`,$$css:!0},addonWrapper:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,$$css:!0},iconGlyphXxs:{kzqmXN:`x1jw3ynk`,kZKoxP:`xvle69y`,$$css:!0},iconGlyphXs:{kzqmXN:`x1xvt488`,kZKoxP:`xf08kfj`,$$css:!0},iconGlyphSm:{kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,$$css:!0},iconGlyphMd:{kzqmXN:`xsk17dz`,kZKoxP:`xaylbqo`,$$css:!0},iconGlyphLg:{kzqmXN:`xwqq7k2`,kZKoxP:`xmll18r`,$$css:!0},iconGlyphXl:{kzqmXN:`x1h5jark`,kZKoxP:`x11q3zg3`,$$css:!0},iconGlyphXxl:{kzqmXN:`xp8d6y2`,kZKoxP:`xam5rvr`,$$css:!0},spinner:{kKVMdj:`x1aerksh`,k44tkh:`x1q3qbx4`,kyAemX:`x1esw782`,ko0y90:`xa4qsjk`,kaIpWk:`x7xypw4`,kMzoRj:`xdh2fpr`,ksu8eU:`x1y0btm7`,kVAM5u:`x1r7ld26`,kLZC3w:`x1v8p93f`,kmuXW:`x2lah0s`,$$css:!0}},s={default:o.variantDefault,destructive:o.variantDestructive,outline:o.variantOutline,secondary:o.variantSecondary,ghost:o.variantGhost,link:o.variantLink,accent:o.variantAccent,"accent-cta":o.variantAccentCta,gradient:o.variantGradient,"gradient-success":o.variantGradientSuccess},c={xxs:o.sizeXxs,xs:o.sizeXs,sm:o.sizeSm,md:o.sizeMd,lg:o.sizeLg,xl:o.sizeXl,xxl:o.sizeXxl,default:o.sizeMd,"2xl":o.sizeXxl,icon:o.sizeIconMd,"icon-xxs":o.sizeIconXxs,"icon-xs":o.sizeIconXs,"icon-sm":o.sizeIconSm,"icon-md":o.sizeIconMd,"icon-lg":o.sizeIconLg,"icon-xl":o.sizeIconXl,"icon-xxl":o.sizeIconXxl},l={xxs:o.iconGlyphXxs,xs:o.iconGlyphXs,sm:o.iconGlyphSm,md:o.iconGlyphMd,lg:o.iconGlyphLg,xl:o.iconGlyphXl,xxl:o.iconGlyphXxl},u={xxs:`xxs`,xs:`xs`,sm:`sm`,md:`sm`,default:`sm`,lg:`md`,xl:`lg`,xxl:`xl`,"2xl":`xl`,icon:`md`,"icon-xxs":`xxs`,"icon-xs":`xs`,"icon-sm":`sm`,"icon-md":`md`,"icon-lg":`lg`,"icon-xl":`xl`,"icon-xxl":`xxl`};function d({className:e,type:n,variant:d=`default`,size:f=`md`,asChild:p=!1,width:m,style:h,prefix:g,prefixIcon:_,suffix:v,suffixIcon:y,iconSize:b,prefixSize:x,suffixSize:S,isLoading:C,loading:w,disabled:T,htmlType:E,children:D,sx:O,...k}){let A=C??w??!1,j=T??A,M=E??n??`button`,N=p?a.Slot:`button`,P=t.resolveWidth(m),F=f==="default"?`md`:f,I=c[F]??o.sizeMd,L=u[F]??`sm`,R=x??b??L,z=S??b??L,B=g??_,V=v??y,H=r.props(o.base,s[d]??o.variantDefault,I,O),U=e?`${H.className||``} ${e}`.trim():H.className;return p?(0,i.jsx)(N,{"data-slot":`button`,"data-variant":d,"data-size":F,"data-width":m,disabled:j,...H,style:{...H.style,...h,...P?{width:P}:{}},className:U,...k,children:D}):(0,i.jsxs)(`button`,{type:M,"data-slot":`button`,"data-variant":d,"data-size":F,"data-width":m,disabled:j,...H,style:{...H.style,...h,...P?{width:P}:{}},className:U,...k,children:[A?(0,i.jsx)(`span`,{...r.props(o.addonWrapper,o.spinner,l[R]),"aria-hidden":`true`}):B?(0,i.jsx)(`span`,{...r.props(o.addonWrapper,l[R]),"data-slot":`button-prefix`,children:B}):null,D,V&&!A?(0,i.jsx)(`span`,{...r.props(o.addonWrapper,l[z]),"data-slot":`button-suffix`,children:V}):null]})}function f(e){let t=e?.variant||`default`,n=e?.size||`md`,i=n==="default"?`md`:n;return r.props(o.base,s[t]??o.variantDefault,c[i]??o.sizeMd).className||``}exports.Button=d,exports.buttonVariants=f;
1
+ const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index12.cjs"),r=require("./index14.cjs"),i=require("./index22.cjs"),a=require("./index23.cjs");let o=require("@stylexjs/stylex");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c={dialog:{kzqmXN:`xh8yej3`,kaIpWk:`x1mr5ieh`,kWkggS:`x1be509`,kMwMTN:`xap3l8t`,kmVPX3:`xis3749`,kGVxlE:`xym7dz`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xb30jbz`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x15iy025`,$$css:!0},sizeXxs:{ks0D6T:`x1va8c73`,$$css:!0},sizeXs:{ks0D6T:`x1dt7z5j`,$$css:!0},sizeSm:{ks0D6T:`xq2pcee`,$$css:!0},sizeMd:{ks0D6T:`x1ptgtm5`,$$css:!0},sizeLg:{ks0D6T:`x11gisft`,$$css:!0},sizeXl:{ks0D6T:`x1yjoq1l`,$$css:!0},sizeXxl:{ks0D6T:`xyzno7u`,$$css:!0},title:{kogj98:`x1ghz6dp`,k1K539:`x18jvhmb`,kGuDYH:`x1c3i2sq`,kLWn49:`x37zpob`,k63SB2:`x1s688f`,kMwMTN:`x84br7x`,$$css:!0},message:{kogj98:`x1ghz6dp`,kGuDYH:`xkpwil5`,kLWn49:`x1evy7pa`,kMwMTN:`xw3nh4a`,$$css:!0},cancelBtn:{kaIpWk:`xsda711`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xb30jbz`,kWkggS:`x1mlyrtw`,kMwMTN:`x84br7x`,kg3NbH:`xnxx81d`,k8WAf4:`x18g2hj5`,kGuDYH:`xkpwil5`,k63SB2:`xk50ysn`,kkrTdU:`x1ypdohk`,kGVxlE:`x1dsmnui`,kGzVvX:`x9p52ec`,kYPGJ8:`x1s07b3s`,kWCcOm:`xijokvz`,$$css:!0},confirmBtn:{kaIpWk:`xsda711`,kMzoRj:`xc342km`,kg3NbH:`xnxx81d`,k8WAf4:`x18g2hj5`,kGuDYH:`xkpwil5`,k63SB2:`xk50ysn`,kMwMTN:`x1f7m26b`,kkrTdU:`x1ypdohk`,kGVxlE:`x1dsmnui`,kYPGJ8:`x1s07b3s`,kWCcOm:`xijokvz`,$$css:!0},btnWarning:{kWkggS:`x1yjhq7t`,kGzVvX:`x1af168x`,$$css:!0},btnInfo:{kWkggS:`x1efvng4`,kGzVvX:`xupd0a8`,$$css:!0},btnSuccess:{kWkggS:`xvrvcqj`,kGzVvX:`x1tl4bfe`,$$css:!0},btnDanger:{kWkggS:`x57dptr`,kKhh5M:`x18uuni6`,$$css:!0},iconWarning:{kMwMTN:`x1m3z5z6`,$$css:!0},iconInfo:{kMwMTN:`xd85xce`,$$css:!0},iconSuccess:{kMwMTN:`xqi19zs`,$$css:!0},iconDanger:{kMwMTN:`xuuroe4`,$$css:!0},typeIcon:{kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,$$css:!0}},l={xxs:c.sizeXxs,xs:c.sizeXs,sm:c.sizeSm,md:c.sizeMd,lg:c.sizeLg,xl:c.sizeXl,xxl:c.sizeXxl};function u({open:e,isOpen:u,onClose:d,onCancel:f,onConfirm:p,onOk:m,title:h,message:g,description:_,children:v,confirmText:y=`Confirm`,cancelText:b=`Cancel`,closeLabel:x=`Close`,processingText:S,loadingText:C,type:w,variant:T=`warning`,isLoading:E,loading:D,size:O=`md`,width:k,footer:A,sx:j,className:M}){let N=e??u??!0,P=E??D??!1,F=w??T??`warning`,I=F===`error`?`danger`:F,L=g??_,R=C??S??`Processing...`,z=()=>{P||(f??d)?.()},B=()=>{P||(p??m)?.()},V={warning:t.Icons.AlertTriangle,info:t.Icons.Info,success:t.Icons.CheckCircle2,danger:t.Icons.XCircle}[I],H={warning:{icon:c.iconWarning,btn:c.btnWarning},info:{icon:c.iconInfo,btn:c.btnInfo},success:{icon:c.iconSuccess,btn:c.btnSuccess},danger:{icon:c.iconDanger,btn:c.btnDanger}}[I],U=l[O]??c.sizeMd;return(0,s.jsx)(a.Dialog,{open:N,onOpenChange:e=>!e&&z(),children:(0,s.jsxs)(a.DialogContent,{showCloseButton:!1,sx:[c.dialog,U,j],className:M,style:k?{maxWidth:k}:void 0,onEscapeKeyDown:e=>{P&&e.preventDefault()},onPointerDownOutside:e=>{P&&e.preventDefault()},children:[(0,s.jsx)(`button`,{type:`button`,onClick:z,disabled:P,className:`x10l6tqk x1u62bzc x1nwpe0i x7xypw4 x78pyy4 xw3nh4a xc342km xjbqb8w x1ypdohk x78zum5 x6s0dn4 xl56j7k x1a2a7pz xfyfa0t x9p52ec x8aud5w xybh4k3 x7s97pk x1s07b3s xijokvz`,"aria-label":x,children:(0,s.jsx)(t.Icons.X,{className:`xw4jnvo x1qx5ct2`})}),(0,s.jsxs)(`div`,{className:`x78zum5 x1cy8zhl x1fsutb xnywu7s`,children:[(0,s.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x2lah0s xrhwvvd`,children:(0,s.jsx)(V,{...o.props(c.typeIcon,H.icon)})}),(0,s.jsxs)(`div`,{className:`xeuugli x845mor`,children:[(0,s.jsx)(a.DialogTitle,{asChild:!0,children:(0,s.jsx)(n.Title,{id:`confirm-modal-title`,level:3,sx:c.title,children:h})}),L?(0,s.jsx)(a.DialogDescription,{asChild:!0,children:(0,s.jsx)(r.Text,{type:`muted`,sx:c.message,children:L})}):null,v]})]}),A||(0,s.jsxs)(`div`,{className:`x78zum5 x13a6bvl xb6y1gh xdj266r`,children:[(0,s.jsx)(i.Button,{type:`button`,variant:`outline`,onClick:z,disabled:P,sx:c.cancelBtn,children:b}),(0,s.jsx)(i.Button,{type:`button`,variant:w===`danger`?`destructive`:`default`,onClick:B,isLoading:P,sx:[c.confirmBtn,H.btn],children:P?R:y})]})]})})}exports.ConfirmModal=u,exports.default=u;