@vercel/geistdocs 1.2.3 → 1.3.0-canary.5af98bc

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 (332) hide show
  1. package/dist/cli/index.js +3 -0
  2. package/dist/components/callout.d.ts +12 -0
  3. package/dist/components/callout.d.ts.map +1 -0
  4. package/dist/components/callout.js +7 -0
  5. package/dist/components/code-block-tabs.d.ts +7 -0
  6. package/dist/components/code-block-tabs.d.ts.map +1 -0
  7. package/dist/components/code-block-tabs.js +7 -0
  8. package/dist/components/code-block.d.ts +14 -0
  9. package/dist/components/code-block.d.ts.map +1 -0
  10. package/dist/components/code-block.js +45 -0
  11. package/dist/components/copy-prompt.d.ts +11 -0
  12. package/dist/components/copy-prompt.d.ts.map +1 -0
  13. package/dist/components/copy-prompt.js +58 -0
  14. package/dist/components/mermaid.d.ts +4 -0
  15. package/dist/components/mermaid.d.ts.map +1 -0
  16. package/dist/components/mermaid.js +44 -0
  17. package/dist/components/theme-aware-image.d.ts +12 -0
  18. package/dist/components/theme-aware-image.d.ts.map +1 -0
  19. package/dist/components/theme-aware-image.js +8 -0
  20. package/dist/components/video.d.ts +6 -0
  21. package/dist/components/video.d.ts.map +1 -0
  22. package/dist/components/video.js +3 -0
  23. package/dist/config.d.ts +52 -0
  24. package/dist/config.d.ts.map +1 -0
  25. package/dist/config.js +1 -0
  26. package/dist/controls.d.ts +15 -0
  27. package/dist/controls.d.ts.map +1 -0
  28. package/dist/controls.js +52 -0
  29. package/dist/internal/chat/context.d.ts +19 -0
  30. package/dist/internal/chat/context.d.ts.map +1 -0
  31. package/dist/internal/chat/context.js +36 -0
  32. package/dist/internal/chat/conversation.d.ts +10 -0
  33. package/dist/internal/chat/conversation.d.ts.map +1 -0
  34. package/dist/internal/chat/conversation.js +16 -0
  35. package/dist/internal/chat/copy-chat.d.ts +5 -0
  36. package/dist/internal/chat/copy-chat.d.ts.map +1 -0
  37. package/dist/internal/chat/copy-chat.js +35 -0
  38. package/dist/internal/chat/db.d.ts +13 -0
  39. package/dist/internal/chat/db.d.ts.map +1 -0
  40. package/dist/internal/chat/db.js +19 -0
  41. package/dist/internal/chat/message-metadata.d.ts +8 -0
  42. package/dist/internal/chat/message-metadata.d.ts.map +1 -0
  43. package/dist/internal/chat/message-metadata.js +29 -0
  44. package/dist/internal/chat/message.d.ts +11 -0
  45. package/dist/internal/chat/message.d.ts.map +1 -0
  46. package/dist/internal/chat/message.js +11 -0
  47. package/dist/internal/chat/prompt-input.d.ts +13 -0
  48. package/dist/internal/chat/prompt-input.d.ts.map +1 -0
  49. package/dist/internal/chat/prompt-input.js +39 -0
  50. package/dist/internal/chat/shell.d.ts +2 -0
  51. package/dist/internal/chat/shell.d.ts.map +1 -0
  52. package/dist/internal/chat/shell.js +194 -0
  53. package/dist/internal/chat/shimmer.d.ts +11 -0
  54. package/dist/internal/chat/shimmer.d.ts.map +1 -0
  55. package/dist/internal/chat/shimmer.js +18 -0
  56. package/dist/internal/chat/sources.d.ts +13 -0
  57. package/dist/internal/chat/sources.d.ts.map +1 -0
  58. package/dist/internal/chat/sources.js +9 -0
  59. package/dist/internal/chat/suggestion.d.ts +11 -0
  60. package/dist/internal/chat/suggestion.d.ts.map +1 -0
  61. package/dist/internal/chat/suggestion.js +12 -0
  62. package/dist/internal/cn.d.ts +3 -0
  63. package/dist/internal/cn.d.ts.map +1 -0
  64. package/dist/internal/cn.js +3 -0
  65. package/dist/internal/feedback-action.d.ts +14 -0
  66. package/dist/internal/feedback-action.d.ts.map +1 -0
  67. package/dist/internal/feedback-action.js +34 -0
  68. package/dist/internal/i18n.d.ts +6 -0
  69. package/dist/internal/i18n.d.ts.map +1 -0
  70. package/dist/internal/i18n.js +18 -0
  71. package/dist/internal/languages.d.ts +7 -0
  72. package/dist/internal/languages.d.ts.map +1 -0
  73. package/dist/internal/languages.js +18 -0
  74. package/dist/internal/not-implemented.d.ts +2 -0
  75. package/dist/internal/not-implemented.d.ts.map +1 -0
  76. package/dist/internal/not-implemented.js +4 -0
  77. package/dist/internal/page-actions-client.d.ts +13 -0
  78. package/dist/internal/page-actions-client.d.ts.map +1 -0
  79. package/dist/internal/page-actions-client.js +160 -0
  80. package/dist/internal/page-actions.d.ts +18 -0
  81. package/dist/internal/page-actions.d.ts.map +1 -0
  82. package/dist/internal/page-actions.js +4 -0
  83. package/dist/internal/provider-client.d.ts +9 -0
  84. package/dist/internal/provider-client.d.ts.map +1 -0
  85. package/dist/internal/provider-client.js +23 -0
  86. package/dist/internal/search.d.ts +5 -0
  87. package/dist/internal/search.d.ts.map +1 -0
  88. package/dist/internal/search.js +14 -0
  89. package/dist/internal/sidebar.d.ts +6 -0
  90. package/dist/internal/sidebar.d.ts.map +1 -0
  91. package/dist/internal/sidebar.js +38 -0
  92. package/dist/internal/table-of-contents.d.ts +9 -0
  93. package/dist/internal/table-of-contents.d.ts.map +1 -0
  94. package/dist/internal/table-of-contents.js +5 -0
  95. package/dist/internal/ui/button-group.d.ts +13 -0
  96. package/dist/internal/ui/button-group.d.ts.map +1 -0
  97. package/dist/internal/ui/button-group.js +26 -0
  98. package/dist/internal/ui/button.d.ts +12 -0
  99. package/dist/internal/ui/button.d.ts.map +1 -0
  100. package/dist/internal/ui/button.js +33 -0
  101. package/dist/internal/ui/card.d.ts +6 -0
  102. package/dist/internal/ui/card.d.ts.map +1 -0
  103. package/dist/internal/ui/card.js +14 -0
  104. package/dist/internal/ui/collapsible.d.ts +6 -0
  105. package/dist/internal/ui/collapsible.d.ts.map +1 -0
  106. package/dist/internal/ui/collapsible.js +12 -0
  107. package/dist/internal/ui/drawer.d.ts +6 -0
  108. package/dist/internal/ui/drawer.d.ts.map +1 -0
  109. package/dist/internal/ui/drawer.js +13 -0
  110. package/dist/internal/ui/dropdown-menu.d.ts +22 -0
  111. package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
  112. package/dist/internal/ui/dropdown-menu.js +41 -0
  113. package/dist/internal/ui/input-group.d.ts +15 -0
  114. package/dist/internal/ui/input-group.d.ts.map +1 -0
  115. package/dist/internal/ui/input-group.js +44 -0
  116. package/dist/internal/ui/input.d.ts +3 -0
  117. package/dist/internal/ui/input.d.ts.map +1 -0
  118. package/dist/internal/ui/input.js +5 -0
  119. package/dist/internal/ui/kbd.d.ts +4 -0
  120. package/dist/internal/ui/kbd.d.ts.map +1 -0
  121. package/dist/internal/ui/kbd.js +8 -0
  122. package/dist/internal/ui/popover.d.ts +6 -0
  123. package/dist/internal/ui/popover.d.ts.map +1 -0
  124. package/dist/internal/ui/popover.js +13 -0
  125. package/dist/internal/ui/scroll-area.d.ts +5 -0
  126. package/dist/internal/ui/scroll-area.d.ts.map +1 -0
  127. package/dist/internal/ui/scroll-area.js +12 -0
  128. package/dist/internal/ui/separator.d.ts +4 -0
  129. package/dist/internal/ui/separator.d.ts.map +1 -0
  130. package/dist/internal/ui/separator.js +7 -0
  131. package/dist/internal/ui/sheet.d.ts +10 -0
  132. package/dist/internal/ui/sheet.d.ts.map +1 -0
  133. package/dist/internal/ui/sheet.js +24 -0
  134. package/dist/internal/ui/sonner.d.ts +3 -0
  135. package/dist/internal/ui/sonner.d.ts.map +1 -0
  136. package/dist/internal/ui/sonner.js +20 -0
  137. package/dist/internal/ui/spinner.d.ts +3 -0
  138. package/dist/internal/ui/spinner.d.ts.map +1 -0
  139. package/dist/internal/ui/spinner.js +6 -0
  140. package/dist/internal/ui/textarea.d.ts +3 -0
  141. package/dist/internal/ui/textarea.d.ts.map +1 -0
  142. package/dist/internal/ui/textarea.js +5 -0
  143. package/dist/internal/ui/tooltip.d.ts +7 -0
  144. package/dist/internal/ui/tooltip.d.ts.map +1 -0
  145. package/dist/internal/ui/tooltip.js +16 -0
  146. package/dist/internal/use-mobile.d.ts +2 -0
  147. package/dist/internal/use-mobile.d.ts.map +1 -0
  148. package/dist/internal/use-mobile.js +16 -0
  149. package/dist/layout.d.ts +13 -0
  150. package/dist/layout.d.ts.map +1 -0
  151. package/dist/layout.js +31 -0
  152. package/dist/mdx.d.ts +36 -0
  153. package/dist/mdx.d.ts.map +1 -0
  154. package/dist/mdx.js +74 -0
  155. package/dist/pages/docs.d.ts +55 -0
  156. package/dist/pages/docs.d.ts.map +1 -0
  157. package/dist/pages/docs.js +69 -0
  158. package/dist/proxy.d.ts +21 -0
  159. package/dist/proxy.d.ts.map +1 -0
  160. package/dist/proxy.js +109 -0
  161. package/dist/routes/chat.d.ts +13 -0
  162. package/dist/routes/chat.d.ts.map +1 -0
  163. package/dist/routes/chat.js +229 -0
  164. package/dist/routes/llms.d.ts +33 -0
  165. package/dist/routes/llms.d.ts.map +1 -0
  166. package/dist/routes/llms.js +39 -0
  167. package/dist/routes/search.d.ts +10 -0
  168. package/dist/routes/search.d.ts.map +1 -0
  169. package/dist/routes/search.js +33 -0
  170. package/dist/routes/sitemap.d.ts +35 -0
  171. package/dist/routes/sitemap.d.ts.map +1 -0
  172. package/dist/routes/sitemap.js +150 -0
  173. package/dist/sidebar.d.ts +11 -0
  174. package/dist/sidebar.d.ts.map +1 -0
  175. package/dist/sidebar.js +16 -0
  176. package/dist/source.d.ts +30 -0
  177. package/dist/source.d.ts.map +1 -0
  178. package/dist/source.js +72 -0
  179. package/package.json +137 -9
  180. package/styles.css +193 -0
  181. package/template/_gitignore +29 -0
  182. package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
  183. package/template/app/[lang]/(home)/components/cta.tsx +19 -0
  184. package/template/app/[lang]/(home)/components/hero.tsx +27 -0
  185. package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
  186. package/template/app/[lang]/(home)/components/templates.tsx +50 -0
  187. package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
  188. package/template/app/[lang]/(home)/layout.tsx +14 -0
  189. package/template/app/[lang]/(home)/page.tsx +126 -0
  190. package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
  191. package/template/app/[lang]/docs/layout.tsx +14 -0
  192. package/template/app/[lang]/layout.tsx +29 -0
  193. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
  194. package/template/app/[lang]/llms.txt/route.ts +6 -0
  195. package/template/app/[lang]/og/[...slug]/background.png +0 -0
  196. package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
  197. package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
  198. package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
  199. package/template/app/[lang]/rss.xml/route.ts +52 -0
  200. package/template/app/[lang]/sitemap.md/route.ts +9 -0
  201. package/template/app/actions/feedback/emotions.ts +18 -0
  202. package/template/app/actions/feedback/index.ts +45 -0
  203. package/template/app/api/chat/route.ts +8 -0
  204. package/template/app/api/search/route.ts +5 -0
  205. package/template/app/favicon.ico +0 -0
  206. package/template/app/global.css +2 -0
  207. package/template/app/robots.ts +14 -0
  208. package/template/app/sitemap.ts +36 -0
  209. package/template/app/styles/geistdocs.css +554 -0
  210. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
  211. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
  212. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
  213. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
  214. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
  215. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
  216. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
  217. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
  218. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
  219. package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
  220. package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
  221. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
  222. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
  223. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
  224. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
  225. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
  226. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
  227. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
  228. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
  229. package/template/components/geistdocs/callout.tsx +40 -0
  230. package/template/components/geistdocs/chat.tsx +24 -0
  231. package/template/components/geistdocs/code-block-tabs.tsx +61 -0
  232. package/template/components/geistdocs/code-block.tsx +134 -0
  233. package/template/components/geistdocs/copy-page.tsx +27 -0
  234. package/template/components/geistdocs/desktop-menu.tsx +52 -0
  235. package/template/components/geistdocs/docs-layout.tsx +20 -0
  236. package/template/components/geistdocs/docs-page.tsx +35 -0
  237. package/template/components/geistdocs/edit-source.tsx +30 -0
  238. package/template/components/geistdocs/feedback.tsx +139 -0
  239. package/template/components/geistdocs/footer.tsx +30 -0
  240. package/template/components/geistdocs/github-button.tsx +19 -0
  241. package/template/components/geistdocs/home-layout.tsx +46 -0
  242. package/template/components/geistdocs/icons.tsx +13 -0
  243. package/template/components/geistdocs/installer.tsx +58 -0
  244. package/template/components/geistdocs/language-selector.tsx +3 -0
  245. package/template/components/geistdocs/mdx-components.tsx +5 -0
  246. package/template/components/geistdocs/mermaid.tsx +68 -0
  247. package/template/components/geistdocs/mobile-docs-bar.tsx +77 -0
  248. package/template/components/geistdocs/mobile-menu.tsx +150 -0
  249. package/template/components/geistdocs/navbar-logo.tsx +124 -0
  250. package/template/components/geistdocs/navbar.tsx +22 -0
  251. package/template/components/geistdocs/provider.tsx +31 -0
  252. package/template/components/geistdocs/rss-button.tsx +10 -0
  253. package/template/components/geistdocs/scroll-top.tsx +21 -0
  254. package/template/components/geistdocs/search.tsx +17 -0
  255. package/template/components/geistdocs/sidebar.tsx +128 -0
  256. package/template/components/geistdocs/theme-aware-image.tsx +22 -0
  257. package/template/components/geistdocs/theme-toggle.tsx +3 -0
  258. package/template/components/geistdocs/video.tsx +16 -0
  259. package/template/components/ui/badge.tsx +46 -0
  260. package/template/components/ui/button-group.tsx +83 -0
  261. package/template/components/ui/button.tsx +60 -0
  262. package/template/components/ui/card.tsx +92 -0
  263. package/template/components/ui/collapsible.tsx +33 -0
  264. package/template/components/ui/command-prompt.tsx +488 -0
  265. package/template/components/ui/command.tsx +184 -0
  266. package/template/components/ui/dialog.tsx +143 -0
  267. package/template/components/ui/drawer.tsx +135 -0
  268. package/template/components/ui/dropdown-menu.tsx +257 -0
  269. package/template/components/ui/hover-card.tsx +44 -0
  270. package/template/components/ui/input-group.tsx +170 -0
  271. package/template/components/ui/input.tsx +21 -0
  272. package/template/components/ui/kbd.tsx +28 -0
  273. package/template/components/ui/navigation-menu.tsx +192 -0
  274. package/template/components/ui/popover.tsx +48 -0
  275. package/template/components/ui/scroll-area.tsx +58 -0
  276. package/template/components/ui/select.tsx +187 -0
  277. package/template/components/ui/separator.tsx +28 -0
  278. package/template/components/ui/sheet.tsx +139 -0
  279. package/template/components/ui/sonner.tsx +40 -0
  280. package/template/components/ui/spinner.tsx +16 -0
  281. package/template/components/ui/textarea.tsx +18 -0
  282. package/template/components/ui/tooltip.tsx +61 -0
  283. package/template/components.json +22 -0
  284. package/template/content/docs/ask-ai.cn.mdx +85 -0
  285. package/template/content/docs/ask-ai.mdx +89 -0
  286. package/template/content/docs/configuration.cn.mdx +115 -0
  287. package/template/content/docs/configuration.mdx +118 -0
  288. package/template/content/docs/deployment.cn.mdx +34 -0
  289. package/template/content/docs/deployment.mdx +40 -0
  290. package/template/content/docs/edit-on-github.cn.mdx +47 -0
  291. package/template/content/docs/edit-on-github.mdx +51 -0
  292. package/template/content/docs/env.cn.mdx +25 -0
  293. package/template/content/docs/env.mdx +29 -0
  294. package/template/content/docs/feedback.cn.mdx +85 -0
  295. package/template/content/docs/feedback.mdx +89 -0
  296. package/template/content/docs/getting-started.cn.mdx +86 -0
  297. package/template/content/docs/getting-started.mdx +107 -0
  298. package/template/content/docs/index.cn.mdx +54 -0
  299. package/template/content/docs/index.mdx +85 -0
  300. package/template/content/docs/internationalization.cn.mdx +111 -0
  301. package/template/content/docs/internationalization.mdx +122 -0
  302. package/template/content/docs/llms-txt.cn.mdx +50 -0
  303. package/template/content/docs/llms-txt.mdx +54 -0
  304. package/template/content/docs/md.cn.mdx +68 -0
  305. package/template/content/docs/md.mdx +72 -0
  306. package/template/content/docs/meta.json +21 -0
  307. package/template/content/docs/open-in-chat.cn.mdx +78 -0
  308. package/template/content/docs/open-in-chat.mdx +82 -0
  309. package/template/content/docs/provider.cn.mdx +69 -0
  310. package/template/content/docs/provider.mdx +73 -0
  311. package/template/content/docs/rss.cn.mdx +104 -0
  312. package/template/content/docs/rss.mdx +108 -0
  313. package/template/content/docs/syntax.cn.mdx +416 -0
  314. package/template/content/docs/syntax.mdx +411 -0
  315. package/template/content/docs/theme-aware-image.mdx +57 -0
  316. package/template/geistdocs.tsx +51 -0
  317. package/template/hooks/geistdocs/use-sidebar.ts +13 -0
  318. package/template/hooks/use-mobile.ts +19 -0
  319. package/template/lib/geistdocs/config.tsx +27 -0
  320. package/template/lib/geistdocs/fonts.ts +18 -0
  321. package/template/lib/geistdocs/i18n.ts +13 -0
  322. package/template/lib/geistdocs/md-tracking.ts +56 -0
  323. package/template/lib/geistdocs/source.ts +12 -0
  324. package/template/lib/utils.ts +6 -0
  325. package/template/next.config.ts +22 -0
  326. package/template/package.json +63 -0
  327. package/template/postcss.config.mjs +5 -0
  328. package/template/proxy.ts +16 -0
  329. package/template/source.config.ts +62 -0
  330. package/template/tsconfig.json +37 -0
  331. package/dist/index.js +0 -2
  332. /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
@@ -0,0 +1,170 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cva, type VariantProps } from "class-variance-authority"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { Button } from "@/components/ui/button"
8
+ import { Input } from "@/components/ui/input"
9
+ import { Textarea } from "@/components/ui/textarea"
10
+
11
+ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
+ return (
13
+ <div
14
+ data-slot="input-group"
15
+ role="group"
16
+ className={cn(
17
+ "group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
18
+ "h-9 min-w-0 has-[>textarea]:h-auto",
19
+
20
+ // Variants based on alignment.
21
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
22
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
23
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
24
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
25
+
26
+ // Focus state.
27
+ "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
28
+
29
+ // Error state.
30
+ "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
31
+
32
+ className
33
+ )}
34
+ {...props}
35
+ />
36
+ )
37
+ }
38
+
39
+ const inputGroupAddonVariants = cva(
40
+ "text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
41
+ {
42
+ variants: {
43
+ align: {
44
+ "inline-start":
45
+ "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
46
+ "inline-end":
47
+ "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
48
+ "block-start":
49
+ "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
50
+ "block-end":
51
+ "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5",
52
+ },
53
+ },
54
+ defaultVariants: {
55
+ align: "inline-start",
56
+ },
57
+ }
58
+ )
59
+
60
+ function InputGroupAddon({
61
+ className,
62
+ align = "inline-start",
63
+ ...props
64
+ }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
65
+ return (
66
+ <div
67
+ role="group"
68
+ data-slot="input-group-addon"
69
+ data-align={align}
70
+ className={cn(inputGroupAddonVariants({ align }), className)}
71
+ onClick={(e) => {
72
+ if ((e.target as HTMLElement).closest("button")) {
73
+ return
74
+ }
75
+ e.currentTarget.parentElement?.querySelector("input")?.focus()
76
+ }}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ const inputGroupButtonVariants = cva(
83
+ "text-sm shadow-none flex gap-2 items-center",
84
+ {
85
+ variants: {
86
+ size: {
87
+ xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
88
+ sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
89
+ "icon-xs":
90
+ "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
91
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0",
92
+ },
93
+ },
94
+ defaultVariants: {
95
+ size: "xs",
96
+ },
97
+ }
98
+ )
99
+
100
+ function InputGroupButton({
101
+ className,
102
+ type = "button",
103
+ variant = "ghost",
104
+ size = "xs",
105
+ ...props
106
+ }: Omit<React.ComponentProps<typeof Button>, "size"> &
107
+ VariantProps<typeof inputGroupButtonVariants>) {
108
+ return (
109
+ <Button
110
+ type={type}
111
+ data-size={size}
112
+ variant={variant}
113
+ className={cn(inputGroupButtonVariants({ size }), className)}
114
+ {...props}
115
+ />
116
+ )
117
+ }
118
+
119
+ function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
120
+ return (
121
+ <span
122
+ className={cn(
123
+ "text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
124
+ className
125
+ )}
126
+ {...props}
127
+ />
128
+ )
129
+ }
130
+
131
+ function InputGroupInput({
132
+ className,
133
+ ...props
134
+ }: React.ComponentProps<"input">) {
135
+ return (
136
+ <Input
137
+ data-slot="input-group-control"
138
+ className={cn(
139
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
140
+ className
141
+ )}
142
+ {...props}
143
+ />
144
+ )
145
+ }
146
+
147
+ function InputGroupTextarea({
148
+ className,
149
+ ...props
150
+ }: React.ComponentProps<"textarea">) {
151
+ return (
152
+ <Textarea
153
+ data-slot="input-group-control"
154
+ className={cn(
155
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
156
+ className
157
+ )}
158
+ {...props}
159
+ />
160
+ )
161
+ }
162
+
163
+ export {
164
+ InputGroup,
165
+ InputGroupAddon,
166
+ InputGroupButton,
167
+ InputGroupText,
168
+ InputGroupInput,
169
+ InputGroupTextarea,
170
+ }
@@ -0,0 +1,21 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
+ return (
7
+ <input
8
+ type={type}
9
+ data-slot="input"
10
+ className={cn(
11
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14
+ className
15
+ )}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+
21
+ export { Input }
@@ -0,0 +1,28 @@
1
+ import { cn } from "@/lib/utils"
2
+
3
+ function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
4
+ return (
5
+ <kbd
6
+ data-slot="kbd"
7
+ className={cn(
8
+ "bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none",
9
+ "[&_svg:not([class*='size-'])]:size-3",
10
+ "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
19
+ return (
20
+ <kbd
21
+ data-slot="kbd-group"
22
+ className={cn("inline-flex items-center gap-1", className)}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ export { Kbd, KbdGroup }
@@ -0,0 +1,192 @@
1
+ import * as React from "react"
2
+ import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui"
3
+ import { cva } from "class-variance-authority"
4
+ import { IconChevronDownSmall } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function isTouchDevice() {
9
+ return "ontouchstart" in window || navigator.maxTouchPoints > 0;
10
+ }
11
+
12
+ function isKeyboardClick(event: React.MouseEvent) {
13
+ return event.detail === 0;
14
+ }
15
+
16
+ function NavigationMenu({
17
+ className,
18
+ children,
19
+ viewport = true,
20
+ viewportClassName,
21
+ ...props
22
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
23
+ viewport?: boolean
24
+ viewportClassName?: string
25
+ }) {
26
+ return (
27
+ <NavigationMenuPrimitive.Root
28
+ data-slot="navigation-menu"
29
+ data-viewport={viewport}
30
+ className={cn(
31
+ "group/navigation-menu relative z-10 flex max-w-max flex-1 items-center justify-center",
32
+ className
33
+ )}
34
+ {...props}
35
+ >
36
+ {children}
37
+ {viewport && <NavigationMenuViewport wrapperClassName={viewportClassName} />}
38
+ </NavigationMenuPrimitive.Root>
39
+ )
40
+ }
41
+
42
+ function NavigationMenuList({
43
+ className,
44
+ ...props
45
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
46
+ return (
47
+ <NavigationMenuPrimitive.List
48
+ data-slot="navigation-menu-list"
49
+ className={cn(
50
+ "group flex flex-1 list-none items-center justify-center gap-1",
51
+ className
52
+ )}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ function NavigationMenuItem({
59
+ className,
60
+ ...props
61
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
62
+ return (
63
+ <NavigationMenuPrimitive.Item
64
+ data-slot="navigation-menu-item"
65
+ className={cn("relative", className)}
66
+ {...props}
67
+ />
68
+ )
69
+ }
70
+
71
+ const navigationMenuTriggerStyle = cva(
72
+ "group inline-flex relative px-3 gap-1 w-max items-center justify-center text-sm transition-colors text-gray-900 hover:text-gray-1000 focus:text-gray-1000 focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:text-gray-1000 data-[state=open]:text-gray-1000"
73
+ )
74
+
75
+ function NavigationMenuTrigger({
76
+ className,
77
+ children,
78
+ onClick,
79
+ ...props
80
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
81
+ return (
82
+ <NavigationMenuPrimitive.Trigger
83
+ data-slot="navigation-menu-trigger"
84
+ className={cn(navigationMenuTriggerStyle(), "group", className)}
85
+ // Prevent the trigger from closing the menu when clicked on non-touch
86
+ // devices. Touch and keyboard users retain default toggle behavior.
87
+ onClick={(event) => {
88
+ if (!isTouchDevice() && !isKeyboardClick(event)) {
89
+ event.preventDefault();
90
+ }
91
+ onClick?.(event);
92
+ }}
93
+ {...props}
94
+ >
95
+ {children}
96
+ <IconChevronDownSmall
97
+ className="relative top-px size-3.5 text-gray-900 transition-all duration-200 ease group-hover:text-gray-1000 group-data-[state=open]:rotate-180"
98
+ aria-hidden="true"
99
+ />
100
+ <div className="absolute -mx-12 inset-x-0 bottom-0 z-50 hidden h-[18px] group-data-[state=open]:flex" />
101
+ </NavigationMenuPrimitive.Trigger>
102
+ )
103
+ }
104
+
105
+ function NavigationMenuContent({
106
+ className,
107
+ ...props
108
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
109
+ return (
110
+ <NavigationMenuPrimitive.Content
111
+ data-slot="navigation-menu-content"
112
+ className={cn(
113
+ "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out md:absolute md:w-auto",
114
+ "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
115
+ className
116
+ )}
117
+ {...props}
118
+ />
119
+ )
120
+ }
121
+
122
+ function NavigationMenuViewport({
123
+ className,
124
+ wrapperClassName,
125
+ ...props
126
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport> & {
127
+ wrapperClassName?: string
128
+ }) {
129
+ return (
130
+ <div
131
+ className={cn(
132
+ "absolute left-0 top-[70%] flex justify-center",
133
+ wrapperClassName
134
+ )}
135
+ >
136
+ <NavigationMenuPrimitive.Viewport
137
+ data-slot="navigation-menu-viewport"
138
+ className={cn(
139
+ "origin-top-center relative mt-3.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg bg-background-100 text-gray-950 [box-shadow:var(--ds-shadow-menu)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
140
+ className
141
+ )}
142
+ {...props}
143
+ />
144
+ </div>
145
+ )
146
+ }
147
+
148
+ function NavigationMenuLink({
149
+ className,
150
+ ...props
151
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
152
+ return (
153
+ <NavigationMenuPrimitive.Link
154
+ data-slot="navigation-menu-link"
155
+ className={cn(
156
+ "block w-full text-sm outline-none transition-colors",
157
+ className
158
+ )}
159
+ {...props}
160
+ />
161
+ )
162
+ }
163
+
164
+ function NavigationMenuIndicator({
165
+ className,
166
+ ...props
167
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
168
+ return (
169
+ <NavigationMenuPrimitive.Indicator
170
+ data-slot="navigation-menu-indicator"
171
+ className={cn(
172
+ "data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-[70%] z-[1] flex items-end justify-center overflow-hidden transition-all duration-200",
173
+ className
174
+ )}
175
+ {...props}
176
+ >
177
+ <div className="relative top-[6.5px] size-4 rotate-45 rounded-tl-sm border border-r-0 border-b-0 border-gray-200 bg-white" />
178
+ </NavigationMenuPrimitive.Indicator>
179
+ )
180
+ }
181
+
182
+ export {
183
+ NavigationMenu,
184
+ NavigationMenuList,
185
+ NavigationMenuItem,
186
+ NavigationMenuContent,
187
+ NavigationMenuTrigger,
188
+ NavigationMenuLink,
189
+ NavigationMenuIndicator,
190
+ NavigationMenuViewport,
191
+ navigationMenuTriggerStyle,
192
+ }
@@ -0,0 +1,48 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Popover as PopoverPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Popover({
9
+ ...props
10
+ }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
11
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />
12
+ }
13
+
14
+ function PopoverTrigger({
15
+ ...props
16
+ }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
17
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
18
+ }
19
+
20
+ function PopoverContent({
21
+ className,
22
+ align = "center",
23
+ sideOffset = 4,
24
+ ...props
25
+ }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
26
+ return (
27
+ <PopoverPrimitive.Portal>
28
+ <PopoverPrimitive.Content
29
+ data-slot="popover-content"
30
+ align={align}
31
+ sideOffset={sideOffset}
32
+ className={cn(
33
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ </PopoverPrimitive.Portal>
39
+ )
40
+ }
41
+
42
+ function PopoverAnchor({
43
+ ...props
44
+ }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
45
+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
46
+ }
47
+
48
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
@@ -0,0 +1,58 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function ScrollArea({
9
+ className,
10
+ children,
11
+ ...props
12
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
13
+ return (
14
+ <ScrollAreaPrimitive.Root
15
+ data-slot="scroll-area"
16
+ className={cn("relative", className)}
17
+ {...props}
18
+ >
19
+ <ScrollAreaPrimitive.Viewport
20
+ data-slot="scroll-area-viewport"
21
+ className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
22
+ >
23
+ {children}
24
+ </ScrollAreaPrimitive.Viewport>
25
+ <ScrollBar />
26
+ <ScrollAreaPrimitive.Corner />
27
+ </ScrollAreaPrimitive.Root>
28
+ )
29
+ }
30
+
31
+ function ScrollBar({
32
+ className,
33
+ orientation = "vertical",
34
+ ...props
35
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
36
+ return (
37
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
38
+ data-slot="scroll-area-scrollbar"
39
+ orientation={orientation}
40
+ className={cn(
41
+ "flex touch-none p-px transition-colors select-none",
42
+ orientation === "vertical" &&
43
+ "h-full w-2.5 border-l border-l-transparent",
44
+ orientation === "horizontal" &&
45
+ "h-2.5 flex-col border-t border-t-transparent",
46
+ className
47
+ )}
48
+ {...props}
49
+ >
50
+ <ScrollAreaPrimitive.ScrollAreaThumb
51
+ data-slot="scroll-area-thumb"
52
+ className="bg-border relative flex-1 rounded-full"
53
+ />
54
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
55
+ )
56
+ }
57
+
58
+ export { ScrollArea, ScrollBar }