@lark-apaas/coding-templates 0.1.2 → 0.1.4

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 (262) hide show
  1. package/package.json +2 -3
  2. package/template-html/README.md +1 -1
  3. package/template-vite-react/_gitignore +24 -0
  4. package/template-vite-react/client/index.html +13 -0
  5. package/template-vite-react/client/public/favicon.svg +1 -0
  6. package/template-vite-react/client/public/icons.svg +24 -0
  7. package/template-vite-react/client/src/api/index.ts +7 -0
  8. package/template-vite-react/client/src/app.tsx +17 -0
  9. package/{template-nextjs-static → template-vite-react/client}/src/components/header.tsx +5 -13
  10. package/template-vite-react/client/src/components/layout.tsx +13 -0
  11. package/template-vite-react/client/src/components/theme-provider.tsx +45 -0
  12. package/template-vite-react/client/src/components/ui/accordion.tsx +72 -0
  13. package/template-vite-react/client/src/components/ui/alert-dialog.tsx +187 -0
  14. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/alert.tsx +15 -10
  15. package/template-vite-react/client/src/components/ui/aspect-ratio.tsx +22 -0
  16. package/template-vite-react/client/src/components/ui/avatar.tsx +109 -0
  17. package/template-vite-react/client/src/components/ui/badge.tsx +52 -0
  18. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/breadcrumb.tsx +39 -23
  19. package/template-vite-react/client/src/components/ui/button.tsx +58 -0
  20. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/calendar.tsx +43 -37
  21. package/template-vite-react/client/src/components/ui/card.tsx +103 -0
  22. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/carousel.tsx +8 -7
  23. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/chart.tsx +49 -35
  24. package/template-vite-react/client/src/components/ui/checkbox.tsx +29 -0
  25. package/template-vite-react/client/src/components/ui/collapsible.tsx +19 -0
  26. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/command.tsx +40 -52
  27. package/template-vite-react/client/src/components/ui/context-menu.tsx +271 -0
  28. package/template-vite-react/client/src/components/ui/dialog.tsx +158 -0
  29. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/drawer.tsx +9 -12
  30. package/template-vite-react/client/src/components/ui/dropdown-menu.tsx +268 -0
  31. package/template-vite-react/client/src/components/ui/hover-card.tsx +49 -0
  32. package/template-vite-react/client/src/components/ui/input-group.tsx +156 -0
  33. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/input-otp.tsx +17 -7
  34. package/template-vite-react/client/src/components/ui/input.tsx +20 -0
  35. package/template-vite-react/client/src/components/ui/label.tsx +18 -0
  36. package/template-vite-react/client/src/components/ui/menubar.tsx +280 -0
  37. package/template-vite-react/client/src/components/ui/navigation-menu.tsx +168 -0
  38. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/pagination.tsx +35 -32
  39. package/template-vite-react/client/src/components/ui/popover.tsx +90 -0
  40. package/template-vite-react/client/src/components/ui/progress.tsx +81 -0
  41. package/template-vite-react/client/src/components/ui/radio-group.tsx +38 -0
  42. package/template-vite-react/client/src/components/ui/resizable.tsx +48 -0
  43. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/scroll-area.tsx +10 -13
  44. package/template-vite-react/client/src/components/ui/select.tsx +199 -0
  45. package/template-vite-react/client/src/components/ui/separator.tsx +25 -0
  46. package/template-vite-react/client/src/components/ui/sheet.tsx +138 -0
  47. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/sidebar.tsx +156 -162
  48. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/skeleton.tsx +1 -1
  49. package/template-vite-react/client/src/components/ui/slider.tsx +57 -0
  50. package/template-vite-react/client/src/components/ui/sonner.tsx +49 -0
  51. package/template-vite-react/client/src/components/ui/switch.tsx +30 -0
  52. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/table.tsx +5 -5
  53. package/template-vite-react/client/src/components/ui/tabs.tsx +80 -0
  54. package/template-vite-react/client/src/components/ui/textarea.tsx +18 -0
  55. package/template-vite-react/client/src/components/ui/toggle-group.tsx +89 -0
  56. package/template-vite-react/client/src/components/ui/toggle.tsx +44 -0
  57. package/template-vite-react/client/src/components/ui/tooltip.tsx +64 -0
  58. package/template-vite-react/client/src/index.css +1 -0
  59. package/template-vite-react/client/src/main.tsx +13 -0
  60. package/template-vite-react/client/src/pages/home/index.tsx +12 -0
  61. package/template-vite-react/client/src/pages/not-found/index.tsx +11 -0
  62. package/template-vite-react/client/src/types/index.ts +1 -0
  63. package/{template-nextjs-static → template-vite-react}/components.json +2 -2
  64. package/template-vite-react/eslint.config.js +23 -0
  65. package/template-vite-react/package.json +58 -0
  66. package/template-vite-react/scripts/build.sh +40 -0
  67. package/template-vite-react/shared/types.ts +1 -0
  68. package/template-vite-react/tsconfig.app.json +33 -0
  69. package/template-vite-react/tsconfig.json +14 -0
  70. package/template-vite-react/tsconfig.node.json +26 -0
  71. package/template-vite-react/vite.config.ts +17 -0
  72. package/template-nextjs-fullstack/README.md +0 -169
  73. package/template-nextjs-fullstack/_env.local.example +0 -1
  74. package/template-nextjs-fullstack/_gitignore +0 -41
  75. package/template-nextjs-fullstack/components.json +0 -25
  76. package/template-nextjs-fullstack/drizzle.config.ts +0 -10
  77. package/template-nextjs-fullstack/eslint.config.js +0 -15
  78. package/template-nextjs-fullstack/next.config.ts +0 -5
  79. package/template-nextjs-fullstack/package.json +0 -85
  80. package/template-nextjs-fullstack/postcss.config.js +0 -8
  81. package/template-nextjs-fullstack/scripts/build.sh +0 -37
  82. package/template-nextjs-fullstack/src/app/favicon.ico +0 -0
  83. package/template-nextjs-fullstack/src/app/globals.css +0 -130
  84. package/template-nextjs-fullstack/src/app/layout.tsx +0 -24
  85. package/template-nextjs-fullstack/src/app/page.tsx +0 -69
  86. package/template-nextjs-fullstack/src/app/todos/actions.ts +0 -37
  87. package/template-nextjs-fullstack/src/app/todos/page.tsx +0 -26
  88. package/template-nextjs-fullstack/src/app/todos/todo-form.tsx +0 -27
  89. package/template-nextjs-fullstack/src/app/todos/todo-list.tsx +0 -44
  90. package/template-nextjs-fullstack/src/components/header.tsx +0 -32
  91. package/template-nextjs-fullstack/src/components/theme-provider.tsx +0 -8
  92. package/template-nextjs-fullstack/src/components/ui/README.md +0 -134
  93. package/template-nextjs-fullstack/src/components/ui/accordion.tsx +0 -66
  94. package/template-nextjs-fullstack/src/components/ui/alert-dialog.tsx +0 -157
  95. package/template-nextjs-fullstack/src/components/ui/aspect-ratio.tsx +0 -11
  96. package/template-nextjs-fullstack/src/components/ui/avatar.tsx +0 -53
  97. package/template-nextjs-fullstack/src/components/ui/badge.tsx +0 -42
  98. package/template-nextjs-fullstack/src/components/ui/button.tsx +0 -69
  99. package/template-nextjs-fullstack/src/components/ui/calendar.tsx +0 -213
  100. package/template-nextjs-fullstack/src/components/ui/card.tsx +0 -82
  101. package/template-nextjs-fullstack/src/components/ui/chart.tsx +0 -357
  102. package/template-nextjs-fullstack/src/components/ui/checkbox.tsx +0 -32
  103. package/template-nextjs-fullstack/src/components/ui/collapsible.tsx +0 -33
  104. package/template-nextjs-fullstack/src/components/ui/context-menu.tsx +0 -324
  105. package/template-nextjs-fullstack/src/components/ui/dialog.tsx +0 -143
  106. package/template-nextjs-fullstack/src/components/ui/drawer.tsx +0 -135
  107. package/template-nextjs-fullstack/src/components/ui/dropdown-menu.tsx +0 -329
  108. package/template-nextjs-fullstack/src/components/ui/hover-card.tsx +0 -44
  109. package/template-nextjs-fullstack/src/components/ui/input-group.tsx +0 -166
  110. package/template-nextjs-fullstack/src/components/ui/input-otp.tsx +0 -77
  111. package/template-nextjs-fullstack/src/components/ui/input.tsx +0 -21
  112. package/template-nextjs-fullstack/src/components/ui/label.tsx +0 -24
  113. package/template-nextjs-fullstack/src/components/ui/menubar.tsx +0 -348
  114. package/template-nextjs-fullstack/src/components/ui/navigation-menu.tsx +0 -168
  115. package/template-nextjs-fullstack/src/components/ui/pagination.tsx +0 -127
  116. package/template-nextjs-fullstack/src/components/ui/popover.tsx +0 -48
  117. package/template-nextjs-fullstack/src/components/ui/progress.tsx +0 -31
  118. package/template-nextjs-fullstack/src/components/ui/radio-group.tsx +0 -45
  119. package/template-nextjs-fullstack/src/components/ui/resizable.tsx +0 -56
  120. package/template-nextjs-fullstack/src/components/ui/select.tsx +0 -243
  121. package/template-nextjs-fullstack/src/components/ui/separator.tsx +0 -28
  122. package/template-nextjs-fullstack/src/components/ui/sheet.tsx +0 -139
  123. package/template-nextjs-fullstack/src/components/ui/skeleton.tsx +0 -13
  124. package/template-nextjs-fullstack/src/components/ui/slider.tsx +0 -87
  125. package/template-nextjs-fullstack/src/components/ui/sonner.tsx +0 -67
  126. package/template-nextjs-fullstack/src/components/ui/switch.tsx +0 -31
  127. package/template-nextjs-fullstack/src/components/ui/tabs.tsx +0 -66
  128. package/template-nextjs-fullstack/src/components/ui/textarea.tsx +0 -18
  129. package/template-nextjs-fullstack/src/components/ui/toggle-group.tsx +0 -83
  130. package/template-nextjs-fullstack/src/components/ui/toggle.tsx +0 -47
  131. package/template-nextjs-fullstack/src/components/ui/tooltip.tsx +0 -61
  132. package/template-nextjs-fullstack/src/db/index.ts +0 -8
  133. package/template-nextjs-fullstack/src/db/schema.ts +0 -11
  134. package/template-nextjs-fullstack/tailwind.config.ts +0 -10
  135. package/template-nextjs-fullstack/tsconfig.json +0 -34
  136. package/template-nextjs-static/README.md +0 -80
  137. package/template-nextjs-static/_gitignore +0 -41
  138. package/template-nextjs-static/eslint.config.js +0 -15
  139. package/template-nextjs-static/next.config.ts +0 -8
  140. package/template-nextjs-static/package.json +0 -77
  141. package/template-nextjs-static/postcss.config.js +0 -8
  142. package/template-nextjs-static/public/favicon.ico +0 -0
  143. package/template-nextjs-static/scripts/build.sh +0 -36
  144. package/template-nextjs-static/src/components/theme-provider.tsx +0 -6
  145. package/template-nextjs-static/src/components/ui/README.md +0 -134
  146. package/template-nextjs-static/src/components/ui/accordion.tsx +0 -66
  147. package/template-nextjs-static/src/components/ui/alert-dialog.tsx +0 -157
  148. package/template-nextjs-static/src/components/ui/alert.tsx +0 -71
  149. package/template-nextjs-static/src/components/ui/aspect-ratio.tsx +0 -11
  150. package/template-nextjs-static/src/components/ui/avatar.tsx +0 -53
  151. package/template-nextjs-static/src/components/ui/badge.tsx +0 -42
  152. package/template-nextjs-static/src/components/ui/breadcrumb.tsx +0 -109
  153. package/template-nextjs-static/src/components/ui/button-group.tsx +0 -83
  154. package/template-nextjs-static/src/components/ui/button.tsx +0 -69
  155. package/template-nextjs-static/src/components/ui/card.tsx +0 -82
  156. package/template-nextjs-static/src/components/ui/carousel.tsx +0 -241
  157. package/template-nextjs-static/src/components/ui/checkbox.tsx +0 -32
  158. package/template-nextjs-static/src/components/ui/collapsible.tsx +0 -33
  159. package/template-nextjs-static/src/components/ui/command.tsx +0 -208
  160. package/template-nextjs-static/src/components/ui/context-menu.tsx +0 -324
  161. package/template-nextjs-static/src/components/ui/dialog.tsx +0 -143
  162. package/template-nextjs-static/src/components/ui/dropdown-menu.tsx +0 -329
  163. package/template-nextjs-static/src/components/ui/empty.tsx +0 -104
  164. package/template-nextjs-static/src/components/ui/field.tsx +0 -248
  165. package/template-nextjs-static/src/components/ui/form.tsx +0 -167
  166. package/template-nextjs-static/src/components/ui/hover-card.tsx +0 -44
  167. package/template-nextjs-static/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -21
  168. package/template-nextjs-static/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -36
  169. package/template-nextjs-static/src/components/ui/icons/file-android-colorful-icon.tsx +0 -33
  170. package/template-nextjs-static/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -21
  171. package/template-nextjs-static/src/components/ui/icons/file-code-colorful-icon.tsx +0 -28
  172. package/template-nextjs-static/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -21
  173. package/template-nextjs-static/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -29
  174. package/template-nextjs-static/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -25
  175. package/template-nextjs-static/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -29
  176. package/template-nextjs-static/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -29
  177. package/template-nextjs-static/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -21
  178. package/template-nextjs-static/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -21
  179. package/template-nextjs-static/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -21
  180. package/template-nextjs-static/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -29
  181. package/template-nextjs-static/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -23
  182. package/template-nextjs-static/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -27
  183. package/template-nextjs-static/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -20
  184. package/template-nextjs-static/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -21
  185. package/template-nextjs-static/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -12
  186. package/template-nextjs-static/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -14
  187. package/template-nextjs-static/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -23
  188. package/template-nextjs-static/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -38
  189. package/template-nextjs-static/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -21
  190. package/template-nextjs-static/src/components/ui/image.tsx +0 -183
  191. package/template-nextjs-static/src/components/ui/input-group.tsx +0 -166
  192. package/template-nextjs-static/src/components/ui/input.tsx +0 -21
  193. package/template-nextjs-static/src/components/ui/item.tsx +0 -193
  194. package/template-nextjs-static/src/components/ui/kbd.tsx +0 -28
  195. package/template-nextjs-static/src/components/ui/label.tsx +0 -24
  196. package/template-nextjs-static/src/components/ui/menubar.tsx +0 -348
  197. package/template-nextjs-static/src/components/ui/native-select.tsx +0 -48
  198. package/template-nextjs-static/src/components/ui/navigation-menu.tsx +0 -168
  199. package/template-nextjs-static/src/components/ui/popover.tsx +0 -48
  200. package/template-nextjs-static/src/components/ui/progress.tsx +0 -31
  201. package/template-nextjs-static/src/components/ui/radio-group.tsx +0 -45
  202. package/template-nextjs-static/src/components/ui/resizable.tsx +0 -56
  203. package/template-nextjs-static/src/components/ui/scroll-area.tsx +0 -58
  204. package/template-nextjs-static/src/components/ui/select.tsx +0 -243
  205. package/template-nextjs-static/src/components/ui/separator.tsx +0 -28
  206. package/template-nextjs-static/src/components/ui/sheet.tsx +0 -139
  207. package/template-nextjs-static/src/components/ui/sidebar.tsx +0 -727
  208. package/template-nextjs-static/src/components/ui/slider.tsx +0 -87
  209. package/template-nextjs-static/src/components/ui/sonner.tsx +0 -67
  210. package/template-nextjs-static/src/components/ui/spinner.tsx +0 -16
  211. package/template-nextjs-static/src/components/ui/streamdown.tsx +0 -186
  212. package/template-nextjs-static/src/components/ui/switch.tsx +0 -31
  213. package/template-nextjs-static/src/components/ui/table.tsx +0 -116
  214. package/template-nextjs-static/src/components/ui/tabs.tsx +0 -66
  215. package/template-nextjs-static/src/components/ui/textarea.tsx +0 -18
  216. package/template-nextjs-static/src/components/ui/toggle-group.tsx +0 -83
  217. package/template-nextjs-static/src/components/ui/toggle.tsx +0 -47
  218. package/template-nextjs-static/src/components/ui/tooltip.tsx +0 -61
  219. package/template-nextjs-static/src/hooks/use-mobile.ts +0 -19
  220. package/template-nextjs-static/src/lib/utils.ts +0 -6
  221. package/template-nextjs-static/src/pages/_app.tsx +0 -11
  222. package/template-nextjs-static/src/pages/_document.tsx +0 -13
  223. package/template-nextjs-static/src/pages/hello.tsx +0 -32
  224. package/template-nextjs-static/src/pages/index.tsx +0 -76
  225. package/template-nextjs-static/src/styles/globals.css +0 -143
  226. package/template-nextjs-static/tailwind.config.ts +0 -10
  227. package/template-nextjs-static/tsconfig.json +0 -34
  228. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/button-group.tsx +0 -0
  229. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/empty.tsx +0 -0
  230. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/field.tsx +0 -0
  231. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/form.tsx +0 -0
  232. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -0
  233. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -0
  234. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-android-colorful-icon.tsx +0 -0
  235. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -0
  236. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-code-colorful-icon.tsx +0 -0
  237. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -0
  238. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -0
  239. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -0
  240. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -0
  241. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -0
  242. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -0
  243. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -0
  244. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -0
  245. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -0
  246. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -0
  247. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -0
  248. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -0
  249. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -0
  250. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -0
  251. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -0
  252. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -0
  253. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -0
  254. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -0
  255. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/image.tsx +0 -0
  256. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/item.tsx +0 -0
  257. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/kbd.tsx +0 -0
  258. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/native-select.tsx +0 -0
  259. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/spinner.tsx +0 -0
  260. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/streamdown.tsx +0 -0
  261. /package/{template-nextjs-fullstack → template-vite-react/client}/src/hooks/use-mobile.ts +0 -0
  262. /package/{template-nextjs-fullstack → template-vite-react/client}/src/lib/utils.ts +0 -0
@@ -0,0 +1,109 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Avatar({
9
+ className,
10
+ size = "default",
11
+ ...props
12
+ }: AvatarPrimitive.Root.Props & {
13
+ size?: "default" | "sm" | "lg"
14
+ }) {
15
+ return (
16
+ <AvatarPrimitive.Root
17
+ data-slot="avatar"
18
+ data-size={size}
19
+ className={cn(
20
+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
29
+ return (
30
+ <AvatarPrimitive.Image
31
+ data-slot="avatar-image"
32
+ className={cn(
33
+ "aspect-square size-full rounded-full object-cover",
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ )
39
+ }
40
+
41
+ function AvatarFallback({
42
+ className,
43
+ ...props
44
+ }: AvatarPrimitive.Fallback.Props) {
45
+ return (
46
+ <AvatarPrimitive.Fallback
47
+ data-slot="avatar-fallback"
48
+ className={cn(
49
+ "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
50
+ className
51
+ )}
52
+ {...props}
53
+ />
54
+ )
55
+ }
56
+
57
+ function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
58
+ return (
59
+ <span
60
+ data-slot="avatar-badge"
61
+ className={cn(
62
+ "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
63
+ "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
64
+ "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
65
+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
66
+ className
67
+ )}
68
+ {...props}
69
+ />
70
+ )
71
+ }
72
+
73
+ function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
74
+ return (
75
+ <div
76
+ data-slot="avatar-group"
77
+ className={cn(
78
+ "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
79
+ className
80
+ )}
81
+ {...props}
82
+ />
83
+ )
84
+ }
85
+
86
+ function AvatarGroupCount({
87
+ className,
88
+ ...props
89
+ }: React.ComponentProps<"div">) {
90
+ return (
91
+ <div
92
+ data-slot="avatar-group-count"
93
+ className={cn(
94
+ "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
95
+ className
96
+ )}
97
+ {...props}
98
+ />
99
+ )
100
+ }
101
+
102
+ export {
103
+ Avatar,
104
+ AvatarImage,
105
+ AvatarFallback,
106
+ AvatarGroup,
107
+ AvatarGroupCount,
108
+ AvatarBadge,
109
+ }
@@ -0,0 +1,52 @@
1
+ import { mergeProps } from "@base-ui/react/merge-props"
2
+ import { useRender } from "@base-ui/react/use-render"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ const badgeVariants = cva(
8
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
13
+ secondary:
14
+ "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
15
+ destructive:
16
+ "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
17
+ outline:
18
+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
19
+ ghost:
20
+ "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
21
+ link: "text-primary underline-offset-4 hover:underline",
22
+ },
23
+ },
24
+ defaultVariants: {
25
+ variant: "default",
26
+ },
27
+ }
28
+ )
29
+
30
+ function Badge({
31
+ className,
32
+ variant = "default",
33
+ render,
34
+ ...props
35
+ }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>) {
36
+ return useRender({
37
+ defaultTagName: "span",
38
+ props: mergeProps<"span">(
39
+ {
40
+ className: cn(badgeVariants({ variant }), className),
41
+ },
42
+ props
43
+ ),
44
+ render,
45
+ state: {
46
+ slot: "badge",
47
+ variant,
48
+ },
49
+ })
50
+ }
51
+
52
+ export { Badge, badgeVariants }
@@ -1,11 +1,19 @@
1
1
  import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { ChevronRight, MoreHorizontal } from "lucide-react"
2
+ import { mergeProps } from "@base-ui/react/merge-props"
3
+ import { useRender } from "@base-ui/react/use-render"
4
4
 
5
5
  import { cn } from "@/lib/utils"
6
+ import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
6
7
 
7
- function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
8
- return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
8
+ function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
9
+ return (
10
+ <nav
11
+ aria-label="breadcrumb"
12
+ data-slot="breadcrumb"
13
+ className={cn(className)}
14
+ {...props}
15
+ />
16
+ )
9
17
  }
10
18
 
11
19
  function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
@@ -13,7 +21,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
13
21
  <ol
14
22
  data-slot="breadcrumb-list"
15
23
  className={cn(
16
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
24
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",
17
25
  className
18
26
  )}
19
27
  {...props}
@@ -25,28 +33,30 @@ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
25
33
  return (
26
34
  <li
27
35
  data-slot="breadcrumb-item"
28
- className={cn("inline-flex items-center gap-1.5", className)}
36
+ className={cn("inline-flex items-center gap-1", className)}
29
37
  {...props}
30
38
  />
31
39
  )
32
40
  }
33
41
 
34
42
  function BreadcrumbLink({
35
- asChild,
36
43
  className,
44
+ render,
37
45
  ...props
38
- }: React.ComponentProps<"a"> & {
39
- asChild?: boolean
40
- }) {
41
- const Comp = asChild ? Slot : "a"
42
-
43
- return (
44
- <Comp
45
- data-slot="breadcrumb-link"
46
- className={cn("hover:text-foreground transition-colors", className)}
47
- {...props}
48
- />
49
- )
46
+ }: useRender.ComponentProps<"a">) {
47
+ return useRender({
48
+ defaultTagName: "a",
49
+ props: mergeProps<"a">(
50
+ {
51
+ className: cn("transition-colors hover:text-foreground", className),
52
+ },
53
+ props
54
+ ),
55
+ render,
56
+ state: {
57
+ slot: "breadcrumb-link",
58
+ },
59
+ })
50
60
  }
51
61
 
52
62
  function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
@@ -56,7 +66,7 @@ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
56
66
  role="link"
57
67
  aria-disabled="true"
58
68
  aria-current="page"
59
- className={cn("text-foreground font-normal", className)}
69
+ className={cn("font-normal text-foreground", className)}
60
70
  {...props}
61
71
  />
62
72
  )
@@ -75,7 +85,9 @@ function BreadcrumbSeparator({
75
85
  className={cn("[&>svg]:size-3.5", className)}
76
86
  {...props}
77
87
  >
78
- {children ?? <ChevronRight />}
88
+ {children ?? (
89
+ <ChevronRightIcon />
90
+ )}
79
91
  </li>
80
92
  )
81
93
  }
@@ -89,10 +101,14 @@ function BreadcrumbEllipsis({
89
101
  data-slot="breadcrumb-ellipsis"
90
102
  role="presentation"
91
103
  aria-hidden="true"
92
- className={cn("flex size-9 items-center justify-center", className)}
104
+ className={cn(
105
+ "flex size-5 items-center justify-center [&>svg]:size-4",
106
+ className
107
+ )}
93
108
  {...props}
94
109
  >
95
- <MoreHorizontal className="size-4" />
110
+ <MoreHorizontalIcon
111
+ />
96
112
  <span className="sr-only">More</span>
97
113
  </span>
98
114
  )
@@ -0,0 +1,58 @@
1
+ import { Button as ButtonPrimitive } from "@base-ui/react/button"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const buttonVariants = cva(
7
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
12
+ outline:
13
+ "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
14
+ secondary:
15
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
16
+ ghost:
17
+ "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
18
+ destructive:
19
+ "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
20
+ link: "text-primary underline-offset-4 hover:underline",
21
+ },
22
+ size: {
23
+ default:
24
+ "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
25
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
26
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
27
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
28
+ icon: "size-8",
29
+ "icon-xs":
30
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
31
+ "icon-sm":
32
+ "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
33
+ "icon-lg": "size-9",
34
+ },
35
+ },
36
+ defaultVariants: {
37
+ variant: "default",
38
+ size: "default",
39
+ },
40
+ }
41
+ )
42
+
43
+ function Button({
44
+ className,
45
+ variant = "default",
46
+ size = "default",
47
+ ...props
48
+ }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
49
+ return (
50
+ <ButtonPrimitive
51
+ data-slot="button"
52
+ className={cn(buttonVariants({ variant, size, className }))}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ export { Button, buttonVariants }
@@ -1,15 +1,14 @@
1
- "use client"
2
-
3
1
  import * as React from "react"
4
2
  import {
5
- ChevronDownIcon,
6
- ChevronLeftIcon,
7
- ChevronRightIcon,
8
- } from "lucide-react"
9
- import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"
3
+ DayPicker,
4
+ getDefaultClassNames,
5
+ type DayButton,
6
+ type Locale,
7
+ } from "react-day-picker"
10
8
 
11
9
  import { cn } from "@/lib/utils"
12
10
  import { Button, buttonVariants } from "@/components/ui/button"
11
+ import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react"
13
12
 
14
13
  function Calendar({
15
14
  className,
@@ -17,6 +16,7 @@ function Calendar({
17
16
  showOutsideDays = true,
18
17
  captionLayout = "label",
19
18
  buttonVariant = "ghost",
19
+ locale,
20
20
  formatters,
21
21
  components,
22
22
  ...props
@@ -29,88 +29,95 @@ function Calendar({
29
29
  <DayPicker
30
30
  showOutsideDays={showOutsideDays}
31
31
  className={cn(
32
- "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
32
+ "group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
33
33
  String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
34
34
  String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
35
35
  className
36
36
  )}
37
37
  captionLayout={captionLayout}
38
+ locale={locale}
38
39
  formatters={{
39
40
  formatMonthDropdown: (date) =>
40
- date.toLocaleString("default", { month: "short" }),
41
+ date.toLocaleString(locale?.code, { month: "short" }),
41
42
  ...formatters,
42
43
  }}
43
44
  classNames={{
44
45
  root: cn("w-fit", defaultClassNames.root),
45
46
  months: cn(
46
- "flex gap-4 flex-col md:flex-row relative",
47
+ "relative flex flex-col gap-4 md:flex-row",
47
48
  defaultClassNames.months
48
49
  ),
49
- month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
50
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
50
51
  nav: cn(
51
- "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
52
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
52
53
  defaultClassNames.nav
53
54
  ),
54
55
  button_previous: cn(
55
56
  buttonVariants({ variant: buttonVariant }),
56
- "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
57
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
57
58
  defaultClassNames.button_previous
58
59
  ),
59
60
  button_next: cn(
60
61
  buttonVariants({ variant: buttonVariant }),
61
- "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
62
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
62
63
  defaultClassNames.button_next
63
64
  ),
64
65
  month_caption: cn(
65
- "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
66
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
66
67
  defaultClassNames.month_caption
67
68
  ),
68
69
  dropdowns: cn(
69
- "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
70
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
70
71
  defaultClassNames.dropdowns
71
72
  ),
72
73
  dropdown_root: cn(
73
- "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
74
+ "relative rounded-(--cell-radius)",
74
75
  defaultClassNames.dropdown_root
75
76
  ),
76
77
  dropdown: cn(
77
- "absolute bg-popover inset-0 opacity-0",
78
+ "absolute inset-0 bg-popover opacity-0",
78
79
  defaultClassNames.dropdown
79
80
  ),
80
81
  caption_label: cn(
81
- "select-none font-medium",
82
+ "font-medium select-none",
82
83
  captionLayout === "label"
83
84
  ? "text-sm"
84
- : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
85
+ : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
85
86
  defaultClassNames.caption_label
86
87
  ),
87
88
  table: "w-full border-collapse",
88
89
  weekdays: cn("flex", defaultClassNames.weekdays),
89
90
  weekday: cn(
90
- "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
91
+ "flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
91
92
  defaultClassNames.weekday
92
93
  ),
93
- week: cn("flex w-full mt-2", defaultClassNames.week),
94
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
94
95
  week_number_header: cn(
95
- "select-none w-(--cell-size)",
96
+ "w-(--cell-size) select-none",
96
97
  defaultClassNames.week_number_header
97
98
  ),
98
99
  week_number: cn(
99
- "text-[0.8rem] select-none text-muted-foreground",
100
+ "text-[0.8rem] text-muted-foreground select-none",
100
101
  defaultClassNames.week_number
101
102
  ),
102
103
  day: cn(
103
- "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
104
+ "group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
105
+ props.showWeekNumber
106
+ ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)"
107
+ : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
104
108
  defaultClassNames.day
105
109
  ),
106
110
  range_start: cn(
107
- "rounded-l-md bg-accent",
111
+ "relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
108
112
  defaultClassNames.range_start
109
113
  ),
110
114
  range_middle: cn("rounded-none", defaultClassNames.range_middle),
111
- range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
115
+ range_end: cn(
116
+ "relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
117
+ defaultClassNames.range_end
118
+ ),
112
119
  today: cn(
113
- "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
120
+ "rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
114
121
  defaultClassNames.today
115
122
  ),
116
123
  outside: cn(
@@ -144,10 +151,7 @@ function Calendar({
144
151
 
145
152
  if (orientation === "right") {
146
153
  return (
147
- <ChevronRightIcon
148
- className={cn("size-4", className)}
149
- {...props}
150
- />
154
+ <ChevronRightIcon className={cn("size-4", className)} {...props} />
151
155
  )
152
156
  }
153
157
 
@@ -155,7 +159,9 @@ function Calendar({
155
159
  <ChevronDownIcon className={cn("size-4", className)} {...props} />
156
160
  )
157
161
  },
158
- DayButton: CalendarDayButton,
162
+ DayButton: ({ ...props }) => (
163
+ <CalendarDayButton locale={locale} {...props} />
164
+ ),
159
165
  WeekNumber: ({ children, ...props }) => {
160
166
  return (
161
167
  <td {...props}>
@@ -176,8 +182,9 @@ function CalendarDayButton({
176
182
  className,
177
183
  day,
178
184
  modifiers,
185
+ locale,
179
186
  ...props
180
- }: React.ComponentProps<typeof DayButton>) {
187
+ }: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {
181
188
  const defaultClassNames = getDefaultClassNames()
182
189
 
183
190
  const ref = React.useRef<HTMLButtonElement>(null)
@@ -187,10 +194,9 @@ function CalendarDayButton({
187
194
 
188
195
  return (
189
196
  <Button
190
- ref={ref}
191
197
  variant="ghost"
192
198
  size="icon"
193
- data-day={day.date.toLocaleDateString()}
199
+ data-day={day.date.toLocaleDateString(locale?.code)}
194
200
  data-selected-single={
195
201
  modifiers.selected &&
196
202
  !modifiers.range_start &&
@@ -201,7 +207,7 @@ function CalendarDayButton({
201
207
  data-range-end={modifiers.range_end}
202
208
  data-range-middle={modifiers.range_middle}
203
209
  className={cn(
204
- "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
210
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
205
211
  defaultClassNames.day,
206
212
  className
207
213
  )}
@@ -0,0 +1,103 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Card({
6
+ className,
7
+ size = "default",
8
+ ...props
9
+ }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
10
+ return (
11
+ <div
12
+ data-slot="card"
13
+ data-size={size}
14
+ className={cn(
15
+ "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ )
21
+ }
22
+
23
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
24
+ return (
25
+ <div
26
+ data-slot="card-header"
27
+ className={cn(
28
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
29
+ className
30
+ )}
31
+ {...props}
32
+ />
33
+ )
34
+ }
35
+
36
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
37
+ return (
38
+ <div
39
+ data-slot="card-title"
40
+ className={cn(
41
+ "text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
42
+ className
43
+ )}
44
+ {...props}
45
+ />
46
+ )
47
+ }
48
+
49
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
50
+ return (
51
+ <div
52
+ data-slot="card-description"
53
+ className={cn("text-sm text-muted-foreground", className)}
54
+ {...props}
55
+ />
56
+ )
57
+ }
58
+
59
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
60
+ return (
61
+ <div
62
+ data-slot="card-action"
63
+ className={cn(
64
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
65
+ className
66
+ )}
67
+ {...props}
68
+ />
69
+ )
70
+ }
71
+
72
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
73
+ return (
74
+ <div
75
+ data-slot="card-content"
76
+ className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
83
+ return (
84
+ <div
85
+ data-slot="card-footer"
86
+ className={cn(
87
+ "flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
88
+ className
89
+ )}
90
+ {...props}
91
+ />
92
+ )
93
+ }
94
+
95
+ export {
96
+ Card,
97
+ CardHeader,
98
+ CardFooter,
99
+ CardTitle,
100
+ CardAction,
101
+ CardDescription,
102
+ CardContent,
103
+ }