Docker / build (push) Failing after 1m43s
Import this repo's components into a Claude Design project so the design
agent builds with the real Cloudrite library instead of generic components.
The repo is a Next.js app, not a component library: no dist/, no exports
map, no .d.ts tree, and Tailwind exists only as build directives. So
.design-sync/ carries a small build that manufactures a consumable package
from source (staged to the gitignored .ds-pkg/):
- tsconfig.dts.json declaration emit, for real <Name>Props contracts
- build-css.mjs Tailwind v4 -> a static stylesheet via @tailwindcss/postcss
- make-pkg.mjs stages the package; index.js exports all 292 symbols
while index.d.ts exports only the 61 roots, so shadcn's
flat compound parts don't each become a preview card.
Also generates the per-root parts tables in docs/
- shims/next-link router-free anchor; the real next/link needs
AppRouterContext and drags in the App Router runtime
- fonts/ Space Grotesk + Inter woff2 (SIL OFL). next/font supplies
these at runtime in the app, so the bundle has none
previews/ holds 40 authored preview stories, conventions.md is prepended to
the generated README as the design agent's usage guide, and NOTES.md records
the gotchas a future sync would otherwise rediscover.
Co-Authored-By: Claude Opus 5 <[email protected]>
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
import { Toggle } from 'cloudrite';
|
|
import { Bold, Italic, Underline } from 'lucide-react';
|
|
|
|
// Cloudrite is dark-only — foreground-coloured text and `border-border` are
|
|
// invisible on the preview harness's white card body. Stories render on the
|
|
// brand surface, which is also how a real screen is built.
|
|
const Surface = ({ children }: { children: ReactNode }) => (
|
|
<div className="bg-background text-foreground rounded-lg p-6">{children}</div>
|
|
);
|
|
|
|
export const States = () => (
|
|
<Surface>
|
|
<div className="flex items-center gap-2">
|
|
<Toggle aria-label="Bold">
|
|
<Bold />
|
|
</Toggle>
|
|
<Toggle defaultPressed aria-label="Italic">
|
|
<Italic />
|
|
</Toggle>
|
|
<Toggle disabled aria-label="Underline">
|
|
<Underline />
|
|
</Toggle>
|
|
</div>
|
|
</Surface>
|
|
);
|
|
|
|
export const Outline = () => (
|
|
<Surface>
|
|
<div className="flex items-center gap-2">
|
|
<Toggle variant="outline">Auto-renew</Toggle>
|
|
<Toggle variant="outline" defaultPressed>
|
|
Maintenance mode
|
|
</Toggle>
|
|
</div>
|
|
</Surface>
|
|
);
|
|
|
|
export const Sizes = () => (
|
|
<Surface>
|
|
<div className="flex items-center gap-2">
|
|
<Toggle size="sm" defaultPressed aria-label="Small">
|
|
<Bold />
|
|
</Toggle>
|
|
<Toggle size="default" defaultPressed aria-label="Default">
|
|
<Bold />
|
|
</Toggle>
|
|
<Toggle size="lg" defaultPressed aria-label="Large">
|
|
<Bold />
|
|
</Toggle>
|
|
</div>
|
|
</Surface>
|
|
);
|