@lark-apaas/coding-templates 0.1.3 → 0.1.5

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 (261) hide show
  1. package/package.json +2 -3
  2. package/template-vite-react/_gitignore +24 -0
  3. package/template-vite-react/client/index.html +13 -0
  4. package/template-vite-react/client/public/favicon.svg +1 -0
  5. package/template-vite-react/client/public/icons.svg +24 -0
  6. package/template-vite-react/client/src/api/index.ts +7 -0
  7. package/template-vite-react/client/src/app.tsx +19 -0
  8. package/{template-nextjs-static → template-vite-react/client}/src/components/header.tsx +5 -13
  9. package/template-vite-react/client/src/components/layout.tsx +13 -0
  10. package/template-vite-react/client/src/components/theme-provider.tsx +45 -0
  11. package/template-vite-react/client/src/components/ui/accordion.tsx +72 -0
  12. package/template-vite-react/client/src/components/ui/alert-dialog.tsx +187 -0
  13. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/alert.tsx +15 -10
  14. package/template-vite-react/client/src/components/ui/aspect-ratio.tsx +22 -0
  15. package/template-vite-react/client/src/components/ui/avatar.tsx +109 -0
  16. package/template-vite-react/client/src/components/ui/badge.tsx +52 -0
  17. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/breadcrumb.tsx +39 -23
  18. package/template-vite-react/client/src/components/ui/button.tsx +58 -0
  19. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/calendar.tsx +43 -37
  20. package/template-vite-react/client/src/components/ui/card.tsx +103 -0
  21. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/carousel.tsx +8 -7
  22. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/chart.tsx +49 -35
  23. package/template-vite-react/client/src/components/ui/checkbox.tsx +29 -0
  24. package/template-vite-react/client/src/components/ui/collapsible.tsx +19 -0
  25. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/command.tsx +40 -52
  26. package/template-vite-react/client/src/components/ui/context-menu.tsx +271 -0
  27. package/template-vite-react/client/src/components/ui/dialog.tsx +158 -0
  28. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/drawer.tsx +9 -12
  29. package/template-vite-react/client/src/components/ui/dropdown-menu.tsx +268 -0
  30. package/template-vite-react/client/src/components/ui/hover-card.tsx +49 -0
  31. package/template-vite-react/client/src/components/ui/input-group.tsx +156 -0
  32. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/input-otp.tsx +17 -7
  33. package/template-vite-react/client/src/components/ui/input.tsx +20 -0
  34. package/template-vite-react/client/src/components/ui/label.tsx +18 -0
  35. package/template-vite-react/client/src/components/ui/menubar.tsx +280 -0
  36. package/template-vite-react/client/src/components/ui/navigation-menu.tsx +168 -0
  37. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/pagination.tsx +35 -32
  38. package/template-vite-react/client/src/components/ui/popover.tsx +90 -0
  39. package/template-vite-react/client/src/components/ui/progress.tsx +81 -0
  40. package/template-vite-react/client/src/components/ui/radio-group.tsx +38 -0
  41. package/template-vite-react/client/src/components/ui/resizable.tsx +48 -0
  42. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/scroll-area.tsx +10 -13
  43. package/template-vite-react/client/src/components/ui/select.tsx +199 -0
  44. package/template-vite-react/client/src/components/ui/separator.tsx +25 -0
  45. package/template-vite-react/client/src/components/ui/sheet.tsx +138 -0
  46. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/sidebar.tsx +156 -162
  47. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/skeleton.tsx +1 -1
  48. package/template-vite-react/client/src/components/ui/slider.tsx +57 -0
  49. package/template-vite-react/client/src/components/ui/sonner.tsx +49 -0
  50. package/template-vite-react/client/src/components/ui/switch.tsx +30 -0
  51. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/table.tsx +5 -5
  52. package/template-vite-react/client/src/components/ui/tabs.tsx +80 -0
  53. package/template-vite-react/client/src/components/ui/textarea.tsx +18 -0
  54. package/template-vite-react/client/src/components/ui/toggle-group.tsx +89 -0
  55. package/template-vite-react/client/src/components/ui/toggle.tsx +44 -0
  56. package/template-vite-react/client/src/components/ui/tooltip.tsx +64 -0
  57. package/template-vite-react/client/src/index.css +1 -0
  58. package/template-vite-react/client/src/main.tsx +13 -0
  59. package/template-vite-react/client/src/pages/home/index.tsx +12 -0
  60. package/template-vite-react/client/src/pages/not-found/index.tsx +11 -0
  61. package/template-vite-react/client/src/types/index.ts +1 -0
  62. package/{template-nextjs-static → template-vite-react}/components.json +2 -2
  63. package/template-vite-react/eslint.config.js +23 -0
  64. package/template-vite-react/package.json +58 -0
  65. package/template-vite-react/scripts/build.sh +40 -0
  66. package/template-vite-react/shared/types.ts +1 -0
  67. package/template-vite-react/tsconfig.app.json +33 -0
  68. package/template-vite-react/tsconfig.json +14 -0
  69. package/template-vite-react/tsconfig.node.json +26 -0
  70. package/template-vite-react/vite.config.ts +22 -0
  71. package/template-nextjs-fullstack/README.md +0 -169
  72. package/template-nextjs-fullstack/_env.local.example +0 -1
  73. package/template-nextjs-fullstack/_gitignore +0 -41
  74. package/template-nextjs-fullstack/components.json +0 -25
  75. package/template-nextjs-fullstack/drizzle.config.ts +0 -10
  76. package/template-nextjs-fullstack/eslint.config.js +0 -15
  77. package/template-nextjs-fullstack/next.config.ts +0 -5
  78. package/template-nextjs-fullstack/package.json +0 -85
  79. package/template-nextjs-fullstack/postcss.config.js +0 -8
  80. package/template-nextjs-fullstack/scripts/build.sh +0 -37
  81. package/template-nextjs-fullstack/src/app/favicon.ico +0 -0
  82. package/template-nextjs-fullstack/src/app/globals.css +0 -130
  83. package/template-nextjs-fullstack/src/app/layout.tsx +0 -24
  84. package/template-nextjs-fullstack/src/app/page.tsx +0 -69
  85. package/template-nextjs-fullstack/src/app/todos/actions.ts +0 -37
  86. package/template-nextjs-fullstack/src/app/todos/page.tsx +0 -26
  87. package/template-nextjs-fullstack/src/app/todos/todo-form.tsx +0 -27
  88. package/template-nextjs-fullstack/src/app/todos/todo-list.tsx +0 -44
  89. package/template-nextjs-fullstack/src/components/header.tsx +0 -32
  90. package/template-nextjs-fullstack/src/components/theme-provider.tsx +0 -8
  91. package/template-nextjs-fullstack/src/components/ui/README.md +0 -134
  92. package/template-nextjs-fullstack/src/components/ui/accordion.tsx +0 -66
  93. package/template-nextjs-fullstack/src/components/ui/alert-dialog.tsx +0 -157
  94. package/template-nextjs-fullstack/src/components/ui/aspect-ratio.tsx +0 -11
  95. package/template-nextjs-fullstack/src/components/ui/avatar.tsx +0 -53
  96. package/template-nextjs-fullstack/src/components/ui/badge.tsx +0 -42
  97. package/template-nextjs-fullstack/src/components/ui/button.tsx +0 -69
  98. package/template-nextjs-fullstack/src/components/ui/calendar.tsx +0 -213
  99. package/template-nextjs-fullstack/src/components/ui/card.tsx +0 -82
  100. package/template-nextjs-fullstack/src/components/ui/chart.tsx +0 -357
  101. package/template-nextjs-fullstack/src/components/ui/checkbox.tsx +0 -32
  102. package/template-nextjs-fullstack/src/components/ui/collapsible.tsx +0 -33
  103. package/template-nextjs-fullstack/src/components/ui/context-menu.tsx +0 -324
  104. package/template-nextjs-fullstack/src/components/ui/dialog.tsx +0 -143
  105. package/template-nextjs-fullstack/src/components/ui/drawer.tsx +0 -135
  106. package/template-nextjs-fullstack/src/components/ui/dropdown-menu.tsx +0 -329
  107. package/template-nextjs-fullstack/src/components/ui/hover-card.tsx +0 -44
  108. package/template-nextjs-fullstack/src/components/ui/input-group.tsx +0 -166
  109. package/template-nextjs-fullstack/src/components/ui/input-otp.tsx +0 -77
  110. package/template-nextjs-fullstack/src/components/ui/input.tsx +0 -21
  111. package/template-nextjs-fullstack/src/components/ui/label.tsx +0 -24
  112. package/template-nextjs-fullstack/src/components/ui/menubar.tsx +0 -348
  113. package/template-nextjs-fullstack/src/components/ui/navigation-menu.tsx +0 -168
  114. package/template-nextjs-fullstack/src/components/ui/pagination.tsx +0 -127
  115. package/template-nextjs-fullstack/src/components/ui/popover.tsx +0 -48
  116. package/template-nextjs-fullstack/src/components/ui/progress.tsx +0 -31
  117. package/template-nextjs-fullstack/src/components/ui/radio-group.tsx +0 -45
  118. package/template-nextjs-fullstack/src/components/ui/resizable.tsx +0 -56
  119. package/template-nextjs-fullstack/src/components/ui/select.tsx +0 -243
  120. package/template-nextjs-fullstack/src/components/ui/separator.tsx +0 -28
  121. package/template-nextjs-fullstack/src/components/ui/sheet.tsx +0 -139
  122. package/template-nextjs-fullstack/src/components/ui/skeleton.tsx +0 -13
  123. package/template-nextjs-fullstack/src/components/ui/slider.tsx +0 -87
  124. package/template-nextjs-fullstack/src/components/ui/sonner.tsx +0 -67
  125. package/template-nextjs-fullstack/src/components/ui/switch.tsx +0 -31
  126. package/template-nextjs-fullstack/src/components/ui/tabs.tsx +0 -66
  127. package/template-nextjs-fullstack/src/components/ui/textarea.tsx +0 -18
  128. package/template-nextjs-fullstack/src/components/ui/toggle-group.tsx +0 -83
  129. package/template-nextjs-fullstack/src/components/ui/toggle.tsx +0 -47
  130. package/template-nextjs-fullstack/src/components/ui/tooltip.tsx +0 -61
  131. package/template-nextjs-fullstack/src/db/index.ts +0 -8
  132. package/template-nextjs-fullstack/src/db/schema.ts +0 -11
  133. package/template-nextjs-fullstack/tailwind.config.ts +0 -10
  134. package/template-nextjs-fullstack/tsconfig.json +0 -34
  135. package/template-nextjs-static/README.md +0 -80
  136. package/template-nextjs-static/_gitignore +0 -41
  137. package/template-nextjs-static/eslint.config.js +0 -15
  138. package/template-nextjs-static/next.config.ts +0 -8
  139. package/template-nextjs-static/package.json +0 -77
  140. package/template-nextjs-static/postcss.config.js +0 -8
  141. package/template-nextjs-static/public/favicon.ico +0 -0
  142. package/template-nextjs-static/scripts/build.sh +0 -36
  143. package/template-nextjs-static/src/components/theme-provider.tsx +0 -6
  144. package/template-nextjs-static/src/components/ui/README.md +0 -134
  145. package/template-nextjs-static/src/components/ui/accordion.tsx +0 -66
  146. package/template-nextjs-static/src/components/ui/alert-dialog.tsx +0 -157
  147. package/template-nextjs-static/src/components/ui/alert.tsx +0 -71
  148. package/template-nextjs-static/src/components/ui/aspect-ratio.tsx +0 -11
  149. package/template-nextjs-static/src/components/ui/avatar.tsx +0 -53
  150. package/template-nextjs-static/src/components/ui/badge.tsx +0 -42
  151. package/template-nextjs-static/src/components/ui/breadcrumb.tsx +0 -109
  152. package/template-nextjs-static/src/components/ui/button-group.tsx +0 -83
  153. package/template-nextjs-static/src/components/ui/button.tsx +0 -69
  154. package/template-nextjs-static/src/components/ui/card.tsx +0 -82
  155. package/template-nextjs-static/src/components/ui/carousel.tsx +0 -241
  156. package/template-nextjs-static/src/components/ui/checkbox.tsx +0 -32
  157. package/template-nextjs-static/src/components/ui/collapsible.tsx +0 -33
  158. package/template-nextjs-static/src/components/ui/command.tsx +0 -208
  159. package/template-nextjs-static/src/components/ui/context-menu.tsx +0 -324
  160. package/template-nextjs-static/src/components/ui/dialog.tsx +0 -143
  161. package/template-nextjs-static/src/components/ui/dropdown-menu.tsx +0 -329
  162. package/template-nextjs-static/src/components/ui/empty.tsx +0 -104
  163. package/template-nextjs-static/src/components/ui/field.tsx +0 -248
  164. package/template-nextjs-static/src/components/ui/form.tsx +0 -167
  165. package/template-nextjs-static/src/components/ui/hover-card.tsx +0 -44
  166. package/template-nextjs-static/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -21
  167. package/template-nextjs-static/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -36
  168. package/template-nextjs-static/src/components/ui/icons/file-android-colorful-icon.tsx +0 -33
  169. package/template-nextjs-static/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -21
  170. package/template-nextjs-static/src/components/ui/icons/file-code-colorful-icon.tsx +0 -28
  171. package/template-nextjs-static/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -21
  172. package/template-nextjs-static/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -29
  173. package/template-nextjs-static/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -25
  174. package/template-nextjs-static/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -29
  175. package/template-nextjs-static/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -29
  176. package/template-nextjs-static/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -21
  177. package/template-nextjs-static/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -21
  178. package/template-nextjs-static/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -21
  179. package/template-nextjs-static/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -29
  180. package/template-nextjs-static/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -23
  181. package/template-nextjs-static/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -27
  182. package/template-nextjs-static/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -20
  183. package/template-nextjs-static/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -21
  184. package/template-nextjs-static/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -12
  185. package/template-nextjs-static/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -14
  186. package/template-nextjs-static/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -23
  187. package/template-nextjs-static/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -38
  188. package/template-nextjs-static/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -21
  189. package/template-nextjs-static/src/components/ui/image.tsx +0 -183
  190. package/template-nextjs-static/src/components/ui/input-group.tsx +0 -166
  191. package/template-nextjs-static/src/components/ui/input.tsx +0 -21
  192. package/template-nextjs-static/src/components/ui/item.tsx +0 -193
  193. package/template-nextjs-static/src/components/ui/kbd.tsx +0 -28
  194. package/template-nextjs-static/src/components/ui/label.tsx +0 -24
  195. package/template-nextjs-static/src/components/ui/menubar.tsx +0 -348
  196. package/template-nextjs-static/src/components/ui/native-select.tsx +0 -48
  197. package/template-nextjs-static/src/components/ui/navigation-menu.tsx +0 -168
  198. package/template-nextjs-static/src/components/ui/popover.tsx +0 -48
  199. package/template-nextjs-static/src/components/ui/progress.tsx +0 -31
  200. package/template-nextjs-static/src/components/ui/radio-group.tsx +0 -45
  201. package/template-nextjs-static/src/components/ui/resizable.tsx +0 -56
  202. package/template-nextjs-static/src/components/ui/scroll-area.tsx +0 -58
  203. package/template-nextjs-static/src/components/ui/select.tsx +0 -243
  204. package/template-nextjs-static/src/components/ui/separator.tsx +0 -28
  205. package/template-nextjs-static/src/components/ui/sheet.tsx +0 -139
  206. package/template-nextjs-static/src/components/ui/sidebar.tsx +0 -727
  207. package/template-nextjs-static/src/components/ui/slider.tsx +0 -87
  208. package/template-nextjs-static/src/components/ui/sonner.tsx +0 -67
  209. package/template-nextjs-static/src/components/ui/spinner.tsx +0 -16
  210. package/template-nextjs-static/src/components/ui/streamdown.tsx +0 -186
  211. package/template-nextjs-static/src/components/ui/switch.tsx +0 -31
  212. package/template-nextjs-static/src/components/ui/table.tsx +0 -116
  213. package/template-nextjs-static/src/components/ui/tabs.tsx +0 -66
  214. package/template-nextjs-static/src/components/ui/textarea.tsx +0 -18
  215. package/template-nextjs-static/src/components/ui/toggle-group.tsx +0 -83
  216. package/template-nextjs-static/src/components/ui/toggle.tsx +0 -47
  217. package/template-nextjs-static/src/components/ui/tooltip.tsx +0 -61
  218. package/template-nextjs-static/src/hooks/use-mobile.ts +0 -19
  219. package/template-nextjs-static/src/lib/utils.ts +0 -6
  220. package/template-nextjs-static/src/pages/_app.tsx +0 -11
  221. package/template-nextjs-static/src/pages/_document.tsx +0 -13
  222. package/template-nextjs-static/src/pages/hello.tsx +0 -32
  223. package/template-nextjs-static/src/pages/index.tsx +0 -76
  224. package/template-nextjs-static/src/styles/globals.css +0 -143
  225. package/template-nextjs-static/tailwind.config.ts +0 -10
  226. package/template-nextjs-static/tsconfig.json +0 -34
  227. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/button-group.tsx +0 -0
  228. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/empty.tsx +0 -0
  229. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/field.tsx +0 -0
  230. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/form.tsx +0 -0
  231. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -0
  232. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -0
  233. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-android-colorful-icon.tsx +0 -0
  234. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -0
  235. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-code-colorful-icon.tsx +0 -0
  236. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -0
  237. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -0
  238. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -0
  239. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -0
  240. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -0
  241. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -0
  242. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -0
  243. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -0
  244. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -0
  245. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -0
  246. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -0
  247. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -0
  248. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -0
  249. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -0
  250. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -0
  251. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -0
  252. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -0
  253. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -0
  254. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/image.tsx +0 -0
  255. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/item.tsx +0 -0
  256. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/kbd.tsx +0 -0
  257. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/native-select.tsx +0 -0
  258. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/spinner.tsx +0 -0
  259. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/streamdown.tsx +0 -0
  260. /package/{template-nextjs-fullstack → template-vite-react/client}/src/hooks/use-mobile.ts +0 -0
  261. /package/{template-nextjs-fullstack → template-vite-react/client}/src/lib/utils.ts +0 -0
@@ -0,0 +1,280 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu"
5
+ import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar"
6
+
7
+ import { cn } from "@/lib/utils"
8
+ import {
9
+ DropdownMenu,
10
+ DropdownMenuContent,
11
+ DropdownMenuGroup,
12
+ DropdownMenuItem,
13
+ DropdownMenuLabel,
14
+ DropdownMenuPortal,
15
+ DropdownMenuRadioGroup,
16
+ DropdownMenuSeparator,
17
+ DropdownMenuShortcut,
18
+ DropdownMenuSub,
19
+ DropdownMenuSubContent,
20
+ DropdownMenuSubTrigger,
21
+ DropdownMenuTrigger,
22
+ } from "@/components/ui/dropdown-menu"
23
+ import { CheckIcon } from "lucide-react"
24
+
25
+ function Menubar({ className, ...props }: MenubarPrimitive.Props) {
26
+ return (
27
+ <MenubarPrimitive
28
+ data-slot="menubar"
29
+ className={cn(
30
+ "flex h-8 items-center gap-0.5 rounded-lg border p-[3px]",
31
+ className
32
+ )}
33
+ {...props}
34
+ />
35
+ )
36
+ }
37
+
38
+ function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>) {
39
+ return <DropdownMenu data-slot="menubar-menu" {...props} />
40
+ }
41
+
42
+ function MenubarGroup({
43
+ ...props
44
+ }: React.ComponentProps<typeof DropdownMenuGroup>) {
45
+ return <DropdownMenuGroup data-slot="menubar-group" {...props} />
46
+ }
47
+
48
+ function MenubarPortal({
49
+ ...props
50
+ }: React.ComponentProps<typeof DropdownMenuPortal>) {
51
+ return <DropdownMenuPortal data-slot="menubar-portal" {...props} />
52
+ }
53
+
54
+ function MenubarTrigger({
55
+ className,
56
+ ...props
57
+ }: React.ComponentProps<typeof DropdownMenuTrigger>) {
58
+ return (
59
+ <DropdownMenuTrigger
60
+ data-slot="menubar-trigger"
61
+ className={cn(
62
+ "flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
63
+ className
64
+ )}
65
+ {...props}
66
+ />
67
+ )
68
+ }
69
+
70
+ function MenubarContent({
71
+ className,
72
+ align = "start",
73
+ alignOffset = -4,
74
+ sideOffset = 8,
75
+ ...props
76
+ }: React.ComponentProps<typeof DropdownMenuContent>) {
77
+ return (
78
+ <DropdownMenuContent
79
+ data-slot="menubar-content"
80
+ align={align}
81
+ alignOffset={alignOffset}
82
+ sideOffset={sideOffset}
83
+ className={cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 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", className )}
84
+ {...props}
85
+ />
86
+ )
87
+ }
88
+
89
+ function MenubarItem({
90
+ className,
91
+ inset,
92
+ variant = "default",
93
+ ...props
94
+ }: React.ComponentProps<typeof DropdownMenuItem>) {
95
+ return (
96
+ <DropdownMenuItem
97
+ data-slot="menubar-item"
98
+ data-inset={inset}
99
+ data-variant={variant}
100
+ className={cn(
101
+ "group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm 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:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
102
+ className
103
+ )}
104
+ {...props}
105
+ />
106
+ )
107
+ }
108
+
109
+ function MenubarCheckboxItem({
110
+ className,
111
+ children,
112
+ checked,
113
+ inset,
114
+ ...props
115
+ }: MenuPrimitive.CheckboxItem.Props & {
116
+ inset?: boolean
117
+ }) {
118
+ return (
119
+ <MenuPrimitive.CheckboxItem
120
+ data-slot="menubar-checkbox-item"
121
+ data-inset={inset}
122
+ className={cn(
123
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 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",
124
+ className
125
+ )}
126
+ checked={checked}
127
+ {...props}
128
+ >
129
+ <span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
130
+ <MenuPrimitive.CheckboxItemIndicator>
131
+ <CheckIcon
132
+ />
133
+ </MenuPrimitive.CheckboxItemIndicator>
134
+ </span>
135
+ {children}
136
+ </MenuPrimitive.CheckboxItem>
137
+ )
138
+ }
139
+
140
+ function MenubarRadioGroup({
141
+ ...props
142
+ }: React.ComponentProps<typeof DropdownMenuRadioGroup>) {
143
+ return <DropdownMenuRadioGroup data-slot="menubar-radio-group" {...props} />
144
+ }
145
+
146
+ function MenubarRadioItem({
147
+ className,
148
+ children,
149
+ inset,
150
+ ...props
151
+ }: MenuPrimitive.RadioItem.Props & {
152
+ inset?: boolean
153
+ }) {
154
+ return (
155
+ <MenuPrimitive.RadioItem
156
+ data-slot="menubar-radio-item"
157
+ data-inset={inset}
158
+ className={cn(
159
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 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",
160
+ className
161
+ )}
162
+ {...props}
163
+ >
164
+ <span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
165
+ <MenuPrimitive.RadioItemIndicator>
166
+ <CheckIcon
167
+ />
168
+ </MenuPrimitive.RadioItemIndicator>
169
+ </span>
170
+ {children}
171
+ </MenuPrimitive.RadioItem>
172
+ )
173
+ }
174
+
175
+ function MenubarLabel({
176
+ className,
177
+ inset,
178
+ ...props
179
+ }: React.ComponentProps<typeof DropdownMenuLabel> & {
180
+ inset?: boolean
181
+ }) {
182
+ return (
183
+ <DropdownMenuLabel
184
+ data-slot="menubar-label"
185
+ data-inset={inset}
186
+ className={cn(
187
+ "px-1.5 py-1 text-sm font-medium data-inset:pl-7",
188
+ className
189
+ )}
190
+ {...props}
191
+ />
192
+ )
193
+ }
194
+
195
+ function MenubarSeparator({
196
+ className,
197
+ ...props
198
+ }: React.ComponentProps<typeof DropdownMenuSeparator>) {
199
+ return (
200
+ <DropdownMenuSeparator
201
+ data-slot="menubar-separator"
202
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
203
+ {...props}
204
+ />
205
+ )
206
+ }
207
+
208
+ function MenubarShortcut({
209
+ className,
210
+ ...props
211
+ }: React.ComponentProps<typeof DropdownMenuShortcut>) {
212
+ return (
213
+ <DropdownMenuShortcut
214
+ data-slot="menubar-shortcut"
215
+ className={cn(
216
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
217
+ className
218
+ )}
219
+ {...props}
220
+ />
221
+ )
222
+ }
223
+
224
+ function MenubarSub({
225
+ ...props
226
+ }: React.ComponentProps<typeof DropdownMenuSub>) {
227
+ return <DropdownMenuSub data-slot="menubar-sub" {...props} />
228
+ }
229
+
230
+ function MenubarSubTrigger({
231
+ className,
232
+ inset,
233
+ ...props
234
+ }: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
235
+ inset?: boolean
236
+ }) {
237
+ return (
238
+ <DropdownMenuSubTrigger
239
+ data-slot="menubar-sub-trigger"
240
+ data-inset={inset}
241
+ className={cn(
242
+ "gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
243
+ className
244
+ )}
245
+ {...props}
246
+ />
247
+ )
248
+ }
249
+
250
+ function MenubarSubContent({
251
+ className,
252
+ ...props
253
+ }: React.ComponentProps<typeof DropdownMenuSubContent>) {
254
+ return (
255
+ <DropdownMenuSubContent
256
+ data-slot="menubar-sub-content"
257
+ className={cn("min-w-32 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 )}
258
+ {...props}
259
+ />
260
+ )
261
+ }
262
+
263
+ export {
264
+ Menubar,
265
+ MenubarPortal,
266
+ MenubarMenu,
267
+ MenubarTrigger,
268
+ MenubarContent,
269
+ MenubarGroup,
270
+ MenubarSeparator,
271
+ MenubarLabel,
272
+ MenubarItem,
273
+ MenubarShortcut,
274
+ MenubarCheckboxItem,
275
+ MenubarRadioGroup,
276
+ MenubarRadioItem,
277
+ MenubarSub,
278
+ MenubarSubTrigger,
279
+ MenubarSubContent,
280
+ }
@@ -0,0 +1,168 @@
1
+ import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu"
2
+ import { cva } from "class-variance-authority"
3
+
4
+ import { cn } from "@/lib/utils"
5
+ import { ChevronDownIcon } from "lucide-react"
6
+
7
+ function NavigationMenu({
8
+ align = "start",
9
+ className,
10
+ children,
11
+ ...props
12
+ }: NavigationMenuPrimitive.Root.Props &
13
+ Pick<NavigationMenuPrimitive.Positioner.Props, "align">) {
14
+ return (
15
+ <NavigationMenuPrimitive.Root
16
+ data-slot="navigation-menu"
17
+ className={cn(
18
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
19
+ className
20
+ )}
21
+ {...props}
22
+ >
23
+ {children}
24
+ <NavigationMenuPositioner align={align} />
25
+ </NavigationMenuPrimitive.Root>
26
+ )
27
+ }
28
+
29
+ function NavigationMenuList({
30
+ className,
31
+ ...props
32
+ }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) {
33
+ return (
34
+ <NavigationMenuPrimitive.List
35
+ data-slot="navigation-menu-list"
36
+ className={cn(
37
+ "group flex flex-1 list-none items-center justify-center gap-0",
38
+ className
39
+ )}
40
+ {...props}
41
+ />
42
+ )
43
+ }
44
+
45
+ function NavigationMenuItem({
46
+ className,
47
+ ...props
48
+ }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) {
49
+ return (
50
+ <NavigationMenuPrimitive.Item
51
+ data-slot="navigation-menu-item"
52
+ className={cn("relative", className)}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ const navigationMenuTriggerStyle = cva(
59
+ "group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted"
60
+ )
61
+
62
+ function NavigationMenuTrigger({
63
+ className,
64
+ children,
65
+ ...props
66
+ }: NavigationMenuPrimitive.Trigger.Props) {
67
+ return (
68
+ <NavigationMenuPrimitive.Trigger
69
+ data-slot="navigation-menu-trigger"
70
+ className={cn(navigationMenuTriggerStyle(), "group", className)}
71
+ {...props}
72
+ >
73
+ {children}{" "}
74
+ <ChevronDownIcon className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180" aria-hidden="true" />
75
+ </NavigationMenuPrimitive.Trigger>
76
+ )
77
+ }
78
+
79
+ function NavigationMenuContent({
80
+ className,
81
+ ...props
82
+ }: NavigationMenuPrimitive.Content.Props) {
83
+ return (
84
+ <NavigationMenuPrimitive.Content
85
+ data-slot="navigation-menu-content"
86
+ className={cn(
87
+ "data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
88
+ className
89
+ )}
90
+ {...props}
91
+ />
92
+ )
93
+ }
94
+
95
+ function NavigationMenuPositioner({
96
+ className,
97
+ side = "bottom",
98
+ sideOffset = 8,
99
+ align = "start",
100
+ alignOffset = 0,
101
+ ...props
102
+ }: NavigationMenuPrimitive.Positioner.Props) {
103
+ return (
104
+ <NavigationMenuPrimitive.Portal>
105
+ <NavigationMenuPrimitive.Positioner
106
+ side={side}
107
+ sideOffset={sideOffset}
108
+ align={align}
109
+ alignOffset={alignOffset}
110
+ className={cn(
111
+ "isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",
112
+ className
113
+ )}
114
+ {...props}
115
+ >
116
+ <NavigationMenuPrimitive.Popup className="data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0">
117
+ <NavigationMenuPrimitive.Viewport className="relative size-full overflow-hidden" />
118
+ </NavigationMenuPrimitive.Popup>
119
+ </NavigationMenuPrimitive.Positioner>
120
+ </NavigationMenuPrimitive.Portal>
121
+ )
122
+ }
123
+
124
+ function NavigationMenuLink({
125
+ className,
126
+ ...props
127
+ }: NavigationMenuPrimitive.Link.Props) {
128
+ return (
129
+ <NavigationMenuPrimitive.Link
130
+ data-slot="navigation-menu-link"
131
+ className={cn(
132
+ "flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
133
+ className
134
+ )}
135
+ {...props}
136
+ />
137
+ )
138
+ }
139
+
140
+ function NavigationMenuIndicator({
141
+ className,
142
+ ...props
143
+ }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) {
144
+ return (
145
+ <NavigationMenuPrimitive.Icon
146
+ data-slot="navigation-menu-indicator"
147
+ className={cn(
148
+ "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
149
+ className
150
+ )}
151
+ {...props}
152
+ >
153
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
154
+ </NavigationMenuPrimitive.Icon>
155
+ )
156
+ }
157
+
158
+ export {
159
+ NavigationMenu,
160
+ NavigationMenuContent,
161
+ NavigationMenuIndicator,
162
+ NavigationMenuItem,
163
+ NavigationMenuLink,
164
+ NavigationMenuList,
165
+ NavigationMenuTrigger,
166
+ navigationMenuTriggerStyle,
167
+ NavigationMenuPositioner,
168
+ }
@@ -1,12 +1,8 @@
1
1
  import * as React from "react"
2
- import {
3
- ChevronLeftIcon,
4
- ChevronRightIcon,
5
- MoreHorizontalIcon,
6
- } from "lucide-react"
7
2
 
8
3
  import { cn } from "@/lib/utils"
9
- import { Button, buttonVariants } from "@/components/ui/button"
4
+ import { Button } from "@/components/ui/button"
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
10
6
 
11
7
  function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
8
  return (
@@ -27,7 +23,7 @@ function PaginationContent({
27
23
  return (
28
24
  <ul
29
25
  data-slot="pagination-content"
30
- className={cn("flex flex-row items-center gap-1", className)}
26
+ className={cn("flex items-center gap-0.5", className)}
31
27
  {...props}
32
28
  />
33
29
  )
@@ -49,52 +45,55 @@ function PaginationLink({
49
45
  ...props
50
46
  }: PaginationLinkProps) {
51
47
  return (
52
- <a
53
- aria-current={isActive ? "page" : undefined}
54
- data-slot="pagination-link"
55
- data-active={isActive}
56
- className={cn(
57
- buttonVariants({
58
- variant: isActive ? "outline" : "ghost",
59
- size,
60
- }),
61
- className
62
- )}
63
- {...props}
48
+ <Button
49
+ variant={isActive ? "outline" : "ghost"}
50
+ size={size}
51
+ className={cn(className)}
52
+ nativeButton={false}
53
+ render={
54
+ <a
55
+ aria-current={isActive ? "page" : undefined}
56
+ data-slot="pagination-link"
57
+ data-active={isActive}
58
+ {...props}
59
+ />
60
+ }
64
61
  />
65
62
  )
66
63
  }
67
64
 
68
65
  function PaginationPrevious({
69
66
  className,
67
+ text = "Previous",
70
68
  ...props
71
- }: React.ComponentProps<typeof PaginationLink>) {
69
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
72
70
  return (
73
71
  <PaginationLink
74
72
  aria-label="Go to previous page"
75
73
  size="default"
76
- className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
74
+ className={cn("pl-1.5!", className)}
77
75
  {...props}
78
76
  >
79
- <ChevronLeftIcon />
80
- <span className="hidden">Previous</span>
77
+ <ChevronLeftIcon data-icon="inline-start" />
78
+ <span className="hidden sm:block">{text}</span>
81
79
  </PaginationLink>
82
80
  )
83
81
  }
84
82
 
85
83
  function PaginationNext({
86
84
  className,
85
+ text = "Next",
87
86
  ...props
88
- }: React.ComponentProps<typeof PaginationLink>) {
87
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
89
88
  return (
90
89
  <PaginationLink
91
90
  aria-label="Go to next page"
92
91
  size="default"
93
- className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
92
+ className={cn("pr-1.5!", className)}
94
93
  {...props}
95
94
  >
96
- <span className="hidden">Next</span>
97
- <ChevronRightIcon />
95
+ <span className="hidden sm:block">{text}</span>
96
+ <ChevronRightIcon data-icon="inline-end" />
98
97
  </PaginationLink>
99
98
  )
100
99
  }
@@ -107,10 +106,14 @@ function PaginationEllipsis({
107
106
  <span
108
107
  aria-hidden
109
108
  data-slot="pagination-ellipsis"
110
- className={cn("flex size-9 items-center justify-center", className)}
109
+ className={cn(
110
+ "flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
111
+ className
112
+ )}
111
113
  {...props}
112
114
  >
113
- <MoreHorizontalIcon className="size-4" />
115
+ <MoreHorizontalIcon
116
+ />
114
117
  <span className="sr-only">More pages</span>
115
118
  </span>
116
119
  )
@@ -119,9 +122,9 @@ function PaginationEllipsis({
119
122
  export {
120
123
  Pagination,
121
124
  PaginationContent,
122
- PaginationLink,
125
+ PaginationEllipsis,
123
126
  PaginationItem,
124
- PaginationPrevious,
127
+ PaginationLink,
125
128
  PaginationNext,
126
- PaginationEllipsis,
129
+ PaginationPrevious,
127
130
  }
@@ -0,0 +1,90 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Popover({ ...props }: PopoverPrimitive.Root.Props) {
9
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />
10
+ }
11
+
12
+ function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
13
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
14
+ }
15
+
16
+ function PopoverContent({
17
+ className,
18
+ align = "center",
19
+ alignOffset = 0,
20
+ side = "bottom",
21
+ sideOffset = 4,
22
+ ...props
23
+ }: PopoverPrimitive.Popup.Props &
24
+ Pick<
25
+ PopoverPrimitive.Positioner.Props,
26
+ "align" | "alignOffset" | "side" | "sideOffset"
27
+ >) {
28
+ return (
29
+ <PopoverPrimitive.Portal>
30
+ <PopoverPrimitive.Positioner
31
+ align={align}
32
+ alignOffset={alignOffset}
33
+ side={side}
34
+ sideOffset={sideOffset}
35
+ className="isolate z-50"
36
+ >
37
+ <PopoverPrimitive.Popup
38
+ data-slot="popover-content"
39
+ className={cn(
40
+ "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 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",
41
+ className
42
+ )}
43
+ {...props}
44
+ />
45
+ </PopoverPrimitive.Positioner>
46
+ </PopoverPrimitive.Portal>
47
+ )
48
+ }
49
+
50
+ function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
51
+ return (
52
+ <div
53
+ data-slot="popover-header"
54
+ className={cn("flex flex-col gap-0.5 text-sm", className)}
55
+ {...props}
56
+ />
57
+ )
58
+ }
59
+
60
+ function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
61
+ return (
62
+ <PopoverPrimitive.Title
63
+ data-slot="popover-title"
64
+ className={cn("font-medium", className)}
65
+ {...props}
66
+ />
67
+ )
68
+ }
69
+
70
+ function PopoverDescription({
71
+ className,
72
+ ...props
73
+ }: PopoverPrimitive.Description.Props) {
74
+ return (
75
+ <PopoverPrimitive.Description
76
+ data-slot="popover-description"
77
+ className={cn("text-muted-foreground", className)}
78
+ {...props}
79
+ />
80
+ )
81
+ }
82
+
83
+ export {
84
+ Popover,
85
+ PopoverContent,
86
+ PopoverDescription,
87
+ PopoverHeader,
88
+ PopoverTitle,
89
+ PopoverTrigger,
90
+ }