From 47c396b954d3a0215aee6f61f4b434283c738269 Mon Sep 17 00:00:00 2001 From: Armando Anaya Date: Mon, 31 Aug 2026 06:04:52 -0700 Subject: [PATCH 1/2] Consume @robomous/ui-core: re-export the design system, keep VisionSet extensions --- frontend/ui-core/components.json | 13 - frontend/ui-core/package.json | 13 +- frontend/ui-core/shadcn/README.md | 13 - frontend/ui-core/shadcn/alert.tsx | 76 --- frontend/ui-core/shadcn/badge.tsx | 49 -- frontend/ui-core/shadcn/button.tsx | 67 --- frontend/ui-core/shadcn/card.tsx | 103 ---- frontend/ui-core/shadcn/combobox.tsx | 299 ------------ frontend/ui-core/shadcn/dialog.tsx | 166 ------- frontend/ui-core/shadcn/dropdown-menu.tsx | 267 ----------- frontend/ui-core/shadcn/field.tsx | 236 ---------- frontend/ui-core/shadcn/input-group.tsx | 154 ------ frontend/ui-core/shadcn/input.tsx | 19 - frontend/ui-core/shadcn/label.tsx | 22 - frontend/ui-core/shadcn/progress.tsx | 29 -- frontend/ui-core/shadcn/select.tsx | 190 -------- frontend/ui-core/shadcn/separator.tsx | 28 -- frontend/ui-core/shadcn/sheet.tsx | 145 ------ frontend/ui-core/shadcn/skeleton.tsx | 13 - frontend/ui-core/shadcn/sonner.tsx | 49 -- frontend/ui-core/shadcn/table.tsx | 114 ----- frontend/ui-core/shadcn/tabs.tsx | 88 ---- frontend/ui-core/shadcn/textarea.tsx | 18 - frontend/ui-core/shadcn/tooltip.tsx | 57 --- .../ui-core/src/annotator/AddClassDialog.tsx | 13 +- .../ui-core/src/annotator/AnnotationPage.tsx | 14 +- .../ui-core/src/annotator/AnnotatorPanel.tsx | 7 +- .../ui-core/src/annotator/CanvasReassign.tsx | 3 +- .../ui-core/src/annotator/ClassRegion.tsx | 3 +- .../ui-core/src/annotator/FrameGallery.tsx | 2 +- .../ui-core/src/annotator/ReassignMenu.tsx | 4 +- .../ui-core/src/annotator/ShortcutSheet.tsx | 2 +- .../ui-core/src/annotator/SuggestPanel.tsx | 11 +- .../ui-core/src/annotator/ToolPalette.tsx | 3 +- frontend/ui-core/src/annotator/ZoomWidget.tsx | 3 +- .../src/annotator/addClassProvenance.test.tsx | 3 +- .../src/annotator/drawingClass.test.tsx | 2 +- .../src/annotator/editorNotice.test.tsx | 2 +- .../src/annotator/frameGallery.test.tsx | 3 +- frontend/ui-core/src/annotator/panel.test.tsx | 2 +- .../ui-core/src/annotator/pinBadge.test.tsx | 2 +- .../src/annotator/suggestFlow.test.tsx | 2 +- .../src/annotator/toolPalette.test.tsx | 2 +- .../ui-core/src/annotator/topBar.test.tsx | 3 +- frontend/ui-core/src/data/TokenGate.tsx | 6 +- frontend/ui-core/src/harness.test.tsx | 2 +- frontend/ui-core/src/index.ts | 115 +---- frontend/ui-core/src/lib/button.ts | 4 - frontend/ui-core/src/lib/cn.test.ts | 33 -- frontend/ui-core/src/lib/cn.ts | 23 - frontend/ui-core/src/lib/menu.ts | 16 - frontend/ui-core/src/lib/progress.ts | 6 - frontend/ui-core/src/lib/select.ts | 4 - frontend/ui-core/src/patterns/AsyncStates.tsx | 5 +- frontend/ui-core/src/patterns/BackLink.tsx | 2 +- frontend/ui-core/src/patterns/ClassFields.tsx | 12 +- frontend/ui-core/src/patterns/DataDisplay.tsx | 2 +- .../ui-core/src/patterns/ErrorBoundary.tsx | 2 +- .../src/patterns/ExportTargetSelect.tsx | 11 +- .../ui-core/src/patterns/ProjectEyebrow.tsx | 2 +- frontend/ui-core/src/patterns/ProjectNav.tsx | 11 +- .../ui-core/src/patterns/RecipeEditor.tsx | 6 +- frontend/ui-core/src/patterns/RecipeList.tsx | 4 +- frontend/ui-core/src/patterns/StepMarker.tsx | 2 +- .../ui-core/src/patterns/statusTone.test.ts | 20 - frontend/ui-core/src/patterns/statusTone.ts | 52 --- frontend/ui-core/src/primitives/alert.tsx | 76 --- frontend/ui-core/src/primitives/badge.tsx | 57 --- frontend/ui-core/src/primitives/button.tsx | 67 --- frontend/ui-core/src/primitives/card.tsx | 103 ---- .../ui-core/src/primitives/combobox.test.tsx | 38 -- frontend/ui-core/src/primitives/combobox.tsx | 299 ------------ frontend/ui-core/src/primitives/dialog.tsx | 166 ------- .../ui-core/src/primitives/dropdown-menu.tsx | 267 ----------- frontend/ui-core/src/primitives/field.tsx | 236 ---------- .../ui-core/src/primitives/input-group.tsx | 154 ------ frontend/ui-core/src/primitives/input.tsx | 19 - frontend/ui-core/src/primitives/label.tsx | 22 - .../src/primitives/primitives.test.tsx | 440 ------------------ frontend/ui-core/src/primitives/progress.tsx | 29 -- frontend/ui-core/src/primitives/select.tsx | 190 -------- frontend/ui-core/src/primitives/separator.tsx | 28 -- frontend/ui-core/src/primitives/sheet.tsx | 145 ------ frontend/ui-core/src/primitives/skeleton.tsx | 13 - .../ui-core/src/primitives/sonner.test.tsx | 41 -- frontend/ui-core/src/primitives/sonner.tsx | 65 --- frontend/ui-core/src/primitives/table.tsx | 114 ----- frontend/ui-core/src/primitives/tabs.tsx | 88 ---- frontend/ui-core/src/primitives/textarea.tsx | 18 - frontend/ui-core/src/primitives/tooltip.tsx | 57 --- .../ui-core/src/screens/BatchLifecycle.tsx | 22 +- .../ui-core/src/screens/BatchesScreen.tsx | 6 +- .../ui-core/src/screens/ClipRangeTimeline.tsx | 2 +- .../src/screens/ComposedTransitions.tsx | 3 +- .../ui-core/src/screens/CorrectionBatch.tsx | 14 +- .../src/screens/DatasetAssetDialog.tsx | 10 +- .../ui-core/src/screens/DatasetScreen.tsx | 25 +- frontend/ui-core/src/screens/DeleteBatch.tsx | 13 +- frontend/ui-core/src/screens/FrameGrid.tsx | 9 +- .../ui-core/src/screens/GalleryControls.tsx | 4 +- .../ui-core/src/screens/GalleryScreen.tsx | 4 +- frontend/ui-core/src/screens/HomeScreen.tsx | 4 +- frontend/ui-core/src/screens/IngestScreen.tsx | 20 +- frontend/ui-core/src/screens/JobPanels.tsx | 4 +- frontend/ui-core/src/screens/ModelsScreen.tsx | 42 +- .../ui-core/src/screens/OverviewPanel.tsx | 6 +- .../ui-core/src/screens/PreLabelDialog.tsx | 22 +- .../ui-core/src/screens/PreprocessingTab.tsx | 10 +- frontend/ui-core/src/screens/ProjectFrame.tsx | 12 +- .../src/screens/ProjectPreLabelDialog.tsx | 13 +- .../ui-core/src/screens/ProjectScreen.tsx | 6 +- .../ui-core/src/screens/ProjectsScreen.tsx | 15 +- .../ui-core/src/screens/PromoteButton.tsx | 4 +- frontend/ui-core/src/screens/SchemaEditor.tsx | 23 +- .../ui-core/src/screens/SchemaForeshadow.tsx | 5 +- .../ui-core/src/screens/batchState.test.ts | 2 +- frontend/ui-core/src/screens/batchState.ts | 2 +- frontend/ui-core/src/screens/gallery.test.tsx | 2 +- frontend/ui-core/src/screens/ingestScale.tsx | 2 +- .../ui-core/src/screens/schemaDraft.test.tsx | 2 +- frontend/ui-core/src/styles.css | 204 +------- frontend/ui-core/src/tokens.ts | 137 ++---- package.json | 1 + pnpm-lock.yaml | 59 ++- pnpm-workspace.yaml | 5 +- scripts/shadcn_add.sh | 13 - scripts/shadcn_relativize.mjs | 16 - 127 files changed, 168 insertions(+), 5961 deletions(-) delete mode 100644 frontend/ui-core/components.json delete mode 100644 frontend/ui-core/shadcn/README.md delete mode 100644 frontend/ui-core/shadcn/alert.tsx delete mode 100644 frontend/ui-core/shadcn/badge.tsx delete mode 100644 frontend/ui-core/shadcn/button.tsx delete mode 100644 frontend/ui-core/shadcn/card.tsx delete mode 100644 frontend/ui-core/shadcn/combobox.tsx delete mode 100644 frontend/ui-core/shadcn/dialog.tsx delete mode 100644 frontend/ui-core/shadcn/dropdown-menu.tsx delete mode 100644 frontend/ui-core/shadcn/field.tsx delete mode 100644 frontend/ui-core/shadcn/input-group.tsx delete mode 100644 frontend/ui-core/shadcn/input.tsx delete mode 100644 frontend/ui-core/shadcn/label.tsx delete mode 100644 frontend/ui-core/shadcn/progress.tsx delete mode 100644 frontend/ui-core/shadcn/select.tsx delete mode 100644 frontend/ui-core/shadcn/separator.tsx delete mode 100644 frontend/ui-core/shadcn/sheet.tsx delete mode 100644 frontend/ui-core/shadcn/skeleton.tsx delete mode 100644 frontend/ui-core/shadcn/sonner.tsx delete mode 100644 frontend/ui-core/shadcn/table.tsx delete mode 100644 frontend/ui-core/shadcn/tabs.tsx delete mode 100644 frontend/ui-core/shadcn/textarea.tsx delete mode 100644 frontend/ui-core/shadcn/tooltip.tsx delete mode 100644 frontend/ui-core/src/lib/button.ts delete mode 100644 frontend/ui-core/src/lib/cn.test.ts delete mode 100644 frontend/ui-core/src/lib/cn.ts delete mode 100644 frontend/ui-core/src/lib/menu.ts delete mode 100644 frontend/ui-core/src/lib/progress.ts delete mode 100644 frontend/ui-core/src/lib/select.ts delete mode 100644 frontend/ui-core/src/patterns/statusTone.test.ts delete mode 100644 frontend/ui-core/src/patterns/statusTone.ts delete mode 100644 frontend/ui-core/src/primitives/alert.tsx delete mode 100644 frontend/ui-core/src/primitives/badge.tsx delete mode 100644 frontend/ui-core/src/primitives/button.tsx delete mode 100644 frontend/ui-core/src/primitives/card.tsx delete mode 100644 frontend/ui-core/src/primitives/combobox.test.tsx delete mode 100644 frontend/ui-core/src/primitives/combobox.tsx delete mode 100644 frontend/ui-core/src/primitives/dialog.tsx delete mode 100644 frontend/ui-core/src/primitives/dropdown-menu.tsx delete mode 100644 frontend/ui-core/src/primitives/field.tsx delete mode 100644 frontend/ui-core/src/primitives/input-group.tsx delete mode 100644 frontend/ui-core/src/primitives/input.tsx delete mode 100644 frontend/ui-core/src/primitives/label.tsx delete mode 100644 frontend/ui-core/src/primitives/primitives.test.tsx delete mode 100644 frontend/ui-core/src/primitives/progress.tsx delete mode 100644 frontend/ui-core/src/primitives/select.tsx delete mode 100644 frontend/ui-core/src/primitives/separator.tsx delete mode 100644 frontend/ui-core/src/primitives/sheet.tsx delete mode 100644 frontend/ui-core/src/primitives/skeleton.tsx delete mode 100644 frontend/ui-core/src/primitives/sonner.test.tsx delete mode 100644 frontend/ui-core/src/primitives/sonner.tsx delete mode 100644 frontend/ui-core/src/primitives/table.tsx delete mode 100644 frontend/ui-core/src/primitives/tabs.tsx delete mode 100644 frontend/ui-core/src/primitives/textarea.tsx delete mode 100644 frontend/ui-core/src/primitives/tooltip.tsx delete mode 100644 scripts/shadcn_add.sh delete mode 100644 scripts/shadcn_relativize.mjs diff --git a/frontend/ui-core/components.json b/frontend/ui-core/components.json deleted file mode 100644 index acca9a50..00000000 --- a/frontend/ui-core/components.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "radix-nova", - "rsc": false, - "tsx": true, - "tailwind": { "config": "", "css": "src/styles.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, - "iconLibrary": "lucide", - "rtl": false, - "aliases": { "components": "@/components", "utils": "@/lib/cn", "ui": "@/primitives", "lib": "@/lib", "hooks": "@/hooks" }, - "menuColor": "inverted", - "menuAccent": "subtle", - "registries": {} -} diff --git a/frontend/ui-core/package.json b/frontend/ui-core/package.json index 5e8c56a5..0384991e 100644 --- a/frontend/ui-core/package.json +++ b/frontend/ui-core/package.json @@ -21,8 +21,7 @@ "build": "tsc -p tsconfig.build.json", "test": "vitest run", "typecheck": "tsc -p tsconfig.json --noEmit", - "lint": "eslint src && pnpm run typecheck", - "shadcn:add": "bash ../../scripts/shadcn_add.sh" + "lint": "eslint src && pnpm run typecheck" }, "devDependencies": { "@eslint/js": "^10.0.1", @@ -44,20 +43,14 @@ "vitest": "^4.1.11" }, "dependencies": { - "@base-ui/react": "^1.7.0", - "@fontsource-variable/geist": "^5.3.0", + "@robomous/ui-core": "^0.1.0", "@tanstack/react-query": "^5.101.4", "@tanstack/react-virtual": "^3.14.10", "@visionset/annotator": "workspace:*", "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", "lucide-react": "^1.32.0", "openapi-fetch": "^0.17.0", - "radix-ui": "^1.6.7", - "shadcn": "^4.19.0", - "sonner": "^2.0.8", - "tailwind-merge": "^3.6.0", - "tw-animate-css": "^1.4.0" + "sonner": "^2.0.8" }, "peerDependencies": { "react": ">=19", diff --git a/frontend/ui-core/shadcn/README.md b/frontend/ui-core/shadcn/README.md deleted file mode 100644 index 30ebcd44..00000000 --- a/frontend/ui-core/shadcn/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# shadcn canonical snapshots - -Each file here is exactly what `shadcn@4.19.0 add ` wrote for this -package's `components.json` (radix-nova, preset b2iH), before the import -relativisation `scripts/shadcn_relativize.mjs` applies. `tests/scripts/shadcn_canonical.test.mjs` -holds every `src/primitives/.tsx` to its snapshot plus added lines only. -Regenerate with `pnpm --filter @visionset/ui-core shadcn:add `; never edit by hand. - -The gate matches the snapshot as an **ordered subsequence**, so a green run is a -strong signal rather than a proof: an edited line whose original text also appears -further down — including on a line that was added — still satisfies the match, and -the edit goes unreported. Read the diff when a primitive changes; the gate does not -stand in for that. diff --git a/frontend/ui-core/shadcn/alert.tsx b/frontend/ui-core/shadcn/alert.tsx deleted file mode 100644 index 8a84d989..00000000 --- a/frontend/ui-core/shadcn/alert.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" - -import { cn } from "@/lib/cn" - -const alertVariants = cva( - "group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", - { - variants: { - variant: { - default: "bg-card text-card-foreground", - destructive: - "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current", - }, - }, - defaultVariants: { - variant: "default", - }, - } -) - -function Alert({ - className, - variant, - ...props -}: React.ComponentProps<"div"> & VariantProps) { - return ( -
- ) -} - -function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { - return ( -
svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", - className - )} - {...props} - /> - ) -} - -function AlertDescription({ - className, - ...props -}: React.ComponentProps<"div">) { - return ( -
- ) -} - -function AlertAction({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -export { Alert, AlertTitle, AlertDescription, AlertAction } diff --git a/frontend/ui-core/shadcn/badge.tsx b/frontend/ui-core/shadcn/badge.tsx deleted file mode 100644 index fe855569..00000000 --- a/frontend/ui-core/shadcn/badge.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" -import { Slot } from "radix-ui" - -import { cn } from "@/lib/cn" - -const badgeVariants = cva( - "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80", - secondary: - "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80", - destructive: - "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20", - outline: - "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground", - ghost: - "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50", - link: "text-primary underline-offset-4 hover:underline", - }, - }, - defaultVariants: { - variant: "default", - }, - } -) - -function Badge({ - className, - variant = "default", - asChild = false, - ...props -}: React.ComponentProps<"span"> & - VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot.Root : "span" - - return ( - - ) -} - -export { Badge, badgeVariants } diff --git a/frontend/ui-core/shadcn/button.tsx b/frontend/ui-core/shadcn/button.tsx deleted file mode 100644 index 239fbb6b..00000000 --- a/frontend/ui-core/shadcn/button.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" -import { Slot } from "radix-ui" - -import { cn } from "@/lib/cn" - -const buttonVariants = cva( - "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/80", - outline: - "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50", - secondary: - "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground", - ghost: - "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50", - destructive: - "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: - "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", - xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3", - sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5", - lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", - icon: "size-8", - "icon-xs": - "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3", - "icon-sm": - "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg", - "icon-lg": "size-9", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - } -) - -function Button({ - className, - variant = "default", - size = "default", - asChild = false, - ...props -}: React.ComponentProps<"button"> & - VariantProps & { - asChild?: boolean - }) { - const Comp = asChild ? Slot.Root : "button" - - return ( - - ) -} - -export { Button, buttonVariants } diff --git a/frontend/ui-core/shadcn/card.tsx b/frontend/ui-core/shadcn/card.tsx deleted file mode 100644 index 94dbba32..00000000 --- a/frontend/ui-core/shadcn/card.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import * as React from "react" - -import { cn } from "@/lib/cn" - -function Card({ - className, - size = "default", - ...props -}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) { - return ( -
img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", - className - )} - {...props} - /> - ) -} - -function CardHeader({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardTitle({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardDescription({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardAction({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardContent({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardFooter({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -export { - Card, - CardHeader, - CardFooter, - CardTitle, - CardAction, - CardDescription, - CardContent, -} diff --git a/frontend/ui-core/shadcn/combobox.tsx b/frontend/ui-core/shadcn/combobox.tsx deleted file mode 100644 index 70a65e08..00000000 --- a/frontend/ui-core/shadcn/combobox.tsx +++ /dev/null @@ -1,299 +0,0 @@ -"use client" - -import * as React from "react" -import { Combobox as ComboboxPrimitive } from "@base-ui/react" - -import { cn } from "@/lib/cn" -import { Button } from "@/primitives/button" -import { - InputGroup, - InputGroupAddon, - InputGroupButton, - InputGroupInput, -} from "@/primitives/input-group" -import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react" - -const Combobox = ComboboxPrimitive.Root - -function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) { - return -} - -function ComboboxTrigger({ - className, - children, - ...props -}: ComboboxPrimitive.Trigger.Props) { - return ( - - {children} - - - ) -} - -function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) { - return ( - } - className={cn(className)} - {...props} - > - - - ) -} - -function ComboboxInput({ - className, - children, - disabled = false, - showTrigger = true, - showClear = false, - ...props -}: ComboboxPrimitive.Input.Props & { - showTrigger?: boolean - showClear?: boolean -}) { - return ( - - } - {...props} - /> - - {showTrigger && ( - - - - )} - {showClear && } - - {children} - - ) -} - -function ComboboxContent({ - className, - side = "bottom", - sideOffset = 6, - align = "start", - alignOffset = 0, - anchor, - ...props -}: ComboboxPrimitive.Popup.Props & - Pick< - ComboboxPrimitive.Positioner.Props, - "side" | "align" | "sideOffset" | "alignOffset" | "anchor" - >) { - return ( - - - - - - ) -} - -function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) { - return ( - - ) -} - -function ComboboxItem({ - className, - children, - ...props -}: ComboboxPrimitive.Item.Props) { - return ( - - {children} - - } - > - - - - ) -} - -function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) { - return ( - - ) -} - -function ComboboxLabel({ - className, - ...props -}: ComboboxPrimitive.GroupLabel.Props) { - return ( - - ) -} - -function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) { - return ( - - ) -} - -function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) { - return ( - - ) -} - -function ComboboxSeparator({ - className, - ...props -}: ComboboxPrimitive.Separator.Props) { - return ( - - ) -} - -function ComboboxChips({ - className, - ...props -}: React.ComponentPropsWithRef & - ComboboxPrimitive.Chips.Props) { - return ( - - ) -} - -function ComboboxChip({ - className, - children, - showRemove = true, - ...props -}: ComboboxPrimitive.Chip.Props & { - showRemove?: boolean -}) { - return ( - - {children} - {showRemove && ( - } - className="-ml-1 opacity-50 hover:opacity-100" - data-slot="combobox-chip-remove" - > - - - )} - - ) -} - -function ComboboxChipsInput({ - className, - ...props -}: ComboboxPrimitive.Input.Props) { - return ( - - ) -} - -function useComboboxAnchor() { - return React.useRef(null) -} - -export { - Combobox, - ComboboxInput, - ComboboxContent, - ComboboxList, - ComboboxItem, - ComboboxGroup, - ComboboxLabel, - ComboboxCollection, - ComboboxEmpty, - ComboboxSeparator, - ComboboxChips, - ComboboxChip, - ComboboxChipsInput, - ComboboxTrigger, - ComboboxValue, - useComboboxAnchor, -} diff --git a/frontend/ui-core/shadcn/dialog.tsx b/frontend/ui-core/shadcn/dialog.tsx deleted file mode 100644 index f1b8ae66..00000000 --- a/frontend/ui-core/shadcn/dialog.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import * as React from "react" -import { Dialog as DialogPrimitive } from "radix-ui" - -import { cn } from "@/lib/cn" -import { Button } from "@/primitives/button" -import { XIcon } from "lucide-react" - -function Dialog({ - ...props -}: React.ComponentProps) { - return -} - -function DialogTrigger({ - ...props -}: React.ComponentProps) { - return -} - -function DialogPortal({ - ...props -}: React.ComponentProps) { - return -} - -function DialogClose({ - ...props -}: React.ComponentProps) { - return -} - -function DialogOverlay({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DialogContent({ - className, - children, - showCloseButton = true, - ...props -}: React.ComponentProps & { - showCloseButton?: boolean -}) { - return ( - - - - {children} - {showCloseButton && ( - - - - )} - - - ) -} - -function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function DialogFooter({ - className, - showCloseButton = false, - children, - ...props -}: React.ComponentProps<"div"> & { - showCloseButton?: boolean -}) { - return ( -
- {children} - {showCloseButton && ( - - - - )} -
- ) -} - -function DialogTitle({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DialogDescription({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -export { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogOverlay, - DialogPortal, - DialogTitle, - DialogTrigger, -} diff --git a/frontend/ui-core/shadcn/dropdown-menu.tsx b/frontend/ui-core/shadcn/dropdown-menu.tsx deleted file mode 100644 index 98f8a975..00000000 --- a/frontend/ui-core/shadcn/dropdown-menu.tsx +++ /dev/null @@ -1,267 +0,0 @@ -import * as React from "react" -import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui" - -import { cn } from "@/lib/cn" -import { CheckIcon, ChevronRightIcon } from "lucide-react" - -function DropdownMenu({ - ...props -}: React.ComponentProps) { - return -} - -function DropdownMenuPortal({ - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DropdownMenuTrigger({ - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DropdownMenuContent({ - className, - align = "start", - sideOffset = 4, - ...props -}: React.ComponentProps) { - return ( - - - - ) -} - -function DropdownMenuGroup({ - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DropdownMenuItem({ - className, - inset, - variant = "default", - ...props -}: React.ComponentProps & { - inset?: boolean - variant?: "default" | "destructive" -}) { - return ( - - ) -} - -function DropdownMenuCheckboxItem({ - className, - children, - checked, - inset, - ...props -}: React.ComponentProps & { - inset?: boolean -}) { - return ( - - - - - - - {children} - - ) -} - -function DropdownMenuRadioGroup({ - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DropdownMenuRadioItem({ - className, - children, - inset, - ...props -}: React.ComponentProps & { - inset?: boolean -}) { - return ( - - - - - - - {children} - - ) -} - -function DropdownMenuLabel({ - className, - inset, - ...props -}: React.ComponentProps & { - inset?: boolean -}) { - return ( - - ) -} - -function DropdownMenuSeparator({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DropdownMenuShortcut({ - className, - ...props -}: React.ComponentProps<"span">) { - return ( - - ) -} - -function DropdownMenuSub({ - ...props -}: React.ComponentProps) { - return -} - -function DropdownMenuSubTrigger({ - className, - inset, - children, - ...props -}: React.ComponentProps & { - inset?: boolean -}) { - return ( - - {children} - - - ) -} - -function DropdownMenuSubContent({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -export { - DropdownMenu, - DropdownMenuPortal, - DropdownMenuTrigger, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuLabel, - DropdownMenuItem, - DropdownMenuCheckboxItem, - DropdownMenuRadioGroup, - DropdownMenuRadioItem, - DropdownMenuSeparator, - DropdownMenuShortcut, - DropdownMenuSub, - DropdownMenuSubTrigger, - DropdownMenuSubContent, -} diff --git a/frontend/ui-core/shadcn/field.tsx b/frontend/ui-core/shadcn/field.tsx deleted file mode 100644 index af7e4441..00000000 --- a/frontend/ui-core/shadcn/field.tsx +++ /dev/null @@ -1,236 +0,0 @@ -import { useMemo } from "react" -import { cva, type VariantProps } from "class-variance-authority" - -import { cn } from "@/lib/cn" -import { Label } from "@/primitives/label" -import { Separator } from "@/primitives/separator" - -function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) { - return ( -
[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", - className - )} - {...props} - /> - ) -} - -function FieldLegend({ - className, - variant = "legend", - ...props -}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) { - return ( - - ) -} - -function FieldGroup({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -const fieldVariants = cva( - "group/field flex w-full gap-2 data-[invalid=true]:text-destructive", - { - variants: { - orientation: { - vertical: "flex-col *:w-full [&>.sr-only]:w-auto", - horizontal: - "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px", - responsive: - "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px", - }, - }, - defaultVariants: { - orientation: "vertical", - }, - } -) - -function Field({ - className, - orientation = "vertical", - ...props -}: React.ComponentProps<"div"> & VariantProps) { - return ( -
- ) -} - -function FieldContent({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function FieldLabel({ - className, - ...props -}: React.ComponentProps) { - return ( -