@vlrc-fe/components 1.0.6 → 1.0.8

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 (452) hide show
  1. package/dist/Form/FormFileUpload/index.d.ts +1 -1
  2. package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
  3. package/dist/Form/index.d.ts +1 -1
  4. package/dist/Form/index.d.ts.map +1 -1
  5. package/dist/MultiSelect/type.d.ts +2 -2
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.js +64 -40
  8. package/dist/index10.cjs +1 -1
  9. package/dist/index10.js +46 -80
  10. package/dist/index100.cjs +1 -1
  11. package/dist/index100.js +22 -60
  12. package/dist/index101.cjs +1 -1
  13. package/dist/index101.js +1147 -43
  14. package/dist/index102.cjs +1 -1
  15. package/dist/index102.js +30 -64
  16. package/dist/index103.cjs +1 -1
  17. package/dist/index103.js +31 -147
  18. package/dist/index104.cjs +1 -1
  19. package/dist/index104.js +93 -19
  20. package/dist/index105.cjs +1 -1
  21. package/dist/index105.js +80 -25
  22. package/dist/index106.cjs +1 -1
  23. package/dist/index106.js +9 -50
  24. package/dist/index107.cjs +1 -1
  25. package/dist/index107.js +30 -156
  26. package/dist/index108.cjs +1 -1
  27. package/dist/index108.js +350 -14
  28. package/dist/index109.cjs +1 -1
  29. package/dist/index109.js +11 -0
  30. package/dist/index11.cjs +1 -1
  31. package/dist/index11.js +55 -60
  32. package/dist/index110.cjs +1 -0
  33. package/dist/index110.js +430 -0
  34. package/dist/index111.cjs +1 -0
  35. package/dist/index111.js +36 -0
  36. package/dist/index112.cjs +1 -0
  37. package/dist/index112.js +28 -0
  38. package/dist/index113.cjs +1 -0
  39. package/dist/index113.js +14 -0
  40. package/dist/index114.cjs +1 -0
  41. package/dist/index114.js +156 -0
  42. package/dist/index115.cjs +1 -0
  43. package/dist/index115.js +19 -0
  44. package/dist/index116.cjs +1 -0
  45. package/dist/index116.js +67 -0
  46. package/dist/index117.cjs +1 -0
  47. package/dist/index117.js +118 -0
  48. package/dist/index118.cjs +1 -0
  49. package/dist/index118.js +36 -0
  50. package/dist/index119.cjs +1 -0
  51. package/dist/index119.js +13 -0
  52. package/dist/index12.cjs +1 -1
  53. package/dist/index12.js +44 -121
  54. package/dist/index120.cjs +1 -0
  55. package/dist/index120.js +31 -0
  56. package/dist/index121.cjs +1 -0
  57. package/dist/index121.js +37 -0
  58. package/dist/index122.cjs +1 -0
  59. package/dist/index122.js +123 -0
  60. package/dist/index123.cjs +1 -0
  61. package/dist/index123.js +44 -0
  62. package/dist/index124.cjs +1 -0
  63. package/dist/index124.js +43 -0
  64. package/dist/index125.cjs +1 -0
  65. package/dist/index125.js +14 -0
  66. package/dist/index126.cjs +1 -0
  67. package/dist/index126.js +64 -0
  68. package/dist/index127.cjs +1 -0
  69. package/dist/index127.js +23 -0
  70. package/dist/index128.cjs +1 -0
  71. package/dist/index128.js +34 -0
  72. package/dist/index129.cjs +1 -0
  73. package/dist/index129.js +27 -0
  74. package/dist/index13.cjs +1 -1
  75. package/dist/index13.js +30 -12
  76. package/dist/index130.cjs +1 -0
  77. package/dist/index130.js +26 -0
  78. package/dist/index131.cjs +1 -0
  79. package/dist/index131.js +157 -0
  80. package/dist/index132.cjs +1 -0
  81. package/dist/index132.js +34 -0
  82. package/dist/index133.cjs +1 -0
  83. package/dist/index133.js +46 -0
  84. package/dist/index134.cjs +1 -0
  85. package/dist/index134.js +142 -0
  86. package/dist/index135.cjs +1 -0
  87. package/dist/index135.js +125 -0
  88. package/dist/index136.cjs +1 -0
  89. package/dist/index136.js +26 -0
  90. package/dist/index137.cjs +1 -0
  91. package/dist/index137.js +88 -0
  92. package/dist/index138.cjs +1 -0
  93. package/dist/index138.js +221 -0
  94. package/dist/index139.cjs +1 -0
  95. package/dist/index139.js +166 -0
  96. package/dist/index14.cjs +1 -1
  97. package/dist/index14.js +8 -12
  98. package/dist/index140.cjs +1 -0
  99. package/dist/index140.js +126 -0
  100. package/dist/index141.cjs +1 -0
  101. package/dist/index141.js +15 -0
  102. package/dist/index142.cjs +1 -0
  103. package/dist/index142.js +9 -0
  104. package/dist/index143.cjs +1 -0
  105. package/dist/index143.js +17 -0
  106. package/dist/index144.cjs +1 -0
  107. package/dist/index144.js +22 -0
  108. package/dist/index145.cjs +1 -0
  109. package/dist/index145.js +18 -0
  110. package/dist/index146.cjs +1 -0
  111. package/dist/index146.js +6 -0
  112. package/dist/index147.cjs +1 -0
  113. package/dist/index147.js +7 -0
  114. package/dist/index148.cjs +1 -0
  115. package/dist/index148.js +8 -0
  116. package/dist/index149.cjs +1 -0
  117. package/dist/index149.js +7 -0
  118. package/dist/index15.cjs +1 -1
  119. package/dist/index15.js +12 -112
  120. package/dist/index150.cjs +1 -0
  121. package/dist/index150.js +7 -0
  122. package/dist/index151.cjs +1 -0
  123. package/dist/index151.js +9 -0
  124. package/dist/index152.cjs +1 -0
  125. package/dist/index152.js +69 -0
  126. package/dist/index153.cjs +1 -0
  127. package/dist/index153.js +11 -0
  128. package/dist/index154.cjs +1 -0
  129. package/dist/index154.js +202 -0
  130. package/dist/index155.cjs +1 -0
  131. package/dist/index155.js +124 -0
  132. package/dist/index156.cjs +1 -0
  133. package/dist/index156.js +32 -0
  134. package/dist/index157.cjs +1 -0
  135. package/dist/index157.js +20 -0
  136. package/dist/index158.cjs +1 -0
  137. package/dist/index158.js +69 -0
  138. package/dist/index159.cjs +1 -0
  139. package/dist/index159.js +32 -0
  140. package/dist/index16.cjs +1 -1
  141. package/dist/index16.js +4 -726
  142. package/dist/index160.cjs +1 -0
  143. package/dist/index160.js +11 -0
  144. package/dist/index161.cjs +1 -0
  145. package/dist/index161.js +280 -0
  146. package/dist/index162.cjs +1 -0
  147. package/dist/index162.js +157 -0
  148. package/dist/index163.cjs +1 -0
  149. package/dist/index163.js +20 -0
  150. package/dist/index164.cjs +1 -0
  151. package/dist/index164.js +10 -0
  152. package/dist/index165.cjs +1 -0
  153. package/dist/index165.js +14 -0
  154. package/dist/index166.cjs +1 -0
  155. package/dist/index166.js +8 -0
  156. package/dist/index167.cjs +1 -0
  157. package/dist/index167.js +8 -0
  158. package/dist/index168.cjs +1 -0
  159. package/dist/index168.js +11 -0
  160. package/dist/index169.cjs +1 -0
  161. package/dist/index169.js +10 -0
  162. package/dist/index17.cjs +1 -1
  163. package/dist/index17.js +79 -339
  164. package/dist/index170.cjs +1 -0
  165. package/dist/index170.js +6 -0
  166. package/dist/index171.cjs +1 -0
  167. package/dist/index171.js +8 -0
  168. package/dist/index172.cjs +1 -0
  169. package/dist/index172.js +8 -0
  170. package/dist/index173.cjs +1 -0
  171. package/dist/index173.js +10 -0
  172. package/dist/index174.cjs +1 -0
  173. package/dist/index174.js +11 -0
  174. package/dist/index175.cjs +1 -0
  175. package/dist/index175.js +15 -0
  176. package/dist/index176.cjs +1 -0
  177. package/dist/index176.js +11 -0
  178. package/dist/index177.cjs +1 -0
  179. package/dist/index177.js +11 -0
  180. package/dist/index178.cjs +1 -0
  181. package/dist/index178.js +6 -0
  182. package/dist/index179.cjs +1 -0
  183. package/dist/index179.js +43 -0
  184. package/dist/index18.cjs +1 -1
  185. package/dist/index18.js +19 -66
  186. package/dist/index180.cjs +1 -0
  187. package/dist/index180.js +382 -0
  188. package/dist/index181.cjs +1 -0
  189. package/dist/index181.js +40 -0
  190. package/dist/index182.cjs +1 -0
  191. package/dist/index182.js +23 -0
  192. package/dist/index183.cjs +1 -0
  193. package/dist/index183.js +59 -0
  194. package/dist/index184.cjs +1 -0
  195. package/dist/index184.js +55 -0
  196. package/dist/index185.cjs +1 -0
  197. package/dist/index185.js +54 -0
  198. package/dist/index186.cjs +1 -0
  199. package/dist/index186.js +57 -0
  200. package/dist/index187.cjs +1 -0
  201. package/dist/index187.js +57 -0
  202. package/dist/index188.cjs +1 -0
  203. package/dist/index188.js +88 -0
  204. package/dist/index189.cjs +1 -0
  205. package/dist/index189.js +66 -0
  206. package/dist/index19.cjs +1 -1
  207. package/dist/index19.js +18 -8
  208. package/dist/index190.cjs +1 -0
  209. package/dist/index190.js +594 -0
  210. package/dist/index191.cjs +9 -0
  211. package/dist/index191.js +30 -0
  212. package/dist/index192.cjs +1 -0
  213. package/dist/index192.js +50 -0
  214. package/dist/index193.cjs +1 -0
  215. package/dist/index193.js +65 -0
  216. package/dist/index194.cjs +1 -0
  217. package/dist/index194.js +48 -0
  218. package/dist/index195.cjs +1 -0
  219. package/dist/index195.js +67 -0
  220. package/dist/index196.cjs +1 -0
  221. package/dist/index196.js +151 -0
  222. package/dist/index197.cjs +1 -0
  223. package/dist/index197.js +23 -0
  224. package/dist/index198.cjs +1 -0
  225. package/dist/index198.js +27 -0
  226. package/dist/index199.cjs +1 -0
  227. package/dist/index199.js +53 -0
  228. package/dist/index20.cjs +1 -1
  229. package/dist/index20.js +51 -98
  230. package/dist/index200.cjs +1 -0
  231. package/dist/index200.js +161 -0
  232. package/dist/index201.cjs +1 -0
  233. package/dist/index201.js +16 -0
  234. package/dist/index202.cjs +1 -0
  235. package/dist/index21.cjs +1 -1
  236. package/dist/index21.js +81 -28
  237. package/dist/index22.cjs +1 -1
  238. package/dist/index22.js +64 -14
  239. package/dist/index23.cjs +1 -1
  240. package/dist/index23.js +25 -22
  241. package/dist/index24.cjs +1 -1
  242. package/dist/index24.js +1014 -33
  243. package/dist/index25.cjs +1 -1
  244. package/dist/index25.js +22 -96
  245. package/dist/index26.cjs +1 -1
  246. package/dist/index26.js +108 -25
  247. package/dist/index27.cjs +1 -1
  248. package/dist/index27.js +15 -9
  249. package/dist/index28.cjs +1 -1
  250. package/dist/index28.js +20 -66
  251. package/dist/index29.cjs +1 -1
  252. package/dist/index29.js +81 -11
  253. package/dist/index30.cjs +1 -1
  254. package/dist/index30.js +91 -29
  255. package/dist/index31.cjs +1 -1
  256. package/dist/index31.js +14 -41
  257. package/dist/index32.cjs +1 -1
  258. package/dist/index32.js +93 -12
  259. package/dist/index33.cjs +1 -1
  260. package/dist/index33.js +22 -62
  261. package/dist/index34.cjs +1 -1
  262. package/dist/index34.js +84 -22
  263. package/dist/index35.cjs +1 -1
  264. package/dist/index35.js +85 -33
  265. package/dist/index36.cjs +1 -1
  266. package/dist/index36.js +407 -25
  267. package/dist/index37.cjs +1 -1
  268. package/dist/index37.js +170 -25
  269. package/dist/index38.cjs +1 -1
  270. package/dist/index38.js +28 -154
  271. package/dist/index39.cjs +1 -1
  272. package/dist/index39.js +158 -33
  273. package/dist/index40.cjs +1 -1
  274. package/dist/index40.js +104 -45
  275. package/dist/index41.cjs +1 -1
  276. package/dist/index41.js +337 -140
  277. package/dist/index42.cjs +1 -1
  278. package/dist/index42.js +96 -124
  279. package/dist/index43.cjs +1 -1
  280. package/dist/index43.js +319 -23
  281. package/dist/index44.cjs +1 -1
  282. package/dist/index44.js +205 -81
  283. package/dist/index45.cjs +1 -1
  284. package/dist/index45.js +33 -220
  285. package/dist/index46.cjs +1 -1
  286. package/dist/index46.js +161 -163
  287. package/dist/index47.cjs +1 -1
  288. package/dist/index47.js +20 -125
  289. package/dist/index48.cjs +1 -1
  290. package/dist/index48.js +24 -14
  291. package/dist/index49.cjs +1 -1
  292. package/dist/index49.js +167 -7
  293. package/dist/index5.js +26 -14
  294. package/dist/index50.cjs +1 -1
  295. package/dist/index50.js +44 -15
  296. package/dist/index51.cjs +1 -1
  297. package/dist/index51.js +15 -18
  298. package/dist/index52.cjs +1 -1
  299. package/dist/index52.js +3 -17
  300. package/dist/index53.cjs +1 -1
  301. package/dist/index53.js +5 -5
  302. package/dist/index54.cjs +1 -1
  303. package/dist/index54.js +19 -4
  304. package/dist/index55.cjs +1 -1
  305. package/dist/index55.js +24 -6
  306. package/dist/index56.cjs +1 -1
  307. package/dist/index56.js +66 -4
  308. package/dist/index57.cjs +1 -1
  309. package/dist/index57.js +14 -5
  310. package/dist/index58.cjs +1 -1
  311. package/dist/index58.js +4 -8
  312. package/dist/index59.cjs +1 -1
  313. package/dist/index59.js +50 -67
  314. package/dist/index6.cjs +1 -1
  315. package/dist/index6.js +85 -46
  316. package/dist/index60.cjs +1 -1
  317. package/dist/index60.js +6 -10
  318. package/dist/index61.cjs +1 -1
  319. package/dist/index61.js +25 -199
  320. package/dist/index62.cjs +1 -1
  321. package/dist/index62.js +13 -122
  322. package/dist/index63.cjs +1 -1
  323. package/dist/index63.js +9 -30
  324. package/dist/index64.cjs +1 -1
  325. package/dist/index64.js +3 -20
  326. package/dist/index65.cjs +1 -1
  327. package/dist/index65.js +24 -66
  328. package/dist/index66.cjs +1 -1
  329. package/dist/index66.js +68 -30
  330. package/dist/index67.cjs +38 -1
  331. package/dist/index67.js +3 -11
  332. package/dist/index68.cjs +1 -1
  333. package/dist/index68.js +12 -279
  334. package/dist/index69.cjs +1 -1
  335. package/dist/index69.js +50 -155
  336. package/dist/index7.cjs +1 -1
  337. package/dist/index7.js +29 -85
  338. package/dist/index70.cjs +1 -1
  339. package/dist/index70.js +115 -19
  340. package/dist/index71.cjs +4 -1
  341. package/dist/index71.js +6 -9
  342. package/dist/index72.cjs +1 -1
  343. package/dist/index72.js +12 -12
  344. package/dist/index73.cjs +1 -1
  345. package/dist/index73.js +539 -6
  346. package/dist/index74.cjs +1 -1
  347. package/dist/index74.js +197 -6
  348. package/dist/index75.cjs +1 -1
  349. package/dist/index75.js +120 -9
  350. package/dist/index76.cjs +1 -1
  351. package/dist/index76.js +912 -8
  352. package/dist/index77.cjs +3 -1
  353. package/dist/index77.js +76 -4
  354. package/dist/index78.cjs +1 -1
  355. package/dist/index78.js +120 -6
  356. package/dist/index79.cjs +1 -1
  357. package/dist/index79.js +12 -6
  358. package/dist/index8.cjs +1 -1
  359. package/dist/index8.js +35 -62
  360. package/dist/index80.cjs +1 -1
  361. package/dist/index80.js +14 -8
  362. package/dist/index81.cjs +1 -1
  363. package/dist/index81.js +113 -9
  364. package/dist/index82.cjs +1 -1
  365. package/dist/index82.js +725 -13
  366. package/dist/index83.cjs +1 -1
  367. package/dist/index83.js +346 -9
  368. package/dist/index84.cjs +1 -1
  369. package/dist/index84.js +74 -9
  370. package/dist/index85.cjs +1 -1
  371. package/dist/index85.js +148 -4
  372. package/dist/index86.cjs +1 -1
  373. package/dist/index86.js +31 -42
  374. package/dist/index87.cjs +1 -1
  375. package/dist/index87.js +12 -380
  376. package/dist/index88.cjs +1 -1
  377. package/dist/index88.js +345 -37
  378. package/dist/index89.cjs +20 -1
  379. package/dist/index89.js +40 -18
  380. package/dist/index9.cjs +1 -1
  381. package/dist/index9.js +85 -17
  382. package/dist/index90.cjs +1 -1
  383. package/dist/index90.js +113 -56
  384. package/dist/index91.cjs +1 -1
  385. package/dist/index91.js +272 -51
  386. package/dist/index92.cjs +1 -1
  387. package/dist/index92.js +129 -50
  388. package/dist/index93.cjs +1 -1
  389. package/dist/index93.js +13 -54
  390. package/dist/index94.cjs +1 -1
  391. package/dist/index94.js +28 -55
  392. package/dist/index95.cjs +1 -1
  393. package/dist/index95.js +525 -80
  394. package/dist/index96.cjs +1 -1
  395. package/dist/index96.js +75 -61
  396. package/dist/index97.cjs +1 -1
  397. package/dist/index97.js +67 -583
  398. package/dist/index98.cjs +1 -9
  399. package/dist/index98.js +32 -27
  400. package/dist/index99.cjs +1 -1
  401. package/dist/index99.js +17 -49
  402. package/dist/ui/alert-dialog.d.ts +15 -0
  403. package/dist/ui/alert-dialog.d.ts.map +1 -0
  404. package/dist/ui/alert.d.ts +10 -0
  405. package/dist/ui/alert.d.ts.map +1 -0
  406. package/dist/ui/aspect-ratio.d.ts +4 -0
  407. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  408. package/dist/ui/avatar.d.ts +7 -0
  409. package/dist/ui/avatar.d.ts.map +1 -0
  410. package/dist/ui/badge.d.ts +1 -1
  411. package/dist/ui/breadcrumb.d.ts +12 -0
  412. package/dist/ui/breadcrumb.d.ts.map +1 -0
  413. package/dist/ui/button.d.ts +1 -1
  414. package/dist/ui/carousel.d.ts +20 -0
  415. package/dist/ui/carousel.d.ts.map +1 -0
  416. package/dist/ui/collapsible.d.ts +6 -0
  417. package/dist/ui/collapsible.d.ts.map +1 -0
  418. package/dist/ui/context-menu.d.ts +26 -0
  419. package/dist/ui/context-menu.d.ts.map +1 -0
  420. package/dist/ui/drawer.d.ts +14 -0
  421. package/dist/ui/drawer.d.ts.map +1 -0
  422. package/dist/ui/hover-card.d.ts +7 -0
  423. package/dist/ui/hover-card.d.ts.map +1 -0
  424. package/dist/ui/index.d.ts +23 -0
  425. package/dist/ui/index.d.ts.map +1 -1
  426. package/dist/ui/input-otp.d.ts +12 -0
  427. package/dist/ui/input-otp.d.ts.map +1 -0
  428. package/dist/ui/menubar.d.ts +27 -0
  429. package/dist/ui/menubar.d.ts.map +1 -0
  430. package/dist/ui/navigation-menu.d.ts +15 -0
  431. package/dist/ui/navigation-menu.d.ts.map +1 -0
  432. package/dist/ui/pagination.d.ts +14 -0
  433. package/dist/ui/pagination.d.ts.map +1 -0
  434. package/dist/ui/resizable.d.ts +9 -0
  435. package/dist/ui/resizable.d.ts.map +1 -0
  436. package/dist/ui/sheet.d.ts +14 -0
  437. package/dist/ui/sheet.d.ts.map +1 -0
  438. package/dist/ui/sidebar.d.ts +70 -0
  439. package/dist/ui/sidebar.d.ts.map +1 -0
  440. package/dist/ui/skeleton.d.ts +3 -0
  441. package/dist/ui/skeleton.d.ts.map +1 -0
  442. package/dist/ui/slider.d.ts +5 -0
  443. package/dist/ui/slider.d.ts.map +1 -0
  444. package/dist/ui/switch.d.ts +5 -0
  445. package/dist/ui/switch.d.ts.map +1 -0
  446. package/dist/ui/tabs.d.ts +8 -0
  447. package/dist/ui/tabs.d.ts.map +1 -0
  448. package/dist/ui/toggle-group.d.ts +8 -0
  449. package/dist/ui/toggle-group.d.ts.map +1 -0
  450. package/dist/ui/toggle.d.ts +10 -0
  451. package/dist/ui/toggle.d.ts.map +1 -0
  452. package/package.json +23 -5
package/dist/index106.cjs CHANGED
@@ -1 +1 @@
1
- function e(e){let{rules:r={},value:i,onChange:a,showEmpty:o}=e,s=r.required!==void 0&&r.required!==!1;return{isRequired:s,processedRules:n(r,s),parseValue:e=>i===void 0?o?``:String(e??``):String(i),emitChange:(e,t)=>{e(t),a?.(t)},sizeClasses:t}}var t={large:`size-5`,middle:`size-4`,small:`size-3.5`};function n(e={},t){let n={...e};return t&&typeof n.required!=`string`&&typeof n.required!=`object`?n.required=`Trường này bắt buộc`:typeof n.required==`object`&&!n.required.message&&(n.required={...n.required,message:`Trường này là bắt buộc`}),n}exports.useFormRadio=e;
1
+ "use client";const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("lucide-react"),r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-dialog");a=e.__toESM(a,1);function o({...e}){return(0,i.jsx)(a.Root,{"data-slot":`sheet`,...e})}function s({...e}){return(0,i.jsx)(a.Trigger,{"data-slot":`sheet-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.Close,{"data-slot":`sheet-close`,...e})}function l({...e}){return(0,i.jsx)(a.Portal,{"data-slot":`sheet-portal`,...e})}function u({className:e,...n}){return(0,i.jsx)(a.Overlay,{"data-slot":`sheet-overlay`,className:t.cn(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...n})}function d({className:e,children:r,side:o=`right`,...s}){return(0,i.jsxs)(l,{children:[(0,i.jsx)(u,{}),(0,i.jsxs)(a.Content,{"data-slot":`sheet-content`,className:t.cn(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,o===`right`&&`data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,o===`left`&&`data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,o===`top`&&`data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b`,o===`bottom`&&`data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t`,e),...s,children:[r,(0,i.jsxs)(a.Close,{className:`ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none`,children:[(0,i.jsx)(n.XIcon,{className:`size-4`}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function f({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`sheet-header`,className:t.cn(`flex flex-col gap-1.5 p-4`,e),...n})}function p({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`sheet-footer`,className:t.cn(`mt-auto flex flex-col gap-2 p-4`,e),...n})}function m({className:e,...n}){return(0,i.jsx)(a.Title,{"data-slot":`sheet-title`,className:t.cn(`text-foreground font-semibold`,e),...n})}function h({className:e,...n}){return(0,i.jsx)(a.Description,{"data-slot":`sheet-description`,className:t.cn(`text-muted-foreground text-sm`,e),...n})}exports.Sheet=o,exports.SheetClose=c,exports.SheetContent=d,exports.SheetDescription=h,exports.SheetFooter=p,exports.SheetHeader=f,exports.SheetTitle=m,exports.SheetTrigger=s;
package/dist/index106.js CHANGED
@@ -1,53 +1,12 @@
1
- import { Label as e } from "./index13.js";
2
- import { FormControl as t, FormField as n, FormItem as r, FormLabel as i, FormMessage as a } from "./index18.js";
3
- import { RadioGroup as o, RadioGroupItem as s } from "./index23.js";
4
- import { useFormRadio as c } from "./index105.js";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
- //#region src/Form/FormRadioGroup/FormRadio.tsx
7
- function d({ name: d, control: f, label: p = "", size: m = "middle", options: h = [], onChange: g, value: _, rules: v = {}, disabled: y = !1, optionType: b = "default", buttonStyle: x, autoHeightMax: S, showEmpty: C = !1, hideErrorMessage: w = !1, className: T }) {
8
- let { isRequired: E, processedRules: D, parseValue: O, emitChange: k, sizeClasses: A } = c({
9
- rules: v,
10
- value: _,
11
- onChange: g,
12
- showEmpty: C
13
- }), j = (t, n, r) => /* @__PURE__ */ l(o, {
14
- value: O(n),
15
- onValueChange: (e) => k(r, e),
16
- disabled: y,
17
- style: S ? {
18
- maxHeight: `${S}px`,
19
- overflowY: "auto"
20
- } : void 0,
21
- children: h.map((n) => /* @__PURE__ */ u("div", {
22
- className: "flex items-center space-x-2",
23
- children: [/* @__PURE__ */ l(s, {
24
- value: String(n.value),
25
- id: `${t}-${n.value}`,
26
- disabled: y || n.disabled,
27
- className: A[m]
28
- }), /* @__PURE__ */ l(e, {
29
- htmlFor: `${t}-${n.value}`,
30
- className: "cursor-pointer font-normal",
31
- children: n.label
32
- })]
33
- }, String(n.value)))
34
- });
35
- return /* @__PURE__ */ l(n, {
36
- control: f,
37
- name: d,
38
- rules: D,
39
- render: ({ field: e }) => /* @__PURE__ */ u(r, {
40
- className: T,
41
- children: [
42
- p && /* @__PURE__ */ u(i, { children: [p, E && /* @__PURE__ */ l("span", {
43
- className: "text-destructive ml-1",
44
- children: "*"
45
- })] }),
46
- /* @__PURE__ */ l(t, { children: j(d, _ ?? e.value, e.onChange) }),
47
- !w && /* @__PURE__ */ l(a, {})
48
- ]
49
- })
1
+ import { cn as e } from "./index3.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/ui/skeleton.tsx
4
+ function n({ className: n, ...r }) {
5
+ return /* @__PURE__ */ t("div", {
6
+ "data-slot": "skeleton",
7
+ className: e("bg-accent animate-pulse rounded-md", n),
8
+ ...r
50
9
  });
51
10
  }
52
11
  //#endregion
53
- export { d as FormRadio };
12
+ export { n as Skeleton };
package/dist/index107.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index14.cjs"),t=require("./index19.cjs"),n=require("./index24.cjs"),r=require("./index106.cjs");let i=require("react/jsx-runtime");function a({name:a,control:o,label:s=``,size:c=`middle`,options:l=[],onChange:u,value:d,rules:f={},disabled:p=!1,optionType:m=`default`,buttonStyle:h,autoHeightMax:g,showEmpty:_=!1,hideErrorMessage:v=!1,className:y}){let{isRequired:b,processedRules:x,parseValue:S,emitChange:C,sizeClasses:w}=r.useFormRadio({rules:f,value:d,onChange:u,showEmpty:_}),T=(t,r,a)=>(0,i.jsx)(n.RadioGroup,{value:S(r),onValueChange:e=>C(a,e),disabled:p,style:g?{maxHeight:`${g}px`,overflowY:`auto`}:void 0,children:l.map(r=>(0,i.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,i.jsx)(n.RadioGroupItem,{value:String(r.value),id:`${t}-${r.value}`,disabled:p||r.disabled,className:w[c]}),(0,i.jsx)(e.Label,{htmlFor:`${t}-${r.value}`,className:`cursor-pointer font-normal`,children:r.label})]},String(r.value)))});return(0,i.jsx)(t.FormField,{control:o,name:a,rules:x,render:({field:e})=>(0,i.jsxs)(t.FormItem,{className:y,children:[s&&(0,i.jsxs)(t.FormLabel,{children:[s,b&&(0,i.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,i.jsx)(t.FormControl,{children:T(a,d??e.value,e.onChange)}),!v&&(0,i.jsx)(t.FormMessage,{})]})})}exports.FormRadio=a;
1
+ const e=require("./index4.cjs");let t=require("react/jsx-runtime");function n({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`skeleton`,className:e.cn(`bg-accent animate-pulse rounded-md`,n),...r})}exports.Skeleton=n;
package/dist/index107.js CHANGED
@@ -1,161 +1,35 @@
1
- import { Button as e } from "./index6.js";
2
- import { FileUploadDropzone as t, FileUploadItem as n, FileUploadItemDelete as r, FileUploadItemMetadata as i, FileUploadItemPreview as a, FileUploadItemProgress as o, FileUploadList as s, FileUploadRoot as c, useStore as l } from "./index16.js";
3
- import { CameraIcon as u, CloudUploadIcon as d, Trash2Icon as f } from "lucide-react";
4
- import { useEffect as p, useRef as m } from "react";
5
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
6
- //#region src/Form/FormFileUpload/FileUpload.tsx
7
- function v({ onChange: e, autoUpload: t, maxFiles: n }) {
8
- let r = l((e) => e), i = m(null);
9
- return p(() => {
10
- if (!e) return;
11
- let a = Array.from(r.files.values()), o = (() => {
12
- if (t) {
13
- let e = a.filter((e) => e.status === "success").map((e) => e.file.uploadedUrl).filter((e) => !!e);
14
- return n === 1 ? e.length > 0 ? e[e.length - 1] : null : e;
15
- }
16
- let e = a.map((e) => e.file);
17
- return n === 1 ? e.length > 0 ? e[e.length - 1] : null : e;
18
- })(), s = i.current;
19
- (t ? JSON.stringify(s) === JSON.stringify(o) : Array.isArray(o) && Array.isArray(s) ? o.length === s.length && o.every((e, t) => e === s[t]) : o === s) || (i.current = o, e(o));
20
- }, [
21
- r,
22
- t,
23
- n,
24
- e
25
- ]), null;
1
+ import { cn as e } from "./index3.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ import * as r from "@radix-ui/react-tooltip";
5
+ //#region src/ui/tooltip.tsx
6
+ function i({ delayDuration: e = 0, ...n }) {
7
+ return /* @__PURE__ */ t(r.Provider, {
8
+ "data-slot": "tooltip-provider",
9
+ delayDuration: e,
10
+ ...n
11
+ });
26
12
  }
27
- function y(e, t = "") {
28
- let n = e.split("/").pop()?.split("?")[0] || "file", r = n.split(".").pop()?.toLowerCase(), i = r && {
29
- jpg: "image/jpeg",
30
- jpeg: "image/jpeg",
31
- png: "image/png",
32
- gif: "image/gif",
33
- webp: "image/webp"
34
- }[r];
35
- i ||= t.includes("image") ? "image/jpeg" : "application/octet-stream";
36
- let a = new File([""], n, { type: i });
37
- return a.isUploadedUrl = !0, a.uploadedUrl = e, a;
13
+ function a({ ...e }) {
14
+ return /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(r.Root, {
15
+ "data-slot": "tooltip",
16
+ ...e
17
+ }) });
38
18
  }
39
- function b({ value: l, onChange: p, autoUpload: m = !1, uploadFile: b, maxFiles: x = 1, maxSize: S = 1024 * 1024 * 5, accept: C = "image/*", disabled: w, className: T, variant: E = "default" }) {
40
- let D = (Array.isArray(l) ? l : l ? [l] : []).map((e) => e instanceof File ? e : typeof e == "string" ? y(e, C) : e);
41
- return /* @__PURE__ */ _(c, {
42
- value: D,
43
- maxFiles: E === "avatar" ? 1 : x,
44
- maxSize: S,
45
- accept: C,
46
- disabled: w,
47
- onUpload: async (e, t) => {
48
- if (!m) {
49
- e.forEach((e) => t.onSuccess(e));
50
- return;
51
- }
52
- if (!b) {
53
- console.warn("uploadFile prop is required when autoUpload is true"), e.forEach((e) => t.onError(e, /* @__PURE__ */ Error("Missing uploadFile function")));
54
- return;
55
- }
56
- await Promise.all(e.map(async (e) => {
57
- let n = e;
58
- if (n.isUploadedUrl) {
59
- t.onSuccess(e);
60
- return;
61
- }
62
- try {
63
- t.onProgress(e, 20), n.uploadedUrl = await b(e), t.onProgress(e, 100), t.onSuccess(e);
64
- } catch (n) {
65
- t.onError(e, n instanceof Error ? n : /* @__PURE__ */ Error("Upload failed"));
66
- }
67
- }));
68
- },
69
- className: T,
70
- children: [/* @__PURE__ */ g(v, {
71
- onChange: p,
72
- autoUpload: m,
73
- maxFiles: E === "avatar" ? 1 : x
74
- }), E === "avatar" ? /* @__PURE__ */ _("div", {
75
- className: "flex flex-col items-center gap-2",
76
- children: [/* @__PURE__ */ g(t, {
77
- className: "group relative size-32 cursor-pointer overflow-hidden rounded-full border-2 border-dashed border-border p-0 hover:border-primary",
78
- children: D[0] ? /* @__PURE__ */ _(n, {
79
- value: D[0],
80
- className: "relative flex size-full flex-col rounded-none border-none p-0",
81
- children: [
82
- /* @__PURE__ */ g(a, {
83
- className: "size-full rounded-none border-none bg-transparent",
84
- render: (e) => {
85
- let t = e.uploadedUrl;
86
- return t ? /* @__PURE__ */ g("img", {
87
- src: t,
88
- alt: "Avatar",
89
- className: "size-full object-cover"
90
- }) : /* @__PURE__ */ g("img", {
91
- src: URL.createObjectURL(e),
92
- alt: "Avatar",
93
- className: "size-full object-cover"
94
- });
95
- }
96
- }),
97
- /* @__PURE__ */ _("div", {
98
- className: "absolute inset-0 flex flex-col items-center justify-center gap-1 bg-black/40 opacity-0 transition-opacity group-hover:opacity-100",
99
- children: [/* @__PURE__ */ g(u, { className: "size-6 text-white" }), /* @__PURE__ */ g("span", {
100
- className: "text-[10px] text-white",
101
- children: "Đổi ảnh"
102
- })]
103
- }),
104
- /* @__PURE__ */ g(o, {
105
- variant: "fill",
106
- className: "opacity-50"
107
- })
108
- ]
109
- }) : /* @__PURE__ */ _("div", {
110
- className: "flex size-full flex-col items-center justify-center gap-1 bg-accent text-muted-foreground transition-colors group-hover:bg-accent/80",
111
- children: [/* @__PURE__ */ g(u, { className: "size-6" }), /* @__PURE__ */ g("span", {
112
- className: "text-[10px]",
113
- children: "Tải lên"
114
- })]
115
- })
116
- }), /* @__PURE__ */ g("div", {
117
- className: "text-xs text-muted-foreground",
118
- children: S ? `Max ${Math.round(S / (1024 * 1024))}MB` : ""
119
- })]
120
- }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _(t, { children: [
121
- /* @__PURE__ */ g(d, { className: "h-10 w-10 text-muted-foreground" }),
122
- /* @__PURE__ */ g("p", {
123
- className: "text-sm font-medium",
124
- children: "Drag & drop files here, or click to select"
125
- }),
126
- /* @__PURE__ */ _("p", {
127
- className: "text-xs text-muted-foreground",
128
- children: [
129
- x > 1 ? `Up to ${x} files` : "1 file max",
130
- " ",
131
- S ? `(Max ${Math.round(S / (1024 * 1024))}MB)` : ""
132
- ]
133
- })
134
- ] }), /* @__PURE__ */ g(s, { children: D.map((t, s) => /* @__PURE__ */ _(n, {
135
- value: t,
136
- children: [
137
- /* @__PURE__ */ g(a, { render: (e, t) => {
138
- let n = e.uploadedUrl;
139
- return n && e.type.startsWith("image/") ? /* @__PURE__ */ g("img", {
140
- src: n,
141
- alt: e.name,
142
- className: "size-full object-cover"
143
- }) : t();
144
- } }),
145
- /* @__PURE__ */ g(i, {}),
146
- /* @__PURE__ */ g(o, { className: "absolute bottom-0 left-0 right-0 h-1 w-auto rounded-none" }),
147
- /* @__PURE__ */ g(r, {
148
- asChild: !0,
149
- children: /* @__PURE__ */ g(e, {
150
- variant: "ghost",
151
- size: "icon",
152
- className: "h-8 w-8 shrink-0 text-muted-foreground hover:text-destructive",
153
- children: /* @__PURE__ */ g(f, { className: "h-4 w-4" })
154
- })
155
- })
156
- ]
157
- }, s)) })] })]
19
+ function o({ ...e }) {
20
+ return /* @__PURE__ */ t(r.Trigger, {
21
+ "data-slot": "tooltip-trigger",
22
+ ...e
158
23
  });
159
24
  }
25
+ function s({ className: i, sideOffset: a = 0, children: o, ...s }) {
26
+ return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ n(r.Content, {
27
+ "data-slot": "tooltip-content",
28
+ sideOffset: a,
29
+ className: e("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", i),
30
+ ...s,
31
+ children: [o, /* @__PURE__ */ t(r.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
32
+ }) });
33
+ }
160
34
  //#endregion
161
- export { b as FileUpload };
35
+ export { a as Tooltip, s as TooltipContent, i as TooltipProvider, o as TooltipTrigger };
package/dist/index108.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index7.cjs"),t=require("./index17.cjs");let n=require("lucide-react"),r=require("react"),i=require("react/jsx-runtime");function a({onChange:e,autoUpload:n,maxFiles:i}){let a=t.useStore(e=>e),o=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!e)return;let t=Array.from(a.files.values()),r=(()=>{if(n){let e=t.filter(e=>e.status===`success`).map(e=>e.file.uploadedUrl).filter(e=>!!e);return i===1?e.length>0?e[e.length-1]:null:e}let e=t.map(e=>e.file);return i===1?e.length>0?e[e.length-1]:null:e})(),s=o.current;(n?JSON.stringify(s)===JSON.stringify(r):Array.isArray(r)&&Array.isArray(s)?r.length===s.length&&r.every((e,t)=>e===s[t]):r===s)||(o.current=r,e(r))},[a,n,i,e]),null}function o(e,t=``){let n=e.split(`/`).pop()?.split(`?`)[0]||`file`,r=n.split(`.`).pop()?.toLowerCase(),i=r&&{jpg:`image/jpeg`,jpeg:`image/jpeg`,png:`image/png`,gif:`image/gif`,webp:`image/webp`}[r];i||=t.includes(`image`)?`image/jpeg`:`application/octet-stream`;let a=new File([``],n,{type:i});return a.isUploadedUrl=!0,a.uploadedUrl=e,a}function s({value:r,onChange:s,autoUpload:c=!1,uploadFile:l,maxFiles:u=1,maxSize:d=1024*1024*5,accept:f=`image/*`,disabled:p,className:m,variant:h=`default`}){let g=(Array.isArray(r)?r:r?[r]:[]).map(e=>e instanceof File?e:typeof e==`string`?o(e,f):e);return(0,i.jsxs)(t.FileUploadRoot,{value:g,maxFiles:h===`avatar`?1:u,maxSize:d,accept:f,disabled:p,onUpload:async(e,t)=>{if(!c){e.forEach(e=>t.onSuccess(e));return}if(!l){console.warn(`uploadFile prop is required when autoUpload is true`),e.forEach(e=>t.onError(e,Error(`Missing uploadFile function`)));return}await Promise.all(e.map(async e=>{let n=e;if(n.isUploadedUrl){t.onSuccess(e);return}try{t.onProgress(e,20),n.uploadedUrl=await l(e),t.onProgress(e,100),t.onSuccess(e)}catch(n){t.onError(e,n instanceof Error?n:Error(`Upload failed`))}}))},className:m,children:[(0,i.jsx)(a,{onChange:s,autoUpload:c,maxFiles:h===`avatar`?1:u}),h===`avatar`?(0,i.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,i.jsx)(t.FileUploadDropzone,{className:`group relative size-32 cursor-pointer overflow-hidden rounded-full border-2 border-dashed border-border p-0 hover:border-primary`,children:g[0]?(0,i.jsxs)(t.FileUploadItem,{value:g[0],className:`relative flex size-full flex-col rounded-none border-none p-0`,children:[(0,i.jsx)(t.FileUploadItemPreview,{className:`size-full rounded-none border-none bg-transparent`,render:e=>{let t=e.uploadedUrl;return t?(0,i.jsx)(`img`,{src:t,alt:`Avatar`,className:`size-full object-cover`}):(0,i.jsx)(`img`,{src:URL.createObjectURL(e),alt:`Avatar`,className:`size-full object-cover`})}}),(0,i.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1 bg-black/40 opacity-0 transition-opacity group-hover:opacity-100`,children:[(0,i.jsx)(n.CameraIcon,{className:`size-6 text-white`}),(0,i.jsx)(`span`,{className:`text-[10px] text-white`,children:`Đổi ảnh`})]}),(0,i.jsx)(t.FileUploadItemProgress,{variant:`fill`,className:`opacity-50`})]}):(0,i.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-1 bg-accent text-muted-foreground transition-colors group-hover:bg-accent/80`,children:[(0,i.jsx)(n.CameraIcon,{className:`size-6`}),(0,i.jsx)(`span`,{className:`text-[10px]`,children:`Tải lên`})]})}),(0,i.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:d?`Max ${Math.round(d/(1024*1024))}MB`:``})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.FileUploadDropzone,{children:[(0,i.jsx)(n.CloudUploadIcon,{className:`h-10 w-10 text-muted-foreground`}),(0,i.jsx)(`p`,{className:`text-sm font-medium`,children:`Drag & drop files here, or click to select`}),(0,i.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[u>1?`Up to ${u} files`:`1 file max`,` `,d?`(Max ${Math.round(d/(1024*1024))}MB)`:``]})]}),(0,i.jsx)(t.FileUploadList,{children:g.map((r,a)=>(0,i.jsxs)(t.FileUploadItem,{value:r,children:[(0,i.jsx)(t.FileUploadItemPreview,{render:(e,t)=>{let n=e.uploadedUrl;return n&&e.type.startsWith(`image/`)?(0,i.jsx)(`img`,{src:n,alt:e.name,className:`size-full object-cover`}):t()}}),(0,i.jsx)(t.FileUploadItemMetadata,{}),(0,i.jsx)(t.FileUploadItemProgress,{className:`absolute bottom-0 left-0 right-0 h-1 w-auto rounded-none`}),(0,i.jsx)(t.FileUploadItemDelete,{asChild:!0,children:(0,i.jsx)(e.Button,{variant:`ghost`,size:`icon`,className:`h-8 w-8 shrink-0 text-muted-foreground hover:text-destructive`,children:(0,i.jsx)(n.Trash2Icon,{className:`h-4 w-4`})})})]},a))})]})]})}exports.FileUpload=s;
1
+ const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime"),i=require("@radix-ui/react-tooltip");i=e.__toESM(i,1);function a({delayDuration:e=0,...t}){return(0,r.jsx)(i.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function o({...e}){return(0,r.jsx)(a,{children:(0,r.jsx)(i.Root,{"data-slot":`tooltip`,...e})})}function s({...e}){return(0,r.jsx)(i.Trigger,{"data-slot":`tooltip-trigger`,...e})}function c({className:e,sideOffset:n=0,children:a,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsxs)(i.Content,{"data-slot":`tooltip-content`,sideOffset:n,className:t.cn(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,e),...o,children:[a,(0,r.jsx)(i.Arrow,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}exports.Tooltip=o,exports.TooltipContent=c,exports.TooltipProvider=a,exports.TooltipTrigger=s;