@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,268 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { ChevronRightIcon, CheckIcon } from "lucide-react"
8
+
9
+ function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
10
+ return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
11
+ }
12
+
13
+ function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
14
+ return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
15
+ }
16
+
17
+ function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
18
+ return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
19
+ }
20
+
21
+ function DropdownMenuContent({
22
+ align = "start",
23
+ alignOffset = 0,
24
+ side = "bottom",
25
+ sideOffset = 4,
26
+ className,
27
+ ...props
28
+ }: MenuPrimitive.Popup.Props &
29
+ Pick<
30
+ MenuPrimitive.Positioner.Props,
31
+ "align" | "alignOffset" | "side" | "sideOffset"
32
+ >) {
33
+ return (
34
+ <MenuPrimitive.Portal>
35
+ <MenuPrimitive.Positioner
36
+ className="isolate z-50 outline-none"
37
+ align={align}
38
+ alignOffset={alignOffset}
39
+ side={side}
40
+ sideOffset={sideOffset}
41
+ >
42
+ <MenuPrimitive.Popup
43
+ data-slot="dropdown-menu-content"
44
+ className={cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className )}
45
+ {...props}
46
+ />
47
+ </MenuPrimitive.Positioner>
48
+ </MenuPrimitive.Portal>
49
+ )
50
+ }
51
+
52
+ function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
53
+ return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
54
+ }
55
+
56
+ function DropdownMenuLabel({
57
+ className,
58
+ inset,
59
+ ...props
60
+ }: MenuPrimitive.GroupLabel.Props & {
61
+ inset?: boolean
62
+ }) {
63
+ return (
64
+ <MenuPrimitive.GroupLabel
65
+ data-slot="dropdown-menu-label"
66
+ data-inset={inset}
67
+ className={cn(
68
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
69
+ className
70
+ )}
71
+ {...props}
72
+ />
73
+ )
74
+ }
75
+
76
+ function DropdownMenuItem({
77
+ className,
78
+ inset,
79
+ variant = "default",
80
+ ...props
81
+ }: MenuPrimitive.Item.Props & {
82
+ inset?: boolean
83
+ variant?: "default" | "destructive"
84
+ }) {
85
+ return (
86
+ <MenuPrimitive.Item
87
+ data-slot="dropdown-menu-item"
88
+ data-inset={inset}
89
+ data-variant={variant}
90
+ className={cn(
91
+ "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
92
+ className
93
+ )}
94
+ {...props}
95
+ />
96
+ )
97
+ }
98
+
99
+ function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
100
+ return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
101
+ }
102
+
103
+ function DropdownMenuSubTrigger({
104
+ className,
105
+ inset,
106
+ children,
107
+ ...props
108
+ }: MenuPrimitive.SubmenuTrigger.Props & {
109
+ inset?: boolean
110
+ }) {
111
+ return (
112
+ <MenuPrimitive.SubmenuTrigger
113
+ data-slot="dropdown-menu-sub-trigger"
114
+ data-inset={inset}
115
+ className={cn(
116
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
117
+ className
118
+ )}
119
+ {...props}
120
+ >
121
+ {children}
122
+ <ChevronRightIcon className="ml-auto" />
123
+ </MenuPrimitive.SubmenuTrigger>
124
+ )
125
+ }
126
+
127
+ function DropdownMenuSubContent({
128
+ align = "start",
129
+ alignOffset = -3,
130
+ side = "right",
131
+ sideOffset = 0,
132
+ className,
133
+ ...props
134
+ }: React.ComponentProps<typeof DropdownMenuContent>) {
135
+ return (
136
+ <DropdownMenuContent
137
+ data-slot="dropdown-menu-sub-content"
138
+ className={cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
139
+ align={align}
140
+ alignOffset={alignOffset}
141
+ side={side}
142
+ sideOffset={sideOffset}
143
+ {...props}
144
+ />
145
+ )
146
+ }
147
+
148
+ function DropdownMenuCheckboxItem({
149
+ className,
150
+ children,
151
+ checked,
152
+ inset,
153
+ ...props
154
+ }: MenuPrimitive.CheckboxItem.Props & {
155
+ inset?: boolean
156
+ }) {
157
+ return (
158
+ <MenuPrimitive.CheckboxItem
159
+ data-slot="dropdown-menu-checkbox-item"
160
+ data-inset={inset}
161
+ className={cn(
162
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
163
+ className
164
+ )}
165
+ checked={checked}
166
+ {...props}
167
+ >
168
+ <span
169
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
170
+ data-slot="dropdown-menu-checkbox-item-indicator"
171
+ >
172
+ <MenuPrimitive.CheckboxItemIndicator>
173
+ <CheckIcon
174
+ />
175
+ </MenuPrimitive.CheckboxItemIndicator>
176
+ </span>
177
+ {children}
178
+ </MenuPrimitive.CheckboxItem>
179
+ )
180
+ }
181
+
182
+ function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
183
+ return (
184
+ <MenuPrimitive.RadioGroup
185
+ data-slot="dropdown-menu-radio-group"
186
+ {...props}
187
+ />
188
+ )
189
+ }
190
+
191
+ function DropdownMenuRadioItem({
192
+ className,
193
+ children,
194
+ inset,
195
+ ...props
196
+ }: MenuPrimitive.RadioItem.Props & {
197
+ inset?: boolean
198
+ }) {
199
+ return (
200
+ <MenuPrimitive.RadioItem
201
+ data-slot="dropdown-menu-radio-item"
202
+ data-inset={inset}
203
+ className={cn(
204
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
205
+ className
206
+ )}
207
+ {...props}
208
+ >
209
+ <span
210
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
211
+ data-slot="dropdown-menu-radio-item-indicator"
212
+ >
213
+ <MenuPrimitive.RadioItemIndicator>
214
+ <CheckIcon
215
+ />
216
+ </MenuPrimitive.RadioItemIndicator>
217
+ </span>
218
+ {children}
219
+ </MenuPrimitive.RadioItem>
220
+ )
221
+ }
222
+
223
+ function DropdownMenuSeparator({
224
+ className,
225
+ ...props
226
+ }: MenuPrimitive.Separator.Props) {
227
+ return (
228
+ <MenuPrimitive.Separator
229
+ data-slot="dropdown-menu-separator"
230
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
231
+ {...props}
232
+ />
233
+ )
234
+ }
235
+
236
+ function DropdownMenuShortcut({
237
+ className,
238
+ ...props
239
+ }: React.ComponentProps<"span">) {
240
+ return (
241
+ <span
242
+ data-slot="dropdown-menu-shortcut"
243
+ className={cn(
244
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
245
+ className
246
+ )}
247
+ {...props}
248
+ />
249
+ )
250
+ }
251
+
252
+ export {
253
+ DropdownMenu,
254
+ DropdownMenuPortal,
255
+ DropdownMenuTrigger,
256
+ DropdownMenuContent,
257
+ DropdownMenuGroup,
258
+ DropdownMenuLabel,
259
+ DropdownMenuItem,
260
+ DropdownMenuCheckboxItem,
261
+ DropdownMenuRadioGroup,
262
+ DropdownMenuRadioItem,
263
+ DropdownMenuSeparator,
264
+ DropdownMenuShortcut,
265
+ DropdownMenuSub,
266
+ DropdownMenuSubTrigger,
267
+ DropdownMenuSubContent,
268
+ }
@@ -0,0 +1,49 @@
1
+ import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props) {
6
+ return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />
7
+ }
8
+
9
+ function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props) {
10
+ return (
11
+ <PreviewCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
12
+ )
13
+ }
14
+
15
+ function HoverCardContent({
16
+ className,
17
+ side = "bottom",
18
+ sideOffset = 4,
19
+ align = "center",
20
+ alignOffset = 4,
21
+ ...props
22
+ }: PreviewCardPrimitive.Popup.Props &
23
+ Pick<
24
+ PreviewCardPrimitive.Positioner.Props,
25
+ "align" | "alignOffset" | "side" | "sideOffset"
26
+ >) {
27
+ return (
28
+ <PreviewCardPrimitive.Portal data-slot="hover-card-portal">
29
+ <PreviewCardPrimitive.Positioner
30
+ align={align}
31
+ alignOffset={alignOffset}
32
+ side={side}
33
+ sideOffset={sideOffset}
34
+ className="isolate z-50"
35
+ >
36
+ <PreviewCardPrimitive.Popup
37
+ data-slot="hover-card-content"
38
+ className={cn(
39
+ "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
40
+ className
41
+ )}
42
+ {...props}
43
+ />
44
+ </PreviewCardPrimitive.Positioner>
45
+ </PreviewCardPrimitive.Portal>
46
+ )
47
+ }
48
+
49
+ export { HoverCard, HoverCardTrigger, HoverCardContent }
@@ -0,0 +1,156 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+
4
+ import { cn } from "@/lib/utils"
5
+ import { Button } from "@/components/ui/button"
6
+ import { Input } from "@/components/ui/input"
7
+ import { Textarea } from "@/components/ui/textarea"
8
+
9
+ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
10
+ return (
11
+ <div
12
+ data-slot="input-group"
13
+ role="group"
14
+ className={cn(
15
+ "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ )
21
+ }
22
+
23
+ const inputGroupAddonVariants = cva(
24
+ "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
25
+ {
26
+ variants: {
27
+ align: {
28
+ "inline-start":
29
+ "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
30
+ "inline-end":
31
+ "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
32
+ "block-start":
33
+ "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
34
+ "block-end":
35
+ "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
36
+ },
37
+ },
38
+ defaultVariants: {
39
+ align: "inline-start",
40
+ },
41
+ }
42
+ )
43
+
44
+ function InputGroupAddon({
45
+ className,
46
+ align = "inline-start",
47
+ ...props
48
+ }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
49
+ return (
50
+ <div
51
+ role="group"
52
+ data-slot="input-group-addon"
53
+ data-align={align}
54
+ className={cn(inputGroupAddonVariants({ align }), className)}
55
+ onClick={(e) => {
56
+ if ((e.target as HTMLElement).closest("button")) {
57
+ return
58
+ }
59
+ e.currentTarget.parentElement?.querySelector("input")?.focus()
60
+ }}
61
+ {...props}
62
+ />
63
+ )
64
+ }
65
+
66
+ const inputGroupButtonVariants = cva(
67
+ "flex items-center gap-2 text-sm shadow-none",
68
+ {
69
+ variants: {
70
+ size: {
71
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
72
+ sm: "",
73
+ "icon-xs":
74
+ "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
75
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0",
76
+ },
77
+ },
78
+ defaultVariants: {
79
+ size: "xs",
80
+ },
81
+ }
82
+ )
83
+
84
+ function InputGroupButton({
85
+ className,
86
+ type = "button",
87
+ variant = "ghost",
88
+ size = "xs",
89
+ ...props
90
+ }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> &
91
+ VariantProps<typeof inputGroupButtonVariants> & {
92
+ type?: "button" | "submit" | "reset"
93
+ }) {
94
+ return (
95
+ <Button
96
+ type={type}
97
+ data-size={size}
98
+ variant={variant}
99
+ className={cn(inputGroupButtonVariants({ size }), className)}
100
+ {...props}
101
+ />
102
+ )
103
+ }
104
+
105
+ function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
106
+ return (
107
+ <span
108
+ className={cn(
109
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
110
+ className
111
+ )}
112
+ {...props}
113
+ />
114
+ )
115
+ }
116
+
117
+ function InputGroupInput({
118
+ className,
119
+ ...props
120
+ }: React.ComponentProps<"input">) {
121
+ return (
122
+ <Input
123
+ data-slot="input-group-control"
124
+ className={cn(
125
+ "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
126
+ className
127
+ )}
128
+ {...props}
129
+ />
130
+ )
131
+ }
132
+
133
+ function InputGroupTextarea({
134
+ className,
135
+ ...props
136
+ }: React.ComponentProps<"textarea">) {
137
+ return (
138
+ <Textarea
139
+ data-slot="input-group-control"
140
+ className={cn(
141
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
142
+ className
143
+ )}
144
+ {...props}
145
+ />
146
+ )
147
+ }
148
+
149
+ export {
150
+ InputGroup,
151
+ InputGroupAddon,
152
+ InputGroupButton,
153
+ InputGroupText,
154
+ InputGroupInput,
155
+ InputGroupTextarea,
156
+ }
@@ -2,9 +2,9 @@
2
2
 
3
3
  import * as React from "react"
4
4
  import { OTPInput, OTPInputContext } from "input-otp"
5
- import { MinusIcon } from "lucide-react"
6
5
 
7
6
  import { cn } from "@/lib/utils"
7
+ import { MinusIcon } from "lucide-react"
8
8
 
9
9
  function InputOTP({
10
10
  className,
@@ -17,9 +17,10 @@ function InputOTP({
17
17
  <OTPInput
18
18
  data-slot="input-otp"
19
19
  containerClassName={cn(
20
- "flex items-center gap-2 has-disabled:opacity-50",
20
+ "cn-input-otp flex items-center has-disabled:opacity-50",
21
21
  containerClassName
22
22
  )}
23
+ spellCheck={false}
23
24
  className={cn("disabled:cursor-not-allowed", className)}
24
25
  {...props}
25
26
  />
@@ -30,7 +31,10 @@ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
30
31
  return (
31
32
  <div
32
33
  data-slot="input-otp-group"
33
- className={cn("flex items-center", className)}
34
+ className={cn(
35
+ "flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
36
+ className
37
+ )}
34
38
  {...props}
35
39
  />
36
40
  )
@@ -51,7 +55,7 @@ function InputOTPSlot({
51
55
  data-slot="input-otp-slot"
52
56
  data-active={isActive}
53
57
  className={cn(
54
- "data-[active=true]:border-ring data-[active=true]:ring-ring/20 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
58
+ "relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
55
59
  className
56
60
  )}
57
61
  {...props}
@@ -59,7 +63,7 @@ function InputOTPSlot({
59
63
  {char}
60
64
  {hasFakeCaret && (
61
65
  <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
62
- <div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
66
+ <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
63
67
  </div>
64
68
  )}
65
69
  </div>
@@ -68,8 +72,14 @@ function InputOTPSlot({
68
72
 
69
73
  function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
70
74
  return (
71
- <div data-slot="input-otp-separator" role="separator" {...props}>
72
- <MinusIcon />
75
+ <div
76
+ data-slot="input-otp-separator"
77
+ className="flex items-center [&_svg:not([class*='size-'])]:size-4"
78
+ role="separator"
79
+ {...props}
80
+ >
81
+ <MinusIcon
82
+ />
73
83
  </div>
74
84
  )
75
85
  }
@@ -0,0 +1,20 @@
1
+ import * as React from "react"
2
+ import { Input as InputPrimitive } from "@base-ui/react/input"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
7
+ return (
8
+ <InputPrimitive
9
+ type={type}
10
+ data-slot="input"
11
+ className={cn(
12
+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
13
+ className
14
+ )}
15
+ {...props}
16
+ />
17
+ )
18
+ }
19
+
20
+ export { Input }
@@ -0,0 +1,18 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Label({ className, ...props }: React.ComponentProps<"label">) {
6
+ return (
7
+ <label
8
+ data-slot="label"
9
+ className={cn(
10
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ export { Label }