@customafk/lunas-ui 0.0.21 → 0.0.22

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 (812) hide show
  1. package/dist/add-new-CVQQRkB9.js +2 -0
  2. package/dist/add-new-CVQQRkB9.js.map +1 -0
  3. package/dist/{add-new-BTpI7Ph7.cjs → add-new-CmzfSaTJ.cjs} +2 -2
  4. package/dist/add-new-CmzfSaTJ.cjs.map +1 -0
  5. package/dist/alert-dialog-CNHyP_A9.js +2 -0
  6. package/dist/alert-dialog-CNHyP_A9.js.map +1 -0
  7. package/dist/alert-dialog-D-oR0YW3.cjs +2 -0
  8. package/dist/alert-dialog-D-oR0YW3.cjs.map +1 -0
  9. package/dist/{badge-DHRQ-uwY.cjs → badge-D4NxkKeN.cjs} +1 -1
  10. package/dist/badge-D4NxkKeN.cjs.map +1 -0
  11. package/dist/{badge-bLqn3EB9.js → badge-DzKUgC8v.js} +1 -1
  12. package/dist/badge-DzKUgC8v.js.map +1 -0
  13. package/dist/button-BEwm_iVK.d.cts +25 -0
  14. package/dist/button-BSGNpclh.cjs +2 -0
  15. package/dist/button-BSGNpclh.cjs.map +1 -0
  16. package/dist/{button-CFhTSUSV.d.ts → button-CSKaUiLi.d.ts} +7 -5
  17. package/dist/button-CnMfXTBU.js +2 -0
  18. package/dist/button-CnMfXTBU.js.map +1 -0
  19. package/dist/{calendar-Cck0PPMB.cjs → calendar-B8IKzrdN.cjs} +2 -2
  20. package/dist/calendar-B8IKzrdN.cjs.map +1 -0
  21. package/dist/{calendar-BG-jrCZc.js → calendar-CbuOOMpK.js} +2 -2
  22. package/dist/calendar-CbuOOMpK.js.map +1 -0
  23. package/dist/card-CgQjctUE.js +2 -0
  24. package/dist/card-CgQjctUE.js.map +1 -0
  25. package/dist/card-DYVCumPc.cjs +2 -0
  26. package/dist/card-DYVCumPc.cjs.map +1 -0
  27. package/dist/cards/simple-card.cjs +1 -1
  28. package/dist/cards/simple-card.cjs.map +1 -1
  29. package/dist/cards/simple-card.js +1 -1
  30. package/dist/cards/simple-card.js.map +1 -1
  31. package/dist/command-CoB5R5FI.cjs +2 -0
  32. package/dist/command-CoB5R5FI.cjs.map +1 -0
  33. package/dist/{command-DK3Z1Vcb.d.ts → command-DCgWctIo.d.cts} +12 -13
  34. package/dist/{command-ChE1SC-Q.d.cts → command-DQMBhKsg.d.ts} +12 -13
  35. package/dist/command-TFZwJmux.js +2 -0
  36. package/dist/command-TFZwJmux.js.map +1 -0
  37. package/dist/data-display/country.cjs +1 -1
  38. package/dist/data-display/country.cjs.map +1 -1
  39. package/dist/data-display/country.js +1 -1
  40. package/dist/data-display/country.js.map +1 -1
  41. package/dist/data-display/data-list.cjs +1 -1
  42. package/dist/data-display/data-list.cjs.map +1 -1
  43. package/dist/data-display/data-list.d.cts +0 -2
  44. package/dist/data-display/data-list.d.ts +0 -2
  45. package/dist/data-display/data-list.js +1 -1
  46. package/dist/data-display/data-list.js.map +1 -1
  47. package/dist/data-display/date-tooltip.cjs +1 -1
  48. package/dist/data-display/date-tooltip.cjs.map +1 -1
  49. package/dist/data-display/date-tooltip.js +1 -1
  50. package/dist/data-display/date-tooltip.js.map +1 -1
  51. package/dist/data-display/date.cjs +1 -1
  52. package/dist/data-display/date.d.cts +1 -1
  53. package/dist/data-display/date.d.ts +1 -1
  54. package/dist/data-display/date.js +1 -1
  55. package/dist/data-display/empty.cjs +1 -1
  56. package/dist/data-display/empty.cjs.map +1 -1
  57. package/dist/data-display/empty.d.cts +2 -2
  58. package/dist/data-display/empty.d.ts +2 -2
  59. package/dist/data-display/empty.js +1 -1
  60. package/dist/data-display/empty.js.map +1 -1
  61. package/dist/data-display/name.cjs +1 -1
  62. package/dist/data-display/name.cjs.map +1 -1
  63. package/dist/data-display/name.js +1 -1
  64. package/dist/data-display/name.js.map +1 -1
  65. package/dist/data-display/phone-number.cjs +1 -1
  66. package/dist/data-display/phone-number.cjs.map +1 -1
  67. package/dist/data-display/phone-number.js +1 -1
  68. package/dist/data-display/phone-number.js.map +1 -1
  69. package/dist/data-display/role-badge.cjs +1 -1
  70. package/dist/data-display/role-badge.cjs.map +1 -1
  71. package/dist/data-display/role-badge.js +1 -1
  72. package/dist/data-display/role-badge.js.map +1 -1
  73. package/dist/data-display/statistic.cjs +1 -1
  74. package/dist/data-display/statistic.cjs.map +1 -1
  75. package/dist/data-display/statistic.d.cts +4 -4
  76. package/dist/data-display/statistic.d.ts +4 -4
  77. package/dist/data-display/statistic.js +1 -1
  78. package/dist/data-display/statistic.js.map +1 -1
  79. package/dist/{date-B1g1OMYc.js → date-BMq_DNsv.js} +1 -1
  80. package/dist/date-BMq_DNsv.js.map +1 -0
  81. package/dist/{date-Cw6Jf7k6.cjs → date-nd8WkPlx.cjs} +1 -1
  82. package/dist/date-nd8WkPlx.cjs.map +1 -0
  83. package/dist/{dialog-DoFMLK7H.d.cts → dialog-B1TYYUwQ.d.cts} +12 -13
  84. package/dist/{dialog-BfAIULbh.d.ts → dialog-BFjbRwaD.d.ts} +12 -13
  85. package/dist/dialog-CSDDiHKO.js +2 -0
  86. package/dist/dialog-CSDDiHKO.js.map +1 -0
  87. package/dist/dialog-_Cgij9NP.cjs +2 -0
  88. package/dist/dialog-_Cgij9NP.cjs.map +1 -0
  89. package/dist/dialogs/confirm-dialog.cjs +1 -1
  90. package/dist/dialogs/confirm-dialog.cjs.map +1 -1
  91. package/dist/dialogs/confirm-dialog.js +1 -1
  92. package/dist/dialogs/confirm-dialog.js.map +1 -1
  93. package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
  94. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +29 -29
  95. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +29 -29
  96. package/dist/dialogs/detail-dialog/component/sidebar.js +1 -1
  97. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  98. package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
  99. package/dist/dialogs/detail-dialog/index.js +1 -1
  100. package/dist/dialogs/detail-dialog/index.js.map +1 -1
  101. package/dist/dialogs/error-dialog.cjs +1 -1
  102. package/dist/dialogs/error-dialog.js +1 -1
  103. package/dist/dialogs/form-dialog.cjs +1 -1
  104. package/dist/dialogs/form-dialog.cjs.map +1 -1
  105. package/dist/dialogs/form-dialog.d.cts +3 -3
  106. package/dist/dialogs/form-dialog.d.ts +3 -3
  107. package/dist/dialogs/form-dialog.js +1 -1
  108. package/dist/dialogs/form-dialog.js.map +1 -1
  109. package/dist/dialogs/loading-dialog.cjs +1 -1
  110. package/dist/dialogs/loading-dialog.cjs.map +1 -1
  111. package/dist/dialogs/loading-dialog.js +1 -1
  112. package/dist/dialogs/loading-dialog.js.map +1 -1
  113. package/dist/dropdown-menu-BnfaOPEM.cjs +2 -0
  114. package/dist/dropdown-menu-BnfaOPEM.cjs.map +1 -0
  115. package/dist/dropdown-menu-D5uG4HZA.js +2 -0
  116. package/dist/dropdown-menu-D5uG4HZA.js.map +1 -0
  117. package/dist/{error-dialog-OeWIgIvF.cjs → error-dialog-D5R5le-W.cjs} +2 -2
  118. package/dist/error-dialog-D5R5le-W.cjs.map +1 -0
  119. package/dist/{error-dialog-Dg_OHJlH.js → error-dialog-Q99thrSD.js} +2 -2
  120. package/dist/error-dialog-Q99thrSD.js.map +1 -0
  121. package/dist/{flex-B5MQmxX8.cjs → flex-CNA_SId-.cjs} +1 -1
  122. package/dist/flex-CNA_SId-.cjs.map +1 -0
  123. package/dist/{flex-CBAzUoXK.js → flex-ILvQrYMJ.js} +1 -1
  124. package/dist/flex-ILvQrYMJ.js.map +1 -0
  125. package/dist/{form-BbU1TIro.cjs → form-CHs85hm6.cjs} +2 -2
  126. package/dist/form-CHs85hm6.cjs.map +1 -0
  127. package/dist/{form-BMnG2xLt.js → form-tabDlutX.js} +2 -2
  128. package/dist/form-tabDlutX.js.map +1 -0
  129. package/dist/{form-wrapper-wHzrskjb.js → form-wrapper-C2xlvWx0.js} +2 -2
  130. package/dist/form-wrapper-C2xlvWx0.js.map +1 -0
  131. package/dist/{form-wrapper-DeSGl64P.cjs → form-wrapper-CY-stRaQ.cjs} +2 -2
  132. package/dist/form-wrapper-CY-stRaQ.cjs.map +1 -0
  133. package/dist/forms/combobox-field.cjs +1 -1
  134. package/dist/forms/combobox-field.cjs.map +1 -1
  135. package/dist/forms/combobox-field.d.cts +2 -2
  136. package/dist/forms/combobox-field.d.ts +2 -2
  137. package/dist/forms/combobox-field.js +1 -1
  138. package/dist/forms/combobox-field.js.map +1 -1
  139. package/dist/forms/date-field.cjs +1 -1
  140. package/dist/forms/date-field.cjs.map +1 -1
  141. package/dist/forms/date-field.d.cts +2 -2
  142. package/dist/forms/date-field.d.ts +2 -2
  143. package/dist/forms/date-field.js +1 -1
  144. package/dist/forms/date-field.js.map +1 -1
  145. package/dist/forms/form-wrapper.cjs +1 -1
  146. package/dist/forms/form-wrapper.d.cts +3 -3
  147. package/dist/forms/form-wrapper.d.ts +3 -3
  148. package/dist/forms/form-wrapper.js +1 -1
  149. package/dist/forms/multi-select-field.cjs +1 -1
  150. package/dist/forms/multi-select-field.cjs.map +1 -1
  151. package/dist/forms/multi-select-field.d.cts +2 -2
  152. package/dist/forms/multi-select-field.d.ts +2 -2
  153. package/dist/forms/multi-select-field.js +1 -1
  154. package/dist/forms/multi-select-field.js.map +1 -1
  155. package/dist/forms/number-field.cjs +1 -1
  156. package/dist/forms/number-field.cjs.map +1 -1
  157. package/dist/forms/number-field.d.ts +2 -2
  158. package/dist/forms/number-field.js +1 -1
  159. package/dist/forms/number-field.js.map +1 -1
  160. package/dist/forms/password-field.cjs +1 -1
  161. package/dist/forms/password-field.cjs.map +1 -1
  162. package/dist/forms/password-field.d.cts +2 -2
  163. package/dist/forms/password-field.d.ts +2 -2
  164. package/dist/forms/password-field.js +1 -1
  165. package/dist/forms/password-field.js.map +1 -1
  166. package/dist/forms/select-field.cjs +1 -1
  167. package/dist/forms/select-field.cjs.map +1 -1
  168. package/dist/forms/select-field.d.cts +2 -2
  169. package/dist/forms/select-field.d.ts +2 -2
  170. package/dist/forms/select-field.js +1 -1
  171. package/dist/forms/select-field.js.map +1 -1
  172. package/dist/forms/switch-field.cjs +1 -1
  173. package/dist/forms/switch-field.cjs.map +1 -1
  174. package/dist/forms/switch-field.d.cts +2 -2
  175. package/dist/forms/switch-field.js +1 -1
  176. package/dist/forms/switch-field.js.map +1 -1
  177. package/dist/forms/text-field.cjs +1 -1
  178. package/dist/forms/text-field.cjs.map +1 -1
  179. package/dist/forms/text-field.d.cts +2 -2
  180. package/dist/forms/text-field.d.ts +2 -2
  181. package/dist/forms/text-field.js +1 -1
  182. package/dist/forms/text-field.js.map +1 -1
  183. package/dist/forms/textarea-field.cjs +1 -1
  184. package/dist/forms/textarea-field.cjs.map +1 -1
  185. package/dist/forms/textarea-field.d.cts +2 -2
  186. package/dist/forms/textarea-field.js +1 -1
  187. package/dist/forms/textarea-field.js.map +1 -1
  188. package/dist/input--6vqz8UI.js +2 -0
  189. package/dist/input--6vqz8UI.js.map +1 -0
  190. package/dist/{input-B0fJo2WZ.d.cts → input-B-Gq-nr8.d.cts} +4 -4
  191. package/dist/{input-CsU6VSlk.d.ts → input-EM59LdpP.d.ts} +4 -4
  192. package/dist/input-VZiryzkl.cjs +2 -0
  193. package/dist/input-VZiryzkl.cjs.map +1 -0
  194. package/dist/label-B_2ZQn0X.cjs +2 -0
  195. package/dist/label-B_2ZQn0X.cjs.map +1 -0
  196. package/dist/label-D1XmKlc3.js +2 -0
  197. package/dist/label-D1XmKlc3.js.map +1 -0
  198. package/dist/layouts/flex.cjs +1 -1
  199. package/dist/layouts/flex.d.cts +2 -2
  200. package/dist/layouts/flex.d.ts +2 -2
  201. package/dist/layouts/flex.js +1 -1
  202. package/dist/layouts/main/index.cjs +1 -1
  203. package/dist/layouts/main/index.cjs.map +1 -1
  204. package/dist/layouts/main/index.d.cts +4 -4
  205. package/dist/layouts/main/index.d.ts +4 -4
  206. package/dist/layouts/main/index.js +1 -1
  207. package/dist/layouts/main/index.js.map +1 -1
  208. package/dist/multi-select-Cjvm4tK5.cjs +2 -0
  209. package/dist/multi-select-Cjvm4tK5.cjs.map +1 -0
  210. package/dist/multi-select-D0bZVOnm.js +2 -0
  211. package/dist/multi-select-D0bZVOnm.js.map +1 -0
  212. package/dist/paragraph-B4cQhLhW.js +2 -0
  213. package/dist/paragraph-B4cQhLhW.js.map +1 -0
  214. package/dist/paragraph-DcRBcRhQ.cjs +2 -0
  215. package/dist/paragraph-DcRBcRhQ.cjs.map +1 -0
  216. package/dist/popover-CTFp7ZXi.js +2 -0
  217. package/dist/popover-CTFp7ZXi.js.map +1 -0
  218. package/dist/popover-DCcPvdz2.cjs +2 -0
  219. package/dist/popover-DCcPvdz2.cjs.map +1 -0
  220. package/dist/progress-DLxh7x1P.cjs +2 -0
  221. package/dist/progress-DLxh7x1P.cjs.map +1 -0
  222. package/dist/progress-DWrtxJv0.js +2 -0
  223. package/dist/progress-DWrtxJv0.js.map +1 -0
  224. package/dist/refresh-CYCzbKVl.js +2 -0
  225. package/dist/refresh-CYCzbKVl.js.map +1 -0
  226. package/dist/{refresh-H87p0PFk.cjs → refresh-DMj_wur3.cjs} +2 -2
  227. package/dist/refresh-DMj_wur3.cjs.map +1 -0
  228. package/dist/scroll-area-C0KQbcG0.js.map +1 -1
  229. package/dist/scroll-area-CBq8XL4c.cjs.map +1 -1
  230. package/dist/{search-input-BUIwdK4e.js → search-input-DqcwkgsY.js} +2 -2
  231. package/dist/search-input-DqcwkgsY.js.map +1 -0
  232. package/dist/{search-input-DXh-cAVU.cjs → search-input-yweS9EMM.cjs} +2 -2
  233. package/dist/search-input-yweS9EMM.cjs.map +1 -0
  234. package/dist/select-BHjk6yT3.cjs +2 -0
  235. package/dist/select-BHjk6yT3.cjs.map +1 -0
  236. package/dist/select-C6N3CXuY.js +2 -0
  237. package/dist/select-C6N3CXuY.js.map +1 -0
  238. package/dist/{separator-DgyR24FB.d.ts → separator-BnnbFnrB.d.ts} +3 -4
  239. package/dist/separator-Cigaqna1.cjs +2 -0
  240. package/dist/separator-Cigaqna1.cjs.map +1 -0
  241. package/dist/separator-aLdI4FQe.js +2 -0
  242. package/dist/separator-aLdI4FQe.js.map +1 -0
  243. package/dist/{separator-5OitSlUj.d.cts → separator-mZ8r56s2.d.cts} +3 -4
  244. package/dist/sheet-CX3PajAc.cjs +2 -0
  245. package/dist/sheet-CX3PajAc.cjs.map +1 -0
  246. package/dist/sheet-DqPtcv9H.js +2 -0
  247. package/dist/sheet-DqPtcv9H.js.map +1 -0
  248. package/dist/sidebar-BKNai9nJ.cjs +2 -0
  249. package/dist/sidebar-BKNai9nJ.cjs.map +1 -0
  250. package/dist/sidebar-BR_UWLC5.js +2 -0
  251. package/dist/sidebar-BR_UWLC5.js.map +1 -0
  252. package/dist/sidebar-C2FH-tzm.cjs +2 -0
  253. package/dist/sidebar-C2FH-tzm.cjs.map +1 -0
  254. package/dist/sidebar-DphZ29-4.js +2 -0
  255. package/dist/sidebar-DphZ29-4.js.map +1 -0
  256. package/dist/skeleton-C-9PuX3p.cjs +2 -0
  257. package/dist/skeleton-C-9PuX3p.cjs.map +1 -0
  258. package/dist/skeleton-sZeupFu_.js +2 -0
  259. package/dist/skeleton-sZeupFu_.js.map +1 -0
  260. package/dist/styles/base.cjs +0 -0
  261. package/dist/styles/base.css +32 -0
  262. package/dist/styles/base.css.map +1 -0
  263. package/dist/styles/base.js +1 -0
  264. package/dist/styles/loader.cjs +0 -0
  265. package/dist/styles/loader.css +116 -0
  266. package/dist/styles/loader.css.map +1 -0
  267. package/dist/styles/loader.js +1 -0
  268. package/dist/styles/theme.cjs +0 -0
  269. package/dist/styles/theme.css +106 -0
  270. package/dist/styles/theme.css.map +1 -0
  271. package/dist/styles/theme.js +1 -0
  272. package/dist/styles/typography.cjs +0 -0
  273. package/dist/styles/typography.css +9 -0
  274. package/dist/styles/typography.css.map +1 -0
  275. package/dist/styles/typography.js +1 -0
  276. package/dist/switch-965kHdW_.js +2 -0
  277. package/dist/switch-965kHdW_.js.map +1 -0
  278. package/dist/switch-C3igCoxt.cjs +2 -0
  279. package/dist/switch-C3igCoxt.cjs.map +1 -0
  280. package/dist/table/index.cjs +1 -1
  281. package/dist/table/index.cjs.map +1 -1
  282. package/dist/table/index.d.ts +2 -2
  283. package/dist/table/index.js +1 -1
  284. package/dist/table/index.js.map +1 -1
  285. package/dist/table-CTMRaGxa.cjs +2 -0
  286. package/dist/table-CTMRaGxa.cjs.map +1 -0
  287. package/dist/table-CsnugKnh.js +2 -0
  288. package/dist/table-CsnugKnh.js.map +1 -0
  289. package/dist/textarea-3XRFTUZ8.cjs +2 -0
  290. package/dist/textarea-3XRFTUZ8.cjs.map +1 -0
  291. package/dist/textarea-CQ6gAnm5.js +2 -0
  292. package/dist/textarea-CQ6gAnm5.js.map +1 -0
  293. package/dist/{title-DrIfj31i.cjs → title-6Uosk2b4.cjs} +2 -2
  294. package/dist/title-6Uosk2b4.cjs.map +1 -0
  295. package/dist/{title-CA6PvqiD.js → title-CxIwADiB.js} +2 -2
  296. package/dist/title-CxIwADiB.js.map +1 -0
  297. package/dist/{toggle-CyClmWQm.d.ts → toggle-B-LtBkTS.d.ts} +4 -4
  298. package/dist/{toggle-B9onDBto.d.cts → toggle-BLlf4Xgl.d.cts} +3 -3
  299. package/dist/{toggle-BA0PLIVa.js → toggle-CHJ2edke.js} +2 -2
  300. package/dist/toggle-CHJ2edke.js.map +1 -0
  301. package/dist/{toggle-Ddewmqst.cjs → toggle-DO8QbhLS.cjs} +2 -2
  302. package/dist/toggle-DO8QbhLS.cjs.map +1 -0
  303. package/dist/tooltip-B8KdfOeT.js +2 -0
  304. package/dist/tooltip-B8KdfOeT.js.map +1 -0
  305. package/dist/{tooltip-Ju-oCFdl.d.ts → tooltip-CbtJCe-c.d.ts} +6 -6
  306. package/dist/tooltip-DLnAwybV.cjs +2 -0
  307. package/dist/tooltip-DLnAwybV.cjs.map +1 -0
  308. package/dist/{tooltip-Ccg2G_fB.d.cts → tooltip-etVeWcFC.d.cts} +6 -6
  309. package/dist/{types-CnMfjcgO.cjs → types-CrbWxjnp.cjs} +1 -1
  310. package/dist/types-CrbWxjnp.cjs.map +1 -0
  311. package/dist/{types-BVNbk1ZN.js → types-DaIHddx7.js} +1 -1
  312. package/dist/types-DaIHddx7.js.map +1 -0
  313. package/dist/typography/paragraph.cjs +1 -1
  314. package/dist/typography/paragraph.d.cts +3 -4
  315. package/dist/typography/paragraph.d.ts +3 -4
  316. package/dist/typography/paragraph.js +1 -1
  317. package/dist/typography/title.cjs +1 -1
  318. package/dist/typography/title.d.cts +2 -2
  319. package/dist/typography/title.d.ts +2 -2
  320. package/dist/typography/title.js +1 -1
  321. package/dist/ui/alert-dialog.cjs +1 -1
  322. package/dist/ui/alert-dialog.d.cts +12 -12
  323. package/dist/ui/alert-dialog.d.ts +12 -12
  324. package/dist/ui/alert-dialog.js +1 -1
  325. package/dist/ui/alert.cjs +1 -1
  326. package/dist/ui/alert.cjs.map +1 -1
  327. package/dist/ui/alert.d.cts +4 -4
  328. package/dist/ui/alert.d.ts +4 -4
  329. package/dist/ui/alert.js +1 -1
  330. package/dist/ui/alert.js.map +1 -1
  331. package/dist/ui/aspect-ratio.cjs +1 -1
  332. package/dist/ui/aspect-ratio.cjs.map +1 -1
  333. package/dist/ui/aspect-ratio.d.cts +2 -2
  334. package/dist/ui/aspect-ratio.d.ts +2 -2
  335. package/dist/ui/aspect-ratio.js +1 -1
  336. package/dist/ui/aspect-ratio.js.map +1 -1
  337. package/dist/ui/avatar.cjs.map +1 -1
  338. package/dist/ui/avatar.d.cts +4 -4
  339. package/dist/ui/avatar.d.ts +4 -4
  340. package/dist/ui/avatar.js.map +1 -1
  341. package/dist/ui/badge.cjs +1 -1
  342. package/dist/ui/badge.d.cts +5 -5
  343. package/dist/ui/badge.d.ts +3 -3
  344. package/dist/ui/badge.js +1 -1
  345. package/dist/ui/breadcrumb.cjs +1 -1
  346. package/dist/ui/breadcrumb.cjs.map +1 -1
  347. package/dist/ui/breadcrumb.d.cts +7 -7
  348. package/dist/ui/breadcrumb.d.ts +9 -9
  349. package/dist/ui/breadcrumb.js +1 -1
  350. package/dist/ui/breadcrumb.js.map +1 -1
  351. package/dist/ui/button.cjs +1 -1
  352. package/dist/ui/button.d.cts +1 -1
  353. package/dist/ui/button.d.ts +1 -1
  354. package/dist/ui/button.js +1 -1
  355. package/dist/ui/buttons/add-new.cjs +1 -1
  356. package/dist/ui/buttons/add-new.js +1 -1
  357. package/dist/ui/buttons/edit.cjs +1 -1
  358. package/dist/ui/buttons/edit.cjs.map +1 -1
  359. package/dist/ui/buttons/edit.js +1 -1
  360. package/dist/ui/buttons/edit.js.map +1 -1
  361. package/dist/ui/buttons/refresh.cjs +1 -1
  362. package/dist/ui/buttons/refresh.js +1 -1
  363. package/dist/ui/buttons/trash.cjs +1 -1
  364. package/dist/ui/buttons/trash.cjs.map +1 -1
  365. package/dist/ui/buttons/trash.js +1 -1
  366. package/dist/ui/buttons/trash.js.map +1 -1
  367. package/dist/ui/buttons/upload-image.cjs +1 -1
  368. package/dist/ui/buttons/upload-image.cjs.map +1 -1
  369. package/dist/ui/buttons/upload-image.js +1 -1
  370. package/dist/ui/buttons/upload-image.js.map +1 -1
  371. package/dist/ui/calendar.cjs +1 -1
  372. package/dist/ui/calendar.d.cts +5 -5
  373. package/dist/ui/calendar.d.ts +5 -5
  374. package/dist/ui/calendar.js +1 -1
  375. package/dist/ui/card.cjs +1 -1
  376. package/dist/ui/card.d.cts +8 -9
  377. package/dist/ui/card.d.ts +8 -9
  378. package/dist/ui/card.js +1 -1
  379. package/dist/ui/carousel.cjs +1 -1
  380. package/dist/ui/carousel.cjs.map +1 -1
  381. package/dist/ui/carousel.d.cts +8 -8
  382. package/dist/ui/carousel.d.ts +8 -8
  383. package/dist/ui/carousel.js +1 -1
  384. package/dist/ui/carousel.js.map +1 -1
  385. package/dist/ui/collapsible.cjs.map +1 -1
  386. package/dist/ui/collapsible.d.cts +4 -4
  387. package/dist/ui/collapsible.d.ts +4 -4
  388. package/dist/ui/collapsible.js.map +1 -1
  389. package/dist/ui/command.cjs +1 -1
  390. package/dist/ui/command.d.cts +2 -2
  391. package/dist/ui/command.d.ts +2 -2
  392. package/dist/ui/command.js +1 -1
  393. package/dist/ui/context-menu.cjs +1 -1
  394. package/dist/ui/context-menu.cjs.map +1 -1
  395. package/dist/ui/context-menu.d.cts +17 -17
  396. package/dist/ui/context-menu.d.ts +17 -17
  397. package/dist/ui/context-menu.js +1 -1
  398. package/dist/ui/context-menu.js.map +1 -1
  399. package/dist/ui/dialog.cjs +1 -1
  400. package/dist/ui/dialog.d.cts +1 -1
  401. package/dist/ui/dialog.d.ts +1 -1
  402. package/dist/ui/dialog.js +1 -1
  403. package/dist/ui/dropdown-menu.cjs +1 -1
  404. package/dist/ui/dropdown-menu.d.cts +17 -18
  405. package/dist/ui/dropdown-menu.d.ts +17 -18
  406. package/dist/ui/dropdown-menu.js +1 -1
  407. package/dist/ui/file-uploader.cjs +2 -2
  408. package/dist/ui/file-uploader.cjs.map +1 -1
  409. package/dist/ui/file-uploader.d.cts +5 -5
  410. package/dist/ui/file-uploader.d.ts +5 -5
  411. package/dist/ui/file-uploader.js +2 -2
  412. package/dist/ui/file-uploader.js.map +1 -1
  413. package/dist/ui/form.cjs +1 -1
  414. package/dist/ui/form.d.cts +7 -7
  415. package/dist/ui/form.d.ts +7 -7
  416. package/dist/ui/form.js +1 -1
  417. package/dist/ui/hover-card.cjs.map +1 -1
  418. package/dist/ui/hover-card.d.cts +4 -4
  419. package/dist/ui/hover-card.d.ts +4 -4
  420. package/dist/ui/hover-card.js.map +1 -1
  421. package/dist/ui/input-otp.cjs.map +1 -1
  422. package/dist/ui/input-otp.d.cts +6 -6
  423. package/dist/ui/input-otp.d.ts +6 -6
  424. package/dist/ui/input-otp.js.map +1 -1
  425. package/dist/ui/input.cjs +1 -1
  426. package/dist/ui/input.d.cts +1 -1
  427. package/dist/ui/input.d.ts +1 -1
  428. package/dist/ui/input.js +1 -1
  429. package/dist/ui/inputs/search-input.cjs +1 -1
  430. package/dist/ui/inputs/search-input.d.cts +3 -3
  431. package/dist/ui/inputs/search-input.d.ts +3 -3
  432. package/dist/ui/inputs/search-input.js +1 -1
  433. package/dist/ui/label.cjs +1 -1
  434. package/dist/ui/label.d.cts +2 -2
  435. package/dist/ui/label.d.ts +2 -2
  436. package/dist/ui/label.js +1 -1
  437. package/dist/ui/menubar.cjs +1 -1
  438. package/dist/ui/menubar.cjs.map +1 -1
  439. package/dist/ui/menubar.d.cts +18 -18
  440. package/dist/ui/menubar.d.ts +18 -18
  441. package/dist/ui/menubar.js +1 -1
  442. package/dist/ui/menubar.js.map +1 -1
  443. package/dist/ui/multi-select.cjs +1 -1
  444. package/dist/ui/multi-select.d.cts +4 -4
  445. package/dist/ui/multi-select.d.ts +4 -4
  446. package/dist/ui/multi-select.js +1 -1
  447. package/dist/ui/navigation-menu.cjs +1 -1
  448. package/dist/ui/navigation-menu.cjs.map +1 -1
  449. package/dist/ui/navigation-menu.d.cts +9 -9
  450. package/dist/ui/navigation-menu.d.ts +9 -9
  451. package/dist/ui/navigation-menu.js +1 -1
  452. package/dist/ui/navigation-menu.js.map +1 -1
  453. package/dist/ui/pagination.cjs +1 -1
  454. package/dist/ui/pagination.cjs.map +1 -1
  455. package/dist/ui/pagination.d.cts +10 -10
  456. package/dist/ui/pagination.d.ts +10 -10
  457. package/dist/ui/pagination.js +1 -1
  458. package/dist/ui/pagination.js.map +1 -1
  459. package/dist/ui/popover.cjs +1 -1
  460. package/dist/ui/popover.d.cts +5 -7
  461. package/dist/ui/popover.d.ts +5 -7
  462. package/dist/ui/popover.js +1 -1
  463. package/dist/ui/progress.cjs +1 -1
  464. package/dist/ui/progress.d.cts +2 -2
  465. package/dist/ui/progress.d.ts +2 -2
  466. package/dist/ui/progress.js +1 -1
  467. package/dist/ui/radio-group.cjs +1 -1
  468. package/dist/ui/radio-group.cjs.map +1 -1
  469. package/dist/ui/radio-group.d.ts +3 -3
  470. package/dist/ui/radio-group.js +1 -1
  471. package/dist/ui/radio-group.js.map +1 -1
  472. package/dist/ui/resizable.cjs.map +1 -1
  473. package/dist/ui/resizable.d.cts +4 -4
  474. package/dist/ui/resizable.d.ts +4 -4
  475. package/dist/ui/resizable.js.map +1 -1
  476. package/dist/ui/scroll-area.d.cts +3 -3
  477. package/dist/ui/scroll-area.d.ts +3 -3
  478. package/dist/ui/select.cjs +1 -1
  479. package/dist/ui/select.d.cts +12 -13
  480. package/dist/ui/select.d.ts +12 -13
  481. package/dist/ui/select.js +1 -1
  482. package/dist/ui/separator.cjs +1 -1
  483. package/dist/ui/separator.d.cts +1 -1
  484. package/dist/ui/separator.d.ts +1 -1
  485. package/dist/ui/separator.js +1 -1
  486. package/dist/ui/sheet.cjs +1 -1
  487. package/dist/ui/sheet.d.cts +10 -11
  488. package/dist/ui/sheet.d.ts +10 -11
  489. package/dist/ui/sheet.js +1 -1
  490. package/dist/ui/sidebar.cjs +1 -1
  491. package/dist/ui/sidebar.d.cts +41 -41
  492. package/dist/ui/sidebar.d.ts +41 -41
  493. package/dist/ui/sidebar.js +1 -1
  494. package/dist/ui/skeleton.cjs +1 -1
  495. package/dist/ui/skeleton.d.cts +2 -3
  496. package/dist/ui/skeleton.d.ts +2 -3
  497. package/dist/ui/skeleton.js +1 -1
  498. package/dist/ui/slider.cjs.map +1 -1
  499. package/dist/ui/slider.d.cts +2 -2
  500. package/dist/ui/slider.d.ts +2 -2
  501. package/dist/ui/slider.js.map +1 -1
  502. package/dist/ui/sonner.cjs +1 -1
  503. package/dist/ui/sonner.cjs.map +1 -1
  504. package/dist/ui/sonner.d.cts +2 -2
  505. package/dist/ui/sonner.d.ts +2 -2
  506. package/dist/ui/sonner.js +1 -1
  507. package/dist/ui/sonner.js.map +1 -1
  508. package/dist/ui/switch.cjs +1 -1
  509. package/dist/ui/switch.d.cts +2 -2
  510. package/dist/ui/switch.d.ts +2 -2
  511. package/dist/ui/switch.js +1 -1
  512. package/dist/ui/table.cjs +1 -1
  513. package/dist/ui/table.d.cts +9 -9
  514. package/dist/ui/table.d.ts +9 -9
  515. package/dist/ui/table.js +1 -1
  516. package/dist/ui/tabs.cjs +1 -1
  517. package/dist/ui/tabs.cjs.map +1 -1
  518. package/dist/ui/tabs.d.cts +5 -6
  519. package/dist/ui/tabs.d.ts +0 -1
  520. package/dist/ui/tabs.js +1 -1
  521. package/dist/ui/tabs.js.map +1 -1
  522. package/dist/ui/textarea.cjs +1 -1
  523. package/dist/ui/textarea.d.cts +3 -3
  524. package/dist/ui/textarea.d.ts +3 -3
  525. package/dist/ui/textarea.js +1 -1
  526. package/dist/ui/toggle-group.cjs +1 -1
  527. package/dist/ui/toggle-group.cjs.map +1 -1
  528. package/dist/ui/toggle-group.d.cts +4 -4
  529. package/dist/ui/toggle-group.d.ts +5 -5
  530. package/dist/ui/toggle-group.js +1 -1
  531. package/dist/ui/toggle-group.js.map +1 -1
  532. package/dist/ui/toggle.cjs +1 -1
  533. package/dist/ui/toggle.d.cts +1 -1
  534. package/dist/ui/toggle.d.ts +1 -1
  535. package/dist/ui/toggle.js +1 -1
  536. package/dist/ui/tooltip.cjs +1 -1
  537. package/dist/ui/tooltip.d.cts +1 -1
  538. package/dist/ui/tooltip.d.ts +1 -1
  539. package/dist/ui/tooltip.js +1 -1
  540. package/dist/utils-BsjVK5EW.cjs.map +1 -1
  541. package/dist/utils-D9AH0PUV.js.map +1 -1
  542. package/package.json +23 -2
  543. package/packages/components/cards/simple-card.tsx +11 -25
  544. package/packages/components/data-display/country.tsx +34 -40
  545. package/packages/components/data-display/data-list.tsx +15 -24
  546. package/packages/components/data-display/date-tooltip.tsx +9 -23
  547. package/packages/components/data-display/date.tsx +90 -148
  548. package/packages/components/data-display/empty.tsx +8 -20
  549. package/packages/components/data-display/name.tsx +9 -11
  550. package/packages/components/data-display/phone-number.tsx +7 -15
  551. package/packages/components/data-display/role-badge.tsx +21 -25
  552. package/packages/components/data-display/statistic.tsx +61 -63
  553. package/packages/components/dialogs/confirm-dialog.tsx +12 -19
  554. package/packages/components/dialogs/detail-dialog/component/header.tsx +3 -7
  555. package/packages/components/dialogs/detail-dialog/component/main.tsx +15 -19
  556. package/packages/components/dialogs/detail-dialog/component/sidebar.tsx +256 -385
  557. package/packages/components/dialogs/detail-dialog/component/wrapper.tsx +6 -8
  558. package/packages/components/dialogs/detail-dialog/index.tsx +26 -35
  559. package/packages/components/dialogs/error-dialog.tsx +14 -28
  560. package/packages/components/dialogs/form-dialog.tsx +27 -59
  561. package/packages/components/dialogs/loading-dialog.tsx +8 -11
  562. package/packages/components/forms/combobox-field.tsx +44 -81
  563. package/packages/components/forms/date-field.tsx +2 -5
  564. package/packages/components/forms/form-wrapper.tsx +45 -71
  565. package/packages/components/forms/multi-select-field.tsx +2 -2
  566. package/packages/components/forms/number-field.tsx +1 -3
  567. package/packages/components/forms/password-field.tsx +1 -1
  568. package/packages/components/forms/select-field.tsx +1 -1
  569. package/packages/components/forms/switch-field.tsx +2 -4
  570. package/packages/components/forms/text-field.tsx +3 -10
  571. package/packages/components/forms/textarea-field.tsx +3 -11
  572. package/packages/components/layouts/flex.tsx +55 -66
  573. package/packages/components/layouts/main/content.tsx +3 -3
  574. package/packages/components/layouts/main/header.tsx +15 -27
  575. package/packages/components/layouts/main/wrapper.tsx +3 -3
  576. package/packages/components/styles/base.css +29 -0
  577. package/packages/components/styles/loader.css +113 -0
  578. package/packages/components/styles/theme.css +103 -0
  579. package/packages/components/styles/typography.css +6 -0
  580. package/packages/components/table/data-table-pagination.tsx +15 -44
  581. package/packages/components/table/data-table.tsx +86 -173
  582. package/packages/components/table/index.tsx +31 -50
  583. package/packages/components/typography/paragraph.tsx +18 -21
  584. package/packages/components/typography/title.tsx +23 -28
  585. package/packages/components/ui/alert-dialog.tsx +44 -118
  586. package/packages/components/ui/alert.tsx +19 -46
  587. package/packages/components/ui/aspect-ratio.tsx +7 -16
  588. package/packages/components/ui/avatar.tsx +12 -39
  589. package/packages/components/ui/badge.tsx +35 -41
  590. package/packages/components/ui/breadcrumb.tsx +26 -62
  591. package/packages/components/ui/button.tsx +163 -46
  592. package/packages/components/ui/buttons/add-new.tsx +9 -16
  593. package/packages/components/ui/buttons/edit.tsx +7 -13
  594. package/packages/components/ui/buttons/refresh.tsx +10 -21
  595. package/packages/components/ui/buttons/trash.tsx +7 -13
  596. package/packages/components/ui/buttons/upload-image.tsx +10 -13
  597. package/packages/components/ui/calendar.tsx +56 -124
  598. package/packages/components/ui/card.tsx +21 -72
  599. package/packages/components/ui/carousel.tsx +79 -133
  600. package/packages/components/ui/checkbox.tsx +19 -29
  601. package/packages/components/ui/collapsible.tsx +10 -26
  602. package/packages/components/ui/command.tsx +65 -144
  603. package/packages/components/ui/context-menu.tsx +48 -110
  604. package/packages/components/ui/dialog.tsx +55 -110
  605. package/packages/components/ui/dropdown-menu.tsx +100 -169
  606. package/packages/components/ui/file-uploader.tsx +93 -151
  607. package/packages/components/ui/form.tsx +51 -115
  608. package/packages/components/ui/hover-card.tsx +12 -23
  609. package/packages/components/ui/input-otp.tsx +20 -29
  610. package/packages/components/ui/input.tsx +34 -34
  611. package/packages/components/ui/inputs/number-input.tsx +5 -13
  612. package/packages/components/ui/inputs/password-input.tsx +2 -8
  613. package/packages/components/ui/inputs/search-input.tsx +7 -7
  614. package/packages/components/ui/label.tsx +14 -17
  615. package/packages/components/ui/menubar.tsx +46 -109
  616. package/packages/components/ui/multi-select.tsx +250 -317
  617. package/packages/components/ui/navigation-menu.tsx +34 -80
  618. package/packages/components/ui/pagination.tsx +28 -86
  619. package/packages/components/ui/popover.tsx +28 -43
  620. package/packages/components/ui/progress.tsx +8 -19
  621. package/packages/components/ui/radio-group.tsx +19 -36
  622. package/packages/components/ui/resizable.tsx +14 -22
  623. package/packages/components/ui/scroll-area.tsx +14 -30
  624. package/packages/components/ui/select.tsx +94 -141
  625. package/packages/components/ui/separator.tsx +11 -13
  626. package/packages/components/ui/sheet.tsx +62 -98
  627. package/packages/components/ui/sidebar.tsx +287 -363
  628. package/packages/components/ui/skeleton.tsx +5 -12
  629. package/packages/components/ui/slider.tsx +11 -28
  630. package/packages/components/ui/sonner.tsx +20 -23
  631. package/packages/components/ui/switch.tsx +28 -34
  632. package/packages/components/ui/table.tsx +28 -80
  633. package/packages/components/ui/tabs.tsx +29 -61
  634. package/packages/components/ui/textarea.tsx +23 -24
  635. package/packages/components/ui/toggle-group.tsx +19 -28
  636. package/packages/components/ui/toggle.tsx +16 -29
  637. package/packages/components/ui/tooltip.tsx +26 -44
  638. package/packages/constants.tsx +16 -50
  639. package/packages/hooks/use-callback-ref.ts +7 -12
  640. package/packages/hooks/use-controllable-state.ts +37 -46
  641. package/packages/hooks/use-mobile.ts +11 -13
  642. package/packages/index.css +121 -381
  643. package/packages/lib/utils.ts +12 -16
  644. package/packages/stories/1.Guideline.mdx +3 -0
  645. package/packages/stories/2.Colors.mdx +145 -0
  646. package/packages/stories/3.Pypography.mdx +51 -0
  647. package/packages/stories/cards/simple-card.stories.tsx +24 -0
  648. package/packages/stories/data-display/data-list.stories.tsx +22 -0
  649. package/packages/stories/data-display/empty.stories.tsx +13 -0
  650. package/packages/stories/data-display/form-dialog.stories.tsx +27 -0
  651. package/packages/stories/data-display/name.stories.tsx +25 -0
  652. package/packages/stories/data-display/phone-number.stories.tsx +17 -0
  653. package/packages/stories/data-display/statistic.stories.tsx +41 -0
  654. package/packages/stories/dialogs/confirm-dialog.stories.tsx +26 -0
  655. package/packages/stories/dialogs/detail-dialog.stories.tsx +34 -0
  656. package/packages/stories/dialogs/error-dialog.stories.tsx +27 -0
  657. package/packages/stories/dialogs/loading-dialog.stories.tsx +16 -0
  658. package/packages/stories/forms/combobox-field.stories.tsx +38 -0
  659. package/packages/stories/forms/form-wrapper.stories.tsx +59 -0
  660. package/packages/stories/forms/multi-select-field.stories.tsx +42 -0
  661. package/packages/stories/forms/number-field.stories.tsx +35 -0
  662. package/packages/stories/forms/select-field.stories.tsx +39 -0
  663. package/packages/stories/forms/switch-field.stories.tsx +36 -0
  664. package/packages/stories/forms/text-field.stories.tsx +41 -0
  665. package/packages/stories/forms/textarea-field.stories.tsx +34 -0
  666. package/packages/stories/typography/paragraph.stories.tsx +45 -0
  667. package/packages/stories/typography/title.stories.tsx +39 -0
  668. package/packages/stories/ui/alert-dialog.stories.tsx +49 -0
  669. package/packages/stories/ui/alert.stories.tsx +63 -0
  670. package/packages/stories/ui/aspect-ratio.stories.tsx +22 -0
  671. package/packages/stories/ui/badge.stories.tsx +170 -0
  672. package/packages/stories/ui/breadcrumb.stories.tsx +172 -0
  673. package/packages/stories/ui/button.stories.tsx +181 -0
  674. package/packages/stories/ui/card.stories.tsx +58 -0
  675. package/packages/stories/ui/checkbox.stories.tsx +48 -0
  676. package/packages/stories/ui/command.stories.tsx +58 -0
  677. package/packages/stories/ui/dialog.stories.tsx +55 -0
  678. package/packages/stories/ui/dropdown-menu.stories.tsx +89 -0
  679. package/packages/stories/ui/file-uploader.stories.tsx +18 -0
  680. package/packages/stories/ui/input.stories.tsx +38 -0
  681. package/packages/stories/ui/label.stories.tsx +17 -0
  682. package/packages/stories/ui/multi-select.stories.tsx +29 -0
  683. package/packages/stories/ui/popover.stories.tsx +52 -0
  684. package/packages/stories/ui/progress.stories.tsx +17 -0
  685. package/packages/stories/ui/radio-group.stories.tsx +31 -0
  686. package/packages/stories/ui/select.stories.tsx +31 -0
  687. package/packages/stories/ui/separator.stories.tsx +31 -0
  688. package/packages/stories/ui/sheet.stories.tsx +50 -0
  689. package/packages/stories/ui/skeleton.stories.tsx +27 -0
  690. package/packages/stories/ui/switch.stories.tsx +21 -0
  691. package/packages/stories/ui/table.stories.tsx +82 -0
  692. package/packages/stories/ui/tabs.stories.tsx +70 -0
  693. package/packages/stories/ui/textarea.stories.tsx +15 -0
  694. package/packages/stories/ui/toaster.stories.tsx +87 -0
  695. package/packages/types.ts +32 -32
  696. package/dist/add-new-BTpI7Ph7.cjs.map +0 -1
  697. package/dist/add-new-DmwkHRmn.js +0 -2
  698. package/dist/add-new-DmwkHRmn.js.map +0 -1
  699. package/dist/alert-dialog-6r43mVE-.js +0 -2
  700. package/dist/alert-dialog-6r43mVE-.js.map +0 -1
  701. package/dist/alert-dialog-DEOx5Psb.cjs +0 -2
  702. package/dist/alert-dialog-DEOx5Psb.cjs.map +0 -1
  703. package/dist/badge-DHRQ-uwY.cjs.map +0 -1
  704. package/dist/badge-bLqn3EB9.js.map +0 -1
  705. package/dist/button-BgNGzTUH.cjs +0 -2
  706. package/dist/button-BgNGzTUH.cjs.map +0 -1
  707. package/dist/button-CqGv362j.d.cts +0 -23
  708. package/dist/button-DFvetIX8.js +0 -2
  709. package/dist/button-DFvetIX8.js.map +0 -1
  710. package/dist/calendar-BG-jrCZc.js.map +0 -1
  711. package/dist/calendar-Cck0PPMB.cjs.map +0 -1
  712. package/dist/card-D8cxRC5y.js +0 -2
  713. package/dist/card-D8cxRC5y.js.map +0 -1
  714. package/dist/card-Dta5eW8u.cjs +0 -2
  715. package/dist/card-Dta5eW8u.cjs.map +0 -1
  716. package/dist/command-Bfx_Gzjv.cjs +0 -2
  717. package/dist/command-Bfx_Gzjv.cjs.map +0 -1
  718. package/dist/command-ClNBSZd3.js +0 -2
  719. package/dist/command-ClNBSZd3.js.map +0 -1
  720. package/dist/date-B1g1OMYc.js.map +0 -1
  721. package/dist/date-Cw6Jf7k6.cjs.map +0 -1
  722. package/dist/dialog-Bh4dL0ew.cjs +0 -2
  723. package/dist/dialog-Bh4dL0ew.cjs.map +0 -1
  724. package/dist/dialog-CzSIPgHw.js +0 -2
  725. package/dist/dialog-CzSIPgHw.js.map +0 -1
  726. package/dist/dropdown-menu-DTFOCPH_.js +0 -2
  727. package/dist/dropdown-menu-DTFOCPH_.js.map +0 -1
  728. package/dist/dropdown-menu-qX11mJ9V.cjs +0 -2
  729. package/dist/dropdown-menu-qX11mJ9V.cjs.map +0 -1
  730. package/dist/error-dialog-Dg_OHJlH.js.map +0 -1
  731. package/dist/error-dialog-OeWIgIvF.cjs.map +0 -1
  732. package/dist/flex-B5MQmxX8.cjs.map +0 -1
  733. package/dist/flex-CBAzUoXK.js.map +0 -1
  734. package/dist/form-BMnG2xLt.js.map +0 -1
  735. package/dist/form-BbU1TIro.cjs.map +0 -1
  736. package/dist/form-wrapper-DeSGl64P.cjs.map +0 -1
  737. package/dist/form-wrapper-wHzrskjb.js.map +0 -1
  738. package/dist/input-B030EUY5.js +0 -2
  739. package/dist/input-B030EUY5.js.map +0 -1
  740. package/dist/input-mUjZrK2c.cjs +0 -2
  741. package/dist/input-mUjZrK2c.cjs.map +0 -1
  742. package/dist/label-BrGRueFm.js +0 -2
  743. package/dist/label-BrGRueFm.js.map +0 -1
  744. package/dist/label-Cmi31X9c.cjs +0 -2
  745. package/dist/label-Cmi31X9c.cjs.map +0 -1
  746. package/dist/multi-select-BOmq9vOB.cjs +0 -2
  747. package/dist/multi-select-BOmq9vOB.cjs.map +0 -1
  748. package/dist/multi-select-CEU50SQU.js +0 -2
  749. package/dist/multi-select-CEU50SQU.js.map +0 -1
  750. package/dist/paragraph-CuR_8J0O.js +0 -2
  751. package/dist/paragraph-CuR_8J0O.js.map +0 -1
  752. package/dist/paragraph-D-nYwoh7.cjs +0 -2
  753. package/dist/paragraph-D-nYwoh7.cjs.map +0 -1
  754. package/dist/popover-BD0lz8Fh.cjs +0 -2
  755. package/dist/popover-BD0lz8Fh.cjs.map +0 -1
  756. package/dist/popover-DJnARyyO.js +0 -2
  757. package/dist/popover-DJnARyyO.js.map +0 -1
  758. package/dist/progress-Bu1_efDo.cjs +0 -2
  759. package/dist/progress-Bu1_efDo.cjs.map +0 -1
  760. package/dist/progress-CeXKNvJc.js +0 -2
  761. package/dist/progress-CeXKNvJc.js.map +0 -1
  762. package/dist/refresh-H87p0PFk.cjs.map +0 -1
  763. package/dist/refresh-h_6T8REa.js +0 -2
  764. package/dist/refresh-h_6T8REa.js.map +0 -1
  765. package/dist/search-input-BUIwdK4e.js.map +0 -1
  766. package/dist/search-input-DXh-cAVU.cjs.map +0 -1
  767. package/dist/select-C82socRt.cjs +0 -2
  768. package/dist/select-C82socRt.cjs.map +0 -1
  769. package/dist/select-pBujVa9I.js +0 -2
  770. package/dist/select-pBujVa9I.js.map +0 -1
  771. package/dist/separator-Bi0LBh7T.cjs +0 -2
  772. package/dist/separator-Bi0LBh7T.cjs.map +0 -1
  773. package/dist/separator-DMdqEz29.js +0 -2
  774. package/dist/separator-DMdqEz29.js.map +0 -1
  775. package/dist/sheet-2JqHfdYi.js +0 -2
  776. package/dist/sheet-2JqHfdYi.js.map +0 -1
  777. package/dist/sheet-CjCT1GXK.cjs +0 -2
  778. package/dist/sheet-CjCT1GXK.cjs.map +0 -1
  779. package/dist/sidebar-99vu8Xl2.cjs +0 -2
  780. package/dist/sidebar-99vu8Xl2.cjs.map +0 -1
  781. package/dist/sidebar-Ci1XCkoo.cjs +0 -2
  782. package/dist/sidebar-Ci1XCkoo.cjs.map +0 -1
  783. package/dist/sidebar-acyFs4AU.js +0 -2
  784. package/dist/sidebar-acyFs4AU.js.map +0 -1
  785. package/dist/sidebar-b8PM_MQy.js +0 -2
  786. package/dist/sidebar-b8PM_MQy.js.map +0 -1
  787. package/dist/skeleton-D1_Brnl9.js +0 -2
  788. package/dist/skeleton-D1_Brnl9.js.map +0 -1
  789. package/dist/skeleton-DkSs2Vh3.cjs +0 -2
  790. package/dist/skeleton-DkSs2Vh3.cjs.map +0 -1
  791. package/dist/switch-CF4DRW_3.cjs +0 -2
  792. package/dist/switch-CF4DRW_3.cjs.map +0 -1
  793. package/dist/switch-_VCthKr7.js +0 -2
  794. package/dist/switch-_VCthKr7.js.map +0 -1
  795. package/dist/table-B7URcTid.cjs +0 -2
  796. package/dist/table-B7URcTid.cjs.map +0 -1
  797. package/dist/table-DrnU8YJP.js +0 -2
  798. package/dist/table-DrnU8YJP.js.map +0 -1
  799. package/dist/textarea--5AtST9C.js +0 -2
  800. package/dist/textarea--5AtST9C.js.map +0 -1
  801. package/dist/textarea-pwK3zC15.cjs +0 -2
  802. package/dist/textarea-pwK3zC15.cjs.map +0 -1
  803. package/dist/title-CA6PvqiD.js.map +0 -1
  804. package/dist/title-DrIfj31i.cjs.map +0 -1
  805. package/dist/toggle-BA0PLIVa.js.map +0 -1
  806. package/dist/toggle-Ddewmqst.cjs.map +0 -1
  807. package/dist/tooltip-CG3D3TIL.cjs +0 -2
  808. package/dist/tooltip-CG3D3TIL.cjs.map +0 -1
  809. package/dist/tooltip-DvNio7Zt.js +0 -2
  810. package/dist/tooltip-DvNio7Zt.js.map +0 -1
  811. package/dist/types-BVNbk1ZN.js.map +0 -1
  812. package/dist/types-CnMfjcgO.cjs.map +0 -1
@@ -1,155 +1,141 @@
1
- "use client";
2
- import React from "react";
3
- import { Command as CommandPrimitive, useCommandState } from "cmdk";
4
- import { PlusIcon, X } from "lucide-react";
5
-
6
- import {
7
- Command,
8
- CommandGroup,
9
- CommandItem,
10
- CommandList,
11
- CommandSeparator,
12
- } from "@/components/ui/command";
13
- import { cn } from "@/lib/utils";
14
-
15
- import { Button } from "./button";
1
+ 'use client'
2
+ import React from 'react'
3
+ import { Command as CommandPrimitive, useCommandState } from 'cmdk'
4
+ import { PlusIcon, X } from 'lucide-react'
5
+
6
+ import { Command, CommandGroup, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command'
7
+ import { Button } from '@/components/ui/button'
8
+ import { cn } from '@/lib/utils'
16
9
 
17
10
  export interface Option {
18
- value: string;
19
- label: string;
20
- disable?: boolean;
11
+ value: string
12
+ label: string
13
+ disable?: boolean
21
14
  /** fixed option that can‘t be removed. */
22
- fixed?: boolean;
15
+ fixed?: boolean
23
16
  /** Group the options by providing key. */
24
- [key: string]: string | boolean | undefined;
17
+ [key: string]: string | boolean | undefined
25
18
  }
26
19
  interface GroupOption {
27
- [key: string]: Option[];
20
+ [key: string]: Option[]
28
21
  }
29
22
 
30
23
  interface MultipleSelectorProps {
31
- value?: Option[];
32
- defaultOptions?: Option[];
24
+ value?: Option[]
25
+ defaultOptions?: Option[]
33
26
  /** manually controlled options */
34
- options?: Option[];
35
- placeholder?: string;
27
+ options?: Option[]
28
+ placeholder?: string
36
29
  /** Loading component. */
37
- loadingIndicator?: React.ReactNode;
30
+ loadingIndicator?: React.ReactNode
38
31
  /** Empty component. */
39
- emptyIndicator?: React.ReactNode;
32
+ emptyIndicator?: React.ReactNode
40
33
  /** Debounce time for async search. Only work with `onSearch`. */
41
- delay?: number;
34
+ delay?: number
42
35
  /**
43
36
  * Only work with `onSearch` prop. Trigger search when `onFocus`.
44
37
  * For example, when user click on the input, it will trigger the search to get initial options.
45
38
  **/
46
- triggerSearchOnFocus?: boolean;
39
+ triggerSearchOnFocus?: boolean
47
40
  /** async search */
48
- onSearch?: (value: string) => Promise<Option[]>;
41
+ onSearch?: (value: string) => Promise<Option[]>
49
42
  /**
50
43
  * sync search. This search will not showing loadingIndicator.
51
44
  * The rest props are the same as async search.
52
45
  * i.e.: creatable, groupBy, delay.
53
46
  **/
54
- onSearchSync?: (value: string) => Option[];
55
- onChange?: (options: Option[]) => void;
47
+ onSearchSync?: (value: string) => Option[]
48
+ onChange?: (options: Option[]) => void
56
49
  /** Limit the maximum number of selected options. */
57
- maxSelected?: number;
50
+ maxSelected?: number
58
51
  /** When the number of selected options exceeds the limit, the onMaxSelected will be called. */
59
- onMaxSelected?: (maxLimit: number) => void;
52
+ onMaxSelected?: (maxLimit: number) => void
60
53
  /** Hide the placeholder when there are options selected. */
61
- hidePlaceholderWhenSelected?: boolean;
62
- disabled?: boolean;
54
+ hidePlaceholderWhenSelected?: boolean
55
+ disabled?: boolean
63
56
  /** Group the options base on provided key. */
64
- groupBy?: string;
65
- className?: string;
66
- badgeClassName?: string;
57
+ groupBy?: string
58
+ className?: string
59
+ badgeClassName?: string
67
60
  /**
68
61
  * First item selected is a default behavior by cmdk. That is why the default is true.
69
62
  * This is a workaround solution by add a dummy item.
70
63
  *
71
64
  * @reference: https://github.com/pacocoursey/cmdk/issues/171
72
65
  */
73
- selectFirstItem?: boolean;
66
+ selectFirstItem?: boolean
74
67
  /** Allow user to create option when there is no option matched. */
75
- creatable?: boolean;
68
+ creatable?: boolean
76
69
  /** Props of `Command` */
77
- commandProps?: React.ComponentPropsWithoutRef<typeof Command>;
70
+ commandProps?: React.ComponentPropsWithoutRef<typeof Command>
78
71
  /** Props of `CommandInput` */
79
- inputProps?: Omit<
80
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>,
81
- "value" | "placeholder" | "disabled"
82
- >;
72
+ inputProps?: Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'placeholder' | 'disabled'>
83
73
  /** hide the clear all button. */
84
- hideClearAllButton?: boolean;
74
+ hideClearAllButton?: boolean
85
75
 
86
76
  /** Add new item event for select with search */
87
- onAddNewItem?: () => void;
77
+ onAddNewItem?: () => void
88
78
  }
89
79
 
90
80
  export interface MultipleSelectorRef {
91
- selectedValue: Option[];
92
- input: HTMLInputElement;
93
- focus: () => void;
94
- reset: () => void;
81
+ selectedValue: Option[]
82
+ input: HTMLInputElement
83
+ focus: () => void
84
+ reset: () => void
95
85
  }
96
86
 
97
87
  // eslint-disable-next-line react-refresh/only-export-components
98
88
  export function useDebounce<T>(value: T, delay?: number): T {
99
- const [debouncedValue, setDebouncedValue] = React.useState<T>(value);
89
+ const [debouncedValue, setDebouncedValue] = React.useState<T>(value)
100
90
 
101
91
  React.useEffect(() => {
102
- const timer = setTimeout(() => setDebouncedValue(value), delay || 500);
92
+ const timer = setTimeout(() => setDebouncedValue(value), delay || 500)
103
93
 
104
94
  return () => {
105
- clearTimeout(timer);
106
- };
107
- }, [value, delay]);
95
+ clearTimeout(timer)
96
+ }
97
+ }, [value, delay])
108
98
 
109
- return debouncedValue;
99
+ return debouncedValue
110
100
  }
111
101
 
112
102
  function transToGroupOption(options: Option[], groupBy?: string) {
113
103
  if (options.length === 0) {
114
- return {};
104
+ return {}
115
105
  }
116
106
  if (!groupBy) {
117
107
  return {
118
- "": options,
119
- };
108
+ '': options,
109
+ }
120
110
  }
121
111
 
122
- const groupOption: GroupOption = {};
112
+ const groupOption: GroupOption = {}
123
113
  options.forEach((option) => {
124
- const key = (option[groupBy] as string) || "";
114
+ const key = (option[groupBy] as string) || ''
125
115
  if (!groupOption[key]) {
126
- groupOption[key] = [];
116
+ groupOption[key] = []
127
117
  }
128
- groupOption[key].push(option);
129
- });
130
- return groupOption;
118
+ groupOption[key].push(option)
119
+ })
120
+ return groupOption
131
121
  }
132
122
 
133
123
  function removePickedOption(groupOption: GroupOption, picked: Option[]) {
134
- const cloneOption = JSON.parse(JSON.stringify(groupOption)) as GroupOption;
124
+ const cloneOption = JSON.parse(JSON.stringify(groupOption)) as GroupOption
135
125
 
136
126
  for (const [key, value] of Object.entries(cloneOption)) {
137
- cloneOption[key] = value.filter(
138
- (val) => !picked.find((p) => p.value === val.value),
139
- );
127
+ cloneOption[key] = value.filter((val) => !picked.find((p) => p.value === val.value))
140
128
  }
141
- return cloneOption;
129
+ return cloneOption
142
130
  }
143
131
 
144
132
  function isOptionsExist(groupOption: GroupOption, targetOption: Option[]) {
145
133
  for (const [, value] of Object.entries(groupOption)) {
146
- if (
147
- value.some((option) => targetOption.find((p) => p.value === option.value))
148
- ) {
149
- return true;
134
+ if (value.some((option) => targetOption.find((p) => p.value === option.value))) {
135
+ return true
150
136
  }
151
137
  }
152
- return false;
138
+ return false
153
139
  }
154
140
 
155
141
  /**
@@ -158,31 +144,17 @@ function isOptionsExist(groupOption: GroupOption, targetOption: Option[]) {
158
144
  *
159
145
  * @reference: https://github.com/hsuanyi-chou/shadcn-ui-expansions/issues/34#issuecomment-1949561607
160
146
  **/
161
- const CommandEmpty = React.forwardRef<
162
- HTMLDivElement,
163
- React.ComponentProps<typeof CommandPrimitive.Empty>
164
- >(({ className, ...props }, forwardedRef) => {
165
- const render = useCommandState((state) => state.filtered.count === 0);
166
-
167
- if (!render) return null;
168
-
169
- return (
170
- <div
171
- ref={forwardedRef}
172
- className={cn("px-2 py-4 text-center text-sm", className)}
173
- cmdk-empty=""
174
- role="presentation"
175
- {...props}
176
- />
177
- );
178
- });
179
-
180
- CommandEmpty.displayName = "CommandEmpty";
181
-
182
- const MultipleSelector = React.forwardRef<
183
- MultipleSelectorRef,
184
- MultipleSelectorProps
185
- >(
147
+ const CommandEmpty = React.forwardRef<HTMLDivElement, React.ComponentProps<typeof CommandPrimitive.Empty>>(({ className, ...props }, forwardedRef) => {
148
+ const render = useCommandState((state) => state.filtered.count === 0)
149
+
150
+ if (!render) return null
151
+
152
+ return <div ref={forwardedRef} className={cn('px-2 py-4 text-center text-sm', className)} cmdk-empty="" role="presentation" {...props} />
153
+ })
154
+
155
+ CommandEmpty.displayName = 'CommandEmpty'
156
+
157
+ export const MultipleSelector = React.forwardRef<MultipleSelectorRef, MultipleSelectorProps>(
186
158
  (
187
159
  {
188
160
  value,
@@ -212,20 +184,18 @@ const MultipleSelector = React.forwardRef<
212
184
  }: MultipleSelectorProps,
213
185
  ref: React.Ref<MultipleSelectorRef>,
214
186
  ) => {
215
- const inputRef = React.useRef<HTMLInputElement>(null);
216
- const dropdownRef = React.useRef<HTMLDivElement>(null); // Added this
187
+ const inputRef = React.useRef<HTMLInputElement>(null)
188
+ const dropdownRef = React.useRef<HTMLDivElement>(null) // Added this
217
189
 
218
- const [open, setOpen] = React.useState(false);
219
- const [onScrollbar, setOnScrollbar] = React.useState(false);
220
- const [isLoading, setIsLoading] = React.useState(false);
190
+ const [open, setOpen] = React.useState(false)
191
+ const [onScrollbar, setOnScrollbar] = React.useState(false)
192
+ const [isLoading, setIsLoading] = React.useState(false)
221
193
 
222
- const [selected, setSelected] = React.useState<Option[]>(value || []);
223
- const [options, setOptions] = React.useState<GroupOption>(
224
- transToGroupOption(arrayDefaultOptions, groupBy),
225
- );
226
- const [inputValue, setInputValue] = React.useState("");
194
+ const [selected, setSelected] = React.useState<Option[]>(value || [])
195
+ const [options, setOptions] = React.useState<GroupOption>(transToGroupOption(arrayDefaultOptions, groupBy))
196
+ const [inputValue, setInputValue] = React.useState('')
227
197
 
228
- const debouncedSearchTerm = useDebounce(inputValue, delay || 500);
198
+ const debouncedSearchTerm = useDebounce(inputValue, delay || 500)
229
199
 
230
200
  React.useImperativeHandle(
231
201
  ref,
@@ -236,145 +206,134 @@ const MultipleSelector = React.forwardRef<
236
206
  reset: () => setSelected([]),
237
207
  }),
238
208
  [selected],
239
- );
240
-
241
- const handleClickOutside = React.useCallback(
242
- (event: MouseEvent | TouchEvent) => {
243
- if (
244
- dropdownRef.current &&
245
- !dropdownRef.current.contains(event.target as Node) &&
246
- inputRef.current &&
247
- !inputRef.current.contains(event.target as Node)
248
- ) {
249
- setOpen(false);
250
- inputRef.current.blur();
251
- }
252
- },
253
- [],
254
- );
209
+ )
210
+
211
+ const handleClickOutside = React.useCallback((event: MouseEvent | TouchEvent) => {
212
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node) && inputRef.current && !inputRef.current.contains(event.target as Node)) {
213
+ setOpen(false)
214
+ inputRef.current.blur()
215
+ }
216
+ }, [])
255
217
 
256
218
  const handleUnselect = React.useCallback(
257
219
  (option: Option) => {
258
- const newOptions = selected.filter((s) => s.value !== option.value);
259
- setSelected(newOptions);
260
- onChange?.(newOptions);
220
+ const newOptions = selected.filter((s) => s.value !== option.value)
221
+ setSelected(newOptions)
222
+ onChange?.(newOptions)
261
223
  },
262
224
  [onChange, selected],
263
- );
225
+ )
264
226
 
265
227
  const handleKeyDown = React.useCallback(
266
228
  (e: React.KeyboardEvent<HTMLDivElement>) => {
267
- const input = inputRef.current;
268
- if (!input) return;
229
+ const input = inputRef.current
230
+ if (!input) return
269
231
 
270
- if (e.key === "Delete" || e.key === "Backspace") {
271
- if (input.value === "" && selected.length > 0) {
272
- const lastSelectOption = selected[selected.length - 1];
232
+ if (e.key === 'Delete' || e.key === 'Backspace') {
233
+ if (input.value === '' && selected.length > 0) {
234
+ const lastSelectOption = selected[selected.length - 1]
273
235
  // If last item is fixed, we should not remove it.
274
236
  if (!lastSelectOption.fixed) {
275
- handleUnselect(selected[selected.length - 1]);
237
+ handleUnselect(selected[selected.length - 1])
276
238
  }
277
239
  }
278
240
  }
279
241
 
280
242
  // This is not a default behavior of the <input /> field
281
- if (e.key === "Escape") {
282
- input.blur();
243
+ if (e.key === 'Escape') {
244
+ input.blur()
283
245
  }
284
246
  },
285
247
  [handleUnselect, selected],
286
- );
248
+ )
287
249
 
288
250
  React.useEffect(() => {
289
251
  if (open) {
290
- document.addEventListener("mousedown", handleClickOutside);
291
- document.addEventListener("touchend", handleClickOutside);
252
+ document.addEventListener('mousedown', handleClickOutside)
253
+ document.addEventListener('touchend', handleClickOutside)
292
254
  } else {
293
- document.removeEventListener("mousedown", handleClickOutside);
294
- document.removeEventListener("touchend", handleClickOutside);
255
+ document.removeEventListener('mousedown', handleClickOutside)
256
+ document.removeEventListener('touchend', handleClickOutside)
295
257
  }
296
258
 
297
259
  return () => {
298
- document.removeEventListener("mousedown", handleClickOutside);
299
- document.removeEventListener("touchend", handleClickOutside);
300
- };
260
+ document.removeEventListener('mousedown', handleClickOutside)
261
+ document.removeEventListener('touchend', handleClickOutside)
262
+ }
301
263
  // eslint-disable-next-line react-hooks/exhaustive-deps
302
- }, [open]);
264
+ }, [open])
303
265
 
304
266
  React.useEffect(() => {
305
267
  if (value) {
306
- setSelected(value);
268
+ setSelected(value)
307
269
  }
308
- }, [value]);
270
+ }, [value])
309
271
 
310
272
  React.useEffect(() => {
311
273
  /** If `onSearch` is provided, do not trigger options updated. */
312
274
  if (!arrayOptions || onSearch) {
313
- return;
275
+ return
314
276
  }
315
- const newOption = transToGroupOption(arrayOptions || [], groupBy);
277
+ const newOption = transToGroupOption(arrayOptions || [], groupBy)
316
278
  if (JSON.stringify(newOption) !== JSON.stringify(options)) {
317
- setOptions(newOption);
279
+ setOptions(newOption)
318
280
  }
319
- }, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options]);
281
+ }, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options])
320
282
 
321
283
  React.useEffect(() => {
322
284
  /** sync search */
323
285
 
324
286
  const doSearchSync = () => {
325
- const res = onSearchSync?.(debouncedSearchTerm);
326
- setOptions(transToGroupOption(res || [], groupBy));
327
- };
287
+ const res = onSearchSync?.(debouncedSearchTerm)
288
+ setOptions(transToGroupOption(res || [], groupBy))
289
+ }
328
290
 
329
291
  const exec = async () => {
330
- if (!onSearchSync || !open) return;
292
+ if (!onSearchSync || !open) return
331
293
 
332
294
  if (triggerSearchOnFocus) {
333
- doSearchSync();
295
+ doSearchSync()
334
296
  }
335
297
 
336
298
  if (debouncedSearchTerm) {
337
- doSearchSync();
299
+ doSearchSync()
338
300
  }
339
- };
301
+ }
340
302
 
341
- void exec();
303
+ void exec()
342
304
  // eslint-disable-next-line react-hooks/exhaustive-deps
343
- }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus]);
305
+ }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus])
344
306
 
345
307
  React.useEffect(() => {
346
308
  /** async search */
347
309
 
348
310
  const doSearch = async () => {
349
- setIsLoading(true);
350
- const res = await onSearch?.(debouncedSearchTerm);
351
- setOptions(transToGroupOption(res || [], groupBy));
352
- setIsLoading(false);
353
- };
311
+ setIsLoading(true)
312
+ const res = await onSearch?.(debouncedSearchTerm)
313
+ setOptions(transToGroupOption(res || [], groupBy))
314
+ setIsLoading(false)
315
+ }
354
316
 
355
317
  const exec = async () => {
356
- if (!onSearch || !open) return;
318
+ if (!onSearch || !open) return
357
319
 
358
320
  if (triggerSearchOnFocus) {
359
- await doSearch();
321
+ await doSearch()
360
322
  }
361
323
 
362
324
  if (debouncedSearchTerm) {
363
- await doSearch();
325
+ await doSearch()
364
326
  }
365
- };
327
+ }
366
328
 
367
- void exec();
329
+ void exec()
368
330
  // eslint-disable-next-line react-hooks/exhaustive-deps
369
- }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus]);
331
+ }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus])
370
332
 
371
333
  const CreatableItem = () => {
372
- if (!creatable) return undefined;
373
- if (
374
- isOptionsExist(options, [{ value: inputValue, label: inputValue }]) ||
375
- selected.find((s) => s.value === inputValue)
376
- ) {
377
- return undefined;
334
+ if (!creatable) return undefined
335
+ if (isOptionsExist(options, [{ value: inputValue, label: inputValue }]) || selected.find((s) => s.value === inputValue)) {
336
+ return undefined
378
337
  }
379
338
 
380
339
  const Item = (
@@ -382,39 +341,39 @@ const MultipleSelector = React.forwardRef<
382
341
  value={inputValue}
383
342
  className="cursor-pointer"
384
343
  onMouseDown={(e) => {
385
- e.preventDefault();
386
- e.stopPropagation();
344
+ e.preventDefault()
345
+ e.stopPropagation()
387
346
  }}
388
347
  onSelect={(value: string) => {
389
348
  if (selected.length >= maxSelected) {
390
- onMaxSelected?.(selected.length);
391
- return;
349
+ onMaxSelected?.(selected.length)
350
+ return
392
351
  }
393
- setInputValue("");
394
- const newOptions = [...selected, { value, label: value }];
395
- setSelected(newOptions);
396
- onChange?.(newOptions);
352
+ setInputValue('')
353
+ const newOptions = [...selected, { value, label: value }]
354
+ setSelected(newOptions)
355
+ onChange?.(newOptions)
397
356
  }}
398
357
  >
399
358
  {`Create "${inputValue}"`}
400
359
  </CommandItem>
401
- );
360
+ )
402
361
 
403
362
  // For normal creatable
404
363
  if (!onSearch && inputValue.length > 0) {
405
- return Item;
364
+ return Item
406
365
  }
407
366
 
408
367
  // For async search creatable. avoid showing creatable item before loading at first.
409
368
  if (onSearch && debouncedSearchTerm.length > 0 && !isLoading) {
410
- return Item;
369
+ return Item
411
370
  }
412
371
 
413
- return undefined;
414
- };
372
+ return undefined
373
+ }
415
374
 
416
375
  const EmptyItem = React.useCallback(() => {
417
- if (!emptyIndicator) return undefined;
376
+ if (!emptyIndicator) return undefined
418
377
 
419
378
  // For async search that showing emptyIndicator
420
379
  if (onSearch && !creatable && Object.keys(options).length === 0) {
@@ -422,66 +381,58 @@ const MultipleSelector = React.forwardRef<
422
381
  <CommandItem value="-" disabled>
423
382
  {emptyIndicator}
424
383
  </CommandItem>
425
- );
384
+ )
426
385
  }
427
386
 
428
- return <CommandEmpty>{emptyIndicator}</CommandEmpty>;
429
- }, [creatable, emptyIndicator, onSearch, options]);
387
+ return <CommandEmpty>{emptyIndicator}</CommandEmpty>
388
+ }, [creatable, emptyIndicator, onSearch, options])
430
389
 
431
- const selectables = React.useMemo<GroupOption>(
432
- () => removePickedOption(options, selected),
433
- [options, selected],
434
- );
390
+ const selectables = React.useMemo<GroupOption>(() => removePickedOption(options, selected), [options, selected])
435
391
 
436
392
  /** Avoid Creatable Selector freezing or lagging when paste a long string. */
437
393
  const commandFilter = React.useCallback(() => {
438
394
  if (commandProps?.filter) {
439
- return commandProps.filter;
395
+ return commandProps.filter
440
396
  }
441
397
 
442
398
  if (creatable) {
443
399
  return (value: string, search: string) => {
444
- return value.toLowerCase().includes(search.toLowerCase()) ? 1 : -1;
445
- };
400
+ return value.toLowerCase().includes(search.toLowerCase()) ? 1 : -1
401
+ }
446
402
  }
447
403
  // Using default filter in `cmdk`. We don&lsquo;t have to provide it.
448
- return undefined;
449
- }, [creatable, commandProps?.filter]);
404
+ return undefined
405
+ }, [creatable, commandProps?.filter])
450
406
 
451
407
  return (
452
408
  <Command
453
409
  ref={dropdownRef}
454
410
  {...commandProps}
455
411
  onKeyDown={(e) => {
456
- handleKeyDown(e);
457
- commandProps?.onKeyDown?.(e);
412
+ handleKeyDown(e)
413
+ commandProps?.onKeyDown?.(e)
458
414
  }}
459
- className={cn(
460
- "h-auto overflow-visible bg-transparent",
461
- commandProps?.className,
462
- )}
463
- shouldFilter={
464
- commandProps?.shouldFilter !== undefined
465
- ? commandProps.shouldFilter
466
- : !onSearch
467
- } // When onSearch is provided, we don&lsquo;t want to filter the options. You can still override it.
415
+ className={cn('h-auto overflow-visible bg-transparent', commandProps?.className)}
416
+ shouldFilter={commandProps?.shouldFilter !== undefined ? commandProps.shouldFilter : !onSearch} // When onSearch is provided, we don&lsquo;t want to filter the options. You can still override it.
468
417
  filter={commandFilter()}
469
418
  >
470
419
  <div
471
420
  className={cn(
472
- "border-input focus-within:border-primary focus-within:ring-ring relative rounded-md border text-sm transition-shadow focus-within:ring-4 focus-within:outline-hidden",
473
- "has-disabled:bg-muted",
474
- "has-disabled:text-muted-foreground",
475
- {
476
- "p-1": selected.length !== 0,
477
- "cursor-text": !disabled && selected.length !== 0,
478
- },
479
- !hideClearAllButton && "pe-9",
421
+ 'border-border-weak relative rounded-md border text-sm transition-shadow',
422
+ 'focus-within:border-primary',
423
+ 'focus-within:ring-primary-weak',
424
+ 'focus-within:ring-4',
425
+ 'focus-within:outline-hidden',
426
+ 'has-disabled:bg-muted',
427
+ 'has-disabled:text-muted-foreground',
428
+ selected.length !== 0 && 'p-1',
429
+ !disabled && selected.length !== 0 && 'cursor-text',
430
+ !hideClearAllButton && 'pe-9',
480
431
  className,
481
432
  )}
482
433
  onClick={() => {
483
- if (disabled) return;
484
- inputRef?.current?.focus();
434
+ if (disabled) return
435
+ inputRef?.current?.focus()
485
436
  }}
486
437
  >
487
438
  <div className="flex flex-wrap gap-1">
@@ -490,7 +441,14 @@ const MultipleSelector = React.forwardRef<
490
441
  <div
491
442
  key={option.value}
492
443
  className={cn(
493
- "animate-fadeIn bg-background text-secondary-foreground hover:bg-background relative inline-flex h-7 cursor-default items-center rounded-md border border-solid ps-2 pe-7 pl-2 text-xs font-medium transition-all disabled:cursor-not-allowed disabled:opacity-50 data-fixed:pe-2",
444
+ 'animate-fadeIn',
445
+ 'bg-background',
446
+ 'hover:bg-background',
447
+ 'border-border-weak border border-solid',
448
+ 'text-text-positive-weak relative inline-flex h-7 cursor-default items-center rounded-md ps-2 pe-7 pl-2 text-xs font-medium transition-all',
449
+ 'disabled:cursor-not-allowed',
450
+ 'disabled:opacity-50',
451
+ 'data-fixed:pe-2',
494
452
  badgeClassName,
495
453
  )}
496
454
  data-fixed={option.fixed}
@@ -501,21 +459,20 @@ const MultipleSelector = React.forwardRef<
501
459
  type="button"
502
460
  disabled={disabled || option.fixed}
503
461
  className={cn(
504
- "text-muted-foreground/80 absolute -inset-y-px -end-px flex size-7 items-center justify-center rounded-e-lg border border-transparent p-0 outline-0 transition-colors",
505
- "hover:text-foreground",
506
- "focus-visible:outline",
507
- "focus-visible:outline-2",
508
- "focus-visible:outline-ring/70",
509
- "disabled:hover:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
462
+ 'text-text-positive-muted absolute -inset-y-px -end-px flex size-7 items-center justify-center rounded-e-lg border border-transparent p-0 outline-0 transition-colors',
463
+ 'hover:text-foreground',
464
+ 'focus-visible:outline',
465
+ 'focus-visible:outline-2',
466
+ 'focus-visible:outline-primary-weak',
467
+ 'disabled:hover:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
510
468
  )}
511
469
  onKeyDown={(e) => {
512
- if (e.key === "Enter") {
513
- handleUnselect(option);
514
- }
470
+ if (e.key !== 'Enter') return
471
+ handleUnselect(option)
515
472
  }}
516
473
  onMouseDown={(e) => {
517
- e.preventDefault();
518
- e.stopPropagation();
474
+ e.preventDefault()
475
+ e.stopPropagation()
519
476
  }}
520
477
  onClick={() => handleUnselect(option)}
521
478
  aria-label="Remove"
@@ -523,7 +480,7 @@ const MultipleSelector = React.forwardRef<
523
480
  <X size={14} strokeWidth={2} aria-hidden="true" />
524
481
  </button>
525
482
  </div>
526
- );
483
+ )
527
484
  })}
528
485
  {/* Avoid having the "Search" Icon */}
529
486
  <CommandPrimitive.Input
@@ -532,34 +489,30 @@ const MultipleSelector = React.forwardRef<
532
489
  value={inputValue}
533
490
  disabled={disabled}
534
491
  onValueChange={(value) => {
535
- setInputValue(value);
536
- inputProps?.onValueChange?.(value);
492
+ setInputValue(value)
493
+ inputProps?.onValueChange?.(value)
537
494
  }}
538
495
  onBlur={(event) => {
539
496
  if (!onScrollbar) {
540
- setOpen(false);
497
+ setOpen(false)
541
498
  }
542
- inputProps?.onBlur?.(event);
499
+ inputProps?.onBlur?.(event)
543
500
  }}
544
501
  onFocus={(event) => {
545
- setOpen(true);
502
+ setOpen(true)
546
503
  if (triggerSearchOnFocus) {
547
- onSearch?.(debouncedSearchTerm);
504
+ onSearch?.(debouncedSearchTerm)
548
505
  }
549
- inputProps?.onFocus?.(event);
506
+ inputProps?.onFocus?.(event)
550
507
  }}
551
- placeholder={
552
- hidePlaceholderWhenSelected && selected.length !== 0
553
- ? ""
554
- : placeholder
555
- }
508
+ placeholder={hidePlaceholderWhenSelected && selected.length !== 0 ? '' : placeholder}
556
509
  className={cn(
557
- "placeholder:text-muted-foreground flex-1 bg-transparent outline-hidden",
558
- "disabled:placeholder:text-transparent",
510
+ 'placeholder:text-text-positive-muted flex-1 bg-transparent outline-hidden',
511
+ 'disabled:placeholder:text-transparent',
559
512
  {
560
- "w-full": hidePlaceholderWhenSelected,
561
- "px-3 py-2": selected.length === 0,
562
- "ml-1": selected.length !== 0,
513
+ 'w-full': hidePlaceholderWhenSelected,
514
+ 'px-3 py-2': selected.length === 0,
515
+ 'ml-1': selected.length !== 0,
563
516
  },
564
517
  inputProps?.className,
565
518
  )}
@@ -567,21 +520,16 @@ const MultipleSelector = React.forwardRef<
567
520
  <button
568
521
  type="button"
569
522
  onClick={() => {
570
- setSelected(selected.filter((s) => s.fixed));
571
- onChange?.(selected.filter((s) => s.fixed));
523
+ setSelected(selected.filter((s) => s.fixed))
524
+ onChange?.(selected.filter((s) => s.fixed))
572
525
  }}
573
526
  className={cn(
574
- "text-muted-foreground/80",
575
- "absolute end-0 top-0 flex size-9 items-center justify-center rounded-lg border border-transparent transition-colors",
576
- "focus-visible:outline-2",
577
- "hover:text-foreground",
578
- "focus-visible:outline-ring/70",
579
- (hideClearAllButton ||
580
- disabled ||
581
- selected.length < 1 ||
582
- selected.filter(({ fixed }) => fixed).length ===
583
- selected.length) &&
584
- "hidden",
527
+ 'text-muted-foreground/80',
528
+ 'absolute end-0 top-0 flex size-9 items-center justify-center rounded-lg border border-transparent transition-colors',
529
+ 'focus-visible:outline-2',
530
+ 'hover:text-text-positive',
531
+ 'focus-visible:outline-primary-weak',
532
+ (hideClearAllButton || disabled || selected.length < 1 || selected.filter(({ fixed }) => fixed).length === selected.length) && 'hidden',
585
533
  )}
586
534
  aria-label="Clear all"
587
535
  >
@@ -592,40 +540,36 @@ const MultipleSelector = React.forwardRef<
592
540
  <div className="relative">
593
541
  <div
594
542
  className={cn(
595
- "border-input absolute top-2 z-10 w-full overflow-hidden rounded-lg border shadow-sm",
596
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
597
- !open && "hidden",
543
+ 'shadow-dropdown absolute top-2 z-10 w-full overflow-hidden rounded-lg',
544
+ 'data-[state=open]:animate-in',
545
+ 'data-[state=closed]:animate-out',
546
+ 'data-[state=closed]:fade-out-0',
547
+ 'data-[state=open]:fade-in-0',
548
+ 'data-[state=closed]:zoom-out-95',
549
+ 'data-[state=open]:zoom-in-95',
550
+ !open && 'hidden',
598
551
  )}
599
- data-state={open ? "open" : "closed"}
552
+ data-state={open ? 'open' : 'closed'}
600
553
  >
601
554
  {open && (
602
555
  <CommandList
603
- className="bg-popover text-popover-foreground shadow-lg outline-hidden"
556
+ className="shadow-lg outline-hidden"
604
557
  onMouseLeave={() => {
605
- setOnScrollbar(false);
558
+ setOnScrollbar(false)
606
559
  }}
607
560
  onMouseEnter={() => {
608
- setOnScrollbar(true);
561
+ setOnScrollbar(true)
609
562
  }}
610
563
  onMouseUp={() => {
611
- inputRef?.current?.focus();
564
+ inputRef?.current?.focus()
612
565
  }}
613
566
  >
614
567
  {onAddNewItem && (
615
568
  <>
616
569
  <CommandSeparator />
617
570
  <CommandGroup>
618
- <Button
619
- type="button"
620
- variant="ghost"
621
- className="w-full font-normal [&_div]:justify-start"
622
- onClick={onAddNewItem}
623
- >
624
- <PlusIcon
625
- size={14}
626
- className="-ms-2 opacity-60"
627
- aria-hidden="true"
628
- />
571
+ <Button type="button" variant="ghost" className="w-full font-normal [&_div]:justify-start" onClick={onAddNewItem}>
572
+ <PlusIcon size={14} className="opacity-60" aria-hidden="true" />
629
573
  Thêm mới
630
574
  </Button>
631
575
  </CommandGroup>
@@ -637,15 +581,9 @@ const MultipleSelector = React.forwardRef<
637
581
  <React.Fragment>
638
582
  {EmptyItem()}
639
583
  {CreatableItem()}
640
- {!selectFirstItem && (
641
- <CommandItem value="-" className="hidden" />
642
- )}
584
+ {!selectFirstItem && <CommandItem value="-" className="hidden" />}
643
585
  {Object.entries(selectables).map(([key, dropdowns]) => (
644
- <CommandGroup
645
- key={key}
646
- heading={key}
647
- className="h-full overflow-auto"
648
- >
586
+ <CommandGroup key={key} heading={key} className="h-full overflow-auto">
649
587
  {dropdowns.map((option) => {
650
588
  return (
651
589
  <CommandItem
@@ -653,28 +591,24 @@ const MultipleSelector = React.forwardRef<
653
591
  value={option.value}
654
592
  disabled={option.disable}
655
593
  onMouseDown={(e) => {
656
- e.preventDefault();
657
- e.stopPropagation();
594
+ e.preventDefault()
595
+ e.stopPropagation()
658
596
  }}
659
597
  onSelect={() => {
660
598
  if (selected.length >= maxSelected) {
661
- onMaxSelected?.(selected.length);
662
- return;
599
+ onMaxSelected?.(selected.length)
600
+ return
663
601
  }
664
- setInputValue("");
665
- const newOptions = [...selected, option];
666
- setSelected(newOptions);
667
- onChange?.(newOptions);
602
+ const newOptions = [...selected, option]
603
+ setInputValue('')
604
+ setSelected(newOptions)
605
+ onChange?.(newOptions)
668
606
  }}
669
- className={cn(
670
- "cursor-pointer",
671
- option.disable &&
672
- "cursor-not-allowed opacity-50",
673
- )}
607
+ className={cn('cursor-pointer', option.disable && 'cursor-not-allowed opacity-50')}
674
608
  >
675
609
  {option.label}
676
610
  </CommandItem>
677
- );
611
+ )
678
612
  })}
679
613
  </CommandGroup>
680
614
  ))}
@@ -685,9 +619,8 @@ const MultipleSelector = React.forwardRef<
685
619
  </div>
686
620
  </div>
687
621
  </Command>
688
- );
622
+ )
689
623
  },
690
- );
624
+ )
691
625
 
692
- MultipleSelector.displayName = "MultipleSelector";
693
- export default MultipleSelector;
626
+ MultipleSelector.displayName = 'MultipleSelector'