diff --git a/.design-sync/EXTRACTION_SPEC.md b/.design-sync/EXTRACTION_SPEC.md new file mode 100644 index 000000000..acdac1859 --- /dev/null +++ b/.design-sync/EXTRACTION_SPEC.md @@ -0,0 +1,73 @@ +# Extraction spec for design-sync subagents + +You extract a **framework-agnostic** spec of shadcn-vue components for upload to claude.ai/design. +The design tool renders React, so we DO NOT ship runnable component code — only contracts, docs, and a +discoverable preview card. Everything you write must be derived by **reading** the real source under +`/home/corrin/src/docketworks/frontend/src/components/ui//` (the `.vue` files + `index.ts`). +Do not invent props, variants, or parts — read them from `defineProps`, the cva config in `index.ts`, +and the reka-ui primitive each part wraps. + +## For each assigned group, write THREE files + +Output dir: `/home/corrin/src/docketworks/.design-sync/ds-bundle/components///` +where `` is the PascalCase group name (e.g. `dropdown-menu` -> `DropdownMenu`, `button` -> `Button`). + +### 1. `.d.ts` — the API contract +- A TypeScript declaration for the component (and every exported sub-component/part). +- Export a `Props` interface (and per-part `XProps` interfaces) with the REAL prop names and types + read from each `.vue`'s `defineProps`/`withDefaults`. Resolve cva `VariantProps` into literal unions + (e.g. `variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'`). +- Include `class?: string` where the component forwards a class via `cn()`. +- Note slots in a JSDoc comment per component (`@slot default`, named slots if any). +- Re-export the cva helper type if one exists (e.g. `export type ButtonVariants = ...`). +- Keep it pure declarations — no implementation. + +### 2. `.prompt.md` — usage reference for the design agent +Sections, terse and concrete: +- **`# `** one-line description + when to use it. +- **Parts** — bullet list of the exported components from `index.ts` and what each is for. +- **Props** — the key props/variants/sizes with their literal values and defaults (from `defaultVariants`). +- **Usage** — ONE minimal composition example using the REAL import (`import { ... } from '@/components/ui/'`) + and the REAL component/part names and slot structure. Vue SFC ` +``` + +## Notes + +- Plain `
`, no reka-ui primitive. No title/description sub-components in this kit — author them as child elements. +- A direct child `` is treated as the alert icon (absolute-positioned); keep it as the first child. +- Forwards unknown attributes onto the root div via `v-bind`. diff --git a/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.d.ts b/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.d.ts new file mode 100644 index 000000000..ab110366f --- /dev/null +++ b/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.d.ts @@ -0,0 +1,36 @@ +import type { AvatarFallbackProps, AvatarImageProps } from 'reka-ui' + +export interface AvatarProps { + /** Extra classes merged via cn(). */ + class?: string +} + +/** + * Avatar — root container (reka-ui AvatarRoot). + * Default geometry: size-8 (2rem) circle, overflow-hidden. + * @slot default — expects and/or . + */ +export declare const Avatar: import('vue').DefineComponent + +/** + * AvatarImage — the photo (reka-ui AvatarImage). + * Hidden until the src loads; shows AvatarFallback meanwhile/on error. + */ +export interface AvatarImageProps_ extends AvatarImageProps { + /** Image source URL (reka-ui). */ + src?: string +} +export declare const AvatarImage: import('vue').DefineComponent + +/** + * AvatarFallback — shown while the image is loading or has failed + * (reka-ui AvatarFallback). Typically initials. + * @slot default — fallback content (initials / icon). + */ +export interface AvatarFallbackProps_ extends AvatarFallbackProps { + /** Delay (ms) before fallback renders, to avoid flash (reka-ui). */ + delayMs?: number + /** Extra classes merged via cn(). */ + class?: string +} +export declare const AvatarFallback: import('vue').DefineComponent diff --git a/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.html b/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.html new file mode 100644 index 000000000..701c5bdd2 --- /dev/null +++ b/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.html @@ -0,0 +1,35 @@ + + +
+

Avatar

+
Circular image + initials fallback · default size 32px
+
+
AB
+
JD
+
CL
+
+
+
diff --git a/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.prompt.md b/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.prompt.md new file mode 100644 index 000000000..446efe190 --- /dev/null +++ b/.design-sync/ds-bundle/components/avatar/Avatar/Avatar.prompt.md @@ -0,0 +1,38 @@ +# Avatar + +A circular user/entity image with an initials fallback. Use for profile photos, staff lists, comment authors. + +## Parts + +- **Avatar** — root container (`AvatarRoot`). Fixed circle, `size-8` (32px), `overflow-hidden rounded-full`. Resize via `class` (e.g. `class="size-10"`). +- **AvatarImage** — the `` (`AvatarImage`). `aspect-square size-full`. Hidden until `src` loads. +- **AvatarFallback** — initials/icon shown while loading or on error (`AvatarFallback`). `bg-muted`, centered, full-size circle. + +## Props + +- **Avatar**: `class?: string`. +- **AvatarImage**: `src?: string` (+ reka-ui AvatarImageProps); no `class` prop forwarded. +- **AvatarFallback**: `delayMs?: number` (delay before showing, avoids flash), `class?: string`. + +No variant/size axes — geometry is set via Tailwind `class`. + +## Usage + +```vue + + + +``` + +## Notes + +- Backed by reka-ui `AvatarRoot` / `AvatarImage` / `AvatarFallback`. Fallback visibility is managed by the primitive based on image load state. +- `AvatarImage` and `AvatarFallback` must be inside `Avatar`. +- Default size is 32px; override on the root with `class`. diff --git a/.design-sync/ds-bundle/components/badge/Badge/Badge.d.ts b/.design-sync/ds-bundle/components/badge/Badge/Badge.d.ts new file mode 100644 index 000000000..57a0df672 --- /dev/null +++ b/.design-sync/ds-bundle/components/badge/Badge/Badge.d.ts @@ -0,0 +1,27 @@ +import type { VariantProps } from 'class-variance-authority' +import type { PrimitiveProps } from 'reka-ui' + +declare const badgeVariants: (props?: { + variant?: 'default' | 'secondary' | 'destructive' | 'outline' +}) => string + +export type BadgeVariants = VariantProps + +export interface BadgeProps extends PrimitiveProps { + /** Visual style. @default 'default' */ + variant?: 'default' | 'secondary' | 'destructive' | 'outline' + /** Extra classes merged via cn(). */ + class?: string + /** PrimitiveProps: render as child element instead of . @default false */ + asChild?: boolean + /** PrimitiveProps: element/component to render as. */ + as?: PrimitiveProps['as'] +} + +/** + * Badge — a small inline status/label pill. + * Renders a reka-ui (default tag is the kit's wrapper). + * + * @slot default — badge label; a leading is sized to 12px (size-3). + */ +export declare const Badge: import('vue').DefineComponent diff --git a/.design-sync/ds-bundle/components/badge/Badge/Badge.html b/.design-sync/ds-bundle/components/badge/Badge/Badge.html new file mode 100644 index 000000000..010174ae8 --- /dev/null +++ b/.design-sync/ds-bundle/components/badge/Badge/Badge.html @@ -0,0 +1,35 @@ + + +
+

Badge

+
Status pill · variants: default, secondary, destructive, outline
+
+ Default + Secondary + Destructive + Outline +
+
diff --git a/.design-sync/ds-bundle/components/badge/Badge/Badge.prompt.md b/.design-sync/ds-bundle/components/badge/Badge/Badge.prompt.md new file mode 100644 index 000000000..b782df86d --- /dev/null +++ b/.design-sync/ds-bundle/components/badge/Badge/Badge.prompt.md @@ -0,0 +1,37 @@ +# Badge + +A small inline pill for status, counts, or labels (e.g. "Active", "3", "Draft"). Use beside text/headings, in table cells, or on cards — not for interactive buttons. + +## Parts + +- **Badge** — the only exported part. Renders a reka-ui `` wrapped in a ``. Pass `as` / `asChild` to render as a link (``) — hover styles for anchors are built in (`[a&]:hover:...`). + +## Props + +- `variant?: 'default' | 'secondary' | 'destructive' | 'outline'` — default `'default'`. + - `default`: `bg-primary text-primary-foreground`. + - `secondary`: `bg-secondary text-secondary-foreground`. + - `destructive`: `bg-destructive text-white`. + - `outline`: transparent, `text-foreground`, bordered; hover tints accent (anchors only). +- `as?` / `asChild?` — reka-ui PrimitiveProps for polymorphic rendering. +- `class?: string` — extra classes (merged with `cn()`). + +Geometry: `inline-flex rounded-md border px-2 py-0.5 text-xs font-medium w-fit`; leading icons are `size-3` with `gap-1`. + +## Usage + +```vue + + + +``` + +## Notes + +- Backed by reka-ui `Primitive`; default element is a ``. +- For a clickable badge, use `as="a"` (or `asChild` with a router-link) so the anchor hover variants apply. +- Icon-only or icon+text supported; SVGs are auto-sized to 12px and non-interactive. diff --git a/.design-sync/ds-bundle/components/button/Button/Button.d.ts b/.design-sync/ds-bundle/components/button/Button/Button.d.ts new file mode 100644 index 000000000..ae2c4d400 --- /dev/null +++ b/.design-sync/ds-bundle/components/button/Button/Button.d.ts @@ -0,0 +1,35 @@ +import type { PrimitiveProps } from 'reka-ui' + +/** + * Button — the primary action control. + * Backed by reka-ui `Primitive`, so it is polymorphic: renders a `