@hanzo/ui 4.5.0 → 4.5.3

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 (311) hide show
  1. package/MCP-INSTRUCTIONS.md +73 -0
  2. package/README-MCP.md +175 -0
  3. package/bin/cli.js +100 -0
  4. package/bin/create-registry.js +108 -0
  5. package/bin/mcp.js +403 -0
  6. package/bin/npx-registry-mcp.js +15 -0
  7. package/bin/registry-mcp-wrapper.sh +19 -0
  8. package/bin/registry-mcp.js +100 -0
  9. package/bin/start-mcp-server.sh +22 -0
  10. package/bin/test-mcp.sh +52 -0
  11. package/bin/update-registry.js +196 -0
  12. package/blocks/components/screenful-block/index.tsx +2 -0
  13. package/dist/blocks/components/accordian-block.d.ts +4 -0
  14. package/dist/blocks/components/accordian-block.jsx +25 -0
  15. package/dist/blocks/components/block-component-props.d.ts +7 -0
  16. package/dist/blocks/components/block-component-props.js +1 -0
  17. package/dist/blocks/components/bullet-cards-block.d.ts +4 -0
  18. package/dist/blocks/components/bullet-cards-block.jsx +25 -0
  19. package/dist/blocks/components/card-block/index.d.ts +6 -0
  20. package/dist/blocks/components/card-block/index.jsx +87 -0
  21. package/dist/blocks/components/card-block/link-out-button.d.ts +6 -0
  22. package/dist/blocks/components/card-block/link-out-button.jsx +4 -0
  23. package/dist/blocks/components/card-block/util.d.ts +4 -0
  24. package/dist/blocks/components/card-block/util.js +6 -0
  25. package/dist/blocks/components/carte-blanche-block/index.d.ts +4 -0
  26. package/dist/blocks/components/carte-blanche-block/index.jsx +82 -0
  27. package/dist/blocks/components/carte-blanche-block/variant-content-left.d.ts +10 -0
  28. package/dist/blocks/components/carte-blanche-block/variant-content-left.jsx +23 -0
  29. package/dist/blocks/components/content.d.ts +10 -0
  30. package/dist/blocks/components/content.jsx +47 -0
  31. package/dist/blocks/components/cta-block.d.ts +12 -0
  32. package/dist/blocks/components/cta-block.jsx +69 -0
  33. package/dist/blocks/components/enh-heading-block.d.ts +7 -0
  34. package/dist/blocks/components/enh-heading-block.jsx +142 -0
  35. package/dist/blocks/components/grid-block/grid-block-mutator.d.ts +5 -0
  36. package/dist/blocks/components/grid-block/grid-block-mutator.js +1 -0
  37. package/dist/blocks/components/grid-block/index.d.ts +9 -0
  38. package/dist/blocks/components/grid-block/index.jsx +56 -0
  39. package/dist/blocks/components/grid-block/mutator-registry.d.ts +3 -0
  40. package/dist/blocks/components/grid-block/mutator-registry.js +5 -0
  41. package/dist/blocks/components/grid-block/table-borders.mutator.d.ts +3 -0
  42. package/dist/blocks/components/grid-block/table-borders.mutator.js +36 -0
  43. package/dist/blocks/components/group-block.d.ts +7 -0
  44. package/dist/blocks/components/group-block.jsx +61 -0
  45. package/dist/blocks/components/heading-block.d.ts +4 -0
  46. package/dist/blocks/components/heading-block.jsx +99 -0
  47. package/dist/blocks/components/image-block.d.ts +7 -0
  48. package/dist/blocks/components/image-block.jsx +69 -0
  49. package/dist/blocks/components/index.d.ts +14 -0
  50. package/dist/blocks/components/index.js +13 -0
  51. package/dist/blocks/components/screenful-block/content.d.ts +8 -0
  52. package/dist/blocks/components/screenful-block/content.jsx +71 -0
  53. package/dist/blocks/components/screenful-block/index.d.ts +12 -0
  54. package/dist/blocks/components/screenful-block/index.jsx +57 -0
  55. package/dist/blocks/components/screenful-block/poster-background.d.ts +7 -0
  56. package/dist/blocks/components/screenful-block/poster-background.jsx +14 -0
  57. package/dist/blocks/components/screenful-block/video-background.d.ts +8 -0
  58. package/dist/blocks/components/screenful-block/video-background.jsx +20 -0
  59. package/dist/blocks/components/space-block.d.ts +4 -0
  60. package/dist/blocks/components/space-block.jsx +42 -0
  61. package/dist/blocks/components/video-block.d.ts +9 -0
  62. package/dist/blocks/components/video-block.jsx +83 -0
  63. package/dist/blocks/def/accordian-block.d.ts +10 -0
  64. package/dist/blocks/def/accordian-block.js +2 -0
  65. package/dist/blocks/def/block.d.ts +4 -0
  66. package/dist/blocks/def/block.js +1 -0
  67. package/dist/blocks/def/bullet-cards-block.d.ts +17 -0
  68. package/dist/blocks/def/bullet-cards-block.js +1 -0
  69. package/dist/blocks/def/card-block.d.ts +17 -0
  70. package/dist/blocks/def/card-block.js +2 -0
  71. package/dist/blocks/def/carte-blanche-block.d.ts +12 -0
  72. package/dist/blocks/def/carte-blanche-block.js +1 -0
  73. package/dist/blocks/def/cta-block.d.ts +8 -0
  74. package/dist/blocks/def/cta-block.js +1 -0
  75. package/dist/blocks/def/element-block.d.ts +7 -0
  76. package/dist/blocks/def/element-block.js +2 -0
  77. package/dist/blocks/def/enh-heading-block.d.ts +22 -0
  78. package/dist/blocks/def/enh-heading-block.js +1 -0
  79. package/dist/blocks/def/grid-block.d.ts +12 -0
  80. package/dist/blocks/def/grid-block.js +1 -0
  81. package/dist/blocks/def/group-block.d.ts +7 -0
  82. package/dist/blocks/def/group-block.js +1 -0
  83. package/dist/blocks/def/heading-block.d.ts +11 -0
  84. package/dist/blocks/def/heading-block.js +1 -0
  85. package/dist/blocks/def/image-block.d.ts +26 -0
  86. package/dist/blocks/def/image-block.js +1 -0
  87. package/dist/blocks/def/index.d.ts +17 -0
  88. package/dist/blocks/def/index.js +2 -0
  89. package/dist/blocks/def/screenful-block.d.ts +41 -0
  90. package/dist/blocks/def/screenful-block.js +1 -0
  91. package/dist/blocks/def/space-block.d.ts +47 -0
  92. package/dist/blocks/def/space-block.js +8 -0
  93. package/dist/blocks/def/video-block.d.ts +5 -0
  94. package/dist/blocks/def/video-block.js +1 -0
  95. package/dist/blocks/index.d.ts +2 -0
  96. package/dist/blocks/index.js +2 -0
  97. package/dist/mcp/enhanced-server.d.ts +29 -0
  98. package/dist/mcp/enhanced-server.js +1128 -0
  99. package/dist/mcp/index.d.ts +28 -0
  100. package/dist/mcp/index.js +436 -0
  101. package/dist/primitives/accordion.d.ts +10 -0
  102. package/dist/primitives/accordion.jsx +21 -0
  103. package/dist/primitives/action-button.d.ts +9 -0
  104. package/dist/primitives/action-button.jsx +16 -0
  105. package/dist/primitives/apply-typography.d.ts +7 -0
  106. package/dist/primitives/apply-typography.jsx +38 -0
  107. package/dist/primitives/aspect-ratio.d.ts +3 -0
  108. package/dist/primitives/aspect-ratio.jsx +4 -0
  109. package/dist/primitives/avatar.d.ts +6 -0
  110. package/dist/primitives/avatar.jsx +11 -0
  111. package/dist/primitives/badge.d.ts +9 -0
  112. package/dist/primitives/badge.jsx +18 -0
  113. package/dist/primitives/breadcrumb.d.ts +19 -0
  114. package/dist/primitives/breadcrumb.jsx +27 -0
  115. package/dist/primitives/breakpoint-indicator.d.ts +3 -0
  116. package/dist/primitives/breakpoint-indicator.jsx +14 -0
  117. package/dist/primitives/button.d.ts +12 -0
  118. package/dist/primitives/button.jsx +55 -0
  119. package/dist/primitives/calendar.d.ts +8 -0
  120. package/dist/primitives/calendar.jsx +40 -0
  121. package/dist/primitives/card.d.ts +8 -0
  122. package/dist/primitives/card.jsx +18 -0
  123. package/dist/primitives/carousel.d.ts +18 -0
  124. package/dist/primitives/carousel.jsx +106 -0
  125. package/dist/primitives/checkbox.d.ts +4 -0
  126. package/dist/primitives/checkbox.jsx +15 -0
  127. package/dist/primitives/combobox.d.ts +41 -0
  128. package/dist/primitives/combobox.jsx +77 -0
  129. package/dist/primitives/command.d.ts +17 -0
  130. package/dist/primitives/command.jsx +38 -0
  131. package/dist/primitives/context-menu.d.ts +27 -0
  132. package/dist/primitives/context-menu.jsx +57 -0
  133. package/dist/primitives/dialog-video-controller.d.ts +3 -0
  134. package/dist/primitives/dialog-video-controller.jsx +24 -0
  135. package/dist/primitives/dialog.d.ts +28 -0
  136. package/dist/primitives/dialog.jsx +37 -0
  137. package/dist/primitives/drawer.d.ts +29 -0
  138. package/dist/primitives/drawer.jsx +34 -0
  139. package/dist/primitives/form.d.ts +12 -0
  140. package/dist/primitives/form.jsx +69 -0
  141. package/dist/primitives/icons/github.d.ts +4 -0
  142. package/dist/primitives/icons/github.jsx +6 -0
  143. package/dist/primitives/icons/index.d.ts +4 -0
  144. package/dist/primitives/icons/index.js +4 -0
  145. package/dist/primitives/icons/youtube-logo.d.ts +4 -0
  146. package/dist/primitives/icons/youtube-logo.jsx +39 -0
  147. package/dist/primitives/index-common.d.ts +47 -0
  148. package/dist/primitives/index-common.js +46 -0
  149. package/dist/primitives/index-next.d.ts +2 -0
  150. package/dist/primitives/index-next.js +2 -0
  151. package/dist/primitives/input-otp.d.ts +7 -0
  152. package/dist/primitives/input-otp.jsx +24 -0
  153. package/dist/primitives/input.d.ts +5 -0
  154. package/dist/primitives/input.jsx +11 -0
  155. package/dist/primitives/label.d.ts +5 -0
  156. package/dist/primitives/label.jsx +11 -0
  157. package/dist/primitives/list-adaptor.d.ts +9 -0
  158. package/dist/primitives/list-adaptor.js +1 -0
  159. package/dist/primitives/list-box.d.ts +10 -0
  160. package/dist/primitives/list-box.jsx +14 -0
  161. package/dist/primitives/loading-spinner.d.ts +5 -0
  162. package/dist/primitives/loading-spinner.jsx +8 -0
  163. package/dist/primitives/navigation-menu.d.ts +12 -0
  164. package/dist/primitives/navigation-menu.jsx +38 -0
  165. package/dist/primitives/next/image.d.ts +11 -0
  166. package/dist/primitives/next/image.jsx +42 -0
  167. package/dist/primitives/next/index.d.ts +7 -0
  168. package/dist/primitives/next/index.js +7 -0
  169. package/dist/primitives/next/inline-icon.d.ts +13 -0
  170. package/dist/primitives/next/inline-icon.jsx +15 -0
  171. package/dist/primitives/next/link-element.d.ts +23 -0
  172. package/dist/primitives/next/link-element.jsx +56 -0
  173. package/dist/primitives/next/mdx-link.d.ts +3 -0
  174. package/dist/primitives/next/mdx-link.jsx +12 -0
  175. package/dist/primitives/next/media-stack.d.ts +8 -0
  176. package/dist/primitives/next/media-stack.jsx +28 -0
  177. package/dist/primitives/next/nav-items.d.ts +10 -0
  178. package/dist/primitives/next/nav-items.jsx +24 -0
  179. package/dist/primitives/next/youtube-embed.d.ts +11 -0
  180. package/dist/primitives/next/youtube-embed.jsx +23 -0
  181. package/dist/primitives/popover.d.ts +9 -0
  182. package/dist/primitives/popover.jsx +18 -0
  183. package/dist/primitives/progress.d.ts +4 -0
  184. package/dist/primitives/progress.jsx +9 -0
  185. package/dist/primitives/radio-group.d.ts +7 -0
  186. package/dist/primitives/radio-group.jsx +18 -0
  187. package/dist/primitives/scroll-area.d.ts +5 -0
  188. package/dist/primitives/scroll-area.jsx +19 -0
  189. package/dist/primitives/select.d.ts +13 -0
  190. package/dist/primitives/select.jsx +62 -0
  191. package/dist/primitives/separator.d.ts +4 -0
  192. package/dist/primitives/separator.jsx +7 -0
  193. package/dist/primitives/sheet.d.ts +30 -0
  194. package/dist/primitives/sheet.jsx +56 -0
  195. package/dist/primitives/skeleton.d.ts +4 -0
  196. package/dist/primitives/skeleton.jsx +3 -0
  197. package/dist/primitives/slider.d.ts +9 -0
  198. package/dist/primitives/slider.jsx +30 -0
  199. package/dist/primitives/sonner.d.ts +5 -0
  200. package/dist/primitives/sonner.jsx +16 -0
  201. package/dist/primitives/step-indicator.d.ts +9 -0
  202. package/dist/primitives/step-indicator.jsx +23 -0
  203. package/dist/primitives/switch.d.ts +6 -0
  204. package/dist/primitives/switch.jsx +14 -0
  205. package/dist/primitives/table.d.ts +10 -0
  206. package/dist/primitives/table.jsx +21 -0
  207. package/dist/primitives/tabs.d.ts +7 -0
  208. package/dist/primitives/tabs.jsx +18 -0
  209. package/dist/primitives/text-area.d.ts +5 -0
  210. package/dist/primitives/text-area.jsx +9 -0
  211. package/dist/primitives/toggle-group.d.ts +14 -0
  212. package/dist/primitives/toggle-group.jsx +28 -0
  213. package/dist/primitives/toggle.d.ts +14 -0
  214. package/dist/primitives/toggle.jsx +52 -0
  215. package/dist/primitives/tooltip.d.ts +11 -0
  216. package/dist/primitives/tooltip.jsx +18 -0
  217. package/dist/primitives/video-player.d.ts +6 -0
  218. package/dist/primitives/video-player.jsx +8 -0
  219. package/dist/registry/api.d.ts +37 -0
  220. package/dist/registry/api.js +130 -0
  221. package/dist/registry/index.d.ts +9 -0
  222. package/dist/registry/index.js +45 -0
  223. package/dist/style/theme-provider.d.ts +4 -0
  224. package/dist/style/theme-provider.jsx +11 -0
  225. package/dist/tailwind/fontFamily.tailwind.d.ts +8 -0
  226. package/dist/tailwind/fontFamily.tailwind.js +7 -0
  227. package/dist/tailwind/fontSize.tailwind.d.ts +36 -0
  228. package/dist/tailwind/fontSize.tailwind.js +13 -0
  229. package/dist/tailwind/index.d.ts +3 -0
  230. package/dist/tailwind/index.js +2 -0
  231. package/dist/tailwind/screens.tailwind.d.ts +9 -0
  232. package/dist/tailwind/screens.tailwind.js +8 -0
  233. package/dist/tailwind/tw-font-desc.d.ts +6 -0
  234. package/dist/tailwind/tw-font-desc.js +6 -0
  235. package/dist/types/animation-def.d.ts +2 -0
  236. package/dist/types/animation-def.js +1 -0
  237. package/dist/types/breakpoints.d.ts +4 -0
  238. package/dist/types/breakpoints.js +4 -0
  239. package/dist/types/bullet-item.d.ts +6 -0
  240. package/dist/types/bullet-item.js +2 -0
  241. package/dist/types/button-def.d.ts +29 -0
  242. package/dist/types/button-def.js +2 -0
  243. package/dist/types/dimensions.d.ts +5 -0
  244. package/dist/types/dimensions.js +1 -0
  245. package/dist/types/grid-def.d.ts +36 -0
  246. package/dist/types/grid-def.js +33 -0
  247. package/dist/types/image-def.d.ts +27 -0
  248. package/dist/types/image-def.js +1 -0
  249. package/dist/types/index.d.ts +13 -0
  250. package/dist/types/index.js +2 -0
  251. package/dist/types/link-def.d.ts +44 -0
  252. package/dist/types/link-def.js +1 -0
  253. package/dist/types/media-stack-def.d.ts +25 -0
  254. package/dist/types/media-stack-def.js +1 -0
  255. package/dist/types/t-shirt-size.d.ts +2 -0
  256. package/dist/types/t-shirt-size.js +1 -0
  257. package/dist/types/tshirt-dimensions.d.ts +12 -0
  258. package/dist/types/tshirt-dimensions.js +1 -0
  259. package/dist/types/video-def.d.ts +9 -0
  260. package/dist/types/video-def.js +1 -0
  261. package/dist/util/format-and-abbreviate-as-currency.d.ts +11 -0
  262. package/dist/util/format-and-abbreviate-as-currency.js +91 -0
  263. package/dist/util/format-to-max-char.d.ts +5 -0
  264. package/dist/util/format-to-max-char.js +57 -0
  265. package/dist/util/index-client.d.ts +2 -0
  266. package/dist/util/index-client.js +3 -0
  267. package/dist/util/index.d.ts +17 -0
  268. package/dist/util/index.js +41 -0
  269. package/dist/util/number-abbreviate.d.ts +9 -0
  270. package/dist/util/number-abbreviate.js +30 -0
  271. package/dist/util/specifier.d.ts +7 -0
  272. package/dist/util/specifier.js +31 -0
  273. package/dist/util/spread-to-transform.d.ts +7 -0
  274. package/dist/util/spread-to-transform.js +18 -0
  275. package/dist/util/step-animation.d.ts +5 -0
  276. package/dist/util/step-animation.js +60 -0
  277. package/dist/util/two-way-map.d.ts +8 -0
  278. package/dist/util/two-way-map.js +16 -0
  279. package/mcp/README.md +141 -0
  280. package/mcp/enhanced-server.ts +1208 -0
  281. package/mcp/index.ts +518 -0
  282. package/mcp/package.json +10 -0
  283. package/package.json +36 -16
  284. package/primitives/accordion.tsx +5 -5
  285. package/primitives/button.tsx +6 -3
  286. package/primitives/dialog.tsx +12 -7
  287. package/primitives/tabs.tsx +1 -1
  288. package/primitives/tooltip.tsx +1 -1
  289. package/public/r/accordion.json +11 -0
  290. package/public/r/alert.json +11 -0
  291. package/public/r/avatar.json +11 -0
  292. package/public/r/badge.json +11 -0
  293. package/public/r/button.json +11 -0
  294. package/public/r/card.json +11 -0
  295. package/public/r/checkbox.json +11 -0
  296. package/public/r/default.json +6 -0
  297. package/public/r/dialog.json +11 -0
  298. package/public/r/input.json +11 -0
  299. package/public/r/label.json +11 -0
  300. package/public/r/new-york.json +6 -0
  301. package/public/r/popover.json +11 -0
  302. package/public/r/select.json +11 -0
  303. package/public/r/table.json +11 -0
  304. package/public/r/tabs.json +11 -0
  305. package/public/r/toast.json +11 -0
  306. package/registry/api.ts +164 -0
  307. package/registry/index.ts +60 -0
  308. package/registry/package.json +10 -0
  309. package/registry.json +184 -0
  310. package/test/test-registry.js +73 -0
  311. package/tsconfig.json +8 -1
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
4
+ import { cn } from '../util';
5
+ const Breadcrumb = React.forwardRef(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props}/>);
6
+ Breadcrumb.displayName = "Breadcrumb";
7
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (<ol ref={ref} className={cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-2 sm:gap-2.5", className)} {...props}/>));
8
+ BreadcrumbList.displayName = "BreadcrumbList";
9
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (<li ref={ref} className={cn("inline-flex items-center gap-1.5", className)} {...props}/>));
10
+ BreadcrumbItem.displayName = "BreadcrumbItem";
11
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
12
+ const Comp = asChild ? Slot : "a";
13
+ return (<Comp ref={ref} className={cn("transition-colors hover:text-foreground", className)} {...props}/>);
14
+ });
15
+ BreadcrumbLink.displayName = "BreadcrumbLink";
16
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (<span ref={ref} role="link" aria-disabled="true" aria-current="page" className={cn("font-normal text-foreground", className)} {...props}/>));
17
+ BreadcrumbPage.displayName = "BreadcrumbPage";
18
+ const BreadcrumbSeparator = ({ children, className, ...props }) => (<li role="presentation" aria-hidden="true" className={cn("[&>svg]:size-3.5", className)} {...props}>
19
+ {children ?? <ChevronRight />}
20
+ </li>);
21
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
22
+ const BreadcrumbEllipsis = ({ className, ...props }) => (<span role="presentation" aria-hidden="true" className={cn("flex h-9 w-9 items-center justify-center", className)} {...props}>
23
+ <MoreHorizontal className="h-4 w-4"/>
24
+ <span className="sr-only">More</span>
25
+ </span>);
26
+ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
27
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const BreakpointIndicator: React.FC;
3
+ export default BreakpointIndicator;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ const BreakpointIndicator = () => {
3
+ if (process?.env?.NODE_ENV !== undefined && process.env.NODE_ENV === "production")
4
+ return null;
5
+ return (<div className="fixed bottom-1 left-1 z-floating flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-primary">
6
+ <div className="block sm:hidden">xs</div>
7
+ <div className="hidden sm:block md:hidden">sm</div>
8
+ <div className="hidden md:block lg:hidden">md</div>
9
+ <div className="hidden lg:block xl:hidden">lg</div>
10
+ <div className="hidden xl:block 2xl:hidden">xl</div>
11
+ <div className="hidden 2xl:block">2xl</div>
12
+ </div>);
13
+ };
14
+ export default BreakpointIndicator;
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "primary" | "secondary" | "outline" | "destructive" | "ghost" | "linkFG" | "linkMuted" | null | undefined;
5
+ size?: "link" | "default" | "xs" | "sm" | "square" | "lg" | "icon" | null | undefined;
6
+ rounded?: "none" | "md" | "sm" | "lg" | "full" | "xl" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
9
+ asChild?: boolean;
10
+ }
11
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
+ export { Button as default, type ButtonProps, buttonVariants, };
@@ -0,0 +1,55 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../util";
5
+ // Define all variants
6
+ const variant = {
7
+ primary: "bg-primary text-primary-fg sm:hover:bg-primary-hover font-nav whitespace-nowrap not-typography",
8
+ secondary: "bg-secondary text-secondary-fg sm:hover:bg-secondary-hover font-nav whitespace-nowrap not-typography",
9
+ outline: "text-foreground bg-background border border-muted-4 sm:hover:bg-level-1 sm:hover:text-accent sm:hover:border-accent font-nav whitespace-nowrap not-typography",
10
+ destructive: "bg-destructive text-destructive-fg font-sans whitespace-nowrap sm:hover:bg-destructive-hover",
11
+ ghost: "text-foreground sm:hover:bg-level-1 sm:hover:text-accent whitespace-nowrap font-sans ",
12
+ link: "text-foreground sm:hover:text-muted-1 font-sans ",
13
+ linkFG: "text-foreground sm:hover:text-muted-1 font-sans ", // marker to style nav as regular link
14
+ linkMuted: "text-muted-1 sm:hover:text-foreground font-sans ",
15
+ };
16
+ // Define all sizes
17
+ const size = {
18
+ link: '',
19
+ xs: "h-8 px-2 text-xs",
20
+ sm: "h-9 px-3 text-xs",
21
+ square: 'h-9 py-2 px-2 text-sm aspect-square',
22
+ default: "h-9 py-2 px-4 text-sm md:text-base font-semibold min-w-0",
23
+ lg: "h-10 px-8 text-sm md:text-base font-semibold min-w-0 md:min-w-[260px] lg:min-w-[300px]",
24
+ icon: "h-10 w-10",
25
+ };
26
+ // Define rounded options
27
+ const rounded = {
28
+ full: 'rounded-full',
29
+ sm: 'rounded-sm',
30
+ md: 'rounded-md',
31
+ lg: 'rounded-lg',
32
+ xl: 'rounded-xl',
33
+ none: ''
34
+ };
35
+ // Updated buttonVariants with the latest Shadcn patterns
36
+ const buttonVariants = cva("inline-flex items-center justify-center font-medium ring-offset-background transition-colors " +
37
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 " +
38
+ "disabled:opacity-50 disabled:pointer-events-none", {
39
+ variants: {
40
+ variant,
41
+ size,
42
+ rounded
43
+ },
44
+ defaultVariants: {
45
+ variant: "primary",
46
+ size: "default",
47
+ rounded: 'md'
48
+ },
49
+ });
50
+ const Button = React.forwardRef(({ className, variant, size, rounded, asChild = false, ...props }, ref) => {
51
+ const Comp = asChild ? Slot : "button";
52
+ return (<Comp className={cn(buttonVariants({ variant, size, rounded }), className)} ref={ref} {...props}/>);
53
+ });
54
+ Button.displayName = "Button";
55
+ export { Button as default, buttonVariants, };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { DayPicker } from "react-day-picker";
3
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
5
+ declare namespace Calendar {
6
+ var displayName: string;
7
+ }
8
+ export default Calendar;
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import React from "react";
3
+ import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons";
4
+ import { DayPicker } from "react-day-picker";
5
+ import { cn } from "../util";
6
+ import { buttonVariants } from "./button";
7
+ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
8
+ return (<DayPicker showOutsideDays={showOutsideDays} className={cn("p-3", className)} classNames={{
9
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
10
+ month: "space-y-4",
11
+ caption: "flex justify-center pt-1 relative items-center",
12
+ caption_label: "text-sm font-medium",
13
+ nav: "space-x-1 flex items-center",
14
+ nav_button: cn(buttonVariants({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
15
+ nav_button_previous: "absolute left-1",
16
+ nav_button_next: "absolute right-1",
17
+ table: "w-full border-collapse space-y-1",
18
+ head_row: "flex",
19
+ head_cell: "text-muted-1 rounded-md w-8 font-normal text-[0.8rem]",
20
+ row: "flex w-full mt-2",
21
+ cell: cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-above-content [&:has([aria-selected])]:bg-level-1 [&:has([aria-selected].day-outside)]:bg-level-1/50 [&:has([aria-selected].day-range-end)]:rounded-r-md", props.mode === "range"
22
+ ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
23
+ : "[&:has([aria-selected])]:rounded-md"),
24
+ day: cn(buttonVariants({ variant: "ghost" }), "h-8 w-8 p-0 font-normal aria-selected:opacity-100"),
25
+ day_range_start: "day-range-start",
26
+ day_range_end: "day-range-end",
27
+ day_selected: "bg-primary text-primary-fg hover:bg-primary hover:text-primary-fg focus:bg-primary focus:text-primary-fg",
28
+ day_today: "bg-accent text-primary-fg",
29
+ day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-1 aria-selected:opacity-30",
30
+ day_disabled: "text-muted-foreground opacity-50",
31
+ day_range_middle: "aria-selected:bg-accent aria-selected:text-primary-fg",
32
+ day_hidden: "invisible",
33
+ ...classNames,
34
+ }} components={{
35
+ IconLeft: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4"/>,
36
+ IconRight: ({ ...props }) => <ChevronRightIcon className="h-4 w-4"/>,
37
+ }} {...props}/>);
38
+ }
39
+ Calendar.displayName = "Calendar";
40
+ export default Calendar;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
5
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
6
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -0,0 +1,18 @@
1
+ 'use client';
2
+ import * as React from "react";
3
+ import { cn } from "../util";
4
+ const Card = React.forwardRef(({ className, ...props }, ref) => {
5
+ return (<div ref={ref} className={cn("rounded-lg border overflow-hidden shadow-sm", className)} {...props}/>);
6
+ });
7
+ Card.displayName = "Card";
8
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} className={cn("flex flex-col p-4 lg:p-5 xl:px-6 xl:py-5 border-b", className)} {...props}/>));
9
+ CardHeader.displayName = "CardHeader";
10
+ const CardTitle = React.forwardRef(({ className, ...props }, ref) => (<h5 ref={ref} className={cn("leading-none tracking-tight", className)} {...props}/>));
11
+ CardTitle.displayName = "CardTitle";
12
+ const CardDescription = React.forwardRef(({ className, ...props }, ref) => (<h6 ref={ref} className={className} {...props}/>));
13
+ CardDescription.displayName = "CardDescription";
14
+ const CardContent = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} className={cn("p-6", className)} {...props}/>));
15
+ CardContent.displayName = "CardContent";
16
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} className={cn("flex items-center px-6 py-3 border-t", className)} {...props}/>));
17
+ CardFooter.displayName = "CardFooter";
18
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import type { EmblaCarouselType, EmblaOptionsType, EmblaPluginType } from 'embla-carousel';
3
+ type CarouselApi = EmblaCarouselType;
4
+ type CarouselOptions = EmblaOptionsType;
5
+ type CarouselPlugin = EmblaPluginType;
6
+ type CarouselProps = {
7
+ options?: CarouselOptions;
8
+ plugins?: CarouselPlugin[];
9
+ orientation?: 'horizontal' | 'vertical';
10
+ setApi?: (api: CarouselApi) => void;
11
+ onCarouselSelect?: (api: CarouselApi) => void;
12
+ };
13
+ declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
14
+ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
+ export { type CarouselApi, type CarouselOptions, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -0,0 +1,106 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import useEmblaCarousel from 'embla-carousel-react';
4
+ import { ArrowLeft, ArrowRight } from 'lucide-react';
5
+ import { cn } from '../util';
6
+ import Button from './button';
7
+ const CarouselContext = React.createContext(null);
8
+ const useCarousel = () => {
9
+ const service = React.useContext(CarouselContext);
10
+ if (!service) {
11
+ throw new Error('useCarousel must be used within a <Carousel />');
12
+ }
13
+ return service;
14
+ };
15
+ // https://github.com/emilkowalski/vaul/pull/250
16
+ // See data-vaul-no-drag throughout
17
+ const Carousel = React.forwardRef(({ orientation = 'horizontal', options, setApi, plugins, className, children, onCarouselSelect, ...props }, ref) => {
18
+ const [carouselRef, api] = useEmblaCarousel({ ...options, axis: orientation === 'horizontal' ? 'x' : 'y' }, plugins);
19
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
20
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
21
+ const onSelect = React.useCallback((api) => {
22
+ if (!api) {
23
+ return;
24
+ } // would this ever happen??
25
+ setCanScrollPrev(api.canScrollPrev());
26
+ setCanScrollNext(api.canScrollNext());
27
+ if (onCarouselSelect) {
28
+ onCarouselSelect(api);
29
+ }
30
+ }, []);
31
+ const scrollPrev = React.useCallback(() => { api?.scrollPrev(); }, [api]);
32
+ const scrollNext = React.useCallback(() => { api?.scrollNext(); }, [api]);
33
+ const handleKeyDown = React.useCallback((event) => {
34
+ if (event.key === 'ArrowLeft') {
35
+ event.preventDefault();
36
+ scrollPrev();
37
+ }
38
+ else if (event.key === 'ArrowRight') {
39
+ event.preventDefault();
40
+ scrollNext();
41
+ }
42
+ }, [scrollPrev, scrollNext]);
43
+ React.useEffect(() => {
44
+ if (!api || !setApi) {
45
+ return;
46
+ }
47
+ setApi(api);
48
+ }, [api, setApi]);
49
+ React.useEffect(() => {
50
+ if (!api) {
51
+ return;
52
+ }
53
+ onSelect(api);
54
+ api.on('reInit', onSelect);
55
+ api.on('select', onSelect);
56
+ return () => { api?.off('select', onSelect); };
57
+ }, [api, onSelect]);
58
+ return (<CarouselContext.Provider value={{
59
+ carouselRef,
60
+ api,
61
+ options,
62
+ orientation: orientation || (options?.axis === 'y' ? 'vertical' : 'horizontal'),
63
+ scrollPrev,
64
+ scrollNext,
65
+ canScrollPrev,
66
+ canScrollNext,
67
+ }}>
68
+ <div ref={ref} onKeyDownCapture={handleKeyDown} className={cn('relative', className)} role='region' aria-roledescription='carousel' data-vaul-no-drag {...props}>
69
+ {children}
70
+ </div>
71
+ </CarouselContext.Provider>);
72
+ });
73
+ Carousel.displayName = 'Carousel';
74
+ const CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
75
+ const { carouselRef, orientation } = useCarousel();
76
+ return (<div ref={carouselRef} className='overflow-hidden' data-vaul-no-drag>
77
+ <div ref={ref} className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)} {...props}/>
78
+ </div>);
79
+ });
80
+ CarouselContent.displayName = 'CarouselContent';
81
+ const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
82
+ const { orientation } = useCarousel();
83
+ return (<div ref={ref} role='group' aria-roledescription='slide' data-vaul-no-drag className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)} {...props}/>);
84
+ });
85
+ CarouselItem.displayName = 'CarouselItem';
86
+ const CarouselPrevious = React.forwardRef(({ className, variant = 'ghost', size = 'icon', ...props }, ref) => {
87
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
88
+ return (<Button ref={ref} variant={variant} size={size} className={cn('absolute h-8 w-8 rounded-full', orientation === 'horizontal'
89
+ ? '-left-12 top-1/2 -translate-y-1/2'
90
+ : '-top-12 left-1/2 -translate-x-1/2 rotate-90', className)} disabled={!canScrollPrev} onClick={scrollPrev} {...props}>
91
+ <ArrowLeft className='h-4 w-4'/>
92
+ <span className='sr-only'>Previous slide</span>
93
+ </Button>);
94
+ });
95
+ CarouselPrevious.displayName = 'CarouselPrevious';
96
+ const CarouselNext = React.forwardRef(({ className, variant = 'ghost', size = 'icon', ...props }, ref) => {
97
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
98
+ return (<Button ref={ref} variant={variant} size={size} className={cn('absolute h-8 w-8 rounded-full', orientation === 'horizontal'
99
+ ? '-right-12 top-1/2 -translate-y-1/2'
100
+ : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90', className)} disabled={!canScrollNext} onClick={scrollNext} {...props}>
101
+ <ArrowRight className='h-4 w-4'/>
102
+ <span className='sr-only'>Next slide</span>
103
+ </Button>);
104
+ });
105
+ CarouselNext.displayName = 'CarouselNext';
106
+ export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export default Checkbox;
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
+ import { Check } from 'lucide-react';
5
+ import { cn } from '../util';
6
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => (<CheckboxPrimitive.Root ref={ref} className={cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background ' +
7
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ' +
8
+ 'focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ' +
9
+ 'data-[state=checked]:bg-primary data-[state=checked]:text-primary-fg', className)} {...props}>
10
+ <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
11
+ <Check className='h-4 w-4'/>
12
+ </CheckboxPrimitive.Indicator>
13
+ </CheckboxPrimitive.Root>));
14
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
15
+ export default Checkbox;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import type ListAdaptor from './list-adaptor';
3
+ interface ComboboxTriggerProps<T> {
4
+ current: T | null;
5
+ currentLabel: string | null;
6
+ imageUrl: string | null;
7
+ placeholder?: string;
8
+ buttonClx?: string;
9
+ imageClx?: string;
10
+ disabled?: boolean;
11
+ imageSize?: number;
12
+ noChevron?: boolean;
13
+ open: boolean;
14
+ }
15
+ declare const Combobox: <T, P extends ComboboxTriggerProps<T>>({ elements, initial, current, setCurrent, closeOnSelect, adaptor, popoverClx, listItemClx, listItemSelectedClx, listItemDisabledClx, noCheckmark, listItemImageClx, searchPlaceholder, noneFoundMessage, listItemImageSize, noSearch, popoverAlign, popoverSideOffset, Trigger, triggerProps }: {
16
+ elements: T[];
17
+ initial?: T | null;
18
+ current?: T | null;
19
+ setCurrent: (c: T | null) => void;
20
+ closeOnSelect?: boolean;
21
+ adaptor: ListAdaptor<T>;
22
+ popoverClx?: string;
23
+ listItemClx?: string;
24
+ listItemSelectedClx?: string;
25
+ listItemDisabledClx?: string;
26
+ listItemImageClx?: string;
27
+ listItemImageSize?: number;
28
+ noCheckmark?: boolean;
29
+ searchPlaceholder?: string;
30
+ noneFoundMessage?: string;
31
+ noSearch?: boolean;
32
+ popoverAlign?: "center" | "end" | "start";
33
+ popoverSideOffset?: number;
34
+ /** If (custom) Trigger is not supplied,
35
+ * passed to default trigger */
36
+ triggerProps: P;
37
+ Trigger?: <T_1, P_1>(props: P_1 & {
38
+ ref?: React.ForwardedRef<HTMLButtonElement>;
39
+ }) => React.ReactNode;
40
+ }) => React.JSX.Element;
41
+ export { Combobox as default, type ComboboxTriggerProps };
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ import React, { useState } from 'react';
3
+ import { Check, ChevronDown } from 'lucide-react';
4
+ import { cn } from '../util';
5
+ import Button from './button';
6
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from './command';
7
+ import { Popover, PopoverContent, PopoverTrigger, } from './popover';
8
+ const DEFAULT_IMAGE_SIZE = 32;
9
+ const DefaultTriggerInner = ({ current, currentLabel, imageUrl, buttonClx = '', imageClx = '', placeholder = '(select)', disabled = false, imageSize = DEFAULT_IMAGE_SIZE, noChevron = false, open, ...rest }, ref) => (<Button ref={ref} {...rest} variant='outline' role='combobox' aria-expanded={open} className={cn('flex', noChevron ? 'justify-start' : 'justify-between', buttonClx)} disabled={disabled}>
10
+ <div className='flex justify-start items-center gap-2'>
11
+ {(current && imageUrl) ? (<img src={imageUrl} alt={currentLabel + ' image'} height={imageSize} width={imageSize} loading="eager" className={cn('block', imageClx)}/>) : (<div style={{ width: imageSize, height: imageSize }}/>)}
12
+ <span className='block'>{currentLabel}</span>
13
+ </div>
14
+ {!noChevron && (<ChevronDown className={cn('block', open ? '' : 'opacity-50')}/>)}
15
+ </Button>);
16
+ const DefaultTrigger = React.forwardRef(DefaultTriggerInner);
17
+ const Combobox = ({ elements, initial, current, setCurrent, closeOnSelect = true, adaptor, popoverClx = '', listItemClx = '', listItemSelectedClx = '', listItemDisabledClx = '', noCheckmark = false, listItemImageClx = '', searchPlaceholder = 'Search...', noneFoundMessage = 'None found.', listItemImageSize = DEFAULT_IMAGE_SIZE, noSearch = false, popoverAlign = 'center', popoverSideOffset = 4, Trigger, triggerProps }) => {
18
+ const [_open, _setOpen] = useState(false);
19
+ // for non-controlled base (must declare the hook either way)
20
+ const [_current, _setCurrent] = useState(initial ?? null);
21
+ const handleSelect = (selString) => {
22
+ const found = elements.find((el) => (adaptor.valueEquals(el, selString)));
23
+ if (found) {
24
+ // non-controlled ('initial' supplied (may have been null))
25
+ if (initial !== undefined) {
26
+ _setCurrent(found);
27
+ }
28
+ setCurrent(found);
29
+ }
30
+ if (closeOnSelect) {
31
+ _setOpen(false);
32
+ }
33
+ };
34
+ const isCurrent = (el) => {
35
+ // non-controlled?
36
+ const curr = (current === undefined) ? _current : current;
37
+ return !!curr && adaptor.equals(el, curr);
38
+ };
39
+ const _triggerProps = current ? {
40
+ ...triggerProps,
41
+ current,
42
+ currentLabel: adaptor.getLabel ? adaptor.getLabel(current) : adaptor.getValue(current),
43
+ imageUrl: adaptor.getImageUrl ? adaptor.getImageUrl(current) : null,
44
+ open: _open
45
+ } : {
46
+ ...triggerProps,
47
+ current: null,
48
+ currentLabel: null,
49
+ imageUrl: null,
50
+ open: _open
51
+ };
52
+ return (<Popover open={_open} onOpenChange={_setOpen}>
53
+ <PopoverTrigger asChild>
54
+ {Trigger ? (<Trigger {..._triggerProps}/>) : (<DefaultTrigger {..._triggerProps}/>)}
55
+ </PopoverTrigger>
56
+ <PopoverContent className={cn('p-0', popoverClx)} align={popoverAlign} sideOffset={popoverSideOffset}>
57
+ <Command>
58
+ {!noSearch && (<CommandInput placeholder={searchPlaceholder}/>)}
59
+ <CommandList>
60
+ <CommandEmpty>{noneFoundMessage}</CommandEmpty>
61
+ <CommandGroup>
62
+ {elements.map((el) => (<CommandItem key={adaptor.getValue(el)} value={adaptor.getValue(el)} onSelect={handleSelect} disabled={adaptor.isDisabled ? adaptor.isDisabled(el) : false} className={cn('flex', noCheckmark ? 'justify-start' : 'justify-between', listItemClx, (isCurrent(el) ? listItemSelectedClx : ''), ((adaptor.isDisabled && adaptor.isDisabled(el)) ? listItemDisabledClx : ''))}>
63
+ <div className='flex justify-start items-center gap-2'>
64
+ {(adaptor.getImageUrl && adaptor.getImageUrl(el)) ? (<img src={adaptor.getImageUrl(el)} alt={adaptor.getValue(el) + ' image'} height={listItemImageSize} width={listItemImageSize} loading="eager" className={listItemImageClx}/>) : (<div style={{ width: listItemImageSize, height: listItemImageSize }}/>)}
65
+ <span>{adaptor.getLabel ? adaptor.getLabel(el) : adaptor.getValue(el)}</span>
66
+ </div>
67
+ {!noCheckmark && (<div>
68
+ <Check className={cn('ml-auto', (isCurrent(el)) ? '' : 'invisible')}/>
69
+ </div>)}
70
+ </CommandItem>))}
71
+ </CommandGroup>
72
+ </CommandList>
73
+ </Command>
74
+ </PopoverContent>
75
+ </Popover>);
76
+ };
77
+ export { Combobox as default };
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { type DialogProps } from "@radix-ui/react-dialog";
3
+ declare const Command: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
4
+ interface CommandDialogProps extends DialogProps {
5
+ }
6
+ declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => React.JSX.Element;
7
+ declare const CommandInput: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
8
+ declare const CommandList: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
9
+ declare const CommandEmpty: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
10
+ declare const CommandGroup: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
11
+ declare const CommandSeparator: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
12
+ declare const CommandItem: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
13
+ declare const CommandShortcut: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import React from "react";
3
+ import {} from "@radix-ui/react-dialog";
4
+ import { Command as CommandPrimitive } from "cmdk";
5
+ import { Search } from "lucide-react";
6
+ import { cn } from "../util";
7
+ import { Dialog, DialogContent } from "./dialog";
8
+ const Command = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive ref={ref} className={cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-level-1 text-foreground", className)} {...props}/>));
9
+ Command.displayName = CommandPrimitive.displayName;
10
+ const CommandDialog = ({ children, ...props }) => {
11
+ return (<Dialog {...props}>
12
+ <DialogContent className="overflow-hidden p-0 shadow-lg">
13
+ <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-1 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
14
+ {children}
15
+ </Command>
16
+ </DialogContent>
17
+ </Dialog>);
18
+ };
19
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => (<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
20
+ <Search className="mr-2 h-4 w-4 shrink-0 opacity-50"/>
21
+ <CommandPrimitive.Input ref={ref} className={cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-2 disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}/>
22
+ </div>));
23
+ CommandInput.displayName = CommandPrimitive.Input.displayName;
24
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.List ref={ref} className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} {...props}/>));
25
+ CommandList.displayName = CommandPrimitive.List.displayName;
26
+ const CommandEmpty = React.forwardRef((props, ref) => (<CommandPrimitive.Empty ref={ref} className="py-6 text-center text-sm" {...props}/>));
27
+ CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
28
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Group ref={ref} className={cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted", className)} {...props}/>));
29
+ CommandGroup.displayName = CommandPrimitive.Group.displayName;
30
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Separator ref={ref} className={cn("-mx-1 h-px bg-border", className)} {...props}/>));
31
+ CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
32
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Item ref={ref} className={cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none', 'data-selected:bg-level-3 aria-selected:text-accent', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-35', className)} {...props}/>));
33
+ CommandItem.displayName = CommandPrimitive.Item.displayName;
34
+ const CommandShortcut = ({ className, ...props }) => {
35
+ return (<span className={cn("ml-auto text-xs tracking-widest text-muted", className)} {...props}/>);
36
+ };
37
+ CommandShortcut.displayName = "CommandShortcut";
38
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
+ declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
4
+ declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
5
+ declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
7
+ declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
8
+ declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const ContextMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
4
+ import { Check, ChevronRight, Circle } from "lucide-react";
5
+ import { cn } from "../util";
6
+ const ContextMenu = ContextMenuPrimitive.Root;
7
+ const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
8
+ const ContextMenuGroup = ContextMenuPrimitive.Group;
9
+ const ContextMenuPortal = ContextMenuPrimitive.Portal;
10
+ const ContextMenuSub = ContextMenuPrimitive.Sub;
11
+ const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
12
+ const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (<ContextMenuPrimitive.SubTrigger ref={ref} className={cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none ' +
13
+ 'focus:bg-level-1 focus:text-accent data-[state=open]:bg-level-1 data-[state=open]:text-accent', inset && "pl-8", className)} {...props}>
14
+ {children}
15
+ <ChevronRight className="ml-auto h-4 w-4"/>
16
+ </ContextMenuPrimitive.SubTrigger>));
17
+ ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
18
+ const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (<ContextMenuPrimitive.SubContent ref={ref} className={cn('z-popup min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-md ' +
19
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 ' +
20
+ 'data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 ' +
21
+ 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 ' +
22
+ 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className)} {...props}/>));
23
+ ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
24
+ const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => (<ContextMenuPrimitive.Portal>
25
+ <ContextMenuPrimitive.Content ref={ref} className={cn("z-popup min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-md animate-in fade-in-80 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", className)} {...props}/>
26
+ </ContextMenuPrimitive.Portal>));
27
+ ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
28
+ const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (<ContextMenuPrimitive.Item ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-level-1 focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)} {...props}/>));
29
+ ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
30
+ const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (<ContextMenuPrimitive.CheckboxItem ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-level-1 focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} checked={checked} {...props}>
31
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
32
+ <ContextMenuPrimitive.ItemIndicator>
33
+ <Check className="h-4 w-4"/>
34
+ </ContextMenuPrimitive.ItemIndicator>
35
+ </span>
36
+ {children}
37
+ </ContextMenuPrimitive.CheckboxItem>));
38
+ ContextMenuCheckboxItem.displayName =
39
+ ContextMenuPrimitive.CheckboxItem.displayName;
40
+ const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (<ContextMenuPrimitive.RadioItem ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-level-1 focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} {...props}>
41
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
42
+ <ContextMenuPrimitive.ItemIndicator>
43
+ <Circle className="h-2 w-2 fill-current"/>
44
+ </ContextMenuPrimitive.ItemIndicator>
45
+ </span>
46
+ {children}
47
+ </ContextMenuPrimitive.RadioItem>));
48
+ ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
49
+ const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (<ContextMenuPrimitive.Label ref={ref} className={cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className)} {...props}/>));
50
+ ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
51
+ const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (<ContextMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border", className)} {...props}/>));
52
+ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
53
+ const ContextMenuShortcut = ({ className, ...props }) => {
54
+ return (<span className={cn("ml-auto text-xs tracking-widest text-muted", className)} {...props}/>);
55
+ };
56
+ ContextMenuShortcut.displayName = "ContextMenuShortcut";
57
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -0,0 +1,3 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ declare const DialogVideoController: React.FC<PropsWithChildren>;
3
+ export default DialogVideoController;