@vlrc-fe/components 2.0.1 → 2.0.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 (469) hide show
  1. package/CHANGELOG.md +44 -29
  2. package/LICENSE +21 -0
  3. package/README.md +228 -141
  4. package/dist/ConfirmModal.d.ts +1 -1
  5. package/dist/ConfirmModal.d.ts.map +1 -1
  6. package/dist/DataTable/DataTable.d.ts +1 -1
  7. package/dist/DataTable/DataTable.d.ts.map +1 -1
  8. package/dist/DataTable/components/DataTablePagination.d.ts +1 -1
  9. package/dist/DataTable/components/DataTablePagination.d.ts.map +1 -1
  10. package/dist/DataTable/components/DataTableRowActions.d.ts +1 -1
  11. package/dist/DataTable/components/DataTableRowActions.d.ts.map +1 -1
  12. package/dist/DataTable/components/DataTableTable.d.ts +1 -1
  13. package/dist/DataTable/components/DataTableTable.d.ts.map +1 -1
  14. package/dist/DataTable/components/DataTableToolbar.d.ts +1 -1
  15. package/dist/DataTable/components/DataTableToolbar.d.ts.map +1 -1
  16. package/dist/DataTable/components/DataTableViewOptions.d.ts +1 -1
  17. package/dist/DataTable/components/DataTableViewOptions.d.ts.map +1 -1
  18. package/dist/DataTable/index.d.ts +1 -1
  19. package/dist/DataTable/index.d.ts.map +1 -1
  20. package/dist/DataTable/render/createColumns.d.ts.map +1 -1
  21. package/dist/Form/Form.d.ts +1 -1
  22. package/dist/Form/Form.d.ts.map +1 -1
  23. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +1 -1
  24. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
  25. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +1 -1
  26. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
  27. package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
  28. package/dist/Form/FormDatePicker/index.d.ts +2 -2
  29. package/dist/Form/FormDatePicker/index.d.ts.map +1 -1
  30. package/dist/Form/FormFileUpload/FileUpload.d.ts +1 -1
  31. package/dist/Form/FormFileUpload/FileUpload.d.ts.map +1 -1
  32. package/dist/Form/FormNumberInput/FormNumberInput.d.ts.map +1 -1
  33. package/dist/Form/FormNumberInput/StepperControls.d.ts +1 -1
  34. package/dist/Form/FormNumberInput/StepperControls.d.ts.map +1 -1
  35. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts +1 -1
  36. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
  37. package/dist/Form/FormRadioGroup/FormRadio.d.ts +1 -1
  38. package/dist/Form/FormRadioGroup/FormRadio.d.ts.map +1 -1
  39. package/dist/Form/FormSelect/FormSelect.d.ts.map +1 -1
  40. package/dist/Form/FormSelect/useFormSelect.d.ts.map +1 -1
  41. package/dist/Icons/Icons.d.ts.map +1 -1
  42. package/dist/Modal.d.ts +1 -1
  43. package/dist/Modal.d.ts.map +1 -1
  44. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  45. package/dist/MultiSelect/renderers.d.ts +3 -3
  46. package/dist/MultiSelect/renderers.d.ts.map +1 -1
  47. package/dist/MultiSelect/type.d.ts.map +1 -1
  48. package/dist/MultiSelect/utils.d.ts.map +1 -1
  49. package/dist/Select/BaseSelect.d.ts.map +1 -1
  50. package/dist/Select/MultiSelectTags.d.ts +1 -1
  51. package/dist/Select/MultiSelectTags.d.ts.map +1 -1
  52. package/dist/index.cjs +1 -1
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +6 -6
  55. package/dist/index10.cjs +1 -1
  56. package/dist/index10.js +2 -3
  57. package/dist/index100.js +1 -2
  58. package/dist/index101.cjs +1 -1
  59. package/dist/index101.js +1 -2
  60. package/dist/index102.js +1 -2
  61. package/dist/index103.cjs +1 -1
  62. package/dist/index103.js +373 -383
  63. package/dist/index104.js +1 -2
  64. package/dist/index105.js +1 -2
  65. package/dist/index106.js +1 -2
  66. package/dist/index107.js +1 -2
  67. package/dist/index108.js +1 -2
  68. package/dist/index109.js +1 -2
  69. package/dist/index11.cjs +1 -1
  70. package/dist/index11.js +6 -7
  71. package/dist/index110.cjs +1 -1
  72. package/dist/index110.js +47 -49
  73. package/dist/index111.js +1 -2
  74. package/dist/index112.cjs +1 -1
  75. package/dist/index112.js +17 -16
  76. package/dist/index113.cjs +1 -1
  77. package/dist/index113.js +4 -5
  78. package/dist/index114.js +1 -2
  79. package/dist/index115.js +1 -2
  80. package/dist/index116.cjs +1 -1
  81. package/dist/index116.js +3 -4
  82. package/dist/index117.cjs +1 -1
  83. package/dist/index117.js +2 -3
  84. package/dist/index118.js +1 -2
  85. package/dist/index119.cjs +1 -1
  86. package/dist/index119.js +4 -5
  87. package/dist/index12.js +1 -2
  88. package/dist/index120.cjs +1 -1
  89. package/dist/index120.js +2 -3
  90. package/dist/index121.js +1 -2
  91. package/dist/index122.cjs +1 -1
  92. package/dist/index122.js +1 -2
  93. package/dist/index123.js +1 -2
  94. package/dist/index124.cjs +1 -1
  95. package/dist/index124.js +4 -5
  96. package/dist/index125.cjs +1 -1
  97. package/dist/index125.js +14 -15
  98. package/dist/index126.js +1 -2
  99. package/dist/index127.js +1 -2
  100. package/dist/index128.js +1 -2
  101. package/dist/index129.js +1 -2
  102. package/dist/index13.cjs +1 -1
  103. package/dist/index13.js +2 -3
  104. package/dist/index130.cjs +1 -1
  105. package/dist/index130.js +2 -7
  106. package/dist/index131.js +1 -2
  107. package/dist/index132.js +1 -2
  108. package/dist/index133.cjs +1 -1
  109. package/dist/index133.js +2 -3
  110. package/dist/index134.js +1 -2
  111. package/dist/index135.js +1 -2
  112. package/dist/index136.js +1 -2
  113. package/dist/index137.cjs +1 -1
  114. package/dist/index137.js +13 -12
  115. package/dist/index138.js +1 -2
  116. package/dist/index139.js +1 -2
  117. package/dist/index14.cjs +1 -1
  118. package/dist/index14.js +1 -2
  119. package/dist/index140.js +1 -2
  120. package/dist/index141.js +1 -2
  121. package/dist/index142.js +1 -2
  122. package/dist/index143.cjs +1 -1
  123. package/dist/index143.js +2 -3
  124. package/dist/index144.js +1 -2
  125. package/dist/index145.js +1 -2
  126. package/dist/index146.js +1 -2
  127. package/dist/index147.js +1 -2
  128. package/dist/index148.cjs +1 -1
  129. package/dist/index148.js +5 -6
  130. package/dist/index149.cjs +1 -1
  131. package/dist/index149.js +2 -3
  132. package/dist/index15.cjs +1 -1
  133. package/dist/index15.js +4 -5
  134. package/dist/index150.cjs +1 -1
  135. package/dist/index150.js +2 -3
  136. package/dist/index151.js +1 -2
  137. package/dist/index152.cjs +1 -1
  138. package/dist/index152.js +3 -4
  139. package/dist/index153.cjs +1 -1
  140. package/dist/index153.js +2 -3
  141. package/dist/index154.js +1 -2
  142. package/dist/index155.js +1 -2
  143. package/dist/index156.js +0 -1
  144. package/dist/index157.js +0 -1
  145. package/dist/index158.js +0 -1
  146. package/dist/index159.cjs +1 -1
  147. package/dist/index159.js +2 -3
  148. package/dist/index16.js +1 -2
  149. package/dist/index160.js +1 -2
  150. package/dist/index161.js +0 -1
  151. package/dist/index162.js +1 -2
  152. package/dist/index163.js +0 -1
  153. package/dist/index164.js +0 -1
  154. package/dist/index165.cjs +1 -1
  155. package/dist/index165.js +2 -3
  156. package/dist/index166.cjs +1 -1
  157. package/dist/index166.js +2 -3
  158. package/dist/index167.cjs +1 -1
  159. package/dist/index167.js +3 -4
  160. package/dist/index168.cjs +1 -1
  161. package/dist/index168.js +2 -3
  162. package/dist/index169.cjs +1 -1
  163. package/dist/index169.js +2 -3
  164. package/dist/index17.cjs +1 -1
  165. package/dist/index17.js +1 -2
  166. package/dist/index170.cjs +1 -1
  167. package/dist/index170.js +2 -3
  168. package/dist/index171.cjs +1 -1
  169. package/dist/index171.js +3 -4
  170. package/dist/index172.cjs +1 -1
  171. package/dist/index172.js +2 -3
  172. package/dist/index173.cjs +1 -1
  173. package/dist/index173.js +2 -3
  174. package/dist/index174.cjs +1 -1
  175. package/dist/index174.js +2 -3
  176. package/dist/index175.cjs +1 -1
  177. package/dist/index175.js +2 -3
  178. package/dist/index176.cjs +1 -1
  179. package/dist/index176.js +3 -4
  180. package/dist/index177.cjs +1 -1
  181. package/dist/index177.js +3 -4
  182. package/dist/index178.cjs +1 -1
  183. package/dist/index178.js +3 -4
  184. package/dist/index179.cjs +1 -1
  185. package/dist/index179.js +3 -4
  186. package/dist/index18.cjs +1 -1
  187. package/dist/index18.js +2 -3
  188. package/dist/index180.js +1 -2
  189. package/dist/index181.cjs +1 -1
  190. package/dist/index181.js +3 -4
  191. package/dist/index182.cjs +1 -1
  192. package/dist/index182.js +12 -6
  193. package/dist/index183.cjs +1 -1
  194. package/dist/index183.js +2 -5
  195. package/dist/index184.js +1 -2
  196. package/dist/index185.cjs +1 -1
  197. package/dist/index185.js +2 -3
  198. package/dist/index186.cjs +1 -1
  199. package/dist/index186.js +6 -4
  200. package/dist/index187.cjs +1 -1
  201. package/dist/index187.js +2 -3
  202. package/dist/index188.cjs +1 -1
  203. package/dist/index188.js +2 -3
  204. package/dist/index189.cjs +1 -1
  205. package/dist/index189.js +2 -3
  206. package/dist/index19.cjs +1 -1
  207. package/dist/index19.js +3 -4
  208. package/dist/index190.cjs +1 -1
  209. package/dist/index190.js +5 -6
  210. package/dist/index191.cjs +1 -1
  211. package/dist/index191.js +3 -4
  212. package/dist/index192.cjs +2 -2
  213. package/dist/index192.js +17 -23
  214. package/dist/index193.js +1 -2
  215. package/dist/index194.js +1 -2
  216. package/dist/index195.js +1 -2
  217. package/dist/index196.js +1 -2
  218. package/dist/index197.js +1 -2
  219. package/dist/index198.cjs +1 -1
  220. package/dist/index198.js +17 -14
  221. package/dist/index199.cjs +1 -1
  222. package/dist/index199.js +2 -3
  223. package/dist/index2.cjs +1 -1
  224. package/dist/index2.js +1 -2
  225. package/dist/index20.js +1 -2
  226. package/dist/index200.cjs +1 -1
  227. package/dist/index200.js +2 -3
  228. package/dist/index201.js +1 -2
  229. package/dist/index202.cjs +1 -1
  230. package/dist/index202.js +19 -31
  231. package/dist/index203.cjs +1 -1
  232. package/dist/index203.js +2 -3
  233. package/dist/index204.cjs +1 -1
  234. package/dist/index204.js +2 -3
  235. package/dist/index21.js +1 -2
  236. package/dist/index22.js +1 -2
  237. package/dist/index23.cjs +1 -1
  238. package/dist/index23.js +1 -2
  239. package/dist/index24.js +1 -2
  240. package/dist/index25.cjs +1 -1
  241. package/dist/index25.js +2 -3
  242. package/dist/index26.cjs +1 -1
  243. package/dist/index26.js +7 -7
  244. package/dist/index27.cjs +1 -1
  245. package/dist/index27.js +5 -5
  246. package/dist/index28.cjs +1 -1
  247. package/dist/index28.js +3 -4
  248. package/dist/index29.js +1 -2
  249. package/dist/index3.js +1 -2
  250. package/dist/index30.cjs +1 -1
  251. package/dist/index30.js +2 -3
  252. package/dist/index31.cjs +1 -1
  253. package/dist/index31.js +3 -4
  254. package/dist/index32.cjs +1 -1
  255. package/dist/index32.js +4 -4
  256. package/dist/index33.cjs +1 -1
  257. package/dist/index33.js +2 -3
  258. package/dist/index34.cjs +1 -1
  259. package/dist/index34.js +3 -4
  260. package/dist/index35.js +1 -2
  261. package/dist/index36.js +1 -2
  262. package/dist/index37.js +1 -2
  263. package/dist/index38.cjs +1 -1
  264. package/dist/index38.js +11 -11
  265. package/dist/index39.cjs +1 -1
  266. package/dist/index39.js +2 -3
  267. package/dist/index4.cjs +1 -1
  268. package/dist/index4.js +3 -4
  269. package/dist/index40.cjs +1 -1
  270. package/dist/index40.js +2 -3
  271. package/dist/index41.cjs +1 -1
  272. package/dist/index41.js +1 -2
  273. package/dist/index42.cjs +1 -1
  274. package/dist/index42.js +2 -3
  275. package/dist/index43.cjs +1 -1
  276. package/dist/index43.js +6 -9
  277. package/dist/index44.cjs +1 -1
  278. package/dist/index44.js +4 -4
  279. package/dist/index45.cjs +1 -1
  280. package/dist/index45.js +3 -4
  281. package/dist/index46.cjs +1 -1
  282. package/dist/index46.js +57 -58
  283. package/dist/index47.cjs +1 -1
  284. package/dist/index47.js +4 -4
  285. package/dist/index48.cjs +1 -1
  286. package/dist/index48.js +39 -40
  287. package/dist/index49.cjs +1 -1
  288. package/dist/index49.js +2 -3
  289. package/dist/index5.js +1 -2
  290. package/dist/index50.cjs +1 -1
  291. package/dist/index50.js +2 -3
  292. package/dist/index51.cjs +1 -1
  293. package/dist/index51.js +6 -7
  294. package/dist/index52.cjs +1 -1
  295. package/dist/index52.js +3 -4
  296. package/dist/index53.js +1 -2
  297. package/dist/index54.js +1 -2
  298. package/dist/index55.js +1 -2
  299. package/dist/index56.js +1 -2
  300. package/dist/index57.js +1 -2
  301. package/dist/index58.js +1 -2
  302. package/dist/index59.js +1 -2
  303. package/dist/index6.js +1 -2
  304. package/dist/index60.js +1 -2
  305. package/dist/index61.js +1 -2
  306. package/dist/index62.js +3 -5
  307. package/dist/index63.js +1 -2
  308. package/dist/index64.js +1 -2
  309. package/dist/index65.js +1 -2
  310. package/dist/index66.cjs +1 -1
  311. package/dist/index66.js +1 -1
  312. package/dist/index67.cjs +1 -1
  313. package/dist/index67.js +2 -3
  314. package/dist/index68.cjs +1 -1
  315. package/dist/index68.js +2 -3
  316. package/dist/index69.cjs +1 -1
  317. package/dist/index69.js +1 -1
  318. package/dist/index7.js +1 -2
  319. package/dist/index70.js +1 -2
  320. package/dist/index71.js +1 -2
  321. package/dist/index72.cjs +1 -1
  322. package/dist/index72.js +5 -9
  323. package/dist/index73.js +1 -2
  324. package/dist/index74.js +1 -2
  325. package/dist/index75.cjs +1 -1
  326. package/dist/index75.js +76 -74
  327. package/dist/index76.cjs +1 -1
  328. package/dist/index76.js +74 -75
  329. package/dist/index77.cjs +1 -1
  330. package/dist/index77.js +2 -3
  331. package/dist/index78.cjs +2 -2
  332. package/dist/index78.js +108 -134
  333. package/dist/index79.js +1 -2
  334. package/dist/index8.cjs +1 -1
  335. package/dist/index8.js +4 -5
  336. package/dist/index80.js +1 -2
  337. package/dist/index81.js +1 -2
  338. package/dist/index82.js +1 -2
  339. package/dist/index83.js +1 -2
  340. package/dist/index84.cjs +1 -1
  341. package/dist/index84.js +12 -8
  342. package/dist/index85.cjs +1 -1
  343. package/dist/index85.js +3 -4
  344. package/dist/index86.cjs +1 -1
  345. package/dist/index86.js +1 -2
  346. package/dist/index87.cjs +1 -1
  347. package/dist/index87.js +5 -6
  348. package/dist/index88.cjs +1 -1
  349. package/dist/index88.js +2 -3
  350. package/dist/index89.js +1 -2
  351. package/dist/index9.cjs +1 -1
  352. package/dist/index9.js +2 -3
  353. package/dist/index90.cjs +2 -2
  354. package/dist/index90.js +7 -16
  355. package/dist/index91.cjs +1 -1
  356. package/dist/index91.js +2 -3
  357. package/dist/index92.js +1 -2
  358. package/dist/index93.cjs +1 -1
  359. package/dist/index93.js +85 -86
  360. package/dist/index94.cjs +1 -1
  361. package/dist/index94.js +2 -3
  362. package/dist/index95.cjs +1 -1
  363. package/dist/index95.js +1 -2
  364. package/dist/index96.cjs +1 -1
  365. package/dist/index96.js +3 -4
  366. package/dist/index97.cjs +1 -1
  367. package/dist/index97.js +121 -117
  368. package/dist/index98.cjs +1 -1
  369. package/dist/index98.js +2 -3
  370. package/dist/index99.js +1 -2
  371. package/dist/ui/accordion.d.ts +2 -2
  372. package/dist/ui/accordion.d.ts.map +1 -1
  373. package/dist/ui/alert-dialog.d.ts.map +1 -1
  374. package/dist/ui/alert.d.ts.map +1 -1
  375. package/dist/ui/alert.test.d.ts +2 -0
  376. package/dist/ui/alert.test.d.ts.map +1 -0
  377. package/dist/ui/aspect-ratio.d.ts +1 -1
  378. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  379. package/dist/ui/avatar.d.ts +2 -2
  380. package/dist/ui/avatar.d.ts.map +1 -1
  381. package/dist/ui/badge.d.ts.map +1 -1
  382. package/dist/ui/badge.test.d.ts +2 -0
  383. package/dist/ui/badge.test.d.ts.map +1 -0
  384. package/dist/ui/breadcrumb.d.ts +8 -8
  385. package/dist/ui/breadcrumb.d.ts.map +1 -1
  386. package/dist/ui/button.d.ts.map +1 -1
  387. package/dist/ui/button.test.d.ts +2 -0
  388. package/dist/ui/button.test.d.ts.map +1 -0
  389. package/dist/ui/card.d.ts.map +1 -1
  390. package/dist/ui/card.test.d.ts +2 -0
  391. package/dist/ui/card.test.d.ts.map +1 -0
  392. package/dist/ui/carousel.d.ts +7 -7
  393. package/dist/ui/carousel.d.ts.map +1 -1
  394. package/dist/ui/checkbox.d.ts.map +1 -1
  395. package/dist/ui/checkbox.test.d.ts +2 -0
  396. package/dist/ui/checkbox.test.d.ts.map +1 -0
  397. package/dist/ui/collapsible.d.ts +1 -1
  398. package/dist/ui/collapsible.d.ts.map +1 -1
  399. package/dist/ui/command.d.ts +4 -4
  400. package/dist/ui/command.d.ts.map +1 -1
  401. package/dist/ui/context-menu.d.ts +4 -4
  402. package/dist/ui/context-menu.d.ts.map +1 -1
  403. package/dist/ui/dialog.d.ts.map +1 -1
  404. package/dist/ui/drawer.d.ts +4 -4
  405. package/dist/ui/drawer.d.ts.map +1 -1
  406. package/dist/ui/dropdown-menu.d.ts +4 -4
  407. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  408. package/dist/ui/field.d.ts +1 -1
  409. package/dist/ui/field.d.ts.map +1 -1
  410. package/dist/ui/file-upload.d.ts +1 -1
  411. package/dist/ui/file-upload.d.ts.map +1 -1
  412. package/dist/ui/form.d.ts +7 -7
  413. package/dist/ui/form.d.ts.map +1 -1
  414. package/dist/ui/hover-card.d.ts +2 -2
  415. package/dist/ui/hover-card.d.ts.map +1 -1
  416. package/dist/ui/input-otp.d.ts +5 -5
  417. package/dist/ui/input-otp.d.ts.map +1 -1
  418. package/dist/ui/input.d.ts.map +1 -1
  419. package/dist/ui/input.test.d.ts +2 -0
  420. package/dist/ui/input.test.d.ts.map +1 -0
  421. package/dist/ui/item.d.ts +12 -12
  422. package/dist/ui/item.d.ts.map +1 -1
  423. package/dist/ui/label.test.d.ts +2 -0
  424. package/dist/ui/label.test.d.ts.map +1 -0
  425. package/dist/ui/menubar.d.ts +4 -4
  426. package/dist/ui/menubar.d.ts.map +1 -1
  427. package/dist/ui/navigation-menu.d.ts +2 -2
  428. package/dist/ui/navigation-menu.d.ts.map +1 -1
  429. package/dist/ui/pagination.d.ts +7 -7
  430. package/dist/ui/pagination.d.ts.map +1 -1
  431. package/dist/ui/progress.d.ts.map +1 -1
  432. package/dist/ui/radio-group.d.ts.map +1 -1
  433. package/dist/ui/resizable.d.ts +2 -2
  434. package/dist/ui/resizable.d.ts.map +1 -1
  435. package/dist/ui/scroll-area.d.ts +2 -2
  436. package/dist/ui/scroll-area.d.ts.map +1 -1
  437. package/dist/ui/select.d.ts +3 -3
  438. package/dist/ui/select.d.ts.map +1 -1
  439. package/dist/ui/separator.test.d.ts +2 -0
  440. package/dist/ui/separator.test.d.ts.map +1 -0
  441. package/dist/ui/sheet.d.ts +5 -5
  442. package/dist/ui/sheet.d.ts.map +1 -1
  443. package/dist/ui/sidebar.d.ts +31 -31
  444. package/dist/ui/sidebar.d.ts.map +1 -1
  445. package/dist/ui/skeleton.test.d.ts +2 -0
  446. package/dist/ui/skeleton.test.d.ts.map +1 -0
  447. package/dist/ui/slider.d.ts.map +1 -1
  448. package/dist/ui/sonner.d.ts +1 -1
  449. package/dist/ui/sonner.d.ts.map +1 -1
  450. package/dist/ui/spinner.test.d.ts +2 -0
  451. package/dist/ui/spinner.test.d.ts.map +1 -0
  452. package/dist/ui/switch.d.ts.map +1 -1
  453. package/dist/ui/switch.test.d.ts +2 -0
  454. package/dist/ui/switch.test.d.ts.map +1 -0
  455. package/dist/ui/table.d.ts +1 -1
  456. package/dist/ui/table.d.ts.map +1 -1
  457. package/dist/ui/table.test.d.ts +2 -0
  458. package/dist/ui/table.test.d.ts.map +1 -0
  459. package/dist/ui/tabs.d.ts +2 -2
  460. package/dist/ui/tabs.d.ts.map +1 -1
  461. package/dist/ui/textarea.d.ts.map +1 -1
  462. package/dist/ui/textarea.test.d.ts +2 -0
  463. package/dist/ui/textarea.test.d.ts.map +1 -0
  464. package/dist/ui/toggle-group.d.ts +4 -4
  465. package/dist/ui/toggle-group.d.ts.map +1 -1
  466. package/dist/ui/toggle.d.ts +3 -3
  467. package/dist/ui/toggle.d.ts.map +1 -1
  468. package/package.json +88 -18
  469. package/MIGRATION_GUIDE.md +0 -121
package/CHANGELOG.md CHANGED
@@ -2,32 +2,47 @@
2
2
 
3
3
  All notable changes to `@vlrc-fe/components` will be documented in this file.
4
4
 
5
- ## [2.0.0] - StyleX Engine Migration (Meta StyleX & CSS-in-JS)
6
-
7
- ### 🚀 Major Highlights
8
- - **Replaced Tailwind CSS with Meta StyleX**: Transitioned from runtime utility class string concatenation (`tailwind-merge`, `clsx`, `class-variance-authority`) to compile-time atomic CSS-in-JS powered by Meta StyleX.
9
- - **Zero Runtime Style Injections**: All styles are parsed at build-time using `@stylexjs/unplugin` and emitted into `dist/assets/stylex.css` using CSS `@layer` priorities.
10
- - **Deterministic Specificity**: Eliminated CSS precedence issues and class collision bugs. The last style passed in `stylex.props(...)` deterministically wins without needing `!important`.
11
- - **Theme Preservation**: Created `theme/tokens.stylex.ts` using `stylex.defineVars()`, binding directly to existing CSS custom properties (`--background`, `--primary`, `--card`, etc.). All dynamic themes (`light`, `dark`, `pink`, `lavender`) in the consumer project (`vlrc`) remain 100% compatible.
12
- - **Modern UI Primitive Foundation**: Aligned with the [shadcn-cssinjs](https://www.shadcn-cssinjs.com/) ecosystem, maintaining full Radix UI headless accessibility while replacing Tailwind class strings with StyleX style definitions.
13
-
14
- ### ⚠️ Breaking Changes & API Updates
15
- - **`sx` Prop Introduced**: Components now accept `sx?: stylex.StyleXStyles` for deterministic type-safe styling.
16
- - **Backward Compatibility**: `className` is still accepted and merged with StyleX atomic classes during the transition, but is deprecated in favor of `sx`.
17
- - **CSS Import Required in Consumer App**: Consumers must import `@vlrc-fe/components/stylex.css` or configure `@stylexjs/unplugin` in their bundler.
18
- - **Removal of CVA**: `class-variance-authority` is deprecated; component variants are now statically typed StyleX records.
19
-
20
- ### 📦 Component Upgrades
21
- - `Button`: Ported with all variants (`default`, `destructive`, `outline`, `secondary`, `ghost`, `link`, `accent`, `accent-cta`, `gradient`, `gradient-success`) and sizes (`default`, `sm`, `lg`, `xl`, `2xl`, `icon`, `icon-sm`, `icon-lg`).
22
- - `Input` & `Textarea`: Ported with full pseudo-class and invalid state styling.
23
- - `Badge`: Ported with variant styles (`default`, `secondary`, `destructive`, `outline`).
24
- - `Card`: Ported with variants (`default`, `glass`, `glass-strong`, `elevated`, `elevated-glass`, `auth`).
25
- - `Dialog` & `AlertDialog`: Ported with smooth keyframe animations (`fadeIn`, `scaleIn`) and modal layouts.
26
- - `Popover` & `Tooltip`: Ported with keyframe scale animations.
27
- - `Checkbox`, `Switch`, `RadioGroup`, `Slider`, `Progress`: Ported to atomic StyleX styles.
28
- - `Separator`, `Label`, `Skeleton`, `Spinner`: Ported with `stylex.keyframes` pulse and spin.
29
- - `Table`: Ported to clean StyleX table layout.
30
- - `DataTable`: Upgraded `DataTableToolbar`, `DataTablePagination`, `DataTableViewOptions`, `DataTableRowActions`, `createColumns`, and `defaults` to StyleX.
31
- - `FormBase` & `Form`: Upgraded layout, icon adornments, and validation indicators to StyleX.
32
- - `Modal` & `ConfirmModal`: Fully rewritten in StyleX with glassmorphic and themed alert containers.
33
- - `Select` & `MultiSelect`: Ported tags, popover menus, and option selectors to StyleX.
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [2.0.2] - 2026-11-06
10
+
11
+ ### Changed
12
+
13
+ - **Optional Peer Dependencies**: configured `peerDependenciesMeta` with optional flags for `recharts`, `vaul`, `embla-carousel-react`, `react-day-picker`, `date-fns`, `react-i18next`, `react-resizable-panels`, `sonner`, `input-otp`, `next-themes`, `react-number-format`, `class-variance-authority`, `clsx`, and `tailwind-merge`, eliminating unnecessary peer warnings for consumer apps.
14
+ - **Modern Tooling & Formatting**: migrated to `oxlint` and `oxfmt` across the monorepo, standardizing code quality, type annotations, and code formatting.
15
+ - **Vite 8 & Vitest 5 Toolchain**: updated build and test configurations to Vite 8.3 and Vitest 5.0 with full snapshot test coverage across UI primitives.
16
+ - **Package Metadata**: added complete public npm package metadata, repository references, and keywords.
17
+
18
+ ## [2.0.1] - 2025-01-15
19
+
20
+ ### Changed
21
+
22
+ - **Replaced Tailwind CSS with Meta StyleX**: migrated from runtime utility class concatenation (`tailwind-merge`, `clsx`, `class-variance-authority`) to compile-time atomic CSS-in-JS.
23
+ - **Zero runtime style injections**: all styles are parsed at build time using `@stylexjs/unplugin` and emitted into `dist/assets/stylex.css` with CSS `@layer` priorities.
24
+ - **Deterministic specificity**: eliminated CSS precedence issues and class collision bugs — the last style in `stylex.props(...)` deterministically wins without `!important`.
25
+ - **Theme tokens**: created `theme/tokens.stylex.ts` using `stylex.defineVars()`, binding to CSS custom properties (`--background`, `--primary`, `--card`, etc.). All dynamic themes remain compatible.
26
+
27
+ ### Breaking Changes
28
+
29
+ - **`sx` prop introduced**: components now accept `sx?: stylex.StyleXStyles` for type-safe styling overrides.
30
+ - **`className` deprecated**: still accepted for backwards compatibility but will be removed in a future major version.
31
+ - **CSS import required**: consumers must import `@vlrc-fe/components/stylex.css` or configure `@stylexjs/unplugin`.
32
+ - **CVA removed**: `class-variance-authority` is no longer used — variants are now statically typed StyleX records.
33
+
34
+ ### Component Upgrades
35
+
36
+ - `Button`: all variants and sizes ported to StyleX.
37
+ - `Input`, `Textarea`: full pseudo-class and invalid state styling.
38
+ - `Badge`: variant styles (`default`, `secondary`, `destructive`, `outline`).
39
+ - `Card`: variants (`default`, `glass`, `glass-strong`, `elevated`, `elevated-glass`, `auth`).
40
+ - `Dialog`, `AlertDialog`: keyframe animations (`fadeIn`, `scaleIn`).
41
+ - `Popover`, `Tooltip`: keyframe scale animations.
42
+ - `Checkbox`, `Switch`, `RadioGroup`, `Slider`, `Progress`: atomic StyleX styles.
43
+ - `Separator`, `Label`, `Skeleton`, `Spinner`: `stylex.keyframes` pulse and spin.
44
+ - `Table`: clean StyleX table layout.
45
+ - `DataTable`: toolbar, pagination, view options, row actions, column creators all ported.
46
+ - `FormBase`, `Form`: layout, icon adornments, and validation indicators.
47
+ - `Modal`, `ConfirmModal`: fully rewritten with glassmorphic and themed containers.
48
+ - `Select`, `MultiSelect`: tags, popover menus, and option selectors.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present VLRC Platform Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,193 +1,280 @@
1
1
  # @vlrc-fe/components
2
2
 
3
- ---
4
- ai_package_metadata:
5
- package_name: "@vlrc-fe/components"
6
- version: "workspace:*"
7
- conventions:
8
- import_hygiene:
9
- main_app: "Do NOT manually import. Let Vite auto-import handle it (src/types/auto-imports.d.ts)."
10
- local_packages: "Always use explicit relative or workspace imports. Packages compile without auto-imports."
11
- component_rules:
12
- props_typing: "Always declare props inline in the component signature. Avoid standalone interface/type Props for local components."
13
- wrapper_preference: "Always prefer Select and MultiSelect wrapper components over Radix UI/Shadcn primitives."
3
+ [![npm version](https://img.shields.io/npm/v/@vlrc-fe/components.svg?style=flat-square)](https://www.npmjs.com/package/@vlrc-fe/components)
4
+ [![React 19](https://img.shields.io/badge/React-19.3-blue.svg?style=flat-square)](https://react.dev/)
5
+ [![TypeScript 7](https://img.shields.io/badge/TypeScript-7.0-blue.svg?style=flat-square)](https://www.typescriptlang.org/)
6
+ [![StyleX](https://img.shields.io/badge/Styling-Meta%20StyleX-purple.svg?style=flat-square)](https://stylexjs.com/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](../../LICENSE)
8
+
9
+ Accessible, performant React UI component library built with **Meta StyleX**, **Radix UI**, and **React Hook Form**. Ships compile-time atomic CSS with zero runtime style injection.
10
+
11
+ - **npm**: [npmjs.com/package/@vlrc-fe/components](https://www.npmjs.com/package/@vlrc-fe/components)
12
+
14
13
  ---
15
14
 
16
- Reusable, optimized, and tree-shaken UI components built on top of **React 19**, **Meta StyleX** (compile-time atomic CSS-in-JS), and **Radix UI/Shadcn** primitives for the VLRC project monorepo.
15
+ ## Features
17
16
 
18
- > [!IMPORTANT]
19
- > **AUTO-IMPORT CONVENTION**: In the main web application (`src/`), **do not write explicit import statements** for any components in this package. They are dynamically parsed and registered by Vite into `src/types/auto-imports.d.ts`.
20
- > **EXPLICIT PACKAGE IMPORTS**: Inside independent packages (like `packages/components` or `packages/hooks`), **always** write explicit imports because packages are compiled standalone using `tsc`.
17
+ - **Meta StyleX** — compile-time atomic CSS-in-JS with deterministic specificity and zero runtime cost
18
+ - **Dynamic Theming** — design tokens (`colors`, `radii`, `textColors`) mapped to CSS custom properties, supporting light, dark, and custom themes
19
+ - **Accessible by Default** — built on WAI-ARIA compliant Radix UI primitives with keyboard navigation and screen reader support
20
+ - **Form System** — complete suite of form controls (`FormInput`, `FormSelect`, `FormMultiSelect`, `FormDatePicker`, `FormFileUpload`, `FormNumberInput`) integrated with React Hook Form
21
+ - **Data Table** — powerful `DataTable` component with selection, expander, and row actions column helpers via TanStack Table
22
+ - **Tree-Shakable** — full ESM and CJS support with TypeScript declaration maps and granular subpath exports
21
23
 
22
24
  ---
23
25
 
24
- ## 📚 Agent & Codex Skill Reference
26
+ ## Installation
25
27
 
26
- This package is fully mapped and integrated with the custom **[platform-core-components Agent Skill](file:///Users/lvtruong/personal/vlrc/.agent/skills/platform-core-components/SKILL.md)**. When working inside this package or utilizing these components, refer to these segmented reference files:
27
- 1. **[Shadcn + TanStack DataTable Composition Guide](file:///Users/lvtruong/personal/vlrc/.agent/skills/platform-core-components/references/datatable.md)**
28
- 2. **[Form Containers & FormItem/FormBase Layouts Specification](file:///Users/lvtruong/personal/vlrc/.agent/skills/platform-core-components/references/forms.md)**
29
- 3. **[Custom Form Fields & Inputs API Manual](file:///Users/lvtruong/personal/vlrc/.agent/skills/platform-core-components/references/form-fields.md)**
30
- 4. **[Dialogs, ConfirmModal & useModalState Bindings](file:///Users/lvtruong/personal/vlrc/.agent/skills/platform-core-components/references/modals.md)**
31
- 5. **[Unified Graphic Icons Registry Guidelines](file:///Users/lvtruong/personal/vlrc/.agent/skills/platform-core-components/references/icons.md)**
28
+ ```bash
29
+ pnpm add @vlrc-fe/components @stylexjs/stylex
30
+ pnpm add -D @stylexjs/unplugin
31
+ ```
32
32
 
33
33
  ---
34
34
 
35
- ## 📝 1. Shadcn Form Item & RHF Integration (`FormBase` & `FormItem`)
35
+ ## Setup
36
+
37
+ ### 1. Configure Bundler Plugin (Vite)
38
+
39
+ ```ts
40
+ import { defineConfig } from 'vite';
41
+ import react from '@vitejs/plugin-react';
42
+ import stylex from '@stylexjs/unplugin';
43
+
44
+ export default defineConfig({
45
+ plugins: [
46
+ stylex.vite({
47
+ useCSSLayers: true,
48
+ dev: process.env.NODE_ENV === 'development',
49
+ runtimeInjection: false,
50
+ }),
51
+ react(),
52
+ ],
53
+ });
54
+ ```
36
55
 
37
- Form fields inside this repository inherit a highly structured validation wrapper component called `FormBase`. It bridges the standard **react-hook-form** controller with custom-wrapped **Shadcn UI Form Item** layouts.
56
+ ### 2. Import Stylesheet
38
57
 
39
- ### 1.1 Structural Layout & Features
40
- When a field is rendered, `FormBase` automatically builds the following Shadcn structure:
41
- 1. **`<FormItem>` Container**: The primary layout block handling spacing. Supports:
42
- - **Vertical (Default)**: Normal form inputs stacked sequentially.
43
- - **Horizontal (`horizontal={true}`)**: Arranges labels and inputs side-by-side using unified grid properties. Perfect for dense settings panels.
44
- - **Control First (`controlFirst={true}`)**: Renders the input control widget *before* the text label (used automatically by `FormCheckbox` and `FormRadioGroup` options).
45
- 2. **`<FieldLabel>`**: Displays the text label tied to the input via `htmlFor`.
46
- - **Automatic required asterisk**: If the field rules specify `required: true` (or a string), `FormBase` automatically appends a red asterisk `<span className="text-red-500">*</span>` to the label.
47
- 3. **`<FieldDescription>`**: Displays supplementary description nodes or helper text.
48
- 4. **`<FieldError>`**: Listens to active RHF validation errors. If a field fails validation checks, the error message is instantly rendered below the input with appropriate red typography, omitting the need for developers to manually write error flags.
58
+ Import the compiled StyleX CSS in your entry file:
49
59
 
50
- ### 1.2 How `<Form>` Works
60
+ ```ts
61
+ import '@vlrc-fe/components/stylex.css';
62
+ ```
51
63
 
52
- `<Form>` is literally `FormProvider` from `react-hook-form`. It provides form context so child components can use `useFormContext()`.
64
+ ---
53
65
 
54
- **Pattern**: Call `useForm()` → spread into `<Form {...form}>` → wrap a native `<form>` → fields receive `form.control`.
66
+ ## Design Tokens
55
67
 
56
- **Validation**: Done exclusively via `rules` prop on each field (standard RHF `RegisterOptions`). No Zod schemas.
68
+ Theme tokens are available via `@vlrc-fe/components/theme`:
57
69
 
58
- ```tsx
59
- const { control, handleSubmit, reset } = useForm<LearningManagement.Course>();
60
-
61
- return (
62
- <form onSubmit={handleSubmit(onSubmit)} className="space-y-4">
63
- <FormInput control={control} name="title" label="Tiêu đề" rules={{ required: true }} />
64
- <FormCheckbox control={control} name="isActive" label="Hoạt động" />
65
- <Button type="submit">Lưu</Button>
66
- </form>
67
- );
70
+ ```ts
71
+ import { colors, radii, textColors } from '@vlrc-fe/components/theme';
68
72
  ```
69
73
 
70
- When splitting into child components, wrap with `<Form {...form}>` and use `useFormContext()` inside children to access `control` without prop drilling.
74
+ | Token | CSS Variable | Description |
75
+ | :------------------- | :-------------- | :---------------------------- |
76
+ | `colors.primary` | `--primary` | Brand and action color |
77
+ | `colors.background` | `--background` | Page background |
78
+ | `colors.foreground` | `--foreground` | Default text color |
79
+ | `colors.card` | `--card` | Card surface background |
80
+ | `colors.border` | `--border` | Dividers and borders |
81
+ | `colors.destructive` | `--destructive` | Error and destructive actions |
82
+ | `radii.md` | `--radius` | Base corner radius |
71
83
 
72
84
  ---
73
85
 
74
- ## 📊 2. DataTable (Shadcn + TanStack Table v8)
75
-
76
- The `DataTable` component provides a rich, responsive, and performance-optimized data grid built on top of **Shadcn table structures** and **TanStack Table**.
77
-
78
- ### 2.1 API Definition
79
- | Prop | Type | Default | Description |
80
- | :--- | :--- | :--- | :--- |
81
- | `columns` | `ColumnDef<T>[]` | - | **(Required)** TanStack-compliant column definitions. |
82
- | `data` | `T[]` | - | **(Required)** Row data source array. |
83
- | `isLoading` | `boolean` | `false` | Renders a custom glass-effect loader spinner overlay. |
84
- | `pageSize` | `number` | `10` | Rows displayed per page. |
85
- | `searchPlaceholder` | `string` | `'Tìm kiếm...'` | Search input placeholder. |
86
- | `searchKey` | `string` | - | Accessor key for client-side search filtering. |
86
+ ## Usage Examples
87
87
 
88
- ### 2.2 Standard Column Creators
89
- To maintain UI consistency and eliminate copy-paste boilerplate, use the built-in column creators:
90
- - **Checkbox Row Selection**: `createSelectionColumn<T>()` - Automatically inserts checkbox controls in headers and rows to select records.
91
- - **Expandable Children Row caret**: `createExpanderColumn<T>()` - Inserts caret icons to toggle nested layouts.
92
- - **Actions Panel Column**: `createRowActionsColumn<T>({ renderActions })` - Standardizes spacing for edit, view, and delete row action buttons.
88
+ ### UI Primitives
93
89
 
94
90
  ```tsx
95
- const columns = useMemo(() => [
96
- createSelectionColumn<CourseRow>(),
97
- {
98
- accessorKey: 'name',
99
- header: 'Tên bài học',
100
- cell: ({ row }) => <span className="font-medium">{row.original.name}</span>
91
+ import * as stylex from '@stylexjs/stylex';
92
+ import { Button, Card, CardContent, CardHeader, CardTitle, Badge } from '@vlrc-fe/components';
93
+
94
+ const styles = stylex.create({
95
+ header: {
96
+ display: 'flex',
97
+ justifyContent: 'space-between',
98
+ alignItems: 'center',
101
99
  },
102
- createRowActionsColumn<CourseRow>({
103
- renderActions: ({ row }) => <Button onClick={() => handleEdit(row.original)}>Sửa</Button>
104
- })
105
- ], []);
100
+ });
101
+
102
+ export function UserSummaryCard({ user }) {
103
+ return (
104
+ <Card variant="glass">
105
+ <CardHeader>
106
+ <div {...stylex.props(styles.header)}>
107
+ <CardTitle>{user.name}</CardTitle>
108
+ <Badge variant="secondary">Pro Member</Badge>
109
+ </div>
110
+ </CardHeader>
111
+ <CardContent>
112
+ <Button variant="default" size="sm">
113
+ View Profile
114
+ </Button>
115
+ </CardContent>
116
+ </Card>
117
+ );
118
+ }
106
119
  ```
107
120
 
108
- ---
109
-
110
- ## 📦 3. Specialized Custom Form Widgets
121
+ ### Custom Styling with `sx` Prop
111
122
 
112
- These pre-wrapped components are fully integrated with `FormBase` and automatically wire up under a `<Form>` container:
123
+ All components accept `sx?: stylex.StyleXStyles` for type-safe overrides:
113
124
 
114
- ### 3.1 `FormSelect` (Single & Multi Mode)
115
- Popover-based select box featuring real-time searchable keyword filters and custom item templates.
116
125
  ```tsx
117
- <FormSelect
118
- control={control}
119
- name="level"
120
- label="Trình độ"
121
- options={[
122
- { value: 'A1', label: 'Cơ bản (A1)' },
123
- { value: 'B2', label: 'Nâng cao (B2)' }
124
- ]}
125
- />
126
- ```
126
+ import * as stylex from '@stylexjs/stylex';
127
+ import { Button } from '@vlrc-fe/components';
127
128
 
128
- ### 3.2 `FormMultiSelect`
129
- A checkbox popover panel that renders selected elements as removable tag pills inside the trigger button.
130
- ```tsx
131
- <FormMultiSelect
132
- control={control}
133
- name="topics"
134
- label="Chủ đề chính"
135
- options={[{ value: 'grammar', label: 'Ngữ pháp' }]}
136
- showSelectAll
137
- />
129
+ const styles = stylex.create({
130
+ fullWidth: {
131
+ width: '100%',
132
+ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
133
+ },
134
+ });
135
+
136
+ export function CheckoutButton() {
137
+ return <Button sx={styles.fullWidth}>Proceed to Payment</Button>;
138
+ }
138
139
  ```
139
140
 
140
- ### 3.3 `FormDatePicker`
141
- Calendar selector supporting single date picking, time picking (`showTime`), month selection, and full date range queries (`isRangePicker: true`).
141
+ ### Form Controls (React Hook Form)
142
+
142
143
  ```tsx
143
- <FormDatePicker
144
- control={control}
145
- name="schedule"
146
- label="Lịch khai giảng"
147
- isRangePicker={true}
148
- />
144
+ import * as stylex from '@stylexjs/stylex';
145
+ import { useForm } from 'react-hook-form';
146
+ import { Form, FormInput, FormSelect, FormDatePicker, Button } from '@vlrc-fe/components';
147
+
148
+ const styles = stylex.create({
149
+ form: {
150
+ display: 'flex',
151
+ flexDirection: 'column',
152
+ gap: '1rem',
153
+ },
154
+ });
155
+
156
+ export function LessonForm() {
157
+ const form = useForm({
158
+ defaultValues: { title: '', level: 'A1', schedule: null },
159
+ });
160
+
161
+ return (
162
+ <Form {...form}>
163
+ <form onSubmit={form.handleSubmit(console.log)} {...stylex.props(styles.form)}>
164
+ <FormInput
165
+ control={form.control}
166
+ name="title"
167
+ label="Lesson Title"
168
+ placeholder="e.g. Daily Vocabulary"
169
+ rules={{ required: 'Title is required' }}
170
+ />
171
+ <FormSelect
172
+ control={form.control}
173
+ name="level"
174
+ label="Proficiency Level"
175
+ options={[
176
+ { value: 'A1', label: 'Beginner (A1)' },
177
+ { value: 'B2', label: 'Upper Intermediate (B2)' },
178
+ ]}
179
+ />
180
+ <FormDatePicker control={form.control} name="schedule" label="Start Date" />
181
+ <Button type="submit">Create Lesson</Button>
182
+ </form>
183
+ </Form>
184
+ );
185
+ }
149
186
  ```
150
187
 
151
- ### 3.4 `FormNumberInput`
152
- Renders currency and number masks using `react-number-format`. Features increment/decrement steppers.
188
+ ### DataTable
189
+
153
190
  ```tsx
154
- <FormNumberInput
155
- control={control}
156
- name="price"
157
- label="Học phí"
158
- thousandSeparator=","
159
- suffix=" VND"
160
- />
191
+ import { useMemo } from 'react';
192
+ import {
193
+ DataTable,
194
+ createSelectionColumn,
195
+ createRowActionsColumn,
196
+ Button,
197
+ } from '@vlrc-fe/components';
198
+
199
+ export function UserList({ users, isLoading }) {
200
+ const columns = useMemo(
201
+ () => [
202
+ createSelectionColumn(),
203
+ { accessorKey: 'name', header: 'Full Name' },
204
+ { accessorKey: 'email', header: 'Email Address' },
205
+ createRowActionsColumn({
206
+ renderActions: ({ row }) => (
207
+ <Button variant="ghost" size="icon-sm" onClick={() => editUser(row.original.id)}>
208
+ Edit
209
+ </Button>
210
+ ),
211
+ }),
212
+ ],
213
+ [],
214
+ );
215
+
216
+ return (
217
+ <DataTable
218
+ columns={columns}
219
+ data={users}
220
+ isLoading={isLoading}
221
+ searchKey="name"
222
+ searchPlaceholder="Filter users..."
223
+ pageSize={10}
224
+ />
225
+ );
226
+ }
161
227
  ```
162
228
 
163
- ### 3.5 `FormFileUpload`
164
- Advanced file dropzone and uploader supporting avatar rendering (`variant="avatar"`) and S3-based immediate uploading with progress bars.
229
+ ### Icons
230
+
165
231
  ```tsx
166
- <FormFileUpload
167
- control={control}
168
- name="avatar"
169
- label="Ảnh đại diện"
170
- variant="avatar"
171
- autoUpload
172
- uploadFile={async (file) => uploadToS3(file)}
173
- />
232
+ import * as stylex from '@stylexjs/stylex';
233
+ import { Icons } from '@vlrc-fe/components/Icons';
234
+
235
+ const styles = stylex.create({
236
+ status: {
237
+ display: 'flex',
238
+ gap: '0.5rem',
239
+ alignItems: 'center',
240
+ },
241
+ });
242
+
243
+ export function StatusIndicator() {
244
+ return (
245
+ <div {...stylex.props(styles.status)}>
246
+ <Icons.CheckCircle2 style={{ color: 'green' }} />
247
+ <span>All systems operational</span>
248
+ </div>
249
+ );
250
+ }
174
251
  ```
175
252
 
176
253
  ---
177
254
 
178
- ## 🎨 4. Direct Wrappers & Design Tokens
255
+ ## Subpath Exports
256
+
257
+ | Export Path | Contents |
258
+ | :------------------------------- | :---------------------------------------------- |
259
+ | `@vlrc-fe/components` | All UI primitives, form controls, and DataTable |
260
+ | `@vlrc-fe/components/ui/*` | Granular primitive components |
261
+ | `@vlrc-fe/components/DataTable` | DataTable core and column utilities |
262
+ | `@vlrc-fe/components/Icons` | Centralized SVG icon registry |
263
+ | `@vlrc-fe/components/theme` | StyleX design tokens |
264
+ | `@vlrc-fe/components/stylex.css` | Pre-compiled atomic CSS stylesheet |
265
+
266
+ ---
267
+
268
+ ## Scripts
179
269
 
180
- Outside of active form contexts, you can directly import these components:
181
- - **`Select` & `MultiSelect`**: Standard dropdown triggers.
182
- - **`ConfirmModal` & `Modal`**: Dialog boxes.
183
- - **`Icons`**: High-performance graphic library wrapper (Lucide React registry). Banned from importing directly in `src/` to prevent weight overheads.
184
- - **`Button` / `Card` / `Badge`**: Semantic shadcn styling elements under standard Tailwind tokens.
270
+ ```bash
271
+ pnpm build # Vite library build + tsc declarations
272
+ pnpm lint # Oxlint
273
+ pnpm format # Oxfmt
274
+ ```
185
275
 
186
276
  ---
187
277
 
188
- ## 🛠 Package Scripts
278
+ ## License
189
279
 
190
- Managed by Lerna and PNPM Workspaces:
191
- - Build package: `pnpm build`
192
- - Version package: `pnpm version:packages`
193
- - Publish package: `pnpm publish:packages`
280
+ MIT © [VLRC Platform Team](https://github.com/vulinhnopro2704/vlrc-fe)
@@ -12,5 +12,5 @@ export interface ConfirmationDialogProps {
12
12
  type?: 'warning' | 'info' | 'success' | 'danger';
13
13
  isLoading?: boolean;
14
14
  }
15
- export default function ConfirmModal({ isOpen, onClose, onConfirm, title, message, confirmText, cancelText, closeLabel, processingText, type, isLoading }: ConfirmationDialogProps): React.JSX.Element | null;
15
+ export default function ConfirmModal({ isOpen, onClose, onConfirm, title, message, confirmText, cancelText, closeLabel, processingText, type, isLoading, }: ConfirmationDialogProps): React.JSX.Element | null;
16
16
  //# sourceMappingURL=ConfirmModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../src/ConfirmModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoL/B,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,OAAO,EACP,WAAwB,EACxB,UAAkB,EAClB,UAAmB,EACnB,cAAgC,EAChC,IAAgB,EAChB,SAAiB,EAClB,EAAE,uBAAuB,4BAkJzB"}
1
+ {"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../src/ConfirmModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoL/B,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,OAAO,EACP,WAAwB,EACxB,UAAkB,EAClB,UAAmB,EACnB,cAAgC,EAChC,IAAgB,EAChB,SAAiB,GAClB,EAAE,uBAAuB,4BA4IzB"}
@@ -1,6 +1,6 @@
1
1
  import { type ColumnDef } from '@tanstack/react-table';
2
2
  import type { DataTableProps, DataTableValue } from './types';
3
- export declare const DataTable: <TData>({ data, columns, initialState, empty, search, pagination: paginationConfig, actions, api, infiniteScroll, expand, className, containerClassName, getRowId, renderToolbarRight }: DataTableProps<TData> & {
3
+ export declare const DataTable: <TData>({ data, columns, initialState, empty, search, pagination: paginationConfig, actions, api, infiniteScroll, expand, className, containerClassName, getRowId, renderToolbarRight, }: DataTableProps<TData> & {
4
4
  columns: ColumnDef<TData, DataTableValue>[];
5
5
  }) => import("react").JSX.Element;
6
6
  export default DataTable;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/DataTable/DataTable.tsx"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,SAAS,EAEf,MAAM,uBAAuB,CAAC;AAc/B,OAAO,KAAK,EAOV,cAAc,EAGd,cAAc,EACf,MAAM,SAAS,CAAC;AAwBjB,eAAO,MAAM,SAAS,GAAI,KAAK,mLAe5B,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC;CAC7C,gCAiMA,CAAC;eAEa,SAAS"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/DataTable/DataTable.tsx"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,SAAS,EAEf,MAAM,uBAAuB,CAAC;AAc/B,OAAO,KAAK,EAOV,cAAc,EAGd,cAAc,EACf,MAAM,SAAS,CAAC;AAwBjB,eAAO,MAAM,SAAS,GAAI,KAAK,oLAe5B,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC;CAC7C,gCAoMA,CAAC;eAEa,SAAS"}
@@ -1,6 +1,6 @@
1
1
  import type { Table } from '@tanstack/react-table';
2
2
  import type { DataTableApiConfig } from '../types';
3
- export declare const DataTablePagination: <TData>({ table, tableState, pageSizeOptions, apiConfig }: {
3
+ export declare const DataTablePagination: <TData>({ table, tableState, pageSizeOptions, apiConfig, }: {
4
4
  table: Table<TData>;
5
5
  tableState: Table<TData>['getState'] extends () => infer S ? S : never;
6
6
  pageSizeOptions: number[];
@@ -1 +1 @@
1
- {"version":3,"file":"DataTablePagination.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTablePagination.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAUnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA4BnD,eAAO,MAAM,mBAAmB,GAAI,KAAK,qDAKtC;IACD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,SAAS,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACvE,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,EAAE,kBAAkB,CAAC;CAC/B,gCAwDA,CAAC"}
1
+ {"version":3,"file":"DataTablePagination.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTablePagination.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAUnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA4BnD,eAAO,MAAM,mBAAmB,GAAI,KAAK,sDAKtC;IACD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,SAAS,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACvE,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,EAAE,kBAAkB,CAAC;CAC/B,gCA2DA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Row, Table } from '@tanstack/react-table';
2
- export declare const DataTableRowActions: <TData>({ row, table }: {
2
+ export declare const DataTableRowActions: <TData>({ row, table, }: {
3
3
  row: Row<TData>;
4
4
  table: Table<TData>;
5
5
  }) => import("react").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableRowActions.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTableRowActions.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAcxD,eAAO,MAAM,mBAAmB,GAAI,KAAK,kBAGtC;IACD,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACrB,uCAkCA,CAAC"}
1
+ {"version":3,"file":"DataTableRowActions.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTableRowActions.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAcxD,eAAO,MAAM,mBAAmB,GAAI,KAAK,mBAGtC;IACD,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACrB,uCAiDA,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type ExpandedState, type Table, type VisibilityState } from '@tanstack/react-table';
2
2
  import type { DataTableEmptyConfig, DataTableExpandConfig } from '../types';
3
- export declare const DataTableTable: <TData>({ table, columnVisibility, expandedState, expandConfig, empty, columnsCount }: {
3
+ export declare const DataTableTable: <TData>({ table, columnVisibility, expandedState, expandConfig, empty, columnsCount, }: {
4
4
  table: Table<TData>;
5
5
  columnVisibility: VisibilityState;
6
6
  expandedState: ExpandedState;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableTable.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTableTable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAW/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE5E,eAAO,MAAM,cAAc,GAAI,KAAK,iFAOjC;IACD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,gBAAgB,EAAE,eAAe,CAAC;IAClC,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC3C,KAAK,EAAE,oBAAoB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB,gCAgEA,CAAC"}
1
+ {"version":3,"file":"DataTableTable.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTableTable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAW/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE5E,eAAO,MAAM,cAAc,GAAI,KAAK,kFAOjC;IACD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,gBAAgB,EAAE,eAAe,CAAC;IAClC,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC3C,KAAK,EAAE,oBAAoB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB,gCAgEA,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { Table } from '@tanstack/react-table';
3
- export declare const DataTableToolbar: <TData>({ table, placeholder, debounceMs, right }: {
3
+ export declare const DataTableToolbar: <TData>({ table, placeholder, debounceMs, right, }: {
4
4
  table: Table<TData>;
5
5
  placeholder: string;
6
6
  debounceMs: number;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableToolbar.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTableToolbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,eAAO,MAAM,gBAAgB,GAAI,KAAK,6CAKnC;IACD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;CAClB,gCA2CA,CAAC"}
1
+ {"version":3,"file":"DataTableToolbar.d.ts","sourceRoot":"","sources":["../../../src/DataTable/components/DataTableToolbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,eAAO,MAAM,gBAAgB,GAAI,KAAK,8CAKnC;IACD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;CAClB,gCA2CA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Table, VisibilityState } from '@tanstack/react-table';
2
- export declare const DataTableViewOptions: <TData>({ table, columnVisibility }: {
2
+ export declare const DataTableViewOptions: <TData>({ table, columnVisibility, }: {
3
3
  table: Table<TData>;
4
4
  columnVisibility: VisibilityState;
5
5
  }) => import("react").JSX.Element;