@codefast/ui 0.0.8 → 0.0.10

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 (459) hide show
  1. package/dist/accordion.d.mts +8 -4
  2. package/dist/accordion.d.ts +8 -4
  3. package/dist/accordion.js +42 -32
  4. package/dist/accordion.js.map +1 -1
  5. package/dist/accordion.mjs +42 -32
  6. package/dist/accordion.mjs.map +1 -1
  7. package/dist/alert-dialog.d.mts +17 -8
  8. package/dist/alert-dialog.d.ts +17 -8
  9. package/dist/alert-dialog.js +47 -75
  10. package/dist/alert-dialog.js.map +1 -1
  11. package/dist/alert-dialog.mjs +47 -75
  12. package/dist/alert-dialog.mjs.map +1 -1
  13. package/dist/alert.d.mts +10 -5
  14. package/dist/alert.d.ts +10 -5
  15. package/dist/alert.js +5 -26
  16. package/dist/alert.js.map +1 -1
  17. package/dist/alert.mjs +5 -26
  18. package/dist/alert.mjs.map +1 -1
  19. package/dist/aspect-ratio.d.mts +2 -1
  20. package/dist/aspect-ratio.d.ts +2 -1
  21. package/dist/aspect-ratio.js.map +1 -1
  22. package/dist/aspect-ratio.mjs.map +1 -1
  23. package/dist/avatar.d.mts +7 -4
  24. package/dist/avatar.d.ts +7 -4
  25. package/dist/avatar.js +3 -16
  26. package/dist/avatar.js.map +1 -1
  27. package/dist/avatar.mjs +3 -16
  28. package/dist/avatar.mjs.map +1 -1
  29. package/dist/badge.d.mts +5 -2
  30. package/dist/badge.d.ts +5 -2
  31. package/dist/badge.js +1 -5
  32. package/dist/badge.js.map +1 -1
  33. package/dist/badge.mjs +1 -5
  34. package/dist/badge.mjs.map +1 -1
  35. package/dist/blockquote.d.mts +5 -4
  36. package/dist/blockquote.d.ts +5 -4
  37. package/dist/blockquote.js.map +1 -1
  38. package/dist/blockquote.mjs.map +1 -1
  39. package/dist/box.d.mts +1 -1
  40. package/dist/box.d.ts +1 -1
  41. package/dist/box.js +4 -6
  42. package/dist/box.js.map +1 -1
  43. package/dist/box.mjs +4 -6
  44. package/dist/box.mjs.map +1 -1
  45. package/dist/breadcrumb.d.mts +18 -11
  46. package/dist/breadcrumb.d.ts +18 -11
  47. package/dist/breadcrumb.js +12 -39
  48. package/dist/breadcrumb.js.map +1 -1
  49. package/dist/breadcrumb.mjs +12 -39
  50. package/dist/breadcrumb.mjs.map +1 -1
  51. package/dist/button.d.mts +4 -2
  52. package/dist/button.d.ts +4 -2
  53. package/dist/button.js +3 -2
  54. package/dist/button.mjs +2 -1
  55. package/dist/calendar.d.mts +3 -2
  56. package/dist/calendar.d.ts +3 -2
  57. package/dist/calendar.js +7 -19
  58. package/dist/calendar.js.map +1 -1
  59. package/dist/calendar.mjs +6 -18
  60. package/dist/calendar.mjs.map +1 -1
  61. package/dist/card.d.mts +13 -7
  62. package/dist/card.d.ts +13 -7
  63. package/dist/card.js +7 -44
  64. package/dist/card.js.map +1 -1
  65. package/dist/card.mjs +7 -44
  66. package/dist/card.mjs.map +1 -1
  67. package/dist/carousel.d.mts +13 -8
  68. package/dist/carousel.d.ts +13 -8
  69. package/dist/carousel.js +104 -104
  70. package/dist/carousel.js.map +1 -1
  71. package/dist/carousel.mjs +104 -104
  72. package/dist/carousel.mjs.map +1 -1
  73. package/dist/checkbox-cards.d.mts +15 -0
  74. package/dist/checkbox-cards.d.ts +15 -0
  75. package/dist/checkbox-cards.js +56 -0
  76. package/dist/checkbox-cards.js.map +1 -0
  77. package/dist/checkbox-cards.mjs +56 -0
  78. package/dist/checkbox-cards.mjs.map +1 -0
  79. package/dist/checkbox-group.d.mts +13 -0
  80. package/dist/checkbox-group.d.ts +13 -0
  81. package/dist/checkbox-group.js +44 -0
  82. package/dist/checkbox-group.js.map +1 -0
  83. package/dist/checkbox-group.mjs +44 -0
  84. package/dist/checkbox-group.mjs.map +1 -0
  85. package/dist/checkbox-group.primitive.d.mts +38 -0
  86. package/dist/checkbox-group.primitive.d.ts +38 -0
  87. package/dist/checkbox-group.primitive.js +19 -0
  88. package/dist/checkbox-group.primitive.js.map +1 -0
  89. package/dist/checkbox-group.primitive.mjs +19 -0
  90. package/dist/checkbox-group.primitive.mjs.map +1 -0
  91. package/dist/checkbox.d.mts +3 -2
  92. package/dist/checkbox.d.ts +3 -2
  93. package/dist/checkbox.js +5 -1
  94. package/dist/checkbox.js.map +1 -1
  95. package/dist/checkbox.mjs +5 -1
  96. package/dist/checkbox.mjs.map +1 -1
  97. package/dist/chunk-3ZZ3SRTJ.js +148 -0
  98. package/dist/chunk-3ZZ3SRTJ.js.map +1 -0
  99. package/dist/chunk-5UHPKXF4.mjs +60 -0
  100. package/dist/chunk-5UHPKXF4.mjs.map +1 -0
  101. package/dist/chunk-EWS3N4OZ.mjs +148 -0
  102. package/dist/chunk-EWS3N4OZ.mjs.map +1 -0
  103. package/dist/{chunk-PTD4AMHI.mjs → chunk-FGI3JA75.mjs} +1 -1
  104. package/dist/chunk-FGI3JA75.mjs.map +1 -0
  105. package/dist/{chunk-RTKEO347.js → chunk-IVYGBU4G.js} +1 -1
  106. package/dist/chunk-IVYGBU4G.js.map +1 -0
  107. package/dist/chunk-IXEJO7ZP.js +86 -0
  108. package/dist/chunk-IXEJO7ZP.js.map +1 -0
  109. package/dist/chunk-J6COVJTP.js +60 -0
  110. package/dist/chunk-J6COVJTP.js.map +1 -0
  111. package/dist/chunk-JULVZPCS.mjs +120 -0
  112. package/dist/chunk-JULVZPCS.mjs.map +1 -0
  113. package/dist/chunk-LNSEYAPJ.js +121 -0
  114. package/dist/chunk-LNSEYAPJ.js.map +1 -0
  115. package/dist/chunk-MOJNV3XZ.js +120 -0
  116. package/dist/chunk-MOJNV3XZ.js.map +1 -0
  117. package/dist/{chunk-U2WDUCW3.js → chunk-NEP3JDVQ.js} +31 -6
  118. package/dist/chunk-NEP3JDVQ.js.map +1 -0
  119. package/dist/chunk-OK63Q6EJ.mjs +121 -0
  120. package/dist/chunk-OK63Q6EJ.mjs.map +1 -0
  121. package/dist/{chunk-5GHZ6EXI.js → chunk-ORAVN37L.js} +6 -10
  122. package/dist/chunk-ORAVN37L.js.map +1 -0
  123. package/dist/{chunk-T52N6ZBP.mjs → chunk-XCBBSHAK.mjs} +6 -10
  124. package/dist/chunk-XCBBSHAK.mjs.map +1 -0
  125. package/dist/chunk-XCKLBP2V.mjs +86 -0
  126. package/dist/chunk-XCKLBP2V.mjs.map +1 -0
  127. package/dist/chunk-XHZUPL2U.mjs +81 -0
  128. package/dist/chunk-XHZUPL2U.mjs.map +1 -0
  129. package/dist/code.d.mts +5 -4
  130. package/dist/code.d.ts +5 -4
  131. package/dist/code.js.map +1 -1
  132. package/dist/code.mjs.map +1 -1
  133. package/dist/collapsible.d.mts +4 -1
  134. package/dist/collapsible.d.ts +4 -1
  135. package/dist/collapsible.js.map +1 -1
  136. package/dist/collapsible.mjs.map +1 -1
  137. package/dist/command.d.mts +24 -12
  138. package/dist/command.d.ts +24 -12
  139. package/dist/command.js +9 -40
  140. package/dist/command.js.map +1 -1
  141. package/dist/command.mjs +9 -40
  142. package/dist/command.mjs.map +1 -1
  143. package/dist/container.d.mts +5 -4
  144. package/dist/container.d.ts +5 -4
  145. package/dist/container.js.map +1 -1
  146. package/dist/container.mjs.map +1 -1
  147. package/dist/context-menu.d.mts +31 -16
  148. package/dist/context-menu.d.ts +31 -16
  149. package/dist/context-menu.js +108 -124
  150. package/dist/context-menu.js.map +1 -1
  151. package/dist/context-menu.mjs +109 -125
  152. package/dist/context-menu.mjs.map +1 -1
  153. package/dist/data-table.d.mts +10 -7
  154. package/dist/data-table.d.ts +10 -7
  155. package/dist/data-table.js +131 -149
  156. package/dist/data-table.js.map +1 -1
  157. package/dist/data-table.mjs +120 -138
  158. package/dist/data-table.mjs.map +1 -1
  159. package/dist/dialog.d.mts +14 -6
  160. package/dist/dialog.d.ts +14 -6
  161. package/dist/dialog.js +2 -2
  162. package/dist/dialog.mjs +1 -1
  163. package/dist/drawer.d.mts +12 -4
  164. package/dist/drawer.d.ts +12 -4
  165. package/dist/drawer.js +30 -63
  166. package/dist/drawer.js.map +1 -1
  167. package/dist/drawer.mjs +30 -63
  168. package/dist/drawer.mjs.map +1 -1
  169. package/dist/dropdown-menu.d.mts +29 -15
  170. package/dist/dropdown-menu.d.ts +29 -15
  171. package/dist/dropdown-menu.js +2 -2
  172. package/dist/dropdown-menu.mjs +1 -1
  173. package/dist/em.d.mts +5 -4
  174. package/dist/em.d.ts +5 -4
  175. package/dist/em.js.map +1 -1
  176. package/dist/em.mjs.map +1 -1
  177. package/dist/form.d.mts +14 -6
  178. package/dist/form.d.ts +14 -6
  179. package/dist/form.js +13 -40
  180. package/dist/form.js.map +1 -1
  181. package/dist/form.mjs +13 -40
  182. package/dist/form.mjs.map +1 -1
  183. package/dist/heading.d.mts +6 -5
  184. package/dist/heading.d.ts +6 -5
  185. package/dist/heading.js.map +1 -1
  186. package/dist/heading.mjs.map +1 -1
  187. package/dist/hover-card.d.mts +5 -2
  188. package/dist/hover-card.d.ts +5 -2
  189. package/dist/hover-card.js +15 -13
  190. package/dist/hover-card.js.map +1 -1
  191. package/dist/hover-card.mjs +15 -13
  192. package/dist/hover-card.mjs.map +1 -1
  193. package/dist/input-otp.d.mts +12 -32
  194. package/dist/input-otp.d.ts +12 -32
  195. package/dist/input-otp.js +16 -13
  196. package/dist/input-otp.js.map +1 -1
  197. package/dist/input-otp.mjs +15 -12
  198. package/dist/input-otp.mjs.map +1 -1
  199. package/dist/input.d.mts +6 -3
  200. package/dist/input.d.ts +6 -3
  201. package/dist/input.js +8 -10
  202. package/dist/input.js.map +1 -1
  203. package/dist/input.mjs +8 -10
  204. package/dist/input.mjs.map +1 -1
  205. package/dist/kbd.d.mts +5 -4
  206. package/dist/kbd.d.ts +5 -4
  207. package/dist/kbd.js.map +1 -1
  208. package/dist/kbd.mjs.map +1 -1
  209. package/dist/label.d.mts +3 -2
  210. package/dist/label.d.ts +3 -2
  211. package/dist/label.js +2 -2
  212. package/dist/label.mjs +1 -1
  213. package/dist/menubar.d.mts +32 -17
  214. package/dist/menubar.d.ts +32 -17
  215. package/dist/menubar.js +73 -93
  216. package/dist/menubar.js.map +1 -1
  217. package/dist/menubar.mjs +74 -94
  218. package/dist/menubar.mjs.map +1 -1
  219. package/dist/navigation-menu.d.mts +16 -8
  220. package/dist/navigation-menu.d.ts +16 -8
  221. package/dist/navigation-menu.js +89 -93
  222. package/dist/navigation-menu.js.map +1 -1
  223. package/dist/navigation-menu.mjs +89 -93
  224. package/dist/navigation-menu.mjs.map +1 -1
  225. package/dist/pagination.d.mts +13 -7
  226. package/dist/pagination.d.ts +13 -7
  227. package/dist/pagination.js +18 -55
  228. package/dist/pagination.js.map +1 -1
  229. package/dist/pagination.mjs +18 -55
  230. package/dist/pagination.mjs.map +1 -1
  231. package/dist/popover.d.mts +8 -3
  232. package/dist/popover.d.ts +8 -3
  233. package/dist/popover.js +16 -21
  234. package/dist/popover.js.map +1 -1
  235. package/dist/popover.mjs +16 -21
  236. package/dist/popover.mjs.map +1 -1
  237. package/dist/pre.d.mts +5 -4
  238. package/dist/pre.d.ts +5 -4
  239. package/dist/pre.js.map +1 -1
  240. package/dist/pre.mjs.map +1 -1
  241. package/dist/progress.d.mts +3 -2
  242. package/dist/progress.d.ts +3 -2
  243. package/dist/progress.js +2 -5
  244. package/dist/progress.js.map +1 -1
  245. package/dist/progress.mjs +2 -5
  246. package/dist/progress.mjs.map +1 -1
  247. package/dist/quote.d.mts +5 -4
  248. package/dist/quote.d.ts +5 -4
  249. package/dist/quote.js.map +1 -1
  250. package/dist/quote.mjs.map +1 -1
  251. package/dist/radio-cards.d.mts +9 -0
  252. package/dist/radio-cards.d.ts +9 -0
  253. package/dist/radio-cards.js +36 -0
  254. package/dist/radio-cards.js.map +1 -0
  255. package/dist/radio-cards.mjs +36 -0
  256. package/dist/radio-cards.mjs.map +1 -0
  257. package/dist/radio-group.d.mts +5 -3
  258. package/dist/radio-group.d.ts +5 -3
  259. package/dist/radio-group.js +3 -9
  260. package/dist/radio-group.js.map +1 -1
  261. package/dist/radio-group.mjs +3 -9
  262. package/dist/radio-group.mjs.map +1 -1
  263. package/dist/radio.d.mts +8 -0
  264. package/dist/radio.d.ts +8 -0
  265. package/dist/radio.js +35 -0
  266. package/dist/radio.js.map +1 -0
  267. package/dist/radio.mjs +35 -0
  268. package/dist/radio.mjs.map +1 -0
  269. package/dist/resizable.d.mts +6 -6
  270. package/dist/resizable.d.ts +6 -6
  271. package/dist/resizable.js +4 -6
  272. package/dist/resizable.js.map +1 -1
  273. package/dist/resizable.mjs +4 -6
  274. package/dist/resizable.mjs.map +1 -1
  275. package/dist/scroll-area.d.mts +5 -3
  276. package/dist/scroll-area.d.ts +5 -3
  277. package/dist/scroll-area.js +25 -31
  278. package/dist/scroll-area.js.map +1 -1
  279. package/dist/scroll-area.mjs +25 -31
  280. package/dist/scroll-area.mjs.map +1 -1
  281. package/dist/section.d.mts +5 -4
  282. package/dist/section.d.ts +5 -4
  283. package/dist/section.js.map +1 -1
  284. package/dist/section.mjs.map +1 -1
  285. package/dist/select.d.mts +18 -8
  286. package/dist/select.d.ts +18 -8
  287. package/dist/select.js +2 -2
  288. package/dist/select.mjs +1 -1
  289. package/dist/separator.d.mts +3 -2
  290. package/dist/separator.d.ts +3 -2
  291. package/dist/separator.js +1 -5
  292. package/dist/separator.js.map +1 -1
  293. package/dist/separator.mjs +1 -5
  294. package/dist/separator.mjs.map +1 -1
  295. package/dist/sheet.d.mts +20 -10
  296. package/dist/sheet.d.ts +20 -10
  297. package/dist/sheet.js +35 -76
  298. package/dist/sheet.js.map +1 -1
  299. package/dist/sheet.mjs +35 -76
  300. package/dist/sheet.mjs.map +1 -1
  301. package/dist/skeleton.d.mts +3 -2
  302. package/dist/skeleton.d.ts +3 -2
  303. package/dist/skeleton.js +2 -11
  304. package/dist/skeleton.js.map +1 -1
  305. package/dist/skeleton.mjs +2 -11
  306. package/dist/skeleton.mjs.map +1 -1
  307. package/dist/slider.d.mts +3 -2
  308. package/dist/slider.d.ts +3 -2
  309. package/dist/slider.js +10 -5
  310. package/dist/slider.js.map +1 -1
  311. package/dist/slider.mjs +10 -5
  312. package/dist/slider.mjs.map +1 -1
  313. package/dist/sonner.d.mts +1 -1
  314. package/dist/sonner.d.ts +1 -1
  315. package/dist/sonner.js +1 -6
  316. package/dist/sonner.js.map +1 -1
  317. package/dist/sonner.mjs +1 -6
  318. package/dist/sonner.mjs.map +1 -1
  319. package/dist/spinner.d.mts +8 -0
  320. package/dist/spinner.d.ts +8 -0
  321. package/dist/spinner.js +8 -0
  322. package/dist/spinner.js.map +1 -0
  323. package/dist/spinner.mjs +8 -0
  324. package/dist/spinner.mjs.map +1 -0
  325. package/dist/strong.d.mts +5 -4
  326. package/dist/strong.d.ts +5 -4
  327. package/dist/strong.js.map +1 -1
  328. package/dist/strong.mjs.map +1 -1
  329. package/dist/styles.css +1 -1
  330. package/dist/styles.css.map +1 -1
  331. package/dist/switch.d.mts +3 -2
  332. package/dist/switch.d.ts +3 -2
  333. package/dist/switch.js +2 -1
  334. package/dist/switch.js.map +1 -1
  335. package/dist/switch.mjs +2 -1
  336. package/dist/switch.mjs.map +1 -1
  337. package/dist/table.d.mts +17 -9
  338. package/dist/table.d.ts +17 -9
  339. package/dist/table.js +6 -47
  340. package/dist/table.js.map +1 -1
  341. package/dist/table.mjs +6 -47
  342. package/dist/table.mjs.map +1 -1
  343. package/dist/tabs.d.mts +8 -4
  344. package/dist/tabs.d.ts +8 -4
  345. package/dist/tabs.js +4 -2
  346. package/dist/tabs.js.map +1 -1
  347. package/dist/tabs.mjs +4 -2
  348. package/dist/tabs.mjs.map +1 -1
  349. package/dist/text.d.mts +1 -1
  350. package/dist/text.d.ts +1 -1
  351. package/dist/text.js +4 -6
  352. package/dist/text.js.map +1 -1
  353. package/dist/text.mjs +4 -6
  354. package/dist/text.mjs.map +1 -1
  355. package/dist/textarea.d.mts +3 -2
  356. package/dist/textarea.d.ts +3 -2
  357. package/dist/textarea.js +2 -1
  358. package/dist/textarea.js.map +1 -1
  359. package/dist/textarea.mjs +2 -1
  360. package/dist/textarea.mjs.map +1 -1
  361. package/dist/toggle-group.d.mts +5 -3
  362. package/dist/toggle-group.d.ts +5 -3
  363. package/dist/toggle-group.js +41 -34
  364. package/dist/toggle-group.js.map +1 -1
  365. package/dist/toggle-group.mjs +40 -33
  366. package/dist/toggle-group.mjs.map +1 -1
  367. package/dist/toggle.d.mts +3 -2
  368. package/dist/toggle.d.ts +3 -2
  369. package/dist/toggle.js +2 -2
  370. package/dist/toggle.mjs +1 -1
  371. package/dist/tooltip.d.mts +8 -3
  372. package/dist/tooltip.d.ts +8 -3
  373. package/dist/tooltip.js +15 -20
  374. package/dist/tooltip.js.map +1 -1
  375. package/dist/tooltip.mjs +15 -20
  376. package/dist/tooltip.mjs.map +1 -1
  377. package/package.json +40 -9
  378. package/src/accordion.tsx +63 -40
  379. package/src/alert-dialog.tsx +84 -84
  380. package/src/alert.tsx +25 -32
  381. package/src/aspect-ratio.tsx +3 -1
  382. package/src/avatar.tsx +19 -26
  383. package/src/badge.tsx +8 -9
  384. package/src/blockquote.tsx +9 -7
  385. package/src/box.tsx +8 -7
  386. package/src/breadcrumb.tsx +55 -54
  387. package/src/button.tsx +44 -15
  388. package/src/calendar.tsx +8 -23
  389. package/src/card.tsx +44 -53
  390. package/src/carousel.tsx +152 -134
  391. package/src/checkbox-cards.tsx +68 -0
  392. package/src/checkbox-group.primitive.tsx +199 -0
  393. package/src/checkbox-group.tsx +57 -0
  394. package/src/checkbox.tsx +11 -6
  395. package/src/code.tsx +9 -5
  396. package/src/collapsible.tsx +12 -1
  397. package/src/command.tsx +65 -65
  398. package/src/container.tsx +9 -7
  399. package/src/context-menu.tsx +184 -160
  400. package/src/data-table.tsx +43 -48
  401. package/src/dialog.tsx +68 -71
  402. package/src/drawer.tsx +59 -67
  403. package/src/dropdown-menu.tsx +164 -139
  404. package/src/em.tsx +9 -5
  405. package/src/form.tsx +61 -69
  406. package/src/heading.tsx +10 -8
  407. package/src/hover-card.tsx +30 -18
  408. package/src/input-otp.tsx +40 -26
  409. package/src/input.tsx +16 -15
  410. package/src/kbd.tsx +9 -5
  411. package/src/label.tsx +6 -5
  412. package/src/menubar.tsx +154 -139
  413. package/src/navigation-menu.tsx +118 -102
  414. package/src/pagination.tsx +39 -49
  415. package/src/popover.tsx +41 -27
  416. package/src/pre.tsx +9 -5
  417. package/src/progress.tsx +8 -10
  418. package/src/quote.tsx +9 -5
  419. package/src/radio-cards.tsx +50 -0
  420. package/src/radio-group.tsx +14 -17
  421. package/src/radio.tsx +44 -0
  422. package/src/resizable.tsx +7 -8
  423. package/src/scroll-area.tsx +33 -37
  424. package/src/section.tsx +9 -7
  425. package/src/select.tsx +116 -105
  426. package/src/separator.tsx +8 -14
  427. package/src/sheet.tsx +62 -70
  428. package/src/skeleton.tsx +5 -11
  429. package/src/slider.tsx +13 -10
  430. package/src/sonner.tsx +4 -8
  431. package/src/spinner.tsx +75 -0
  432. package/src/strong.tsx +9 -5
  433. package/src/switch.tsx +8 -6
  434. package/src/table.tsx +54 -64
  435. package/src/tabs.tsx +30 -15
  436. package/src/text.tsx +9 -9
  437. package/src/textarea.tsx +8 -6
  438. package/src/toggle-group.tsx +59 -48
  439. package/src/toggle.tsx +12 -13
  440. package/src/tooltip.tsx +33 -25
  441. package/dist/chunk-2D7SRYKN.js +0 -135
  442. package/dist/chunk-2D7SRYKN.js.map +0 -1
  443. package/dist/chunk-5GHZ6EXI.js.map +0 -1
  444. package/dist/chunk-EDVCMWDT.mjs +0 -158
  445. package/dist/chunk-EDVCMWDT.mjs.map +0 -1
  446. package/dist/chunk-EIHWTXQ4.mjs +0 -112
  447. package/dist/chunk-EIHWTXQ4.mjs.map +0 -1
  448. package/dist/chunk-ESWGFN3R.mjs +0 -135
  449. package/dist/chunk-ESWGFN3R.mjs.map +0 -1
  450. package/dist/chunk-KW5FJ62U.mjs +0 -56
  451. package/dist/chunk-KW5FJ62U.mjs.map +0 -1
  452. package/dist/chunk-LDYBRDAY.js +0 -112
  453. package/dist/chunk-LDYBRDAY.js.map +0 -1
  454. package/dist/chunk-OCLLX7EY.js +0 -158
  455. package/dist/chunk-OCLLX7EY.js.map +0 -1
  456. package/dist/chunk-PTD4AMHI.mjs.map +0 -1
  457. package/dist/chunk-RTKEO347.js.map +0 -1
  458. package/dist/chunk-T52N6ZBP.mjs.map +0 -1
  459. package/dist/chunk-U2WDUCW3.js.map +0 -1
@@ -7,79 +7,80 @@ import { cn } from "./utils";
7
7
  * Component: Breadcrumb
8
8
  * -------------------------------------------------------------------------- */
9
9
 
10
- const Breadcrumb = React.forwardRef<
11
- HTMLElement,
12
- React.HTMLAttributes<HTMLElement> & {
13
- separator?: React.ReactNode;
14
- }
15
- >(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
10
+ type BreadcrumbElement = HTMLElement;
11
+
12
+ interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
13
+ separator?: React.ReactNode;
14
+ }
15
+
16
+ const Breadcrumb = React.forwardRef<BreadcrumbElement, BreadcrumbProps>(({ ...props }, ref) => (
17
+ <nav ref={ref} aria-label="breadcrumb" {...props} />
18
+ ));
19
+
16
20
  Breadcrumb.displayName = "Breadcrumb";
17
21
 
18
22
  /* -----------------------------------------------------------------------------
19
23
  * Component: BreadcrumbList
20
24
  * -------------------------------------------------------------------------- */
21
25
 
22
- const BreadcrumbList = React.forwardRef<
23
- HTMLOListElement,
24
- React.OlHTMLAttributes<HTMLOListElement>
25
- >(({ className, ...props }, ref) => (
26
+ type BreadcrumbListElement = HTMLOListElement;
27
+ type BreadcrumbListProps = React.OlHTMLAttributes<HTMLOListElement>;
28
+
29
+ const BreadcrumbList = React.forwardRef<BreadcrumbListElement, BreadcrumbListProps>(({ className, ...props }, ref) => (
26
30
  <ol
27
31
  ref={ref}
28
32
  className={cn(
29
- "text-muted-foreground flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5",
33
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 break-words text-sm",
34
+ "sm:gap-2.5",
30
35
  className,
31
36
  )}
32
37
  {...props}
33
38
  />
34
39
  ));
40
+
35
41
  BreadcrumbList.displayName = "BreadcrumbList";
36
42
 
37
43
  /* -----------------------------------------------------------------------------
38
44
  * Component: BreadcrumbItem
39
45
  * -------------------------------------------------------------------------- */
40
46
 
41
- const BreadcrumbItem = React.forwardRef<
42
- HTMLLIElement,
43
- React.LiHTMLAttributes<HTMLLIElement>
44
- >(({ className, ...props }, ref) => (
45
- <li
46
- ref={ref}
47
- className={cn("inline-flex items-center gap-1.5", className)}
48
- {...props}
49
- />
47
+ type BreadcrumbItemElement = HTMLLIElement;
48
+ type BreadcrumbItemProps = React.LiHTMLAttributes<HTMLLIElement>;
49
+
50
+ const BreadcrumbItem = React.forwardRef<BreadcrumbItemElement, BreadcrumbItemProps>(({ className, ...props }, ref) => (
51
+ <li ref={ref} className={cn("inline-flex items-center gap-1.5", className)} {...props} />
50
52
  ));
53
+
51
54
  BreadcrumbItem.displayName = "BreadcrumbItem";
52
55
 
53
56
  /* -----------------------------------------------------------------------------
54
57
  * Component: BreadcrumbLink
55
58
  * -------------------------------------------------------------------------- */
56
59
 
57
- const BreadcrumbLink = React.forwardRef<
58
- HTMLAnchorElement,
59
- React.AnchorHTMLAttributes<HTMLAnchorElement> & {
60
- asChild?: boolean;
61
- }
62
- >(({ asChild, className, ...props }, ref) => {
63
- const Comp = asChild ? Slot : "a";
60
+ type BreadcrumbLinkElement = HTMLAnchorElement;
61
+
62
+ interface BreadcrumbLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
63
+ asChild?: boolean;
64
+ }
65
+
66
+ const BreadcrumbLink = React.forwardRef<BreadcrumbLinkElement, BreadcrumbLinkProps>(
67
+ ({ asChild, className, ...props }, ref) => {
68
+ const Comp = asChild ? Slot : "a";
69
+
70
+ return <Comp ref={ref} className={cn("transition-colors", "hover:text-foreground", className)} {...props} />;
71
+ },
72
+ );
64
73
 
65
- return (
66
- <Comp
67
- ref={ref}
68
- className={cn("hover:text-foreground transition-colors", className)}
69
- {...props}
70
- />
71
- );
72
- });
73
74
  BreadcrumbLink.displayName = "BreadcrumbLink";
74
75
 
75
76
  /* -----------------------------------------------------------------------------
76
77
  * Component: BreadcrumbPage
77
78
  * -------------------------------------------------------------------------- */
78
79
 
79
- const BreadcrumbPage = React.forwardRef<
80
- HTMLSpanElement,
81
- React.HTMLAttributes<HTMLSpanElement>
82
- >(({ className, ...props }, ref) => (
80
+ type BreadcrumbPageElement = HTMLSpanElement;
81
+ type BreadcrumbPageProps = React.HTMLAttributes<HTMLSpanElement>;
82
+
83
+ const BreadcrumbPage = React.forwardRef<BreadcrumbPageElement, BreadcrumbPageProps>(({ className, ...props }, ref) => (
83
84
  <span
84
85
  ref={ref}
85
86
  role="link"
@@ -89,24 +90,18 @@ const BreadcrumbPage = React.forwardRef<
89
90
  {...props}
90
91
  />
91
92
  ));
93
+
92
94
  BreadcrumbPage.displayName = "BreadcrumbPage";
93
95
 
94
96
  /* -----------------------------------------------------------------------------
95
97
  * Component: BreadcrumbSeparator
96
98
  * -------------------------------------------------------------------------- */
97
99
 
98
- function BreadcrumbSeparator({
99
- children,
100
- className,
101
- ...props
102
- }: React.LiHTMLAttributes<HTMLLIElement>): React.JSX.Element {
100
+ type BreadcrumbSeparatorProps = React.LiHTMLAttributes<HTMLLIElement>;
101
+
102
+ function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps): React.JSX.Element {
103
103
  return (
104
- <li
105
- role="presentation"
106
- aria-hidden="true"
107
- className={cn("[&>svg]:size-3.5", className)}
108
- {...props}
109
- >
104
+ <li role="presentation" aria-hidden="true" className={cn("[&>svg]:size-3.5", className)} {...props}>
110
105
  {children ?? <ChevronRightIcon />}
111
106
  </li>
112
107
  );
@@ -116,10 +111,9 @@ function BreadcrumbSeparator({
116
111
  * Component: BreadcrumbEllipsis
117
112
  * -------------------------------------------------------------------------- */
118
113
 
119
- function BreadcrumbEllipsis({
120
- className,
121
- ...props
122
- }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {
114
+ type BreadcrumbEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;
115
+
116
+ function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): React.JSX.Element {
123
117
  return (
124
118
  <span
125
119
  role="presentation"
@@ -145,4 +139,11 @@ export {
145
139
  BreadcrumbPage,
146
140
  BreadcrumbSeparator,
147
141
  BreadcrumbEllipsis,
142
+ type BreadcrumbProps,
143
+ type BreadcrumbListProps,
144
+ type BreadcrumbItemProps,
145
+ type BreadcrumbLinkProps,
146
+ type BreadcrumbPageProps,
147
+ type BreadcrumbSeparatorProps,
148
+ type BreadcrumbEllipsisProps,
148
149
  };
package/src/button.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { type VariantProps } from "cva";
4
+ import { Spinner } from "./spinner";
4
5
  import { cva } from "./utils";
5
6
 
6
7
  /* -----------------------------------------------------------------------------
@@ -8,18 +9,19 @@ import { cva } from "./utils";
8
9
  * -------------------------------------------------------------------------- */
9
10
 
10
11
  const buttonVariants = cva({
11
- base: "focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
12
+ base: [
13
+ "inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
14
+ "disabled:pointer-events-none disabled:opacity-50",
15
+ "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
16
+ ],
12
17
  variants: {
13
18
  variant: {
14
19
  default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow",
15
- destructive:
16
- "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",
20
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",
17
21
  ghost: "hover:bg-accent hover:text-accent-foreground",
18
22
  link: "text-primary underline-offset-4 hover:underline",
19
- outline:
20
- "border-input bg-background hover:bg-accent hover:text-accent-foreground border shadow-sm",
21
- secondary:
22
- "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm",
23
+ outline: "border-input bg-background hover:bg-accent hover:text-accent-foreground border shadow-sm",
24
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm",
23
25
  },
24
26
  size: {
25
27
  default: "h-10 px-4",
@@ -31,41 +33,68 @@ const buttonVariants = cva({
31
33
  "icon-sm": "size-9",
32
34
  "icon-lg": "size-11",
33
35
  },
36
+ loading: {
37
+ true: "relative",
38
+ },
34
39
  },
35
40
  defaultVariants: {
36
41
  size: "default",
37
42
  variant: "default",
43
+ loading: false,
38
44
  },
39
45
  });
40
46
 
47
+ type ButtonVariantsProps = VariantProps<typeof buttonVariants>;
48
+
41
49
  /* -----------------------------------------------------------------------------
42
50
  * Component: Button
43
51
  * -------------------------------------------------------------------------- */
44
52
 
45
- interface ButtonProps
46
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
47
- VariantProps<typeof buttonVariants> {
53
+ type ButtonElement = HTMLButtonElement;
54
+
55
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {
48
56
  asChild?: boolean;
49
57
  }
50
58
 
51
- const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
52
- ({ className, variant, size, asChild = false, ...props }, ref) => {
59
+ const Button = React.forwardRef<ButtonElement, ButtonProps>(
60
+ ({ children, className, variant, size, loading = false, asChild = false, ...props }, ref) => {
53
61
  const Comp = asChild ? Slot : "button";
62
+ const disabled = loading || props.disabled;
54
63
 
55
64
  return (
56
65
  <Comp
57
66
  ref={ref}
58
67
  type={asChild ? undefined : "button"}
59
- className={buttonVariants({ variant, size, className })}
68
+ className={buttonVariants({ variant, size, loading, className })}
60
69
  {...props}
61
- />
70
+ disabled={disabled}
71
+ >
72
+ {loading ? (
73
+ <>
74
+ <span
75
+ aria-hidden
76
+ className="invisible contents"
77
+ // Workaround to use `inert` until https://github.com/facebook/react/pull/24730 is merged.
78
+ {...{ inert: "" }}
79
+ >
80
+ {children}
81
+ </span>
82
+ <span className="absolute inset-0 flex items-center justify-center">
83
+ <Spinner />
84
+ </span>
85
+ </>
86
+ ) : (
87
+ children
88
+ )}
89
+ </Comp>
62
90
  );
63
91
  },
64
92
  );
93
+
65
94
  Button.displayName = "Button";
66
95
 
67
96
  /* -----------------------------------------------------------------------------
68
97
  * Exports
69
98
  * -------------------------------------------------------------------------- */
70
99
 
71
- export { Button, buttonVariants, type ButtonProps };
100
+ export { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };
package/src/calendar.tsx CHANGED
@@ -1,12 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import * as React from "react";
4
- import {
5
- type DateRange,
6
- DayPicker,
7
- type DayPickerProps,
8
- type StyledComponent,
9
- } from "react-day-picker";
4
+ import { type DateRange, DayPicker, type DayPickerProps, type StyledComponent } from "react-day-picker";
10
5
  import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons";
11
6
  import { buttonVariants } from "./button";
12
7
  import { cn } from "./utils";
@@ -15,26 +10,17 @@ import { cn } from "./utils";
15
10
  * Component: Calendar
16
11
  * -------------------------------------------------------------------------- */
17
12
 
18
- function ChevronLeft({
19
- children: _,
20
- ...props
21
- }: StyledComponent): React.JSX.Element {
13
+ function ChevronLeft({ children: _, ...props }: StyledComponent): React.JSX.Element {
22
14
  return <ChevronLeftIcon className="size-4" {...props} />;
23
15
  }
24
16
 
25
- function ChevronRight({
26
- children: _,
27
- ...props
28
- }: StyledComponent): React.JSX.Element {
17
+ function ChevronRight({ children: _, ...props }: StyledComponent): React.JSX.Element {
29
18
  return <ChevronRightIcon className="size-4" {...props} />;
30
19
  }
31
20
 
32
- function Calendar({
33
- className,
34
- classNames,
35
- showOutsideDays = true,
36
- ...props
37
- }: DayPickerProps): React.JSX.Element {
21
+ type CalendarProps = DayPickerProps;
22
+
23
+ function Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps): React.JSX.Element {
38
24
  return (
39
25
  <DayPicker
40
26
  showOutsideDays={showOutsideDays}
@@ -73,8 +59,7 @@ function Calendar({
73
59
  day_outside:
74
60
  "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
75
61
  day_disabled: "text-muted-foreground opacity-50",
76
- day_range_middle:
77
- "aria-selected:bg-accent aria-selected:text-accent-foreground",
62
+ day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
78
63
  day_hidden: "invisible",
79
64
  ...classNames,
80
65
  }}
@@ -91,4 +76,4 @@ function Calendar({
91
76
  * Exports
92
77
  * -------------------------------------------------------------------------- */
93
78
 
94
- export { Calendar, type DateRange };
79
+ export { Calendar, type CalendarProps, type DateRange };
package/src/card.tsx CHANGED
@@ -5,97 +5,82 @@ import { cn } from "./utils";
5
5
  * Component: Card
6
6
  * -------------------------------------------------------------------------- */
7
7
 
8
- const Card = React.forwardRef<
9
- HTMLDivElement,
10
- React.HTMLAttributes<HTMLDivElement>
11
- >(({ className, ...props }, ref) => (
12
- <div
13
- ref={ref}
14
- className={cn(
15
- "bg-card text-card-foreground rounded-lg border shadow-sm",
16
- className,
17
- )}
18
- {...props}
19
- />
8
+ type CardElement = HTMLDivElement;
9
+ type CardProps = React.HTMLAttributes<HTMLDivElement>;
10
+
11
+ const Card = React.forwardRef<CardElement, CardProps>(({ className, ...props }, ref) => (
12
+ <div ref={ref} className={cn("bg-card text-card-foreground rounded-lg border shadow-sm", className)} {...props} />
20
13
  ));
14
+
21
15
  Card.displayName = "Card";
22
16
 
23
17
  /* -----------------------------------------------------------------------------
24
18
  * Component: CardHeader
25
19
  * -------------------------------------------------------------------------- */
26
20
 
27
- const CardHeader = React.forwardRef<
28
- HTMLDivElement,
29
- React.HTMLAttributes<HTMLDivElement>
30
- >(({ className, ...props }, ref) => (
31
- <div
32
- ref={ref}
33
- className={cn("flex flex-col space-y-1.5 p-6", className)}
34
- {...props}
35
- />
21
+ type CardHeaderElement = HTMLDivElement;
22
+ type CardHeaderProps = React.HTMLAttributes<HTMLDivElement>;
23
+
24
+ const CardHeader = React.forwardRef<CardHeaderElement, CardHeaderProps>(({ className, ...props }, ref) => (
25
+ <div ref={ref} className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />
36
26
  ));
27
+
37
28
  CardHeader.displayName = "CardHeader";
38
29
 
39
30
  /* -----------------------------------------------------------------------------
40
31
  * Component: CardTitle
41
32
  * -------------------------------------------------------------------------- */
42
33
 
43
- const CardTitle = React.forwardRef<
44
- HTMLParagraphElement,
45
- React.HTMLAttributes<HTMLHeadingElement>
46
- >(({ className, children, ...props }, ref) => (
47
- <h3
48
- ref={ref}
49
- className={cn("font-semibold leading-none tracking-tight", className)}
50
- {...props}
51
- >
34
+ type CardTitleElement = HTMLParagraphElement;
35
+ type CardTitleProps = React.HTMLAttributes<HTMLHeadingElement>;
36
+
37
+ const CardTitle = React.forwardRef<CardTitleElement, CardTitleProps>(({ className, children, ...props }, ref) => (
38
+ <h3 ref={ref} className={cn("font-semibold leading-none tracking-tight", className)} {...props}>
52
39
  {children}
53
40
  </h3>
54
41
  ));
42
+
55
43
  CardTitle.displayName = "CardTitle";
56
44
 
57
45
  /* -----------------------------------------------------------------------------
58
46
  * Component: CardDescription
59
47
  * -------------------------------------------------------------------------- */
60
48
 
61
- const CardDescription = React.forwardRef<
62
- HTMLParagraphElement,
63
- React.HTMLAttributes<HTMLParagraphElement>
64
- >(({ className, ...props }, ref) => (
65
- <p
66
- ref={ref}
67
- className={cn("text-muted-foreground text-sm", className)}
68
- {...props}
69
- />
70
- ));
49
+ type CardDescriptionElement = HTMLParagraphElement;
50
+ type CardDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;
51
+
52
+ const CardDescription = React.forwardRef<CardDescriptionElement, CardDescriptionProps>(
53
+ ({ className, ...props }, ref) => (
54
+ <p ref={ref} className={cn("text-muted-foreground text-sm", className)} {...props} />
55
+ ),
56
+ );
57
+
71
58
  CardDescription.displayName = "CardDescription";
72
59
 
73
60
  /* -----------------------------------------------------------------------------
74
61
  * Component: CardContent
75
62
  * -------------------------------------------------------------------------- */
76
63
 
77
- const CardContent = React.forwardRef<
78
- HTMLDivElement,
79
- React.HTMLAttributes<HTMLDivElement>
80
- >(({ className, ...props }, ref) => (
64
+ type CardContentElement = HTMLDivElement;
65
+ type CardContentProps = React.HTMLAttributes<HTMLDivElement>;
66
+
67
+ const CardContent = React.forwardRef<CardContentElement, CardContentProps>(({ className, ...props }, ref) => (
81
68
  <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
82
69
  ));
70
+
83
71
  CardContent.displayName = "CardContent";
84
72
 
85
73
  /* -----------------------------------------------------------------------------
86
74
  * Component: CardFooter
87
75
  * -------------------------------------------------------------------------- */
88
76
 
89
- const CardFooter = React.forwardRef<
90
- HTMLDivElement,
91
- React.HTMLAttributes<HTMLDivElement>
92
- >(({ className, ...props }, ref) => (
93
- <div
94
- ref={ref}
95
- className={cn("flex items-center p-6 pt-0", className)}
96
- {...props}
97
- />
77
+ type CardFooterElement = HTMLDivElement;
78
+ type CardFooterProps = React.HTMLAttributes<HTMLDivElement>;
79
+
80
+ const CardFooter = React.forwardRef<CardFooterElement, CardFooterProps>(({ className, ...props }, ref) => (
81
+ <div ref={ref} className={cn("flex items-center p-6 pt-0", className)} {...props} />
98
82
  ));
83
+
99
84
  CardFooter.displayName = "CardFooter";
100
85
 
101
86
  /* -----------------------------------------------------------------------------
@@ -109,4 +94,10 @@ export {
109
94
  CardTitle,
110
95
  CardDescription,
111
96
  CardContent,
97
+ type CardProps,
98
+ type CardHeaderProps,
99
+ type CardFooterProps,
100
+ type CardTitleProps,
101
+ type CardDescriptionProps,
102
+ type CardContentProps,
112
103
  };