@recanica/mcp 0.0.0-stage → 0.2.0
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.
- package/LICENSE +9 -0
- package/README.md +25 -2
- package/data/recanica.json +1 -0
- package/package.json +47 -3
- package/src/index.js +213 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"0.2.0","builtAt":"2026-11-30T05:01:53.672Z","site":"https://recanica.aturanica.com","rules":"# Recanica — design rules\nRecanica is the UI framework by Aturanica Labs. Visual reference: Polar's dashboard (calm, dark-first product UI).\n\n## Identity: calm is mandatory, colour is a project choice\n- **Calm (every project):**\n - a neutral base (background, panels, text in grays)\n - hierarchy from value (foreground vs muted), size and spacing, not from colour\n - colour is used sparingly and always means something\n- **Colour budget:**\n - neutrals\n - ONE brand colour (`--brand` / `--brand-foreground`), used for the primary action, focus and at most one highlight per screen\n - status colours (success, warning, destructive) only to communicate state, usually as a 10–15% tint\n - no extra hues, no rainbow charts, no gradients\n- **Recanica's own theme is monochrome:** brand = black in light mode, silver in dark. A project sets its own brand colour by overriding `--brand` and `--brand-foreground`, and keeps everything else.\n- **Dark mode:** it is the default. Light mode is fully supported via the same semantic tokens.\n- **One brand moment per screen:** primary CTA, logo mark, or one hero number. Never all three.\n\n## Color tokens (semantic; hex for light / dark)\n| Token | Light | Dark |\n|---|---|---|\n| --background | #ffffff | #020202 |\n| --foreground | #0d0d0d | #fafafa |\n| --surface | #fafafa | #0d0d0d |\n| --panel | #ffffff | #0d0d0d |\n| --card | #ffffff | #0d0d0d |\n| --card-foreground | #0d0d0d | #fafafa |\n| --popover | #ffffff | #161616 |\n| --popover-foreground | #0d0d0d | #fafafa |\n| --primary | #0d0d0d | #fafafa |\n| --primary-foreground | #fafafa | #0d0d0d |\n| --secondary | #f4f4f4 | #161616 |\n| --secondary-foreground | #161616 | #f4f4f4 |\n| --muted | #f4f4f4 | #161616 |\n| --muted-foreground | #737373 | #8c8c8c |\n| --accent | #f4f4f4 | #161616 |\n| --accent-foreground | #161616 | #fafafa |\n| --brand | #161616 | #cfd1d4 |\n| --brand-foreground | #ffffff | #0d0d0d |\n| --destructive | #db4241 | #ea6a6a |\n| --destructive-foreground | #ffffff | #ffffff |\n| --success | #46a16b | #46a16b |\n| --warning | #dda552 | #dda552 |\n| --border | #e5e5e5 | #1e1e1e |\n| --input | #e5e5e5 | #262626 |\n| --ring | #737373 | #afb1b4 |\n| --sidebar | #f4f4f4 | #020202 |\n| --sidebar-foreground | #737373 | #8c8c8c |\n| --sidebar-accent | #e5e5e5 | #161616 |\n| --sidebar-border | #e5e5e5 | #1e1e1e |\n| --sidebar-primary | #0d0d0d | #fafafa |\n| --sidebar-primary-foreground | #ffffff | #0d0d0d |\n| --sidebar-accent-foreground | #0d0d0d | #fafafa |\n| --sidebar-ring | #737373 | #afb1b4 |\n| --chart-1 | #0d0d0d | #fafafa |\n| --chart-2 | #404040 | #cfd1d4 |\n| --chart-3 | #737373 | #8a8c90 |\n| --chart-4 | #a1a1a1 | #525252 |\n| --chart-5 | #d4d4d4 | #404040 |\n\nRules: components only use semantic tokens (bg-panel, text-muted-foreground, bg-brand, border…). Never hard-code hex in components. A project changes colour by overriding tokens (usually just --brand), never by adding hues in components.\n\nAdopting Recanica on an existing site: map the old colour variables onto Recanica's tokens or delete them. Never re-declare a semantic name (--muted, --card, --ring, --border …) with a different meaning, and never define a variable from itself (`--ring: var(--ring)` is invalid and silently disables everything that uses it). Gradient artwork that is the product is not interface colour: record it as an accepted deviation (recanica.config.json \"allow\" with a \"file\" glob), not with ad-hoc ignores. See docs/guides/migrate-existing.md.\n\n## Surfaces & depth\nDepth comes from stacked surfaces and 1px hairline borders, not shadows:\nbackground (page + sidebar) → panel (inset rounded-2xl content area, 8px from the viewport edge) → card → accent (hover / active / selected).\nShadows only on floating layers: popovers, menus, dialogs, toasts.\n\n## Typography\n- **Font:** the project's choice. Set `--font-sans` (UI) and `--font-mono` (code, IDs). Recanica's default is Geist Sans / Geist Mono, with system-ui as the fallback.\n- **What the font needs:**\n - a calm, readable sans with light (300) and regular (400) weights\n - tabular numerals for aligned figures\n - good legibility at 12–14px\n - one family for the UI; a display face only for marketing headlines, if at all\n- Weights: 300 light (big numbers), 400 regular (almost everything), 500 medium (buttons only). NEVER semibold or bold.\n- Product scale: metric 40px light (stat values) · title 30px (page title) · heading 24px (section) · base 16 · sm 14 (default UI text) · xs 12 (meta).\n- Landing scale: display-lg 64 · display-md 48 · display-sm 36, letter-spacing −0.02 to −0.035em, step down on mobile.\n- No lone last words: a heading never ends on a single word. Headings balance their lines (`text-wrap: balance`), paragraphs avoid a one-word last line (`text-wrap: pretty`); Recanica's base styles set both.\n- Sentence case everywhere. tabular-nums for any aligned numbers.\n\n## Spacing & layout\n- **Page structure comes from shared parts, never hand-built:**\n - apps: `Page`, `PageHeader`, `Section`, `Heading`, `Stack`, `ReferenceTable`\n - sites: `WebSection`, `WebSectionTitle`, `WebHeroTitle`\n\n They carry the rhythm tokens by role: `group` 12 · `flow` 20 · `stack` 40 · `section` (page bands) · `inset` (inside surfaces). A page composes them and never sets its own heading styles or block margins.\n- **Single source for layout decisions:** containers own spacing and width; blocks don't.\n - Stack blocks in a `.flow` column. It applies `--spacing-flow` between blocks and `--spacing-stack` before headings.\n - Or use `gap-*` / `space-y-*` on the parent.\n - Never put margins on individual blocks to space them.\n - Reading pages put the whole column in `.reading`, so text, tables and cards share one right edge.\n - Text emphasis follows role: main content in foreground, supporting text muted.\n- 4px grid. Inside components use 4–24px; between groups 32–48px.\n- Layout tokens: gutter clamp(16px, 3vw, 40px) · section clamp(64px, 10vw, 128px) · panel padding 28px · stack gap 40px · sidebar 240px · containers 1152 / 768 / 640px.\n- Mobile-first. Breakpoints sm 640 · md 768 · lg 1024 · xl 1280. Sidebars become a slide-over sheet below md. Tab lists scroll horizontally instead of wrapping. Tables hide secondary columns before they scroll. Primary actions are full width on phones.\n\n## Shape\n- Base radius 12px. Buttons, icon buttons, tabs/segmented controls, badges, avatars: fully rounded pills.\n- Inputs and menu items 10–16px. Cards, panels, dialogs, stat groups 20px (rounded-2xl). CTA/hero frames 24px.\n\n## Components & patterns\n- **Reuse, never rebuild:**\n - every element comes from a shared part, used as it is (props and variants, no class overrides)\n - if a part doesn't fit, change the part\n - writing the same thing twice means a part is missing\n - hand-built buttons, inputs, selects, tables, cards and headings fail `recanica check`\n- **Two forms of the same parts:**\n - React projects use the components.\n - Other stacks use `@recanica/css` classes, named prefixed-BEM: `rc-block`, `rc-block__element`, `rc-block--modifier` (e.g. `rc-section__title`, `rc-btn--brand`), plus layout helpers `rc-flow` and `rc-reading`.\n - Name a part after what it is, never where it's used.\n - A repeated class string means a part is missing: add it, in both forms.\n - The CSS form is the contract; React is one adapter. A look (a slot, a modifier, a responsive behaviour) goes into `@recanica/css` first, and an adapter only maps props to those classes. If the React part can do something its `rc-*` twin can't, the CSS is missing it.\n- Built on Radix primitives + Tailwind CSS v4 + class-variance-authority, shadcn/ui-style API (function components, data-slot, className passthrough).\n- Buttons: variants default (inverted), brand (bg-brand text-brand-foreground), secondary, outline, ghost, link, destructive. Pill shape. Height 36px default, 44px large.\n- Stat panels (signature dashboard pattern): several stats share ONE bordered rounded-2xl container split by hairline dividers. Each stat: small label + \"View all →\" link, a 40px light number with a muted caption (\"$48 November\"), then rows: either thin 2px progress bars (BarRow) or list rows with muted secondary text (\"Order paid · Nadia\" … \"2h ago\").\n- App shell: page-colored sidebar (logo mark, nav with muted items and a softly filled active item, nested sub-nav with a left rule, promo card, account switcher at the bottom) next to an inset rounded panel holding the page.\n- Empty states: icon in a soft circle, title, one-line muted description, one pill action.\n- Icons: lucide, 16px default, 14px inline meta, 20px feature tiles, stroke 2, currentColor.\n- Motion: 150ms hovers, 200ms menus, 300ms sheets/dialogs, easing cubic-bezier(0.22, 1, 0.36, 1). Respect prefers-reduced-motion.\n\n## Voice & copy\n- Plain, specific, short. Say what happens, with numbers where you have them: \"Most invoices are paid within 3 days\", not \"Get paid faster\".\n- Write for the actual reader (a shop owner in Penang, a finance admin), not \"teams of all sizes\".\n- Banned: seamless, unlock, elevate, leverage, empower, effortless, cutting-edge, game-changer, supercharge, streamline, robust, delve, \"in today's … world\", \"whether you're X or Y\", \"not just X, it's Y\", \"in minutes, not months\", \"built for the way you…\", \"on autopilot\".\n- **Eyebrows** (small labels above a heading): only when they add information the heading doesn't, such as a date, a status or where you are on a long page. At most once or twice per page; never on every section or tile. Never restate the headline.\n- No placeholder copy in shipped sections. No invented statistics or testimonials in production; sample data must be marked as sample.\n- Buttons are verbs that say what happens: \"Send invoice\", \"Pay RM 9,720\", not \"Submit\" or \"Continue\".\n- Errors say what went wrong and what to do next. Empty states say what will appear and give one action.\n- Locale is the project's: format money, dates and numbers with the project's locale (Intl.NumberFormat / DateTimeFormat), and use names and places your users recognise. Recanica's demos use Malaysian defaults (RM, DD/MM/YYYY, SST, FPX/DuitNow) as an example, not a rule.\n\n## No generated-UI defaults (design slop)\nGenerated UI falls back to the same look everywhere. None of it is Recanica, and `recanica check` / `recanica slop` flag it:\n- glass cards (backdrop blur on a see-through background), glows, decorative blur blobs behind heroes\n- gradient or clipped text, emoji used as icons or bullets, the sparkle icon for anything \"AI\"\n- looping animation outside loading states (pulse, bounce, ping), heavy shadows on surfaces\n- three identical feature cards because the layout had three slots; filling every optional slot (eyebrows, badges, icons)\n\nCopy has its own list: AI jargon, hype, chat-assistant phrasing left in the UI, and link text that doesn't say where it goes. Check your own words before you\nwrite them: `npx recanica slop --text \"…\"` or MCP `check_copy`. The checker finds generic phrasing; whether copy is specific to\nthe reader is still your job.\n\n## Project setup: kickoff, flexibility and scope\n- **Every new project starts with the kickoff questionnaire** (`npx recanica kickoff`, MCP `get_kickoff_questions`), asked of a\n person, before any page. It records the role, the UI scope, the stack, how strict the system is and what \"done\" means.\n- **Flexibility:** `locked` (product UI at scale: every deviation is a recorded decision), `guided` (default: reuse and\n structure enforced, style deviations allowed with a reason) or `open` (art-directed work: composition free). Tokens are\n fixed in every mode. An `open` zone can loosen one area (a campaign folder) while the rest stays strict.\n- **Stack:** a decision, not a default. If it isn't chosen yet, build CSS-first with `rc-*` parts (docs/STACKS.md).\n\n## Working inside a bigger build (guest projects)\nOften the UI is one part of someone else's product. Then Recanica is a guest:\n- Change only the paths in `recanica.config.json` → `scope.owns`. Checks block the build there and only advise elsewhere.\n- Don't touch build config, routing, data, state, APIs, dependencies, CI or other teams' tests without asking.\n- Fit the project's conventions (naming, imports, formatting, tests) over Recanica's.\n- Suggest, don't impose: UI/UX problems you notice outside your scope go in `docs/ui/PROPOSALS.md` with where, what you saw,\n the suggestion, evidence and effort. At most three per task, raised at the end of it.\n\n## Decisions and traps (the decision log)\n`docs/ui/DECISIONS.md` holds the UI/UX decisions in force (`D-`) and the mistakes already caught (`T-`).\n- Before UI work, read it: `npx recanica decisions brief`. Follow what's in force.\n- Decided something a later page could get wrong? Add a `D-` entry: decision, why (the reader, content, evidence or\n constraint; \"better UX\" is not a reason), what you rejected, and a guard.\n- Caught a mistake? Fix it in the shared part, then add a `T-` entry for the class of mistake with a mechanical guard\n (`rule:`, `pattern:/…/ in <glob>` or `test:`). Pattern guards run in `recanica check`, so it can't come back quietly.\n- Changing your mind? Add a new entry that supersedes the old one. Never just do something else.\n\n## Workflow: mockup first\nFor any new project, new page or major redesign, do not start in production code.\n1. **Ask** what the page is for, who uses it, and the one action that matters most. Ask about brand and must-have content.\n2. **Mockup**: assemble a quick throwaway version from existing Recanica patterns, sections and recipes (MCP `get_recipe`, `get_page_library`, `list_patterns`), with realistic sample data. A single route or HTML file is enough.\n3. **Review it with the user**: list what you included, what you left out, and two or three open questions. Mark each section keep / change / remove.\n4. **Build** only what was kept, in the real codebase, using the same patterns.\n5. **Check** before calling it done: `npx recanica check` (no off-brand colours, weights, gradients, copy), then view it at 375px, ~900px and 1280px and inside a narrow container.\nSkip the mockup only for small edits to an existing, already-approved screen.\n\n## Existing projects: rework, not reskin\nSwapping colours is not adopting Recanica. Recanica is also how pages are built: fewer, calmer, one thing at a time.\n1. **Review**: `npx recanica review <dev-url> --crawl` measures what makes each page busy and writes `recanica-review.md`. Each busy signal comes with the Recanica fix, plus the closest Recanica pattern for each page.\n2. **Decide per page with the user**: what the page is for, the one action that matters, and keep / change / remove for each element. Removing and merging is expected, not a failure.\n3. **Rebuild** each page from its pattern (Page Header → content → one primary action), using Recanica components. Don't restyle the old markup.\n4. **Verify**: `npx recanica review` shows no busy signals on reworked pages; `npx recanica check` and `npx recanica audit` pass.\n\nWhat makes a good page (scored 0–100 by `recanica review`, target 85+, nothing under 70):\n- **Clarity:** a visible title, and on task pages the main action on the first screen.\n- **Hierarchy:** one focal element, with the title at least 1.4× the body size.\n- **Calm:** the busy signals below.\n- **Consistency:** Recanica tokens and shapes, so the same component renders the same.\n- **Readability:** AA contrast, lines of 90 characters at most, nothing under 12px.\n- **Layout:** few alignment edges, the 4px spacing grid, no overlap.\n- **Usability:** verb labels, the current page marked, errors under their fields, visible focus.\n- **Responsiveness:** works at 375px.\n\nThen watch 3–5 real users do the main task.\n\nBusy signals and their fixes:\n- More than one primary button on a screen: one primary; others outline/ghost or a ••• menu.\n- More than ~18 actions on the first screen: show the 3–5 most used, the rest in menus.\n- More than 6 text sizes (7 with a hero): title, body, small, metric.\n- Cards inside cards inside cards: one bordered surface per group; inner groups use spacing and headings.\n- A border around every item: one container with hairline dividers.\n- More than 8 badges: badges only for changing status.\n- Tables over 6 columns: hide secondary columns, or use List / detail.\n- Forms over 10 fields without sections: titled sections, or steps.\n- Nav runs over 15 items: group them, or use a More menu.\n- Text under 12px, or a page without a title: never.\n\n## Layout: how to decide (in this order)\n1. **Purpose:** what the page is for, who uses it, the one main action, and what they must see first. Agree it in the mockup.\n2. **Page type → pattern:** match the page to the page library (overview, list, detail, form, settings, marketing recipe) and start from that pattern. Don't invent a layout.\n3. **Order by importance and sequence:**\n 1. title and main action\n 2. key information (numbers, status)\n 3. the working area (table, form, editor)\n 4. details and secondary content\n 5. rare and destructive actions last\n4. **Group by meaning:** related things share one surface; unrelated groups are separated by space, not more borders.\n5. **Show by frequency:** daily actions visible; occasional ones in a menu; details behind a click (progressive disclosure).\n6. **Size from content, not the screen.** Decide width per column, not per element: on a reading page the whole column gets a reading width, so text, tables and cards share one right edge.\n - forms: one column, ≤ 640px\n - a block narrower than the page column (pricing, FAQ, a short form on a marketing page) is centred as one unit (title, content and note together), or it fills the column. Never a narrow block against the left edge that leaves an empty strip on the right next to full-width sections. React: `<WebSection align=\"center\">`; CSS: `.rc-web-section--center`.\n - reading text: ~65ch\n - tables: full content width\n - multi-column grids: only for comparable items\n - detail: a side panel or its own page\n7. **Decide how each block adapts:** stack, wrap, scroll, More menu or sheet. Check at 240/400px containers and 375/900/1280px screens.\n8. **Verify:** review the mockup with the user, then `recanica review`.\n\n## Page composition\n- Websites: start from a recipe (MCP `get_recipe`, or the Web Library recipes) and swap sections rather than inventing layouts.\n- Dashboards: check the page library (MCP `get_page_library`) for the page type before designing one.\n\n## Responsive behaviour (any width, any container)\n- Components respond to their container, not just the viewport: use container queries (`@container`, `@md:`) for cards, stats, headers and toolbars that can sit in narrow columns.\n- Buttons, badges, tabs, nav items and table headers never wrap: `whitespace-nowrap`. When space runs out, change the form instead: actions wrap as a group onto a new row, nav items move into a \"More\" menu or a sheet, tables scroll inside their own frame.\n- Nothing overflows the page. Long text truncates (`truncate`, with the full text in a title/tooltip) or wraps as prose; it never pushes layout wider.\n- No fixed-width label columns (`w-8`, `w-24`): size label columns to their content with a cap (`fit-content(40%)`) and truncate, so a long label never runs into the next element.\n- Labels and values sit side by side when there is room and stack cleanly (label above value) when there is not, never squeezed into one word per line.\n- Navigation: side nav (hideable, ⌘B) for dashboards with many sections; top nav with priority+ \"More\" overflow for few flat sections; a sheet below 768px. See the Navigation foundation.\n\n## Showcases, galleries and demos\n- Each section, block or template page gets its own page, rendered in an isolated frame (its own route or iframe) with mobile / tablet / desktop widths and previous / next. The index is a grid of thumbnails.\n- Never stack unrelated full-width sections in one long scroll: their spacing, widths and fixed or sticky parts collide.\n- Don't group when groups would hold one item; use a flat grid with the category as a caption.\n- Every demo page can reach every other page (a floating page menu) and has a visible way back to the docs.\n- No `href=\"#\"`: link to a real page, or leave the link out.\n\n## Forms & validation\n- Invalid fields are highlighted: destructive border, faint destructive tint and ring. Set `data-invalid` on the Field (controls pick it up) or `aria-invalid` on the control.\n- Messages are small tinted notices under the field, by intent: error (destructive tint), warning, success, info (muted). One short sentence saying what to fix.\n- On submit, move focus to the first invalid field and show a summary notice at the top for long forms. Never only disable the submit button.\n\n## Do\n- Use value contrast (foreground vs muted-foreground) for hierarchy.\n- Keep one primary action per view; everything else outline/ghost.\n- Pair a light big number with a small muted caption.\n- Group related metrics in one bordered container with dividers.\n\n## Don't\n- No bold, no ALL CAPS labels, no colored backgrounds, no gradients.\n- No wrapped button or nav labels, no horizontal page scroll, no text squeezed into narrow columns.\n- No drop shadows on cards or panels.\n- No new accent hues, no emoji as UI.\n\n\n## The AI-slop list\n\nThe defaults generated UI falls back to, and what Recanica does instead. `recanica check`, `slop` and `guard` catch the ones marked *code* on every change (the Claude Code Stop hook and the pre-commit hook run them). `recanica audit` catches the *page* ones on the rendered page. The *review* ones need a person.\n\nA deliberate exception gets `recanica-ignore: <reason>` on the line, so the reason is in the diff.\n\n## Headers and labels\n\n| Slop | Instead | Caught |\n|---|---|---|\n| Small text above a heading (an eyebrow: “Features”, “Pricing”, “Overview”) | Delete it. The heading already says it. Keep one only when it adds a fact the heading doesn't (a date, a status, where you are), at most once per page. | code |\n| Numbers as decoration: 01, 02, 03 on sections, cards, features or calls to action | Drop the numbers. Number only a real sequence people follow (steps of a process), start at 1, not 01, and use the Steps part. | code, fails |\n| Legal-style section signs in headings and subtitles: §3, § 4 | Use the heading itself. People don't navigate a product page by section number. | code, fails |\n| Pills and labels inside headings and table headers (“New”, “Beta”, “Pro”, counts) | Remove it. A heading names the thing; a table header names the column. Put real status in the row it belongs to. | code, fails |\n| Pills on everything: categories, metadata and labels all drawn as badges | A badge is only for status that changes (Paid, Overdue). Categories and metadata are plain muted text. The page audit also counts them on screen (limit 8). | code |\n| Title Case On Every Heading And Button | Sentence case. Capitals only for names. | code |\n\n## Layout and navigation\n\n| Slop | Instead | Caught |\n|---|---|---|\n| A row of pills used to filter a table or list | Use Tabs for two to five views, a Select or filter menu for more, ToggleGroup for on/off filters. They show the current state and work with the keyboard. | code |\n| Everything on one page: every section, table, form and setting stacked in one scroll | One page, one job. Move details to a details page, a focused task to a Dialog or Sheet, related views into Tabs. | code |\n| Everything centred: hero, headings, body text and buttons | Left-align text people read. Centre only a short hero or an empty state. | code |\n| The default hero: big centred headline, one-line subtitle, two equal buttons (“Get started”, “Learn more”), a blob behind | Lead with what the product does for this reader, one primary action, and real proof (a screenshot, a number with a source). | review |\n| Three or four identical cards in a row (icon, title, two lines), repeated section after section | Use the shape the content needs: a list, a table, a comparison, one strong example. Cards only for things people pick or open. | review |\n| A card around every paragraph, cards inside cards | Stack surfaces in layer order (background → panel → card). Text sits on the surface; it doesn't need its own box. | page |\n\n## Surfaces and colour\n\n| Slop | Instead | Caught |\n|---|---|---|\n| A coloured or thick stripe on one side of a card, alert, pop-up, modal or guide | No one-sided borders. Surfaces get the hairline border all round; status is said in words and an icon, colour only on the status itself. | code, fails |\n| An icon in a tinted circle or square above every heading or feature | Use the icon inline at 16px in currentColor, or no icon. An icon earns its place when it helps someone find something. | code |\n| Gradients: purple-to-blue heroes and buttons, gradient text, rainbow borders | Flat surfaces and one brand colour, used once where it matters. | code |\n| Glass cards, glows, neon accents on black, blur blobs behind the hero | Depth from stacked surfaces and hairline borders. Shadows only on floating layers (menus, dialogs, toasts). | code |\n| Emoji as icons, bullets or heading prefixes (🚀 ✨ 💡), and the sparkle icon for anything AI | A lucide icon for the action, or nothing. | code |\n| Decorative sparklines and mini charts with made-up data; a status dot on every row | Show a chart only with real data and a question it answers. Status dots only where status changes. | review |\n\n## Motion\n\n| Slop | Instead | Caught |\n|---|---|---|\n| transition-all on everything | Animate only the property that changes (colors, opacity, transform), 150 to 300ms. | code |\n| Everything fades or slides up as you scroll | Content is just there. Motion explains a change someone made. | code |\n| Every card and image zooms on hover | A hover state changes colour or border. Zoom only where the image itself is the thing being inspected. | code |\n| Bouncing arrows, pulsing dots, spinning rings that mean nothing | Looping motion only for loading (Skeleton, Spinner). | code |\n\n## Copy and content\n\n| Slop | Instead | Caught |\n|---|---|---|\n| AI phrasing: seamless, unlock, elevate, leverage, empower, the power of, not just X it's Y, whether you're | Say what happens, with a number or a real noun. Check your words: npx recanica slop --text \"…\". | code, fails |\n| The same vague buttons everywhere: Learn more, Get started, Read more, Try now | Name the action: Create invoice, See pricing, Book a demo. | code |\n| Round-number proof: 10,000+ users, 99.9% uptime, 100% satisfaction, testimonials with no name | Use a real number with its source, a named customer, or nothing. | code |\n| Placeholders left in: Lorem ipsum, John Doe, Acme, (555) numbers, “Coming soon”, “Vite + React” | Realistic local data (names, MYR amounts, real places) or remove the block. | code, fails |\n| Throat-clearing: “Welcome to our platform”, “We're excited to…” | Start with what the reader came for. | code, fails |\n| Status, request or report framing on a page that isn't a report (PMO language, “requested by”, progress summaries on a design system page) | Write the page for its reader and its job. Process belongs in the tracker. | review |\n| Things that look clickable but do nothing: href=\"#\", buttons with no handler, fake search boxes | Build it or remove it. The page audit fails dead links. | page, fails |\n","tokens":{"json":{"color":{"light":{"background":"#ffffff","foreground":"#0d0d0d","surface":"#fafafa","panel":"#ffffff","card":"#ffffff","cardForeground":"#0d0d0d","popover":"#ffffff","popoverForeground":"#0d0d0d","primary":"#0d0d0d","primaryForeground":"#fafafa","secondary":"#f4f4f4","secondaryForeground":"#161616","muted":"#f4f4f4","mutedForeground":"#737373","accent":"#f4f4f4","accentForeground":"#161616","brand":"#161616","brandForeground":"#ffffff","destructive":"#db4241","destructiveForeground":"#ffffff","success":"#46a16b","warning":"#dda552","border":"#e5e5e5","input":"#e5e5e5","ring":"#737373","sidebar":"#f4f4f4","sidebarForeground":"#737373","sidebarAccent":"#e5e5e5","sidebarBorder":"#e5e5e5","sidebarPrimary":"#0d0d0d","sidebarPrimaryForeground":"#ffffff","sidebarAccentForeground":"#0d0d0d","sidebarRing":"#737373","chart1":"#0d0d0d","chart2":"#404040","chart3":"#737373","chart4":"#a1a1a1","chart5":"#d4d4d4"},"dark":{"background":"#020202","foreground":"#fafafa","surface":"#0d0d0d","panel":"#0d0d0d","card":"#0d0d0d","cardForeground":"#fafafa","popover":"#161616","popoverForeground":"#fafafa","primary":"#fafafa","primaryForeground":"#0d0d0d","secondary":"#161616","secondaryForeground":"#f4f4f4","muted":"#161616","mutedForeground":"#8c8c8c","accent":"#161616","accentForeground":"#fafafa","brand":"#cfd1d4","brandForeground":"#0d0d0d","destructive":"#ea6a6a","destructiveForeground":"#ffffff","success":"#46a16b","warning":"#dda552","border":"#1e1e1e","input":"#262626","ring":"#afb1b4","sidebar":"#020202","sidebarForeground":"#8c8c8c","sidebarAccent":"#161616","sidebarBorder":"#1e1e1e","sidebarPrimary":"#fafafa","sidebarPrimaryForeground":"#0d0d0d","sidebarAccentForeground":"#fafafa","sidebarRing":"#afb1b4","chart1":"#fafafa","chart2":"#cfd1d4","chart3":"#8a8c90","chart4":"#525252","chart5":"#404040"}},"primitive":{"gray-0":"#ffffff","gray-50":"#fafafa","gray-100":"#f4f4f4","gray-200":"#e5e5e5","gray-300":"#d4d4d4","gray-400":"#a1a1a1","gray-450":"#8c8c8c","gray-500":"#737373","gray-600":"#525252","gray-700":"#404040","gray-800":"#262626","gray-850":"#1e1e1e","gray-900":"#161616","gray-950":"#0d0d0d","gray-1000":"#020202","silver-50":"#f6f7f8","silver-100":"#e7e8ea","silver-200":"#cfd1d4","silver-300":"#afb1b4","silver-400":"#8a8c90","silver-500":"#67696c","red-400":"#ea6a6a","red-500":"#db4241","green-500":"#46a16b","amber-500":"#dda552"},"radius":{"base":12,"sm":8,"md":10,"lg":12,"xl":16,"2xl":20,"full":9999},"spacing":{"unit":4,"gutter":16,"section":64,"sectionSm":48,"panel":28,"stack":40,"sidebar":240,"flow":20,"group":12,"insetSm":16,"inset":20},"container":{"content":1152,"narrow":768,"copy":640},"font":{"sans":["Geist","ui-sans-serif","system-ui","sans-serif"],"mono":["Geist Mono","ui-monospace","monospace"],"weight":{"light":300,"regular":400,"medium":500}},"text":{"xs":{"fontSize":12,"lineHeight":1.333,"letterSpacing":0},"sm":{"fontSize":14,"lineHeight":1.43,"letterSpacing":0},"base":{"fontSize":16,"lineHeight":1.5,"letterSpacing":0},"heading":{"fontSize":24,"lineHeight":1.25,"letterSpacing":-0.015},"title":{"fontSize":30,"lineHeight":1.2,"letterSpacing":-0.02},"metric":{"fontSize":40,"lineHeight":1,"letterSpacing":-0.03},"displaySm":{"fontSize":36,"lineHeight":1.1,"letterSpacing":0},"displayMd":{"fontSize":48,"lineHeight":1.05,"letterSpacing":0},"displayLg":{"fontSize":64,"lineHeight":1,"letterSpacing":-0.035}},"duration":{"fast":150,"base":200,"slow":300,"slower":700},"easing":{"outSoft":[0.22,1,0.36,1]},"shadow":{"soft":"0 1px 2px 0 #0000000a, 0 4px 16px -4px #00000014","float":"0 2px 4px 0 #0000000a, 0 16px 40px -8px #00000029"}},"css":"/* GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n * Plain CSS variables: works with or without Tailwind.\n * Semantic colors switch with the .dark class on an ancestor (usually <html>). */\n:root {\n --rc-gray-0: oklch(1 0 0);\n --rc-gray-50: oklch(0.985 0 0);\n --rc-gray-100: oklch(0.967 0 0);\n --rc-gray-200: oklch(0.922 0 0);\n --rc-gray-300: oklch(0.87 0 0);\n --rc-gray-400: oklch(0.708 0 0);\n --rc-gray-450: oklch(0.64 0 0);\n --rc-gray-500: oklch(0.556 0 0);\n --rc-gray-600: oklch(0.439 0 0);\n --rc-gray-700: oklch(0.371 0 0);\n --rc-gray-800: oklch(0.269 0 0);\n --rc-gray-850: oklch(0.235 0 0);\n --rc-gray-900: oklch(0.2 0 0);\n --rc-gray-950: oklch(0.16 0 0);\n --rc-gray-1000: oklch(0.09 0 0);\n --rc-silver-50: oklch(0.975 0.002 260);\n --rc-silver-100: oklch(0.93 0.003 260);\n --rc-silver-200: oklch(0.86 0.004 260);\n --rc-silver-300: oklch(0.76 0.005 260);\n --rc-silver-400: oklch(0.64 0.006 260);\n --rc-silver-500: oklch(0.52 0.006 260);\n --rc-red-400: oklch(0.68 0.16 22);\n --rc-red-500: oklch(0.6 0.19 25);\n --rc-green-500: oklch(0.64 0.12 155);\n --rc-amber-500: oklch(0.76 0.12 75);\n\n --radius: 0.75rem;\n --rc-radius-sm: calc(var(--radius) - 4px);\n --rc-radius-md: calc(var(--radius) - 2px);\n --rc-radius-lg: var(--radius);\n --rc-radius-xl: calc(var(--radius) + 4px);\n --rc-radius-2xl: calc(var(--radius) + 8px);\n --rc-radius-full: 9999px;\n --rc-space-unit: 4px;\n --rc-space-gutter: clamp(1rem, 3vw, 2.5rem);\n --rc-space-section: clamp(4rem, 10vw, 8rem);\n --rc-space-section-sm: clamp(3rem, 6vw, 5rem);\n --rc-space-panel: 1.75rem;\n --rc-space-stack: 2.5rem;\n --rc-space-sidebar: 15rem;\n --rc-space-flow: 1.25rem;\n --rc-space-group: 0.75rem;\n --rc-space-inset-sm: 1rem;\n --rc-space-inset: 1.25rem;\n --rc-container-content: 72rem;\n --rc-container-narrow: 48rem;\n --rc-container-copy: 40rem;\n --rc-font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;\n --rc-font-mono: var(--font-geist-mono), ui-monospace, monospace;\n --rc-text-xs: 0.75rem;\n --rc-text-sm: 0.875rem;\n --rc-text-base: 1rem;\n --rc-text-heading: clamp(1.25rem, 1.1464rem + 0.442vw, 1.5rem);\n --rc-text-title: clamp(1.625rem, 1.5214rem + 0.442vw, 1.875rem);\n --rc-text-metric: 2.5rem;\n --rc-text-display-sm: clamp(1.75rem, 1.5428rem + 0.884vw, 2.25rem);\n --rc-text-display-md: clamp(2.125rem, 1.7624rem + 1.547vw, 3rem);\n --rc-text-display-lg: clamp(2.5rem, 1.8785rem + 2.6519vw, 4rem);\n --rc-duration-fast: 150ms;\n --rc-duration-base: 200ms;\n --rc-duration-slow: 300ms;\n --rc-duration-slower: 700ms;\n --rc-ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);\n --rc-shadow-soft: 0 1px 2px 0 #0000000a, 0 4px 16px -4px #00000014;\n --rc-shadow-float: 0 2px 4px 0 #0000000a, 0 16px 40px -8px #00000029;\n}\n\n/* Semantic: light */\n:root {\n --background: var(--rc-gray-0);\n --foreground: var(--rc-gray-950);\n --surface: var(--rc-gray-50);\n --panel: var(--rc-gray-0);\n --card: var(--rc-gray-0);\n --card-foreground: var(--rc-gray-950);\n --popover: var(--rc-gray-0);\n --popover-foreground: var(--rc-gray-950);\n --primary: var(--rc-gray-950);\n --primary-foreground: var(--rc-gray-50);\n --secondary: var(--rc-gray-100);\n --secondary-foreground: var(--rc-gray-900);\n --muted: var(--rc-gray-100);\n --muted-foreground: var(--rc-gray-500);\n --accent: var(--rc-gray-100);\n --accent-foreground: var(--rc-gray-900);\n --brand: var(--rc-gray-900);\n --brand-foreground: var(--rc-gray-0);\n --destructive: var(--rc-red-500);\n --destructive-foreground: var(--rc-gray-0);\n --success: var(--rc-green-500);\n --warning: var(--rc-amber-500);\n --border: var(--rc-gray-200);\n --input: var(--rc-gray-200);\n --ring: var(--rc-gray-500);\n --sidebar: var(--rc-gray-100);\n --sidebar-foreground: var(--rc-gray-500);\n --sidebar-accent: var(--rc-gray-200);\n --sidebar-border: var(--rc-gray-200);\n --sidebar-primary: var(--rc-gray-950);\n --sidebar-primary-foreground: var(--rc-gray-0);\n --sidebar-accent-foreground: var(--rc-gray-950);\n --sidebar-ring: var(--rc-gray-500);\n --chart-1: var(--rc-gray-950);\n --chart-2: var(--rc-gray-700);\n --chart-3: var(--rc-gray-500);\n --chart-4: var(--rc-gray-400);\n --chart-5: var(--rc-gray-300);\n}\n\n/* Semantic: dark */\n.dark {\n --background: var(--rc-gray-1000);\n --foreground: var(--rc-gray-50);\n --surface: var(--rc-gray-950);\n --panel: var(--rc-gray-950);\n --card: var(--rc-gray-950);\n --card-foreground: var(--rc-gray-50);\n --popover: var(--rc-gray-900);\n --popover-foreground: var(--rc-gray-50);\n --primary: var(--rc-gray-50);\n --primary-foreground: var(--rc-gray-950);\n --secondary: var(--rc-gray-900);\n --secondary-foreground: var(--rc-gray-100);\n --muted: var(--rc-gray-900);\n --muted-foreground: var(--rc-gray-450);\n --accent: var(--rc-gray-900);\n --accent-foreground: var(--rc-gray-50);\n --brand: var(--rc-silver-200);\n --brand-foreground: var(--rc-gray-950);\n --destructive: var(--rc-red-400);\n --border: var(--rc-gray-850);\n --input: var(--rc-gray-800);\n --ring: var(--rc-silver-300);\n --sidebar: var(--rc-gray-1000);\n --sidebar-foreground: var(--rc-gray-450);\n --sidebar-accent: var(--rc-gray-900);\n --sidebar-border: var(--rc-gray-850);\n --sidebar-primary: var(--rc-gray-50);\n --sidebar-primary-foreground: var(--rc-gray-950);\n --sidebar-accent-foreground: var(--rc-gray-50);\n --sidebar-ring: var(--rc-silver-300);\n --chart-1: var(--rc-gray-50);\n --chart-2: var(--rc-silver-200);\n --chart-3: var(--rc-silver-400);\n --chart-4: var(--rc-gray-600);\n --chart-5: var(--rc-gray-700);\n}\n","tailwind-v4":"/* GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n * Tailwind v4 scale (imported by theme.css). */\n@theme inline {\n --radius-sm: calc(var(--radius) - 4px);\n --radius-md: calc(var(--radius) - 2px);\n --radius-lg: var(--radius);\n --radius-xl: calc(var(--radius) + 4px);\n --radius-2xl: calc(var(--radius) + 8px);\n\n --font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;\n --font-mono: var(--font-geist-mono), ui-monospace, monospace;\n\n --spacing-gutter: clamp(1rem, 3vw, 2.5rem);\n --spacing-section: clamp(4rem, 10vw, 8rem);\n --spacing-section-sm: clamp(3rem, 6vw, 5rem);\n --spacing-panel: 1.75rem;\n --spacing-stack: 2.5rem;\n --spacing-sidebar: 15rem;\n --spacing-flow: 1.25rem;\n --spacing-group: 0.75rem;\n --spacing-inset-sm: 1rem;\n --spacing-inset: 1.25rem;\n --container-content: 72rem;\n --container-narrow: 48rem;\n --container-copy: 40rem;\n\n --text-heading: clamp(1.25rem, 1.1464rem + 0.442vw, 1.5rem);\n --text-heading--line-height: 1.25;\n --text-heading--letter-spacing: -0.015em;\n --text-title: clamp(1.625rem, 1.5214rem + 0.442vw, 1.875rem);\n --text-title--line-height: 1.2;\n --text-title--letter-spacing: -0.02em;\n --text-metric: 2.5rem;\n --text-metric--line-height: 1;\n --text-metric--letter-spacing: -0.03em;\n --text-display-sm: clamp(1.75rem, 1.5428rem + 0.884vw, 2.25rem);\n --text-display-sm--line-height: 1.1;\n --text-display-md: clamp(2.125rem, 1.7624rem + 1.547vw, 3rem);\n --text-display-md--line-height: 1.05;\n --text-display-lg: clamp(2.5rem, 1.8785rem + 2.6519vw, 4rem);\n --text-display-lg--line-height: 1;\n --text-display-lg--letter-spacing: -0.035em;\n\n --shadow-soft: 0 1px 2px 0 #0000000a, 0 4px 16px -4px #00000014;\n --shadow-float: 0 2px 4px 0 #0000000a, 0 16px 40px -8px #00000029;\n --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n\n/*\n * Recanica · Tailwind v4 entry\n * ------------------------------------------------------------------\n * Values come from tokens/*.json (W3C Design Tokens) via scripts/build.mjs:\n * generated/css/variables.css primitives + semantic light/dark (plain CSS vars)\n * generated/css/tailwind-theme.css radius, fonts, spacing, containers, type, shadow, easing\n * This file only wires them into Tailwind and adds base styles.\n *\n * Tiers:\n * 1. Primitives --rc-* raw scales (never used in components)\n * 2. Semantic --background ... meaning-based, swapped per theme\n * 3. Tailwind @theme inline exposes semantic tokens as utilities\n */\n\n@import \"./generated/css/variables.css\";\n@import \"./generated/css/tailwind-theme.css\";\n\n@custom-variant dark (&:is(.dark *));\n\n/* ---------- 3. Tailwind bridge ---------- */\n@theme inline {\n --color-background: var(--background);\n --color-foreground: var(--foreground);\n --color-surface: var(--surface);\n --color-panel: var(--panel);\n --color-card: var(--card);\n --color-card-foreground: var(--card-foreground);\n --color-popover: var(--popover);\n --color-popover-foreground: var(--popover-foreground);\n --color-primary: var(--primary);\n --color-primary-foreground: var(--primary-foreground);\n --color-secondary: var(--secondary);\n --color-secondary-foreground: var(--secondary-foreground);\n --color-muted: var(--muted);\n --color-muted-foreground: var(--muted-foreground);\n --color-accent: var(--accent);\n --color-accent-foreground: var(--accent-foreground);\n --color-brand: var(--brand);\n --color-brand-foreground: var(--brand-foreground);\n --color-destructive: var(--destructive);\n --color-destructive-foreground: var(--destructive-foreground);\n --color-success: var(--success);\n --color-warning: var(--warning);\n --color-border: var(--border);\n --color-input: var(--input);\n --color-ring: var(--ring);\n --color-sidebar: var(--sidebar);\n --color-sidebar-foreground: var(--sidebar-foreground);\n --color-sidebar-accent: var(--sidebar-accent);\n --color-sidebar-border: var(--sidebar-border);\n --color-sidebar-primary: var(--sidebar-primary);\n --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);\n --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);\n --color-sidebar-ring: var(--sidebar-ring);\n --color-chart-1: var(--chart-1);\n --color-chart-2: var(--chart-2);\n --color-chart-3: var(--chart-3);\n --color-chart-4: var(--chart-4);\n --color-chart-5: var(--chart-5);\n}\n\n@layer base {\n * { border-color: var(--color-border); }\n html { color-scheme: light; }\n html.dark { color-scheme: dark; }\n body {\n background-color: var(--color-background);\n color: var(--color-foreground);\n font-family: var(--font-sans);\n -webkit-font-smoothing: antialiased;\n }\n :focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }\n /* No lone last words: headings balance their lines, paragraphs avoid a one-word last line. */\n h1, h2, h3, h4 { text-wrap: balance; }\n p, li, dd, summary { text-wrap: pretty; }\n}\n\n\n/* ---------- Loader animations (used by @recanica/ui Loader) ----------\n * Monochrome, transform/opacity only. All stop under prefers-reduced-motion (see .rc-loader rules below). */\n@theme {\n --animate-loader-pulse: loader-pulse 1.4s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) infinite;\n --animate-loader-breathe: loader-breathe 2s ease-in-out infinite;\n --animate-loader-spin: loader-spin 1.6s linear infinite;\n --animate-loader-orbit: loader-spin 1.2s linear infinite;\n --animate-loader-bounce: loader-bounce 1s cubic-bezier(0.22, 1, 0.36, 1) infinite;\n --animate-loader-flip: loader-flip 1.8s ease-in-out infinite;\n --animate-loader-reveal: loader-reveal 1.6s ease-in-out infinite;\n --animate-loader-ring: loader-ring 1.4s ease-in-out infinite;\n --animate-loader-ripple: loader-ripple 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;\n --animate-loader-sway: loader-sway 1.6s ease-in-out infinite;\n --animate-loader-wave: loader-wave 1.2s ease-in-out infinite;\n\n @keyframes loader-pulse { 0%, 100% { transform: scale(1); opacity: 1 } 50% { transform: scale(0.86); opacity: 0.55 } }\n @keyframes loader-breathe { 0%, 100% { opacity: 0.25 } 50% { opacity: 1 } }\n @keyframes loader-spin { to { transform: rotate(360deg) } }\n @keyframes loader-bounce { 0%, 100% { transform: translateY(0) } 40% { transform: translateY(-22%) } 60% { transform: translateY(0) } 75% { transform: translateY(-6%) } }\n @keyframes loader-flip { 0% { transform: perspective(200px) rotateY(0) } 50% { transform: perspective(200px) rotateY(180deg) } 100% { transform: perspective(200px) rotateY(360deg) } }\n @keyframes loader-reveal { 0% { clip-path: inset(0 100% 0 0) } 45%, 55% { clip-path: inset(0 0 0 0) } 100% { clip-path: inset(0 0 0 100%) } }\n @keyframes loader-ring { 0% { stroke-dashoffset: 100 } 50% { stroke-dashoffset: 25 } 100% { stroke-dashoffset: -100 } }\n @keyframes loader-ripple { 0% { transform: scale(0.5); opacity: 0.6 } 100% { transform: scale(1); opacity: 0 } }\n @keyframes loader-sway { 0%, 100% { transform: rotate(-8deg) } 50% { transform: rotate(8deg) } }\n @keyframes loader-wave { 0%, 100% { transform: translateY(0); opacity: 0.35 } 40% { transform: translateY(-40%); opacity: 1 } }\n}\n\n@media (prefers-reduced-motion: reduce) {\n [data-slot=loader] *, [data-slot=loader] { animation-duration: 0s !important; animation-iteration-count: 1 !important; }\n [data-slot=loader] [data-loader-motion] { opacity: 0.6; }\n}\n\n/* ---------- Layout primitives: ONE source for column rhythm and reading width ----------\n * .flow the container owns the vertical spacing between its blocks: --spacing-flow between blocks,\n * --spacing-stack before a heading. Blocks carry no outer margin of their own; any they do carry is overridden.\n * .reading a reading column (≈ 85 characters at 16px); everything inside shares one right edge.\n * Unlayered on purpose, so the container wins over any margin utility on a child. */\n.flow > * { margin-bottom: 0; }\n.flow > * + * { margin-top: var(--spacing-flow, 1.25rem); }\n.flow > * + :is(h2, h3, section, [data-slot=section]) { margin-top: var(--spacing-stack, 2.5rem); }\n.flow > :is(h2, h3, [data-slot=section-header]) + * { margin-top: var(--spacing-group, 0.75rem); }\n.flow > [data-slot=page-header] + * { margin-top: var(--spacing-stack, 2.5rem); }\n.reading { width: 100%; max-width: 48rem; }\n\n/* Docs/code highlighting (shiki dual theme) */\n.shiki, .shiki span { color: var(--shiki-light); background-color: transparent !important; }\n.dark .shiki, .dark .shiki span { color: var(--shiki-dark); }\n\n","tailwind-v3":"// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n// Tailwind CSS v3 preset. Also import \"@recanica/tokens/variables.css\" in your global CSS.\n/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n darkMode: \"class\",\n theme: {\n extend: {\n colors: {\n \"background\": \"var(--background)\",\n \"foreground\": \"var(--foreground)\",\n \"surface\": \"var(--surface)\",\n \"panel\": \"var(--panel)\",\n \"card\": \"var(--card)\",\n \"card-foreground\": \"var(--card-foreground)\",\n \"popover\": \"var(--popover)\",\n \"popover-foreground\": \"var(--popover-foreground)\",\n \"primary\": \"var(--primary)\",\n \"primary-foreground\": \"var(--primary-foreground)\",\n \"secondary\": \"var(--secondary)\",\n \"secondary-foreground\": \"var(--secondary-foreground)\",\n \"muted\": \"var(--muted)\",\n \"muted-foreground\": \"var(--muted-foreground)\",\n \"accent\": \"var(--accent)\",\n \"accent-foreground\": \"var(--accent-foreground)\",\n \"brand\": \"var(--brand)\",\n \"brand-foreground\": \"var(--brand-foreground)\",\n \"destructive\": \"var(--destructive)\",\n \"destructive-foreground\": \"var(--destructive-foreground)\",\n \"success\": \"var(--success)\",\n \"warning\": \"var(--warning)\",\n \"border\": \"var(--border)\",\n \"input\": \"var(--input)\",\n \"ring\": \"var(--ring)\",\n \"sidebar\": \"var(--sidebar)\",\n \"sidebar-foreground\": \"var(--sidebar-foreground)\",\n \"sidebar-accent\": \"var(--sidebar-accent)\",\n \"sidebar-border\": \"var(--sidebar-border)\",\n \"sidebar-primary\": \"var(--sidebar-primary)\",\n \"sidebar-primary-foreground\": \"var(--sidebar-primary-foreground)\",\n \"sidebar-accent-foreground\": \"var(--sidebar-accent-foreground)\",\n \"sidebar-ring\": \"var(--sidebar-ring)\",\n \"chart-1\": \"var(--chart-1)\",\n \"chart-2\": \"var(--chart-2)\",\n \"chart-3\": \"var(--chart-3)\",\n \"chart-4\": \"var(--chart-4)\",\n \"chart-5\": \"var(--chart-5)\"\n },\n borderRadius: {\"sm\":\"calc(var(--radius) - 4px)\",\"md\":\"calc(var(--radius) - 2px)\",\"lg\":\"var(--radius)\",\"xl\":\"calc(var(--radius) + 4px)\",\"2xl\":\"calc(var(--radius) + 8px)\"},\n fontFamily: { sans: [\"Geist\",\"ui-sans-serif\",\"system-ui\",\"sans-serif\"], mono: [\"Geist Mono\",\"ui-monospace\",\"monospace\"] },\n spacing: {\"gutter\":\"clamp(1rem, 3vw, 2.5rem)\",\"section\":\"clamp(4rem, 10vw, 8rem)\",\"section-sm\":\"clamp(3rem, 6vw, 5rem)\",\"panel\":\"1.75rem\",\"stack\":\"2.5rem\",\"sidebar\":\"15rem\",\"flow\":\"1.25rem\",\"group\":\"0.75rem\",\"inset-sm\":\"1rem\",\"inset\":\"1.25rem\"},\n maxWidth: {\"content\":\"72rem\",\"narrow\":\"48rem\",\"copy\":\"40rem\"},\n fontSize: {\"heading\":[\"clamp(1.25rem, 1.1464rem + 0.442vw, 1.5rem)\",{\"lineHeight\":\"1.25\",\"letterSpacing\":\"-0.015em\"}],\"title\":[\"clamp(1.625rem, 1.5214rem + 0.442vw, 1.875rem)\",{\"lineHeight\":\"1.2\",\"letterSpacing\":\"-0.02em\"}],\"metric\":[\"2.5rem\",{\"lineHeight\":\"1\",\"letterSpacing\":\"-0.03em\"}],\"display-sm\":[\"clamp(1.75rem, 1.5428rem + 0.884vw, 2.25rem)\",{\"lineHeight\":\"1.1\"}],\"display-md\":[\"clamp(2.125rem, 1.7624rem + 1.547vw, 3rem)\",{\"lineHeight\":\"1.05\"}],\"display-lg\":[\"clamp(2.5rem, 1.8785rem + 2.6519vw, 4rem)\",{\"lineHeight\":\"1\",\"letterSpacing\":\"-0.035em\"}]},\n boxShadow: {\"soft\":\"0 1px 2px 0 #0000000a, 0 4px 16px -4px #00000014\",\"float\":\"0 2px 4px 0 #0000000a, 0 16px 40px -8px #00000029\"},\n transitionTimingFunction: {\"out-soft\":\"cubic-bezier(0.22, 1, 0.36, 1)\"},\n },\n },\n};\n","flutter":"// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n// Usage: MaterialApp(theme: recanicaTheme(Brightness.light), darkTheme: recanicaTheme(Brightness.dark))\nimport 'package:flutter/material.dart';\n\n@immutable\nclass RecanicaColors {\n const RecanicaColors({\n required this.background,\n required this.foreground,\n required this.surface,\n required this.panel,\n required this.card,\n required this.cardForeground,\n required this.popover,\n required this.popoverForeground,\n required this.primary,\n required this.primaryForeground,\n required this.secondary,\n required this.secondaryForeground,\n required this.muted,\n required this.mutedForeground,\n required this.accent,\n required this.accentForeground,\n required this.brand,\n required this.brandForeground,\n required this.destructive,\n required this.destructiveForeground,\n required this.success,\n required this.warning,\n required this.border,\n required this.input,\n required this.ring,\n required this.sidebar,\n required this.sidebarForeground,\n required this.sidebarAccent,\n required this.sidebarBorder,\n required this.sidebarPrimary,\n required this.sidebarPrimaryForeground,\n required this.sidebarAccentForeground,\n required this.sidebarRing,\n required this.chart1,\n required this.chart2,\n required this.chart3,\n required this.chart4,\n required this.chart5,\n });\n final Color background;\n final Color foreground;\n final Color surface;\n final Color panel;\n final Color card;\n final Color cardForeground;\n final Color popover;\n final Color popoverForeground;\n final Color primary;\n final Color primaryForeground;\n final Color secondary;\n final Color secondaryForeground;\n final Color muted;\n final Color mutedForeground;\n final Color accent;\n final Color accentForeground;\n final Color brand;\n final Color brandForeground;\n final Color destructive;\n final Color destructiveForeground;\n final Color success;\n final Color warning;\n final Color border;\n final Color input;\n final Color ring;\n final Color sidebar;\n final Color sidebarForeground;\n final Color sidebarAccent;\n final Color sidebarBorder;\n final Color sidebarPrimary;\n final Color sidebarPrimaryForeground;\n final Color sidebarAccentForeground;\n final Color sidebarRing;\n final Color chart1;\n final Color chart2;\n final Color chart3;\n final Color chart4;\n final Color chart5;\n\n static const light = RecanicaColors(\n background: Color(0xFFFFFFFF),\n foreground: Color(0xFF0D0D0D),\n surface: Color(0xFFFAFAFA),\n panel: Color(0xFFFFFFFF),\n card: Color(0xFFFFFFFF),\n cardForeground: Color(0xFF0D0D0D),\n popover: Color(0xFFFFFFFF),\n popoverForeground: Color(0xFF0D0D0D),\n primary: Color(0xFF0D0D0D),\n primaryForeground: Color(0xFFFAFAFA),\n secondary: Color(0xFFF4F4F4),\n secondaryForeground: Color(0xFF161616),\n muted: Color(0xFFF4F4F4),\n mutedForeground: Color(0xFF737373),\n accent: Color(0xFFF4F4F4),\n accentForeground: Color(0xFF161616),\n brand: Color(0xFF161616),\n brandForeground: Color(0xFFFFFFFF),\n destructive: Color(0xFFDB4241),\n destructiveForeground: Color(0xFFFFFFFF),\n success: Color(0xFF46A16B),\n warning: Color(0xFFDDA552),\n border: Color(0xFFE5E5E5),\n input: Color(0xFFE5E5E5),\n ring: Color(0xFF737373),\n sidebar: Color(0xFFF4F4F4),\n sidebarForeground: Color(0xFF737373),\n sidebarAccent: Color(0xFFE5E5E5),\n sidebarBorder: Color(0xFFE5E5E5),\n sidebarPrimary: Color(0xFF0D0D0D),\n sidebarPrimaryForeground: Color(0xFFFFFFFF),\n sidebarAccentForeground: Color(0xFF0D0D0D),\n sidebarRing: Color(0xFF737373),\n chart1: Color(0xFF0D0D0D),\n chart2: Color(0xFF404040),\n chart3: Color(0xFF737373),\n chart4: Color(0xFFA1A1A1),\n chart5: Color(0xFFD4D4D4),\n );\n static const dark = RecanicaColors(\n background: Color(0xFF020202),\n foreground: Color(0xFFFAFAFA),\n surface: Color(0xFF0D0D0D),\n panel: Color(0xFF0D0D0D),\n card: Color(0xFF0D0D0D),\n cardForeground: Color(0xFFFAFAFA),\n popover: Color(0xFF161616),\n popoverForeground: Color(0xFFFAFAFA),\n primary: Color(0xFFFAFAFA),\n primaryForeground: Color(0xFF0D0D0D),\n secondary: Color(0xFF161616),\n secondaryForeground: Color(0xFFF4F4F4),\n muted: Color(0xFF161616),\n mutedForeground: Color(0xFF8C8C8C),\n accent: Color(0xFF161616),\n accentForeground: Color(0xFFFAFAFA),\n brand: Color(0xFFCFD1D4),\n brandForeground: Color(0xFF0D0D0D),\n destructive: Color(0xFFEA6A6A),\n destructiveForeground: Color(0xFFFFFFFF),\n success: Color(0xFF46A16B),\n warning: Color(0xFFDDA552),\n border: Color(0xFF1E1E1E),\n input: Color(0xFF262626),\n ring: Color(0xFFAFB1B4),\n sidebar: Color(0xFF020202),\n sidebarForeground: Color(0xFF8C8C8C),\n sidebarAccent: Color(0xFF161616),\n sidebarBorder: Color(0xFF1E1E1E),\n sidebarPrimary: Color(0xFFFAFAFA),\n sidebarPrimaryForeground: Color(0xFF0D0D0D),\n sidebarAccentForeground: Color(0xFFFAFAFA),\n sidebarRing: Color(0xFFAFB1B4),\n chart1: Color(0xFFFAFAFA),\n chart2: Color(0xFFCFD1D4),\n chart3: Color(0xFF8A8C90),\n chart4: Color(0xFF525252),\n chart5: Color(0xFF404040),\n );\n}\n\nclass RecanicaRadius {\n static const double base = 12;\n static const double sm = 8;\n static const double md = 10;\n static const double lg = 12;\n static const double xl = 16;\n static const double xxl = 20;\n static const double full = 9999;\n}\n\nclass RecanicaSpacing {\n static const double unit = 4; // Base grid. Tailwind p-1 = 4px.\n static const double gutter = 16; // Page side padding\n static const double section = 64; // Landing section rhythm\n static const double sectionSm = 48;\n static const double panel = 28; // Card / stat padding\n static const double stack = 40; // Gap between dashboard blocks\n static const double sidebar = 240;\n static const double flow = 20; // Gap between consecutive blocks in a column (paragraph → table → paragraph). Owned by the .flow container, never by the blocks.\n static const double group = 12; // Within a group: a heading and its content, a label and its field.\n static const double insetSm = 16; // Padding inside compact surfaces (list rows, small cards).\n static const double inset = 20; // Padding inside surfaces (cards, tables' edge inset).\n}\n\nclass RecanicaText {\n static const String family = 'Geist';\n static const String monoFamily = 'Geist Mono';\n static const TextStyle xs = TextStyle(fontFamily: family, fontSize: 12, height: 1.333, letterSpacing: 0, fontWeight: FontWeight.w400);\n static const TextStyle sm = TextStyle(fontFamily: family, fontSize: 14, height: 1.43, letterSpacing: 0, fontWeight: FontWeight.w400);\n static const TextStyle base = TextStyle(fontFamily: family, fontSize: 16, height: 1.5, letterSpacing: 0, fontWeight: FontWeight.w400);\n static const TextStyle heading = TextStyle(fontFamily: family, fontSize: 24, height: 1.25, letterSpacing: -0.36, fontWeight: FontWeight.w400);\n static const TextStyle title = TextStyle(fontFamily: family, fontSize: 30, height: 1.2, letterSpacing: -0.6, fontWeight: FontWeight.w400);\n static const TextStyle metric = TextStyle(fontFamily: family, fontSize: 40, height: 1, letterSpacing: -1.2, fontWeight: FontWeight.w300);\n static const TextStyle displaySm = TextStyle(fontFamily: family, fontSize: 36, height: 1.1, letterSpacing: 0, fontWeight: FontWeight.w400);\n static const TextStyle displayMd = TextStyle(fontFamily: family, fontSize: 48, height: 1.05, letterSpacing: 0, fontWeight: FontWeight.w400);\n static const TextStyle displayLg = TextStyle(fontFamily: family, fontSize: 64, height: 1, letterSpacing: -2.24, fontWeight: FontWeight.w400);\n}\n\nclass RecanicaMotion {\n static const Duration fast = Duration(milliseconds: 150);\n static const Duration base = Duration(milliseconds: 200);\n static const Duration slow = Duration(milliseconds: 300);\n static const Duration slower = Duration(milliseconds: 700);\n static const Curve outSoft = Cubic(0.22, 1, 0.36, 1);\n}\n\nThemeData recanicaTheme(Brightness brightness) {\n final c = brightness == Brightness.dark ? RecanicaColors.dark : RecanicaColors.light;\n final pill = const StadiumBorder();\n return ThemeData(\n useMaterial3: true,\n brightness: brightness,\n fontFamily: RecanicaText.family,\n scaffoldBackgroundColor: c.background,\n dividerColor: c.border,\n colorScheme: ColorScheme(\n brightness: brightness,\n primary: c.primary, onPrimary: c.primaryForeground,\n secondary: c.secondary, onSecondary: c.secondaryForeground,\n error: c.destructive, onError: c.destructiveForeground,\n surface: c.card, onSurface: c.foreground,\n outline: c.border, surfaceContainerHighest: c.muted,\n ),\n cardTheme: CardThemeData(\n color: c.card, elevation: 0, margin: EdgeInsets.zero,\n shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(RecanicaRadius.xxl), side: BorderSide(color: c.border)),\n ),\n filledButtonTheme: FilledButtonThemeData(style: FilledButton.styleFrom(shape: pill, backgroundColor: c.primary, foregroundColor: c.primaryForeground)),\n outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(shape: pill, side: BorderSide(color: c.border), foregroundColor: c.foreground)),\n inputDecorationTheme: InputDecorationTheme(\n border: OutlineInputBorder(borderRadius: BorderRadius.circular(RecanicaRadius.lg), borderSide: BorderSide(color: c.input)),\n enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(RecanicaRadius.lg), borderSide: BorderSide(color: c.input)),\n focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(RecanicaRadius.lg), borderSide: BorderSide(color: c.ring, width: 1.5)),\n ),\n );\n}\n","swiftui":"// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n// SwiftUI. Colors adapt to light/dark automatically.\nimport SwiftUI\nimport UIKit\n\npublic enum Recanica {\n public enum Colors {\n public static let background = Color(light: 0xffffff, dark: 0x020202)\n public static let foreground = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let surface = Color(light: 0xfafafa, dark: 0x0d0d0d)\n public static let panel = Color(light: 0xffffff, dark: 0x0d0d0d)\n public static let card = Color(light: 0xffffff, dark: 0x0d0d0d)\n public static let cardForeground = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let popover = Color(light: 0xffffff, dark: 0x161616)\n public static let popoverForeground = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let primary = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let primaryForeground = Color(light: 0xfafafa, dark: 0x0d0d0d)\n public static let secondary = Color(light: 0xf4f4f4, dark: 0x161616)\n public static let secondaryForeground = Color(light: 0x161616, dark: 0xf4f4f4)\n public static let muted = Color(light: 0xf4f4f4, dark: 0x161616)\n public static let mutedForeground = Color(light: 0x737373, dark: 0x8c8c8c)\n public static let accent = Color(light: 0xf4f4f4, dark: 0x161616)\n public static let accentForeground = Color(light: 0x161616, dark: 0xfafafa)\n public static let brand = Color(light: 0x161616, dark: 0xcfd1d4)\n public static let brandForeground = Color(light: 0xffffff, dark: 0x0d0d0d)\n public static let destructive = Color(light: 0xdb4241, dark: 0xea6a6a)\n public static let destructiveForeground = Color(light: 0xffffff, dark: 0xffffff)\n public static let success = Color(light: 0x46a16b, dark: 0x46a16b)\n public static let warning = Color(light: 0xdda552, dark: 0xdda552)\n public static let border = Color(light: 0xe5e5e5, dark: 0x1e1e1e)\n public static let input = Color(light: 0xe5e5e5, dark: 0x262626)\n public static let ring = Color(light: 0x737373, dark: 0xafb1b4)\n public static let sidebar = Color(light: 0xf4f4f4, dark: 0x020202)\n public static let sidebarForeground = Color(light: 0x737373, dark: 0x8c8c8c)\n public static let sidebarAccent = Color(light: 0xe5e5e5, dark: 0x161616)\n public static let sidebarBorder = Color(light: 0xe5e5e5, dark: 0x1e1e1e)\n public static let sidebarPrimary = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let sidebarPrimaryForeground = Color(light: 0xffffff, dark: 0x0d0d0d)\n public static let sidebarAccentForeground = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let sidebarRing = Color(light: 0x737373, dark: 0xafb1b4)\n public static let chart1 = Color(light: 0x0d0d0d, dark: 0xfafafa)\n public static let chart2 = Color(light: 0x404040, dark: 0xcfd1d4)\n public static let chart3 = Color(light: 0x737373, dark: 0x8a8c90)\n public static let chart4 = Color(light: 0xa1a1a1, dark: 0x525252)\n public static let chart5 = Color(light: 0xd4d4d4, dark: 0x404040)\n }\n public enum Radius {\n public static let base: CGFloat = 12\n public static let sm: CGFloat = 8\n public static let md: CGFloat = 10\n public static let lg: CGFloat = 12\n public static let xl: CGFloat = 16\n public static let xxl: CGFloat = 20\n public static let full: CGFloat = 9999\n }\n public enum Spacing {\n public static let unit: CGFloat = 4\n public static let gutter: CGFloat = 16\n public static let section: CGFloat = 64\n public static let sectionSm: CGFloat = 48\n public static let panel: CGFloat = 28\n public static let stack: CGFloat = 40\n public static let sidebar: CGFloat = 240\n public static let flow: CGFloat = 20\n public static let group: CGFloat = 12\n public static let insetSm: CGFloat = 16\n public static let inset: CGFloat = 20\n }\n public enum Typography {\n public static let xs = Font.custom(\"Geist\", size: 12).weight(.regular)\n public static let sm = Font.custom(\"Geist\", size: 14).weight(.regular)\n public static let base = Font.custom(\"Geist\", size: 16).weight(.regular)\n public static let heading = Font.custom(\"Geist\", size: 24).weight(.regular)\n public static let title = Font.custom(\"Geist\", size: 30).weight(.regular)\n public static let metric = Font.custom(\"Geist\", size: 40).weight(.light)\n public static let displaySm = Font.custom(\"Geist\", size: 36).weight(.regular)\n public static let displayMd = Font.custom(\"Geist\", size: 48).weight(.regular)\n public static let displayLg = Font.custom(\"Geist\", size: 64).weight(.regular)\n }\n public enum Motion {\n public static let fast: Double = 0.15\n public static let base: Double = 0.2\n public static let slow: Double = 0.3\n public static let slower: Double = 0.7\n public static let outSoft = Animation.timingCurve(0.22, 1, 0.36, 1, duration: 0.3)\n }\n}\n\nextension Color {\n init(light: UInt32, dark: UInt32) {\n func ui(_ hex: UInt32) -> UIColor {\n UIColor(red: CGFloat((hex >> 16) & 0xFF) / 255, green: CGFloat((hex >> 8) & 0xFF) / 255, blue: CGFloat(hex & 0xFF) / 255, alpha: 1)\n }\n self.init(uiColor: UIColor { $0.userInterfaceStyle == .dark ? ui(dark) : ui(light) })\n }\n}\n","compose":"// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n// Jetpack Compose. Usage: MaterialTheme(colorScheme = recanicaColorScheme(isSystemInDarkTheme())) { … }\npackage com.aturanica.recanica\n\nimport androidx.compose.material3.ColorScheme\nimport androidx.compose.material3.darkColorScheme\nimport androidx.compose.material3.lightColorScheme\nimport androidx.compose.ui.graphics.Color\nimport androidx.compose.ui.unit.dp\nimport androidx.compose.ui.unit.sp\n\nobject RecanicaColors {\n object Light {\n val Background = Color(0xFFFFFFFF)\n val Foreground = Color(0xFF0D0D0D)\n val Surface = Color(0xFFFAFAFA)\n val Panel = Color(0xFFFFFFFF)\n val Card = Color(0xFFFFFFFF)\n val CardForeground = Color(0xFF0D0D0D)\n val Popover = Color(0xFFFFFFFF)\n val PopoverForeground = Color(0xFF0D0D0D)\n val Primary = Color(0xFF0D0D0D)\n val PrimaryForeground = Color(0xFFFAFAFA)\n val Secondary = Color(0xFFF4F4F4)\n val SecondaryForeground = Color(0xFF161616)\n val Muted = Color(0xFFF4F4F4)\n val MutedForeground = Color(0xFF737373)\n val Accent = Color(0xFFF4F4F4)\n val AccentForeground = Color(0xFF161616)\n val Brand = Color(0xFF161616)\n val BrandForeground = Color(0xFFFFFFFF)\n val Destructive = Color(0xFFDB4241)\n val DestructiveForeground = Color(0xFFFFFFFF)\n val Success = Color(0xFF46A16B)\n val Warning = Color(0xFFDDA552)\n val Border = Color(0xFFE5E5E5)\n val Input = Color(0xFFE5E5E5)\n val Ring = Color(0xFF737373)\n val Sidebar = Color(0xFFF4F4F4)\n val SidebarForeground = Color(0xFF737373)\n val SidebarAccent = Color(0xFFE5E5E5)\n val SidebarBorder = Color(0xFFE5E5E5)\n val SidebarPrimary = Color(0xFF0D0D0D)\n val SidebarPrimaryForeground = Color(0xFFFFFFFF)\n val SidebarAccentForeground = Color(0xFF0D0D0D)\n val SidebarRing = Color(0xFF737373)\n val Chart1 = Color(0xFF0D0D0D)\n val Chart2 = Color(0xFF404040)\n val Chart3 = Color(0xFF737373)\n val Chart4 = Color(0xFFA1A1A1)\n val Chart5 = Color(0xFFD4D4D4)\n }\n object Dark {\n val Background = Color(0xFF020202)\n val Foreground = Color(0xFFFAFAFA)\n val Surface = Color(0xFF0D0D0D)\n val Panel = Color(0xFF0D0D0D)\n val Card = Color(0xFF0D0D0D)\n val CardForeground = Color(0xFFFAFAFA)\n val Popover = Color(0xFF161616)\n val PopoverForeground = Color(0xFFFAFAFA)\n val Primary = Color(0xFFFAFAFA)\n val PrimaryForeground = Color(0xFF0D0D0D)\n val Secondary = Color(0xFF161616)\n val SecondaryForeground = Color(0xFFF4F4F4)\n val Muted = Color(0xFF161616)\n val MutedForeground = Color(0xFF8C8C8C)\n val Accent = Color(0xFF161616)\n val AccentForeground = Color(0xFFFAFAFA)\n val Brand = Color(0xFFCFD1D4)\n val BrandForeground = Color(0xFF0D0D0D)\n val Destructive = Color(0xFFEA6A6A)\n val DestructiveForeground = Color(0xFFFFFFFF)\n val Success = Color(0xFF46A16B)\n val Warning = Color(0xFFDDA552)\n val Border = Color(0xFF1E1E1E)\n val Input = Color(0xFF262626)\n val Ring = Color(0xFFAFB1B4)\n val Sidebar = Color(0xFF020202)\n val SidebarForeground = Color(0xFF8C8C8C)\n val SidebarAccent = Color(0xFF161616)\n val SidebarBorder = Color(0xFF1E1E1E)\n val SidebarPrimary = Color(0xFFFAFAFA)\n val SidebarPrimaryForeground = Color(0xFF0D0D0D)\n val SidebarAccentForeground = Color(0xFFFAFAFA)\n val SidebarRing = Color(0xFFAFB1B4)\n val Chart1 = Color(0xFFFAFAFA)\n val Chart2 = Color(0xFFCFD1D4)\n val Chart3 = Color(0xFF8A8C90)\n val Chart4 = Color(0xFF525252)\n val Chart5 = Color(0xFF404040)\n }\n}\n\nobject RecanicaRadius {\n val Base = 12.dp\n val Sm = 8.dp\n val Md = 10.dp\n val Lg = 12.dp\n val Xl = 16.dp\n val Xxl = 20.dp\n val Full = 9999.dp\n}\n\nobject RecanicaSpacing {\n val Unit = 4.dp\n val Gutter = 16.dp\n val Section = 64.dp\n val SectionSm = 48.dp\n val Panel = 28.dp\n val Stack = 40.dp\n val Sidebar = 240.dp\n val Flow = 20.dp\n val Group = 12.dp\n val InsetSm = 16.dp\n val Inset = 20.dp\n}\n\nobject RecanicaTextSize {\n val Xs = 12.sp\n val Sm = 14.sp\n val Base = 16.sp\n val Heading = 24.sp\n val Title = 30.sp\n val Metric = 40.sp\n val DisplaySm = 36.sp\n val DisplayMd = 48.sp\n val DisplayLg = 64.sp\n}\n\nfun recanicaColorScheme(dark: Boolean): ColorScheme = if (dark) {\n darkColorScheme(\n primary = RecanicaColors.Dark.Primary, onPrimary = RecanicaColors.Dark.PrimaryForeground,\n secondary = RecanicaColors.Dark.Secondary, onSecondary = RecanicaColors.Dark.SecondaryForeground,\n background = RecanicaColors.Dark.Background, onBackground = RecanicaColors.Dark.Foreground,\n surface = RecanicaColors.Dark.Card, onSurface = RecanicaColors.Dark.Foreground,\n error = RecanicaColors.Dark.Destructive, onError = RecanicaColors.Dark.DestructiveForeground,\n outline = RecanicaColors.Dark.Border,\n )\n} else {\n lightColorScheme(\n primary = RecanicaColors.Light.Primary, onPrimary = RecanicaColors.Light.PrimaryForeground,\n secondary = RecanicaColors.Light.Secondary, onSecondary = RecanicaColors.Light.SecondaryForeground,\n background = RecanicaColors.Light.Background, onBackground = RecanicaColors.Light.Foreground,\n surface = RecanicaColors.Light.Card, onSurface = RecanicaColors.Light.Foreground,\n error = RecanicaColors.Light.Destructive, onError = RecanicaColors.Light.DestructiveForeground,\n outline = RecanicaColors.Light.Border,\n )\n}\n","figma":"{\n \"primitive\": {\n \"rc\": {\n \"gray\": {\n \"0\": {\n \"$type\": \"color\",\n \"$value\": \"#ffffff\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(1 0 0)\"\n }\n }\n },\n \"50\": {\n \"$type\": \"color\",\n \"$value\": \"#fafafa\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.985 0 0)\"\n }\n }\n },\n \"100\": {\n \"$type\": \"color\",\n \"$value\": \"#f4f4f4\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.967 0 0)\"\n }\n }\n },\n \"200\": {\n \"$type\": \"color\",\n \"$value\": \"#e5e5e5\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.922 0 0)\"\n }\n }\n },\n \"300\": {\n \"$type\": \"color\",\n \"$value\": \"#d4d4d4\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.87 0 0)\"\n }\n }\n },\n \"400\": {\n \"$type\": \"color\",\n \"$value\": \"#a1a1a1\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.708 0 0)\"\n }\n }\n },\n \"450\": {\n \"$type\": \"color\",\n \"$value\": \"#8c8c8c\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.64 0 0)\"\n }\n }\n },\n \"500\": {\n \"$type\": \"color\",\n \"$value\": \"#737373\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.556 0 0)\"\n }\n }\n },\n \"600\": {\n \"$type\": \"color\",\n \"$value\": \"#525252\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.439 0 0)\"\n }\n }\n },\n \"700\": {\n \"$type\": \"color\",\n \"$value\": \"#404040\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.371 0 0)\"\n }\n }\n },\n \"800\": {\n \"$type\": \"color\",\n \"$value\": \"#262626\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.269 0 0)\"\n }\n }\n },\n \"850\": {\n \"$type\": \"color\",\n \"$value\": \"#1e1e1e\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.235 0 0)\"\n }\n }\n },\n \"900\": {\n \"$type\": \"color\",\n \"$value\": \"#161616\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.2 0 0)\"\n }\n }\n },\n \"950\": {\n \"$type\": \"color\",\n \"$value\": \"#0d0d0d\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.16 0 0)\"\n }\n }\n },\n \"1000\": {\n \"$type\": \"color\",\n \"$value\": \"#020202\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.09 0 0)\"\n }\n }\n }\n },\n \"silver\": {\n \"50\": {\n \"$type\": \"color\",\n \"$value\": \"#f6f7f8\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.975 0.002 260)\"\n }\n }\n },\n \"100\": {\n \"$type\": \"color\",\n \"$value\": \"#e7e8ea\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.93 0.003 260)\"\n }\n }\n },\n \"200\": {\n \"$type\": \"color\",\n \"$value\": \"#cfd1d4\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.86 0.004 260)\"\n }\n }\n },\n \"300\": {\n \"$type\": \"color\",\n \"$value\": \"#afb1b4\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.76 0.005 260)\"\n }\n }\n },\n \"400\": {\n \"$type\": \"color\",\n \"$value\": \"#8a8c90\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.64 0.006 260)\"\n }\n }\n },\n \"500\": {\n \"$type\": \"color\",\n \"$value\": \"#67696c\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.52 0.006 260)\"\n }\n }\n }\n },\n \"red\": {\n \"400\": {\n \"$type\": \"color\",\n \"$value\": \"#ea6a6a\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.68 0.16 22)\"\n }\n }\n },\n \"500\": {\n \"$type\": \"color\",\n \"$value\": \"#db4241\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.6 0.19 25)\"\n }\n }\n }\n },\n \"green\": {\n \"500\": {\n \"$type\": \"color\",\n \"$value\": \"#46a16b\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.64 0.12 155)\"\n }\n }\n }\n },\n \"amber\": {\n \"500\": {\n \"$type\": \"color\",\n \"$value\": \"#dda552\",\n \"$extensions\": {\n \"com.recanica\": {\n \"oklch\": \"oklch(0.76 0.12 75)\"\n }\n }\n }\n }\n }\n },\n \"light\": {\n \"color\": {\n \"background\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"surface\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"panel\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"card\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"card-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"popover\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"popover-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"primary\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"primary-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"secondary\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.100}\"\n },\n \"secondary-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"muted\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.100}\"\n },\n \"muted-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.500}\"\n },\n \"accent\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.100}\"\n },\n \"accent-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"brand\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"brand-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"destructive\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.red.500}\"\n },\n \"destructive-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"success\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.green.500}\"\n },\n \"warning\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.amber.500}\"\n },\n \"border\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.200}\"\n },\n \"input\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.200}\"\n },\n \"ring\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.500}\"\n },\n \"sidebar\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.100}\"\n },\n \"sidebar-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.500}\"\n },\n \"sidebar-accent\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.200}\"\n },\n \"sidebar-border\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.200}\"\n },\n \"sidebar-primary\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"sidebar-primary-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"sidebar-accent-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"sidebar-ring\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.500}\"\n },\n \"chart-1\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"chart-2\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.700}\"\n },\n \"chart-3\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.500}\"\n },\n \"chart-4\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.400}\"\n },\n \"chart-5\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.300}\"\n }\n }\n },\n \"dark\": {\n \"color\": {\n \"background\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.1000}\"\n },\n \"foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"surface\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"panel\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"card\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"card-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"popover\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"popover-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"primary\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"primary-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"secondary\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"secondary-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.100}\"\n },\n \"muted\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"muted-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.450}\"\n },\n \"accent\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"accent-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"brand\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.silver.200}\"\n },\n \"brand-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"destructive\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.red.400}\"\n },\n \"destructive-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.0}\"\n },\n \"success\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.green.500}\"\n },\n \"warning\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.amber.500}\"\n },\n \"border\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.850}\"\n },\n \"input\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.800}\"\n },\n \"ring\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.silver.300}\"\n },\n \"sidebar\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.1000}\"\n },\n \"sidebar-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.450}\"\n },\n \"sidebar-accent\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.900}\"\n },\n \"sidebar-border\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.850}\"\n },\n \"sidebar-primary\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"sidebar-primary-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.950}\"\n },\n \"sidebar-accent-foreground\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"sidebar-ring\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.silver.300}\"\n },\n \"chart-1\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.50}\"\n },\n \"chart-2\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.silver.200}\"\n },\n \"chart-3\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.silver.400}\"\n },\n \"chart-4\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.600}\"\n },\n \"chart-5\": {\n \"$type\": \"color\",\n \"$value\": \"{rc.gray.700}\"\n }\n }\n },\n \"dimension\": {\n \"radius\": {\n \"base\": {\n \"$type\": \"dimension\",\n \"$value\": \"12px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"0.75rem\",\n \"cssVar\": \"--radius\"\n }\n }\n },\n \"sm\": {\n \"$type\": \"dimension\",\n \"$value\": \"8px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"calc(var(--radius) - 4px)\"\n }\n }\n },\n \"md\": {\n \"$type\": \"dimension\",\n \"$value\": \"10px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"calc(var(--radius) - 2px)\"\n }\n }\n },\n \"lg\": {\n \"$type\": \"dimension\",\n \"$value\": \"12px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"var(--radius)\"\n }\n }\n },\n \"xl\": {\n \"$type\": \"dimension\",\n \"$value\": \"16px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"calc(var(--radius) + 4px)\"\n }\n }\n },\n \"2xl\": {\n \"$type\": \"dimension\",\n \"$value\": \"20px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"calc(var(--radius) + 8px)\"\n }\n }\n },\n \"full\": {\n \"$type\": \"dimension\",\n \"$value\": \"9999px\"\n }\n },\n \"spacing\": {\n \"unit\": {\n \"$type\": \"dimension\",\n \"$value\": \"4px\",\n \"$description\": \"Base grid. Tailwind p-1 = 4px.\"\n },\n \"gutter\": {\n \"$type\": \"dimension\",\n \"$value\": \"16px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"clamp(1rem, 3vw, 2.5rem)\"\n }\n },\n \"$description\": \"Page side padding\"\n },\n \"section\": {\n \"$type\": \"dimension\",\n \"$value\": \"64px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"clamp(4rem, 10vw, 8rem)\"\n }\n },\n \"$description\": \"Landing section rhythm\"\n },\n \"section-sm\": {\n \"$type\": \"dimension\",\n \"$value\": \"48px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"clamp(3rem, 6vw, 5rem)\"\n }\n }\n },\n \"panel\": {\n \"$type\": \"dimension\",\n \"$value\": \"28px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"1.75rem\"\n }\n },\n \"$description\": \"Card / stat padding\"\n },\n \"stack\": {\n \"$type\": \"dimension\",\n \"$value\": \"40px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"2.5rem\"\n }\n },\n \"$description\": \"Gap between dashboard blocks\"\n },\n \"sidebar\": {\n \"$type\": \"dimension\",\n \"$value\": \"240px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"15rem\"\n }\n }\n },\n \"flow\": {\n \"$type\": \"dimension\",\n \"$value\": \"20px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"1.25rem\"\n }\n },\n \"$description\": \"Gap between consecutive blocks in a column (paragraph → table → paragraph). Owned by the .flow container, never by the blocks.\"\n },\n \"$description\": \"Visual rhythm, by role. Pages and components use these roles, never raw numbers: inset (inside a surface) · group (within a group: heading→content, label→field) · flow (between blocks) · stack (between sections) · section (page bands on marketing pages).\",\n \"group\": {\n \"$type\": \"dimension\",\n \"$value\": \"12px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"0.75rem\"\n }\n },\n \"$description\": \"Within a group: a heading and its content, a label and its field.\"\n },\n \"inset-sm\": {\n \"$type\": \"dimension\",\n \"$value\": \"16px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"1rem\"\n }\n },\n \"$description\": \"Padding inside compact surfaces (list rows, small cards).\"\n },\n \"inset\": {\n \"$type\": \"dimension\",\n \"$value\": \"20px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"1.25rem\"\n }\n },\n \"$description\": \"Padding inside surfaces (cards, tables' edge inset).\"\n }\n },\n \"container\": {\n \"content\": {\n \"$type\": \"dimension\",\n \"$value\": \"1152px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"72rem\"\n }\n }\n },\n \"narrow\": {\n \"$type\": \"dimension\",\n \"$value\": \"768px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"48rem\"\n }\n }\n },\n \"copy\": {\n \"$type\": \"dimension\",\n \"$value\": \"640px\",\n \"$extensions\": {\n \"com.recanica\": {\n \"css\": \"40rem\"\n }\n }\n }\n }\n },\n \"$themes\": [\n {\n \"id\": \"light\",\n \"name\": \"Light\",\n \"selectedTokenSets\": {\n \"primitive\": \"source\",\n \"dimension\": \"source\",\n \"light\": \"enabled\"\n }\n },\n {\n \"id\": \"dark\",\n \"name\": \"Dark\",\n \"selectedTokenSets\": {\n \"primitive\": \"source\",\n \"dimension\": \"source\",\n \"dark\": \"enabled\"\n }\n }\n ],\n \"$metadata\": {\n \"tokenSetOrder\": [\n \"primitive\",\n \"dimension\",\n \"light\",\n \"dark\"\n ]\n }\n}\n","plain-css":"/*! Recanica CSS — UI framework by Aturanica Labs — MIT */\n/* GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.\n * Plain CSS variables: works with or without Tailwind.\n * Semantic colors switch with the .dark class on an ancestor (usually <html>). */\n:root {\n --rc-gray-0: oklch(1 0 0);\n --rc-gray-50: oklch(0.985 0 0);\n --rc-gray-100: oklch(0.967 0 0);\n --rc-gray-200: oklch(0.922 0 0);\n --rc-gray-300: oklch(0.87 0 0);\n --rc-gray-400: oklch(0.708 0 0);\n --rc-gray-450: oklch(0.64 0 0);\n --rc-gray-500: oklch(0.556 0 0);\n --rc-gray-600: oklch(0.439 0 0);\n --rc-gray-700: oklch(0.371 0 0);\n --rc-gray-800: oklch(0.269 0 0);\n --rc-gray-850: oklch(0.235 0 0);\n --rc-gray-900: oklch(0.2 0 0);\n --rc-gray-950: oklch(0.16 0 0);\n --rc-gray-1000: oklch(0.09 0 0);\n --rc-silver-50: oklch(0.975 0.002 260);\n --rc-silver-100: oklch(0.93 0.003 260);\n --rc-silver-200: oklch(0.86 0.004 260);\n --rc-silver-300: oklch(0.76 0.005 260);\n --rc-silver-400: oklch(0.64 0.006 260);\n --rc-silver-500: oklch(0.52 0.006 260);\n --rc-red-400: oklch(0.68 0.16 22);\n --rc-red-500: oklch(0.6 0.19 25);\n --rc-green-500: oklch(0.64 0.12 155);\n --rc-amber-500: oklch(0.76 0.12 75);\n\n --radius: 0.75rem;\n --rc-radius-sm: calc(var(--radius) - 4px);\n --rc-radius-md: calc(var(--radius) - 2px);\n --rc-radius-lg: var(--radius);\n --rc-radius-xl: calc(var(--radius) + 4px);\n --rc-radius-2xl: calc(var(--radius) + 8px);\n --rc-radius-full: 9999px;\n --rc-space-unit: 4px;\n --rc-space-gutter: clamp(1rem, 3vw, 2.5rem);\n --rc-space-section: clamp(4rem, 10vw, 8rem);\n --rc-space-section-sm: clamp(3rem, 6vw, 5rem);\n --rc-space-panel: 1.75rem;\n --rc-space-stack: 2.5rem;\n --rc-space-sidebar: 15rem;\n --rc-space-flow: 1.25rem;\n --rc-space-group: 0.75rem;\n --rc-space-inset-sm: 1rem;\n --rc-space-inset: 1.25rem;\n --rc-container-content: 72rem;\n --rc-container-narrow: 48rem;\n --rc-container-copy: 40rem;\n --rc-font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;\n --rc-font-mono: var(--font-geist-mono), ui-monospace, monospace;\n --rc-text-xs: 0.75rem;\n --rc-text-sm: 0.875rem;\n --rc-text-base: 1rem;\n --rc-text-heading: clamp(1.25rem, 1.1464rem + 0.442vw, 1.5rem);\n --rc-text-title: clamp(1.625rem, 1.5214rem + 0.442vw, 1.875rem);\n --rc-text-metric: 2.5rem;\n --rc-text-display-sm: clamp(1.75rem, 1.5428rem + 0.884vw, 2.25rem);\n --rc-text-display-md: clamp(2.125rem, 1.7624rem + 1.547vw, 3rem);\n --rc-text-display-lg: clamp(2.5rem, 1.8785rem + 2.6519vw, 4rem);\n --rc-duration-fast: 150ms;\n --rc-duration-base: 200ms;\n --rc-duration-slow: 300ms;\n --rc-duration-slower: 700ms;\n --rc-ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);\n --rc-shadow-soft: 0 1px 2px 0 #0000000a, 0 4px 16px -4px #00000014;\n --rc-shadow-float: 0 2px 4px 0 #0000000a, 0 16px 40px -8px #00000029;\n}\n\n/* Semantic: light */\n:root {\n --background: var(--rc-gray-0);\n --foreground: var(--rc-gray-950);\n --surface: var(--rc-gray-50);\n --panel: var(--rc-gray-0);\n --card: var(--rc-gray-0);\n --card-foreground: var(--rc-gray-950);\n --popover: var(--rc-gray-0);\n --popover-foreground: var(--rc-gray-950);\n --primary: var(--rc-gray-950);\n --primary-foreground: var(--rc-gray-50);\n --secondary: var(--rc-gray-100);\n --secondary-foreground: var(--rc-gray-900);\n --muted: var(--rc-gray-100);\n --muted-foreground: var(--rc-gray-500);\n --accent: var(--rc-gray-100);\n --accent-foreground: var(--rc-gray-900);\n --brand: var(--rc-gray-900);\n --brand-foreground: var(--rc-gray-0);\n --destructive: var(--rc-red-500);\n --destructive-foreground: var(--rc-gray-0);\n --success: var(--rc-green-500);\n --warning: var(--rc-amber-500);\n --border: var(--rc-gray-200);\n --input: var(--rc-gray-200);\n --ring: var(--rc-gray-500);\n --sidebar: var(--rc-gray-100);\n --sidebar-foreground: var(--rc-gray-500);\n --sidebar-accent: var(--rc-gray-200);\n --sidebar-border: var(--rc-gray-200);\n --sidebar-primary: var(--rc-gray-950);\n --sidebar-primary-foreground: var(--rc-gray-0);\n --sidebar-accent-foreground: var(--rc-gray-950);\n --sidebar-ring: var(--rc-gray-500);\n --chart-1: var(--rc-gray-950);\n --chart-2: var(--rc-gray-700);\n --chart-3: var(--rc-gray-500);\n --chart-4: var(--rc-gray-400);\n --chart-5: var(--rc-gray-300);\n}\n\n/* Semantic: dark */\n.dark {\n --background: var(--rc-gray-1000);\n --foreground: var(--rc-gray-50);\n --surface: var(--rc-gray-950);\n --panel: var(--rc-gray-950);\n --card: var(--rc-gray-950);\n --card-foreground: var(--rc-gray-50);\n --popover: var(--rc-gray-900);\n --popover-foreground: var(--rc-gray-50);\n --primary: var(--rc-gray-50);\n --primary-foreground: var(--rc-gray-950);\n --secondary: var(--rc-gray-900);\n --secondary-foreground: var(--rc-gray-100);\n --muted: var(--rc-gray-900);\n --muted-foreground: var(--rc-gray-450);\n --accent: var(--rc-gray-900);\n --accent-foreground: var(--rc-gray-50);\n --brand: var(--rc-silver-200);\n --brand-foreground: var(--rc-gray-950);\n --destructive: var(--rc-red-400);\n --border: var(--rc-gray-850);\n --input: var(--rc-gray-800);\n --ring: var(--rc-silver-300);\n --sidebar: var(--rc-gray-1000);\n --sidebar-foreground: var(--rc-gray-450);\n --sidebar-accent: var(--rc-gray-900);\n --sidebar-border: var(--rc-gray-850);\n --sidebar-primary: var(--rc-gray-50);\n --sidebar-primary-foreground: var(--rc-gray-950);\n --sidebar-accent-foreground: var(--rc-gray-50);\n --sidebar-ring: var(--rc-silver-300);\n --chart-1: var(--rc-gray-50);\n --chart-2: var(--rc-silver-200);\n --chart-3: var(--rc-silver-400);\n --chart-4: var(--rc-gray-600);\n --chart-5: var(--rc-gray-700);\n}\n\n/*\n * Recanica CSS — framework-free components.\n * Requires the token variables (bundled into dist/recanica.css).\n * Dark mode: add class=\"dark\" to <html>.\n */\n\n/* ---------- base ---------- */\n*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }\nhtml { color-scheme: light; }\nhtml.dark { color-scheme: dark; }\nbody {\n margin: 0;\n background: var(--background);\n color: var(--foreground);\n font-family: var(--rc-font-sans);\n font-size: 0.875rem;\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n}\n:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n.rc-muted { color: var(--muted-foreground); }\n.rc-mono { font-family: var(--rc-font-mono); }\n.rc-nums { font-variant-numeric: tabular-nums; }\n/* No lone last words: headings balance their lines, paragraphs avoid a one-word last line. */\nh1, h2, h3, h4 { text-wrap: balance; }\np, li, dd, summary { text-wrap: pretty; }\n\n/* ---------- type ---------- */\n.rc-display { font-size: var(--rc-text-display-md); line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; margin: 0; }\n.rc-title { font-size: var(--rc-text-title); line-height: 1.2; letter-spacing: -0.02em; font-weight: 400; margin: 0; }\n.rc-heading { font-size: var(--rc-text-heading); line-height: 1.25; letter-spacing: -0.015em; font-weight: 400; margin: 0; }\n.rc-metric { font-size: var(--rc-text-metric); line-height: 1; letter-spacing: -0.03em; font-weight: 300; font-variant-numeric: tabular-nums; }\n.rc-caption { font-size: 0.75rem; color: var(--muted-foreground); }\n@media (max-width: 639px) { .rc-display { font-size: var(--rc-text-display-sm); } }\n\n/* ---------- layout ---------- */\n.rc-container { max-width: var(--rc-container-content); margin-inline: auto; padding-inline: var(--rc-space-gutter); }\n.rc-stack { display: flex; flex-direction: column; gap: var(--rc-space-stack); }\n.rc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }\n.rc-shell { display: flex; height: 100svh; overflow: hidden; background: var(--sidebar); }\n/* overflow-y alone turns overflow-x to auto too: a long label would scroll the whole sidebar sideways. Clip x; labels wrap. */\n.rc-sidebar { width: var(--rc-space-sidebar); flex-shrink: 0; overflow: hidden auto; min-width: 0; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.125rem; }\n.rc-shell__main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0.5rem 0.5rem 0.5rem 0; }\n.rc-panel { flex: 1; min-height: 0; overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--rc-radius-2xl); }\n.rc-panel__inner { max-width: var(--rc-container-content); margin-inline: auto; padding: 2rem var(--rc-space-gutter); }\n@media (max-width: 767px) {\n .rc-sidebar { display: none; }\n .rc-shell__main { padding: 0.5rem; }\n}\n.rc-nav-item {\n display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: var(--rc-radius-lg);\n color: var(--sidebar-foreground); text-decoration: none; font-size: 0.875rem; transition: color var(--rc-duration-fast);\n min-width: 0; align-items: flex-start;\n}\n/* Like any docs menu: a long label wraps onto the next line, under its first word. Never cut off, never sideways. */\n.rc-nav-item > span, .rc-nav-item__label { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }\n.rc-nav-item > svg { flex-shrink: 0; margin-top: 0.125rem; }\n.rc-nav-item:hover { color: var(--foreground); }\n.rc-nav-item[aria-current=\"page\"] { background: var(--sidebar-accent); color: var(--foreground); }\n\n/* ---------- button ---------- */\n.rc-btn {\n display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; max-width: 100%;\n height: 2.25rem; padding: 0 1rem; border: 1px solid transparent; border-radius: 9999px;\n font: inherit; font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none;\n background: var(--primary); color: var(--primary-foreground);\n transition: background-color var(--rc-duration-fast) var(--rc-ease-out-soft), opacity var(--rc-duration-fast);\n}\n.rc-btn:hover { opacity: 0.9; }\n.rc-btn:disabled, .rc-btn[aria-disabled=\"true\"] { opacity: 0.5; pointer-events: none; }\n.rc-btn > svg { width: 1rem; height: 1rem; flex-shrink: 0; }\n.rc-btn--secondary { background: var(--secondary); color: var(--secondary-foreground); }\n.rc-btn--outline { background: transparent; color: var(--foreground); border-color: var(--input); }\n.rc-btn--outline:hover, .rc-btn--ghost:hover { background: var(--accent); opacity: 1; }\n.rc-btn--ghost { background: transparent; color: var(--foreground); }\n.rc-btn--destructive { background: var(--destructive); color: var(--destructive-foreground); }\n.rc-btn--brand { background: var(--brand); color: var(--brand-foreground); }\n.rc-btn--sm { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }\n.rc-btn--lg { height: 2.75rem; padding: 0 1.5rem; font-size: 1rem; }\n.rc-btn--icon { width: 2.25rem; padding: 0; }\n.rc-btn--block { width: 100%; }\n\n/* ---------- badge ---------- */\n.rc-badge {\n display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 9999px;\n font-size: 0.75rem; font-weight: 500; white-space: nowrap; background: var(--secondary); color: var(--secondary-foreground); border: 1px solid transparent;\n}\n.rc-badge--outline { background: transparent; color: var(--foreground); border-color: var(--border); }\n.rc-badge--success { background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); }\n.rc-badge--warning { background: color-mix(in oklab, var(--warning) 15%, transparent); color: var(--warning); }\n.rc-badge--destructive { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }\n.rc-badge--brand { background: var(--brand); color: var(--brand-foreground); }\n\n/* ---------- card / surfaces ---------- */\n.rc-card { display: flex; flex-direction: column; gap: 1.5rem; padding-block: 1.5rem; background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--rc-radius-2xl); }\n.rc-card > * { padding-inline: 1.5rem; }\n.rc-card__title { margin: 0; font-size: 1rem; font-weight: 400; }\n.rc-card__desc { margin: 0.25rem 0 0; color: var(--muted-foreground); }\n.rc-card__footer { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }\n\n/* ---------- forms ---------- */\n.rc-field { display: grid; gap: 0.5rem; min-width: 0; }\n.rc-label { font-size: 0.875rem; font-weight: 500; }\n.rc-hint { font-size: 0.8125rem; color: var(--muted-foreground); }\n.rc-error { font-size: 0.8125rem; color: var(--destructive); }\n.rc-input, .rc-select, .rc-textarea {\n width: 100%; min-width: 0; height: 2.5rem; padding: 0 0.75rem; border: 1px solid var(--input); border-radius: var(--rc-radius-xl);\n background: transparent; color: inherit; font: inherit; font-size: 0.875rem; transition: border-color var(--rc-duration-fast), box-shadow var(--rc-duration-fast);\n}\nhtml.dark .rc-input, html.dark .rc-select, html.dark .rc-textarea { background: color-mix(in oklab, var(--muted) 50%, transparent); }\n.rc-textarea { height: auto; min-height: 5rem; padding-block: 0.5rem; resize: vertical; }\n.rc-input::placeholder, .rc-textarea::placeholder { color: var(--muted-foreground); }\n.rc-input:focus-visible, .rc-select:focus-visible, .rc-textarea:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }\n.rc-input[aria-invalid=\"true\"] { border-color: var(--destructive); }\n.rc-check { width: 1rem; height: 1rem; accent-color: var(--primary); }\n.rc-switch { appearance: none; width: 2rem; height: 1.15rem; border-radius: 9999px; background: var(--input); position: relative; cursor: pointer; transition: background var(--rc-duration-base); }\n.rc-switch::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: calc(1.15rem - 4px); height: calc(1.15rem - 4px); border-radius: 50%; background: var(--background); transition: transform var(--rc-duration-base) var(--rc-ease-out-soft); }\n.rc-switch:checked { background: var(--primary); }\n.rc-switch:checked::after { transform: translateX(0.85rem); }\n\n/* ---------- tabs (segmented, pill) ---------- */\n.rc-tabs { display: inline-flex; gap: 0.125rem; padding: 0.25rem; border-radius: 9999px; background: var(--muted); max-width: 100%; overflow-x: auto; }\n.rc-tab { border: 0; background: transparent; color: var(--muted-foreground); font: inherit; font-size: 0.875rem; padding: 0.25rem 0.75rem; border-radius: 9999px; cursor: pointer; white-space: nowrap; }\n.rc-tab:hover { color: var(--foreground); }\n.rc-tab[aria-selected=\"true\"] { background: var(--background); color: var(--foreground); box-shadow: var(--rc-shadow-soft); }\nhtml.dark .rc-tab[aria-selected=\"true\"] { background: var(--input); box-shadow: none; }\n\n/* ---------- table ---------- */\n.rc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--rc-radius-2xl); background: var(--card); }\n.rc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }\n.rc-table th { text-align: left; font-weight: 500; color: var(--muted-foreground); padding: 0.625rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }\n.rc-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }\n.rc-table tr:last-child td { border-bottom: 0; }\n/* IDs and amounts never break across lines; on narrow screens secondary columns go before the table scrolls. */\n.rc-table td.rc-mono, .rc-table td.rc-nums { white-space: nowrap; }\n@media (max-width: 639px) { .rc-table .rc-table__cell--secondary { display: none; } }\n@media (max-width: 767px) { .rc-table .rc-table__cell--tertiary { display: none; } }\n.rc-table tbody tr:hover { background: color-mix(in oklab, var(--accent) 50%, transparent); }\n\n/* ---------- stats (signature pattern) ---------- */\n.rc-stats { display: grid; grid-template-columns: 1fr; border: 1px solid var(--border); border-radius: var(--rc-radius-2xl); background: var(--card); overflow: hidden; }\n.rc-stats > .rc-stat + .rc-stat { border-top: 1px solid var(--border); }\n@media (min-width: 768px) {\n .rc-stats { grid-auto-flow: column; grid-auto-columns: 1fr; }\n .rc-stats > .rc-stat + .rc-stat { border-top: 0; border-left: 1px solid var(--border); }\n}\n.rc-stat { display: flex; flex-direction: column; gap: 1.5rem; padding: var(--rc-space-panel); min-width: 0; }\n.rc-stat__head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.875rem; }\n.rc-stat__head a { color: var(--muted-foreground); text-decoration: none; }\n.rc-stat__value { display: flex; align-items: baseline; gap: 0.75rem; }\n.rc-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }\n.rc-list > * { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; min-width: 0; }\n.rc-list > *:last-child { border-bottom: 0; }\n.rc-list .rc-trailing { margin-left: auto; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }\n.rc-bar { flex: 1; height: 2px; border-radius: 9999px; background: var(--border); position: relative; }\n.rc-bar > span { position: absolute; inset-block: 0; left: 0; border-radius: inherit; background: color-mix(in oklab, var(--muted-foreground) 40%, transparent); }\n.rc-bar--active > span { background: var(--foreground); }\n/* Bar row: label column fits the longest label (max 40%), then truncates; never overlaps the bar. */\n.rc-list:has(> .rc-bar-row) { display: grid; grid-template-columns: fit-content(40%) minmax(3rem, 1fr) auto; }\n.rc-list:has(> .rc-bar-row) > * { grid-column: 1 / -1; }\n.rc-bar-row { display: grid; grid-template-columns: fit-content(40%) minmax(3rem, 1fr) auto; column-gap: 1rem; align-items: center; }\n.rc-list > .rc-bar-row { grid-template-columns: subgrid; }\n.rc-bar-row > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.rc-bar-row > .rc-bar { flex: none; }\n.rc-bar-row > :last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }\n\n/* ---------- feedback ---------- */\n.rc-alert { display: grid; gap: 0.25rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--rc-radius-xl); background: var(--card); }\n.rc-alert--destructive { color: var(--destructive); border-color: color-mix(in oklab, var(--destructive) 40%, transparent); }\n.rc-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 4rem 1.5rem; text-align: center; }\n.rc-empty__icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; background: var(--muted); margin-bottom: 0.5rem; }\n.rc-avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9999px; border: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground); font-size: 0.625rem; letter-spacing: 0.04em; overflow: hidden; flex-shrink: 0; }\n.rc-kbd { display: inline-flex; align-items: center; height: 1.25rem; padding: 0 0.375rem; border-radius: var(--rc-radius-sm); background: var(--muted); color: var(--muted-foreground); font-family: var(--rc-font-mono); font-size: 0.75rem; }\n.rc-separator { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }\n\n/* ---------- dialog (native <dialog>) ---------- */\n.rc-dialog { width: min(32rem, calc(100% - 2rem)); padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--rc-radius-2xl); background: var(--panel); color: var(--foreground); box-shadow: var(--rc-shadow-float); }\n.rc-dialog::backdrop { background: rgb(0 0 0 / 0.4); backdrop-filter: blur(2px); }\n\n/* ---------- brand ---------- */\n.rc-brand { background: var(--brand); color: var(--brand-foreground); }\n.rc-brand-text { color: var(--brand); }\n.rc-logo { display: inline-block; width: 1.5rem; height: 1.5rem; border-radius: var(--rc-radius-sm); background: var(--brand); }\n\n/* ---------- Page structure (twins of @recanica/ui Page, PageHeader, Section, Surface, SurfaceGrid, ChoiceCard,\n * WebSection, WebSectionTitle, WebHeroTitle). The rhythm lives in the container: blocks carry no margins. ---------- */\n.rc-flow > * { margin-bottom: 0; }\n.rc-flow > * + * { margin-top: var(--rc-space-flow); }\n.rc-flow > * + :is(h2, h3, section, .rc-section) { margin-top: var(--rc-space-stack); }\n.rc-flow > :is(h2, h3, .rc-section__head) + * { margin-top: var(--rc-space-group); }\n.rc-flow > .rc-page-header + * { margin-top: var(--rc-space-stack); }\n.rc-reading { width: 100%; max-width: 48rem; }\n.rc-page-header { display: flex; flex-direction: column; gap: var(--rc-space-group); container-type: inline-size; }\n/* Title block + actions, matching React's PageHeader: stacked when narrow, one row (actions bottom-right) from 42rem of header width. */\n.rc-page-header__main { display: flex; flex-direction: column; gap: 1rem; }\n.rc-page-header__text { min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }\n.rc-page-header__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }\n@container (min-width: 42rem) {\n .rc-page-header__main { flex-direction: row; align-items: flex-end; justify-content: space-between; }\n .rc-page-header__actions { flex-shrink: 0; justify-content: flex-end; }\n}\n.rc-page-header__title { font-size: var(--rc-text-title); line-height: 1.2; letter-spacing: -0.02em; font-weight: 400; margin: 0; }\n.rc-page-header__desc { color: var(--muted-foreground); max-width: 65ch; margin: 0; }\n.rc-section { display: flex; flex-direction: column; }\n.rc-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }\n.rc-section__title { font-size: var(--rc-text-heading); line-height: 1.25; font-weight: 400; margin: 0; }\n.rc-surface { border: 1px solid var(--border); border-radius: calc(var(--radius) + 8px); background: var(--card); padding: var(--rc-space-inset); }\n.rc-surface--sm { border-radius: calc(var(--radius) + 4px); padding: var(--rc-space-inset-sm); }\n.rc-surface--lg { padding: var(--rc-space-panel); }\n.rc-surface--panel { background: var(--panel); }\n.rc-surface--plain { background: transparent; }\n.rc-surface-grid { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: calc(var(--radius) + 8px); background: var(--border); }\n.rc-surface-grid > * { background: var(--card); }\n.rc-choice { display: flex; align-items: center; gap: 0.75rem; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: var(--rc-space-inset-sm); background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }\n.rc-choice:hover, .rc-choice[aria-checked=\"true\"] { background: var(--accent); }\n.rc-choice[aria-checked=\"true\"] { border-color: color-mix(in oklab, var(--foreground) 40%, transparent); }\n.rc-web-section { padding: var(--rc-space-section) var(--rc-space-gutter); }\n.rc-web-section > * { max-width: var(--rc-container-content); margin-inline: auto; display: flex; flex-direction: column; gap: var(--rc-space-stack); }\n/* A narrow block (pricing, FAQ) centred as one unit: title, content and note share the centre line. */\n.rc-web-section--center > * { align-items: center; text-align: center; }\n.rc-web-section--center > * > * { margin-inline: auto; }\n.rc-section-title { font-size: var(--rc-text-display-sm); line-height: 1.1; letter-spacing: -0.02em; font-weight: 400; text-wrap: balance; margin: 0; }\n.rc-hero-title { font-size: var(--rc-text-display-md); line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; text-wrap: balance; margin: 0; }\n\n/* ---------- Layout and app-shell parts (twins of @recanica/ui layout.tsx, app-shell.tsx, nav-item.tsx).\n * App shell maps to the existing classes: AppShell = .rc-shell, AppSidebar = .rc-sidebar, AppPanel = .rc-panel. ---------- */\n.rc-centered-page { display: flex; min-height: 100svh; align-items: center; justify-content: center; background: var(--background); padding: 3rem var(--rc-space-gutter); }\n.rc-split { margin-inline: auto; display: grid; max-width: var(--rc-container-content); gap: 2.5rem; }\n@media (min-width: 64rem) { .rc-split { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; } .rc-split > :last-child { position: sticky; top: 5rem; } }\n.rc-top-bar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: blur(12px); }\n.rc-list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: var(--rc-space-inset-sm) var(--rc-space-inset); color: inherit; text-decoration: none; }\na.rc-list-row, button.rc-list-row { transition: background-color 150ms; } a.rc-list-row:hover, button.rc-list-row:hover { background: var(--accent); }\n.rc-icon-badge { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 9999px; width: 3rem; height: 3rem; background: var(--brand); color: var(--brand-foreground); }\n.rc-icon-badge--sm { width: 2rem; height: 2rem; } .rc-icon-badge--muted { background: var(--muted); color: var(--muted-foreground); }\n.rc-sidebar__header { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; padding: 0.25rem 0.5rem; }\n.rc-sidebar__sub { min-width: 0; margin: 0.25rem 0 0.25rem 1.25rem; display: flex; flex-direction: column; border-left: 1px solid var(--border); padding-left: 0.75rem; }\n.rc-nav-item--pill { width: auto; border-radius: 9999px; padding: 0.375rem 0.75rem; white-space: nowrap; }\n.rc-nav-item--tab { flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.625rem 0; font-size: 0.75rem; }\n"},"components":[{"slug":"page","title":"Page","category":"Layout","description":"Page structure: Page, PageHeader, Section, Heading, Stack, ReferenceTable. The single source for visual rhythm and page layout.","import":"@recanica/ui/components/page","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * Page structure: the single source for visual rhythm and page layout.\n * Pages compose these and never place their own spacing between blocks.\n *\n * Rhythm (tokens): inset · group (12) · flow (20, between blocks) · stack (40, between sections) · section (page bands).\n *\n * <Page width=\"reading\">\n * <PageHeader title=\"Invoices\" description=\"…\" actions={<Button>New invoice</Button>} />\n * <Section title=\"Overdue\" actions={…}>…</Section>\n * <Section title=\"Paid\">…</Section>\n * </Page>\n */\n\nconst widths = { reading: \"reading\", content: \"max-w-content\", full: \"\" } as const\n\n/** Page column. `flow` owns the spacing between its blocks; width is decided once for the whole column. */\nfunction Page({ width = \"full\", className, ...props }: React.ComponentProps<\"div\"> & { width?: keyof typeof widths }) {\n return <div data-slot=\"page\" className={cn(\"flow w-full\", widths[width], className)} {...props} />\n}\n\n/** The one page header: optional back link and eyebrow, title, description, actions. Container-aware. */\nfunction PageHeader({\n eyebrow,\n title,\n description,\n actions,\n back,\n className,\n children,\n}: {\n eyebrow?: React.ReactNode\n title: React.ReactNode\n description?: React.ReactNode\n actions?: React.ReactNode\n /** e.g. <a href=\"/invoices\">← Invoices</a>, rendered above the title */\n back?: React.ReactNode\n className?: string\n children?: React.ReactNode\n}) {\n return (\n <header data-slot=\"page-header\" className={cn(\"@container space-y-(--spacing-group)\", className)}>\n {back && <div className=\"-ml-3\">{back}</div>}\n <div className=\"flex flex-col gap-4 @2xl:flex-row @2xl:items-end @2xl:justify-between\">\n <div className=\"min-w-0 space-y-2\">\n {eyebrow && <p className=\"text-sm text-muted-foreground\">{eyebrow}</p>}\n <Heading level={1}>{title}</Heading>\n {description && <div className=\"max-w-[65ch] text-muted-foreground\">{description}</div>}\n </div>\n {actions && <div className=\"flex flex-wrap gap-2 @2xl:shrink-0 @2xl:justify-end\">{actions}</div>}\n </div>\n {children}\n </header>\n )\n}\n\nconst headingSize = { title: \"text-title\", heading: \"text-heading\", sm: \"text-lg\" } as const\nconst defaultSize = { 1: \"title\", 2: \"heading\", 3: \"sm\" } as const\n\n/**\n * The one heading style. `level` is the document outline (h1–h3); `size` is the visual step\n * (title / heading / sm), defaulting from the level. With an `id` it becomes a link to itself.\n */\nfunction Heading({ level = 2, size, id, className, children }: { level?: 1 | 2 | 3; size?: keyof typeof headingSize; id?: string; className?: string; children: React.ReactNode }) {\n const Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\"\n return (\n <Tag id={id} data-slot=\"heading\" className={cn(\"scroll-mt-20\", headingSize[size ?? defaultSize[level]], className)}>\n {id ? <a href={`#${id}`} className=\"hover:underline hover:underline-offset-4\">{children}</a> : children}\n </Tag>\n )\n}\n\n/** A titled group of blocks. Owns its rhythm: group gap under the heading, flow gap between its blocks. */\nfunction Section({\n id,\n title,\n description,\n actions,\n level = 2,\n className,\n children,\n}: {\n id?: string\n title?: React.ReactNode\n description?: React.ReactNode\n actions?: React.ReactNode\n level?: 2 | 3\n className?: string\n children?: React.ReactNode\n}) {\n return (\n <section data-slot=\"section\" aria-labelledby={id} className={cn(\"flow\", className)}>\n {(title || actions) && (\n <div data-slot=\"section-header\" className=\"flex flex-wrap items-center justify-between gap-x-4 gap-y-2\">\n <div className=\"min-w-0 space-y-1\">\n {title && <Heading level={level} id={id}>{title}</Heading>}\n {description && <p className=\"text-muted-foreground\">{description}</p>}\n </div>\n {actions && <div className=\"flex shrink-0 flex-wrap gap-2\">{actions}</div>}\n </div>\n )}\n {children}\n </section>\n )\n}\n\nconst stackGaps = { group: \"gap-(--spacing-group)\", flow: \"gap-(--spacing-flow)\", stack: \"gap-(--spacing-stack)\" } as const\n\n/** Vertical rhythm for anything that isn't a page column: cards in a sidebar, fields in a form, blocks in a panel. */\nfunction Stack({ gap = \"flow\", className, ...props }: React.ComponentProps<\"div\"> & { gap?: keyof typeof stackGaps }) {\n return <div data-slot=\"stack\" className={cn(\"flex min-w-0 flex-col\", stackGaps[gap], className)} {...props} />\n}\n\n/**\n * Reference table: a key column plus description columns.\n * `keys` says what the key column holds, decided by the author, never guessed:\n * \"label\" (default) → regular text that never wraps; \"code\" (token names, classes, commands) → mono, may break.\n */\nfunction ReferenceTable({ head, rows, keys = \"label\", className }: { head: string[]; rows: React.ReactNode[][]; keys?: \"label\" | \"code\"; className?: string }) {\n const codeKeys = keys === \"code\"\n return (\n <div data-slot=\"reference-table\" className={cn(\"overflow-x-auto rounded-2xl border\", className)}>\n <table className=\"w-full min-w-[32rem] text-sm\">\n <thead className=\"border-b bg-surface text-left text-muted-foreground\">\n <tr>{head.map((h) => <th key={h} className=\"px-(--spacing-inset-sm) py-2.5 font-normal whitespace-nowrap\">{h}</th>)}</tr>\n </thead>\n <tbody className=\"divide-y\">\n {rows.map((r, i) => (\n <tr key={i}>\n {r.map((c, j) => (\n <td\n key={j}\n className={cn(\n \"px-(--spacing-inset-sm) py-3 align-top\",\n j === 0 && (codeKeys ? \"font-mono text-xs [overflow-wrap:anywhere]\" : \"whitespace-nowrap text-foreground\"),\n j > 0 && \"text-muted-foreground\"\n )}\n >\n {c}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\nexport { Page, PageHeader, Heading, Section, Stack, ReferenceTable }\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Page, PageHeader, ReferenceTable, Section, Stack } from \"@recanica/ui/components/page\";\n\nexport default function PageDemo() {\n return (\n <Page width=\"reading\" className=\"w-full\">\n <PageHeader /* recanica-ignore: the eyebrow says where you are (Billing), not the heading again */ eyebrow=\"Billing\" title=\"Invoices\" description=\"Bill customers and track what you're owed.\" actions={<Button>New invoice</Button>} />\n <Section title=\"Rhythm\" description=\"The page owns spacing between blocks; nothing here sets its own margin.\">\n <ReferenceTable\n head={[\"Role\", \"Token\", \"Used for\"]}\n rows={[\n [\"group\", \"--spacing-group\", \"Heading → its content, label → field\"],\n [\"flow\", \"--spacing-flow\", \"Between blocks in a column\"],\n [\"stack\", \"--spacing-stack\", \"Between sections\"],\n ]}\n />\n </Section>\n <Section title=\"Stack\" description=\"Rhythm for anything that isn't a page column.\">\n <Stack gap=\"group\">\n <div className=\"h-10 rounded-xl border bg-card\" />\n <div className=\"h-10 rounded-xl border bg-card\" />\n </Stack>\n </Section>\n </Page>\n );\n}\n"},{"slug":"web-section","title":"Web Section","category":"Layout","description":"Marketing section shell and the one section title and hero headline: WebSection, WebSectionTitle, WebHeroTitle.","import":"@recanica/ui/components/web-section","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * Web section shell: the single source for marketing-section rhythm and section titles.\n * Page band padding (--spacing-section), content width, and one title style, so every section on a site matches.\n *\n * <WebSection title=\"Simple pricing\" description=\"…\" align=\"center\">…</WebSection>\n */\nfunction WebSection({\n id,\n eyebrow,\n title,\n description,\n actions,\n align = \"start\",\n size = \"default\",\n titleAs: Title = \"h2\",\n className,\n children,\n}: {\n id?: string\n eyebrow?: React.ReactNode\n title?: React.ReactNode\n description?: React.ReactNode\n actions?: React.ReactNode\n align?: \"start\" | \"center\"\n size?: \"default\" | \"compact\"\n /** \"h1\" when the section opens its page */\n titleAs?: \"h1\" | \"h2\"\n className?: string\n children?: React.ReactNode\n}) {\n return (\n <section\n id={id}\n data-slot=\"web-section\"\n className={cn(\"px-gutter\", size === \"compact\" ? \"py-section-sm\" : \"py-section\", className)}\n >\n <div className=\"mx-auto flex max-w-content flex-col gap-(--spacing-stack)\">\n {(title || eyebrow || description || actions) && (\n <WebSectionHeader eyebrow={eyebrow} title={title} description={description} actions={actions} align={align} titleAs={Title} />\n )}\n {children}\n </div>\n </section>\n )\n}\n\n/** The one section-title block: eyebrow, title, description, actions. Use alone when a section needs a custom body layout. */\nfunction WebSectionHeader({\n eyebrow,\n title,\n description,\n actions,\n align = \"start\",\n titleAs: Title = \"h2\",\n className,\n}: {\n eyebrow?: React.ReactNode\n title?: React.ReactNode\n description?: React.ReactNode\n actions?: React.ReactNode\n align?: \"start\" | \"center\"\n titleAs?: \"h1\" | \"h2\"\n className?: string\n}) {\n const center = align === \"center\"\n return (\n <div\n data-slot=\"web-section-header\"\n className={cn(\"flex flex-col gap-(--spacing-group)\", center ? \"items-center text-center\" : \"sm:flex-row sm:items-end sm:justify-between\", className)}\n >\n <div className={cn(\"flex max-w-2xl flex-col gap-(--spacing-group)\", center && \"items-center\")}>\n {eyebrow && <p className=\"text-sm text-muted-foreground\">{eyebrow}</p>}\n {title && <WebSectionTitle as={Title}>{title}</WebSectionTitle>}\n {description && <p className=\"text-lg text-pretty text-muted-foreground\">{description}</p>}\n </div>\n {actions && <div className=\"flex shrink-0 flex-wrap gap-2\">{actions}</div>}\n </div>\n )\n}\n\n/** The one section-title style for web sections. Width limits (max-w-*) may be passed; the type style may not drift. */\nfunction WebSectionTitle({ as: Tag = \"h2\", className, ...props }: React.ComponentProps<\"h2\"> & { as?: \"h1\" | \"h2\" }) {\n return <Tag data-slot=\"web-section-title\" className={cn(\"text-display-sm tracking-tight text-balance\", className)} {...props} />\n}\n\n/** The one hero headline (the page's h1 on landing pages). Sizes: default, or \"lg\" for a home hero. Colour may be the brand colour. */\nfunction WebHeroTitle({ size = \"default\", as: Tag = \"h1\", className, ...props }: React.ComponentProps<\"h1\"> & { size?: \"default\" | \"lg\"; as?: \"h1\" | \"h2\" }) {\n return (\n <Tag\n data-slot=\"web-hero-title\"\n className={cn(\"text-display-sm tracking-tight text-balance sm:text-display-md\", size === \"lg\" && \"lg:text-display-lg\", className)}\n {...props}\n />\n )\n}\n\nexport { WebSection, WebSectionHeader, WebSectionTitle, WebHeroTitle }\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebSection } from \"@recanica/ui/components/web-section\";\n\nexport default function WebSectionDemo() {\n return (\n <div className=\"w-full overflow-hidden rounded-2xl border bg-background\">\n <WebSection\n size=\"compact\"\n title=\"Simple pricing\"\n description=\"One plan for small teams, one for growing ones. No setup fees.\"\n actions={<Button variant=\"outline\">Compare plans</Button>}\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <div className=\"h-24 rounded-2xl border bg-card\" />\n <div className=\"h-24 rounded-2xl border bg-card\" />\n </div>\n </WebSection>\n </div>\n );\n}\n"},{"slug":"app-shell","title":"App Shell","category":"Layout","description":"Sidebar next to an inset panel that scrolls on its own: AppShell, AppSidebar, AppSidebarHeader, AppSidebarSub, AppPanel.","import":"@recanica/ui/components/app-shell","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * App shell: page-coloured sidebar next to an inset rounded panel that scrolls on its own (the Polar layout).\n * <AppShell sidebar={<AppSidebar>…</AppSidebar>}><AppPanel>…page…</AppPanel></AppShell>\n * Sidebar pieces: AppSidebar (column), AppSidebarHeader (logo + actions row), NavItem (rows), AppSidebarSub (nested rows with a rule).\n */\nfunction AppShell({ sidebar, className, children, ...props }: React.ComponentProps<\"div\"> & { sidebar?: React.ReactNode }) {\n return (\n <div data-slot=\"app-shell\" className={cn(\"flex h-svh overflow-hidden bg-sidebar text-foreground\", className)} {...props}>\n {sidebar}\n {children}\n </div>\n )\n}\n\n/** The inset content panel: its frame stays put, only the content scrolls. */\nfunction AppPanel({ className, ...props }: React.ComponentProps<\"main\">) {\n return <main data-slot=\"app-panel\" className={cn(\"min-h-0 flex-1 overflow-y-auto overscroll-contain rounded-2xl border bg-panel\", className)} {...props} />\n}\n\nfunction AppSidebar({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"app-sidebar\" className={cn(\"flex h-full min-w-0 flex-col gap-1 overflow-x-hidden overflow-y-auto p-3\", className)} {...props} />\n}\n\nfunction AppSidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"app-sidebar-header\" className={cn(\"mb-4 flex items-center justify-between px-2 py-1\", className)} {...props} />\n}\n\nfunction AppSidebarSub({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"app-sidebar-sub\" className={cn(\"my-1 ml-5 flex min-w-0 flex-col border-l pl-3\", className)} {...props} />\n}\n\nexport { AppShell, AppPanel, AppSidebar, AppSidebarHeader, AppSidebarSub }\n","example":"\"use client\";\n\nimport * as React from \"react\";\nimport { BoxIcon, LayoutGridIcon, UsersIcon } from \"lucide-react\";\nimport { AppPanel, AppShell, AppSidebar, AppSidebarHeader, AppSidebarSub } from \"@recanica/ui/components/app-shell\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\n\nexport default function AppShellDemo() {\n const [active, setActive] = React.useState(\"Catalogue\");\n return (\n <div className=\"@container w-full overflow-hidden rounded-2xl border [&>[data-slot=app-shell]]:h-80\">\n <AppShell\n sidebar={\n <aside className=\"hidden w-52 shrink-0 @lg:block\">\n <AppSidebar>\n <AppSidebarHeader><span className=\"size-5 rounded-md bg-brand\" aria-label=\"Logo\" /></AppSidebarHeader>\n <NavItem variant=\"sidebar\" active={active === \"Overview\"} onClick={() => setActive(\"Overview\")}><LayoutGridIcon className=\"size-4\" /> Overview</NavItem>\n <NavItem variant=\"sidebar\" active={[\"Catalogue\", \"Discounts\"].includes(active)} onClick={() => setActive(\"Catalogue\")}><BoxIcon className=\"size-4\" /> Products</NavItem>\n <AppSidebarSub>\n {[\"Catalogue\", \"Discounts\"].map((c) => <NavItem key={c} variant=\"sub\" active={active === c} onClick={() => setActive(c)}>{c}</NavItem>)}\n </AppSidebarSub>\n <NavItem variant=\"sidebar\" active={active === \"Customers\"} onClick={() => setActive(\"Customers\")}><UsersIcon className=\"size-4\" /> Customers</NavItem>\n </AppSidebar>\n </aside>\n }\n >\n <div className=\"flex min-w-0 flex-1 flex-col p-2 @lg:pl-0\">\n <AppPanel className=\"flex items-center justify-center text-sm text-muted-foreground\">{active}</AppPanel>\n </div>\n </AppShell>\n </div>\n );\n}\n"},{"slug":"layout","title":"Layout","category":"Layout","description":"Page-level shapes: CenteredPage, SplitLayout (main + aside), TopBar, ListRow, IconBadge.","import":"@recanica/ui/components/layout","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * Layout parts: the page-level shapes Recanica pages repeat. Use these instead of writing the grid or flex by hand.\n * CenteredPage — one thing in the middle of the screen (sign-in, verify, success, 404)\n * SplitLayout — main content with a side panel (cart, checkout, detail + summary)\n * TopBar — sticky, blurred header bar\n * ListRow — a row in a bordered list; interactive when it's a link or button\n * IconBadge — an icon in a circle (success, empty and feature states)\n */\n\nfunction CenteredPage({ className, ...props }: React.ComponentProps<\"main\">) {\n return <main data-slot=\"centered-page\" className={cn(\"flex min-h-svh items-center justify-center bg-background px-gutter py-12\", className)} {...props} />\n}\n\n/** Two children: the main content, then the side panel (22rem, sticky on desktop). Stacks on small screens. */\nfunction SplitLayout({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"split-layout\"\n className={cn(\"mx-auto grid max-w-content gap-10 lg:grid-cols-[minmax(0,1fr)_22rem] lg:items-start [&>*:last-child]:lg:sticky [&>*:last-child]:lg:top-20\", className)}\n {...props}\n />\n )\n}\n\nfunction TopBar({ className, ...props }: React.ComponentProps<\"header\">) {\n return <header data-slot=\"top-bar\" className={cn(\"sticky top-0 z-40 border-b bg-background/80 backdrop-blur-md\", className)} {...props} />\n}\n\ntype ListRowProps<T extends React.ElementType> = { as?: T; className?: string } & Omit<React.ComponentPropsWithoutRef<T>, \"as\" | \"className\">\n\n/** A row in a list (use inside a Surface or a divide-y list). Rendered as a link or button, it gets the hover state. */\nfunction ListRow<T extends React.ElementType = \"div\">({ as, className, ...props }: ListRowProps<T>) {\n const Tag = (as ?? \"div\") as React.ElementType\n const interactive = as !== undefined && as !== \"div\" && as !== \"li\"\n return (\n <Tag\n data-slot=\"list-row\"\n className={cn(\n \"flex flex-wrap items-center gap-x-4 gap-y-2 px-(--spacing-inset) py-(--spacing-inset-sm)\",\n interactive && \"group transition-colors outline-none hover:bg-accent focus-visible:bg-accent\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst iconBadgeSize = { sm: \"size-8 [&_svg]:size-4\", md: \"size-10 [&_svg]:size-5\", lg: \"size-12 [&_svg]:size-6\" } as const\nconst iconBadgeTone = { brand: \"bg-brand text-brand-foreground\", muted: \"bg-muted text-muted-foreground\", success: \"bg-success/12 text-success\" } as const\n\nfunction IconBadge({ size = \"lg\", tone = \"brand\", className, ...props }: React.ComponentProps<\"span\"> & { size?: keyof typeof iconBadgeSize; tone?: keyof typeof iconBadgeTone }) {\n return <span data-slot=\"icon-badge\" className={cn(\"inline-flex shrink-0 items-center justify-center rounded-full\", iconBadgeSize[size], iconBadgeTone[tone], className)} {...props} />\n}\n\nexport { CenteredPage, SplitLayout, TopBar, ListRow, IconBadge }\n","example":"\"use client\";\n\nimport { CheckIcon } from \"lucide-react\";\nimport { IconBadge, ListRow, SplitLayout } from \"@recanica/ui/components/layout\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nexport default function LayoutDemo() {\n return (\n <div className=\"w-full max-w-3xl\">\n <SplitLayout>\n <Surface inset=\"none\" className=\"divide-y overflow-hidden\">\n {[\"Invoice INV-0042 paid\", \"Nadia joined the team\", \"Payout of RM 4,820 sent\"].map((t) => (\n <ListRow key={t} as=\"button\" type=\"button\" className=\"w-full text-left text-sm\">\n <IconBadge size=\"sm\" tone=\"muted\"><CheckIcon /></IconBadge>\n <span className=\"flex-1\">{t}</span>\n </ListRow>\n ))}\n </Surface>\n <Surface tone=\"panel\" className=\"text-sm\">Side panel: totals, filters or facts. Sticky on desktop.</Surface>\n </SplitLayout>\n </div>\n );\n}\n"},{"slug":"surface","title":"Surface","category":"Layout","description":"The one bordered box (tone, inset) and SurfaceGrid for hairline-divided cells. Use instead of hand-written cards.","import":"@recanica/ui/components/surface","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * Surface — the one bordered box. Use it instead of hand-writing \"rounded-2xl border p-…\".\n * Choices are fixed on purpose: tone (which layer) and inset (padding from the rhythm tokens).\n * Need a header/body/footer structure? Use Card. Need something else? Change this part, not the page.\n */\nconst surfaceVariants = cva(\"border\", {\n variants: {\n size: {\n default: \"rounded-2xl\",\n sm: \"rounded-xl\",\n },\n tone: {\n card: \"bg-card text-card-foreground\",\n panel: \"bg-panel\",\n plain: \"\",\n muted: \"bg-muted/40\",\n },\n inset: {\n none: \"\",\n tight: \"px-3 py-2\",\n sm: \"p-(--spacing-inset-sm)\",\n default: \"p-(--spacing-inset)\",\n lg: \"p-(--spacing-panel)\",\n },\n dashed: { true: \"border-dashed\", false: \"\" },\n },\n defaultVariants: { size: \"default\", tone: \"card\", inset: \"default\", dashed: false },\n})\n\ntype SurfaceProps<T extends React.ElementType> = { as?: T; className?: string } & VariantProps<typeof surfaceVariants> &\n Omit<React.ComponentPropsWithoutRef<T>, \"as\" | \"className\">\n\n/** `as` renders the surface as another element (section, li, article, a link component…). */\nfunction Surface<T extends React.ElementType = \"div\">({ as, className, size, tone, inset, dashed, ...props }: SurfaceProps<T>) {\n const Tag = (as ?? \"div\") as React.ElementType\n return <Tag data-slot=\"surface\" className={cn(surfaceVariants({ size, tone, inset, dashed }), className)} {...props} />\n}\n\n/**\n * SurfaceGrid — cells separated by hairlines inside one bordered surface (stats, features, logos, details).\n * The grid supplies the border, radius and dividers; give it the column classes (sm:grid-cols-3 …). Cells take the card background.\n */\nfunction SurfaceGrid<T extends React.ElementType = \"div\">({ as, className, ...props }: { as?: T; className?: string } & Omit<React.ComponentPropsWithoutRef<T>, \"as\" | \"className\">) {\n const Tag = (as ?? \"div\") as React.ElementType\n return <Tag data-slot=\"surface-grid\" className={cn(\"grid gap-px overflow-hidden rounded-2xl border bg-border *:bg-card\", className)} {...props} />\n}\n\nexport { Surface, SurfaceGrid, surfaceVariants }\n","example":"\"use client\";\n\nimport { Surface, SurfaceGrid } from \"@recanica/ui/components/surface\";\n\nexport default function SurfaceDemo() {\n return (\n <div className=\"@container grid w-full max-w-xl gap-4\">\n <Surface>Card tone, default inset.</Surface>\n <Surface tone=\"panel\" inset=\"lg\">Panel tone, large inset.</Surface>\n <Surface size=\"sm\" inset=\"sm\" dashed tone=\"plain\">Small, dashed, plain.</Surface>\n <SurfaceGrid className=\"@sm:grid-cols-3\">\n {[\"Paid\", \"Overdue\", \"Draft\"].map((x) => <div key={x} className=\"p-(--spacing-inset) text-sm\">{x}</div>)}\n </SurfaceGrid>\n </div>\n );\n}\n"},{"slug":"nav-item","title":"Nav Item","category":"Navigation","description":"The one selectable row: sidebar, top-nav pills, list rows, bottom tabs. Active state included.","import":"@recanica/ui/components/nav-item","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * NavItem — the one selectable row: sidebar and top-nav items, list/detail rows, inbox rows, option lists.\n * `active` marks the current item (accent background + aria-current). `variant=\"tab\"` is the icon-over-label bottom tab.\n * Renders a <button> by default; pass `as={Link}` (or \"a\") for navigation.\n * Sidebar and sub items wrap a long label onto the next line, like any docs menu: never cut off, never scrolling sideways.\n */\nconst navItemVariants = cva(\n \"flex w-full min-w-0 text-left text-sm transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"items-start gap-3 rounded-xl px-3 py-2.5 hover:bg-accent data-[active=true]:bg-accent data-[active=true]:text-foreground\",\n sidebar: \"items-start gap-3 rounded-lg px-3 py-2 text-sidebar-foreground [&>svg]:mt-0.5 [&>svg]:shrink-0 hover:text-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-foreground\",\n sub: \"items-start py-1.5 text-sidebar-foreground hover:text-foreground data-[active=true]:text-foreground\",\n pill: \"w-auto shrink-0 items-center rounded-full px-3 py-1.5 whitespace-nowrap text-muted-foreground hover:text-foreground data-[active=true]:bg-accent data-[active=true]:text-foreground\",\n tab: \"flex-col items-center gap-1 py-2.5 text-xs text-muted-foreground data-[active=true]:text-foreground\",\n },\n },\n defaultVariants: { variant: \"default\" },\n }\n)\n\ntype NavItemProps<T extends React.ElementType> = { as?: T; active?: boolean; className?: string } & VariantProps<typeof navItemVariants> &\n Omit<React.ComponentPropsWithoutRef<T>, \"as\" | \"className\">\n\nfunction NavItem<T extends React.ElementType = \"button\">({ as, active, variant, className, children, ...props }: NavItemProps<T>) {\n const Tag = (as ?? \"button\") as React.ElementType\n // Like any docs menu: a long sidebar label wraps under its first word. Never cut off, never widens the sidebar.\n const menu = variant === \"sidebar\" || variant === \"sub\"\n const label = menu\n ? React.Children.map(children, (c) => (typeof c === \"string\" || typeof c === \"number\" ? <span className=\"min-w-0 flex-1 [overflow-wrap:anywhere]\">{c}</span> : c))\n : children\n return (\n <Tag\n data-slot=\"nav-item\"\n data-active={active || undefined}\n aria-current={active ? \"page\" : undefined}\n {...(Tag === \"button\" ? { type: \"button\" } : {})}\n className={cn(navItemVariants({ variant }), className)}\n {...props}\n >\n {label}\n </Tag>\n )\n}\n\nexport { NavItem, navItemVariants }\n","example":"\"use client\";\n\nimport * as React from \"react\";\nimport { HomeIcon, InboxIcon, SettingsIcon } from \"lucide-react\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\n\nexport default function NavItemDemo() {\n const [active, setActive] = React.useState(\"Inbox\");\n const items = [[\"Home\", HomeIcon], [\"Inbox\", InboxIcon], [\"Settings\", SettingsIcon]] as const;\n return (\n <div className=\"grid w-full max-w-xl gap-6 sm:grid-cols-2\">\n <nav aria-label=\"Rows\" className=\"flex flex-col gap-0.5\">\n {items.map(([l, I]) => <NavItem key={l} active={active === l} onClick={() => setActive(l)} className=\"items-center\"><I className=\"size-4\" /> {l}</NavItem>)}\n </nav>\n <nav aria-label=\"Pills\" className=\"flex flex-wrap gap-1\">\n {items.map(([l]) => <NavItem key={l} variant=\"pill\" active={active === l} onClick={() => setActive(l)}>{l}</NavItem>)}\n </nav>\n </div>\n );\n}\n"},{"slug":"choice-card","title":"Choice Card","category":"Forms","description":"One option among several, picked by clicking the card (radio semantics); media variant for thumbnails.","import":"@recanica/ui/components/choice-card","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * ChoiceCard — one option among several, picked by clicking the whole card (radio semantics).\n * Wrap a set in an element with role=\"radiogroup\" and an aria-label. `variant=\"media\"` is an image thumbnail.\n */\nconst choiceCardVariants = cva(\n \"text-left text-sm transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"flex items-center gap-3 rounded-xl border p-(--spacing-inset-sm) hover:bg-accent aria-checked:border-foreground/40 aria-checked:bg-accent\",\n media: \"rounded-xl border bg-muted aria-checked:ring-2 aria-checked:ring-foreground aria-checked:ring-offset-2 aria-checked:ring-offset-background\",\n },\n },\n defaultVariants: { variant: \"default\" },\n }\n)\n\nfunction ChoiceCard({\n checked,\n onSelect,\n variant,\n className,\n ...props\n}: Omit<React.ComponentProps<\"button\">, \"onSelect\"> & VariantProps<typeof choiceCardVariants> & { checked?: boolean; onSelect?: () => void }) {\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={!!checked}\n data-slot=\"choice-card\"\n onClick={onSelect}\n className={cn(choiceCardVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\n/** The small radio dot shown at the end of a default ChoiceCard. */\nfunction ChoiceIndicator({ checked }: { checked?: boolean }) {\n return <span aria-hidden className={cn(\"size-4 shrink-0 rounded-full border\", checked && \"border-[5px] border-foreground\")} />\n}\n\nexport { ChoiceCard, ChoiceIndicator, choiceCardVariants }\n","example":"\"use client\";\n\nimport * as React from \"react\";\nimport { ChoiceCard, ChoiceIndicator } from \"@recanica/ui/components/choice-card\";\n\nexport default function ChoiceCardDemo() {\n const [v, setV] = React.useState(\"fpx\");\n const opts = [[\"fpx\", \"FPX online banking\"], [\"duitnow\", \"DuitNow QR\"], [\"card\", \"Card\"]];\n return (\n <div role=\"radiogroup\" aria-label=\"Payment method\" className=\"grid w-full max-w-sm gap-2\">\n {opts.map(([id, label]) => (\n <ChoiceCard key={id} checked={v === id} onSelect={() => setV(id)}>\n <span className=\"flex-1\">{label}</span>\n <ChoiceIndicator checked={v === id} />\n </ChoiceCard>\n ))}\n </div>\n );\n}\n"},{"slug":"button","title":"Button","category":"Actions","description":"Pill-shaped action with variants for every level of emphasis.","import":"@recanica/ui/components/button","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nconst buttonVariants = cva(\n \"inline-flex max-w-full min-w-0 shrink-0 items-center justify-center gap-2 rounded-full text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40\",\n outline:\n \"border bg-transparent hover:bg-accent hover:text-accent-foreground dark:border-input dark:hover:bg-accent\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n brand: \"bg-brand text-brand-foreground hover:bg-brand/90\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n xs: \"h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1.5 rounded-full px-3 has-[>svg]:px-2.5\",\n lg: \"h-11 rounded-full px-6 text-base has-[>svg]:px-5\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 rounded-full [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n // A text action inside a sentence (\"Resend code\", \"browse\"): no height or padding, keeps the line's rhythm.\n inline: \"h-auto rounded-sm p-0 align-baseline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","example":"\"use client\";\n\nimport { ArrowRightIcon, PlusIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Spinner } from \"@recanica/ui/components/spinner\";\n\nexport default function ButtonDemo() {\n return (\n <div className=\"flex flex-wrap items-center justify-center gap-3\">\n <Button>Default</Button>\n <Button variant=\"brand\">Brand <ArrowRightIcon /></Button>\n <Button variant=\"secondary\">Secondary</Button>\n <Button variant=\"outline\">Outline</Button>\n <Button variant=\"ghost\">Ghost</Button>\n <Button variant=\"link\">Link</Button>\n <Button variant=\"destructive\">Delete</Button>\n <Button size=\"icon\" variant=\"outline\" aria-label=\"Add\"><PlusIcon /></Button>\n <Button disabled><Spinner /> Saving</Button>\n </div>\n );\n}\n"},{"slug":"button-group","title":"Button Group","category":"Actions","description":"Joins related buttons into a single control.","import":"@recanica/ui/components/button-group","source":"import { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nimport { Separator } from \"@recanica/ui/components/separator\"\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n","example":"\"use client\";\n\nimport { ChevronDownIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { ButtonGroup } from \"@recanica/ui/components/button-group\";\n\nexport default function ButtonGroupDemo() {\n return (\n <ButtonGroup>\n <Button variant=\"outline\">Archive</Button>\n <Button variant=\"outline\">Report</Button>\n <Button variant=\"outline\" size=\"icon\" aria-label=\"More\"><ChevronDownIcon /></Button>\n </ButtonGroup>\n );\n}\n"},{"slug":"toggle","title":"Toggle","category":"Actions","description":"A two-state button that can be on or off.","import":"@recanica/ui/components/toggle","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Toggle as TogglePrimitive } from \"radix-ui\"\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-9 min-w-9 px-2\",\n sm: \"h-8 min-w-8 px-1.5\",\n lg: \"h-10 min-w-10 px-2.5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Toggle({\n className,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Toggle, toggleVariants }\n","example":"\"use client\";\n\nimport { BookmarkIcon } from \"lucide-react\";\nimport { Toggle } from \"@recanica/ui/components/toggle\";\n\nexport default function ToggleDemo() {\n return (\n <div className=\"flex gap-2\">\n <Toggle aria-label=\"Bookmark\"><BookmarkIcon /> Bookmark</Toggle>\n <Toggle variant=\"outline\" aria-label=\"Bookmark\" defaultPressed><BookmarkIcon /></Toggle>\n </div>\n );\n}\n"},{"slug":"toggle-group","title":"Toggle Group","category":"Actions","description":"A set of toggles, single or multiple selection.","import":"@recanica/ui/components/toggle-group","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { ToggleGroup as ToggleGroupPrimitive } from \"radix-ui\"\n\nimport { toggleVariants } from \"@recanica/ui/components/toggle\"\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants> & {\n spacing?: number\n }\n>({\n size: \"default\",\n variant: \"default\",\n spacing: 0,\n})\n\nfunction ToggleGroup({\n className,\n variant,\n size,\n spacing = 0,\n children,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants> & {\n spacing?: number\n }) {\n return (\n <ToggleGroupPrimitive.Root\n data-slot=\"toggle-group\"\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n style={{ \"--gap\": spacing } as React.CSSProperties}\n className={cn(\n \"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs\",\n className\n )}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size, spacing }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n )\n}\n\nfunction ToggleGroupItem({\n className,\n children,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &\n VariantProps<typeof toggleVariants>) {\n const context = React.useContext(ToggleGroupContext)\n\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"toggle-group-item\"\n data-variant={context.variant || variant}\n data-size={context.size || size}\n data-spacing={context.spacing}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n \"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10\",\n \"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l\",\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n )\n}\n\nexport { ToggleGroup, ToggleGroupItem }\n","example":"\"use client\";\n\nimport { AlignCenterIcon, AlignLeftIcon, AlignRightIcon } from \"lucide-react\";\nimport { ToggleGroup, ToggleGroupItem } from \"@recanica/ui/components/toggle-group\";\n\nexport default function ToggleGroupDemo() {\n return (\n <ToggleGroup type=\"single\" defaultValue=\"left\" variant=\"outline\">\n <ToggleGroupItem value=\"left\" aria-label=\"Align left\"><AlignLeftIcon /></ToggleGroupItem>\n <ToggleGroupItem value=\"center\" aria-label=\"Align center\"><AlignCenterIcon /></ToggleGroupItem>\n <ToggleGroupItem value=\"right\" aria-label=\"Align right\"><AlignRightIcon /></ToggleGroupItem>\n </ToggleGroup>\n );\n}\n"},{"slug":"input","title":"Input","category":"Forms","description":"Single-line text field.","import":"@recanica/ui/components/input","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { useFieldInvalid } from \"@recanica/ui/components/field\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n const invalid = useFieldInvalid()\n return (\n <input\n type={type}\n data-slot=\"input\"\n aria-invalid={props[\"aria-invalid\"] ?? (invalid || undefined)}\n className={cn(\n \"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"group-data-[invalid=true]/field:border-destructive group-data-[invalid=true]/field:bg-destructive/[0.04] group-data-[invalid=true]/field:ring-[3px] group-data-[invalid=true]/field:ring-destructive/15 aria-invalid:bg-destructive/[0.04] aria-invalid:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","example":"\"use client\";\n\nimport { Input } from \"@recanica/ui/components/input\";\n\nexport default function InputDemo() {\n return (\n <div className=\"grid w-full max-w-sm gap-3\">\n <Input placeholder=\"name@company.example\" aria-label=\"name@company.example\" type=\"email\" />\n <Input placeholder=\"Disabled\" aria-label=\"Disabled\" disabled />\n <Input placeholder=\"Invalid\" aria-label=\"Invalid\" aria-invalid />\n </div>\n );\n}\n"},{"slug":"input-group","title":"Input Group","category":"Forms","description":"Input with leading/trailing addons, text or buttons.","import":"@recanica/ui/components/input-group","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nimport { Button } from \"@recanica/ui/components/button\"\nimport { Input } from \"@recanica/ui/components/input\"\nimport { Textarea } from \"@recanica/ui/components/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30\",\n \"h-9 min-w-0 has-[>textarea]:h-auto\",\n\n // Variants based on alignment.\n \"has-[>[data-align=inline-start]]:[&>input]:pl-2\",\n \"has-[>[data-align=inline-end]]:[&>input]:pr-2\",\n \"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3\",\n \"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3\",\n\n // Focus state.\n \"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50\",\n\n // Error state.\n \"group-data-[invalid=true]/field:border-destructive group-data-[invalid=true]/field:ring-[3px] group-data-[invalid=true]/field:ring-destructive/15 group-data-[invalid=true]/field:bg-destructive/[0.04] has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40\",\n\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4\", /* recanica-ignore: nested radius = parent radius minus inset */\n {\n variants: {\n align: {\n \"inline-start\":\n \"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]\",\n \"inline-end\":\n \"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3\",\n \"block-end\":\n \"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5\", /* recanica-ignore: nested radius = parent radius minus inset */\n sm: \"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0\", /* recanica-ignore: nested radius = parent radius minus inset */\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent\",\n // The group draws the invalid state; the inner control stays plain so it isn't highlighted twice.\n \"aria-invalid:bg-transparent aria-invalid:ring-0 group-data-[invalid=true]/field:bg-transparent group-data-[invalid=true]/field:ring-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent aria-invalid:bg-transparent aria-invalid:ring-0 group-data-[invalid=true]/field:bg-transparent group-data-[invalid=true]/field:ring-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n","example":"\"use client\";\n\nimport { SearchIcon } from \"lucide-react\";\nimport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupButton } from \"@recanica/ui/components/input-group\";\n\nexport default function InputGroupDemo() {\n return (\n <div className=\"grid w-full max-w-sm gap-3\">\n <InputGroup>\n <InputGroupAddon><SearchIcon /></InputGroupAddon>\n <InputGroupInput placeholder=\"Search customers\" aria-label=\"Search customers\" />\n </InputGroup>\n <InputGroup>\n <InputGroupAddon><InputGroupText>$</InputGroupText></InputGroupAddon>\n <InputGroupInput placeholder=\"0.00\" aria-label=\"0.00\" inputMode=\"decimal\" />\n <InputGroupAddon align=\"inline-end\"><InputGroupText>USD</InputGroupText></InputGroupAddon>\n </InputGroup>\n <InputGroup>\n <InputGroupInput defaultValue=\"aturanica.com/c/pro-yearly\" readOnly aria-label=\"Checkout link\" />\n <InputGroupAddon align=\"inline-end\"><InputGroupButton>Copy</InputGroupButton></InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n"},{"slug":"textarea","title":"Textarea","category":"Forms","description":"Multi-line text field.","import":"@recanica/ui/components/textarea","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { useFieldInvalid } from \"@recanica/ui/components/field\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n const invalid = useFieldInvalid()\n return (\n <textarea\n data-slot=\"textarea\"\n aria-invalid={props[\"aria-invalid\"] ?? (invalid || undefined)}\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 group-data-[invalid=true]/field:border-destructive group-data-[invalid=true]/field:bg-destructive/[0.04] group-data-[invalid=true]/field:ring-[3px] group-data-[invalid=true]/field:ring-destructive/15 aria-invalid:bg-destructive/[0.04] aria-invalid:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n","example":"\"use client\";\n\nimport { Textarea } from \"@recanica/ui/components/textarea\";\n\nexport default function TextareaDemo() {\n return <Textarea className=\"max-w-md\" placeholder=\"Describe your product…\" aria-label=\"Describe your product…\" />;\n}\n"},{"slug":"select","title":"Select","category":"Forms","description":"Pick one option from a popover list.","import":"@recanica/ui/components/select","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 group-data-[invalid=true]/field:border-destructive group-data-[invalid=true]/field:bg-destructive/[0.04] group-data-[invalid=true]/field:ring-[3px] group-data-[invalid=true]/field:ring-destructive/15 aria-invalid:bg-destructive/[0.04] aria-invalid:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","example":"\"use client\";\n\nimport { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from \"@recanica/ui/components/select\";\n\nexport default function SelectDemo() {\n return (\n <Select defaultValue=\"all\">\n <SelectTrigger className=\"w-56\"><SelectValue placeholder=\"Product\" /></SelectTrigger>\n <SelectContent>\n <SelectGroup>\n <SelectLabel>Products</SelectLabel>\n <SelectItem value=\"all\">All products</SelectItem>\n <SelectItem value=\"pro\">Pro</SelectItem>\n <SelectItem value=\"starter\">Starter</SelectItem>\n </SelectGroup>\n </SelectContent>\n </Select>\n );\n}\n"},{"slug":"native-select","title":"Native Select","category":"Forms","description":"Styled browser select, best on mobile.","import":"@recanica/ui/components/native-select","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction NativeSelect({\n className,\n size = \"default\",\n ...props\n}: Omit<React.ComponentProps<\"select\">, \"size\"> & { size?: \"sm\" | \"default\" }) {\n return (\n <div\n className=\"group/native-select relative w-fit has-[select:disabled]:opacity-50\"\n data-slot=\"native-select-wrapper\"\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n \"h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"group-data-[invalid=true]/field:border-destructive group-data-[invalid=true]/field:bg-destructive/[0.04] group-data-[invalid=true]/field:ring-[3px] group-data-[invalid=true]/field:ring-destructive/15 aria-invalid:bg-destructive/[0.04] aria-invalid:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n <ChevronDownIcon\n className=\"pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({\n className,\n ...props\n}: React.ComponentProps<\"option\">) {\n return (\n <option\n data-slot=\"native-select-option\"\n className={cn(\"bg-[Canvas] text-[CanvasText]\", className)}\n {...props}\n />\n )\n}\n\nfunction NativeSelectOptGroup({\n className,\n ...props\n}: React.ComponentProps<\"optgroup\">) {\n return (\n <optgroup\n data-slot=\"native-select-optgroup\"\n className={cn(\"bg-[Canvas] text-[CanvasText]\", className)}\n {...props}\n />\n )\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n","example":"\"use client\";\n\nimport { NativeSelect, NativeSelectOption } from \"@recanica/ui/components/native-select\";\n\nexport default function NativeSelectDemo() {\n return (\n <NativeSelect className=\"w-56\" defaultValue=\"monthly\" aria-label=\"Billing cycle\">\n <NativeSelectOption value=\"monthly\">Monthly</NativeSelectOption>\n <NativeSelectOption value=\"yearly\">Yearly</NativeSelectOption>\n <NativeSelectOption value=\"one-time\">One-time</NativeSelectOption>\n </NativeSelect>\n );\n}\n"},{"slug":"combobox","title":"Combobox","category":"Forms","description":"Searchable select with autocomplete.","import":"@recanica/ui/components/combobox","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CheckIcon, ChevronDownIcon, XIcon } from \"lucide-react\"\n\nimport { Button } from \"@recanica/ui/components/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@recanica/ui/components/input-group\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon\n data-slot=\"combobox-trigger-icon\"\n className=\"pointer-events-none size-4 text-muted-foreground\"\n />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n <InputGroup className={cn(\"w-auto\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n \"group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n data-slot=\"combobox-item-indicator\"\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none size-4 pointer-coarse:size-5\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\n \"px-2 py-1.5 text-xs text-muted-foreground pointer-coarse:px-3 pointer-coarse:py-2 pointer-coarse:text-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\"min-w-16 flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n","example":"\"use client\";\n\nimport { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList } from \"@recanica/ui/components/combobox\";\n\nconst countries = [\"Malaysia\", \"Singapore\", \"Indonesia\", \"Thailand\", \"Philippines\", \"Vietnam\", \"Japan\", \"Australia\"];\n\nexport default function ComboboxDemo() {\n return (\n <Combobox items={countries}>\n <ComboboxInput aria-label=\"Country\" placeholder=\"Select a country\" className=\"w-full max-w-64\" />\n <ComboboxContent>\n <ComboboxEmpty>No country found.</ComboboxEmpty>\n <ComboboxList>\n {(item: string) => <ComboboxItem key={item} value={item}>{item}</ComboboxItem>}\n </ComboboxList>\n </ComboboxContent>\n </Combobox>\n );\n}\n"},{"slug":"checkbox","title":"Checkbox","category":"Forms","description":"Toggle a single option on or off.","import":"@recanica/ui/components/checkbox","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CheckIcon } from \"lucide-react\"\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\"\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary\", /* recanica-ignore: a 16px checkbox needs a small corner */\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n","example":"\"use client\";\n\nimport { Checkbox } from \"@recanica/ui/components/checkbox\";\nimport { Label } from \"@recanica/ui/components/label\";\n\nexport default function CheckboxDemo() {\n return (\n <div className=\"grid gap-3\">\n <div className=\"flex items-center gap-2\"><Checkbox id=\"c1\" defaultChecked /><Label htmlFor=\"c1\">Send receipts by email</Label></div>\n <div className=\"flex items-center gap-2\"><Checkbox id=\"c2\" /><Label htmlFor=\"c2\">Collect tax ID at checkout</Label></div>\n <div className=\"flex items-center gap-2\"><Checkbox id=\"c3\" disabled /><Label htmlFor=\"c3\">Require phone number</Label></div>\n </div>\n );\n}\n"},{"slug":"radio-group","title":"Radio Group","category":"Forms","description":"Pick exactly one option from a set.","import":"@recanica/ui/components/radio-group","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CircleIcon } from \"lucide-react\"\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\"\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn(\"grid gap-3\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n","example":"\"use client\";\n\nimport { RadioGroup, RadioGroupItem } from \"@recanica/ui/components/radio-group\";\nimport { Label } from \"@recanica/ui/components/label\";\n\nexport default function RadioGroupDemo() {\n return (\n <RadioGroup defaultValue=\"monthly\">\n {[\"Monthly\", \"Yearly\", \"One-time\"].map((v) => (\n <div key={v} className=\"flex items-center gap-2\">\n <RadioGroupItem value={v.toLowerCase()} id={`r-${v}`} />\n <Label htmlFor={`r-${v}`}>{v}</Label>\n </div>\n ))}\n </RadioGroup>\n );\n}\n"},{"slug":"switch","title":"Switch","category":"Forms","description":"Instant on/off setting.","import":"@recanica/ui/components/switch","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Switch as SwitchPrimitive } from \"radix-ui\"\n\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n \"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground\"\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","example":"\"use client\";\n\nimport { Switch } from \"@recanica/ui/components/switch\";\nimport { Label } from \"@recanica/ui/components/label\";\n\nexport default function SwitchDemo() {\n return (\n <div className=\"flex items-center gap-3\">\n <Switch id=\"s1\" defaultChecked />\n <Label htmlFor=\"s1\">Email notifications</Label>\n </div>\n );\n}\n"},{"slug":"slider","title":"Slider","category":"Forms","description":"Select a value from a range.","import":"@recanica/ui/components/slider","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slider as SliderPrimitive } from \"radix-ui\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n \"relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5\"\n )}\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className={cn(\n \"absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full\"\n )}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50\"\n />\n ))}\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n","example":"\"use client\";\n\nimport { Slider } from \"@recanica/ui/components/slider\";\n\nexport default function SliderDemo() {\n return <Slider defaultValue={[40]} max={100} step={1} className=\"max-w-sm\" />;\n}\n"},{"slug":"input-otp","title":"Input OTP","category":"Forms","description":"One-time passcode entry.","import":"@recanica/ui/components/input-otp","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\nimport { MinusIcon } from \"lucide-react\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex max-w-full min-w-0 items-center gap-2 has-disabled:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex min-w-0 items-center\", className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"relative flex h-9 w-9 min-w-7 shrink items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n","example":"\"use client\";\n\nimport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from \"@recanica/ui/components/input-otp\";\n\nexport default function InputOTPDemo() {\n return (\n <InputOTP maxLength={6} aria-label=\"Verification code\">\n <InputOTPGroup>\n <InputOTPSlot index={0} /><InputOTPSlot index={1} /><InputOTPSlot index={2} />\n </InputOTPGroup>\n <InputOTPSeparator />\n <InputOTPGroup>\n <InputOTPSlot index={3} /><InputOTPSlot index={4} /><InputOTPSlot index={5} />\n </InputOTPGroup>\n </InputOTP>\n );\n}\n"},{"slug":"label","title":"Label","category":"Forms","description":"Accessible label for a form control.","import":"@recanica/ui/components/label","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Label as LabelPrimitive } from \"radix-ui\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","example":"\"use client\";\n\nimport { Label } from \"@recanica/ui/components/label\";\nimport { Input } from \"@recanica/ui/components/input\";\n\nexport default function LabelDemo() {\n return (\n <div className=\"grid w-full max-w-sm gap-2\">\n <Label htmlFor=\"org\">Organization name</Label>\n <Input id=\"org\" placeholder=\"Acme Studio\" />\n </div>\n );\n}\n"},{"slug":"field","title":"Field","category":"Forms","description":"Label, control, description and error as one unit.","import":"@recanica/ui/components/field","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { useMemo } from \"react\"\nimport { AlertCircleIcon, AlertTriangleIcon, CheckCircle2Icon, InfoIcon } from \"lucide-react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nimport { Label } from \"@recanica/ui/components/label\"\nimport { Separator } from \"@recanica/ui/components/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n \"flex flex-col gap-6\",\n \"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n \"mb-3 font-medium\",\n \"data-[variant=legend]:text-base\",\n \"data-[variant=label]:text-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n \"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-3\",\n {\n variants: {\n orientation: {\n vertical: [\"flex-col [&>*]:w-full [&>.sr-only]:w-auto\"],\n horizontal: [\n \"flex-row items-center\",\n \"[&>[data-slot=field-label]]:flex-auto\",\n \"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n ],\n responsive: [\n \"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto\",\n \"@md/field-group:[&>[data-slot=field-label]]:flex-auto\",\n \"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n ],\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\n/** Shared with controls inside a Field so they set aria-invalid and highlight themselves. */\nconst FieldStateContext = React.createContext<{ invalid: boolean }>({ invalid: false })\n\n/** For custom controls: true when the surrounding <Field data-invalid> is invalid. */\nfunction useFieldInvalid() {\n return React.useContext(FieldStateContext).invalid\n}\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof fieldVariants>) {\n const raw = (props as Record<string, unknown>)[\"data-invalid\"]\n const invalid = raw === true || raw === \"true\"\n const value = useMemo(() => ({ invalid }), [invalid])\n return (\n <FieldStateContext.Provider value={value}>\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n </FieldStateContext.Provider>\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n \"group/field-content flex flex-1 flex-col gap-1.5 leading-snug\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n \"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4\",\n \"has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n \"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n \"text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance\",\n \"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5\",\n \"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n \"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2\",\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"relative mx-auto block w-fit bg-background px-2 text-muted-foreground\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <FieldMessage tone=\"error\" data-slot=\"field-error\" className={className} {...props}>\n {content}\n </FieldMessage>\n )\n}\n\nconst messageTone = {\n info: { icon: InfoIcon, className: \"bg-muted text-muted-foreground\" },\n success: { icon: CheckCircle2Icon, className: \"bg-success/10 text-success\" },\n warning: { icon: AlertTriangleIcon, className: \"bg-warning/12 text-warning\" },\n error: { icon: AlertCircleIcon, className: \"bg-destructive/10 text-destructive\" },\n} as const\n\n/**\n * Small inline notice under a field: help, success, warning or error.\n * Tinted background + icon so status reads at a glance; errors are announced (role=\"alert\").\n */\nfunction FieldMessage({\n tone = \"info\",\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & { tone?: keyof typeof messageTone }) {\n const t = messageTone[tone]\n const Icon = t.icon\n return (\n <div\n role={tone === \"error\" ? \"alert\" : \"status\"}\n data-slot=\"field-message\"\n data-tone={tone}\n className={cn(\"flex w-full items-start gap-2 rounded-lg px-2.5 py-1.5 text-[13px] leading-snug\", t.className, className)}\n {...props}\n >\n <Icon className=\"mt-px size-3.5 shrink-0\" aria-hidden />\n <div className=\"min-w-0 [overflow-wrap:anywhere]\">{children}</div>\n </div>\n )\n}\n\nexport {\n useFieldInvalid,\n FieldMessage,\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n","example":"\"use client\";\n\nimport * as React from \"react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldMessage, FieldSet } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\n\nexport default function FieldDemo() {\n const [email, setEmail] = React.useState(\"nadia@acme\");\n const [slug, setSlug] = React.useState(\"acme-studio\");\n const [touched, setTouched] = React.useState(true);\n const emailErr = /^\\S+@\\S+\\.\\S+$/.test(email) ? \"\" : \"Enter a full email address, like nadia@acme.example.\";\n return (\n <form className=\"w-full max-w-md\" noValidate onSubmit={(e) => { e.preventDefault(); setTouched(true); }}>\n <FieldSet>\n <FieldLegend>Organization</FieldLegend>\n <FieldGroup>\n <Field>\n <FieldLabel htmlFor=\"f-name\">Name</FieldLabel>\n <Input id=\"f-name\" placeholder=\"Acme Studio\" />\n <FieldDescription>Shown on invoices and checkout.</FieldDescription>\n </Field>\n <Field data-invalid={touched && !!emailErr}>\n <FieldLabel htmlFor=\"f-email\">Billing email</FieldLabel>\n <Input id=\"f-email\" value={email} onChange={(e) => setEmail(e.target.value)} />\n {touched && emailErr ? <FieldError>{emailErr}</FieldError> : <FieldMessage tone=\"success\">Receipts will be sent here.</FieldMessage>}\n </Field>\n <Field>\n <FieldLabel htmlFor=\"f-slug\">Store URL</FieldLabel>\n <Input id=\"f-slug\" value={slug} onChange={(e) => setSlug(e.target.value)} />\n <FieldMessage tone=\"warning\">Changing this breaks links you've already shared.</FieldMessage>\n </Field>\n <FieldMessage tone=\"info\">Changes apply to new invoices only.</FieldMessage>\n <Button type=\"submit\" className=\"justify-self-start\">Save</Button>\n </FieldGroup>\n </FieldSet>\n </form>\n );\n}\n"},{"slug":"form","title":"Form","category":"Forms","description":"react-hook-form + zod bindings with field-level errors.","import":"@recanica/ui/components/form","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { FieldMessage } from \"@recanica/ui/components/field\"\nimport type { Label as LabelPrimitive } from \"radix-ui\"\nimport { Slot } from \"radix-ui\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from \"react-hook-form\"\n\nimport { Label } from \"@recanica/ui/components/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn(\"grid content-start gap-2\", className)}\n {...props}\n />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={className}\n htmlFor={formItemId}\n {...props}\n />\n )\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot.Root\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n )\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<\"p\">) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : props.children\n\n if (!body) {\n return null\n }\n\n // Errors use the same tinted notice as FieldError; plain children stay muted helper text.\n if (error) {\n return (\n <FieldMessage tone=\"error\" data-slot=\"form-message\" id={formMessageId} className={className}>\n {body}\n </FieldMessage>\n )\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n >\n {body}\n </p>\n )\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n","example":"\"use client\";\n\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { z } from \"zod\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from \"@recanica/ui/components/form\";\n\nconst schema = z.object({ email: z.string().email(\"Enter a valid email.\") });\n\nexport default function FormDemo() {\n const form = useForm<z.infer<typeof schema>>({ resolver: zodResolver(schema), defaultValues: { email: \"\" } });\n return (\n <Form {...form}>\n <form onSubmit={form.handleSubmit((v) => toast(`Invite sent to ${v.email}`))} className=\"w-full max-w-sm space-y-4\">\n <FormField\n control={form.control}\n name=\"email\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Email</FormLabel>\n <FormControl><Input placeholder=\"name@company.example\" {...field} /></FormControl>\n <FormDescription>We'll send an invite link.</FormDescription>\n <FormMessage />\n </FormItem>\n )}\n />\n <Button type=\"submit\">Send invite</Button>\n </form>\n </Form>\n );\n}\n"},{"slug":"calendar","title":"Calendar","category":"Forms","description":"Date picker grid.","minWidth":256,"import":"@recanica/ui/components/calendar","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from \"lucide-react\"\nimport {\n DayPicker,\n getDefaultClassNames,\n type DayButton,\n} from \"react-day-picker\"\n\nimport { Button, buttonVariants } from \"@recanica/ui/components/button\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"relative flex flex-col gap-4 md:flex-row\",\n defaultClassNames.months\n ),\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\n nav: cn(\n \"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) p-0 select-none aria-disabled:opacity-50\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute inset-0 bg-popover opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"font-medium select-none\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n defaultClassNames.caption_label\n ),\n month_grid: cn(\"w-full border-collapse\", defaultClassNames.month_grid),\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\n week_number_header: cn(\n \"w-(--cell-size) select-none\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] text-muted-foreground select-none\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-md\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-md bg-accent\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n today: cn(\n \"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return (\n <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />\n )\n }\n\n if (orientation === \"right\") {\n return (\n <ChevronRightIcon\n className={cn(\"size-4\", className)}\n {...props}\n />\n )\n }\n\n return (\n <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n // Locale-independent (YYYY-MM-DD) so server and client renders match.\n data-day={`${day.date.getFullYear()}-${String(day.date.getMonth() + 1).padStart(2, \"0\")}-${String(day.date.getDate()).padStart(2, \"0\")}`}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n","example":"\"use client\";\n\nimport * as React from \"react\";\nimport { Calendar } from \"@recanica/ui/components/calendar\";\n\nexport default function CalendarDemo() {\n // Fixed initial date keeps server and client renders identical.\n const [date, setDate] = React.useState<Date | undefined>(new Date(2026, 10, 18));\n return <Calendar mode=\"single\" selected={date} onSelect={setDate} defaultMonth={date} className=\"rounded-2xl border\" />;\n}\n"},{"slug":"avatar","title":"Avatar","category":"Data display","description":"User or org image with initials fallback.","import":"@recanica/ui/components/avatar","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Avatar as AvatarPrimitive } from \"radix-ui\"\n\nfunction Avatar({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: \"default\" | \"sm\" | \"lg\"\n}) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n className={cn(\n \"group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"flex size-full items-center justify-center rounded-full border bg-muted text-xs tracking-wide text-muted-foreground group-data-[size=sm]/avatar:text-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n \"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none\",\n \"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden\",\n \"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2\",\n \"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n \"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarGroupCount({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n \"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Avatar,\n AvatarImage,\n AvatarFallback,\n AvatarBadge,\n AvatarGroup,\n AvatarGroupCount,\n}\n","example":"\"use client\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@recanica/ui/components/avatar\";\n\nexport default function AvatarDemo() {\n return (\n <div className=\"flex items-center gap-3\">\n <Avatar><AvatarImage src=\"/avatars/user.svg\" alt=\"User\" /><AvatarFallback>SC</AvatarFallback></Avatar>\n <Avatar><AvatarFallback>AS</AvatarFallback></Avatar>\n <Avatar className=\"size-10\"><AvatarFallback>NR</AvatarFallback></Avatar>\n <div className=\"flex -space-x-2\">\n {[\"LT\", \"SO\", \"MK\"].map((i) => <Avatar key={i} className=\"ring-2 ring-panel\"><AvatarFallback>{i}</AvatarFallback></Avatar>)}\n </div>\n </div>\n );\n}\n"},{"slug":"badge","title":"Badge","category":"Data display","description":"Small status or label chip.","import":"@recanica/ui/components/badge","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nconst badgeVariants = cva(\n \"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90\",\n outline:\n \"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n ghost: \"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n brand: \"bg-brand text-brand-foreground\",\n success: \"bg-success/12 text-success\",\n warning: \"bg-warning/15 text-warning\",\n muted: \"bg-muted text-muted-foreground\",\n link: \"text-primary underline-offset-4 [a&]:hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Badge({\n className,\n variant = \"default\",\n asChild = false,\n onRemove,\n removeLabel = \"Remove\",\n children,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & {\n asChild?: boolean\n /** Makes it a removable chip (active filters, selected tags): adds a small remove button inside the badge. */\n onRemove?: () => void\n removeLabel?: string\n }) {\n const Comp = asChild ? Slot.Root : \"span\"\n\n return (\n <Comp\n data-slot=\"badge\"\n data-variant={variant}\n className={cn(badgeVariants({ variant }), onRemove && \"gap-1 pr-1\", className)}\n {...props}\n >\n {children}\n {onRemove && (\n <button\n type=\"button\"\n aria-label={removeLabel}\n onClick={onRemove}\n className=\"-my-1 inline-flex size-5 items-center justify-center rounded-full transition-colors outline-none hover:bg-background focus-visible:ring-[3px] focus-visible:ring-ring/50\"\n >\n <svg viewBox=\"0 0 24 24\" className=\"size-3\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" aria-hidden><path d=\"M18 6 6 18M6 6l12 12\" /></svg>\n </button>\n )}\n </Comp>\n )\n}\n\nexport { Badge, badgeVariants }\n","example":"\"use client\";\n\nimport { Badge } from \"@recanica/ui/components/badge\";\n\nexport default function BadgeDemo() {\n return (\n <div className=\"flex flex-wrap justify-center gap-2\">\n <Badge>Default</Badge>\n <Badge variant=\"brand\">Brand</Badge>\n <Badge variant=\"secondary\">Secondary</Badge>\n <Badge variant=\"outline\">Outline</Badge>\n <Badge variant=\"muted\">Draft</Badge>\n <Badge variant=\"success\">Active</Badge>\n <Badge variant=\"warning\">Pending</Badge>\n <Badge variant=\"destructive\">Failed</Badge>\n </div>\n );\n}\n"},{"slug":"card","title":"Card","category":"Data display","description":"Bordered container for grouped content.","import":"@recanica/ui/components/card","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"flex flex-col gap-6 rounded-2xl border bg-card py-6 text-card-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"@recanica/ui/components/card\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Label } from \"@recanica/ui/components/label\";\n\nexport default function CardDemo() {\n return (\n <Card className=\"w-full max-w-sm\">\n <CardHeader>\n <CardTitle>Create project</CardTitle>\n <CardDescription>Deploy a new project in one click.</CardDescription>\n <CardAction><Button variant=\"link\" size=\"sm\">Docs</Button></CardAction>\n </CardHeader>\n <CardContent className=\"grid gap-2\">\n <Label htmlFor=\"cd-name\">Name</Label>\n <Input id=\"cd-name\" placeholder=\"my-project\" />\n </CardContent>\n <CardFooter className=\"justify-end gap-2\">\n <Button variant=\"ghost\">Cancel</Button>\n <Button>Create</Button>\n </CardFooter>\n </Card>\n );\n}\n"},{"slug":"stat","title":"Stat","category":"Data display","description":"Recanica metric panels: grouped stats, bar rows, list rows.","import":"@recanica/ui/components/stat","source":"import * as React from \"react\";\nimport { ArrowRightIcon } from \"lucide-react\";\nimport { cn } from \"../lib/utils\";\n\n/**\n * Polar-style metric panels: several stats share one bordered container,\n * split by hairline dividers.\n *\n * <StatGroup>\n * <Stat>\n * <StatHeader title=\"Revenue\" href=\"/revenue\" />\n * <StatValue value=\"$48\" caption=\"November\" />\n * <StatList><BarRow label=\"Nov\" value=\"$48\" percent={100} /></StatList>\n * </Stat>\n * </StatGroup>\n */\nfunction StatGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"stat-group\"\n className={cn(\n // Container-aware: each stat wants ≥17rem; they wrap to new rows when the *container* is narrow\n // (not the viewport), and the last stat in a row grows to fill it. gap-px over bg-border = hairlines.\n \"flex flex-wrap gap-px overflow-hidden rounded-2xl border bg-border\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction Stat({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"stat\" className={cn(\"@container flex min-w-0 flex-[1_1_17rem] flex-col gap-6 bg-card p-panel\", className)} {...props} />;\n}\n\nfunction StatHeader({\n title,\n href,\n actionLabel = \"View all\",\n className,\n}: { title: React.ReactNode; href?: string; actionLabel?: string; className?: string }) {\n return (\n <div className={cn(\"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 text-sm\", className)}>\n <span className=\"min-w-0\">{title}</span>\n {href && (\n <a href={href} className=\"-my-1 inline-flex shrink-0 items-center gap-1 py-1 whitespace-nowrap text-muted-foreground transition-colors hover:text-foreground\">\n {actionLabel} <ArrowRightIcon className=\"size-3.5\" />\n </a>\n )}\n </div>\n );\n}\n\nfunction StatValue({\n value,\n caption,\n className,\n}: { value: React.ReactNode; caption?: React.ReactNode; className?: string }) {\n return (\n <div className={cn(\"flex flex-wrap items-baseline gap-x-3 gap-y-1\", className)}>\n {/* Long numbers scale down to fit the stat's width (Stat is a container) instead of running into the next stat. */}\n <span\n className=\"font-light whitespace-nowrap tabular-nums [font-size:min(var(--text-metric),calc(100cqi/(var(--stat-chars,6)*0.6)))] leading-none\"\n style={{ \"--stat-chars\": typeof value === \"string\" || typeof value === \"number\" ? Math.max(6, String(value).length) : 6 } as React.CSSProperties}\n >\n {value}\n </span>\n {caption && <span className=\"text-sm whitespace-nowrap text-muted-foreground\">{caption}</span>}\n </div>\n );\n}\n\nfunction StatList({ className, ...props }: React.ComponentProps<\"div\">) {\n // A grid so BarRows share columns (subgrid): every bar starts at the same x, sized by the longest label.\n // Other children (StatRow, custom rows) span the full width.\n return (\n <div\n data-slot=\"stat-list\"\n className={cn(\n \"grid grid-cols-[fit-content(40%)_minmax(3rem,1fr)_auto] divide-y border-t\",\n \"*:col-span-full [&>[data-slot=bar-row]]:grid-cols-subgrid\",\n className\n )}\n {...props}\n />\n );\n}\n\n/** One line in a StatList: primary text, muted secondary text, trailing meta. */\nfunction StatRow({\n primary,\n secondary,\n trailing,\n className,\n}: { primary: React.ReactNode; secondary?: React.ReactNode; trailing?: React.ReactNode; className?: string }) {\n return (\n <div className={cn(\"flex items-center gap-3 py-3 text-sm\", className)}>\n {/* Narrow card: secondary text sits under the primary text. Wide card: inline, Polar-style. */}\n <span className=\"flex min-w-0 flex-1 flex-col @[22rem]:flex-row @[22rem]:items-baseline @[22rem]:gap-2\">\n <span className=\"truncate\">{primary}</span>\n {secondary && <span className=\"truncate text-muted-foreground\">{secondary}</span>}\n </span>\n {trailing && <span className=\"shrink-0 whitespace-nowrap text-muted-foreground tabular-nums\">{trailing}</span>}\n </div>\n );\n}\n\n/**\n * Label, a thin progress track, and a value. The active row is highlighted.\n * The label column fits the longest label up to 40% of the row, then truncates (full text on hover),\n * so long names never run into the bar. Inside a StatList all rows share one label column.\n */\nfunction BarRow({\n label,\n value,\n percent,\n active,\n className,\n}: { label: React.ReactNode; value: React.ReactNode; percent: number; active?: boolean; className?: string }) {\n return (\n <div\n data-slot=\"bar-row\"\n className={cn(\n \"grid grid-cols-[fit-content(40%)_minmax(3rem,1fr)_auto] items-center gap-x-4 py-3 text-sm\",\n !active && \"text-muted-foreground\",\n className\n )}\n >\n <span className=\"min-w-0 truncate\" title={typeof label === \"string\" ? label : undefined}>{label}</span>\n <div className=\"relative h-0.5 rounded-full bg-border\">\n <div\n className={cn(\"absolute inset-y-0 left-0 rounded-full\", active ? \"bg-foreground\" : \"bg-muted-foreground/40\")}\n style={{ width: `${Math.max(0, Math.min(100, percent))}%` }}\n />\n </div>\n <span className={cn(\"whitespace-nowrap tabular-nums\", active && \"text-foreground\")}>{value}</span>\n </div>\n );\n}\n\nexport { StatGroup, Stat, StatHeader, StatValue, StatList, StatRow, BarRow };\n","example":"\"use client\";\n\nimport { BarRow, Stat, StatGroup, StatHeader, StatList, StatRow, StatValue } from \"@recanica/ui/components/stat\";\n\nexport default function StatDemo() {\n return (\n <StatGroup className=\"w-full text-left\">\n <Stat>\n <StatHeader title=\"Revenue\" href=\"/demo/app/reports\" />\n <StatValue value=\"$4,820\" caption=\"November\" />\n <StatList>\n <BarRow label=\"Nov\" value=\"$4,820\" percent={100} active />\n <BarRow label=\"Oct\" value=\"$3,960\" percent={82} />\n <BarRow label=\"Sep\" value=\"$3,410\" percent={71} />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Activity\" href=\"/demo/app/notifications\" />\n <StatValue value=\"14\" caption=\"events today\" />\n <StatList>\n <StatRow primary=\"Order paid\" secondary=\"Nadia Rahman\" trailing=\"now\" />\n <StatRow primary=\"Subscription created\" secondary=\"Leo Tan\" trailing=\"1h ago\" />\n <StatRow primary=\"Order paid\" secondary=\"Leo Tan\" trailing=\"1h ago\" />\n </StatList>\n </Stat>\n </StatGroup>\n );\n}\n"},{"slug":"table","title":"Table","category":"Data display","description":"Responsive data table primitives.","import":"@recanica/ui/components/table","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div\n data-slot=\"table-container\"\n className=\"relative w-full overflow-x-auto\"\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm [--table-edge:var(--spacing-inset)]\", className)}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-10 px-3 text-left align-middle font-normal whitespace-nowrap text-muted-foreground first:pl-(--table-edge) last:pr-(--table-edge) [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"px-3 py-3 align-middle whitespace-nowrap first:pl-(--table-edge) last:pr-(--table-edge) [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","example":"\"use client\";\n\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from \"@recanica/ui/components/table\";\n\nconst rows = [\n { id: \"INV-001\", customer: \"Nadia Rahman\", status: \"Paid\", amount: 250 },\n { id: \"INV-002\", customer: \"Leo Tan\", status: \"Pending\", amount: 150 },\n { id: \"INV-003\", customer: \"Sam Ortiz\", status: \"Refunded\", amount: 350 },\n { id: \"INV-004\", customer: \"Mei Kato\", status: \"Paid\", amount: 450 },\n];\n\nexport default function TableDemo() {\n return (\n <Table className=\"text-left\">\n <TableCaption>Recent invoices.</TableCaption>\n <TableHeader>\n <TableRow><TableHead>Invoice</TableHead><TableHead>Customer</TableHead><TableHead>Status</TableHead><TableHead className=\"text-right\">Amount</TableHead></TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((r) => (\n <TableRow key={r.id}>\n <TableCell className=\"font-mono text-xs\">{r.id}</TableCell>\n <TableCell>{r.customer}</TableCell>\n <TableCell><Badge variant={r.status === \"Paid\" ? \"success\" : r.status === \"Pending\" ? \"warning\" : \"muted\"}>{r.status}</Badge></TableCell>\n <TableCell className=\"text-right tabular-nums\">${r.amount.toFixed(2)}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooter>\n <TableRow><TableCell colSpan={3}>Total</TableCell><TableCell className=\"text-right tabular-nums\">$1,200.00</TableCell></TableRow>\n </TableFooter>\n </Table>\n );\n}\n"},{"slug":"chart","title":"Chart","category":"Data display","description":"Recharts wrapper themed with the monochrome chart ramp.","import":"@recanica/ui/components/chart","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport * as RechartsPrimitive from \"recharts\"\nimport type { TooltipValueType } from \"recharts\"\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const\ntype TooltipNameType = number | string\n\nexport type ChartConfig = Record<\n string,\n {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n>\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\")\n }\n\n return context\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"]\n initialDimension?: {\n width: number\n height: number\n }\n}) {\n const uniqueId = React.useId()\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\", // recanica-ignore: targets recharts default stroke\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer\n initialDimension={initialDimension}\n >\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme ?? config.color\n )\n\n if (!colorConfig.length) {\n return null\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ??\n itemConfig.color\n return color ? ` --color-${key}: ${color};` : null\n })\n .join(\"\\n\")}\n}\n`\n )\n .join(\"\\n\"),\n }}\n />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: \"line\" | \"dot\" | \"dashed\"\n nameKey?: string\n labelKey?: string\n } & Omit<\n RechartsPrimitive.DefaultTooltipContentProps<\n TooltipValueType,\n TooltipNameType\n >,\n \"accessibilityLayer\"\n >) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value =\n !labelKey && typeof label === \"string\"\n ? (config[label]?.label ?? label)\n : itemConfig?.label\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n )\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>\n }, [\n label,\n labelFormatter,\n payload,\n hideLabel,\n labelClassName,\n config,\n labelKey,\n ])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\"\n\n return (\n <div\n className={cn(\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl\",\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const indicatorColor = color ?? item.payload?.fill ?? item.color\n\n return (\n <div\n key={index}\n className={cn(\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground\",\n indicator === \"dot\" && \"items-center\"\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\", /* recanica-ignore: chart legend swatch is a tiny square */\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n }\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\"\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label ?? item.name}\n </span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === \"number\"\n ? item.value.toLocaleString()\n : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nconst ChartLegend = RechartsPrimitive.Legend\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> & {\n hideIcon?: boolean\n nameKey?: string\n} & RechartsPrimitive.DefaultLegendContentProps) {\n const { config } = useChart()\n\n if (!payload?.length) {\n return null\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className\n )}\n >\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n\n return (\n <div\n key={index}\n className={cn(\n \"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground\"\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\" /* recanica-ignore: chart legend swatch is a tiny square */\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n )\n })}\n </div>\n )\n}\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string\n) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n \"payload\" in payload &&\n typeof payload.payload === \"object\" &&\n payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (\n key in payload &&\n typeof payload[key as keyof typeof payload] === \"string\"\n ) {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[\n key as keyof typeof payloadPayload\n ] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key]\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n}\n","example":"\"use client\";\n\nimport { Bar, BarChart, CartesianGrid, XAxis } from \"recharts\";\nimport { ChartContainer, ChartTooltip, ChartTooltipContent, type ChartConfig } from \"@recanica/ui/components/chart\";\n\nconst data = [\n { month: \"Jun\", revenue: 1860, refunds: 80 },\n { month: \"Jul\", revenue: 3050, refunds: 200 },\n { month: \"Aug\", revenue: 2370, refunds: 120 },\n { month: \"Sep\", revenue: 3410, refunds: 190 },\n { month: \"Oct\", revenue: 3960, refunds: 130 },\n { month: \"Nov\", revenue: 4820, refunds: 140 },\n];\n\nconst config = {\n revenue: { label: \"Revenue\", color: \"var(--chart-1)\" },\n refunds: { label: \"Refunds\", color: \"var(--chart-3)\" },\n} satisfies ChartConfig;\n\nexport default function ChartDemo() {\n return (\n <ChartContainer config={config} className=\"h-64 w-full\">\n <BarChart data={data}>\n <CartesianGrid vertical={false} />\n <XAxis dataKey=\"month\" tickLine={false} axisLine={false} tickMargin={8} />\n <ChartTooltip content={<ChartTooltipContent />} />\n <Bar dataKey=\"revenue\" fill=\"var(--color-revenue)\" radius={6} />\n <Bar dataKey=\"refunds\" fill=\"var(--color-refunds)\" radius={6} />\n </BarChart>\n </ChartContainer>\n );\n}\n"},{"slug":"item","title":"Item","category":"Data display","description":"Flexible row: media, content and actions.","import":"@recanica/ui/components/item","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nimport { Separator } from \"@recanica/ui/components/separator\"\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\"group/item-group flex flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-0\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n \"group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-accent/50\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border-border\",\n muted: \"bg-muted/50\",\n },\n size: {\n default: \"gap-4 p-4\",\n sm: \"gap-2.5 px-4 py-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof itemVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n return (\n <Comp\n data-slot=\"item\"\n data-variant={variant}\n data-size={size}\n className={cn(itemVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4\",\n image:\n \"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"flex w-fit items-center gap-2 text-sm leading-snug font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground\",\n \"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n","example":"\"use client\";\n\nimport { BadgeCheckIcon, ChevronRightIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle } from \"@recanica/ui/components/item\";\n\nexport default function ItemDemo() {\n return (\n <div className=\"flex w-full max-w-md flex-col gap-3\">\n <Item variant=\"outline\">\n <ItemContent>\n <ItemTitle>Payout account</ItemTitle>\n <ItemDescription>Connect a bank account to receive payouts.</ItemDescription>\n </ItemContent>\n <ItemActions><Button size=\"sm\" variant=\"outline\">Connect</Button></ItemActions>\n </Item>\n <Item variant=\"outline\" size=\"sm\" asChild>\n <a href=\"/demo/app/settings\">\n <ItemMedia><BadgeCheckIcon className=\"size-5\" /></ItemMedia>\n <ItemContent><ItemTitle>Your profile is verified.</ItemTitle></ItemContent>\n <ItemActions><ChevronRightIcon className=\"size-4\" /></ItemActions>\n </a>\n </Item>\n </div>\n );\n}\n"},{"slug":"kbd","title":"Kbd","category":"Data display","description":"Keyboard key and shortcut display.","import":"@recanica/ui/components/kbd","source":"import { cn } from \"@recanica/ui/lib/utils\"\n\nfunction Kbd({ className, ...props }: React.ComponentProps<\"kbd\">) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none\",\n \"[&_svg:not([class*='size-'])]:size-3\",\n \"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nexport { Kbd, KbdGroup }\n","example":"\"use client\";\n\nimport { Kbd, KbdGroup } from \"@recanica/ui/components/kbd\";\n\nexport default function KbdDemo() {\n return (\n <div className=\"flex flex-col items-center gap-3 text-sm text-muted-foreground\">\n <KbdGroup><Kbd>⌘</Kbd><Kbd>K</Kbd></KbdGroup>\n <p>Press <Kbd>/</Kbd> to search, <Kbd>Esc</Kbd> to close.</p>\n </div>\n );\n}\n"},{"slug":"accordion","title":"Accordion","category":"Data display","description":"Stacked sections that expand and collapse.","import":"@recanica/ui/components/accordion","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\n\nfunction Accordion({\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"border-b last:border-b-0\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn(\"pt-0 pb-4\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n","example":"\"use client\";\n\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from \"@recanica/ui/components/accordion\";\n\nexport default function AccordionDemo() {\n return (\n <Accordion type=\"single\" collapsible defaultValue=\"a\" className=\"w-full max-w-lg\">\n <AccordionItem value=\"a\"><AccordionTrigger>What payment methods do you support?</AccordionTrigger><AccordionContent>Cards, bank transfer and local wallets.</AccordionContent></AccordionItem>\n <AccordionItem value=\"b\"><AccordionTrigger>Can I cancel anytime?</AccordionTrigger><AccordionContent>Yes. Your plan stays active until the end of the period.</AccordionContent></AccordionItem>\n <AccordionItem value=\"c\"><AccordionTrigger>Do you handle sales tax?</AccordionTrigger><AccordionContent>We calculate, collect and remit tax as merchant of record.</AccordionContent></AccordionItem>\n </Accordion>\n );\n}\n"},{"slug":"collapsible","title":"Collapsible","category":"Data display","description":"Show and hide a single region.","import":"@recanica/ui/components/collapsible","source":"\"use client\"\n\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\"\n\nfunction Collapsible({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-trigger\"\n {...props}\n />\n )\n}\n\nfunction CollapsibleContent({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n {...props}\n />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","example":"\"use client\";\n\nimport { ChevronsUpDownIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"@recanica/ui/components/collapsible\";\n\nexport default function CollapsibleDemo() {\n return (\n <Collapsible className=\"w-full max-w-sm space-y-2\">\n <div className=\"flex items-center justify-between rounded-xl border px-4 py-2 text-sm\">\n 3 benefits included\n <CollapsibleTrigger asChild><Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Toggle\"><ChevronsUpDownIcon /></Button></CollapsibleTrigger>\n </div>\n <CollapsibleContent className=\"space-y-2\">\n {[\"Discord role\", \"GitHub repository access\", \"License key\"].map((b) => (\n <div key={b} className=\"rounded-xl border px-4 py-2 text-sm text-muted-foreground\">{b}</div>\n ))}\n </CollapsibleContent>\n </Collapsible>\n );\n}\n"},{"slug":"carousel","title":"Carousel","category":"Data display","description":"Swipeable horizontal slides.","import":"@recanica/ui/components/carousel","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\"\nimport { ArrowLeft, ArrowRight } from \"lucide-react\"\n\nimport { Button } from \"@recanica/ui/components/button\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: \"horizontal\" | \"vertical\"\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\")\n }\n\n return context\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) return\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) return\n onSelect(api)\n api.on(\"reInit\", onSelect)\n api.on(\"select\", onSelect)\n\n return () => {\n api?.off(\"select\", onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n )\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div\n ref={carouselRef}\n className=\"overflow-hidden\"\n data-slot=\"carousel-content\"\n >\n <div\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel()\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 left-2 -translate-y-1/2 bg-background/90 backdrop-blur\"\n : \"top-2 left-1/2 -translate-x-1/2 rotate-90 bg-background/90 backdrop-blur\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 right-2 -translate-y-1/2 bg-background/90 backdrop-blur\"\n : \"bottom-2 left-1/2 -translate-x-1/2 rotate-90 bg-background/90 backdrop-blur\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n}\n","example":"\"use client\";\n\nimport { Card, CardContent } from \"@recanica/ui/components/card\";\nimport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from \"@recanica/ui/components/carousel\";\n\nexport default function CarouselDemo() {\n return (\n <Carousel className=\"mx-auto w-full max-w-[16rem] sm:max-w-xs\">\n <CarouselContent>\n {Array.from({ length: 5 }).map((_, i) => (\n <CarouselItem key={i}>\n <Card><CardContent className=\"flex aspect-square items-center justify-center\"><span className=\"text-metric font-light\">{i + 1}</span></CardContent></Card>\n </CarouselItem>\n ))}\n </CarouselContent>\n <CarouselPrevious />\n <CarouselNext />\n </Carousel>\n );\n}\n"},{"slug":"aspect-ratio","title":"Aspect Ratio","category":"Data display","description":"Keep media at a fixed ratio.","import":"@recanica/ui/components/aspect-ratio","source":"\"use client\"\n\nimport { AspectRatio as AspectRatioPrimitive } from \"radix-ui\"\n\nfunction AspectRatio({\n ...props\n}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {\n return <AspectRatioPrimitive.Root data-slot=\"aspect-ratio\" {...props} />\n}\n\nexport { AspectRatio }\n","example":"\"use client\";\n\nimport { AspectRatio } from \"@recanica/ui/components/aspect-ratio\";\n\nexport default function AspectRatioDemo() {\n return (\n <div className=\"w-full max-w-md\">\n <AspectRatio ratio={16 / 9} className=\"overflow-hidden rounded-2xl border bg-muted\">\n <div className=\"flex size-full items-center justify-center text-sm text-muted-foreground\">16 / 9</div>\n </AspectRatio>\n </div>\n );\n}\n"},{"slug":"separator","title":"Separator","category":"Data display","description":"Hairline divider, horizontal or vertical.","import":"@recanica/ui/components/separator","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Separator as SeparatorPrimitive } from \"radix-ui\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","example":"\"use client\";\n\nimport { Separator } from \"@recanica/ui/components/separator\";\n\nexport default function SeparatorDemo() {\n return (\n <div className=\"w-full max-w-sm text-sm\">\n <p>Recanica</p>\n <p className=\"text-muted-foreground\">Tokens, components and patterns.</p>\n <Separator className=\"my-4\" />\n <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-muted-foreground [&>[data-slot=separator]]:h-4\">\n <span>Docs</span><Separator orientation=\"vertical\" /><span>Components</span><Separator orientation=\"vertical\" /><span>Patterns</span>\n </div>\n </div>\n );\n}\n"},{"slug":"scroll-area","title":"Scroll Area","category":"Data display","description":"Custom-styled scroll container.","import":"@recanica/ui/components/scroll-area","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\" /* recanica-ignore: viewport follows its container's corners */\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n","example":"\"use client\";\n\nimport { ScrollArea } from \"@recanica/ui/components/scroll-area\";\nimport { Separator } from \"@recanica/ui/components/separator\";\n\nconst tags = Array.from({ length: 30 }).map((_, i) => `v1.${30 - i}.0`);\n\nexport default function ScrollAreaDemo() {\n return (\n <ScrollArea className=\"h-64 w-48 rounded-2xl border\">\n <div className=\"p-4 text-sm\">\n <p className=\"mb-3\">Releases</p>\n {tags.map((t) => (\n <div key={t}><p className=\"text-muted-foreground\">{t}</p><Separator className=\"my-2\" /></div>\n ))}\n </div>\n </ScrollArea>\n );\n}\n"},{"slug":"alert","title":"Alert","category":"Feedback","description":"Inline message for important information.","import":"@recanica/ui/components/alert","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nconst alertVariants = cva(\n \"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n","example":"\"use client\";\n\nimport { AlertCircleIcon, CheckCircle2Icon } from \"lucide-react\";\nimport { Alert, AlertDescription, AlertTitle } from \"@recanica/ui/components/alert\";\n\nexport default function AlertDemo() {\n return (\n <div className=\"grid w-full max-w-lg gap-3 text-left\">\n <Alert><CheckCircle2Icon /><AlertTitle>Payout scheduled</AlertTitle><AlertDescription>$1,206 will arrive on 1 December.</AlertDescription></Alert>\n <Alert variant=\"destructive\"><AlertCircleIcon /><AlertTitle>Payment failed</AlertTitle><AlertDescription>Update your card to keep your subscription active.</AlertDescription></Alert>\n </div>\n );\n}\n"},{"slug":"progress","title":"Progress","category":"Feedback","description":"Determinate progress bar.","import":"@recanica/ui/components/progress","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Progress as ProgressPrimitive } from \"radix-ui\"\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-primary/20\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n","example":"\"use client\";\n\nimport * as React from \"react\";\nimport { Progress } from \"@recanica/ui/components/progress\";\n\nexport default function ProgressDemo() {\n const [value, setValue] = React.useState(20);\n React.useEffect(() => {\n const t = setTimeout(() => setValue(68), 500);\n return () => clearTimeout(t);\n }, []);\n return <Progress value={value} className=\"max-w-sm\" />;\n}\n"},{"slug":"skeleton","title":"Skeleton","category":"Feedback","description":"Loading placeholder.","import":"@recanica/ui/components/skeleton","source":"import { cn } from \"@recanica/ui/lib/utils\"\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(\"animate-pulse rounded-md bg-accent\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","example":"\"use client\";\n\nimport { Skeleton } from \"@recanica/ui/components/skeleton\";\n\nexport default function SkeletonDemo() {\n return (\n <div className=\"flex items-center gap-4\">\n <Skeleton className=\"size-12 shrink-0 rounded-full\" />\n <div className=\"min-w-0 flex-1 space-y-2\"><Skeleton className=\"h-4 w-full max-w-56\" /><Skeleton className=\"h-4 w-3/4 max-w-40\" /></div>\n </div>\n );\n}\n"},{"slug":"spinner","title":"Spinner","category":"Feedback","description":"Indeterminate loading indicator.","import":"@recanica/ui/components/spinner","source":"import { cn } from \"@recanica/ui/lib/utils\"\nimport { Loader2Icon } from \"lucide-react\"\n\nfunction Spinner({ className, ...props }: React.ComponentProps<\"svg\">) {\n return (\n <Loader2Icon\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(\"size-4 animate-spin\", className)}\n {...props}\n />\n )\n}\n\nexport { Spinner }\n","example":"\"use client\";\n\nimport { Spinner } from \"@recanica/ui/components/spinner\";\nimport { Button } from \"@recanica/ui/components/button\";\n\nexport default function SpinnerDemo() {\n return (\n <div className=\"flex items-center gap-4\">\n <Spinner />\n <Spinner className=\"size-6\" />\n <Button disabled variant=\"outline\"><Spinner /> Processing payment</Button>\n </div>\n );\n}\n"},{"slug":"loader","title":"Loader","category":"Feedback","description":"Logo loader with 10 animations. Uses the project's logo, then the Recanica mark, or five shapes.","import":"@recanica/ui/components/loader","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\n/**\n * Loader — shows the project's logo while something loads.\n *\n * Logo, in order of preference:\n * 1. the `logo` prop\n * 2. the project logo set once with <LoaderProvider logo={<YourLogo />}> at the app root\n * 3. the Recanica mark\n * Or `logo=\"shapes\"` (or <LoaderProvider logo=\"shapes\">) for a neutral filler of five shapes.\n *\n * Ten animations, all monochrome, transform/opacity only, and still under prefers-reduced-motion.\n */\nexport const LOADER_ANIMATIONS = [\"pulse\", \"breathe\", \"spin\", \"orbit\", \"bounce\", \"flip\", \"reveal\", \"ring\", \"ripple\", \"sway\"] as const\nexport type LoaderAnimation = (typeof LOADER_ANIMATIONS)[number]\n\ntype LoaderLogo = React.ReactNode | \"shapes\"\nconst LoaderContext = React.createContext<{ logo?: LoaderLogo; animation?: LoaderAnimation }>({})\n\nfunction LoaderProvider({ logo, animation, children }: { logo?: LoaderLogo; animation?: LoaderAnimation; children: React.ReactNode }) {\n const value = React.useMemo(() => ({ logo, animation }), [logo, animation])\n return <LoaderContext.Provider value={value}>{children}</LoaderContext.Provider>\n}\n\n/** Recanica mark: the default when a project hasn't set its own logo. */\nfunction RecanicaMark(props: React.ComponentProps<\"svg\">) {\n return (\n <svg viewBox=\"0 0 40 48\" fill=\"none\" aria-hidden {...props}>\n <rect x=\"2\" y=\"2\" width=\"36\" height=\"44\" rx=\"7\" stroke=\"currentColor\" strokeWidth=\"3\" />\n <path d=\"M9.5 46V21a10.5 10.5 0 0 1 21 0v25\" stroke=\"currentColor\" strokeWidth=\"3\" />\n <circle cx=\"20\" cy=\"30.5\" r=\"5\" fill=\"currentColor\" />\n </svg>\n )\n}\n\n/** Five neutral shapes: circle, square, triangle, diamond, pill. Animated as a staggered wave. */\nfunction LoaderShapes({ animation }: { animation: LoaderAnimation }) {\n const shapes = [\n <circle key=\"c\" cx=\"6\" cy=\"6\" r=\"5\" />,\n <rect key=\"s\" x=\"1\" y=\"1\" width=\"10\" height=\"10\" rx=\"2\" />,\n <path key=\"t\" d=\"M6 1.5 11 10.5H1Z\" />,\n <path key=\"d\" d=\"M6 .8 11.2 6 6 11.2.8 6Z\" />,\n <rect key=\"p\" x=\"1\" y=\"3.5\" width=\"10\" height=\"5\" rx=\"2.5\" />,\n ]\n const anim = animation === \"breathe\" || animation === \"pulse\" || animation === \"flip\" || animation === \"sway\" ? animClass[animation] : \"animate-loader-wave\"\n return (\n <span className=\"flex items-center gap-[12%]\">\n {shapes.map((s, i) => (\n <svg key={i} viewBox=\"0 0 12 12\" fill=\"currentColor\" aria-hidden data-loader-motion className={cn(\"size-[16%] shrink-0\", anim)} style={{ animationDelay: `${i * 0.12}s` }}>\n {s}\n </svg>\n ))}\n </span>\n )\n}\n\nconst animClass: Record<LoaderAnimation, string> = {\n pulse: \"animate-loader-pulse\",\n breathe: \"animate-loader-breathe\",\n spin: \"animate-loader-spin\",\n orbit: \"\",\n bounce: \"animate-loader-bounce\",\n flip: \"animate-loader-flip\",\n reveal: \"animate-loader-reveal\",\n ring: \"\",\n ripple: \"\",\n sway: \"animate-loader-sway\",\n}\n\nconst sizes = { sm: \"size-6\", md: \"size-10\", lg: \"size-16\", xl: \"size-24\" } as const\n\nfunction Loader({\n logo,\n animation,\n size = \"md\",\n label = \"Loading\",\n className,\n ...props\n}: Omit<React.ComponentProps<\"div\">, \"children\"> & {\n logo?: LoaderLogo\n animation?: LoaderAnimation\n size?: keyof typeof sizes\n /** Announced to screen readers. */\n label?: string\n}) {\n const ctx = React.useContext(LoaderContext)\n const chosen = logo ?? ctx.logo\n const anim = animation ?? ctx.animation ?? \"pulse\"\n const isShapes = chosen === \"shapes\"\n const mark = isShapes ? null : chosen ?? <RecanicaMark className=\"h-full w-auto\" />\n\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n data-slot=\"loader\"\n data-animation={anim}\n className={cn(\"relative inline-flex shrink-0 items-center justify-center text-foreground\", sizes[size], className)}\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n {isShapes ? (\n <LoaderShapes animation={anim} />\n ) : (\n <>\n {anim === \"ripple\" && <span data-loader-motion className=\"absolute inset-0 animate-loader-ripple rounded-full border border-foreground/40\" aria-hidden />}\n {anim === \"ring\" && (\n <svg viewBox=\"0 0 40 40\" className=\"absolute inset-0 size-full -rotate-90\" aria-hidden>\n <circle cx=\"20\" cy=\"20\" r=\"18\" fill=\"none\" stroke=\"currentColor\" strokeOpacity=\"0.15\" strokeWidth=\"1.5\" />\n <circle data-loader-motion cx=\"20\" cy=\"20\" r=\"18\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" pathLength={100} strokeDasharray=\"25 100\" className=\"animate-loader-ring\" />\n </svg>\n )}\n {anim === \"orbit\" && (\n <span data-loader-motion className=\"absolute inset-0 animate-loader-orbit\" aria-hidden>\n <span className=\"absolute top-0 left-1/2 size-[12%] -translate-x-1/2 rounded-full bg-foreground\" />\n </span>\n )}\n {/* Everything stays inside the loader's box: animations with an outer track shrink the mark instead of spilling out. */}\n <span data-loader-motion className={cn(\"flex items-center justify-center [&>*]:max-h-full [&>*]:max-w-full\", anim === \"ring\" || anim === \"orbit\" || anim === \"ripple\" ? \"size-[50%]\" : \"size-[70%]\", animClass[anim])}>\n {mark}\n </span>\n </>\n )}\n </div>\n )\n}\n\n/** Full-area loading state: centred loader with an optional line of text. */\nfunction LoaderOverlay({ text, className, ...props }: React.ComponentProps<typeof Loader> & { text?: string }) {\n return (\n <div data-slot=\"loader-overlay\" className={cn(\"flex min-h-40 w-full flex-col items-center justify-center gap-4\", className)}>\n <Loader size=\"lg\" {...props} />\n {text && <p className=\"text-sm text-muted-foreground\">{text}</p>}\n </div>\n )\n}\n\nexport { Loader, LoaderOverlay, LoaderProvider }\n","example":"\"use client\";\n\nimport { LOADER_ANIMATIONS, Loader } from \"@recanica/ui/components/loader\";\n\nexport default function LoaderDemo() {\n return (\n <div className=\"grid w-full max-w-2xl gap-8\">\n <div className=\"grid grid-cols-[repeat(auto-fill,minmax(5.5rem,1fr))] gap-6\">\n {LOADER_ANIMATIONS.map((a) => (\n <figure key={a} className=\"flex flex-col items-center gap-3\">\n <Loader animation={a} size=\"lg\" label={`Loading (${a})`} />\n <figcaption className=\"text-xs text-muted-foreground\">{a}</figcaption>\n </figure>\n ))}\n </div>\n <div className=\"grid grid-cols-[repeat(auto-fill,minmax(5.5rem,1fr))] gap-6 border-t pt-6\">\n {([\"pulse\", \"breathe\", \"bounce\", \"sway\"] as const).map((a) => (\n <figure key={a} className=\"flex flex-col items-center gap-3\">\n <Loader logo=\"shapes\" animation={a} size=\"lg\" label={`Loading (shapes, ${a})`} />\n <figcaption className=\"text-xs text-muted-foreground\">shapes · {a}</figcaption>\n </figure>\n ))}\n </div>\n </div>\n );\n}\n"},{"slug":"sonner","title":"Toast","category":"Feedback","description":"Transient notifications via sonner.","import":"@recanica/ui/components/sonner","source":"\"use client\"\n\nimport {\n CircleCheckIcon,\n InfoIcon,\n Loader2Icon,\n OctagonXIcon,\n TriangleAlertIcon,\n} from \"lucide-react\"\nimport { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\"\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n \"--border-radius\": \"var(--radius)\",\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { Toaster }\n","example":"\"use client\";\n\nimport { toast } from \"sonner\";\nimport { Button } from \"@recanica/ui/components/button\";\n\nexport default function ToastDemo() {\n return (\n <div className=\"flex flex-wrap justify-center gap-2\">\n <Button variant=\"outline\" onClick={() => toast(\"Checkout link created\", { description: \"Copied to clipboard.\" })}>Default</Button>\n <Button variant=\"outline\" onClick={() => toast.success(\"Payout sent\")}>Success</Button>\n <Button variant=\"outline\" onClick={() => toast.error(\"Payment failed\")}>Error</Button>\n <Button variant=\"outline\" onClick={() => toast(\"Product archived\", { action: { label: \"Undo\", onClick: () => {} } })}>With action</Button>\n </div>\n );\n}\n"},{"slug":"empty","title":"Empty","category":"Feedback","description":"Empty state with icon, copy and action.","import":"@recanica/ui/components/empty","source":"import { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nfunction Empty({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty\"\n className={cn(\n \"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed px-[clamp(1rem,8%,3rem)] py-[clamp(1.5rem,8%,3rem)] text-center text-balance\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-header\"\n className={cn(\n \"flex max-w-sm flex-col items-center gap-2 text-center\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst emptyMediaVariants = cva(\n \"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction EmptyMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof emptyMediaVariants>) {\n return (\n <div\n data-slot=\"empty-icon\"\n data-variant={variant}\n className={cn(emptyMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-title\"\n className={cn(\"text-lg font-medium tracking-tight\", className)}\n {...props}\n />\n )\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn(\n \"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-content\"\n className={cn(\n \"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Empty,\n EmptyHeader,\n EmptyTitle,\n EmptyDescription,\n EmptyContent,\n EmptyMedia,\n}\n","example":"\"use client\";\n\nimport { LinkIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from \"@recanica/ui/components/empty\";\n\nexport default function EmptyDemo() {\n return (\n <Empty>\n <EmptyHeader>\n <EmptyMedia variant=\"icon\"><LinkIcon /></EmptyMedia>\n <EmptyTitle>No checkout links</EmptyTitle>\n <EmptyDescription>Create a new checkout link to share with your customers.</EmptyDescription>\n </EmptyHeader>\n <EmptyContent><Button>Create checkout link</Button></EmptyContent>\n </Empty>\n );\n}\n"},{"slug":"tabs","title":"Tabs","category":"Navigation","description":"Pill segmented control for switching views.","import":"@recanica/ui/components/tabs","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Tabs as TabsPrimitive } from \"radix-ui\"\n\nfunction Tabs({\n className,\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n \"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst tabsListVariants = cva(\n \"group/tabs-list inline-flex w-fit max-w-full items-center justify-start gap-0.5 overflow-x-auto [scrollbar-width:none] [&>*]:shrink-0 rounded-full p-1 text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none\",\n {\n variants: {\n variant: {\n default: \"bg-muted\",\n line: \"gap-1 bg-transparent\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction TabsList({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List> &\n VariantProps<typeof tabsListVariants>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-full border border-transparent px-3 py-1 text-sm whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n \"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent\",\n \"data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-transparent dark:data-[state=active]:bg-input dark:data-[state=active]:text-foreground\",\n \"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\"flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }\n","example":"\"use client\";\n\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\n\nconst ranges = [\"All time\", \"12m\", \"3m\", \"30d\", \"Today\"];\n\nexport default function TabsDemo() {\n return (\n <Tabs defaultValue=\"30d\" className=\"items-center\">\n <TabsList>\n {ranges.map((r) => <TabsTrigger key={r} value={r === \"All time\" ? \"all\" : r.toLowerCase()}>{r}</TabsTrigger>)}\n </TabsList>\n {ranges.map((r) => (\n <TabsContent key={r} value={r === \"All time\" ? \"all\" : r.toLowerCase()} className=\"text-sm text-muted-foreground\">Showing: {r}</TabsContent>\n ))}\n </Tabs>\n );\n}\n"},{"slug":"breadcrumb","title":"Breadcrumb","category":"Navigation","description":"Show location within a hierarchy.","import":"@recanica/ui/components/breadcrumb","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\nimport { Slot } from \"radix-ui\"\n\nfunction Breadcrumb({ ...props }: React.ComponentProps<\"nav\">) {\n return <nav aria-label=\"breadcrumb\" data-slot=\"breadcrumb\" {...props} />\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n \"flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbLink({\n asChild,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n <Comp\n data-slot=\"breadcrumb-link\"\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"size-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n","example":"\"use client\";\n\nimport { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from \"@recanica/ui/components/breadcrumb\";\n\nexport default function BreadcrumbDemo() {\n return (\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem><BreadcrumbLink href=\"/demo/app/products\">Products</BreadcrumbLink></BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem><BreadcrumbEllipsis /></BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem><BreadcrumbLink href=\"/demo/app/products\">Catalogue</BreadcrumbLink></BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem><BreadcrumbPage>Pro Yearly</BreadcrumbPage></BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n );\n}\n"},{"slug":"pagination","title":"Pagination","category":"Navigation","description":"Move between pages of results.","import":"@recanica/ui/components/pagination","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from \"lucide-react\"\n\nimport { buttonVariants, type Button } from \"@recanica/ui/components/button\"\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\"@container/pagination mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 px-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden @sm/pagination:block\">Previous</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 px-2.5\", className)}\n {...props}\n >\n <span className=\"hidden @sm/pagination:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n}\n","example":"\"use client\";\n\nimport { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from \"@recanica/ui/components/pagination\";\n\nexport default function PaginationDemo() {\n return (\n <Pagination>\n <PaginationContent>\n <PaginationItem><PaginationPrevious href=\"?page=1\" /></PaginationItem>\n <PaginationItem><PaginationLink href=\"?page=1\">1</PaginationLink></PaginationItem>\n <PaginationItem><PaginationLink href=\"?page=2\" isActive>2</PaginationLink></PaginationItem>\n <PaginationItem className=\"hidden @xs/pagination:block\"><PaginationLink href=\"?page=3\">3</PaginationLink></PaginationItem>\n <PaginationItem className=\"hidden @xs/pagination:block\"><PaginationEllipsis /></PaginationItem>\n <PaginationItem><PaginationNext href=\"?page=3\" /></PaginationItem>\n </PaginationContent>\n </Pagination>\n );\n}\n"},{"slug":"navigation-menu","title":"Navigation Menu","category":"Navigation","description":"Marketing site nav with dropdown panels.","minWidth":320,"import":"@recanica/ui/components/navigation-menu","source":"import * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\nimport { NavigationMenu as NavigationMenuPrimitive } from \"radix-ui\"\n\nfunction NavigationMenu({\n className,\n children,\n viewport = true,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {\n viewport?: boolean\n}) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-viewport={viewport}\n className={cn(\n \"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n {viewport && <NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n \"group flex flex-1 list-none items-center justify-center gap-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuItem({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn(\"relative\", className)}\n {...props}\n />\n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent\"\n)\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\nfunction NavigationMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n \"top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto\",\n \"group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuViewport({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {\n return (\n <div\n className={cn(\n \"absolute top-full left-0 isolate z-50 flex justify-center\"\n )}\n >\n <NavigationMenuPrimitive.Viewport\n data-slot=\"navigation-menu-viewport\"\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction NavigationMenuLink({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {\n return (\n <NavigationMenuPrimitive.Indicator\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n navigationMenuTriggerStyle,\n}\n","example":"\"use client\";\n\nimport { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from \"@recanica/ui/components/navigation-menu\";\n\nconst products = [\n { title: \"Checkout\", body: \"Hosted checkout and payment links.\" },\n { title: \"Subscriptions\", body: \"Recurring billing with proration.\" },\n { title: \"Analytics\", body: \"Revenue, churn and cohorts.\" },\n { title: \"Payouts\", body: \"Get paid globally.\" },\n];\n\nexport default function NavigationMenuDemo() {\n return (\n <NavigationMenu>\n <NavigationMenuList>\n <NavigationMenuItem>\n <NavigationMenuTrigger>Product</NavigationMenuTrigger>\n <NavigationMenuContent>\n <ul className=\"grid w-[min(28rem,80vw)] gap-1 p-2 sm:grid-cols-2\">\n {products.map((p) => (\n <li key={p.title}>\n <NavigationMenuLink href=\"/demo/app/products\">\n <span className=\"text-sm\">{p.title}</span>\n <span className=\"text-xs text-muted-foreground\">{p.body}</span>\n </NavigationMenuLink>\n </li>\n ))}\n </ul>\n </NavigationMenuContent>\n </NavigationMenuItem>\n <NavigationMenuItem><NavigationMenuLink href=\"/site/shop\" className={navigationMenuTriggerStyle()}>Pricing</NavigationMenuLink></NavigationMenuItem>\n <NavigationMenuItem className=\"hidden sm:block\"><NavigationMenuLink href=\"/docs\" className={navigationMenuTriggerStyle()}>Docs</NavigationMenuLink></NavigationMenuItem>\n </NavigationMenuList>\n </NavigationMenu>\n );\n}\n"},{"slug":"menubar","title":"Menubar","category":"Navigation","description":"Desktop-app style menu bar.","import":"@recanica/ui/components/menubar","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\nimport { Menubar as MenubarPrimitive } from \"radix-ui\"\n\nfunction Menubar({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n return (\n <MenubarPrimitive.Root\n data-slot=\"menubar\"\n className={cn(\n \"flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MenubarMenu({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />\n}\n\nfunction MenubarGroup({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />\n}\n\nfunction MenubarPortal({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />\n}\n\nfunction MenubarRadioGroup({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return (\n <MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />\n )\n}\n\nfunction MenubarTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n return (\n <MenubarPrimitive.Trigger\n data-slot=\"menubar-trigger\"\n className={cn(\n \"flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MenubarContent({\n className,\n align = \"start\",\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n return (\n <MenubarPortal>\n <MenubarPrimitive.Content\n data-slot=\"menubar-content\"\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n </MenubarPortal>\n )\n}\n\nfunction MenubarItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <MenubarPrimitive.Item\n data-slot=\"menubar-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {\n return (\n <MenubarPrimitive.CheckboxItem\n data-slot=\"menubar-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n )\n}\n\nfunction MenubarRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {\n return (\n <MenubarPrimitive.RadioItem\n data-slot=\"menubar-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n )\n}\n\nfunction MenubarLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <MenubarPrimitive.Label\n data-slot=\"menubar-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MenubarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n return (\n <MenubarPrimitive.Separator\n data-slot=\"menubar-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction MenubarShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"menubar-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MenubarSub({\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />\n}\n\nfunction MenubarSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <MenubarPrimitive.SubTrigger\n data-slot=\"menubar-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n )\n}\n\nfunction MenubarSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n return (\n <MenubarPrimitive.SubContent\n data-slot=\"menubar-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n}\n","example":"\"use client\";\n\nimport { Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarShortcut, MenubarTrigger } from \"@recanica/ui/components/menubar\";\n\nexport default function MenubarDemo() {\n return (\n <Menubar>\n <MenubarMenu>\n <MenubarTrigger>File</MenubarTrigger>\n <MenubarContent>\n <MenubarItem>New product <MenubarShortcut>⌘N</MenubarShortcut></MenubarItem>\n <MenubarItem>Duplicate <MenubarShortcut>⌘D</MenubarShortcut></MenubarItem>\n <MenubarSeparator />\n <MenubarItem>Export CSV</MenubarItem>\n </MenubarContent>\n </MenubarMenu>\n <MenubarMenu>\n <MenubarTrigger>Edit</MenubarTrigger>\n <MenubarContent><MenubarItem>Undo <MenubarShortcut>⌘Z</MenubarShortcut></MenubarItem><MenubarItem>Redo <MenubarShortcut>⇧⌘Z</MenubarShortcut></MenubarItem></MenubarContent>\n </MenubarMenu>\n <MenubarMenu>\n <MenubarTrigger>View</MenubarTrigger>\n <MenubarContent><MenubarItem>Toggle sidebar <MenubarShortcut>⌘B</MenubarShortcut></MenubarItem></MenubarContent>\n </MenubarMenu>\n </Menubar>\n );\n}\n"},{"slug":"sidebar","title":"Sidebar","category":"Navigation","description":"Collapsible app sidebar; becomes a sheet on mobile.","import":"@recanica/ui/components/sidebar","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { PanelLeftIcon } from \"lucide-react\"\nimport { Slot } from \"radix-ui\"\n\nimport { useIsMobile } from \"@recanica/ui/hooks/use-mobile\"\nimport { Button } from \"@recanica/ui/components/button\"\nimport { Input } from \"@recanica/ui/components/input\"\nimport { Separator } from \"@recanica/ui/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@recanica/ui/components/sheet\"\nimport { Skeleton } from \"@recanica/ui/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@recanica/ui/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\"size-7\", className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"sidebar-group-action\"\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 md:after:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 md:after:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n <Comp\n data-slot=\"sidebar-menu-sub-button\"\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","example":"\"use client\";\n\nimport { BoxIcon, LayoutGridIcon, SlidersHorizontalIcon, UsersIcon } from \"lucide-react\";\nimport { SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarProvider } from \"@recanica/ui/components/sidebar\";\n\nconst items = [\n { title: \"Overview\", icon: LayoutGridIcon, active: true },\n { title: \"Products\", icon: BoxIcon },\n { title: \"Customers\", icon: UsersIcon, badge: \"12\" },\n { title: \"Settings\", icon: SlidersHorizontalIcon },\n];\n\n// Static preview of the sidebar menu primitives. See the App Sidebar pattern\n// for the full responsive sidebar (collapses to a sheet on mobile).\nexport default function SidebarDemo() {\n return (\n <SidebarProvider className=\"min-h-0 w-auto\">\n <div /* recanica-ignore: shows the sidebar surface tone */ className=\"w-60 rounded-2xl border bg-sidebar p-2 text-left\">\n <SidebarGroup>\n <SidebarGroupLabel>Acme Studio</SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {items.map((i) => (\n <SidebarMenuItem key={i.title}>\n <SidebarMenuButton isActive={i.active}><i.icon /> {i.title}</SidebarMenuButton>\n {i.badge && <SidebarMenuBadge>{i.badge}</SidebarMenuBadge>}\n </SidebarMenuItem>\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n </div>\n </SidebarProvider>\n );\n}\n"},{"slug":"dialog","title":"Dialog","category":"Overlays","description":"Modal window for focused tasks.","import":"@recanica/ui/components/dialog","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { XIcon } from \"lucide-react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\n\nimport { Button } from \"@recanica/ui/components/button\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-panel p-6 shadow-float duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from \"@recanica/ui/components/dialog\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\n\nexport default function DialogDemo() {\n return (\n <Dialog>\n <DialogTrigger asChild><Button variant=\"outline\">Invite teammate</Button></DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Invite teammate</DialogTitle>\n <DialogDescription>They'll get access to this organization.</DialogDescription>\n </DialogHeader>\n <Field><FieldLabel htmlFor=\"dlg-email\">Email</FieldLabel><Input id=\"dlg-email\" placeholder=\"name@company.example\" /></Field>\n <DialogFooter>\n <DialogClose asChild><Button variant=\"ghost\">Cancel</Button></DialogClose>\n <Button>Send invite</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n"},{"slug":"alert-dialog","title":"Alert Dialog","category":"Overlays","description":"Interrupting confirmation for destructive actions.","import":"@recanica/ui/components/alert-dialog","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { AlertDialog as AlertDialogPrimitive } from \"radix-ui\"\n\nimport { Button } from \"@recanica/ui/components/button\"\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-panel p-6 shadow-float duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"text-lg sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Action\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n </Button>\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Cancel\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n {...props}\n />\n </Button>\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from \"@recanica/ui/components/alert-dialog\";\n\nexport default function AlertDialogDemo() {\n return (\n <AlertDialog>\n <AlertDialogTrigger asChild><Button variant=\"outline\">Archive product</Button></AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Archive Pro Yearly?</AlertDialogTitle>\n <AlertDialogDescription>Existing subscribers keep access. New customers won't be able to buy it.</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction>Archive</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n}\n"},{"slug":"sheet","title":"Sheet","category":"Overlays","description":"Side panel that slides over content.","import":"@recanica/ui/components/sheet","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { XIcon } from \"lucide-react\"\nimport { Dialog as SheetPrimitive } from \"radix-ui\"\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500\",\n side === \"right\" &&\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n side === \"left\" &&\n \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n side === \"top\" &&\n \"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n side === \"bottom\" &&\n \"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close className=\"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"font-medium text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\n\nexport default function SheetDemo() {\n return (\n <Sheet>\n <SheetTrigger asChild><Button variant=\"outline\">Edit customer</Button></SheetTrigger>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Edit customer</SheetTitle>\n <SheetDescription>Changes apply to future invoices.</SheetDescription>\n </SheetHeader>\n <div className=\"grid gap-4 px-4\">\n <Field><FieldLabel htmlFor=\"sh-name\">Name</FieldLabel><Input id=\"sh-name\" defaultValue=\"Nadia Rahman\" /></Field>\n <Field><FieldLabel htmlFor=\"sh-email\">Email</FieldLabel><Input id=\"sh-email\" defaultValue=\"nadia@example.com\" /></Field>\n </div>\n <SheetFooter>\n <Button>Save changes</Button>\n <SheetClose asChild><Button variant=\"outline\">Cancel</Button></SheetClose>\n </SheetFooter>\n </SheetContent>\n </Sheet>\n );\n}\n"},{"slug":"drawer","title":"Drawer","category":"Overlays","description":"Bottom sheet, ideal on mobile.","import":"@recanica/ui/components/drawer","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n \"group/drawer-content fixed z-50 flex h-auto flex-col bg-background\",\n \"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b\",\n \"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t\",\n \"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm\",\n \"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"font-medium text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from \"@recanica/ui/components/drawer\";\n\nexport default function DrawerDemo() {\n return (\n <Drawer>\n <DrawerTrigger asChild><Button variant=\"outline\">Open drawer</Button></DrawerTrigger>\n <DrawerContent>\n <div className=\"mx-auto w-full max-w-sm\">\n <DrawerHeader>\n <DrawerTitle>Withdraw funds</DrawerTitle>\n <DrawerDescription>Available balance: $1,206.00</DrawerDescription>\n </DrawerHeader>\n <div className=\"px-4 text-center text-metric font-light\">$1,206</div>\n <DrawerFooter>\n <Button>Withdraw</Button>\n <DrawerClose asChild><Button variant=\"outline\">Cancel</Button></DrawerClose>\n </DrawerFooter>\n </div>\n </DrawerContent>\n </Drawer>\n );\n}\n"},{"slug":"popover","title":"Popover","category":"Overlays","description":"Floating panel anchored to a trigger.","import":"@recanica/ui/components/popover","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Popover as PopoverPrimitive } from \"radix-ui\"\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-1 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<\"h2\">) {\n return (\n <div\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverHeader,\n PopoverTitle,\n PopoverDescription,\n}\n","example":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Label } from \"@recanica/ui/components/label\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@recanica/ui/components/popover\";\n\nexport default function PopoverDemo() {\n return (\n <Popover>\n <PopoverTrigger asChild><Button variant=\"outline\">Set limit</Button></PopoverTrigger>\n <PopoverContent className=\"grid gap-3\">\n <div><p className=\"text-sm\">Usage limit</p><p className=\"text-xs text-muted-foreground\">Cap redemptions for this discount.</p></div>\n <div className=\"grid grid-cols-3 items-center gap-2\"><Label htmlFor=\"pv-max\">Max</Label><Input id=\"pv-max\" defaultValue=\"100\" className=\"col-span-2 h-8\" /></div>\n </PopoverContent>\n </Popover>\n );\n}\n"},{"slug":"dropdown-menu","title":"Dropdown Menu","category":"Overlays","description":"Menu of actions from a trigger.","import":"@recanica/ui/components/dropdown-menu","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\"\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","example":"\"use client\";\n\nimport { ChevronDownIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger } from \"@recanica/ui/components/dropdown-menu\";\n\nexport default function DropdownMenuDemo() {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild><Button variant=\"outline\">Actions <ChevronDownIcon /></Button></DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\">\n <DropdownMenuLabel>Pro Yearly</DropdownMenuLabel>\n <DropdownMenuGroup>\n <DropdownMenuItem>Edit <DropdownMenuShortcut>⌘E</DropdownMenuShortcut></DropdownMenuItem>\n <DropdownMenuItem>Duplicate <DropdownMenuShortcut>⌘D</DropdownMenuShortcut></DropdownMenuItem>\n <DropdownMenuItem>Copy checkout link</DropdownMenuItem>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuCheckboxItem checked>Visible in storefront</DropdownMenuCheckboxItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem variant=\"destructive\">Archive</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"},{"slug":"context-menu","title":"Context Menu","category":"Overlays","description":"Right-click menu.","import":"@recanica/ui/components/context-menu","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\"\n\nfunction ContextMenu({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />\n}\n\nfunction ContextMenuTrigger({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />\n )\n}\n\nfunction ContextMenuGroup({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return (\n <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />\n )\n}\n\nfunction ContextMenuPortal({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return (\n <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />\n )\n}\n\nfunction ContextMenuSub({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />\n}\n\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return (\n <ContextMenuPrimitive.RadioGroup\n data-slot=\"context-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </ContextMenuPrimitive.SubTrigger>\n )\n}\n\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n )\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n","example":"\"use client\";\n\nimport { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger } from \"@recanica/ui/components/context-menu\";\n\nexport default function ContextMenuDemo() {\n return (\n <ContextMenu>\n <ContextMenuTrigger className=\"flex h-40 w-full max-w-sm items-center justify-center rounded-2xl border border-dashed text-sm text-muted-foreground\">\n Right-click here\n </ContextMenuTrigger>\n <ContextMenuContent className=\"w-52\">\n <ContextMenuItem>Open <ContextMenuShortcut>↵</ContextMenuShortcut></ContextMenuItem>\n <ContextMenuItem>Rename <ContextMenuShortcut>F2</ContextMenuShortcut></ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem variant=\"destructive\">Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n );\n}\n"},{"slug":"tooltip","title":"Tooltip","category":"Overlays","description":"Short label on hover or focus.","import":"@recanica/ui/components/tooltip","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\"\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n )\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground\" /* recanica-ignore: tooltip arrow is a 2px-rounded square */ />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","example":"\"use client\";\n\nimport { CopyIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"@recanica/ui/components/tooltip\";\n\nexport default function TooltipDemo() {\n return (\n <Tooltip>\n <TooltipTrigger asChild><Button variant=\"outline\" size=\"icon\" aria-label=\"Copy link\"><CopyIcon /></Button></TooltipTrigger>\n <TooltipContent>Copy link</TooltipContent>\n </Tooltip>\n );\n}\n"},{"slug":"hover-card","title":"Hover Card","category":"Overlays","description":"Rich preview on hover.","import":"@recanica/ui/components/hover-card","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { HoverCard as HoverCardPrimitive } from \"radix-ui\"\n\nfunction HoverCard({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />\n}\n\nfunction HoverCardTrigger({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return (\n <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n )\n}\n\nfunction HoverCardContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n )\n}\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n","example":"\"use client\";\n\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { HoverCard, HoverCardContent, HoverCardTrigger } from \"@recanica/ui/components/hover-card\";\n\nexport default function HoverCardDemo() {\n return (\n <HoverCard>\n <HoverCardTrigger asChild><Button variant=\"link\">@acme-studio</Button></HoverCardTrigger>\n <HoverCardContent className=\"flex gap-3\">\n <Avatar><AvatarFallback>AS</AvatarFallback></Avatar>\n <div className=\"space-y-1 text-sm\">\n <p>Acme Studio</p>\n <p className=\"text-muted-foreground\">Design tools for small teams. 1,284 customers.</p>\n <p className=\"text-xs text-muted-foreground\">Joined March 2025</p>\n </div>\n </HoverCardContent>\n </HoverCard>\n );\n}\n"},{"slug":"command","title":"Command","category":"Overlays","description":"Searchable command palette.","import":"@recanica/ui/components/command","source":"\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { SearchIcon } from \"lucide-react\"\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@recanica/ui/components/dialog\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"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-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","example":"\"use client\";\n\nimport { BoxIcon, CreditCardIcon, SettingsIcon, UserIcon } from \"lucide-react\";\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from \"@recanica/ui/components/command\";\n\nexport default function CommandDemo() {\n return (\n <Command className=\"w-full max-w-md rounded-2xl border\">\n <CommandInput placeholder=\"Type a command or search…\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Create\">\n <CommandItem><BoxIcon /> New product</CommandItem>\n <CommandItem><CreditCardIcon /> New checkout link</CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Go to\">\n <CommandItem><UserIcon /> Customers <CommandShortcut>G C</CommandShortcut></CommandItem>\n <CommandItem><SettingsIcon /> Settings <CommandShortcut>G S</CommandShortcut></CommandItem>\n </CommandGroup>\n </CommandList>\n </Command>\n );\n}\n"},{"slug":"resizable","title":"Resizable","category":"Overlays","description":"Draggable split panes.","import":"@recanica/ui/components/resizable","source":"\"use client\"\n\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { GripVerticalIcon } from \"lucide-react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex h-full w-full aria-[orientation=vertical]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n","example":"\"use client\";\n\nimport { ResizableHandle, ResizablePanel, ResizablePanelGroup } from \"@recanica/ui/components/resizable\";\n\nexport default function ResizableDemo() {\n return (\n <ResizablePanelGroup orientation=\"horizontal\" className=\"min-h-56 max-w-lg rounded-2xl border\">\n <ResizablePanel defaultSize=\"40%\">\n <div className=\"flex h-full items-center justify-center p-6 text-sm text-muted-foreground\">List</div>\n </ResizablePanel>\n <ResizableHandle withHandle />\n <ResizablePanel defaultSize=\"60%\">\n <div className=\"flex h-full items-center justify-center p-6 text-sm text-muted-foreground\">Detail</div>\n </ResizablePanel>\n </ResizablePanelGroup>\n );\n}\n"},{"slug":"message","title":"Message","category":"Chat","description":"Chat message layout with avatar, header and footer.","import":"@recanica/ui/components/message","source":"import * as React from \"react\"\nimport { cn } from \"@recanica/ui/lib/utils\"\n\nfunction MessageGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"message-group\"\n className={cn(\"flex min-w-0 flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction Message({\n className,\n align = \"start\",\n ...props\n}: React.ComponentProps<\"div\"> & { align?: \"start\" | \"end\" }) {\n return (\n <div\n data-slot=\"message\"\n data-align={align}\n className={cn(\n \"group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MessageAvatar({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"message-avatar\"\n className={cn(\n \"flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MessageContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"message-content\"\n className={cn(\n \"flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MessageHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"message-header\"\n className={cn(\n \"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MessageFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"message-footer\"\n className={cn(\n \"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n MessageGroup,\n Message,\n MessageAvatar,\n MessageContent,\n MessageFooter,\n MessageHeader,\n}\n","example":"\"use client\";\n\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader } from \"@recanica/ui/components/message\";\nimport { Bubble, BubbleContent } from \"@recanica/ui/components/bubble\";\n\nexport default function MessageDemo() {\n return (\n <MessageGroup className=\"w-full max-w-md text-left\">\n <Message>\n <MessageAvatar><Avatar className=\"size-7\"><AvatarFallback>NR</AvatarFallback></Avatar></MessageAvatar>\n <MessageContent>\n <MessageHeader>Nadia Rahman</MessageHeader>\n <Bubble><BubbleContent>Hi! I was charged twice for my Pro plan.</BubbleContent></Bubble>\n <MessageFooter>2:14 PM</MessageFooter>\n </MessageContent>\n </Message>\n <Message align=\"end\">\n <MessageContent>\n <Bubble align=\"end\" variant=\"secondary\"><BubbleContent>Sorry about that. I've refunded the duplicate charge.</BubbleContent></Bubble>\n <MessageFooter>2:16 PM</MessageFooter>\n </MessageContent>\n </Message>\n </MessageGroup>\n );\n}\n"},{"slug":"bubble","title":"Bubble","category":"Chat","description":"Chat bubble content, start or end aligned.","import":"@recanica/ui/components/bubble","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nfunction BubbleGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"bubble-group\"\n className={cn(\"flex min-w-0 flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nconst bubbleVariants = cva(\n \"group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full\",\n {\n variants: {\n variant: {\n default:\n \"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80\",\n secondary:\n \"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]\",\n muted:\n \"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]\",\n tinted:\n \"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]\",\n outline:\n \"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30\",\n ghost:\n \"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50\",\n destructive:\n \"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Bubble({\n variant = \"default\",\n align = \"start\",\n className,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof bubbleVariants> & {\n align?: \"start\" | \"end\"\n }) {\n return (\n <div\n data-slot=\"bubble\"\n data-variant={variant}\n data-align={align}\n className={cn(bubbleVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction BubbleContent({\n asChild = false,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n <Comp\n data-slot=\"bubble-content\"\n className={cn(\n \"w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst bubbleReactionsVariants = cva(\n \"absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0\",\n {\n variants: {\n side: {\n top: \"top-0 -translate-y-3/4\",\n bottom: \"bottom-0 translate-y-3/4\",\n },\n align: {\n start: \"left-3\",\n end: \"right-3\",\n },\n },\n defaultVariants: {\n side: \"bottom\",\n align: \"end\",\n },\n }\n)\n\nfunction BubbleReactions({\n side = \"bottom\",\n align = \"end\",\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n align?: \"start\" | \"end\"\n side?: \"top\" | \"bottom\"\n}) {\n return (\n <div\n data-slot=\"bubble-reactions\"\n data-align={align}\n data-side={side}\n className={cn(bubbleReactionsVariants({ side, align }), className)}\n {...props}\n />\n )\n}\n\nexport { BubbleGroup, Bubble, BubbleContent, BubbleReactions }\n","example":"\"use client\";\n\nimport { Bubble, BubbleContent, BubbleGroup } from \"@recanica/ui/components/bubble\";\n\nexport default function BubbleDemo() {\n return (\n <BubbleGroup className=\"w-full max-w-sm\">\n <Bubble><BubbleContent>Default bubble</BubbleContent></Bubble>\n <Bubble variant=\"muted\"><BubbleContent>Muted bubble</BubbleContent></Bubble>\n <Bubble variant=\"outline\"><BubbleContent>Outline bubble</BubbleContent></Bubble>\n <Bubble align=\"end\" variant=\"secondary\"><BubbleContent>End-aligned reply</BubbleContent></Bubble>\n </BubbleGroup>\n );\n}\n"},{"slug":"attachment","title":"Attachment","category":"Chat","description":"File attachment chip with actions.","import":"@recanica/ui/components/attachment","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nimport { Button } from \"@recanica/ui/components/button\"\n\nconst attachmentVariants = cva(\n \"group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed\",\n {\n variants: {\n size: {\n default:\n \"gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2\",\n sm: \"gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5\",\n xs: \"gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1\",\n },\n orientation: {\n horizontal: \"min-w-40 items-center\",\n vertical: \"w-24 flex-col has-data-[slot=attachment-content]:w-30\",\n },\n },\n }\n)\n\nfunction Attachment({\n className,\n state = \"done\",\n size = \"default\",\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof attachmentVariants> & {\n state?: \"idle\" | \"uploading\" | \"processing\" | \"error\" | \"done\"\n }) {\n return (\n <div\n data-slot=\"attachment\"\n data-state={state}\n data-size={size}\n data-orientation={orientation}\n className={cn(attachmentVariants({ size, orientation }), className)}\n {...props}\n />\n )\n}\n\nconst attachmentMediaVariants = cva(\n \"relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n icon: \"\",\n image:\n \"opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"icon\",\n },\n }\n)\n\nfunction AttachmentMedia({\n className,\n variant = \"icon\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof attachmentMediaVariants>) {\n return (\n <div\n data-slot=\"attachment-media\"\n data-variant={variant}\n className={cn(attachmentMediaVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-content\"\n className={cn(\n \"max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentTitle({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"attachment-title\"\n className={cn(\n \"block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentDescription({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"attachment-description\"\n className={cn(\n \"mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80\",\n \"max-w-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentActions({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-actions\"\n className={cn(\n \"relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentAction({\n className,\n variant,\n size = \"icon-xs\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"attachment-action\"\n variant={variant ?? \"ghost\"}\n size={size}\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentTrigger({\n className,\n asChild = false,\n type,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"attachment-trigger\"\n type={asChild ? undefined : (type ?? \"button\")}\n className={cn(\"absolute inset-0 z-10 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-group\"\n className={cn(\n \"flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Attachment,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentContent,\n AttachmentTitle,\n AttachmentDescription,\n AttachmentActions,\n AttachmentAction,\n AttachmentTrigger,\n}\n","example":"\"use client\";\n\nimport { FileTextIcon, XIcon } from \"lucide-react\";\nimport { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle } from \"@recanica/ui/components/attachment\";\n\nexport default function AttachmentDemo() {\n return (\n <AttachmentGroup className=\"w-full max-w-md\">\n {[[\"invoice-0042.pdf\", \"PDF · 182 KB\"], [\"contract.pdf\", \"PDF · 1.2 MB\"]].map(([name, meta]) => (\n <Attachment key={name}>\n <AttachmentMedia><FileTextIcon /></AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{name}</AttachmentTitle>\n <AttachmentDescription>{meta}</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions><AttachmentAction aria-label=\"Remove\"><XIcon /></AttachmentAction></AttachmentActions>\n </Attachment>\n ))}\n </AttachmentGroup>\n );\n}\n"},{"slug":"marker","title":"Marker","category":"Chat","description":"Inline status marker or separator in a thread.","import":"@recanica/ui/components/marker","source":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@recanica/ui/lib/utils\"\nimport { Slot } from \"radix-ui\"\n\nconst markerVariants = cva(\n \"group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground\",\n {\n variants: {\n variant: {\n default: \"\",\n separator:\n \"before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border\",\n border: \"border-b border-border pb-2\",\n },\n },\n }\n)\n\nfunction Marker({\n className,\n variant = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof markerVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n <Comp\n data-slot=\"marker\"\n data-variant={variant}\n className={cn(markerVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction MarkerIcon({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"marker-icon\"\n aria-hidden=\"true\"\n className={cn(\n \"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction MarkerContent({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"marker-content\"\n className={cn(\n \"min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Marker, MarkerIcon, MarkerContent, markerVariants }\n","example":"\"use client\";\n\nimport { CheckIcon } from \"lucide-react\";\nimport { Marker, MarkerContent, MarkerIcon } from \"@recanica/ui/components/marker\";\n\nexport default function MarkerDemo() {\n return (\n <div className=\"flex w-full max-w-md flex-col gap-4 text-sm\">\n <Marker variant=\"separator\"><MarkerContent>Today</MarkerContent></Marker>\n <Marker><MarkerIcon><CheckIcon /></MarkerIcon><MarkerContent>Refund issued by Leo Tan</MarkerContent></Marker>\n <Marker variant=\"border\"><MarkerContent>Conversation assigned to Billing</MarkerContent></Marker>\n </div>\n );\n}\n"}],"patterns":[{"slug":"page-header","title":"Page Header","category":"Layout","height":360,"description":"Breadcrumb, title, description and actions; stacks on mobile.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/page-header.json","source":"\"use client\";\n\nimport { DownloadIcon, MoreHorizontalIcon, PlusIcon } from \"lucide-react\";\nimport {\n Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator,\n} from \"@recanica/ui/components/breadcrumb\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport {\n DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger,\n} from \"@recanica/ui/components/dropdown-menu\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nexport default function PageHeader() {\n return (\n <div className=\"mx-auto max-w-content px-gutter py-8\">\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem><BreadcrumbLink href=\"/demo/app/products\">Products</BreadcrumbLink></BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem><BreadcrumbPage>Catalogue</BreadcrumbPage></BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n\n <div className=\"mt-4 flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\">\n <div className=\"space-y-1\">\n <div className=\"flex items-center gap-2\">\n <Heading level={1}>Catalogue</Heading>\n <Badge variant=\"muted\">24</Badge>\n </div>\n <p className=\"text-sm text-muted-foreground\">Products, prices and the benefits they grant.</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" className=\"hidden sm:inline-flex\"><DownloadIcon /> Export</Button>\n <Button className=\"flex-1 sm:flex-none\"><PlusIcon /> New product</Button>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"icon\" aria-label=\"More actions\"><MoreHorizontalIcon /></Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem className=\"sm:hidden\"><DownloadIcon /> Export</DropdownMenuItem>\n <DropdownMenuItem>Import CSV</DropdownMenuItem>\n <DropdownMenuItem>View archived</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n </div>\n\n <div className=\"mt-6 overflow-x-auto\">\n <Tabs defaultValue=\"all\">\n <TabsList>\n <TabsTrigger value=\"all\">All</TabsTrigger>\n <TabsTrigger value=\"subscriptions\">Subscriptions</TabsTrigger>\n <TabsTrigger value=\"one-time\">One-time</TabsTrigger>\n <TabsTrigger value=\"archived\">Archived</TabsTrigger>\n </TabsList>\n </Tabs>\n </div>\n </div>\n );\n}\n"},{"slug":"app-sidebar","title":"App Sidebar","category":"Layout","height":640,"description":"Polar-style nav with sub-items, promo card and account switcher. Hide it with the button or ⌘B; sheet on mobile.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/app-sidebar.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport {\n ArrowUpRightIcon, BellIcon, BoxIcon, ChevronDownIcon, DollarSignIcon, LayoutGridIcon, LifeBuoyIcon, MenuIcon, PanelLeftCloseIcon, PanelLeftOpenIcon,\n SearchIcon, ShoppingBagIcon, SlidersHorizontalIcon, TrendingUpIcon, UsersIcon,\n} from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Sheet, SheetContent, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Surface } from \"@recanica/ui/components/surface\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\nimport { AppSidebar as SidebarColumn, AppSidebarHeader, AppSidebarSub } from \"@recanica/ui/components/app-shell\";\n\nconst nav = [\n { label: \"Overview\", icon: LayoutGridIcon },\n { label: \"Products\", icon: BoxIcon, children: [\"Catalogue\", \"Checkout Links\", \"Discounts\", \"Benefits\", \"Meters\"] },\n { label: \"Customers\", icon: UsersIcon },\n { label: \"Analytics\", icon: TrendingUpIcon },\n { label: \"Sales\", icon: ShoppingBagIcon },\n { label: \"Finance\", icon: DollarSignIcon },\n { label: \"Settings\", icon: SlidersHorizontalIcon },\n];\n\nfunction SidebarContents({ active, onSelect, onHide }: { active: string; onSelect: (v: string) => void; onHide?: () => void }) {\n return (\n <SidebarColumn>\n <AppSidebarHeader>\n <span className=\"size-6 rounded-md bg-brand text-brand-foreground\" aria-label=\"Aturanica\" />\n <div className=\"flex\">\n <Button size=\"icon-sm\" variant=\"ghost\" aria-label=\"Notifications\"><BellIcon /></Button>\n <Button size=\"icon-sm\" variant=\"ghost\" aria-label=\"Search\"><SearchIcon /></Button>\n {onHide && <Button size=\"icon-sm\" variant=\"ghost\" aria-label=\"Hide sidebar (⌘B)\" title=\"Hide sidebar (⌘B)\" onClick={onHide}><PanelLeftCloseIcon /></Button>}\n </div>\n </AppSidebarHeader>\n <nav className=\"flex flex-col gap-0.5\">\n {nav.map((n) => {\n const open = n.label === active || n.children?.includes(active);\n return (\n <div key={n.label}>\n <NavItem variant=\"sidebar\" active={open} onClick={() => onSelect(n.children ? n.children[0] : n.label)}>\n <n.icon className=\"size-4\" /> {n.label}\n </NavItem>\n {n.children && open && (\n <AppSidebarSub>\n {n.children.map((c) => (\n <NavItem key={c} variant=\"sub\" active={active === c} onClick={() => onSelect(c)}>\n {c}\n </NavItem>\n ))}\n </AppSidebarSub>\n )}\n </div>\n );\n })}\n </nav>\n <div className=\"mt-auto space-y-1 pt-6\">\n <Surface size=\"sm\" tone=\"panel\" inset=\"sm\" className=\"mb-3 text-sm\">\n <p>Introducing Aturanica Pro</p>\n <p className=\"mt-1 text-muted-foreground\">Lower fees with a subscription plan.</p>\n <a href=\"/demo/app/settings\" className=\"mt-3 inline-block font-medium text-brand\">Upgrade</a>\n </Surface>\n <NavItem variant=\"sidebar\" as=\"a\" href=\"/demo/app/support\"><LifeBuoyIcon className=\"size-4\" /> Support</NavItem>\n <NavItem variant=\"sidebar\" as=\"a\" href=\"/docs\"><ArrowUpRightIcon className=\"size-4\" /> Documentation</NavItem>\n <NavItem variant=\"sidebar\" className=\"mt-2 rounded-none border-t px-2 pt-3\">\n <Avatar className=\"size-7\"><AvatarFallback>AS</AvatarFallback></Avatar>\n <span className=\"truncate\">Acme Studio</span>\n <ChevronDownIcon className=\"ml-auto size-4 text-muted-foreground\" />\n </NavItem>\n </div>\n </SidebarColumn>\n );\n}\n\nexport default function AppSidebar() {\n const [active, setActive] = React.useState(\"Checkout Links\");\n const [open, setOpen] = React.useState(false);\n // Desktop: the sidebar can be hidden to give the content full width. ⌘B / Ctrl+B toggles it.\n const [hidden, setHidden] = React.useState(false);\n React.useEffect(() => {\n const down = (e: KeyboardEvent) => {\n if (e.key === \"b\" && (e.metaKey || e.ctrlKey)) { e.preventDefault(); setHidden((h) => !h); }\n };\n document.addEventListener(\"keydown\", down);\n return () => document.removeEventListener(\"keydown\", down);\n }, []);\n return (\n <div className=\"flex h-svh overflow-hidden bg-sidebar\">\n <aside\n inert={hidden || undefined}\n className={cn(\"hidden h-full shrink-0 overflow-hidden transition-[width] duration-200 ease-out motion-reduce:transition-none md:block\", hidden ? \"w-0\" : \"w-sidebar\")}\n >\n <div className=\"h-full w-sidebar overflow-y-auto\">\n <SidebarContents active={active} onSelect={setActive} onHide={() => setHidden(true)} />\n </div>\n </aside>\n <div className={cn(\"flex min-h-0 min-w-0 flex-1 flex-col p-2\", !hidden && \"md:pl-0\")}>\n <header className={cn(\"flex shrink-0 items-center gap-2 px-2 pb-2\", !hidden && \"md:hidden\")}>\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild><Button variant=\"ghost\" size=\"icon\" aria-label=\"Open menu\" className=\"md:hidden\"><MenuIcon /></Button></SheetTrigger>\n <SheetContent side=\"left\" className=\"w-72 bg-sidebar p-0\">\n <SheetTitle className=\"sr-only\">Navigation</SheetTitle>\n <SidebarContents active={active} onSelect={(v) => { setActive(v); setOpen(false); }} />\n </SheetContent>\n </Sheet>\n <Button variant=\"ghost\" size=\"icon\" aria-label=\"Show sidebar (⌘B)\" title=\"Show sidebar (⌘B)\" className=\"hidden md:inline-flex\" onClick={() => setHidden(false)}><PanelLeftOpenIcon /></Button>\n <span className=\"size-5 rounded-md bg-brand text-brand-foreground\" />\n <span className=\"text-sm\">{active}</span>\n </header>\n <main /* recanica-ignore: app shell content panel */ className=\"flex min-h-0 flex-1 items-center justify-center overflow-y-auto rounded-2xl border bg-panel p-6 text-sm text-muted-foreground\">\n {active}\n </main>\n </div>\n </div>\n );\n}\n"},{"slug":"app-topnav","title":"App Top Nav","category":"Layout","height":520,"description":"Horizontal app nav that never wraps: items that do not fit move into a More menu; sheet on mobile.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/app-topnav.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { BellIcon, ChevronDownIcon, MenuIcon, SearchIcon } from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport {\n DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger,\n} from \"@recanica/ui/components/dropdown-menu\";\nimport { Sheet, SheetContent, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\n\nconst items = [\"Overview\", \"Products\", \"Customers\", \"Invoices\", \"Analytics\", \"Sales\", \"Finance\", \"Settings\"];\n\n/**\n * Priority+ navigation: items stay on one line and never wrap.\n * Whatever does not fit moves into a \"More\" menu, measured live with a ResizeObserver,\n * so the bar works in any container width, not just at fixed breakpoints.\n */\nfunction usePriorityNav(count: number) {\n const bar = React.useRef<HTMLDivElement>(null);\n const measure = React.useRef<HTMLDivElement>(null);\n const [visible, setVisible] = React.useState(count);\n\n React.useLayoutEffect(() => {\n const el = bar.current;\n const m = measure.current;\n if (!el || !m) return;\n const fit = () => {\n const widths = Array.from(m.children).map((c) => (c as HTMLElement).offsetWidth);\n const more = widths.pop() ?? 0; // last child is the \"More\" button\n const gap = 4;\n const available = el.clientWidth;\n let used = 0;\n let n = 0;\n for (const w of widths) {\n const next = used + w + (n ? gap : 0);\n const needMore = n + 1 < widths.length;\n if (next + (needMore ? more + gap : 0) > available) break;\n used = next;\n n++;\n }\n setVisible(n);\n };\n fit();\n const ro = new ResizeObserver(fit);\n ro.observe(el);\n return () => ro.disconnect();\n }, [count]);\n\n return { bar, measure, visible };\n}\n\nconst itemClass = (on: boolean) =>\n cn(\n \"shrink-0 whitespace-nowrap rounded-full px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground\",\n on && \"bg-accent text-foreground\"\n );\n\nexport default function AppTopNav() {\n const [active, setActive] = React.useState(\"Invoices\");\n const [sheet, setSheet] = React.useState(false);\n const { bar, measure, visible } = usePriorityNav(items.length);\n const shown = items.slice(0, visible);\n const overflow = items.slice(visible);\n const activeInOverflow = overflow.includes(active);\n\n return (\n <div className=\"flex min-h-svh flex-col bg-background\">\n <header className=\"sticky top-0 z-10 border-b bg-background/90 backdrop-blur\">\n <div className=\"mx-auto flex h-14 max-w-content items-center gap-3 px-gutter\">\n <Sheet open={sheet} onOpenChange={setSheet}>\n <SheetTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label=\"Open menu\" className=\"md:hidden\"><MenuIcon /></Button>\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"w-72 p-3\">\n <SheetTitle className=\"sr-only\">Navigation</SheetTitle>\n <nav className=\"mt-10 flex flex-col gap-0.5\">\n {items.map((i) => (\n <NavItem key={i} active={active === i} onClick={() => { setActive(i); setSheet(false); }} className=\"py-2\">\n {i}\n </NavItem>\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n\n <span className=\"size-6 shrink-0 rounded-md bg-brand\" aria-label=\"Aturanica\" />\n\n {/* Measuring row: same items, invisible, used to decide what fits. */}\n <div ref={measure} aria-hidden className=\"pointer-events-none invisible absolute flex gap-1\">\n {items.map((i) => <span key={i} className={itemClass(false)}>{i}</span>)}\n <span className={cn(itemClass(false), \"inline-flex items-center gap-1\")}>More <ChevronDownIcon className=\"size-3.5\" /></span>\n </div>\n\n <nav ref={bar} aria-label=\"Main\" className=\"hidden min-w-0 flex-1 items-center gap-1 overflow-hidden md:flex\">\n {shown.map((i) => (\n <NavItem key={i} variant=\"pill\" active={active === i} onClick={() => setActive(i)}>\n {i}\n </NavItem>\n ))}\n {overflow.length > 0 && (\n <DropdownMenu>\n <DropdownMenuTrigger className={cn(itemClass(activeInOverflow), \"inline-flex items-center gap-1\")}>\n {activeInOverflow ? active : \"More\"} <ChevronDownIcon className=\"size-3.5\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n {overflow.map((i) => <DropdownMenuItem key={i} onSelect={() => setActive(i)}>{i}</DropdownMenuItem>)}\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </nav>\n\n <span className=\"flex-1 truncate text-sm md:hidden\">{active}</span>\n <div className=\"flex shrink-0 items-center gap-1\">\n <Button size=\"icon-sm\" variant=\"ghost\" aria-label=\"Search\"><SearchIcon /></Button>\n <Button size=\"icon-sm\" variant=\"ghost\" aria-label=\"Notifications\"><BellIcon /></Button>\n <Avatar className=\"ml-1 size-7\"><AvatarFallback>AS</AvatarFallback></Avatar>\n </div>\n </div>\n </header>\n <main className=\"mx-auto w-full max-w-content flex-1 px-gutter py-8\">\n <div className=\"flex min-h-64 items-center justify-center rounded-2xl border bg-panel text-sm text-muted-foreground\">{active}</div>\n </main>\n </div>\n );\n}\n"},{"slug":"stat-overview","title":"Stat Overview","category":"Dashboard","height":720,"description":"Grouped metric panels with bar rows and activity lists.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/stat-overview.json","source":"\"use client\";\n\nimport { SlidersHorizontalIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { BarRow, Stat, StatGroup, StatHeader, StatList, StatRow, StatValue } from \"@recanica/ui/components/stat\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst ranges = [\"All time\", \"12m\", \"3m\", \"30d\", \"Today\"];\n\nexport default function StatOverview() {\n return (\n <div className=\"mx-auto max-w-content space-y-stack px-gutter py-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center\">\n <Heading level={1}>Overview</Heading>\n <div className=\"flex items-center gap-2 sm:ml-auto\">\n <div className=\"-mx-1 overflow-x-auto px-1\">\n <Tabs defaultValue=\"30d\">\n <TabsList>\n {ranges.map((r) => <TabsTrigger key={r} value={r === \"All time\" ? \"all\" : r.toLowerCase()}>{r}</TabsTrigger>)}\n </TabsList>\n </Tabs>\n </div>\n <Button variant=\"outline\" size=\"icon\" aria-label=\"Customize\" className=\"shrink-0\"><SlidersHorizontalIcon /></Button>\n </div>\n </div>\n\n <StatGroup>\n <Stat>\n <StatHeader title=\"Revenue\" href=\"/demo/app/reports\" />\n <StatValue value=\"$4,820\" caption=\"November\" />\n <StatList>\n <BarRow label=\"Nov\" value=\"$4,820\" percent={100} active />\n <BarRow label=\"Oct\" value=\"$3,960\" percent={82} />\n <BarRow label=\"Sep\" value=\"$3,410\" percent={71} />\n <BarRow label=\"Aug\" value=\"$2,150\" percent={45} />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Activity\" href=\"/demo/app/notifications\" />\n <StatValue value=\"14\" caption=\"events today\" />\n <StatList>\n <StatRow primary=\"Order paid\" secondary=\"Nadia Rahman\" trailing=\"now\" />\n <StatRow primary=\"Subscription created\" secondary=\"Leo Tan\" trailing=\"1h ago\" />\n <StatRow primary=\"Order paid\" secondary=\"Leo Tan\" trailing=\"1h ago\" />\n <StatRow primary=\"Subscription canceled\" secondary=\"Sam Ortiz\" trailing=\"3h ago\" />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Available balance\" href=\"/demo/app/finance\" />\n <StatValue value={<span className=\"text-brand\">$1,206</span>} />\n <div className=\"mt-auto text-sm\">\n <p>Next payout on 1 Dec</p>\n <p className=\"text-muted-foreground\">Payouts run monthly above $10.</p>\n </div>\n </Stat>\n </StatGroup>\n\n <StatGroup>\n <Stat>\n <StatHeader title=\"Top customers\" href=\"/demo/app/customers\" />\n <StatValue value=\"62%\" caption=\"of revenue\" />\n <StatList>\n <StatRow primary=\"Nadia Rahman\" secondary=\"12 orders\" trailing=\"$1,840\" />\n <StatRow primary=\"Leo Tan\" secondary=\"7 orders\" trailing=\"$1,150\" />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"At risk\" href=\"/demo/app/subscriptions\" />\n <StatValue value=\"1\" />\n <StatList>\n <StatRow primary=\"Sam Ortiz\" secondary=\"Pro Yearly\" trailing=\"Cancels 18 Dec\" />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Gross margin\" href=\"/demo/app/reports\" />\n <StatValue value=\"86%\" caption=\"Last 30 days\" />\n <StatList>\n <BarRow label=\"Oct\" value=\"84%\" percent={84} />\n <BarRow label=\"Sep\" value=\"81%\" percent={81} />\n <BarRow label=\"Aug\" value=\"79%\" percent={79} />\n </StatList>\n </Stat>\n </StatGroup>\n </div>\n );\n}\n"},{"slug":"data-table","title":"Data Table","category":"Dashboard","height":640,"description":"Search, status filter, row selection, row actions and pagination.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/data-table.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { ListFilterIcon, MoreHorizontalIcon, SearchIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Checkbox } from \"@recanica/ui/components/checkbox\";\nimport {\n DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel,\n DropdownMenuSeparator, DropdownMenuTrigger,\n} from \"@recanica/ui/components/dropdown-menu\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"@recanica/ui/components/input-group\";\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@recanica/ui/components/table\";\n\ntype Status = \"Paid\" | \"Pending\" | \"Refunded\" | \"Failed\";\ntype Order = { id: string; customer: string; email: string; product: string; status: Status; amount: number; date: string };\n\nconst orders: Order[] = [\n { id: \"ord_9f2a\", customer: \"Nadia Rahman\", email: \"nadia@example.com\", product: \"Pro Yearly\", status: \"Paid\", amount: 480, date: \"18 Nov\" },\n { id: \"ord_8c1b\", customer: \"Leo Tan\", email: \"leo@example.com\", product: \"Pro Monthly\", status: \"Paid\", amount: 48, date: \"18 Nov\" },\n { id: \"ord_7d3e\", customer: \"Sam Ortiz\", email: \"sam@example.com\", product: \"Starter\", status: \"Refunded\", amount: 12, date: \"17 Nov\" },\n { id: \"ord_6a4f\", customer: \"Mei Kato\", email: \"mei@example.com\", product: \"Pro Yearly\", status: \"Pending\", amount: 480, date: \"17 Nov\" },\n { id: \"ord_5b5c\", customer: \"Arjun Mehta\", email: \"arjun@example.com\", product: \"Team\", status: \"Paid\", amount: 240, date: \"16 Nov\" },\n { id: \"ord_4e6d\", customer: \"Chloe Martin\", email: \"chloe@example.com\", product: \"Pro Monthly\", status: \"Failed\", amount: 48, date: \"16 Nov\" },\n { id: \"ord_3f7a\", customer: \"Hana Lee\", email: \"hana@example.com\", product: \"Starter\", status: \"Paid\", amount: 12, date: \"15 Nov\" },\n];\n\nconst tone: Record<Status, \"success\" | \"warning\" | \"muted\" | \"destructive\"> = {\n Paid: \"success\", Pending: \"warning\", Refunded: \"muted\", Failed: \"destructive\",\n};\nconst statuses: Status[] = [\"Paid\", \"Pending\", \"Refunded\", \"Failed\"];\n\nexport default function DataTable() {\n const [query, setQuery] = React.useState(\"\");\n const [filter, setFilter] = React.useState<Status[]>([]);\n const [selected, setSelected] = React.useState<string[]>([]);\n\n const rows = orders.filter(\n (o) =>\n (filter.length === 0 || filter.includes(o.status)) &&\n `${o.customer} ${o.email} ${o.product} ${o.id}`.toLowerCase().includes(query.toLowerCase())\n );\n const allSelected = rows.length > 0 && rows.every((r) => selected.includes(r.id));\n\n return (\n <div className=\"mx-auto max-w-content space-y-4 px-gutter py-8\">\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n <InputGroup className=\"sm:max-w-xs\">\n <InputGroupAddon><SearchIcon /></InputGroupAddon>\n <InputGroupInput placeholder=\"Search orders\" value={query} onChange={(e) => setQuery(e.target.value)} />\n </InputGroup>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" className=\"sm:w-auto\">\n <ListFilterIcon /> Status {filter.length > 0 && <Badge variant=\"secondary\">{filter.length}</Badge>}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuLabel>Filter by status</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {statuses.map((s) => (\n <DropdownMenuCheckboxItem\n key={s}\n checked={filter.includes(s)}\n onCheckedChange={(c) => setFilter((f) => (c ? [...f, s] : f.filter((x) => x !== s)))}\n onSelect={(e) => e.preventDefault()}\n >\n {s}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n {selected.length > 0 && (\n <div className=\"flex items-center gap-2 text-sm sm:ml-auto\">\n <span className=\"text-muted-foreground\">{selected.length} selected</span>\n <Button size=\"sm\" variant=\"outline\">Refund</Button>\n <Button size=\"sm\" variant=\"ghost\" onClick={() => setSelected([])}>Clear</Button>\n </div>\n )}\n </div>\n\n <div className=\"overflow-hidden rounded-2xl border bg-card\">\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead className=\"w-10\">\n <Checkbox\n aria-label=\"Select all\"\n checked={allSelected}\n onCheckedChange={(c) => setSelected(c ? rows.map((r) => r.id) : [])}\n />\n </TableHead>\n <TableHead>Customer</TableHead>\n <TableHead className=\"hidden md:table-cell\">Product</TableHead>\n <TableHead>Status</TableHead>\n <TableHead className=\"hidden sm:table-cell\">Date</TableHead>\n <TableHead className=\"text-right\">Amount</TableHead>\n <TableHead className=\"w-10\" />\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((o) => (\n <TableRow key={o.id} data-state={selected.includes(o.id) ? \"selected\" : undefined}>\n <TableCell>\n <Checkbox\n aria-label={`Select ${o.customer}`}\n checked={selected.includes(o.id)}\n onCheckedChange={(c) => setSelected((s) => (c ? [...s, o.id] : s.filter((x) => x !== o.id)))}\n />\n </TableCell>\n <TableCell>\n <div>{o.customer}</div>\n <div className=\"text-xs text-muted-foreground\">{o.email}</div>\n </TableCell>\n <TableCell className=\"hidden md:table-cell\">{o.product}</TableCell>\n <TableCell><Badge variant={tone[o.status]}>{o.status}</Badge></TableCell>\n <TableCell className=\"hidden text-muted-foreground sm:table-cell\">{o.date}</TableCell>\n <TableCell className=\"text-right tabular-nums\">${o.amount.toFixed(2)}</TableCell>\n <TableCell>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Row actions\"><MoreHorizontalIcon /></Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem>View order</DropdownMenuItem>\n <DropdownMenuItem>Copy ID</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem variant=\"destructive\">Refund</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </TableCell>\n </TableRow>\n ))}\n {rows.length === 0 && (\n <TableRow><TableCell colSpan={7} className=\"h-32 text-center text-muted-foreground\">No orders match your filters.</TableCell></TableRow>\n )}\n </TableBody>\n </Table>\n </div>\n\n <div className=\"flex items-center justify-between text-sm text-muted-foreground\">\n <span>{rows.length} of {orders.length} orders</span>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" disabled>Previous</Button>\n <Button variant=\"outline\" size=\"sm\">Next</Button>\n </div>\n </div>\n </div>\n );\n}\n"},{"slug":"list-detail","title":"List / Detail","category":"Dashboard","height":600,"description":"Filterable list column with a detail pane; stacks on mobile.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/list-detail.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { ArrowLeftIcon, CopyIcon, LinkIcon, PlusIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from \"@recanica/ui/components/empty\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@recanica/ui/components/select\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\n\nconst links = [\n { id: \"1\", label: \"Black Friday\", product: \"Pro Yearly\", visits: 1240, conversions: 86, active: true },\n { id: \"2\", label: \"Newsletter\", product: \"Pro Monthly\", visits: 420, conversions: 31, active: true },\n { id: \"3\", label: \"Partner: Lumen\", product: \"Team\", visits: 96, conversions: 4, active: false },\n];\n\nexport default function ListDetail() {\n const [selected, setSelected] = React.useState<string | null>(null);\n const link = links.find((l) => l.id === selected);\n\n return (\n <div className=\"flex min-h-[560px] flex-col gap-2 p-2 md:flex-row\">\n {/* List column: full width on mobile, hidden while a detail is open */}\n <section className={cn(\"flex flex-col rounded-2xl border bg-panel md:w-80 md:shrink-0\", link && \"hidden md:flex\")}>\n <header className=\"flex items-center justify-between border-b px-4 py-3\">\n <h2>Checkout Links</h2>\n <Button size=\"icon-sm\" aria-label=\"New link\"><PlusIcon /></Button>\n </header>\n <div className=\"p-3\">\n <Select defaultValue=\"all\">\n <SelectTrigger className=\"w-full\"><SelectValue /></SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All products</SelectItem>\n <SelectItem value=\"pro\">Pro</SelectItem>\n <SelectItem value=\"team\">Team</SelectItem>\n </SelectContent>\n </Select>\n </div>\n <ul className=\"flex flex-col gap-0.5 px-2 pb-2\">\n {links.map((l) => (\n <li key={l.id}>\n <NavItem onClick={() => setSelected(l.id)} active={selected === l.id} className=\"flex-col gap-0.5\">\n <span className=\"flex items-center justify-between text-sm\">\n {l.label}\n {!l.active && <Badge variant=\"muted\">Paused</Badge>}\n </span>\n <span className=\"text-xs text-muted-foreground\">{l.product} · {l.conversions} sales</span>\n </NavItem>\n </li>\n ))}\n </ul>\n </section>\n\n {/* Detail pane */}\n <section className={cn(\"flex-1 rounded-2xl border bg-panel\", !link && \"hidden md:block\")}>\n {link ? (\n <div className=\"space-y-6 p-6\">\n <Button variant=\"ghost\" size=\"sm\" className=\"-ml-2 md:hidden\" onClick={() => setSelected(null)}><ArrowLeftIcon /> Back</Button>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div>\n <Heading level={1}>{link.label}</Heading>\n <p className=\"text-sm text-muted-foreground\">{link.product}</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\"><CopyIcon /> Copy link</Button>\n <Button>Edit</Button>\n </div>\n </div>\n <Separator />\n <dl className=\"grid grid-cols-2 gap-6 sm:grid-cols-3\">\n {[[\"Visits\", link.visits.toLocaleString()], [\"Sales\", link.conversions], [\"Conversion\", `${((link.conversions / link.visits) * 100).toFixed(1)}%`]].map(([k, v]) => (\n <div key={k as string}>\n <dt className=\"text-sm text-muted-foreground\">{k}</dt>\n <dd className=\"text-metric font-light\">{v}</dd>\n </div>\n ))}\n </dl>\n </div>\n ) : (\n <Empty className=\"h-full\">\n <EmptyHeader>\n <EmptyMedia variant=\"icon\"><LinkIcon /></EmptyMedia>\n <EmptyTitle>Select a checkout link</EmptyTitle>\n <EmptyDescription>Or create a new one to share with your customers.</EmptyDescription>\n </EmptyHeader>\n <EmptyContent><Button>Create checkout link</Button></EmptyContent>\n </Empty>\n )}\n </section>\n </div>\n );\n}\n"},{"slug":"activity-feed","title":"Activity Feed","category":"Dashboard","height":520,"description":"Timeline of events grouped by day.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/activity-feed.json","source":"\"use client\";\n\nimport { CreditCardIcon, RefreshCwIcon, UserPlusIcon, XCircleIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst days = [\n {\n label: \"Today\",\n events: [\n { icon: CreditCardIcon, title: \"Order paid\", who: \"Nadia Rahman\", meta: \"Pro Yearly · $480.00\", time: \"2:14 PM\" },\n { icon: UserPlusIcon, title: \"New customer\", who: \"Arjun Mehta\", meta: \"via Black Friday link\", time: \"1:02 PM\" },\n { icon: XCircleIcon, title: \"Subscription canceled\", who: \"Sam Ortiz\", meta: \"Ends 18 Dec\", time: \"9:40 AM\", tone: \"destructive\" as const },\n ],\n },\n {\n label: \"Yesterday\",\n events: [\n { icon: RefreshCwIcon, title: \"Subscription renewed\", who: \"Leo Tan\", meta: \"Pro Monthly · $48.00\", time: \"6:30 PM\" },\n { icon: CreditCardIcon, title: \"Order paid\", who: \"Mei Kato\", meta: \"Starter · $12.00\", time: \"11:05 AM\" },\n ],\n },\n];\n\nexport default function ActivityFeed() {\n return (\n <div className=\"mx-auto max-w-narrow space-y-8 px-gutter py-8\">\n <div className=\"flex items-center justify-between\">\n <Heading level={1}>Activity</Heading>\n <Button variant=\"outline\" size=\"sm\">Export</Button>\n </div>\n {days.map((d) => (\n <section key={d.label}>\n <h2 className=\"mb-3 text-sm text-muted-foreground\">{d.label}</h2>\n <ol className=\"relative space-y-1 before:absolute before:top-2 before:bottom-2 before:left-[17px] before:w-px before:bg-border\">\n {d.events.map((e, i) => (\n <li key={i} className=\"relative flex gap-4 rounded-xl py-2 pr-2\">\n <span className=\"z-10 flex size-9 shrink-0 items-center justify-center rounded-full border bg-panel\">\n <e.icon className=\"size-4 text-muted-foreground\" />\n </span>\n <div className=\"min-w-0 flex-1 pt-1\">\n <p className=\"flex flex-wrap items-center gap-x-2 text-sm\">\n {e.title} <span className=\"text-muted-foreground\">{e.who}</span>\n {e.tone && <Badge variant=\"destructive\">Churn</Badge>}\n </p>\n <p className=\"text-xs text-muted-foreground\">{e.meta}</p>\n </div>\n <time className=\"shrink-0 pt-1 text-xs text-muted-foreground tabular-nums\">{e.time}</time>\n </li>\n ))}\n </ol>\n </section>\n ))}\n </div>\n );\n}\n"},{"slug":"settings-page","title":"Settings Page","category":"Forms","height":760,"description":"Two-column settings sections with a save bar.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/settings-page.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Field, FieldDescription, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from \"@recanica/ui/components/input-group\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@recanica/ui/components/select\";\nimport { Switch } from \"@recanica/ui/components/switch\";\nimport { Textarea } from \"@recanica/ui/components/textarea\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nfunction Section({ title, description, children }: { title: string; description: string; children: React.ReactNode }) {\n return (\n <section className=\"grid gap-6 border-b py-8 last:border-b-0 md:grid-cols-[minmax(0,18rem)_minmax(0,1fr)] md:gap-10\">\n <div>\n <h2 className=\"text-base\">{title}</h2>\n <p className=\"mt-1 text-sm text-muted-foreground\">{description}</p>\n </div>\n <div className=\"grid gap-5\">{children}</div>\n </section>\n );\n}\n\nfunction ToggleRow({ title, body, defaultChecked }: { title: string; body: string; defaultChecked?: boolean }) {\n return (\n <Surface as=\"label\" size=\"sm\" tone=\"plain\" inset=\"sm\" className=\"flex items-start justify-between gap-4\">\n <span>\n <span className=\"block text-sm\">{title}</span>\n <span className=\"block text-sm text-muted-foreground\">{body}</span>\n </span>\n <Switch defaultChecked={defaultChecked} />\n </Surface>\n );\n}\n\nexport default function SettingsPage() {\n const [dirty, setDirty] = React.useState(false);\n return (\n <div className=\"mx-auto max-w-content px-gutter py-8 pb-28\" onChange={() => setDirty(true)}>\n <Heading level={1}>Settings</Heading>\n <p className=\"mt-1 text-sm text-muted-foreground\">Manage your organization profile and preferences.</p>\n\n <Section title=\"Profile\" description=\"How your organization appears to customers.\">\n <div className=\"flex items-center gap-4\">\n <Avatar className=\"size-14\"><AvatarFallback className=\"text-sm\">AS</AvatarFallback></Avatar>\n <Button variant=\"outline\" size=\"sm\">Upload logo</Button>\n </div>\n <Field><FieldLabel htmlFor=\"s-name\">Name</FieldLabel><Input id=\"s-name\" defaultValue=\"Acme Studio\" /></Field>\n <Field>\n <FieldLabel htmlFor=\"s-slug\">Store URL</FieldLabel>\n <InputGroup>\n <InputGroupAddon><InputGroupText>aturanica.com/</InputGroupText></InputGroupAddon>\n <InputGroupInput id=\"s-slug\" defaultValue=\"acme-studio\" />\n </InputGroup>\n </Field>\n <Field>\n <FieldLabel htmlFor=\"s-bio\">Description</FieldLabel>\n <Textarea id=\"s-bio\" defaultValue=\"Design tools for small teams.\" />\n <FieldDescription>Shown on your storefront. Max 160 characters.</FieldDescription>\n </Field>\n </Section>\n\n <Section title=\"Billing\" description=\"Defaults used when you create new products.\">\n <div className=\"grid gap-5 sm:grid-cols-2\">\n <Field>\n <FieldLabel>Currency</FieldLabel>\n <Select defaultValue=\"usd\">\n <SelectTrigger className=\"w-full\"><SelectValue /></SelectTrigger>\n <SelectContent><SelectItem value=\"usd\">USD</SelectItem><SelectItem value=\"eur\">EUR</SelectItem><SelectItem value=\"myr\">MYR</SelectItem></SelectContent>\n </Select>\n </Field>\n <Field>\n <FieldLabel>Tax behavior</FieldLabel>\n <Select defaultValue=\"exclusive\">\n <SelectTrigger className=\"w-full\"><SelectValue /></SelectTrigger>\n <SelectContent><SelectItem value=\"exclusive\">Exclusive</SelectItem><SelectItem value=\"inclusive\">Inclusive</SelectItem></SelectContent>\n </Select>\n </Field>\n </div>\n </Section>\n\n <Section title=\"Notifications\" description=\"Choose what we email you about.\">\n <ToggleRow title=\"New orders\" body=\"Every successful payment.\" defaultChecked />\n <ToggleRow title=\"Cancellations\" body=\"When a subscription is canceled.\" defaultChecked />\n <ToggleRow title=\"Weekly summary\" body=\"Revenue and activity every Monday.\" />\n </Section>\n\n {/* Sticky save bar appears once something changes */}\n <div\n className={`fixed inset-x-0 bottom-0 border-t bg-background/90 backdrop-blur transition-transform duration-300 ease-out-soft ${dirty ? \"translate-y-0\" : \"translate-y-full\"}`}\n >\n <div className=\"mx-auto flex max-w-content items-center justify-between gap-3 px-gutter py-3\">\n <p className=\"text-sm text-muted-foreground\">You have unsaved changes.</p>\n <div className=\"flex gap-2\">\n <Button variant=\"ghost\" onClick={() => setDirty(false)}>Discard</Button>\n <Button onClick={() => setDirty(false)}>Save</Button>\n </div>\n </div>\n </div>\n </div>\n );\n}\n"},{"slug":"create-form","title":"Create Form","category":"Forms","height":760,"description":"Product creation form: field groups, pricing, toggles.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/create-form.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@recanica/ui/components/card\";\nimport { Checkbox } from \"@recanica/ui/components/checkbox\";\nimport { Field, FieldDescription, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from \"@recanica/ui/components/input-group\";\nimport { Label } from \"@recanica/ui/components/label\";\nimport { Switch } from \"@recanica/ui/components/switch\";\nimport { Textarea } from \"@recanica/ui/components/textarea\";\nimport { ToggleGroup, ToggleGroupItem } from \"@recanica/ui/components/toggle-group\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst benefits = [\"License key\", \"Discord role\", \"GitHub repository access\", \"File downloads\"];\n\nexport default function CreateForm() {\n const [billing, setBilling] = React.useState(\"recurring\");\n return (\n <form className=\"mx-auto grid max-w-content gap-6 px-gutter py-8 lg:grid-cols-[minmax(0,1fr)_20rem]\" onSubmit={(e) => e.preventDefault()}>\n <div className=\"space-y-6\">\n <div>\n <Heading level={1}>New product</Heading>\n <p className=\"mt-1 text-sm text-muted-foreground\">Create a product your customers can buy.</p>\n </div>\n\n <Card>\n <CardHeader><CardTitle>Details</CardTitle></CardHeader>\n <CardContent className=\"grid gap-5\">\n <Field><FieldLabel htmlFor=\"p-name\">Name</FieldLabel><Input id=\"p-name\" placeholder=\"Pro\" /></Field>\n <Field>\n <FieldLabel htmlFor=\"p-desc\">Description</FieldLabel>\n <Textarea id=\"p-desc\" placeholder=\"What does the customer get?\" />\n <FieldDescription>Markdown supported.</FieldDescription>\n </Field>\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader><CardTitle>Pricing</CardTitle><CardDescription>One-time or recurring.</CardDescription></CardHeader>\n <CardContent className=\"grid gap-5\">\n <ToggleGroup type=\"single\" value={billing} onValueChange={(v) => v && setBilling(v)} variant=\"outline\" className=\"w-full sm:w-fit\">\n <ToggleGroupItem value=\"recurring\" className=\"flex-1 sm:flex-none\">Recurring</ToggleGroupItem>\n <ToggleGroupItem value=\"one-time\" className=\"flex-1 sm:flex-none\">One-time</ToggleGroupItem>\n <ToggleGroupItem value=\"pwyw\" className=\"flex-1 sm:flex-none\"><span className=\"sm:hidden\">Flexible</span><span className=\"hidden sm:inline\">Pay what you want</span></ToggleGroupItem>\n </ToggleGroup>\n <div className=\"grid gap-5 sm:grid-cols-2\">\n <Field>\n <FieldLabel htmlFor=\"p-price\">Price</FieldLabel>\n <InputGroup>\n <InputGroupAddon><InputGroupText>$</InputGroupText></InputGroupAddon>\n <InputGroupInput id=\"p-price\" placeholder=\"0.00\" inputMode=\"decimal\" />\n <InputGroupAddon align=\"inline-end\"><InputGroupText>{billing === \"recurring\" ? \"/ month\" : \"USD\"}</InputGroupText></InputGroupAddon>\n </InputGroup>\n </Field>\n {billing === \"recurring\" && (\n <Field>\n <FieldLabel htmlFor=\"p-trial\">Free trial</FieldLabel>\n <InputGroup>\n <InputGroupInput id=\"p-trial\" placeholder=\"0\" inputMode=\"numeric\" />\n <InputGroupAddon align=\"inline-end\"><InputGroupText>days</InputGroupText></InputGroupAddon>\n </InputGroup>\n </Field>\n )}\n </div>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"space-y-6\">\n <Card>\n <CardHeader><CardTitle>Benefits</CardTitle><CardDescription>Granted automatically on purchase.</CardDescription></CardHeader>\n <CardContent className=\"grid gap-3\">\n {benefits.map((b, i) => (\n <div key={b} className=\"flex items-center gap-2\">\n <Checkbox id={`b-${i}`} defaultChecked={i === 0} />\n <Label htmlFor={`b-${i}`}>{b}</Label>\n </div>\n ))}\n </CardContent>\n </Card>\n <Card>\n <CardContent className=\"flex items-center justify-between gap-4\">\n <div><p className=\"text-sm\">Visible in storefront</p><p className=\"text-sm text-muted-foreground\">Customers can find it.</p></div>\n <Switch defaultChecked />\n </CardContent>\n </Card>\n <div className=\"flex gap-2 lg:flex-col\">\n <Button type=\"submit\" className=\"flex-1\">Create product</Button>\n <Button type=\"button\" variant=\"ghost\" className=\"flex-1\">Cancel</Button>\n </div>\n </div>\n </form>\n );\n}\n"},{"slug":"file-upload","title":"File Upload","category":"Forms","height":480,"description":"Drop zone with upload progress list.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/file-upload.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { FileIcon, UploadCloudIcon, XIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Progress } from \"@recanica/ui/components/progress\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\ntype Upload = { name: string; size: number; progress: number };\n\nconst initial: Upload[] = [\n { name: \"brand-assets.zip\", size: 24_800_000, progress: 100 },\n { name: \"course-module-03.mp4\", size: 182_000_000, progress: 46 },\n];\n\nconst fmt = (b: number) => (b > 1e6 ? `${(b / 1e6).toFixed(1)} MB` : `${Math.round(b / 1e3)} KB`);\n\nexport default function FileUpload() {\n const [files, setFiles] = React.useState(initial);\n const [over, setOver] = React.useState(false);\n const input = React.useRef<HTMLInputElement>(null);\n\n const add = (list: FileList | null) => {\n if (!list) return;\n setFiles((f) => [...f, ...Array.from(list).map((x) => ({ name: x.name, size: x.size, progress: 100 }))]);\n };\n\n return (\n <div className=\"mx-auto max-w-narrow space-y-4 px-gutter py-8\">\n <div>\n <Heading level={1}>Downloadables</Heading>\n <p className=\"mt-1 text-sm text-muted-foreground\">Files customers can download after purchase.</p>\n </div>\n <div\n onDragOver={(e) => { e.preventDefault(); setOver(true); }}\n onDragLeave={() => setOver(false)}\n onDrop={(e) => { e.preventDefault(); setOver(false); add(e.dataTransfer.files); }}\n className={cn(\n \"flex flex-col items-center justify-center gap-3 rounded-2xl border border-dashed px-6 py-12 text-center transition-colors\",\n over && \"border-foreground/40 bg-accent\"\n )}\n >\n <span className=\"flex size-11 items-center justify-center rounded-full border bg-muted\"><UploadCloudIcon className=\"size-5\" /></span>\n <div>\n <p className=\"text-sm\">Drop files here or <Button variant=\"link\" size=\"inline\" onClick={() => input.current?.click()}>browse</Button></p>\n <p className=\"text-xs text-muted-foreground\">Up to 2 GB per file.</p>\n </div>\n <input /* recanica-ignore: hidden native file input behind the drop zone */ ref={input} type=\"file\" multiple hidden onChange={(e) => add(e.target.files)} />\n </div>\n <ul className=\"space-y-2\">\n {files.map((f, i) => (\n <Surface as=\"li\" size=\"sm\" tone=\"plain\" inset=\"sm\" className=\"flex items-center gap-3\" key={f.name + i}>\n <FileIcon className=\"size-5 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1 space-y-1.5\">\n <div className=\"flex justify-between gap-2 text-sm\">\n <span className=\"truncate\">{f.name}</span>\n <span className=\"shrink-0 text-muted-foreground tabular-nums\">{f.progress < 100 ? `${f.progress}%` : fmt(f.size)}</span>\n </div>\n {f.progress < 100 && <Progress value={f.progress} className=\"h-1\" />}\n </div>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label={`Remove ${f.name}`} onClick={() => setFiles((x) => x.filter((_, j) => j !== i))}>\n <XIcon />\n </Button>\n </Surface>\n ))}\n </ul>\n </div>\n );\n}\n"},{"slug":"danger-zone","title":"Danger Zone","category":"Forms","height":420,"description":"Destructive actions with type-to-confirm.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/danger-zone.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport {\n AlertDialog, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader,\n AlertDialogTitle, AlertDialogTrigger,\n} from \"@recanica/ui/components/alert-dialog\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst NAME = \"acme-studio\";\n\nfunction Row({ title, body, action }: { title: string; body: string; action: React.ReactNode }) {\n return (\n <div className=\"flex flex-col gap-3 p-5 sm:flex-row sm:items-center sm:justify-between\">\n <div><p className=\"text-sm\">{title}</p><p className=\"text-sm text-muted-foreground\">{body}</p></div>\n <div className=\"shrink-0\">{action}</div>\n </div>\n );\n}\n\nexport default function DangerZone() {\n const [value, setValue] = React.useState(\"\");\n return (\n <div className=\"mx-auto max-w-narrow space-y-4 px-gutter py-8\">\n <Heading level={2}>Danger zone</Heading>\n <div className=\"divide-y rounded-2xl border border-destructive/40\">\n <Row title=\"Transfer ownership\" body=\"Move this organization to another member.\" action={<Button variant=\"outline\">Transfer</Button>} />\n <Row\n title=\"Delete organization\"\n body=\"Permanently delete all products, customers and data.\"\n action={\n <AlertDialog onOpenChange={() => setValue(\"\")}>\n <AlertDialogTrigger asChild><Button variant=\"destructive\">Delete</Button></AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete organization?</AlertDialogTitle>\n <AlertDialogDescription>This cannot be undone. Active subscriptions will be canceled immediately.</AlertDialogDescription>\n </AlertDialogHeader>\n <Field>\n <FieldLabel htmlFor=\"confirm\">Type <span className=\"font-mono text-foreground\">{NAME}</span> to confirm</FieldLabel>\n <Input id=\"confirm\" value={value} onChange={(e) => setValue(e.target.value)} autoComplete=\"off\" />\n </Field>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <Button variant=\"destructive\" disabled={value !== NAME}>Delete organization</Button>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n }\n />\n </div>\n </div>\n );\n}\n"},{"slug":"sign-in","title":"Sign In","category":"Auth","height":640,"description":"Email + password, social providers and magic link.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/sign-in.json","source":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { CenteredPage } from \"@recanica/ui/components/layout\";\n\nfunction GitHubMark() {\n return (\n <svg viewBox=\"0 0 24 24\" aria-hidden className=\"size-4 fill-current\">\n <path d=\"M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.37-3.88-1.37-.52-1.33-1.28-1.69-1.28-1.69-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.68 0-1.26.45-2.28 1.19-3.08-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.77 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.8 1.19 1.82 1.19 3.08 0 4.41-2.69 5.38-5.25 5.67.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .5Z\" />\n </svg>\n );\n}\n\nexport default function SignIn() {\n return (\n <CenteredPage>\n <div className=\"w-full max-w-sm space-y-6\">\n <div className=\"flex flex-col items-center gap-3 text-center\">\n <span className=\"size-9 rounded-xl bg-brand text-brand-foreground\" />\n <Heading level={1}>Welcome back</Heading>\n <p className=\"text-sm text-muted-foreground\">Sign in to your Aturanica account.</p>\n </div>\n <div className=\"grid gap-2\">\n <Button variant=\"outline\" className=\"w-full\"><GitHubMark /> Continue with GitHub</Button>\n <Button variant=\"outline\" className=\"w-full\">Continue with Google</Button>\n </div>\n <div className=\"flex items-center gap-3 text-xs text-muted-foreground\">\n <Separator className=\"flex-1\" /> or <Separator className=\"flex-1\" />\n </div>\n <form className=\"grid gap-4\" onSubmit={(e) => e.preventDefault()}>\n <Field><FieldLabel htmlFor=\"si-email\">Email</FieldLabel><Input id=\"si-email\" type=\"email\" placeholder=\"name@company.example\" autoComplete=\"email\" /></Field>\n <Field>\n <div className=\"flex items-center justify-between\">\n <FieldLabel htmlFor=\"si-pass\">Password</FieldLabel>\n <a href=\"/demo/sign-in\" className=\"text-sm text-muted-foreground hover:text-foreground\">Forgot?</a>\n </div>\n <Input id=\"si-pass\" type=\"password\" autoComplete=\"current-password\" />\n </Field>\n <Button type=\"submit\" variant=\"brand\" className=\"w-full\">Sign in</Button>\n <Button type=\"button\" variant=\"ghost\" className=\"w-full\">Email me a sign-in link</Button>\n </form>\n <p className=\"text-center text-sm text-muted-foreground\">\n No account? <a href=\"/demo/sign-in\" className=\"text-foreground underline-offset-4 hover:underline\">Create one</a>\n </p>\n </div>\n </CenteredPage>\n );\n}\n"},{"slug":"verify-code","title":"Verify Code","category":"Auth","height":520,"description":"One-time code verification with resend.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/verify-code.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { MailIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from \"@recanica/ui/components/input-otp\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { CenteredPage } from \"@recanica/ui/components/layout\";\n\nexport default function VerifyCode() {\n const [code, setCode] = React.useState(\"\");\n const [seconds, setSeconds] = React.useState(30);\n React.useEffect(() => {\n if (seconds <= 0) return;\n const t = setTimeout(() => setSeconds((s) => s - 1), 1000);\n return () => clearTimeout(t);\n }, [seconds]);\n\n return (\n <CenteredPage>\n <div className=\"w-full max-w-sm space-y-6 text-center\">\n <span className=\"mx-auto flex size-12 items-center justify-center rounded-full border bg-muted\"><MailIcon className=\"size-5\" /></span>\n <div className=\"space-y-1\">\n <Heading level={1}>Check your email</Heading>\n <p className=\"text-sm text-muted-foreground\">We sent a 6-digit code to <span className=\"text-foreground\">nadia@example.com</span></p>\n </div>\n <div className=\"flex justify-center\">\n <InputOTP maxLength={6} value={code} onChange={setCode} autoFocus>\n <InputOTPGroup>\n {[0, 1, 2, 3, 4, 5].map((i) => <InputOTPSlot key={i} index={i} className=\"size-11 text-base sm:size-12\" />)}\n </InputOTPGroup>\n </InputOTP>\n </div>\n <Button className=\"w-full\" disabled={code.length < 6}>Verify</Button>\n <p className=\"text-sm text-muted-foreground\">\n Didn't get it?{\" \"}\n {seconds > 0 ? (\n <span className=\"tabular-nums\">Resend in {seconds}s</span>\n ) : (\n <Button variant=\"link\" size=\"inline\" onClick={() => setSeconds(30)}>Resend code</Button>\n )}\n </p>\n </div>\n </CenteredPage>\n );\n}\n"},{"slug":"onboarding-steps","title":"Onboarding Steps","category":"Auth","height":560,"description":"Setup checklist with progress.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/onboarding-steps.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { ArrowRightIcon, CheckIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Progress } from \"@recanica/ui/components/progress\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst steps = [\n { title: \"Create your organization\", body: \"Name, logo and store URL.\", cta: \"Edit\" },\n { title: \"Add your first product\", body: \"Set a price and the benefits it grants.\", cta: \"Create product\" },\n { title: \"Connect payouts\", body: \"Link a bank account to get paid.\", cta: \"Connect\" },\n { title: \"Share a checkout link\", body: \"Send it to your first customer.\", cta: \"Create link\" },\n];\n\nexport default function OnboardingSteps() {\n const [done, setDone] = React.useState(1);\n return (\n <div className=\"mx-auto max-w-narrow space-y-6 px-gutter py-8\">\n <div className=\"space-y-3\">\n <div className=\"flex items-end justify-between gap-4\">\n <div>\n <Heading level={1}>Get started</Heading>\n <p className=\"mt-1 text-sm text-muted-foreground\">Four steps to your first sale.</p>\n </div>\n <span className=\"text-sm text-muted-foreground tabular-nums\">{done} / {steps.length}</span>\n </div>\n <Progress value={(done / steps.length) * 100} className=\"h-1\" />\n </div>\n <ol className=\"divide-y rounded-2xl border bg-card\">\n {steps.map((s, i) => {\n const complete = i < done;\n const current = i === done;\n return (\n <li key={s.title} className={cn(\"flex flex-col gap-3 p-5 sm:flex-row sm:items-center\", !complete && !current && \"opacity-60\")}>\n <span\n className={cn(\n \"flex size-7 shrink-0 items-center justify-center rounded-full border text-xs tabular-nums\",\n complete && \"border-transparent bg-brand text-brand-foreground\"\n )}\n >\n {complete ? <CheckIcon className=\"size-3.5\" /> : i + 1}\n </span>\n <div className=\"flex-1\">\n <p className={cn(\"text-sm\", complete && \"text-muted-foreground line-through\")}>{s.title}</p>\n <p className=\"text-sm text-muted-foreground\">{s.body}</p>\n </div>\n {current && <Button size=\"sm\" onClick={() => setDone((d) => d + 1)}>{s.cta} <ArrowRightIcon /></Button>}\n </li>\n );\n })}\n </ol>\n </div>\n );\n}\n"},{"slug":"empty-states","title":"Empty States","category":"Feedback","height":560,"description":"First-run, no-results and error variants.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/empty-states.json","source":"\"use client\";\n\nimport { AlertTriangleIcon, BoxIcon, SearchXIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from \"@recanica/ui/components/empty\";\n\nconst states = [\n {\n icon: BoxIcon, title: \"No products yet\", body: \"Create your first product to start selling.\",\n actions: <><Button>Create product</Button><Button variant=\"ghost\">Import</Button></>,\n },\n {\n icon: SearchXIcon, title: \"No results\", body: \"Nothing matches “pro yearly”. Try a different search.\",\n actions: <Button variant=\"outline\">Clear filters</Button>,\n },\n {\n icon: AlertTriangleIcon, title: \"Couldn't load customers\", body: \"Something went wrong on our side. Your data is safe.\",\n actions: <Button variant=\"outline\">Try again</Button>,\n },\n];\n\nexport default function EmptyStates() {\n return (\n <div className=\"mx-auto grid max-w-content gap-4 px-gutter py-8 md:grid-cols-3\">\n {states.map((s) => (\n <Empty key={s.title} className=\"rounded-2xl border bg-card\">\n <EmptyHeader>\n <EmptyMedia variant=\"icon\"><s.icon /></EmptyMedia>\n <EmptyTitle>{s.title}</EmptyTitle>\n <EmptyDescription>{s.body}</EmptyDescription>\n </EmptyHeader>\n <EmptyContent className=\"flex-row justify-center\">{s.actions}</EmptyContent>\n </Empty>\n ))}\n </div>\n );\n}\n"},{"slug":"notifications","title":"Notifications","category":"Feedback","height":560,"description":"Inbox popover with unread state and tabs.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/notifications.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { BellIcon, CheckCheckIcon } from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@recanica/ui/components/popover\";\nimport { ScrollArea } from \"@recanica/ui/components/scroll-area\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\n\nconst seed = [\n { id: 1, who: \"Nadia Rahman\", initials: \"NR\", text: \"purchased Pro Yearly\", time: \"2m\", unread: true },\n { id: 2, who: \"Leo Tan\", initials: \"LT\", text: \"renewed Pro Monthly\", time: \"1h\", unread: true },\n { id: 3, who: \"Sam Ortiz\", initials: \"SO\", text: \"canceled their subscription\", time: \"3h\", unread: false },\n { id: 4, who: \"Payouts\", initials: \"$\", text: \"$1,206 is on its way\", time: \"1d\", unread: false },\n];\n\nexport default function Notifications() {\n const [items, setItems] = React.useState(seed);\n const [tab, setTab] = React.useState(\"all\");\n const unread = items.filter((i) => i.unread).length;\n const shown = tab === \"unread\" ? items.filter((i) => i.unread) : items;\n\n return (\n <div className=\"flex min-h-[520px] items-start justify-center px-gutter pt-10\">\n <Popover defaultOpen>\n <PopoverTrigger asChild>\n <Button variant=\"outline\" size=\"icon\" className=\"relative\" aria-label=\"Notifications\">\n <BellIcon />\n {unread > 0 && <span className=\"absolute top-1.5 right-1.5 size-2 rounded-full bg-foreground\" />}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[min(22rem,calc(100vw-2rem))] p-0\" align=\"center\">\n <div className=\"flex items-center justify-between border-b px-4 py-3\">\n <p className=\"text-sm\">Notifications</p>\n <Button variant=\"ghost\" size=\"sm\" disabled={!unread} onClick={() => setItems((x) => x.map((i) => ({ ...i, unread: false })))}>\n <CheckCheckIcon /> Mark all read\n </Button>\n </div>\n <div className=\"px-4 pt-3\">\n <Tabs value={tab} onValueChange={setTab}>\n <TabsList>\n <TabsTrigger value=\"all\">All</TabsTrigger>\n <TabsTrigger value=\"unread\">Unread {unread > 0 && `(${unread})`}</TabsTrigger>\n </TabsList>\n </Tabs>\n </div>\n <ScrollArea className=\"h-72\">\n <ul className=\"p-2\">\n {shown.map((n) => (\n <li key={n.id}>\n <NavItem onClick={() => setItems((x) => x.map((i) => (i.id === n.id ? { ...i, unread: false } : i)))}>\n <Avatar className=\"size-8\"><AvatarFallback>{n.initials}</AvatarFallback></Avatar>\n <span className=\"flex-1 text-sm\">\n <span>{n.who}</span> <span className=\"text-muted-foreground\">{n.text}</span>\n <span className=\"block text-xs text-muted-foreground\">{n.time} ago</span>\n </span>\n <span className={cn(\"mt-1.5 size-2 rounded-full\", n.unread ? \"bg-foreground\" : \"bg-transparent\")} />\n </NavItem>\n </li>\n ))}\n {shown.length === 0 && <li className=\"py-12 text-center text-sm text-muted-foreground\">You're all caught up.</li>}\n </ul>\n </ScrollArea>\n </PopoverContent>\n </Popover>\n </div>\n );\n}\n"},{"slug":"command-menu","title":"Command Menu","category":"Navigation","height":520,"description":"⌘K palette with groups and shortcuts.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/command-menu.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport {\n BoxIcon, CreditCardIcon, LayoutGridIcon, LinkIcon, MoonIcon, SearchIcon, SettingsIcon, UsersIcon,\n} from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport {\n CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut,\n} from \"@recanica/ui/components/command\";\nimport { Kbd, KbdGroup } from \"@recanica/ui/components/kbd\";\n\nexport default function CommandMenu() {\n const [open, setOpen] = React.useState(true);\n\n React.useEffect(() => {\n const down = (e: KeyboardEvent) => {\n if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) { e.preventDefault(); setOpen((o) => !o); }\n };\n document.addEventListener(\"keydown\", down);\n return () => document.removeEventListener(\"keydown\", down);\n }, []);\n\n return (\n <div className=\"flex min-h-[480px] items-start justify-center px-gutter pt-10\">\n <Button variant=\"secondary\" onClick={() => setOpen(true)} className=\"w-full max-w-xs justify-start text-muted-foreground\">\n <SearchIcon /> <span className=\"flex-1 text-left font-normal\">Search…</span>\n <KbdGroup><Kbd>⌘</Kbd><Kbd>K</Kbd></KbdGroup>\n </Button>\n <CommandDialog open={open} onOpenChange={setOpen}>\n <CommandInput placeholder=\"Type a command or search…\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Create\">\n <CommandItem><BoxIcon /> New product <CommandShortcut>C P</CommandShortcut></CommandItem>\n <CommandItem><LinkIcon /> New checkout link <CommandShortcut>C L</CommandShortcut></CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Go to\">\n <CommandItem><LayoutGridIcon /> Overview <CommandShortcut>G O</CommandShortcut></CommandItem>\n <CommandItem><UsersIcon /> Customers <CommandShortcut>G C</CommandShortcut></CommandItem>\n <CommandItem><CreditCardIcon /> Finance <CommandShortcut>G F</CommandShortcut></CommandItem>\n <CommandItem><SettingsIcon /> Settings <CommandShortcut>G S</CommandShortcut></CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Preferences\">\n <CommandItem><MoonIcon /> Toggle theme</CommandItem>\n </CommandGroup>\n </CommandList>\n </CommandDialog>\n </div>\n );\n}\n"},{"slug":"account-switcher","title":"Account Switcher","category":"Navigation","height":460,"description":"Org/account dropdown with create and sign-out.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/account-switcher.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon, ChevronsUpDownIcon, LogOutIcon, PlusIcon, SettingsIcon } from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport {\n DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator,\n DropdownMenuShortcut, DropdownMenuTrigger,\n} from \"@recanica/ui/components/dropdown-menu\";\n\nconst orgs = [\n { name: \"Acme Studio\", initials: \"AS\", plan: \"Pro\" },\n { name: \"Lumen Labs\", initials: \"LL\", plan: \"Starter\" },\n { name: \"Personal\", initials: \"NR\", plan: \"Free\" },\n];\n\nexport default function AccountSwitcher() {\n const [current, setCurrent] = React.useState(orgs[0]);\n return (\n <div className=\"flex min-h-[420px] items-start justify-center px-gutter pt-10\">\n <DropdownMenu defaultOpen>\n <DropdownMenuTrigger className=\"flex w-64 items-center gap-3 rounded-xl border bg-card px-3 py-2 text-left text-sm transition-colors hover:bg-accent\">\n <Avatar className=\"size-7\"><AvatarFallback>{current.initials}</AvatarFallback></Avatar>\n <span className=\"flex-1 truncate\">{current.name}</span>\n <ChevronsUpDownIcon className=\"size-4 text-muted-foreground\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-64\" align=\"start\">\n <DropdownMenuLabel className=\"text-xs text-muted-foreground\">nadia@example.com</DropdownMenuLabel>\n <DropdownMenuGroup>\n {orgs.map((o) => (\n <DropdownMenuItem key={o.name} onSelect={() => setCurrent(o)}>\n <Avatar className=\"size-6\"><AvatarFallback>{o.initials}</AvatarFallback></Avatar>\n <span className=\"flex-1\">{o.name}<span className=\"block text-xs text-muted-foreground\">{o.plan}</span></span>\n {current.name === o.name && <CheckIcon />}\n </DropdownMenuItem>\n ))}\n <DropdownMenuItem><PlusIcon /> New organization</DropdownMenuItem>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem><SettingsIcon /> Settings <DropdownMenuShortcut>⌘,</DropdownMenuShortcut></DropdownMenuItem>\n <DropdownMenuItem><LogOutIcon /> Sign out</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n"},{"slug":"pricing-table","title":"Plan Comparison","category":"Billing","height":640,"description":"In-app plan picker with billing toggle and current plan.","kind":"pattern","install":"npx shadcn@latest add https://recanica.aturanica.com/r/pricing-table.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon, MinusIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading, PageHeader } from \"@recanica/ui/components/page\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\n\nconst plans = [\n { id: \"starter\", name: \"Starter\", monthly: 0, fee: \"5% + 40¢\", current: true },\n { id: \"pro\", name: \"Pro\", monthly: 29, fee: \"3% + 40¢\", featured: true },\n { id: \"scale\", name: \"Scale\", monthly: 99, fee: \"2% + 40¢\" },\n];\nconst features: [string, boolean[]][] = [\n [\"Unlimited products\", [true, true, true]],\n [\"Custom domain\", [false, true, true]],\n [\"Team members\", [false, true, true]],\n [\"Priority support\", [false, false, true]],\n [\"Revenue recognition\", [false, false, true]],\n];\n\nexport default function PricingTable() {\n const [cycle, setCycle] = React.useState(\"monthly\");\n const price = (m: number) => (cycle === \"yearly\" ? Math.round(m * 0.8) : m);\n return (\n <div className=\"mx-auto max-w-content space-y-6 px-gutter py-8\">\n <PageHeader title=\"Plans\" description=\"Lower your fees as you grow. Change anytime.\" actions={\n <Tabs value={cycle} onValueChange={setCycle}>\n <TabsList>\n <TabsTrigger value=\"monthly\">Monthly</TabsTrigger>\n <TabsTrigger value=\"yearly\">Yearly <Badge variant=\"success\">-20%</Badge></TabsTrigger>\n </TabsList>\n </Tabs>\n } />\n\n <SurfaceGrid className=\"md:grid-cols-3\">\n {plans.map((p, pi) => (\n <div key={p.id} className={cn(\"flex flex-col gap-6 bg-card p-panel\", p.featured && \"bg-accent/40\")}>\n <div className=\"flex items-center justify-between\">\n <span>{p.name}</span>\n {p.current ? <Badge variant=\"outline\">Current</Badge> : p.featured ? <Badge variant=\"brand\">Recommended</Badge> : null}\n </div>\n <div className=\"flex items-baseline gap-1\">\n <span className={cn(\"text-metric font-light tabular-nums\", p.featured && \"text-brand\")}>${price(p.monthly)}</span>\n <span className=\"text-sm text-muted-foreground\">/ mo</span>\n </div>\n <p className=\"text-sm text-muted-foreground\">Transaction fee <span className=\"text-foreground\">{p.fee}</span></p>\n <ul className=\"space-y-2 text-sm\">\n {features.map(([f, has]) => (\n <li key={f} className={cn(\"flex items-center gap-2\", !has[pi] && \"text-muted-foreground\")}>\n {has[pi] ? <CheckIcon className=\"size-4\" /> : <MinusIcon className=\"size-4\" />} {f}\n </li>\n ))}\n </ul>\n <Button className=\"mt-auto\" variant={p.current ? \"outline\" : p.featured ? \"brand\" : \"default\"} disabled={p.current}>\n {p.current ? \"Current plan\" : `Upgrade to ${p.name}`}\n </Button>\n </div>\n ))}\n </SurfaceGrid>\n </div>\n );\n}\n"},{"slug":"invoice-01","title":"Invoice","category":"Billing","height":1100,"description":"Printable invoice document: parties, line items, totals, payment details.","kind":"block","install":"npx shadcn@latest add https://recanica.aturanica.com/r/invoice-01.json","source":"\"use client\";\n\nimport { DownloadIcon, PrinterIcon, SendIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst invoice = {\n number: \"INV-2026-0042\",\n status: \"Due\" as \"Paid\" | \"Due\" | \"Overdue\",\n issued: \"18 Nov 2026\",\n due: \"2 Dec 2026\",\n from: { name: \"Acme Studio Sdn. Bhd.\", lines: [\"BRN 202401012345 (1556789-X)\", \"TIN C25845632020 · SST W10-2401-32000123\", \"Level 12, Menara Contoh, Jalan Ampang\", \"50450 Kuala Lumpur\", \"billing@acme.example\"] },\n to: { name: \"Lumen Labs Sdn. Bhd.\", lines: [\"BRN 201901023456 (1321456-W)\", \"TIN C24890123050\", \"Unit 3A-5, Bayan Point, Jalan Mahsuri\", \"11950 Bayan Lepas, Pulau Pinang\", \"finance@lumenlabs.example\"] },\n items: [\n { description: \"Pro plan · annual\", detail: \"1 Dec 2026 – 30 Nov 2027\", qty: 1, unit: 1990 },\n { description: \"Additional seats\", detail: \"Pro, annual\", qty: 5, unit: 399 },\n { description: \"Onboarding workshop\", detail: \"2 × 90-minute sessions\", qty: 1, unit: 1500 },\n ],\n discount: 0.1,\n taxRate: 0.08,\n currency: \"MYR\",\n};\n\nconst money = (n: number) => new Intl.NumberFormat(\"en-MY\", { style: \"currency\", currency: invoice.currency }).format(n);\n\nexport function Invoice01() {\n const subtotal = invoice.items.reduce((s, i) => s + i.qty * i.unit, 0);\n const discount = subtotal * invoice.discount;\n const tax = (subtotal - discount) * invoice.taxRate;\n const total = subtotal - discount + tax;\n\n return (\n <div className=\"min-h-svh bg-sidebar px-gutter py-8 print:bg-white print:p-0\">\n {/* Toolbar: hidden when printing */}\n <div className=\"mx-auto mb-4 flex max-w-narrow flex-wrap items-center gap-2 print:hidden\">\n <Badge variant={invoice.status === \"Paid\" ? \"success\" : invoice.status === \"Overdue\" ? \"destructive\" : \"warning\"}>{invoice.status}</Badge>\n <span className=\"text-sm text-muted-foreground\">Due {invoice.due}</span>\n <div className=\"ml-auto flex gap-2\">\n <Button variant=\"outline\" size=\"icon\" aria-label=\"Print\" onClick={() => window.print()}><PrinterIcon /></Button>\n <Button variant=\"outline\" size=\"icon\" aria-label=\"Download PDF\"><DownloadIcon /></Button>\n <Button><SendIcon /> Send</Button>\n </div>\n </div>\n\n <article /* recanica-ignore: printable invoice document with print styles */ className=\"mx-auto max-w-narrow rounded-2xl border bg-panel p-6 sm:p-10 print:max-w-none print:rounded-none print:border-0 print:text-black\">\n <header className=\"flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-center gap-2\">\n <span className=\"size-7 rounded-lg bg-brand text-brand-foreground print:bg-black\" />\n <span className=\"text-lg\">Acme Studio</span>\n </div>\n <div className=\"sm:text-right\">\n <Heading level={1}>Tax Invoice</Heading>\n <p className=\"font-mono text-sm text-muted-foreground\">{invoice.number}</p>\n </div>\n </header>\n\n <div className=\"mt-10 grid gap-8 text-sm sm:grid-cols-3\">\n <div>\n <p className=\"mb-2 text-xs text-muted-foreground\">From</p>\n <p>{invoice.from.name}</p>\n {invoice.from.lines.map((l) => <p key={l} className=\"text-muted-foreground\">{l}</p>)}\n </div>\n <div>\n <p className=\"mb-2 text-xs text-muted-foreground\">Bill to</p>\n <p>{invoice.to.name}</p>\n {invoice.to.lines.map((l) => <p key={l} className=\"text-muted-foreground\">{l}</p>)}\n </div>\n <dl className=\"grid grid-cols-2 content-start gap-x-4 gap-y-3 self-start sm:grid-cols-1 sm:text-right\">\n <div><dt className=\"text-xs text-muted-foreground\">Issued</dt><dd>{invoice.issued}</dd></div>\n <div><dt className=\"text-xs text-muted-foreground\">Due</dt><dd>{invoice.due}</dd></div>\n </dl>\n </div>\n\n {/* Line items: table on sm+, stacked rows on phones */}\n <div className=\"mt-10\">\n <div className=\"hidden grid-cols-[1fr_4rem_6rem_6rem] gap-4 border-b pb-2 text-xs text-muted-foreground sm:grid\">\n <span>Description</span><span className=\"text-right\">Qty</span><span className=\"text-right\">Unit</span><span className=\"text-right\">Amount</span>\n </div>\n <ul className=\"divide-y\">\n {invoice.items.map((i) => (\n <li key={i.description} className=\"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 py-4 text-sm sm:grid-cols-[1fr_4rem_6rem_6rem] sm:items-baseline\">\n <div>\n <p>{i.description}</p>\n <p className=\"text-xs text-muted-foreground\">{i.detail}</p>\n </div>\n <span className=\"col-start-1 text-xs text-muted-foreground sm:col-start-auto sm:text-right sm:text-sm sm:text-foreground\">\n <span className=\"sm:hidden\">{i.qty} × {money(i.unit)}</span>\n <span className=\"hidden tabular-nums sm:inline\">{i.qty}</span>\n </span>\n <span className=\"hidden text-right tabular-nums sm:block\">{money(i.unit)}</span>\n <span className=\"col-start-2 row-start-1 text-right tabular-nums sm:col-start-auto sm:row-start-auto\">{money(i.qty * i.unit)}</span>\n </li>\n ))}\n </ul>\n </div>\n\n <div className=\"mt-2 flex justify-end\">\n <dl className=\"w-full max-w-xs space-y-2 text-sm\">\n <div className=\"flex justify-between\"><dt className=\"text-muted-foreground\">Subtotal</dt><dd className=\"tabular-nums\">{money(subtotal)}</dd></div>\n <div className=\"flex justify-between\"><dt className=\"text-muted-foreground\">Discount ({invoice.discount * 100}%)</dt><dd className=\"tabular-nums\">−{money(discount)}</dd></div>\n <div className=\"flex justify-between\"><dt className=\"text-muted-foreground\">SST {invoice.taxRate * 100}% (service tax)</dt><dd className=\"tabular-nums\">{money(tax)}</dd></div>\n <Separator />\n <div className=\"flex items-baseline justify-between pt-1\">\n <dt>Total due</dt>\n <dd className=\"text-metric font-light tabular-nums\">{money(total)}</dd>\n </div>\n </dl>\n </div>\n\n <footer className=\"mt-12 grid gap-6 border-t pt-6 text-sm sm:grid-cols-2\">\n <div>\n <p className=\"mb-1 text-xs text-muted-foreground\">Payment</p>\n <p>Pay online by FPX or DuitNow QR at <span className=\"underline underline-offset-4\">pay.acme.example/{invoice.number}</span></p>\n <p className=\"text-muted-foreground\">or bank transfer · Maybank · 5140 1234 5678 · DuitNow ID 202401012345</p>\n </div>\n <div className=\"sm:text-right\">\n <p className=\"mb-1 text-xs text-muted-foreground\">Notes</p>\n <p className=\"text-muted-foreground\">Terima kasih. Payment terms: net 14. This is a computer-generated invoice; no signature is required.</p>\n </div>\n </footer>\n </article>\n </div>\n );\n}\n\nexport default Invoice01;\n"},{"slug":"invoices-01","title":"Invoices","category":"Billing","height":900,"description":"Invoices page: summary stats, status tabs, search, table and detail sheet.","kind":"block","install":"npx shadcn@latest add https://recanica.aturanica.com/r/invoices-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { BellIcon, CopyIcon, DownloadIcon, MoreHorizontalIcon, PlusIcon, SearchIcon, SendIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport {\n DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger,\n} from \"@recanica/ui/components/dropdown-menu\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"@recanica/ui/components/input-group\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from \"@recanica/ui/components/sheet\";\nimport { Stat, StatGroup, StatHeader, StatValue } from \"@recanica/ui/components/stat\";\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@recanica/ui/components/table\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { Heading, PageHeader } from \"@recanica/ui/components/page\";\n\ntype Status = \"Draft\" | \"Open\" | \"Paid\" | \"Overdue\" | \"Void\";\ntype Invoice = { id: string; customer: string; email: string; status: Status; issued: string; due: string; amount: number };\n\nconst invoices: Invoice[] = [\n { id: \"INV-0042\", customer: \"Lumen Labs Sdn. Bhd.\", email: \"finance@lumenlabs.example\", status: \"Open\", issued: \"18 Nov\", due: \"2 Dec\", amount: 1290.6 },\n { id: \"INV-0041\", customer: \"Northwind Trading\", email: \"finance@northwind.example\", status: \"Paid\", issued: \"12 Nov\", due: \"26 Nov\", amount: 480 },\n { id: \"INV-0040\", customer: \"Globex\", email: \"billing@globex.example\", status: \"Overdue\", issued: \"28 Oct\", due: \"11 Nov\", amount: 2400 },\n { id: \"INV-0039\", customer: \"Initech\", email: \"ap@initech.example\", status: \"Paid\", issued: \"20 Oct\", due: \"3 Nov\", amount: 960 },\n { id: \"INV-0038\", customer: \"Umbrella\", email: \"accounts@umbrella.example\", status: \"Draft\", issued: \"—\", due: \"—\", amount: 350 },\n { id: \"INV-0037\", customer: \"Acme Corp\", email: \"pay@acme.example\", status: \"Overdue\", issued: \"15 Oct\", due: \"29 Oct\", amount: 1180 },\n { id: \"INV-0036\", customer: \"Hooli\", email: \"ap@hooli.example\", status: \"Void\", issued: \"10 Oct\", due: \"24 Oct\", amount: 120 },\n];\n\nconst tone: Record<Status, \"muted\" | \"warning\" | \"success\" | \"destructive\" | \"outline\"> = {\n Draft: \"outline\", Open: \"warning\", Paid: \"success\", Overdue: \"destructive\", Void: \"muted\",\n};\nconst tabs = [\"All\", \"Draft\", \"Open\", \"Overdue\", \"Paid\"] as const;\nconst money = (n: number) => new Intl.NumberFormat(\"en-MY\", { style: \"currency\", currency: \"MYR\" }).format(n);\nconst sum = (s: Status) => invoices.filter((i) => i.status === s).reduce((a, i) => a + i.amount, 0);\n\nexport function Invoices01() {\n const [tab, setTab] = React.useState<(typeof tabs)[number]>(\"All\");\n const [query, setQuery] = React.useState(\"\");\n const [open, setOpen] = React.useState<Invoice | null>(null);\n\n const rows = invoices.filter(\n (i) => (tab === \"All\" || i.status === tab) && `${i.id} ${i.customer} ${i.email}`.toLowerCase().includes(query.toLowerCase())\n );\n\n return (\n <div className=\"mx-auto max-w-content space-y-stack px-gutter py-8\">\n <PageHeader\n title=\"Invoices\"\n description=\"Bill customers and track what you're owed.\"\n actions={<>\n <Button variant=\"outline\" className=\"hidden sm:inline-flex\"><DownloadIcon /> Export</Button>\n <Button className=\"flex-1 sm:flex-none\"><PlusIcon /> New invoice</Button>\n </>}\n />\n\n <StatGroup>\n <Stat>\n <StatHeader title=\"Outstanding\" />\n <StatValue value={money(sum(\"Open\") + sum(\"Overdue\"))} caption={`${invoices.filter((i) => i.status === \"Open\" || i.status === \"Overdue\").length} invoices`} />\n </Stat>\n <Stat>\n <StatHeader title=\"Overdue\" />\n <StatValue value={<span className=\"text-destructive\">{money(sum(\"Overdue\"))}</span>} caption=\"needs follow-up\" />\n </Stat>\n <Stat>\n <StatHeader title=\"Paid\" />\n <StatValue value={<span className=\"text-brand\">{money(sum(\"Paid\"))}</span>} caption=\"last 30 days\" />\n </Stat>\n </StatGroup>\n\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-2 md:flex-row md:items-center\">\n <div className=\"-mx-1 overflow-x-auto px-1\">\n <Tabs value={tab} onValueChange={(v) => setTab(v as typeof tab)}>\n <TabsList>\n {tabs.map((t) => (\n <TabsTrigger key={t} value={t}>\n {t}\n {t !== \"All\" && <span className=\"text-xs text-muted-foreground tabular-nums\">{invoices.filter((i) => i.status === t).length}</span>}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n </div>\n <InputGroup className=\"md:ml-auto md:max-w-xs\">\n <InputGroupAddon><SearchIcon /></InputGroupAddon>\n <InputGroupInput placeholder=\"Search invoices\" value={query} onChange={(e) => setQuery(e.target.value)} />\n </InputGroup>\n </div>\n\n <div className=\"overflow-hidden rounded-2xl border bg-card\">\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead className=\"hidden sm:table-cell\">Customer</TableHead>\n <TableHead>Status</TableHead>\n <TableHead className=\"hidden md:table-cell\">Due</TableHead>\n <TableHead className=\"text-right\">Amount</TableHead>\n <TableHead className=\"w-10\" />\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((i) => (\n <TableRow key={i.id} className=\"cursor-pointer\" onClick={() => setOpen(i)}>\n <TableCell>\n <span className=\"font-mono text-xs\">{i.id}</span>\n <span className=\"block text-xs text-muted-foreground sm:hidden\">{i.customer}</span>\n </TableCell>\n <TableCell className=\"hidden sm:table-cell\">\n {i.customer}\n <span className=\"block text-xs text-muted-foreground\">{i.email}</span>\n </TableCell>\n <TableCell><Badge variant={tone[i.status]}>{i.status}</Badge></TableCell>\n <TableCell className=\"hidden text-muted-foreground md:table-cell\">{i.due}</TableCell>\n <TableCell className=\"text-right tabular-nums\">{money(i.amount)}</TableCell>\n <TableCell onClick={(e) => e.stopPropagation()}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label={`Actions for ${i.id}`}><MoreHorizontalIcon /></Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onSelect={() => setOpen(i)}>View</DropdownMenuItem>\n <DropdownMenuItem><CopyIcon /> Copy payment link</DropdownMenuItem>\n {i.status === \"Overdue\" && <DropdownMenuItem><BellIcon /> Send reminder</DropdownMenuItem>}\n <DropdownMenuSeparator />\n <DropdownMenuItem variant=\"destructive\" disabled={i.status === \"Paid\" || i.status === \"Void\"}>Void</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </TableCell>\n </TableRow>\n ))}\n {rows.length === 0 && (\n <TableRow><TableCell colSpan={6} className=\"h-32 text-center text-muted-foreground\">No invoices found.</TableCell></TableRow>\n )}\n </TableBody>\n </Table>\n </div>\n </div>\n\n {/* Detail sheet */}\n <Sheet open={!!open} onOpenChange={(o) => !o && setOpen(null)}>\n <SheetContent className=\"w-full sm:max-w-md\">\n {open && (\n <>\n <SheetHeader>\n <div className=\"flex items-center gap-2\">\n <SheetTitle className=\"font-mono\">{open.id}</SheetTitle>\n <Badge variant={tone[open.status]}>{open.status}</Badge>\n </div>\n <SheetDescription>{open.customer} · {open.email}</SheetDescription>\n </SheetHeader>\n <div className=\"space-y-6 px-4\">\n <p className=\"text-metric font-light tabular-nums\">{money(open.amount)}</p>\n <dl className=\"grid grid-cols-2 gap-4 text-sm\">\n <div><dt className=\"text-muted-foreground\">Issued</dt><dd>{open.issued}</dd></div>\n <div><dt className=\"text-muted-foreground\">Due</dt><dd>{open.due}</dd></div>\n </dl>\n <Separator />\n <ol className=\"space-y-3 text-sm\">\n {[[\"Created\", open.issued], [\"Sent to customer\", open.issued], ...(open.status === \"Paid\" ? [[\"Paid in full\", open.due]] : [])].map(([t, d]) => (\n <li key={t} className=\"flex items-center gap-3\">\n <span className=\"size-2 rounded-full bg-foreground\" /> {t}\n <span className=\"ml-auto text-muted-foreground\">{d}</span>\n </li>\n ))}\n </ol>\n </div>\n <SheetFooter>\n {open.status === \"Overdue\" && <Button><BellIcon /> Send reminder</Button>}\n {open.status === \"Draft\" && <Button><SendIcon /> Send invoice</Button>}\n <Button variant=\"outline\"><DownloadIcon /> Download PDF</Button>\n </SheetFooter>\n </>\n )}\n </SheetContent>\n </Sheet>\n </div>\n );\n}\n\nexport default Invoices01;\n"},{"slug":"dashboard-shell-01","title":"Dashboard Shell","category":"Application","height":900,"description":"Full app shell: sidebar, inset panel, grouped stats.","kind":"block","install":"npx shadcn@latest add https://recanica.aturanica.com/r/dashboard-shell-01.json","source":"import {\n ArrowUpRightIcon, BarChart3Icon, BellIcon, BoxIcon, ChevronDownIcon, DollarSignIcon, LayoutGridIcon,\n LifeBuoyIcon, MenuIcon, SearchIcon, ShoppingBagIcon, SlidersHorizontalIcon, TrendingUpIcon, UsersIcon, WalletIcon,\n} from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Sheet, SheetContent, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { BarRow, Stat, StatGroup, StatHeader, StatList, StatRow, StatValue } from \"@recanica/ui/components/stat\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { Surface } from \"@recanica/ui/components/surface\";\nimport { AppSidebar, AppShell, AppSidebarHeader, AppSidebarSub, AppPanel } from \"@recanica/ui/components/app-shell\";\n\nconst nav = [\n { label: \"Overview\", icon: LayoutGridIcon, active: true },\n { label: \"Products\", icon: BoxIcon, children: [\"Catalogue\", \"Checkout Links\", \"Discounts\", \"Benefits\"] },\n { label: \"Customers\", icon: UsersIcon },\n { label: \"Analytics\", icon: TrendingUpIcon },\n { label: \"Sales\", icon: ShoppingBagIcon },\n { label: \"Finance\", icon: DollarSignIcon },\n { label: \"Settings\", icon: SlidersHorizontalIcon },\n];\n\nfunction NavItem({ label, icon: Icon, active }: { label: string; icon: typeof BoxIcon; active?: boolean }) {\n return (\n <a\n href=\"#\"\n className={cn(\n \"flex items-center gap-3 rounded-lg px-3 py-2 text-sm text-sidebar-foreground transition-colors hover:text-foreground\",\n active && \"bg-sidebar-accent text-foreground\"\n )}\n >\n <Icon className=\"size-4\" /> {label}\n </a>\n );\n}\n\nfunction SidebarContents() {\n return (\n <AppSidebar>\n <AppSidebarHeader>\n <span className=\"size-6 rounded-md bg-brand text-brand-foreground\" aria-label=\"Aturanica\" />\n <div className=\"flex\">\n <Button size=\"icon\" variant=\"ghost\" aria-label=\"Notifications\"><BellIcon /></Button>\n <Button size=\"icon\" variant=\"ghost\" aria-label=\"Search\"><SearchIcon /></Button>\n </div>\n </AppSidebarHeader>\n {nav.map((n) => (\n <div key={n.label}>\n <NavItem label={n.label} icon={n.icon} active={n.active} />\n {n.children && (\n <AppSidebarSub>\n {n.children.map((c) => (\n <a key={c} href=\"#\" className=\"py-1.5 text-sm text-sidebar-foreground transition-colors hover:text-foreground\">{c}</a>\n ))}\n </AppSidebarSub>\n )}\n </div>\n ))}\n\n <div className=\"mt-auto space-y-1\">\n <Surface size=\"sm\" tone=\"panel\" inset=\"sm\" className=\"mb-3 text-sm\">\n <p>Introducing Aturanica Pro</p>\n <p className=\"mt-1 text-muted-foreground\">Advanced reports and a lower 2.5% fee.</p>\n <a href=\"#\" className=\"mt-3 inline-block font-medium text-brand\">Upgrade</a>\n </Surface>\n <NavItem label=\"Support\" icon={LifeBuoyIcon} />\n <NavItem label=\"Documentation\" icon={ArrowUpRightIcon} />\n <div className=\"mt-2 flex items-center gap-3 border-t px-2 pt-3 text-sm\">\n <Avatar className=\"size-7\"><AvatarFallback>AS</AvatarFallback></Avatar>\n <span className=\"truncate\">Acme Studio</span>\n <ChevronDownIcon className=\"ml-auto size-4 text-muted-foreground\" />\n </div>\n </div>\n </AppSidebar>\n );\n}\n\nexport function DashboardShell01() {\n return (\n <AppShell>\n <aside className=\"hidden h-full w-sidebar shrink-0 overflow-y-auto md:block\">\n <SidebarContents />\n </aside>\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col p-2 md:pl-0\">\n {/* Mobile top bar: sidebar moves into a sheet */}\n <div className=\"flex shrink-0 items-center gap-2 px-1 pb-2 md:hidden\">\n <Sheet>\n <SheetTrigger asChild><Button variant=\"ghost\" size=\"icon\" aria-label=\"Open menu\"><MenuIcon /></Button></SheetTrigger>\n <SheetContent side=\"left\" className=\"w-72 bg-sidebar p-0\">\n <SheetTitle className=\"sr-only\">Navigation</SheetTitle>\n <SidebarContents />\n </SheetContent>\n </Sheet>\n <span className=\"size-5 rounded-md bg-brand text-brand-foreground\" />\n <span className=\"text-sm\">Acme Studio</span>\n </div>\n {/* Fixed frame: content scrolls inside so the rounded border stays in place */}\n <AppPanel>\n <div className=\"mx-auto max-w-content space-y-stack px-gutter py-6\">\n <header className=\"hidden items-center gap-3 md:flex\">\n <Avatar><AvatarFallback>AS</AvatarFallback></Avatar>\n <span>Acme Studio</span>\n <div className=\"ml-auto flex gap-1\">\n <Button size=\"icon\" variant=\"ghost\" aria-label=\"Wallet\"><WalletIcon /></Button>\n <Button size=\"icon\" variant=\"ghost\" aria-label=\"Analytics\"><BarChart3Icon /></Button>\n <Button size=\"icon\" variant=\"secondary\" aria-label=\"Search\"><SearchIcon /></Button>\n </div>\n </header>\n\n <Heading level={1}>Overview</Heading>\n\n <StatGroup>\n <Stat>\n <StatHeader title=\"Revenue\" href=\"#\" />\n <StatValue value=\"$4,820\" caption=\"November\" />\n <StatList>\n <BarRow label=\"Nov\" value=\"$4,820\" percent={100} active />\n <BarRow label=\"Oct\" value=\"$3,960\" percent={82} />\n <BarRow label=\"Sep\" value=\"$3,410\" percent={71} />\n <BarRow label=\"Aug\" value=\"$2,150\" percent={45} />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Activity\" href=\"#\" />\n <StatValue value=\"14\" caption=\"events today\" />\n <StatList>\n <StatRow primary=\"Order paid\" secondary=\"Nadia Rahman\" trailing=\"now\" />\n <StatRow primary=\"Subscription created\" secondary=\"Leo Tan\" trailing=\"1h ago\" />\n <StatRow primary=\"Order paid\" secondary=\"Leo Tan\" trailing=\"1h ago\" />\n <StatRow primary=\"Subscription canceled\" secondary=\"Sam Ortiz\" trailing=\"3h ago\" />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Available balance\" href=\"#\" />\n <StatValue value={<span className=\"text-brand\">$1,206</span>} />\n <div className=\"mt-auto text-sm\">\n <p>Next payout on 1 Dec</p>\n <p className=\"text-muted-foreground\">Payouts run monthly above $10.</p>\n </div>\n </Stat>\n </StatGroup>\n\n <StatGroup>\n <Stat>\n <StatHeader title=\"Top customers\" href=\"#\" />\n <StatValue value=\"62%\" caption=\"of revenue\" />\n <StatList>\n <StatRow primary=\"Nadia Rahman\" secondary=\"12 orders\" trailing=\"$1,840\" />\n <StatRow primary=\"Leo Tan\" secondary=\"7 orders\" trailing=\"$1,150\" />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"At risk\" href=\"#\" />\n <StatValue value=\"1\" />\n <StatList>\n <StatRow primary=\"Sam Ortiz\" secondary=\"Pro Yearly\" trailing=\"Cancels 18 Dec\" />\n </StatList>\n </Stat>\n <Stat>\n <StatHeader title=\"Gross margin\" href=\"#\" />\n <StatValue value=\"86%\" caption=\"Last 30 days\" />\n <StatList>\n <BarRow label=\"Oct\" value=\"84%\" percent={84} />\n <BarRow label=\"Sep\" value=\"81%\" percent={81} />\n <BarRow label=\"Aug\" value=\"79%\" percent={79} />\n </StatList>\n </Stat>\n </StatGroup>\n\n <div className=\"flex flex-wrap items-center gap-3\">\n <Heading level={2}>Metrics</Heading>\n <Tabs defaultValue=\"30d\" className=\"order-last w-full overflow-x-auto sm:order-none sm:ml-auto sm:w-auto\">\n <TabsList>\n {[\"All time\", \"12m\", \"3m\", \"30d\", \"Today\"].map((r) => (\n <TabsTrigger key={r} value={r === \"All time\" ? \"all\" : r.toLowerCase()}>{r}</TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n <Button variant=\"outline\" size=\"sm\" className=\"ml-auto sm:ml-0\"><SlidersHorizontalIcon /> Customize</Button>\n </div>\n </div>\n </AppPanel>\n </div>\n </AppShell>\n );\n}\n\nexport default DashboardShell01;\n"},{"slug":"navbar-01","title":"Navbar","category":"Headers","height":360,"description":"Sticky site header with mobile menu.","use":"Top of every marketing page. Keep 4–6 links; one primary action.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/navbar-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { MenuIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\nimport { TopBar } from \"@recanica/ui/components/layout\";\n\nconst links = [[\"Product\", \"/site\"], [\"Shop\", \"/site/shop\"], [\"Customers\", \"/site/work\"], [\"Blog\", \"/site/blog\"], [\"Contact\", \"/site/contact\"]];\n\nexport function Navbar01() {\n const [open, setOpen] = React.useState(false);\n return (\n <TopBar>\n <div className=\"mx-auto flex h-16 max-w-content items-center gap-8 px-gutter\">\n <a href=\"/site\" className=\"flex items-center gap-2\">\n <span className=\"size-6 rounded-md bg-brand text-brand-foreground\" />\n <span className=\"font-medium\">Aturanica</span>\n </a>\n <nav className=\"hidden items-center gap-6 text-sm text-muted-foreground md:flex\">\n {links.map(([l, href]) => <a key={l} href={href} className=\"whitespace-nowrap transition-colors hover:text-foreground\">{l}</a>)}\n </nav>\n <div className=\"ml-auto hidden items-center gap-2 md:flex\">\n <Button variant=\"ghost\">Sign in</Button>\n <Button variant=\"brand\">Get started</Button>\n </div>\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"ml-auto md:hidden\" aria-label=\"Open menu\"><MenuIcon /></Button>\n </SheetTrigger>\n <SheetContent side=\"right\" className=\"w-full max-w-xs\">\n <SheetHeader><SheetTitle>Menu</SheetTitle></SheetHeader>\n <nav className=\"flex flex-col px-4\">\n {links.map(([l, href]) => (\n <a key={l} href={href} onClick={() => setOpen(false)} className=\"border-b py-3 text-lg last:border-b-0\">{l}</a>\n ))}\n </nav>\n <div className=\"mt-auto grid gap-2 p-4\">\n <Button variant=\"outline\">Sign in</Button>\n <Button variant=\"brand\">Get started</Button>\n </div>\n </SheetContent>\n </Sheet>\n </div>\n </TopBar>\n );\n}\n\nexport default Navbar01;\n"},{"slug":"megamenu-01","title":"Mega Menu","category":"Megamenu","description":"Header with mega menu panels for products and resources.","height":520,"use":"Sites with many product pages or resources.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/megamenu-01.json","source":"\"use client\";\n\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nimport { BarChart3Icon, BookOpenIcon, CreditCardIcon, FileTextIcon, LifeBuoyIcon, ReceiptIcon, RepeatIcon, UsersIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport {\n NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle,\n} from \"@recanica/ui/components/navigation-menu\";\n\nconst product = [\n { icon: CreditCardIcon, title: \"Checkout\", body: \"Hosted payment pages and links.\", href: \"/site/shop/checkout\" },\n { icon: RepeatIcon, title: \"Subscriptions\", body: \"Plans, trials and renewals.\", href: \"/site/shop\" },\n { icon: ReceiptIcon, title: \"Invoicing\", body: \"SST invoices and payment plans.\", href: \"/site/blog/e-invoice-2026\" },\n { icon: BarChart3Icon, title: \"Reports\", body: \"Revenue, churn and payouts.\", href: \"/site/work/kopitiam-ordering\" },\n];\nconst resources = [\n { icon: BookOpenIcon, title: \"Guides\", body: \"Step-by-step setup.\", href: \"/site/blog\" },\n { icon: FileTextIcon, title: \"Events\", body: \"Clinics and meetups.\", href: \"/site/events\" },\n { icon: UsersIcon, title: \"Customer stories\", body: \"How teams use Acme.\", href: \"/site/work\" },\n { icon: LifeBuoyIcon, title: \"Help centre\", body: \"Answers and contact.\", href: \"/site/contact\" },\n];\n\nfunction Panel({ items, aside }: { items: typeof product; aside: React.ReactNode }) {\n return (\n <div className=\"grid w-[min(40rem,90vw)] gap-2 p-2 md:grid-cols-[1fr_14rem]\">\n <ul className=\"grid gap-1 sm:grid-cols-2\">\n {items.map((i) => (\n <li key={i.title}>\n <NavigationMenuLink href={i.href} className=\"flex-row items-start gap-3\">\n <i.icon className=\"mt-0.5 size-4 text-muted-foreground\" />\n <span><span className=\"block text-sm\">{i.title}</span><span className=\"block text-xs text-muted-foreground\">{i.body}</span></span>\n </NavigationMenuLink>\n </li>\n ))}\n </ul>\n <Surface size=\"sm\" tone=\"muted\" inset=\"sm\" className=\"hidden text-sm md:block\">{aside}</Surface>\n </div>\n );\n}\n\nexport function Megamenu01() {\n return (\n <header className=\"border-b bg-background px-gutter\">\n <div className=\"mx-auto flex h-16 max-w-content items-center gap-6\">\n <a href=\"/site\" className=\"flex items-center gap-2\"><span className=\"size-6 rounded-md bg-brand text-brand-foreground\" /><span className=\"font-medium\">Acme</span></a>\n <NavigationMenu className=\"hidden md:flex\">\n <NavigationMenuList>\n <NavigationMenuItem>\n <NavigationMenuTrigger>Product</NavigationMenuTrigger>\n <NavigationMenuContent>\n <Panel items={product} aside={<><p>New: payment plans</p><p className=\"mt-1 text-muted-foreground\">Split invoices into a deposit and instalments.</p><a href=\"/site/blog/e-invoice-2026\" className=\"mt-3 inline-block underline underline-offset-4\">Read more</a></>} />\n </NavigationMenuContent>\n </NavigationMenuItem>\n <NavigationMenuItem>\n <NavigationMenuTrigger>Resources</NavigationMenuTrigger>\n <NavigationMenuContent>\n <Panel items={resources} aside={<><p>Office hours</p><p className=\"mt-1 text-muted-foreground\">Live Q&A every Thursday, 3pm MYT.</p></>} />\n </NavigationMenuContent>\n </NavigationMenuItem>\n <NavigationMenuItem><NavigationMenuLink href=\"/site/shop\" className={navigationMenuTriggerStyle()}>Pricing</NavigationMenuLink></NavigationMenuItem>\n </NavigationMenuList>\n </NavigationMenu>\n <div className=\"ml-auto flex gap-2\">\n <Button variant=\"ghost\" className=\"hidden sm:inline-flex\">Sign in</Button>\n <Button>Start free</Button>\n </div>\n </div>\n </header>\n );\n}\n\nexport default Megamenu01;\n"},{"slug":"offcanvas-01","title":"Offcanvas Menu","category":"Offcanvas","description":"Full navigation in a slide-over panel with grouped links and contact.","height":640,"use":"Mobile navigation or a 'more' menu on desktop.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/offcanvas-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { MailIcon, MenuIcon, PhoneIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\n\nconst groups = [\n { title: \"Shop\", links: [[\"All products\", \"/site/shop\"], [\"Kopi Ais Blend\", \"/site/shop/kopi-ais-blend\"], [\"Cart\", \"/site/shop/cart\"]] },\n { title: \"Company\", links: [[\"About\", \"/site/about\"], [\"Careers\", \"/site/careers\"], [\"Work\", \"/site/work\"], [\"Contact\", \"/site/contact\"]] },\n { title: \"Read\", links: [[\"Blog\", \"/site/blog\"], [\"Events\", \"/site/events\"]] },\n];\n\nexport function Offcanvas01() {\n const [open, setOpen] = React.useState(true);\n return (\n <div className=\"min-h-[560px] bg-background\">\n <header className=\"flex h-16 items-center gap-3 border-b px-gutter\">\n <span className=\"size-6 rounded-md bg-brand text-brand-foreground\" />\n <span className=\"font-medium\">Acme</span>\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild><Button variant=\"outline\" size=\"icon\" className=\"ml-auto\" aria-label=\"Open menu\"><MenuIcon /></Button></SheetTrigger>\n <SheetContent side=\"right\" className=\"w-full gap-0 sm:max-w-sm\">\n <SheetHeader className=\"border-b\"><SheetTitle>Menu</SheetTitle></SheetHeader>\n <nav className=\"flex-1 space-y-6 overflow-y-auto p-4\">\n {groups.map((g) => (\n <div key={g.title}>\n <p className=\"mb-2 text-xs text-muted-foreground\">{g.title}</p>\n <ul>{g.links.map(([l, href]) => <li key={href}><a href={href} className=\"block rounded-lg py-2 text-lg hover:text-muted-foreground\">{l}</a></li>)}</ul>\n </div>\n ))}\n <Separator />\n <div className=\"space-y-2 text-sm text-muted-foreground\">\n <p className=\"flex items-center gap-2\"><PhoneIcon className=\"size-4\" /> +60 3-2711 0000</p>\n <p className=\"flex items-center gap-2\"><MailIcon className=\"size-4\" /> hello@acme.example</p>\n </div>\n </nav>\n <div className=\"grid gap-2 border-t p-4\">\n <Button>Start free</Button>\n <Button variant=\"outline\">Sign in</Button>\n </div>\n </SheetContent>\n </Sheet>\n </header>\n </div>\n );\n}\n\nexport default Offcanvas01;\n"},{"slug":"bottom-nav-01","title":"Bottom Navigation Bar","category":"Bottom Navigation Bar","description":"Mobile tab bar with 4–5 destinations and an active state.","height":640,"use":"Mobile web apps and PWAs with 3–5 top-level destinations.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/bottom-nav-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { HomeIcon, ReceiptIcon, SearchIcon, ShoppingBagIcon, UserIcon } from \"lucide-react\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { NavItem } from \"@recanica/ui/components/nav-item\";\n\nconst tabs = [\n { id: \"home\", label: \"Home\", icon: HomeIcon },\n { id: \"search\", label: \"Search\", icon: SearchIcon },\n { id: \"orders\", label: \"Orders\", icon: ReceiptIcon, badge: 2 },\n { id: \"cart\", label: \"Cart\", icon: ShoppingBagIcon },\n { id: \"account\", label: \"Account\", icon: UserIcon },\n];\n\nexport function BottomNav01() {\n const [active, setActive] = React.useState(\"home\");\n return (\n <div className=\"relative mx-auto flex min-h-[600px] max-w-sm flex-col border-x bg-background\">\n <main className=\"flex-1 space-y-3 p-4 pb-24\">\n <Heading level={1} className=\"capitalize\">{active}</Heading>\n {Array.from({ length: 4 }).map((_, i) => <div key={i} className=\"h-20 rounded-2xl border bg-muted/50\" />)}\n </main>\n {/* Fixed to the viewport in real apps: use `fixed inset-x-0 bottom-0` and pad for the safe area */}\n <nav aria-label=\"Primary\" className=\"absolute inset-x-0 bottom-0 border-t bg-background/90 pb-[env(safe-area-inset-bottom)] backdrop-blur\">\n <ul className=\"grid grid-cols-5\">\n {tabs.map((t) => (\n <li key={t.id}>\n <NavItem variant=\"tab\" active={active === t.id} onClick={() => setActive(t.id)} className=\"relative\">\n <t.icon className=\"size-5\" strokeWidth={active === t.id ? 2.25 : 1.75} />\n {t.label}\n {t.badge && <span className=\"absolute top-1.5 left-1/2 ml-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-foreground px-1 text-xs text-background\">{t.badge}</span>}\n </NavItem>\n </li>\n ))}\n </ul>\n </nav>\n </div>\n );\n}\n\nexport default BottomNav01;\n"},{"slug":"banner-01","title":"Announcement & Promo Banner","category":"Banner","description":"Site-wide announcement bar plus an inline promo banner with countdown.","height":420,"use":"Time-bound offers, launches or notices. Dismissible; never more than one at a time.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/banner-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { ArrowRightIcon, XIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nfunction useCountdown(target: number) {\n const [now, setNow] = React.useState<number | null>(null);\n React.useEffect(() => {\n setNow(Date.now());\n const t = setInterval(() => setNow(Date.now()), 1000);\n return () => clearInterval(t);\n }, []);\n const left = Math.max(0, target - (now ?? target));\n return { d: Math.floor(left / 864e5), h: Math.floor(left / 36e5) % 24, m: Math.floor(left / 6e4) % 60, s: Math.floor(left / 1e3) % 60, ready: now !== null };\n}\n\nexport function Banner01() {\n const [open, setOpen] = React.useState(true);\n const [target] = React.useState(() => Date.now() + 2 * 864e5 + 5 * 36e5);\n const t = useCountdown(target);\n return (\n <div className=\"space-y-10\">\n {open && (\n <div className=\"flex items-center gap-3 border-b bg-foreground px-gutter py-2 text-sm text-background\">\n <p className=\"flex-1 text-center\">\n Year-end sale: 20% off all annual plans until 31 December. <a href=\"/site/shop\" className=\"underline underline-offset-4\">See plans</a>\n </p>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Dismiss announcement\" onClick={() => setOpen(false)} className=\"text-current hover:bg-white/10\"><XIcon /></Button>\n </div>\n )}\n <section className=\"px-gutter\">\n <div className=\"mx-auto flex max-w-content flex-col gap-6 rounded-3xl border bg-card p-6 sm:p-10 md:flex-row md:items-center\">\n <div className=\"flex-1 space-y-2\">\n <p className=\"text-sm text-muted-foreground\">Ends in</p>\n <div className=\"flex gap-3 tabular-nums\" aria-live=\"polite\">\n {[[\"d\", t.d], [\"h\", t.h], [\"m\", t.m], [\"s\", t.s]].map(([k, v]) => (\n <div key={k as string} className=\"min-w-14 rounded-xl border bg-panel px-3 py-2 text-center\">\n <span className=\"block text-2xl font-light\">{t.ready ? String(v).padStart(2, \"0\") : \"--\"}</span>\n <span className=\"text-xs text-muted-foreground\">{k}</span>\n </div>\n ))}\n </div>\n </div>\n <div className=\"flex-1 space-y-3\">\n <Heading level={2}>Annual plans, 20% off</Heading>\n <p className=\"text-muted-foreground\">Lock in this year's price for the next 12 months. Applies to new and upgrading customers.</p>\n <Button variant=\"brand\">Claim the discount <ArrowRightIcon /></Button>\n </div>\n </div>\n </section>\n </div>\n );\n}\n\nexport default Banner01;\n"},{"slug":"hero-01","title":"Hero · Centered","category":"Hero","height":640,"description":"Centered headline, badge and two CTAs.","use":"Landing page opener when the message matters more than visuals.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/hero-01.json","source":"import type * as React from \"react\";\nimport { ArrowRightIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebHeroTitle } from \"@recanica/ui/components/web-section\";\n\n/** Centred hero. Content is props; defaults are the sample billing product. */\nexport function Hero01({\n badge = \"New · Payment plans are live\",\n title = \"Invoices and payments for small businesses\",\n description = \"Send an invoice, get paid by FPX or DuitNow, and have SST and e-Invoice done for you.\",\n actions = (\n <>\n <Button size=\"lg\" variant=\"brand\">Get started <ArrowRightIcon /></Button>\n <Button size=\"lg\" variant=\"outline\">Book a demo</Button>\n </>\n ),\n}: { badge?: React.ReactNode; title?: React.ReactNode; description?: React.ReactNode; actions?: React.ReactNode }) {\n return (\n <section className=\"relative overflow-hidden px-gutter py-section\">\n <div aria-hidden className=\"pointer-events-none absolute inset-x-0 -top-40 mx-auto h-96 max-w-3xl rounded-full bg-foreground/10 blur-3xl\" />\n <div className=\"relative mx-auto flex max-w-3xl flex-col items-center gap-6 text-center\">\n {badge && <Badge variant=\"outline\" className=\"bg-background/60 backdrop-blur\">{badge}</Badge>}\n <WebHeroTitle size=\"lg\" className=\"text-brand\">{title}</WebHeroTitle>\n <p className=\"max-w-xl text-base text-balance text-muted-foreground sm:text-lg\">{description}</p>\n <div className=\"flex w-full flex-col justify-center gap-3 sm:w-auto sm:flex-row\">{actions}</div>\n </div>\n </section>\n );\n}\n\nexport default Hero01;\n"},{"slug":"hero-02","title":"Hero · Product","category":"Hero","height":760,"description":"Headline with an app screenshot frame.","use":"Product launch or SaaS home where a product screenshot proves the claim.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/hero-02.json","source":"import { ArrowRightIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { BarRow, Stat, StatGroup, StatHeader, StatList, StatValue } from \"@recanica/ui/components/stat\";\nimport { WebHeroTitle } from \"@recanica/ui/components/web-section\";\n\nexport function Hero02() {\n return (\n <section className=\"overflow-hidden px-gutter pt-section\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"max-w-2xl space-y-6\">\n <WebHeroTitle>\n Sell software <span className=\"text-brand\">without building billing</span>\n </WebHeroTitle>\n <p className=\"max-w-xl text-base text-muted-foreground sm:text-lg\">\n Checkout, subscriptions, tax and payouts, handled. You ship the product, we run the money.\n </p>\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <Button size=\"lg\" variant=\"brand\">Start for free <ArrowRightIcon /></Button>\n <Button size=\"lg\" variant=\"ghost\">Read the docs</Button>\n </div>\n </div>\n\n {/* Product frame: bleeds off the bottom on purpose */}\n <div className=\"mt-14 rounded-t-2xl border border-b-0 bg-sidebar p-2 pb-0 sm:mt-20\">\n <div className=\"rounded-t-xl border border-b-0 bg-panel p-4 sm:p-8\">\n <div className=\"mb-6 flex items-center gap-2\">\n <span className=\"size-2.5 rounded-full bg-border\" /><span className=\"size-2.5 rounded-full bg-border\" /><span className=\"size-2.5 rounded-full bg-border\" />\n <span className=\"ml-3 text-title\">Overview</span>\n </div>\n <StatGroup>\n <Stat>\n <StatHeader title=\"Revenue\" />\n <StatValue value=\"$48,210\" caption=\"November\" />\n <StatList>\n <BarRow label=\"Nov\" value=\"$48k\" percent={100} active />\n <BarRow label=\"Oct\" value=\"$39k\" percent={81} />\n </StatList>\n </Stat>\n <Stat className=\"hidden md:flex\">\n <StatHeader title=\"Customers\" />\n <StatValue value=\"1,284\" caption=\"+3.1%\" />\n <StatList>\n <BarRow label=\"Nov\" value=\"1,284\" percent={100} active />\n <BarRow label=\"Oct\" value=\"1,245\" percent={96} />\n </StatList>\n </Stat>\n <Stat className=\"hidden lg:flex\">\n <StatHeader title=\"MRR\" />\n <StatValue value={<span className=\"text-brand\">$12.4k</span>} caption=\"+8%\" />\n </Stat>\n </StatGroup>\n </div>\n </div>\n </div>\n </section>\n );\n}\n\nexport default Hero02;\n"},{"slug":"hero-03","title":"Hero · Split","category":"Hero","description":"Split hero with headline, email capture and image.","height":680,"use":"Lead-generation landing pages where the first action is signing up.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/hero-03.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { WebHeroTitle } from \"@recanica/ui/components/web-section\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nexport function Hero03() {\n const [sent, setSent] = React.useState(false);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto grid max-w-content items-center gap-10 lg:grid-cols-2\">\n <div className=\"space-y-6\">\n <WebHeroTitle>Send invoices your customers can pay in one tap</WebHeroTitle>\n <p className=\"max-w-lg text-muted-foreground sm:text-lg\">FPX, DuitNow and cards on every invoice. SST and e-Invoice handled. Most invoices are paid within 3 days.</p>\n {sent ? (\n <Surface as=\"p\" size=\"sm\" tone=\"plain\" inset=\"sm\" className=\"flex items-center gap-2 text-sm\"><CheckIcon className=\"size-4\" /> Thanks. We'll email your login link in a minute.</Surface>\n ) : (\n <form className=\"flex max-w-md flex-col gap-2 sm:flex-row\" onSubmit={(e) => { e.preventDefault(); setSent(true); }}>\n <Input type=\"email\" required placeholder=\"Work email\" aria-label=\"Work email\" className=\"h-11\" />\n <Button type=\"submit\" size=\"lg\" variant=\"brand\" className=\"shrink-0\">Start free</Button>\n </form>\n )}\n <ul className=\"flex flex-wrap gap-x-5 gap-y-2 text-sm text-muted-foreground\">\n {[\"Free for 14 days\", \"No card needed\", \"Cancel anytime\"].map((t) => <li key={t} className=\"flex items-center gap-1.5\"><CheckIcon className=\"size-3.5\" /> {t}</li>)}\n </ul>\n </div>\n <div className=\"relative aspect-[4/3] overflow-hidden rounded-3xl border bg-muted\" role=\"img\" aria-label=\"Product screenshot placeholder\">\n <Surface tone=\"panel\" className=\"absolute inset-6\">\n <div className=\"h-3 w-24 rounded-full bg-muted\" />\n <div className=\"mt-6 text-metric font-light\">RM 14,904</div>\n <div className=\"mt-2 h-2 w-2/3 rounded-full bg-muted\" />\n <div className=\"mt-8 space-y-3\">{[0, 1, 2].map((i) => <div key={i} className=\"h-8 rounded-lg border\" />)}</div>\n </Surface>\n </div>\n </div>\n </section>\n );\n}\n\nexport default Hero03;\n"},{"slug":"intro-01","title":"Intro","category":"Intro","description":"Short positioning statement with three supporting points.","height":520,"use":"Right after the hero to say who it's for and why.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/intro-01.json","source":"const points = [\n { title: \"For small teams\", body: \"Built for studios and shops of 1–50 people. No finance team required.\" },\n { title: \"Malaysia first\", body: \"SST, MyInvois e-Invoice, FPX and DuitNow out of the box.\" },\n { title: \"Fair pricing\", body: \"3% per transaction. No setup fee, no monthly minimum.\" },\n];\n\nexport function Intro01() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content\">\n <p className=\"max-w-3xl text-heading text-balance sm:text-title\">\n Acme is billing software for small businesses that sell online.{\" \"}\n <span className=\"text-muted-foreground\">It takes care of invoices, payments and tax, so you can spend the afternoon on the work that pays.</span>\n </p>\n <div className=\"mt-12 grid gap-8 border-t pt-8 sm:grid-cols-3\">\n {points.map((p) => (\n <div key={p.title}>\n <h3>{p.title}</h3>\n <p className=\"mt-1 text-sm text-muted-foreground\">{p.body}</p>\n </div>\n ))}\n </div>\n </div>\n </section>\n );\n}\n\nexport default Intro01;\n"},{"slug":"logo-cloud-01","title":"Logo Cloud","category":"Logo","height":280,"description":"Trusted-by wordmark row.","use":"Directly under the hero to show who already uses the product.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/logo-cloud-01.json","source":"import { SurfaceGrid } from \"@recanica/ui/components/surface\";\nconst logos = [\"Northwind\", \"Lumen\", \"Acme\", \"Globex\", \"Initech\", \"Umbrella\"];\n\nexport function LogoCloud01() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content text-center\">\n <p className=\"text-sm text-muted-foreground\">Used by 1,200 businesses across Malaysia</p>\n <SurfaceGrid className=\"mt-8 grid -cols-2 sm:grid-cols-3 lg:grid-cols-6\">\n {logos.map((l) => (\n <div key={l} className=\"flex h-20 items-center justify-center bg-background text-lg tracking-tight text-muted-foreground transition-colors hover:text-foreground\">\n {l}\n </div>\n ))}\n </SurfaceGrid>\n </div>\n </section>\n );\n}\n\nexport default LogoCloud01;\n"},{"slug":"bento-01","title":"Features · Bento","category":"Feature","height":820,"description":"Asymmetric bento grid with visuals.","use":"Show 4 capabilities where one deserves more space.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/bento-01.json","source":"import { CheckIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { BarRow } from \"@recanica/ui/components/stat\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nfunction Tile({ className = \"\", title, body, children }: { className?: string; title: string; body: string; children?: React.ReactNode }) {\n return (\n <div className={`flex flex-col overflow-hidden rounded-2xl border bg-card ${className}`}>\n <div className=\"p-panel pb-0\">\n <h3>{title}</h3>\n <p className=\"mt-1 text-sm text-muted-foreground\">{body}</p>\n </div>\n <div className=\"mt-6 flex-1 p-panel pt-0\">{children}</div>\n </div>\n );\n}\n\nexport function Bento01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content\">\n <WebSectionTitle className=\"max-w-2xl\">Four things you'll use every day</WebSectionTitle>\n <div className=\"mt-12 grid gap-4 md:grid-cols-6\">\n <Tile className=\"md:col-span-4\" title=\"Revenue at a glance\" body=\"Revenue, refunds and payouts on one page.\">\n <Surface size=\"sm\" tone=\"panel\" inset=\"sm\">\n <p className=\"text-metric font-light text-brand\">$48,210</p>\n <div className=\"mt-2\">\n <BarRow label=\"Nov\" value=\"$48k\" percent={100} active />\n <BarRow label=\"Oct\" value=\"$39k\" percent={81} />\n <BarRow label=\"Sep\" value=\"$34k\" percent={71} />\n </div>\n </Surface>\n </Tile>\n <Tile className=\"md:col-span-2\" title=\"Merchant of record\" body=\"Tax handled in 100+ jurisdictions.\">\n <div className=\"flex flex-wrap gap-2\">\n {[\"VAT\", \"GST\", \"Sales tax\", \"JCT\", \"SST\"].map((t) => <Badge key={t} variant=\"outline\">{t}</Badge>)}\n </div>\n </Tile>\n <Tile className=\"md:col-span-2\" title=\"Benefits delivered automatically\" body=\"Sent as soon as the payment clears.\">\n <ul className=\"space-y-2 text-sm\">\n {[\"License key issued\", \"Discord role granted\", \"Repo invite sent\"].map((b) => (\n <li key={b} className=\"flex items-center gap-2\"><CheckIcon className=\"size-4\" /> {b}</li>\n ))}\n </ul>\n </Tile>\n <Tile className=\"md:col-span-4\" title=\"A short, fast checkout\" body=\"Three fields, works on phones, matches your brand.\">\n <Surface size=\"sm\" tone=\"panel\" inset=\"sm\" className=\"mx-auto max-w-xs space-y-3\" data-preview aria-hidden>\n <div className=\"flex justify-between text-sm\"><span>Pro Yearly</span><span className=\"tabular-nums\">$480</span></div>\n <div className=\"h-9 rounded-lg border\" />\n <div className=\"flex h-9 items-center justify-center rounded-full bg-brand text-brand-foreground text-sm\">Pay $480</div>\n </Surface>\n </Tile>\n </div>\n </div>\n </section>\n );\n}\n\nexport default Bento01;\n"},{"slug":"bento-02","title":"Features · Bento 2","category":"Feature","height":980,"description":"Four-column bento with metrics, security, currencies, team and automation tiles.","use":"Feature overview for a product with many small proofs (security, currencies, team).","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/bento-02.json","source":"import { ArrowUpRightIcon, BellIcon, CheckIcon, GlobeIcon, LockIcon, ZapIcon } from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { WebSectionTitle, WebSectionHeader } from \"@recanica/ui/components/web-section\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nfunction Cell({ className, title, children }: { className?: string; title: string; children: React.ReactNode }) {\n return (\n <div className={cn(\"group relative flex flex-col overflow-hidden rounded-2xl border bg-card p-panel transition-colors hover:bg-accent/40\", className)}>\n <h3 className=\"mt-1 text-lg\">{title}</h3>\n <div className=\"mt-6 flex flex-1 flex-col justify-end\">{children}</div>\n </div>\n );\n}\n\nconst bars = [32, 44, 38, 52, 48, 61, 58, 72, 66, 80, 76, 92];\n\nexport function Bento02() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content\">\n <WebSectionHeader title=\"One dashboard for the whole business\" actions={<a href=\"/site/about\" className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground\">\n See all features <ArrowUpRightIcon className=\"size-3.5\" />\n </a>} />\n\n {/* 1 col → 2 cols (sm) → 4-col asymmetric grid (lg) */}\n <div className=\"mt-12 grid auto-rows-[minmax(14rem,auto)] gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <Cell className=\"sm:col-span-2 lg:row-span-2\" title=\"Revenue by month and product\">\n <p className=\"text-metric font-light text-brand\">$48,210</p>\n <p className=\"text-sm text-muted-foreground\">+12.4% vs last month</p>\n <div className=\"mt-6 flex h-40 items-end gap-1.5\">\n {bars.map((h, i) => (\n <div\n key={i}\n className={cn(\"flex-1 rounded-t-md\", i === bars.length - 1 ? \"bg-brand text-brand-foreground\" : \"bg-muted-foreground/25\")}\n style={{ height: `${h}%` }}\n />\n ))}\n </div>\n </Cell>\n\n <Cell title=\"Checkout in 2.1s\">\n <div className=\"flex items-center gap-3\">\n <span className=\"flex size-10 items-center justify-center rounded-full border\"><ZapIcon className=\"size-4\" /></span>\n <div className=\"h-1.5 flex-1 rounded-full bg-muted\"><div className=\"h-full w-[88%] rounded-full bg-foreground\" /></div>\n </div>\n </Cell>\n\n <Cell title=\"PCI DSS Level 1\">\n <div className=\"flex flex-wrap gap-2\">\n {[\"SOC 2\", \"GDPR\", \"3DS2\"].map((t) => <Badge key={t} variant=\"outline\"><LockIcon /> {t}</Badge>)}\n </div>\n </Cell>\n\n <Cell className=\"sm:col-span-2\" title=\"Sell in 135 currencies\">\n <div className=\"flex items-center gap-4\">\n <GlobeIcon className=\"size-10 shrink-0 text-muted-foreground\" strokeWidth={1.25} />\n <div className=\"flex flex-wrap gap-1.5\">\n {[\"USD\", \"EUR\", \"GBP\", \"MYR\", \"SGD\", \"JPY\", \"AUD\", \"IDR\"].map((c) => (\n <span key={c} className=\"rounded-full border px-2.5 py-0.5 font-mono text-xs text-muted-foreground\">{c}</span>\n ))}\n </div>\n </div>\n </Cell>\n\n <Cell title=\"Roles for your team\">\n <div className=\"flex -space-x-2\">\n {[\"NR\", \"LT\", \"MK\", \"AM\"].map((i) => (\n <Avatar key={i} className=\"ring-2 ring-card\"><AvatarFallback>{i}</AvatarFallback></Avatar>\n ))}\n <span className=\"flex size-8 items-center justify-center rounded-full border bg-muted text-xs text-muted-foreground ring-2 ring-card\">+8</span>\n </div>\n </Cell>\n\n <Cell className=\"sm:col-span-2 lg:col-span-1\" title=\"Alerts for payments and payouts\">\n <ul className=\"space-y-2 text-sm\">\n {[[\"Order paid\", \"now\"], [\"Payout sent\", \"2h\"]].map(([t, w]) => (\n <Surface size=\"sm\" tone=\"panel\" inset=\"tight\" as=\"li\" key={t}>\n <BellIcon className=\"size-3.5 text-muted-foreground\" /> {t}\n <span className=\"ml-auto text-xs text-muted-foreground\">{w}</span>\n </Surface>\n ))}\n </ul>\n </Cell>\n\n <Cell className=\"sm:col-span-2 lg:col-span-2\" title=\"Benefits delivered on payment\">\n <ol className=\"grid gap-2 text-sm sm:grid-cols-3\">\n {[\"Payment clears\", \"License key issued\", \"Access granted\"].map((s, i) => (\n <Surface size=\"sm\" tone=\"panel\" inset=\"tight\" as=\"li\" key={s}>\n <span className={cn(\"flex size-5 items-center justify-center rounded-full text-xs\", i < 2 ? \"bg-brand text-brand-foreground\" : \"border\")}>\n {i < 2 ? <CheckIcon className=\"size-3\" /> : i + 1}\n </span>\n {s}\n </Surface>\n ))}\n </ol>\n </Cell>\n </div>\n </div>\n </section>\n );\n}\n\nexport default Bento02;\n"},{"slug":"features-01","title":"Features · Grid","category":"Feature","height":720,"description":"Icon feature grid, 1 → 2 → 3 columns.","use":"Explain 3–6 capabilities at equal weight.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/features-01.json","source":"import { BarChart3Icon, GlobeIcon, KeyRoundIcon, LayersIcon, ReceiptIcon, ZapIcon } from \"lucide-react\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\n\nconst features = [\n { icon: ZapIcon, title: \"Checkout in one line\", body: \"Drop-in hosted checkout or embed it. Live in minutes.\" },\n { icon: LayersIcon, title: \"Subscriptions\", body: \"Trials, upgrades, proration and dunning, built in.\" },\n { icon: ReceiptIcon, title: \"Global tax\", body: \"We calculate, collect and remit as merchant of record.\" },\n { icon: KeyRoundIcon, title: \"Benefits\", body: \"License keys, file downloads and repo access on purchase.\" },\n { icon: BarChart3Icon, title: \"Analytics\", body: \"MRR, churn and cohorts without a spreadsheet.\" },\n { icon: GlobeIcon, title: \"Payouts\", body: \"Get paid in 40+ countries on your schedule.\" },\n];\n\nexport function Features01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"max-w-2xl\">\n <WebSectionTitle>Everything to sell software</WebSectionTitle>\n <p className=\"mt-4 text-muted-foreground sm:text-lg\">One platform, from first checkout to thousandth renewal.</p>\n </div>\n <SurfaceGrid className=\"mt-12 sm:grid-cols-2 lg:grid-cols-3\">\n {features.map((f) => (\n <div key={f.title} className=\"space-y-3 bg-background p-panel\">\n <span className=\"flex size-10 items-center justify-center rounded-xl border bg-muted\"><f.icon className=\"size-5\" /></span>\n <h3>{f.title}</h3>\n <p className=\"text-sm text-muted-foreground\">{f.body}</p>\n </div>\n ))}\n </SurfaceGrid>\n </div>\n </section>\n );\n}\n\nexport default Features01;\n"},{"slug":"content-01","title":"Image & Text","category":"Content","description":"Alternating image and text rows with a short list.","height":900,"use":"Explain a product or story in 2–3 steps with visuals.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/content-01.json","source":"import { CheckIcon } from \"lucide-react\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst rows = [\n { title: \"Create an invoice in under a minute\", body: \"Pick a customer, add line items and choose SST. The invoice is numbered, validated with LHDN and sent.\", points: [\"Payment plans with deposits\", \"Reminders before and after the due date\"] },\n { title: \"Let customers pay the way they already do\", body: \"Every invoice links to a payment page with FPX, DuitNow QR and cards. Partial payments are tracked for you.\", points: [\"Settlement in 2 business days\", \"Refunds from the same screen\"] },\n { title: \"Know where the money is\", body: \"See what's paid, what's overdue and what's coming in next month, without opening a spreadsheet.\", points: [\"Export to CSV for your accountant\", \"SST summary per period\"] },\n];\n\nfunction Img({ label }: { label: string }) {\n return <div className=\"flex aspect-[4/3] items-center justify-center rounded-3xl border bg-muted text-xs text-muted-foreground\" role=\"img\" aria-label={label}>{label}</div>;\n}\n\nexport function Content01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content space-y-section-sm\">\n {rows.map((r, i) => (\n <div key={r.title} className=\"grid items-center gap-8 lg:grid-cols-2 lg:gap-16\">\n <div className={cn(\"space-y-4\", i % 2 === 1 && \"lg:order-2\")}>\n <Heading level={2} className=\"sm:text-title\">{r.title}</Heading>\n <p className=\"text-muted-foreground\">{r.body}</p>\n <ul className=\"space-y-2 text-sm\">{r.points.map((p) => <li key={p} className=\"flex items-center gap-2\"><CheckIcon className=\"size-4\" /> {p}</li>)}</ul>\n </div>\n <Img label={`${r.title} screenshot`} />\n </div>\n ))}\n </div>\n </section>\n );\n}\n\nexport default Content01;\n"},{"slug":"stats-01","title":"Stats","category":"Content","height":360,"description":"Big-number proof points.","use":"Proof points as numbers. Only use real, sourced figures.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/stats-01.json","source":"import { SurfaceGrid } from \"@recanica/ui/components/surface\";\nconst stats = [\n { value: \"$120M+\", label: \"processed for creators\" },\n { value: \"14k\", label: \"software businesses\" },\n { value: \"99.99%\", label: \"checkout uptime\" },\n { value: \"40+\", label: \"payout countries\" },\n];\n\nexport function Stats01() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <SurfaceGrid as=\"dl\" className=\"mx-auto max-w-content grid-cols-2 lg:grid-cols-4\">\n {stats.map((s) => (\n <div key={s.label} className=\"bg-background p-panel\">\n <dd className=\"text-[2rem] leading-none font-light tracking-tight sm:text-display-sm\">{s.value}</dd>\n <dt className=\"mt-2 text-sm text-muted-foreground\">{s.label}</dt>\n </div>\n ))}\n </SurfaceGrid>\n </section>\n );\n}\n\nexport default Stats01;\n"},{"slug":"process-01","title":"Process Steps","category":"Process","description":"Numbered steps explaining how it works.","height":520,"use":"Explain onboarding, ordering or a service in 3–5 steps.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/process-01.json","source":"import { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\nconst steps = [\n { title: \"Create your account\", body: \"Sign up with your work email. Takes two minutes.\" },\n { title: \"Add your business details\", body: \"SSM number, TIN and bank account for payouts.\" },\n { title: \"Send your first invoice\", body: \"Or share a payment link on WhatsApp.\" },\n { title: \"Get paid\", body: \"Money lands in your bank in 2 business days.\" },\n];\n\nexport function Process01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content\">\n <WebSectionTitle className=\"max-w-xl\">How it works</WebSectionTitle>\n <SurfaceGrid as=\"ol\" className=\"mt-12 sm:grid-cols-2 lg:grid-cols-4\">\n {steps.map((s, i) => (\n <li key={s.title} className=\"space-y-3 bg-background p-panel\">\n <span className=\"flex size-8 items-center justify-center rounded-full border font-mono text-xs\">{i + 1}</span>\n <h3>{s.title}</h3>\n <p className=\"text-sm text-muted-foreground\">{s.body}</p>\n </li>\n ))}\n </SurfaceGrid>\n </div>\n </section>\n );\n}\n\nexport default Process01;\n"},{"slug":"timeline-01","title":"Timeline","category":"Timeline","description":"Company history or roadmap as a vertical timeline.","height":820,"use":"About page history, roadmaps, changelogs.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/timeline-01.json","source":"import { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nconst events = [\n { date: \"2022\", title: \"Started in a shared office in Bangsar\", body: \"Two founders, one invoice template and a lot of spreadsheets.\" },\n { date: \"2023\", title: \"First 100 customers\", body: \"Mostly design studios and online shops in the Klang Valley.\" },\n { date: \"2024\", title: \"FPX and DuitNow payments\", body: \"Customers could pay invoices directly instead of transferring manually.\" },\n { date: \"2025\", title: \"MyInvois e-Invoice\", body: \"Every invoice validated with LHDN automatically.\" },\n { date: \"2026\", title: \"Payment plans\", body: \"Deposits and instalments for larger projects.\" },\n];\n\n/** `titleAs=\"h1\"` when this section is the top of its page. */\nexport function Timeline01({ titleAs: Title = \"h2\" }: { titleAs?: \"h1\" | \"h2\" }) {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-narrow\">\n <WebSectionTitle as={Title}>Our story so far</WebSectionTitle>\n <ol className=\"relative mt-12 space-y-10 border-l pl-8\">\n {events.map((e) => (\n <li key={e.date} className=\"relative\">\n <span className=\"absolute top-1.5 -left-[37px] size-2.5 rounded-full border-2 border-background bg-foreground\" aria-hidden />\n <time className=\"font-mono text-xs text-muted-foreground\">{e.date}</time>\n <h3 className=\"mt-1\">{e.title}</h3>\n <p className=\"mt-1 text-sm text-muted-foreground\">{e.body}</p>\n </li>\n ))}\n </ol>\n </div>\n </section>\n );\n}\n\nexport default Timeline01;\n"},{"slug":"testimonial-02","title":"Featured Quote","category":"Testimonial","description":"One large customer quote with result metric.","height":420,"use":"A single strong proof point near the CTA.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/testimonial-02.json","source":"import { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\n\nexport function Testimonial02() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <figure className=\"mx-auto max-w-narrow text-center\">\n <p className=\"text-metric font-light text-brand\">11 days → 3 days</p>\n <p className=\"mt-1 text-sm text-muted-foreground\">average time to get paid</p>\n <blockquote className=\"mt-8 text-heading text-balance sm:text-title\">\n “We used to chase every invoice on WhatsApp. Now customers pay from the link and I only look at the overdue list on Fridays.”\n </blockquote>\n <figcaption className=\"mt-8 flex items-center justify-center gap-3 text-sm\">\n <Avatar><AvatarFallback>NA</AvatarFallback></Avatar>\n <span className=\"text-left\">Nurul Aina<span className=\"block text-muted-foreground\">Owner, Studio Aina, Kota Bharu</span></span>\n </figcaption>\n </figure>\n </section>\n );\n}\n\nexport default Testimonial02;\n"},{"slug":"testimonials-01","title":"Testimonials","category":"Testimonial","height":640,"description":"Quote cards with avatars.","use":"Several short customer quotes after features or pricing.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/testimonials-01.json","source":"import { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nconst quotes = [\n { body: \"We moved our entire billing over in an afternoon. Taxes stopped being a weekly fire drill.\", name: \"Nadia Rahman\", role: \"Founder, Lumen\", initials: \"NR\" },\n { body: \"The dashboard is the first one my co-founder actually opens. It's calm and it's correct.\", name: \"Leo Tan\", role: \"CTO, Northwind\", initials: \"LT\" },\n { body: \"Benefits are the killer feature. License keys and repo access just happen.\", name: \"Mei Kato\", role: \"Indie developer\", initials: \"MK\" },\n { body: \"Support replied in 20 minutes with the exact API call I needed.\", name: \"Arjun Mehta\", role: \"Engineer, Globex\", initials: \"AM\" },\n { body: \"Checkout conversion went up 18% the week we switched.\", name: \"Chloe Martin\", role: \"Growth, Initech\", initials: \"CM\" },\n { body: \"Refunds, invoices and payouts are on the same screen. I stopped using three other tools.\", name: \"Hana Lee\", role: \"Designer, Acme\", initials: \"HL\" },\n];\n\nexport function Testimonials01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content\">\n <WebSectionTitle className=\"max-w-xl\">Loved by builders</WebSectionTitle>\n <div className=\"mt-12 columns-1 gap-4 sm:columns-2 lg:columns-3\">\n {quotes.map((q) => (\n <Surface as=\"figure\" inset=\"lg\" className=\"mb-4 break-inside-avoid\" key={q.name}>\n <blockquote className=\"text-pretty\">“{q.body}”</blockquote>\n <figcaption className=\"mt-6 flex items-center gap-3 text-sm\">\n <Avatar><AvatarFallback>{q.initials}</AvatarFallback></Avatar>\n <span>{q.name}<span className=\"block text-muted-foreground\">{q.role}</span></span>\n </figcaption>\n </Surface>\n ))}\n </div>\n </div>\n </section>\n );\n}\n\nexport default Testimonials01;\n"},{"slug":"pricing-01","title":"Pricing","category":"Pricing","height":820,"description":"Three-tier pricing with featured plan.","use":"Public pricing with 2–3 plans and one highlighted plan.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/pricing-01.json","source":"import { CheckIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"@recanica/ui/components/card\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nconst tiers = [\n { name: \"Starter\", price: \"$0\", blurb: \"For individuals trying things out.\", features: [\"1 workspace\", \"Community support\", \"Basic analytics\"] },\n { name: \"Pro\", price: \"$29\", blurb: \"For growing teams.\", features: [\"Unlimited workspaces\", \"Priority support\", \"Advanced analytics\", \"SSO\"], featured: true },\n { name: \"Enterprise\", price: \"Custom\", blurb: \"For large organizations.\", features: [\"Dedicated success manager\", \"SLA\", \"Audit logs\"] },\n];\n\nexport function Pricing01() {\n return (\n <section className=\"mx-auto max-w-content px-gutter py-section\">\n <div className=\"mb-12 text-center\">\n <WebSectionTitle>Simple pricing</WebSectionTitle>\n <p className=\"mt-3 text-muted-foreground\">Start free. Upgrade when you're ready.</p>\n </div>\n <div className=\"grid gap-4 md:grid-cols-3\">\n {tiers.map((t) => (\n <Card key={t.name} className={cn(t.featured && \"border-foreground/25 shadow-float\")}>\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <CardTitle>{t.name}</CardTitle>\n {t.featured && <Badge variant=\"brand\">Popular</Badge>}\n </div>\n <CardDescription>{t.blurb}</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-6\">\n <p className=\"text-4xl font-light tracking-tight text-brand\">\n {t.price}\n {t.price.startsWith(\"$\") && <span className=\"text-base font-normal text-muted-foreground\">/mo</span>}\n </p>\n <ul className=\"space-y-2 text-sm\">\n {t.features.map((f) => (\n <li key={f} className=\"flex items-center gap-2\"><CheckIcon className=\"size-4 text-brand\" />{f}</li>\n ))}\n </ul>\n </CardContent>\n <CardFooter className=\"mt-auto\">\n <Button className=\"w-full\" variant={t.featured ? \"brand\" : \"outline\"}>Choose {t.name}</Button>\n </CardFooter>\n </Card>\n ))}\n </div>\n </section>\n );\n}\n\nexport default Pricing01;\n"},{"slug":"faq-01","title":"FAQ","category":"FAQ","height":640,"description":"Two-column FAQ accordion.","use":"Answer objections near pricing or the final CTA.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/faq-01.json","source":"import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from \"@recanica/ui/components/accordion\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nconst faqs = [\n [\"How much does it cost?\", \"Free to start. We take 4% + 40¢ per transaction, including tax handling and payouts.\"],\n [\"Are you a merchant of record?\", \"Yes. We're the seller of record, so we calculate, collect and remit sales tax and VAT for you.\"],\n [\"Can I migrate existing subscribers?\", \"Yes. Import customers and subscriptions from Stripe without asking anyone to re-enter a card.\"],\n [\"Which countries can receive payouts?\", \"40+ countries via bank transfer, with more added every quarter.\"],\n [\"Do you support usage-based billing?\", \"Yes. Send usage events to meters and bill per unit, tiered or volume.\"],\n];\n\nexport function Faq01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto grid max-w-content gap-10 lg:grid-cols-[1fr_1.6fr] lg:gap-16\">\n <div>\n <WebSectionTitle>Questions</WebSectionTitle>\n <p className=\"mt-4 text-muted-foreground\">Can't find an answer? <a href=\"/site/contact\" className=\"text-foreground underline underline-offset-4\">Talk to us</a>.</p>\n </div>\n <Accordion type=\"single\" collapsible className=\"w-full\">\n {faqs.map(([q, a]) => (\n <AccordionItem key={q} value={q}>\n <AccordionTrigger className=\"text-base\">{q}</AccordionTrigger>\n <AccordionContent className=\"text-muted-foreground\">{a}</AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n </div>\n </section>\n );\n}\n\nexport default Faq01;\n"},{"slug":"cta-01","title":"Call to Action","category":"CTA","height":420,"description":"Closing CTA panel.","use":"Last section before the footer; one clear action.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/cta-01.json","source":"import { ArrowRightIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebHeroTitle } from \"@recanica/ui/components/web-section\";\n\nexport function Cta01() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"relative mx-auto max-w-content overflow-hidden rounded-3xl border bg-card px-6 py-16 text-center sm:px-12 sm:py-20\">\n <div aria-hidden className=\"pointer-events-none absolute inset-x-0 -bottom-48 mx-auto h-80 max-w-2xl rounded-full bg-foreground/10 blur-3xl\" />\n <div className=\"relative mx-auto max-w-2xl space-y-6\">\n <WebHeroTitle as=\"h2\" className=\"text-brand\">Start selling today</WebHeroTitle>\n <p className=\"text-muted-foreground sm:text-lg\">No setup fees. No monthly minimum. Your first checkout in five minutes.</p>\n <div className=\"flex flex-col justify-center gap-3 sm:flex-row\">\n <Button size=\"lg\" variant=\"brand\">Create account <ArrowRightIcon /></Button>\n <Button size=\"lg\" variant=\"outline\">Talk to sales</Button>\n </div>\n </div>\n </div>\n </section>\n );\n}\n\nexport default Cta01;\n"},{"slug":"cta-02","title":"Newsletter CTA","category":"CTA","description":"Inline email signup with consent note.","height":320,"use":"Mid-page or footer newsletter capture.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/cta-02.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nexport function Cta02() {\n const [done, setDone] = React.useState(false);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto flex max-w-content flex-col gap-6 rounded-3xl border bg-card p-6 sm:p-10 md:flex-row md:items-center\">\n <div className=\"flex-1\">\n <Heading level={2}>One useful email a month</Heading>\n <p className=\"mt-1 text-sm text-muted-foreground\">Tax deadlines, product updates and one customer story. No spam.</p>\n </div>\n {done ? (\n <p className=\"text-sm\">You're subscribed. See you next month.</p>\n ) : (\n <form className=\"flex w-full flex-col gap-2 sm:flex-row md:w-auto\" onSubmit={(e) => { e.preventDefault(); setDone(true); }}>\n <Input type=\"email\" required placeholder=\"you@example.com\" aria-label=\"Email\" className=\"md:w-64\" />\n <Button type=\"submit\" className=\"shrink-0\">Subscribe</Button>\n </form>\n )}\n </div>\n </section>\n );\n}\n\nexport default Cta02;\n"},{"slug":"popup-01","title":"Newsletter Popup","category":"Popup","description":"Modal offer with email capture; respects dismissal.","height":600,"use":"Exit-intent or delayed offers. Use sparingly.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/popup-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from \"@recanica/ui/components/dialog\";\nimport { Input } from \"@recanica/ui/components/input\";\n\nexport function Popup01() {\n const [open, setOpen] = React.useState(true);\n const [done, setDone] = React.useState(false);\n return (\n <div className=\"flex min-h-[560px] items-center justify-center bg-background p-6\">\n <Button variant=\"outline\" onClick={() => { setDone(false); setOpen(true); }}>Show popup</Button>\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogContent className=\"overflow-hidden p-0 sm:max-w-md\">\n <div className=\"h-28 bg-brand text-brand-foreground\" aria-hidden />\n <div className=\"space-y-4 p-6\">\n <DialogHeader>\n <DialogTitle>{done ? \"Check your inbox\" : \"RM20 off your first order\"}</DialogTitle>\n <DialogDescription>\n {done ? \"Your code is on its way. It's valid for 14 days.\" : \"Join the newsletter for the code, plus one email a month on new arrivals. Unsubscribe anytime.\"}\n </DialogDescription>\n </DialogHeader>\n {done ? (\n <Button className=\"w-full\" onClick={() => setOpen(false)}>Continue shopping</Button>\n ) : (\n <form className=\"flex flex-col gap-2 sm:flex-row\" onSubmit={(e) => { e.preventDefault(); setDone(true); }}>\n <Input type=\"email\" required placeholder=\"you@example.com\" aria-label=\"Email\" />\n <Button type=\"submit\" className=\"shrink-0\">Get my code</Button>\n </form>\n )}\n {!done && <Button variant=\"ghost\" onClick={() => setOpen(false)} className=\"w-full text-muted-foreground\">No thanks</Button>}\n </div>\n </DialogContent>\n </Dialog>\n </div>\n );\n}\n\nexport default Popup01;\n"},{"slug":"contact-01","title":"Contact","category":"Contact","description":"Contact form beside office details, hours and channels.","height":820,"use":"Contact page or bottom-of-page enquiry section.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/contact-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon, ClockIcon, MailIcon, MapPinIcon, PhoneIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { NativeSelect, NativeSelectOption } from \"@recanica/ui/components/native-select\";\nimport { Textarea } from \"@recanica/ui/components/textarea\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nconst details = [\n { icon: MailIcon, label: \"Email\", value: \"hello@acme.example\" },\n { icon: PhoneIcon, label: \"Phone / WhatsApp\", value: \"+60 3-2711 0000\" },\n { icon: MapPinIcon, label: \"Office\", value: \"Level 12, Menara Contoh, Jalan Ampang, 50450 Kuala Lumpur\" },\n { icon: ClockIcon, label: \"Hours\", value: \"Mon–Fri, 9am–6pm MYT\" },\n];\n\nexport function Contact01() {\n const [sent, setSent] = React.useState(false);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto grid max-w-content gap-12 lg:grid-cols-[1fr_1.2fr]\">\n <div className=\"space-y-8\">\n <div>\n <WebSectionTitle as=\"h1\">Contact us</WebSectionTitle>\n <p className=\"mt-3 text-muted-foreground\">We reply within one business day. For account issues, sign in and use in-app chat for a faster answer.</p>\n </div>\n <dl className=\"space-y-5\">\n {details.map((d) => (\n <div key={d.label} className=\"flex gap-3\">\n <d.icon className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"text-sm\"><dt className=\"text-muted-foreground\">{d.label}</dt><dd>{d.value}</dd></div>\n </div>\n ))}\n </dl>\n </div>\n <div className=\"rounded-3xl border bg-card p-6 sm:p-8\">\n {sent ? (\n <div className=\"flex h-full flex-col items-center justify-center gap-3 py-12 text-center\">\n <span className=\"flex size-10 items-center justify-center rounded-full bg-brand text-brand-foreground\"><CheckIcon className=\"size-4\" /></span>\n <p className=\"text-heading\">Message sent</p>\n <p className=\"text-sm text-muted-foreground\">We'll reply to your email by tomorrow.</p>\n </div>\n ) : (\n <form className=\"grid gap-5 sm:grid-cols-2\" onSubmit={(e) => { e.preventDefault(); setSent(true); }}>\n <Field><FieldLabel htmlFor=\"c-name\">Name</FieldLabel><Input id=\"c-name\" required /></Field>\n <Field><FieldLabel htmlFor=\"c-email\">Email</FieldLabel><Input id=\"c-email\" type=\"email\" required /></Field>\n <Field className=\"sm:col-span-2\">\n <FieldLabel htmlFor=\"c-topic\">Topic</FieldLabel>\n <NativeSelect id=\"c-topic\" className=\"w-full\">\n <NativeSelectOption>Sales question</NativeSelectOption>\n <NativeSelectOption>Billing</NativeSelectOption>\n <NativeSelectOption>Partnership</NativeSelectOption>\n <NativeSelectOption>Something else</NativeSelectOption>\n </NativeSelect>\n </Field>\n <Field className=\"sm:col-span-2\"><FieldLabel htmlFor=\"c-msg\">Message</FieldLabel><Textarea id=\"c-msg\" required className=\"min-h-32\" /></Field>\n <Button type=\"submit\" className=\"sm:col-span-2 sm:justify-self-start\">Send message</Button>\n </form>\n )}\n </div>\n </div>\n </section>\n );\n}\n\nexport default Contact01;\n"},{"slug":"blog-01","title":"Blog Grid","category":"Blog","description":"Featured post plus a grid of posts with category filter.","height":900,"use":"Blog index or 'From the blog' section on the home page.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/blog-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { WebSectionTitle, WebSectionHeader } from \"@recanica/ui/components/web-section\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst posts = [\n { title: \"What changes for small businesses with e-Invoice in 2026\", cat: \"Tax\", date: \"12 Nov 2026\", read: \"6 min\", excerpt: \"Who needs to comply, by when, and what the validation QR on your invoice actually does.\" },\n { title: \"Deposits and instalments without the awkward follow-ups\", cat: \"Guides\", date: \"4 Nov 2026\", read: \"4 min\", excerpt: \"How to set up a payment plan your customer agrees to before work starts.\" },\n { title: \"How Studio Aina cut payment time from 11 days to 3\", cat: \"Stories\", date: \"28 Oct 2026\", read: \"5 min\", excerpt: \"A two-person studio in Kota Bharu on switching from bank transfers to payment links.\" },\n { title: \"FPX or DuitNow QR: which should you offer?\", cat: \"Guides\", date: \"15 Oct 2026\", read: \"3 min\", excerpt: \"Both. Here's what each costs and when customers prefer one over the other.\" },\n { title: \"Release notes: October\", cat: \"Product\", date: \"1 Oct 2026\", read: \"2 min\", excerpt: \"Payment plans, faster CSV exports and a new invoice layout.\" },\n { title: \"Pricing your services when costs go up\", cat: \"Stories\", date: \"18 Sep 2026\", read: \"7 min\", excerpt: \"Five owners on how they told clients about a price change.\" },\n];\nconst cats = [\"All\", \"Guides\", \"Tax\", \"Stories\", \"Product\"];\n\nfunction Cover({ className = \"\" }: { className?: string }) {\n return <div className={`rounded-2xl border bg-muted ${className}`} role=\"img\" aria-label=\"Article cover placeholder\" />;\n}\n\nexport function Blog01() {\n const [cat, setCat] = React.useState(\"All\");\n const [featured, ...rest] = posts;\n const list = rest.filter((p) => cat === \"All\" || p.cat === cat);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content space-y-12\">\n <WebSectionHeader titleAs=\"h1\" title=\"Blog\" description=\"Guides on billing, tax and running a small business in Malaysia.\" actions={<div className=\"-mx-1 overflow-x-auto px-1\">\n <Tabs value={cat} onValueChange={setCat}><TabsList>{cats.map((c) => <TabsTrigger key={c} value={c}>{c}</TabsTrigger>)}</TabsList></Tabs>\n </div>} />\n {cat === \"All\" && (\n <a href=\"/site/blog/e-invoice-2026\" className=\"group grid gap-6 lg:grid-cols-2 lg:items-center\">\n <Cover className=\"aspect-[16/10]\" />\n <div className=\"space-y-3\">\n <Badge variant=\"outline\">{featured.cat}</Badge>\n <Heading level={2} className=\"text-balance group-hover:underline sm:text-title\">{featured.title}</Heading>\n <p className=\"text-muted-foreground\">{featured.excerpt}</p>\n <p className=\"text-sm text-muted-foreground\">{featured.date} · {featured.read} read</p>\n </div>\n </a>\n )}\n <div className=\"grid gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-3\">\n {list.map((p) => (\n <a key={p.title} href=\"/site/blog/e-invoice-2026\" className=\"group space-y-3\">\n <Cover className=\"aspect-[16/10]\" />\n <p className=\"text-xs text-muted-foreground\">{p.cat} · {p.date}</p>\n <h3 className=\"text-balance group-hover:underline\">{p.title}</h3>\n <p className=\"text-sm text-muted-foreground\">{p.excerpt}</p>\n </a>\n ))}\n {list.length === 0 && <p className=\"text-sm text-muted-foreground\">No posts in this category yet.</p>}\n </div>\n </div>\n </section>\n );\n}\n\nexport default Blog01;\n"},{"slug":"post-hero-01","title":"Post Hero","category":"Single Post Hero","description":"Article header with category, title, author and reading time.","height":560,"use":"Top of a blog post or article.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/post-hero-01.json","source":"import { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { WebHeroTitle } from \"@recanica/ui/components/web-section\";\n\nexport function PostHero01() {\n return (\n <header className=\"px-gutter pt-section-sm\">\n <div className=\"mx-auto max-w-narrow space-y-6 text-center\">\n <Badge variant=\"outline\">Tax</Badge>\n <WebHeroTitle>What changes for small businesses with e-Invoice in 2026</WebHeroTitle>\n <p className=\"text-muted-foreground sm:text-lg\">Who needs to comply, by when, and what the validation QR on your invoice actually does.</p>\n <div className=\"flex items-center justify-center gap-3 text-sm\">\n <Avatar><AvatarFallback>TW</AvatarFallback></Avatar>\n <span className=\"text-left\">Tan Wei Ming<span className=\"block text-muted-foreground\">12 Nov 2026 · 6 min read</span></span>\n </div>\n </div>\n <div className=\"mx-auto mt-12 aspect-[21/9] max-w-content rounded-3xl border bg-muted\" role=\"img\" aria-label=\"Article cover placeholder\" />\n </header>\n );\n}\n\nexport default PostHero01;\n"},{"slug":"single-post-01","title":"Article Body","category":"Single Post","description":"Readable article body with table of contents and share.","height":1200,"use":"Long-form article content.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/single-post-01.json","source":"\"use client\";\n\nimport { CopyIcon, LinkIcon } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@recanica/ui/components/button\";\n\nconst toc = [[\"who\", \"Who needs to comply\"], [\"when\", \"Key dates\"], [\"how\", \"How validation works\"], [\"checklist\", \"A short checklist\"]];\n\nexport function SinglePost01() {\n return (\n <article className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto grid max-w-content gap-10 lg:grid-cols-[1fr_minmax(0,40rem)_1fr]\">\n <aside className=\"hidden lg:block\">\n <nav className=\"sticky top-6 space-y-2 text-sm\" aria-label=\"On this page\">\n <p className=\"text-muted-foreground\">On this page</p>\n {toc.map(([id, t]) => <a key={id} href={`#${id}`} className=\"block text-muted-foreground hover:text-foreground\">{t}</a>)}\n </nav>\n </aside>\n <div className=\"space-y-6 leading-7 [&_h2]:scroll-mt-6 [&_h2]:pt-6 [&_h2]:text-heading [&_p]:text-muted-foreground\">\n <p className=\"text-lg text-foreground\">If you issue invoices in Malaysia, you'll need to send them through LHDN's MyInvois system. Here's what that means in practice.</p>\n <h2 id=\"who\">Who needs to comply</h2>\n <p>All businesses are being phased in by annual turnover. Smaller businesses come last, but the requirements are the same: every invoice gets a unique ID and is validated before your customer sees it.</p>\n <h2 id=\"when\">Key dates</h2>\n <ul className=\"list-disc space-y-1 pl-5 text-muted-foreground\">\n <li>Check your phase on the LHDN website using your turnover for the last audited year.</li>\n <li>Plan for a short test period before your deadline.</li>\n </ul>\n <h2 id=\"how\">How validation works</h2>\n <p>When you send an invoice, it's submitted to MyInvois. LHDN checks the format and the tax IDs, then returns a UUID and a QR code that you print on the invoice.</p>\n <blockquote className=\"border-l-2 pl-4 text-foreground\">If a validated invoice is wrong, cancel it within 72 hours or issue a credit note.</blockquote>\n <h2 id=\"checklist\">A short checklist</h2>\n <ol className=\"list-decimal space-y-1 pl-5 text-muted-foreground\">\n <li>Collect your customers' TIN and registration numbers.</li>\n <li>Make sure your invoice software can submit to MyInvois.</li>\n <li>Tell customers the invoice will now include a QR code.</li>\n </ol>\n <div className=\"flex flex-wrap items-center gap-2 border-t pt-6\">\n <span className=\"text-sm text-muted-foreground\">Share</span>\n <Button variant=\"outline\" size=\"sm\" onClick={() => { navigator.clipboard?.writeText(location.href).catch(() => {}); toast(\"Link copied\"); }}><LinkIcon /> Copy link</Button>\n <Button variant=\"ghost\" size=\"sm\"><CopyIcon /> Cite</Button>\n </div>\n </div>\n </div>\n </article>\n );\n}\n\nexport default SinglePost01;\n"},{"slug":"team-01","title":"Team Grid","category":"Team","description":"Team members with role and social links.","height":760,"use":"About page team section.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/team-01.json","source":"import { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nconst team = [\n [\"Nadia Rahman\", \"Co-founder, CEO\"], [\"Tan Wei Ming\", \"Co-founder, CTO\"], [\"Arjun Mehta\", \"Engineering\"], [\"Mei Kato\", \"Design\"],\n [\"Hana Lee\", \"Customer support\"], [\"Sam Ortiz\", \"Partnerships\"], [\"Chloe Martin\", \"Finance\"], [\"Leo Tan\", \"Engineering\"],\n];\nconst initials = (n: string) => n.split(\" \").map((p) => p[0]).join(\"\").slice(0, 2);\n\nexport function Team01() {\n return (\n <section className=\"px-gutter py-section\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"max-w-2xl\">\n <WebSectionTitle>The team</WebSectionTitle>\n <p className=\"mt-4 text-muted-foreground\">Twelve people in Kuala Lumpur and Penang. We answer support emails ourselves.</p>\n </div>\n <ul className=\"mt-12 grid grid-cols-2 gap-x-6 gap-y-10 md:grid-cols-4\">\n {team.map(([name, role]) => (\n <li key={name}>\n <a href=\"/site/team/mei-kato\" className=\"group block\">\n <div className=\"flex aspect-square items-center justify-center rounded-2xl border bg-muted text-title font-light text-muted-foreground\" role=\"img\" aria-label={`Photo of ${name}`}>{initials(name)}</div>\n <p className=\"mt-3 group-hover:underline\">{name}</p>\n <p className=\"text-sm text-muted-foreground\">{role}</p>\n </a>\n </li>\n ))}\n </ul>\n </div>\n </section>\n );\n}\n\nexport default Team01;\n"},{"slug":"single-team-01","title":"Team Member","category":"Single Team","description":"Profile with role, bio, expertise and contact.","height":760,"use":"Detail page for one person.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/single-team-01.json","source":"import { MailIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nexport function SingleTeam01() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto grid max-w-content gap-10 md:grid-cols-[18rem_1fr] md:gap-16\">\n <div className=\"flex aspect-[4/5] items-center justify-center rounded-3xl border bg-muted text-display-sm font-light text-muted-foreground\" role=\"img\" aria-label=\"Photo of Mei Kato\">MK</div>\n <div className=\"space-y-6\">\n <div>\n <p className=\"text-sm text-muted-foreground\">Design</p>\n <WebSectionTitle as=\"h1\">Mei Kato</WebSectionTitle>\n </div>\n <p className=\"max-w-copy text-muted-foreground\">Mei leads design at Acme. Before joining, she spent six years designing banking apps in Tokyo and Singapore. She cares about invoices that customers can read without squinting.</p>\n <div className=\"flex flex-wrap gap-2\">{[\"Product design\", \"Design systems\", \"Accessibility\"].map((t) => <Badge key={t} variant=\"outline\">{t}</Badge>)}</div>\n <dl className=\"grid max-w-md grid-cols-2 gap-4 border-t pt-6 text-sm\">\n <div><dt className=\"text-muted-foreground\">Based in</dt><dd>Kuala Lumpur</dd></div>\n <div><dt className=\"text-muted-foreground\">Joined</dt><dd>March 2024</dd></div>\n </dl>\n <Button variant=\"outline\"><MailIcon /> Email Mei</Button>\n </div>\n </div>\n </section>\n );\n}\n\nexport default SingleTeam01;\n"},{"slug":"career-01","title":"Open Roles","category":"Career","description":"Careers header, perks and a filterable list of open roles.","height":900,"use":"Careers page or hiring section.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/career-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { ArrowUpRightIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\n\nconst roles = [\n { title: \"Senior Frontend Engineer\", team: \"Engineering\", place: \"Kuala Lumpur · Hybrid\", type: \"Full-time\" },\n { title: \"Backend Engineer (Payments)\", team: \"Engineering\", place: \"Remote, Malaysia\", type: \"Full-time\" },\n { title: \"Product Designer\", team: \"Design\", place: \"Kuala Lumpur · Hybrid\", type: \"Full-time\" },\n { title: \"Customer Support Lead\", team: \"Support\", place: \"Penang\", type: \"Full-time\" },\n { title: \"Finance Intern\", team: \"Finance\", place: \"Kuala Lumpur\", type: \"Internship · 6 months\" },\n];\nconst perks = [\"Medical and dental for you and family\", \"RM2,000 yearly learning budget\", \"Hybrid: 2 office days a week\", \"Laptop of your choice\"];\n\nexport function Career01() {\n const teams = [\"All\", ...Array.from(new Set(roles.map((r) => r.team)))];\n const [team, setTeam] = React.useState(\"All\");\n const list = roles.filter((r) => team === \"All\" || r.team === team);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content space-y-12\">\n <div className=\"max-w-2xl\">\n <WebSectionTitle as=\"h1\">Work with us</WebSectionTitle>\n <p className=\"mt-4 text-muted-foreground\">We're a small team building billing tools for Malaysian businesses. Every role here ships to customers in the first month.</p>\n </div>\n <SurfaceGrid as=\"ul\" className=\"sm:grid-cols-2 lg:grid-cols-4\">\n {perks.map((p) => <li key={p} className=\"bg-background p-5 text-sm\">{p}</li>)}\n </SurfaceGrid>\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <Heading level={2}>Open roles <span className=\"text-muted-foreground\">({list.length})</span></Heading>\n <div className=\"-mx-1 overflow-x-auto px-1\"><Tabs value={team} onValueChange={setTeam}><TabsList>{teams.map((t) => <TabsTrigger key={t} value={t}>{t}</TabsTrigger>)}</TabsList></Tabs></div>\n </div>\n <ul className=\"divide-y rounded-2xl border\">\n {list.map((r) => (\n <li key={r.title}>\n <a href=\"/site/contact\" className=\"group flex flex-col gap-2 p-5 transition-colors hover:bg-accent/40 sm:flex-row sm:items-center\">\n <span className=\"flex-1\">{r.title}<span className=\"block text-sm text-muted-foreground\">{r.place}</span></span>\n <Badge variant=\"outline\">{r.team}</Badge>\n <span className=\"text-sm text-muted-foreground sm:w-40 sm:text-right\">{r.type}</span>\n <ArrowUpRightIcon className=\"hidden size-4 text-muted-foreground transition-transform group-hover:translate-x-0.5 sm:block\" />\n </a>\n </li>\n ))}\n </ul>\n <p className=\"text-sm text-muted-foreground\">Don't see your role? Email careers@acme.example with what you'd work on.</p>\n </div>\n </div>\n </section>\n );\n}\n\nexport default Career01;\n"},{"slug":"portfolio-01","title":"Portfolio Grid","category":"Portfolio","description":"Project grid with category filter.","height":880,"use":"Agency or studio work index.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/portfolio-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Tabs, TabsList, TabsTrigger } from \"@recanica/ui/components/tabs\";\nimport { WebSectionTitle, WebSectionHeader } from \"@recanica/ui/components/web-section\";\n\nconst work = [\n { title: \"Kopi Pak Mat ordering\", client: \"Kedai Kopi Pak Mat\", tag: \"Product\", year: \"2026\" },\n { title: \"Lumen Labs brand refresh\", client: \"Lumen Labs\", tag: \"Brand\", year: \"2026\" },\n { title: \"Maju Jaya online store\", client: \"Syarikat Maju Jaya\", tag: \"Web\", year: \"2025\" },\n { title: \"Northwind dashboard\", client: \"Northwind Trading\", tag: \"Product\", year: \"2025\" },\n { title: \"Batik festival site\", client: \"Kraf Collective\", tag: \"Web\", year: \"2025\" },\n { title: \"Penang Hub signage\", client: \"Penang Hub\", tag: \"Brand\", year: \"2024\" },\n];\n\nexport function Portfolio01() {\n const [tag, setTag] = React.useState(\"All\");\n const list = work.filter((w) => tag === \"All\" || w.tag === tag);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content space-y-10\">\n <WebSectionHeader titleAs=\"h1\" title=\"Selected work\" actions={<Tabs value={tag} onValueChange={setTag}><TabsList>{[\"All\", \"Product\", \"Web\", \"Brand\"].map((t) => <TabsTrigger key={t} value={t}>{t}</TabsTrigger>)}</TabsList></Tabs>} />\n <div className=\"grid gap-x-6 gap-y-10 md:grid-cols-2\">\n {list.map((w) => (\n <a key={w.title} href=\"/site/work/kopitiam-ordering\" className=\"group space-y-3\">\n <div className=\"aspect-[4/3] rounded-3xl border bg-muted transition-transform duration-300 ease-out-soft group-hover:scale-[0.99]\" role=\"img\" aria-label={`${w.title} cover`} />\n <div className=\"flex items-baseline justify-between gap-4\">\n <h2 className=\"group-hover:underline\">{w.title}</h2>\n <span className=\"shrink-0 text-sm text-muted-foreground\">{w.tag} · {w.year}</span>\n </div>\n <p className=\"text-sm text-muted-foreground\">{w.client}</p>\n </a>\n ))}\n </div>\n </div>\n </section>\n );\n}\n\nexport default Portfolio01;\n"},{"slug":"single-portfolio-01","title":"Case Study","category":"Single Portfolio","description":"Project case study: summary, challenge, approach, results.","height":1200,"use":"Detail page for one project.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/single-portfolio-01.json","source":"import { WebHeroTitle } from \"@recanica/ui/components/web-section\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\nconst facts = [[\"Client\", \"Kedai Kopi Pak Mat\"], [\"Year\", \"2026\"], [\"Services\", \"Product design, build\"], [\"Timeline\", \"8 weeks\"]];\nconst results = [[\"38%\", \"of orders now placed online\"], [\"4 min\", \"average wait at peak, down from 12\"], [\"RM 0\", \"spent on third-party delivery apps\"]];\n\nexport function SinglePortfolio01() {\n return (\n <article className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content space-y-section-sm\">\n <header className=\"space-y-6\">\n <p className=\"text-sm text-muted-foreground\">Case study</p>\n <WebHeroTitle className=\"max-w-3xl\">Online ordering for a 40-year-old kopitiam in Melaka</WebHeroTitle>\n <dl className=\"grid grid-cols-2 gap-6 border-t pt-6 text-sm md:grid-cols-4\">\n {facts.map(([k, v]) => <div key={k}><dt className=\"text-muted-foreground\">{k}</dt><dd>{v}</dd></div>)}\n </dl>\n </header>\n <div className=\"aspect-[21/9] rounded-3xl border bg-muted\" role=\"img\" aria-label=\"Project hero image\" />\n <div className=\"grid gap-10 md:grid-cols-[14rem_1fr]\">\n <Heading level={2}>The problem</Heading>\n <p className=\"max-w-copy text-muted-foreground\">Regulars ordered by phone and the lunch queue went out the door. Delivery apps took 30% of each order, so Pak Mat stopped using them.</p>\n <Heading level={2}>What we did</Heading>\n <p className=\"max-w-copy text-muted-foreground\">A simple order page customers open from a QR code on the table or a WhatsApp link. Payment by DuitNow QR, orders printed straight to the kitchen.</p>\n </div>\n <SurfaceGrid className=\"sm:grid-cols-3\">\n {results.map(([v, l]) => <div key={l} className=\"bg-background p-panel\"><p className=\"text-metric font-light\">{v}</p><p className=\"mt-2 text-sm text-muted-foreground\">{l}</p></div>)}\n </SurfaceGrid>\n <div className=\"grid gap-3 sm:grid-cols-2\">\n <div className=\"aspect-[4/3] rounded-3xl border bg-muted\" role=\"img\" aria-label=\"Screens\" />\n <div className=\"aspect-[4/3] rounded-3xl border bg-muted\" role=\"img\" aria-label=\"In store\" />\n </div>\n </div>\n </article>\n );\n}\n\nexport default SinglePortfolio01;\n"},{"slug":"gallery-01","title":"Gallery","category":"Gallery","description":"Masonry-style image grid with lightbox.","height":820,"use":"Photo galleries, office or project images.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/gallery-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Dialog, DialogContent, DialogTitle } from \"@recanica/ui/components/dialog\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { Surface } from \"@recanica/ui/components/surface\";\n\nconst shots = [\n { label: \"Office, level 12\", ratio: \"aspect-[4/5]\" }, { label: \"Team lunch\", ratio: \"aspect-square\" }, { label: \"Workshop room\", ratio: \"aspect-[4/3]\" },\n { label: \"Penang hub\", ratio: \"aspect-[4/3]\" }, { label: \"Launch night\", ratio: \"aspect-[4/5]\" }, { label: \"Customer meetup\", ratio: \"aspect-square\" },\n { label: \"Whiteboard session\", ratio: \"aspect-[4/5]\" }, { label: \"Rooftop\", ratio: \"aspect-[4/3]\" },\n];\n\nexport function Gallery01() {\n const [open, setOpen] = React.useState<number | null>(null);\n const go = (d: number) => setOpen((i) => (i === null ? i : (i + d + shots.length) % shots.length));\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content\">\n <WebSectionTitle>Life at Acme</WebSectionTitle>\n <div className=\"mt-10 columns-2 gap-3 md:columns-3 lg:columns-4\">\n {shots.map((s, i) => (\n <Surface as=\"button\" type=\"button\" key={s.label} onClick={() => setOpen(i)} tone=\"muted\" inset=\"none\" className={`mb-3 block w-full break-inside-avoid ${s.ratio} text-xs text-muted-foreground transition-opacity hover:opacity-80`} aria-label={`Open ${s.label}`}>\n {s.label}\n </Surface>\n ))}\n </div>\n </div>\n <Dialog open={open !== null} onOpenChange={(o) => !o && setOpen(null)}>\n <DialogContent className=\"sm:max-w-3xl\">\n <DialogTitle>{open !== null ? shots[open].label : \"\"}</DialogTitle>\n <div className=\"flex aspect-[16/10] items-center justify-center rounded-xl bg-muted text-sm text-muted-foreground\">Image {open !== null ? open + 1 : \"\"} of {shots.length}</div>\n <div className=\"flex justify-between\">\n <Button variant=\"outline\" size=\"icon\" aria-label=\"Previous\" onClick={() => go(-1)}><ChevronLeftIcon /></Button>\n <Button variant=\"outline\" size=\"icon\" aria-label=\"Next\" onClick={() => go(1)}><ChevronRightIcon /></Button>\n </div>\n </DialogContent>\n </Dialog>\n </section>\n );\n}\n\nexport default Gallery01;\n"},{"slug":"event-01","title":"Events List","category":"Event","description":"Upcoming events with date blocks, type and location.","height":800,"use":"Events, webinars or workshops index.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/event-01.json","source":"import { ArrowRightIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nconst events = [\n { day: \"04\", month: \"Dec\", title: \"e-Invoice clinic for small businesses\", type: \"Workshop\", place: \"Kuala Lumpur · In person\", time: \"2:00–4:30pm\", seats: \"12 seats left\" },\n { day: \"11\", month: \"Dec\", title: \"Pricing your services in 2027\", type: \"Webinar\", place: \"Online\", time: \"8:00–9:00pm\", seats: \"Free\" },\n { day: \"15\", month: \"Jan\", title: \"Founders meetup Penang\", type: \"Meetup\", place: \"Penang Hub, George Town\", time: \"7:00–9:30pm\", seats: \"Free, register\" },\n];\n\nexport function Event01() {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"flex items-end justify-between gap-4\">\n <WebSectionTitle>Upcoming events</WebSectionTitle>\n <a href=\"/site/events\" className=\"hidden text-sm text-muted-foreground hover:text-foreground sm:block\">Past events</a>\n </div>\n <ul className=\"mt-10 divide-y rounded-2xl border\">\n {events.map((e) => (\n <li key={e.title} className=\"flex flex-col gap-4 p-5 sm:flex-row sm:items-center\">\n <div className=\"flex size-16 shrink-0 flex-col items-center justify-center rounded-xl border bg-panel\">\n <span className=\"text-2xl leading-none font-light\">{e.day}</span>\n <span className=\"text-xs text-muted-foreground\">{e.month}</span>\n </div>\n <div className=\"flex-1 space-y-1\">\n <div className=\"flex flex-wrap items-center gap-2\"><h3>{e.title}</h3><Badge variant=\"outline\">{e.type}</Badge></div>\n <p className=\"text-sm text-muted-foreground\">{e.place} · {e.time}</p>\n </div>\n <div className=\"flex items-center gap-3 sm:flex-col sm:items-end\">\n <span className=\"text-xs text-muted-foreground\">{e.seats}</span>\n <Button size=\"sm\" variant=\"outline\">Register <ArrowRightIcon /></Button>\n </div>\n </li>\n ))}\n </ul>\n </div>\n </section>\n );\n}\n\nexport default Event01;\n"},{"slug":"single-event-01","title":"Event Detail","category":"Single Event","description":"Event page with schedule, speakers, venue and registration.","height":1100,"use":"Detail page for one event.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/single-event-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { CalendarIcon, CheckIcon, MapPinIcon, UsersIcon } from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { Surface } from \"@recanica/ui/components/surface\";\nimport { SplitLayout } from \"@recanica/ui/components/layout\";\n\nconst agenda = [\n [\"2:00pm\", \"Arrival and coffee\"], [\"2:20pm\", \"What e-Invoice means for your business\"], [\"3:00pm\", \"Hands-on: set up your first validated invoice\"], [\"4:00pm\", \"Q&A with the LHDN-certified consultant\"],\n];\nconst speakers = [[\"Tan Wei Ming\", \"CTO, Acme\"], [\"Aisyah Karim\", \"Tax consultant\"]];\n\nexport function SingleEvent01() {\n const [done, setDone] = React.useState(false);\n return (\n <section className=\"px-gutter py-section-sm\">\n <SplitLayout>\n <div className=\"space-y-10\">\n <header className=\"space-y-4\">\n <Badge variant=\"outline\">Workshop</Badge>\n <WebSectionTitle as=\"h1\">e-Invoice clinic for small businesses</WebSectionTitle>\n <p className=\"max-w-copy text-muted-foreground\">Bring your laptop and your last three invoices. You'll leave with e-Invoice set up and a checklist for your accountant.</p>\n </header>\n <div className=\"aspect-[16/9] rounded-3xl border bg-muted\" role=\"img\" aria-label=\"Venue photo\" />\n <section>\n <Heading level={2}>Agenda</Heading>\n <ol className=\"mt-4 divide-y border-y\">{agenda.map(([t, a]) => <li key={t} className=\"flex gap-6 py-3 text-sm\"><span className=\"w-16 shrink-0 font-mono text-muted-foreground\">{t}</span>{a}</li>)}</ol>\n </section>\n <section>\n <Heading level={2}>Speakers</Heading>\n <ul className=\"mt-4 grid gap-4 sm:grid-cols-2\">{speakers.map(([n, r]) => <Surface as=\"li\" tone=\"plain\" inset=\"sm\" className=\"flex items-center gap-3\" key={n}><Avatar className=\"size-10\"><AvatarFallback>{n.split(\" \").map((p) => p[0]).join(\"\")}</AvatarFallback></Avatar><span className=\"text-sm\">{n}<span className=\"block text-muted-foreground\">{r}</span></span></Surface>)}</ul>\n </section>\n </div>\n <aside className=\"lg:sticky lg:top-6 lg:self-start\">\n <div className=\"space-y-5 rounded-3xl border bg-card p-6\">\n <dl className=\"space-y-3 text-sm\">\n <div className=\"flex gap-3\"><CalendarIcon className=\"size-4 text-muted-foreground\" /><dd>Thu, 4 Dec 2026 · 2:00–4:30pm</dd></div>\n <div className=\"flex gap-3\"><MapPinIcon className=\"size-4 text-muted-foreground\" /><dd>Acme office, Level 12, Menara Contoh, Kuala Lumpur</dd></div>\n <div className=\"flex gap-3\"><UsersIcon className=\"size-4 text-muted-foreground\" /><dd>12 of 30 seats left</dd></div>\n </dl>\n <p className=\"text-metric font-light\">Free</p>\n {done ? (\n <p className=\"flex items-center gap-2 text-sm\"><CheckIcon className=\"size-4\" /> You're registered. Details sent to your email.</p>\n ) : (\n <form className=\"grid gap-2\" onSubmit={(e) => { e.preventDefault(); setDone(true); }}>\n <Input type=\"email\" required placeholder=\"you@example.com\" aria-label=\"Email\" />\n <Button type=\"submit\" variant=\"brand\">Reserve a seat</Button>\n </form>\n )}\n </div>\n </aside>\n </SplitLayout>\n </section>\n );\n}\n\nexport default SingleEvent01;\n"},{"slug":"products-01","title":"Product Grid","category":"Products","description":"Product cards with price, rating and quick add.","height":880,"use":"Shop index or featured products.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/products-01.json","source":"\"use client\";\n\nimport { PlusIcon, StarIcon } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nexport const products = [\n { id: \"p1\", name: \"Kopi Ais Blend, 500g\", price: 38, rating: 4.8, reviews: 214, tag: \"Bestseller\" },\n { id: \"p2\", name: \"Pandan Kaya Jar\", price: 16, rating: 4.9, reviews: 98 },\n { id: \"p3\", name: \"Enamel Mug, Grey\", price: 29, rating: 4.6, reviews: 41 },\n { id: \"p4\", name: \"Drip Kettle 1L\", price: 149, was: 189, rating: 4.7, reviews: 63, tag: \"Sale\" },\n { id: \"p5\", name: \"Single-origin Sabah, 250g\", price: 45, rating: 4.5, reviews: 27, tag: \"New\" },\n { id: \"p6\", name: \"Cold Brew Bottle\", price: 59, rating: 4.4, reviews: 19 },\n { id: \"p7\", name: \"Batik Tote Bag\", price: 35, rating: 4.9, reviews: 52 },\n { id: \"p8\", name: \"Gift Box, Small\", price: 89, rating: 4.8, reviews: 33 },\n];\nexport const rm = (n: number) => `RM${n.toLocaleString(\"en-MY\", { minimumFractionDigits: n % 1 ? 2 : 0 })}`;\n\n/** `titleAs=\"h1\"` when this section is the top of its page (every page needs one h1). */\nexport function Products01({ titleAs: Title = \"h2\" }: { titleAs?: \"h1\" | \"h2\" }) {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"flex items-end justify-between gap-4\">\n <WebSectionTitle as={Title}>Shop</WebSectionTitle>\n <a href=\"/site/shop\" className=\"-my-1 py-1 text-sm text-muted-foreground hover:text-foreground\">View all</a>\n </div>\n <ul className=\"mt-10 grid grid-cols-2 gap-x-4 gap-y-8 md:grid-cols-3 lg:grid-cols-4\">\n {products.map((p) => (\n <li key={p.id} className=\"group\">\n <div className=\"relative aspect-square overflow-hidden rounded-2xl border bg-muted\" role=\"img\" aria-label={p.name}>\n {p.tag && <Badge variant={p.tag === \"Sale\" ? \"destructive\" : \"secondary\"} className=\"absolute top-3 left-3\">{p.tag}</Badge>}\n <Button size=\"icon-sm\" className=\"absolute right-3 bottom-3 opacity-100 transition-opacity md:opacity-0 md:group-hover:opacity-100\" aria-label={`Add ${p.name} to cart`} onClick={() => toast.success(\"Added to cart\", { description: p.name })}>\n <PlusIcon />\n </Button>\n </div>\n <a href=\"/site/shop/kopi-ais-blend\" className=\"mt-2 block py-1 text-sm hover:underline\">{p.name}</a>\n <p className=\"mt-1 flex items-center gap-1 text-xs text-muted-foreground\"><StarIcon className=\"size-3 fill-current\" /> {p.rating} ({p.reviews})</p>\n <p className=\"mt-1 text-sm tabular-nums\">{rm(p.price)} {p.was && <span className=\"text-muted-foreground line-through\">{rm(p.was)}</span>}</p>\n </li>\n ))}\n </ul>\n </div>\n </section>\n );\n}\n\nexport default Products01;\n"},{"slug":"category-filters-01","title":"Category Filters","category":"Category Filters","description":"Filter sidebar (sheet on mobile), active chips, sort and result count.","height":760,"use":"Above or beside any product, property or post grid.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/category-filters-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { SlidersHorizontalIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Checkbox } from \"@recanica/ui/components/checkbox\";\nimport { Label } from \"@recanica/ui/components/label\";\nimport { NativeSelect, NativeSelectOption } from \"@recanica/ui/components/native-select\";\nimport { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from \"@recanica/ui/components/sheet\";\nimport { Slider } from \"@recanica/ui/components/slider\";\n\nconst groups = { Category: [\"Coffee\", \"Tea\", \"Equipment\", \"Gifts\"], Roast: [\"Light\", \"Medium\", \"Dark\"], Origin: [\"Sabah\", \"Johor\", \"Imported\"] };\ntype Key = keyof typeof groups;\n\nfunction Filters({ sel, toggle, price, setPrice }: { sel: Record<Key, string[]>; toggle: (g: Key, v: string) => void; price: number[]; setPrice: (v: number[]) => void }) {\n return (\n <div className=\"space-y-6\">\n {(Object.keys(groups) as Key[]).map((g) => (\n <fieldset key={g} className=\"space-y-2\">\n <legend className=\"mb-2 text-sm\">{g}</legend>\n {groups[g].map((v) => (\n <div key={v} className=\"flex items-center gap-2\">\n <Checkbox id={`${g}-${v}`} checked={sel[g].includes(v)} onCheckedChange={() => toggle(g, v)} />\n <Label htmlFor={`${g}-${v}`} className=\"font-normal text-muted-foreground\">{v}</Label>\n </div>\n ))}\n </fieldset>\n ))}\n <fieldset className=\"space-y-3\">\n <legend className=\"mb-2 text-sm\">Price</legend>\n <Slider value={price} onValueChange={setPrice} min={0} max={300} step={10} />\n <p className=\"text-xs text-muted-foreground tabular-nums\">RM{price[0]} – RM{price[1]}</p>\n </fieldset>\n </div>\n );\n}\n\nexport function CategoryFilters01() {\n const [sel, setSel] = React.useState<Record<Key, string[]>>({ Category: [\"Coffee\"], Roast: [], Origin: [\"Sabah\"] });\n const [price, setPrice] = React.useState([0, 200]);\n const toggle = (g: Key, v: string) => setSel((s) => ({ ...s, [g]: s[g].includes(v) ? s[g].filter((x) => x !== v) : [...s[g], v] }));\n const active = (Object.keys(sel) as Key[]).flatMap((g) => sel[g].map((v) => [g, v] as const));\n const count = 24 - active.length * 4;\n return (\n <section className=\"px-gutter py-8\">\n <div className=\"mx-auto grid max-w-content gap-8 lg:grid-cols-[14rem_1fr]\">\n <aside className=\"hidden lg:block\"><Filters sel={sel} toggle={toggle} price={price} setPrice={setPrice} /></aside>\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <Sheet>\n <SheetTrigger asChild><Button variant=\"outline\" size=\"sm\" className=\"lg:hidden\"><SlidersHorizontalIcon /> Filters {active.length > 0 && `(${active.length})`}</Button></SheetTrigger>\n <SheetContent side=\"left\" className=\"w-80\"><SheetHeader><SheetTitle>Filters</SheetTitle></SheetHeader><div className=\"overflow-y-auto px-4\"><Filters sel={sel} toggle={toggle} price={price} setPrice={setPrice} /></div></SheetContent>\n </Sheet>\n <p className=\"text-sm text-muted-foreground\">{count} products</p>\n <NativeSelect aria-label=\"Sort by\" className=\"ml-auto w-44\" defaultValue=\"popular\">\n <NativeSelectOption value=\"popular\">Most popular</NativeSelectOption>\n <NativeSelectOption value=\"new\">Newest</NativeSelectOption>\n <NativeSelectOption value=\"low\">Price: low to high</NativeSelectOption>\n <NativeSelectOption value=\"high\">Price: high to low</NativeSelectOption>\n </NativeSelect>\n </div>\n {active.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-2\">\n {active.map(([g, v]) => (\n <Badge key={g + v} variant=\"secondary\" onRemove={() => toggle(g, v)} removeLabel={`Remove ${v}`}>{v}</Badge>\n ))}\n <Button variant=\"link\" size=\"sm\" onClick={() => setSel({ Category: [], Roast: [], Origin: [] })}>Clear all</Button>\n </div>\n )}\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-3\">{Array.from({ length: 6 }).map((_, i) => <div key={i} className=\"aspect-square rounded-2xl border bg-muted\" />)}</div>\n </div>\n </div>\n </section>\n );\n}\n\nexport default CategoryFilters01;\n"},{"slug":"single-product-01","title":"Product Detail","category":"Single product","description":"Gallery, variants, quantity, add to cart and details accordion.","height":900,"use":"Detail page for one product.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/single-product-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { MinusIcon, PlusIcon, StarIcon, TruckIcon } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from \"@recanica/ui/components/accordion\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { ToggleGroup, ToggleGroupItem } from \"@recanica/ui/components/toggle-group\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { ChoiceCard } from \"@recanica/ui/components/choice-card\";\n\nexport function SingleProduct01() {\n const [img, setImg] = React.useState(0);\n const [grind, setGrind] = React.useState(\"beans\");\n const [size, setSize] = React.useState(\"500g\");\n const [qty, setQty] = React.useState(1);\n const price = size === \"1kg\" ? 68 : 38;\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto grid max-w-content gap-10 lg:grid-cols-2\">\n <div className=\"space-y-3\">\n <div className=\"flex aspect-square items-center justify-center rounded-3xl border bg-muted text-sm text-muted-foreground\" role=\"img\" aria-label={`Product image ${img + 1}`}>Image {img + 1}</div>\n <div className=\"grid grid-cols-4 gap-3\">\n {[0, 1, 2, 3].map((i) => <ChoiceCard key={i} variant=\"media\" checked={img === i} onSelect={() => setImg(i)} aria-label={`Show image ${i + 1}`} className=\"aspect-square\" />)}\n </div>\n </div>\n <div className=\"space-y-6\">\n <div className=\"space-y-2\">\n <Heading level={1}>Kopi Ais Blend</Heading>\n <p className=\"flex items-center gap-1 text-sm text-muted-foreground\"><StarIcon className=\"size-3.5 fill-current\" /> 4.8 · 214 reviews</p>\n <p className=\"text-metric font-light tabular-nums\">RM{price}</p>\n <p className=\"text-muted-foreground\">Robusta and liberica roasted with butter and sugar, the way kopitiams have done it for decades. Made for iced coffee.</p>\n </div>\n <div className=\"space-y-2\"><p className=\"text-sm\">Grind</p>\n <ToggleGroup type=\"single\" value={grind} onValueChange={(v) => v && setGrind(v)} variant=\"outline\" spacing={2} className=\"flex-wrap\">\n <ToggleGroupItem value=\"beans\">Whole beans</ToggleGroupItem><ToggleGroupItem value=\"filter\">Filter</ToggleGroupItem><ToggleGroupItem value=\"sock\">Kopi sock</ToggleGroupItem>\n </ToggleGroup>\n </div>\n <div className=\"space-y-2\"><p className=\"text-sm\">Size</p>\n <ToggleGroup type=\"single\" value={size} onValueChange={(v) => v && setSize(v)} variant=\"outline\" spacing={2} className=\"flex-wrap\">\n <ToggleGroupItem value=\"500g\">500g</ToggleGroupItem><ToggleGroupItem value=\"1kg\">1kg</ToggleGroupItem>\n </ToggleGroup>\n </div>\n <div className=\"flex gap-2\">\n <div className=\"flex items-center rounded-full border\">\n <Button variant=\"ghost\" size=\"icon\" aria-label=\"Decrease quantity\" onClick={() => setQty((q) => Math.max(1, q - 1))}><MinusIcon /></Button>\n <span className=\"w-8 text-center tabular-nums\" aria-live=\"polite\">{qty}</span>\n <Button variant=\"ghost\" size=\"icon\" aria-label=\"Increase quantity\" onClick={() => setQty((q) => q + 1)}><PlusIcon /></Button>\n </div>\n <Button variant=\"brand\" className=\"flex-1\" onClick={() => toast.success(\"Added to cart\", { description: `${qty} × Kopi Ais Blend ${size}` })}>Add to cart · RM{price * qty}</Button>\n </div>\n <p className=\"flex items-center gap-2 text-sm text-muted-foreground\"><TruckIcon className=\"size-4\" /> Free delivery in Peninsular Malaysia over RM100.</p>\n <Accordion type=\"single\" collapsible defaultValue=\"details\">\n <AccordionItem value=\"details\"><AccordionTrigger>Details</AccordionTrigger><AccordionContent className=\"text-muted-foreground\">Roasted in Johor every Monday. Best within 6 weeks of roasting.</AccordionContent></AccordionItem>\n <AccordionItem value=\"brew\"><AccordionTrigger>How to brew</AccordionTrigger><AccordionContent className=\"text-muted-foreground\">3 tablespoons per 250ml hot water. Steep 4 minutes, strain, add condensed milk and ice.</AccordionContent></AccordionItem>\n <AccordionItem value=\"returns\"><AccordionTrigger>Delivery and returns</AccordionTrigger><AccordionContent className=\"text-muted-foreground\">Ships in 1–2 business days. Unopened bags can be returned within 14 days.</AccordionContent></AccordionItem>\n </Accordion>\n </div>\n </div>\n </section>\n );\n}\n\nexport default SingleProduct01;\n"},{"slug":"cart-01","title":"Cart","category":"Cart page","description":"Line items with quantity steppers, summary with SST and voucher code.","height":760,"use":"Shopping cart before checkout.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/cart-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { MinusIcon, PlusIcon, Trash2Icon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { SplitLayout } from \"@recanica/ui/components/layout\";\n\nconst initial = [\n { id: \"p1\", name: \"Kopi Ais Blend\", variant: \"500g · Whole beans\", price: 38, qty: 2 },\n { id: \"p3\", name: \"Enamel Mug\", variant: \"Grey\", price: 29, qty: 1 },\n { id: \"p4\", name: \"Drip Kettle 1L\", variant: \"Matte black\", price: 149, qty: 1 },\n];\nconst rm = (n: number) => `RM${n.toFixed(2)}`;\n\nexport function Cart01() {\n const [items, setItems] = React.useState(initial);\n const [code, setCode] = React.useState(\"\");\n const [discount, setDiscount] = React.useState(0);\n const sub = items.reduce((a, i) => a + i.price * i.qty, 0);\n const ship = sub - discount >= 100 || sub === 0 ? 0 : 8;\n const total = sub - discount + ship;\n const setQty = (id: string, d: number) => setItems((x) => x.map((i) => (i.id === id ? { ...i, qty: Math.max(1, i.qty + d) } : i)));\n return (\n <section className=\"px-gutter py-section-sm\">\n <SplitLayout>\n <div>\n <Heading level={1}>Your cart</Heading>\n {items.length === 0 ? (\n <p className=\"mt-8 text-muted-foreground\">Your cart is empty. <a href=\"/site/shop\" className=\"text-foreground underline underline-offset-4\">Continue shopping</a></p>\n ) : (\n <ul className=\"mt-6 divide-y border-y\">\n {items.map((i) => (\n <li key={i.id} className=\"flex gap-4 py-5\">\n <div className=\"size-20 shrink-0 rounded-xl border bg-muted sm:size-24\" role=\"img\" aria-label={i.name} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-start\">\n <div className=\"flex-1\"><p>{i.name}</p><p className=\"text-sm text-muted-foreground\">{i.variant}</p></div>\n <div className=\"flex items-center rounded-full border\">\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Decrease\" onClick={() => setQty(i.id, -1)}><MinusIcon /></Button>\n <span className=\"w-6 text-center text-sm tabular-nums\">{i.qty}</span>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Increase\" onClick={() => setQty(i.id, 1)}><PlusIcon /></Button>\n </div>\n <p className=\"w-24 text-sm tabular-nums sm:text-right\">{rm(i.price * i.qty)}</p>\n </div>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label={`Remove ${i.name}`} onClick={() => setItems((x) => x.filter((y) => y.id !== i.id))}><Trash2Icon /></Button>\n </li>\n ))}\n </ul>\n )}\n </div>\n <aside className=\"h-fit space-y-4 rounded-3xl border bg-card p-6 lg:sticky lg:top-6\">\n <h2>Order summary</h2>\n <form className=\"flex gap-2\" onSubmit={(e) => { e.preventDefault(); setDiscount(code.trim().toUpperCase() === \"KOPI10\" ? Math.round(sub * 0.1 * 100) / 100 : 0); }}>\n <Input placeholder=\"Voucher code\" aria-label=\"Voucher code\" value={code} onChange={(e) => setCode(e.target.value)} />\n <Button type=\"submit\" variant=\"outline\">Apply</Button>\n </form>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\"><dt className=\"text-muted-foreground\">Subtotal</dt><dd className=\"tabular-nums\">{rm(sub)}</dd></div>\n {discount > 0 && <div className=\"flex justify-between\"><dt className=\"text-muted-foreground\">Voucher KOPI10</dt><dd className=\"tabular-nums\">−{rm(discount)}</dd></div>}\n <div className=\"flex justify-between\"><dt className=\"text-muted-foreground\">Delivery</dt><dd className=\"tabular-nums\">{ship ? rm(ship) : \"Free\"}</dd></div>\n <Separator />\n <div className=\"flex items-baseline justify-between\"><dt>Total</dt><dd className=\"text-heading tabular-nums\">{rm(total)}</dd></div>\n <p className=\"text-xs text-muted-foreground\">Prices include SST where applicable.</p>\n </dl>\n <Button variant=\"brand\" className=\"w-full\" disabled={!items.length}>Checkout</Button>\n </aside>\n </SplitLayout>\n </section>\n );\n}\n\nexport default Cart01;\n"},{"slug":"checkout-01","title":"Checkout","category":"Checkout page","description":"Contact, shipping address (Malaysian states) and payment method with order summary.","height":960,"use":"One-page checkout for physical goods.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/checkout-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { BuildingIcon, CreditCardIcon, QrCodeIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { NativeSelect, NativeSelectOption } from \"@recanica/ui/components/native-select\";\nimport { Separator } from \"@recanica/ui/components/separator\";\nimport { cn } from \"@recanica/ui/lib/utils\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { ChoiceCard, ChoiceIndicator } from \"@recanica/ui/components/choice-card\";\nimport { SplitLayout } from \"@recanica/ui/components/layout\";\n\nconst STATES = [\"Johor\", \"Kedah\", \"Kelantan\", \"Melaka\", \"Negeri Sembilan\", \"Pahang\", \"Perak\", \"Perlis\", \"Pulau Pinang\", \"Sabah\", \"Sarawak\", \"Selangor\", \"Terengganu\", \"W.P. Kuala Lumpur\", \"W.P. Labuan\", \"W.P. Putrajaya\"];\nconst methods = [{ id: \"fpx\", label: \"FPX online banking\", icon: BuildingIcon }, { id: \"duitnow\", label: \"DuitNow QR\", icon: QrCodeIcon }, { id: \"card\", label: \"Card\", icon: CreditCardIcon }];\nconst items = [[\"Kopi Ais Blend × 2\", 76], [\"Enamel Mug\", 29], [\"Drip Kettle 1L\", 149]] as const;\n\nexport function Checkout01() {\n const [method, setMethod] = React.useState(\"fpx\");\n const total = items.reduce((a, [, p]) => a + p, 0);\n return (\n <section className=\"px-gutter py-section-sm\">\n <SplitLayout onSubmit={(e) => e.preventDefault()}>\n <div className=\"space-y-10\">\n <Heading level={1}>Checkout</Heading>\n <fieldset className=\"grid gap-4 sm:grid-cols-2\">\n <legend className=\"mb-4 text-heading\">Contact</legend>\n <Field><FieldLabel htmlFor=\"co-email\">Email</FieldLabel><Input id=\"co-email\" type=\"email\" autoComplete=\"email\" required /></Field>\n <Field><FieldLabel htmlFor=\"co-phone\">Phone</FieldLabel><Input id=\"co-phone\" type=\"tel\" autoComplete=\"tel\" placeholder=\"+60\" required /></Field>\n </fieldset>\n <fieldset className=\"grid gap-4 sm:grid-cols-2\">\n <legend className=\"mb-4 text-heading\">Delivery address</legend>\n <Field className=\"sm:col-span-2\"><FieldLabel htmlFor=\"co-name\">Full name</FieldLabel><Input id=\"co-name\" autoComplete=\"name\" required /></Field>\n <Field className=\"sm:col-span-2\"><FieldLabel htmlFor=\"co-a1\">Address</FieldLabel><Input id=\"co-a1\" autoComplete=\"address-line1\" required /></Field>\n <Field><FieldLabel htmlFor=\"co-pc\">Postcode</FieldLabel><Input id=\"co-pc\" inputMode=\"numeric\" maxLength={5} autoComplete=\"postal-code\" required /></Field>\n <Field><FieldLabel htmlFor=\"co-city\">City</FieldLabel><Input id=\"co-city\" autoComplete=\"address-level2\" required /></Field>\n <Field className=\"sm:col-span-2\"><FieldLabel htmlFor=\"co-state\">State</FieldLabel>\n <NativeSelect id=\"co-state\" className=\"w-full\" defaultValue=\"Selangor\">{STATES.map((s) => <NativeSelectOption key={s}>{s}</NativeSelectOption>)}</NativeSelect>\n </Field>\n </fieldset>\n <fieldset>\n <legend className=\"mb-4 text-heading\">Payment</legend>\n <div role=\"radiogroup\" className=\"grid gap-2\">\n {methods.map((m) => (\n <ChoiceCard key={m.id} checked={method === m.id} onSelect={() => setMethod(m.id)}>\n <m.icon className=\"size-4 text-muted-foreground\" /><span className=\"flex-1\">{m.label}</span><ChoiceIndicator checked={method === m.id} />\n </ChoiceCard>\n ))}\n </div>\n </fieldset>\n </div>\n <aside className=\"h-fit space-y-4 rounded-3xl border bg-card p-6 lg:sticky lg:top-6\">\n <h2>Order</h2>\n <ul className=\"space-y-2 text-sm\">{items.map(([n, p]) => <li key={n} className=\"flex justify-between gap-4\"><span className=\"text-muted-foreground\">{n}</span><span className=\"tabular-nums\">RM{p.toFixed(2)}</span></li>)}</ul>\n <Separator />\n <div className=\"flex justify-between text-sm\"><span className=\"text-muted-foreground\">Delivery</span><span>Free</span></div>\n <div className=\"flex items-baseline justify-between\"><span>Total</span><span className=\"text-heading tabular-nums\">RM{total.toFixed(2)}</span></div>\n <Button type=\"submit\" variant=\"brand\" className=\"w-full\">Pay RM{total.toFixed(2)}</Button>\n <p className=\"text-center text-xs text-muted-foreground\">You'll be redirected to your bank or payment app.</p>\n </aside>\n </SplitLayout>\n </section>\n );\n}\n\nexport default Checkout01;\n"},{"slug":"thank-you-01","title":"Thank You","category":"Thank you Pages","description":"Confirmation with next steps after a form or purchase.","height":620,"use":"After sign-up, purchase or contact form submit.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/thank-you-01.json","source":"import { CheckIcon, MailIcon, PackageIcon, TruckIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\nimport { IconBadge } from \"@recanica/ui/components/layout\";\n\nconst next = [\n { icon: MailIcon, title: \"Receipt sent\", body: \"To nadia@example.com. Keep it for returns.\" },\n { icon: PackageIcon, title: \"Packing\", body: \"We pack orders within 1 business day.\" },\n { icon: TruckIcon, title: \"Delivery\", body: \"Tracking link by SMS when it ships.\" },\n];\n\nexport function ThankYou01() {\n return (\n <section className=\"flex min-h-[600px] items-center px-gutter py-section-sm\">\n <div className=\"mx-auto w-full max-w-narrow space-y-10 text-center\">\n <div className=\"space-y-4\">\n <IconBadge className=\"mx-auto\"><CheckIcon className=\"size-5\" /></IconBadge>\n <WebSectionTitle as=\"h1\">Thank you, Nadia</WebSectionTitle>\n <p className=\"text-muted-foreground\">Order <span className=\"font-mono text-foreground\">#AC-20431</span> is confirmed. Total paid RM254.00.</p>\n </div>\n <SurfaceGrid as=\"ol\" className=\"text-left sm:grid-cols-3\">\n {next.map((n) => <li key={n.title} className=\"space-y-2 bg-background p-5\"><n.icon className=\"size-4 text-muted-foreground\" /><p className=\"text-sm\">{n.title}</p><p className=\"text-sm text-muted-foreground\">{n.body}</p></li>)}\n </SurfaceGrid>\n <div className=\"flex flex-col justify-center gap-2 sm:flex-row\">\n <Button>Track order</Button>\n <Button variant=\"outline\">Continue shopping</Button>\n </div>\n </div>\n </section>\n );\n}\n\nexport default ThankYou01;\n"},{"slug":"property-01","title":"Property Listings","category":"Property","description":"Property cards with price, beds, baths and area.","height":900,"use":"Real-estate listing index.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/property-01.json","source":"import { BathIcon, BedDoubleIcon, HeartIcon, RulerIcon } from \"lucide-react\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nconst listings = [\n { title: \"Corner unit at Mont Kiara\", place: \"Mont Kiara, Kuala Lumpur\", price: \"RM 1,280,000\", beds: 3, baths: 2, sqft: 1420, tag: \"New\" },\n { title: \"Terrace house near LRT\", place: \"Subang Jaya, Selangor\", price: \"RM 890,000\", beds: 4, baths: 3, sqft: 1800 },\n { title: \"Sea-view apartment\", place: \"Tanjung Tokong, Penang\", price: \"RM 3,200 / month\", beds: 2, baths: 2, sqft: 1050, tag: \"For rent\" },\n { title: \"Heritage shophouse\", place: \"Jonker Walk, Melaka\", price: \"RM 2,450,000\", beds: 5, baths: 4, sqft: 3200 },\n { title: \"Studio near KLCC\", place: \"KLCC, Kuala Lumpur\", price: \"RM 2,100 / month\", beds: 1, baths: 1, sqft: 520, tag: \"For rent\" },\n { title: \"Bungalow with garden\", place: \"Bukit Damansara, KL\", price: \"RM 6,800,000\", beds: 6, baths: 6, sqft: 6200 },\n];\n\n/** `titleAs=\"h1\"` when this section is the top of its page (every page needs one h1). */\nexport function Property01({ titleAs: Title = \"h2\" }: { titleAs?: \"h1\" | \"h2\" }) {\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"flex items-end justify-between gap-4\"><WebSectionTitle as={Title}>Featured properties</WebSectionTitle><p className=\"text-sm text-muted-foreground\">{listings.length} listings</p></div>\n <ul className=\"mt-10 grid gap-6 sm:grid-cols-2 lg:grid-cols-3\">\n {listings.map((l) => (\n <li key={l.title} className=\"overflow-hidden rounded-3xl border bg-card\">\n <div className=\"relative aspect-[4/3] bg-muted\" role=\"img\" aria-label={l.title}>\n {l.tag && <Badge variant=\"secondary\" className=\"absolute top-3 left-3\">{l.tag}</Badge>}\n <Button variant=\"secondary\" size=\"icon-sm\" className=\"absolute top-3 right-3\" aria-label={`Save ${l.title}`}><HeartIcon /></Button>\n </div>\n <div className=\"space-y-3 p-5\">\n <p className=\"text-heading tabular-nums\">{l.price}</p>\n <div><a href=\"/site/property/mont-kiara\" className=\"hover:underline\">{l.title}</a><p className=\"text-sm text-muted-foreground\">{l.place}</p></div>\n <dl className=\"flex gap-4 border-t pt-3 text-sm text-muted-foreground\">\n <div className=\"flex items-center gap-1.5\"><BedDoubleIcon className=\"size-4\" /><dd>{l.beds} <span className=\"sr-only\">bedrooms</span></dd></div>\n <div className=\"flex items-center gap-1.5\"><BathIcon className=\"size-4\" /><dd>{l.baths} <span className=\"sr-only\">bathrooms</span></dd></div>\n <div className=\"flex items-center gap-1.5\"><RulerIcon className=\"size-4\" /><dd>{l.sqft.toLocaleString(\"en-MY\")} sqft</dd></div>\n </dl>\n </div>\n </li>\n ))}\n </ul>\n </div>\n </section>\n );\n}\n\nexport default Property01;\n"},{"slug":"single-property-01","title":"Property Detail","category":"Single Property","description":"Gallery, key facts, description, amenities and enquiry card.","height":1100,"use":"Detail page for one property.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/single-property-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon } from \"lucide-react\";\nimport { Avatar, AvatarFallback } from \"@recanica/ui/components/avatar\";\nimport { Badge } from \"@recanica/ui/components/badge\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Textarea } from \"@recanica/ui/components/textarea\";\nimport { Heading } from \"@recanica/ui/components/page\";\nimport { SurfaceGrid } from \"@recanica/ui/components/surface\";\n\nconst facts = [[\"Price\", \"RM 1,280,000\"], [\"Bedrooms\", \"3\"], [\"Bathrooms\", \"2\"], [\"Built-up\", \"1,420 sqft\"], [\"Tenure\", \"Freehold\"], [\"Furnishing\", \"Partly furnished\"]];\nconst amenities = [\"24-hour security\", \"Swimming pool\", \"Gym\", \"2 car parks\", \"Near international schools\", \"5 min to Publika\"];\n\nexport function SingleProperty01() {\n const [sent, setSent] = React.useState(false);\n return (\n <section className=\"px-gutter py-section-sm\">\n <div className=\"mx-auto max-w-content space-y-8\">\n <div className=\"grid gap-3 md:grid-cols-[2fr_1fr] md:grid-rows-2\">\n <div className=\"aspect-[4/3] rounded-3xl border bg-muted md:row-span-2 md:aspect-auto\" role=\"img\" aria-label=\"Living room\" />\n <div className=\"hidden aspect-[4/3] rounded-3xl border bg-muted md:block\" role=\"img\" aria-label=\"Kitchen\" />\n <div className=\"hidden aspect-[4/3] rounded-3xl border bg-muted md:block\" role=\"img\" aria-label=\"Bedroom\" />\n </div>\n <div className=\"grid gap-10 lg:grid-cols-[1fr_22rem]\">\n <div className=\"space-y-8\">\n <div className=\"space-y-2\">\n <Badge variant=\"outline\">For sale</Badge>\n <Heading level={1}>Corner unit at Mont Kiara</Heading>\n <p className=\"text-muted-foreground\">Jalan Kiara 3, Mont Kiara, 50480 Kuala Lumpur</p>\n </div>\n <SurfaceGrid as=\"dl\" className=\"grid-cols-2 sm:grid-cols-3\">\n {facts.map(([k, v]) => <div key={k} className=\"bg-background p-4\"><dt className=\"text-xs text-muted-foreground\">{k}</dt><dd className=\"mt-1\">{v}</dd></div>)}\n </SurfaceGrid>\n <div className=\"space-y-3\">\n <Heading level={2}>About this home</Heading>\n <p className=\"max-w-copy text-muted-foreground\">A bright corner unit on the 18th floor with windows on two sides. Renovated kitchen, built-in wardrobes and a balcony facing the Kiara hills. Walking distance to cafés and the international school.</p>\n </div>\n <div className=\"space-y-3\">\n <Heading level={2}>Amenities</Heading>\n <ul className=\"grid gap-2 text-sm sm:grid-cols-2\">{amenities.map((a) => <li key={a} className=\"flex items-center gap-2\"><CheckIcon className=\"size-4\" /> {a}</li>)}</ul>\n </div>\n </div>\n <aside className=\"h-fit space-y-5 rounded-3xl border bg-card p-6 lg:sticky lg:top-6\">\n <div className=\"flex items-center gap-3\"><Avatar className=\"size-10\"><AvatarFallback>AK</AvatarFallback></Avatar><div className=\"text-sm\">Aisyah Karim<span className=\"block text-muted-foreground\">REN 31245 · Kiara Realty</span></div></div>\n {sent ? (\n <p className=\"text-sm\">Thanks. Aisyah will contact you within a day.</p>\n ) : (\n <form className=\"grid gap-2\" onSubmit={(e) => { e.preventDefault(); setSent(true); }}>\n <Input required placeholder=\"Name\" aria-label=\"Name\" />\n <Input required type=\"tel\" placeholder=\"Phone\" aria-label=\"Phone\" />\n <Textarea placeholder=\"I'd like to view this unit on…\" aria-label=\"Message\" />\n <Button type=\"submit\">Request a viewing</Button>\n <Button type=\"button\" variant=\"outline\">WhatsApp agent</Button>\n </form>\n )}\n </aside>\n </div>\n </div>\n </section>\n );\n}\n\nexport default SingleProperty01;\n"},{"slug":"login-01","title":"Login · Split","category":"Login pages","description":"Two-column login with brand panel and form.","height":680,"use":"Website sign-in for customer accounts.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/login-01.json","source":"\"use client\";\n\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Checkbox } from \"@recanica/ui/components/checkbox\";\nimport { Field, FieldLabel } from \"@recanica/ui/components/field\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { Label } from \"@recanica/ui/components/label\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nexport function Login01() {\n return (\n <div className=\"grid min-h-svh lg:grid-cols-2\">\n <div className=\"relative hidden flex-col justify-between bg-sidebar p-10 lg:flex\">\n <a href=\"/site\" className=\"flex items-center gap-2\"><span className=\"size-6 rounded-md bg-brand text-brand-foreground\" /><span>Acme</span></a>\n <blockquote className=\"max-w-md space-y-3\">\n <p className=\"text-heading\">“The first billing tool our accountant didn't complain about.”</p>\n <footer className=\"text-sm text-muted-foreground\">Tan Wei Ming, Northwind Trading</footer>\n </blockquote>\n </div>\n <div className=\"flex items-center justify-center px-gutter py-12\">\n <form className=\"w-full max-w-sm space-y-6\" onSubmit={(e) => e.preventDefault()}>\n <div className=\"space-y-1\">\n <Heading level={1}>Sign in</Heading>\n <p className=\"text-sm text-muted-foreground\">New here? <a href=\"/site/coming-soon\" className=\"text-foreground underline-offset-4 hover:underline\">Create an account</a></p>\n </div>\n <Field><FieldLabel htmlFor=\"l-email\">Email</FieldLabel><Input id=\"l-email\" type=\"email\" autoComplete=\"email\" required /></Field>\n <Field>\n <div className=\"flex items-center justify-between\"><FieldLabel htmlFor=\"l-pass\">Password</FieldLabel><a href=\"/site/contact\" className=\"-my-1 py-1 text-sm text-muted-foreground hover:text-foreground\">Forgot password?</a></div>\n <Input id=\"l-pass\" type=\"password\" autoComplete=\"current-password\" required />\n </Field>\n <div className=\"flex items-center gap-2\"><Checkbox id=\"l-remember\" /><Label htmlFor=\"l-remember\" className=\"font-normal\">Keep me signed in</Label></div>\n <Button type=\"submit\" className=\"w-full\">Sign in</Button>\n <Button type=\"button\" variant=\"outline\" className=\"w-full\">Continue with Google</Button>\n </form>\n </div>\n </div>\n );\n}\n\nexport default Login01;\n"},{"slug":"link-page-01","title":"Link in Bio","category":"Link Pages","description":"Profile, short bio and stacked links for social profiles.","height":760,"use":"Single link page for Instagram/TikTok bios.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/link-page-01.json","source":"import { ArrowUpRightIcon, CameraIcon, MailIcon, MessageCircleIcon } from \"lucide-react\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst links = [\n { label: \"Order online (delivery & pickup)\", href: \"/site/shop\" },\n { label: \"This week's menu\", href: \"/site/shop/kopi-ais-blend\" },\n { label: \"Book the back room for events\", href: \"/site/events\" },\n { label: \"Our beans, roasted in Johor\", href: \"/site/about\" },\n { label: \"Find us on Google Maps\", href: \"/site/contact\" },\n];\n\nexport function LinkPage01() {\n return (\n <div className=\"flex min-h-[720px] justify-center bg-sidebar px-gutter py-12\">\n <div className=\"w-full max-w-sm space-y-8 text-center\">\n <div className=\"space-y-3\">\n <div className=\"mx-auto flex size-20 items-center justify-center rounded-full border bg-muted text-xl font-light\" role=\"img\" aria-label=\"Profile photo\">KP</div>\n <Heading level={1} size=\"heading\">Kedai Kopi Pak Mat</Heading>\n <p className=\"text-sm text-muted-foreground\">Kopi, kaya toast and nasi lemak since 1986. Jonker Walk, Melaka. Open 7am–3pm, closed Tuesdays.</p>\n </div>\n <ul className=\"space-y-3\">\n {links.map((l) => (\n <li key={l.label}>\n <a href={l.href} className=\"group flex items-center justify-between rounded-full border bg-background px-5 py-3.5 text-sm transition-colors hover:bg-accent\">\n {l.label}<ArrowUpRightIcon className=\"size-4 text-muted-foreground transition-transform group-hover:translate-x-0.5\" />\n </a>\n </li>\n ))}\n </ul>\n <div className=\"flex justify-center gap-2\">\n {[[CameraIcon, \"Instagram\", \"/site/coming-soon\"], [MessageCircleIcon, \"WhatsApp\", \"/site/contact\"], [MailIcon, \"Email\", \"/site/contact\"]].map(([Icon, label, href]) => {\n const I = Icon as typeof MailIcon;\n return <a key={label as string} href={href as string} aria-label={label as string} className=\"flex size-10 items-center justify-center rounded-full border bg-background hover:bg-accent\"><I className=\"size-4\" /></a>;\n })}\n </div>\n </div>\n </div>\n );\n}\n\nexport default LinkPage01;\n"},{"slug":"coming-soon-01","title":"Coming Soon","category":"Coming soon page","description":"Launch page with countdown and email waitlist.","height":640,"use":"Pre-launch or maintenance page.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/coming-soon-01.json","source":"\"use client\";\n\nimport * as React from \"react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { Input } from \"@recanica/ui/components/input\";\nimport { WebSectionTitle } from \"@recanica/ui/components/web-section\";\n\nexport function ComingSoon01() {\n const [done, setDone] = React.useState(false);\n const [target] = React.useState(() => Date.now() + 18 * 864e5);\n const [now, setNow] = React.useState<number | null>(null);\n React.useEffect(() => { setNow(Date.now()); const t = setInterval(() => setNow(Date.now()), 1000); return () => clearInterval(t); }, []);\n const left = Math.max(0, target - (now ?? target));\n const parts = [[\"days\", Math.floor(left / 864e5)], [\"hours\", Math.floor(left / 36e5) % 24], [\"min\", Math.floor(left / 6e4) % 60], [\"sec\", Math.floor(left / 1e3) % 60]];\n return (\n <div className=\"flex min-h-[640px] items-center justify-center bg-background px-gutter py-12\">\n <div className=\"w-full max-w-lg space-y-8 text-center\">\n <span className=\"mx-auto block size-10 rounded-xl bg-brand text-brand-foreground\" />\n <div className=\"space-y-3\">\n <WebSectionTitle as=\"h1\">Our online shop opens soon</WebSectionTitle>\n <p className=\"text-muted-foreground\">We're photographing 40 products and writing the delivery rules. Leave your email and we'll tell you the day it opens.</p>\n </div>\n <div className=\"flex justify-center gap-3 tabular-nums\">\n {parts.map(([k, v]) => <div key={k as string} className=\"w-16 rounded-xl border bg-panel py-2\"><span className=\"block text-2xl font-light\">{now === null ? \"--\" : String(v).padStart(2, \"0\")}</span><span className=\"text-xs text-muted-foreground\">{k}</span></div>)}\n </div>\n {done ? <p className=\"text-sm\">You're on the list.</p> : (\n <form className=\"mx-auto flex max-w-sm flex-col gap-2 sm:flex-row\" onSubmit={(e) => { e.preventDefault(); setDone(true); }}>\n <Input type=\"email\" required placeholder=\"you@example.com\" aria-label=\"Email\" />\n <Button type=\"submit\" className=\"shrink-0\">Notify me</Button>\n </form>\n )}\n </div>\n </div>\n );\n}\n\nexport default ComingSoon01;\n"},{"slug":"error-01","title":"404 Page","category":"Error pages","description":"Not-found page with search and helpful links.","height":640,"use":"404/500 pages. Always give a way forward.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/error-01.json","source":"import { SearchIcon } from \"lucide-react\";\nimport { Button } from \"@recanica/ui/components/button\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"@recanica/ui/components/input-group\";\nimport { Heading } from \"@recanica/ui/components/page\";\n\nconst links = [[\"Home\", \"Start again from the home page\", \"/site\"], [\"Shop\", \"Products and prices\", \"/site/shop\"], [\"Contact\", \"Ask us directly\", \"/site/contact\"]];\n\nexport function Error01() {\n return (\n <div className=\"flex min-h-[640px] items-center justify-center bg-background px-gutter py-12\">\n <div className=\"w-full max-w-md space-y-8 text-center\">\n <p className=\"text-display-lg font-light text-brand\">404</p>\n <div className=\"space-y-2\">\n <Heading level={1}>We can't find that page</Heading>\n <p className=\"text-muted-foreground\">The link may be old, or the page was moved. Try searching, or go to one of these:</p>\n </div>\n <InputGroup><InputGroupAddon><SearchIcon /></InputGroupAddon><InputGroupInput placeholder=\"Search the site\" aria-label=\"Search the site\" /></InputGroup>\n <ul className=\"divide-y rounded-2xl border text-left\">\n {links.map(([t, d, href]) => <li key={t}><a href={href} className=\"block px-5 py-3 hover:bg-accent/40\"><span className=\"text-sm\">{t}</span><span className=\"block text-xs text-muted-foreground\">{d}</span></a></li>)}\n </ul>\n <Button variant=\"outline\">Report a broken link</Button>\n </div>\n </div>\n );\n}\n\nexport default Error01;\n"},{"slug":"footer-01","title":"Footer","category":"Footers","height":420,"description":"Link columns, legal row.","use":"Bottom of every marketing page.","kind":"web","install":"npx shadcn@latest add https://recanica.aturanica.com/r/footer-01.json","source":"// Every link points to a real page. In your project, replace the hrefs with your own routes and drop any column you don't have pages for.\nconst columns = [\n { title: \"Explore\", links: [[\"Shop\", \"/site/shop\"], [\"Work\", \"/site/work\"], [\"Property\", \"/site/property\"], [\"Events\", \"/site/events\"]] },\n { title: \"Company\", links: [[\"About\", \"/site/about\"], [\"Team\", \"/site/team\"], [\"Careers\", \"/site/careers\"], [\"Blog\", \"/site/blog\"]] },\n { title: \"Support\", links: [[\"Contact\", \"/site/contact\"], [\"Sign in\", \"/site/login\"], [\"Docs\", \"/docs\"]] },\n];\n\nexport function Footer01() {\n return (\n <footer className=\"border-t px-gutter pt-section-sm pb-10\">\n <div className=\"mx-auto max-w-content\">\n <div className=\"grid gap-10 lg:grid-cols-[1.5fr_repeat(3,1fr)]\">\n <div className=\"space-y-3\">\n <a href=\"/\" className=\"flex items-center gap-2\"><span className=\"size-6 rounded-md bg-brand text-brand-foreground\" /><span className=\"font-medium\">Aturanica</span></a>\n <p className=\"max-w-xs text-sm text-muted-foreground\">Billing infrastructure for software businesses.</p>\n </div>\n <div className=\"grid grid-cols-2 gap-8 sm:grid-cols-3 lg:col-span-3\">\n {columns.map((c) => (\n <div key={c.title} className=\"space-y-3 text-sm\">\n <p>{c.title}</p>\n <ul className=\"space-y-2 text-muted-foreground\">\n {c.links.map(([label, href]) => <li key={href}><a href={href} className=\"whitespace-nowrap transition-colors hover:text-foreground\">{label}</a></li>)}\n </ul>\n </div>\n ))}\n </div>\n </div>\n <div className=\"mt-14 flex flex-col gap-2 border-t pt-6 text-sm text-muted-foreground sm:flex-row sm:justify-between\">\n <p>© {new Date().getFullYear()} Aturanica Labs · Kuala Lumpur, Malaysia</p>\n <p>Built with Recanica</p>\n </div>\n </div>\n </footer>\n );\n}\n\nexport default Footer01;\n"}],"appLibrary":[{"category":"Authentication","description":"Sign in, sign up, verify code, forgot password.","items":[{"label":"Sign in","href":"/docs/patterns/sign-in","kind":"pattern"},{"label":"Verify code","href":"/docs/patterns/verify-code","kind":"pattern"},{"label":"Demo sign-in","href":"/demo/sign-in","kind":"demo"},{"label":"Login · split (web)","href":"/docs/web/login-01","kind":"web"}]},{"category":"Onboarding","description":"First-run checklist and setup steps.","items":[{"label":"Onboarding steps","href":"/docs/patterns/onboarding-steps","kind":"pattern"}]},{"category":"Overview / home","description":"KPIs, activity and what needs attention.","items":[{"label":"Overview","href":"/demo/app","kind":"demo"},{"label":"Stat overview","href":"/docs/patterns/stat-overview","kind":"pattern"}]},{"category":"Analytics & reports","description":"Charts over time, breakdowns, export.","items":[{"label":"Reports","href":"/demo/app/reports","kind":"demo"},{"label":"Chart","href":"/docs/components/chart","kind":"component"}]},{"category":"Lists & tables","description":"Search, filter, sort, bulk actions, pagination.","items":[{"label":"Orders","href":"/demo/app/sales","kind":"demo"},{"label":"Customers","href":"/demo/app/customers","kind":"demo"},{"label":"Data table","href":"/docs/patterns/data-table","kind":"pattern"}]},{"category":"Record detail","description":"One customer, order, product or invoice with related data.","items":[{"label":"Customer","href":"/demo/app/customers/cus_3","kind":"demo"},{"label":"Product","href":"/demo/app/products/prod_pro_m","kind":"demo"},{"label":"Invoice","href":"/demo/app/invoices/inv_2","kind":"demo"}]},{"category":"Create & edit forms","description":"Multi-section forms with validation and save bar.","items":[{"label":"New product","href":"/demo/app/products/new","kind":"demo"},{"label":"New invoice","href":"/demo/app/invoices/new","kind":"demo"},{"label":"Create form","href":"/docs/patterns/create-form","kind":"pattern"}]},{"category":"List / detail","description":"Master list beside a detail pane.","items":[{"label":"Checkout links","href":"/demo/app/links","kind":"demo"},{"label":"List / detail","href":"/docs/patterns/list-detail","kind":"pattern"}]},{"category":"Billing & payments","description":"Balance, payouts, plans, invoices.","items":[{"label":"Finance","href":"/demo/app/finance","kind":"demo"},{"label":"Invoices","href":"/demo/app/invoices","kind":"demo"},{"label":"Plan comparison","href":"/docs/patterns/pricing-table","kind":"pattern"}]},{"category":"Settings","description":"Organization profile, preferences, danger zone.","items":[{"label":"Settings","href":"/demo/app/settings","kind":"demo"},{"label":"Settings page","href":"/docs/patterns/settings-page","kind":"pattern"},{"label":"Danger zone","href":"/docs/patterns/danger-zone","kind":"pattern"}]},{"category":"Team & roles","description":"Members, invites, role permissions.","items":[{"label":"Team","href":"/demo/app/team","kind":"demo"}]},{"category":"Notifications","description":"Inbox with unread state and filters.","items":[{"label":"Notifications","href":"/demo/app/notifications","kind":"demo"},{"label":"Notifications popover","href":"/docs/patterns/notifications","kind":"pattern"}]},{"category":"Audit log","description":"Who changed what, when, from where.","items":[{"label":"Audit log","href":"/demo/app/audit","kind":"demo"},{"label":"Activity feed","href":"/docs/patterns/activity-feed","kind":"pattern"}]},{"category":"Developers","description":"API keys and webhooks.","items":[{"label":"Developers","href":"/demo/app/developers","kind":"demo"}]},{"category":"Integrations","description":"Connect third-party apps.","items":[{"label":"Integrations","href":"/demo/app/integrations","kind":"demo"}]},{"category":"Tasks / kanban","description":"Columns, drag and drop, assignees.","items":[{"label":"Tasks","href":"/demo/app/tasks","kind":"demo"}]},{"category":"Calendar","description":"Due dates, renewals, schedules.","items":[{"label":"Calendar","href":"/demo/app/calendar","kind":"demo"},{"label":"Calendar component","href":"/docs/components/calendar","kind":"component"}]},{"category":"Files","description":"Folders, uploads, file actions.","items":[{"label":"Files","href":"/demo/app/files","kind":"demo"},{"label":"File upload","href":"/docs/patterns/file-upload","kind":"pattern"}]},{"category":"Support & help","description":"Tickets and conversation threads.","items":[{"label":"Support","href":"/demo/app/support","kind":"demo"}]},{"category":"Search","description":"Global search and quick actions.","items":[{"label":"Command menu (⌘K in the demo)","href":"/docs/patterns/command-menu","kind":"pattern"}]},{"category":"Empty, error & loading states","description":"First run, no results, failure, not found.","items":[{"label":"Empty states","href":"/docs/patterns/empty-states","kind":"pattern"},{"label":"404 page","href":"/docs/web/error-01","kind":"web"},{"label":"Skeleton","href":"/docs/components/skeleton","kind":"component"}]},{"category":"Customer portal","description":"What your customers see: invoices, subscriptions, downloads.","items":[{"label":"Customer portal","href":"/demo/portal","kind":"demo"},{"label":"Pay invoice","href":"/demo/pay/inv_2","kind":"demo"},{"label":"Checkout","href":"/demo/checkout/lnk_bf","kind":"demo"}]},{"category":"App shell","description":"Sidebar, inset panel, mobile sheet.","items":[{"label":"App sidebar","href":"/docs/patterns/app-sidebar","kind":"pattern"},{"label":"Dashboard shell","href":"/docs/blocks/dashboard-shell-01","kind":"block"}]}],"webRecipes":[{"page":"SaaS / product landing page","sections":["navbar-01","hero-02","logo-cloud-01","intro-01","features-01","content-01","bento-02","testimonial-02","pricing-01","faq-01","cta-01","footer-01"],"notes":"One primary CTA repeated in hero, pricing and final CTA. Real customer logos and numbers only."},{"page":"Lead-generation landing page","sections":["navbar-01","hero-03","logo-cloud-01","process-01","testimonials-01","faq-01","cta-02","footer-01"],"notes":"Email capture above the fold; keep navigation minimal."},{"page":"About page","sections":["navbar-01","intro-01","timeline-01","team-01","gallery-01","career-01","footer-01"],"notes":"Specific history and real people. No mission-statement filler."},{"page":"Blog index","sections":["navbar-01","blog-01","cta-02","footer-01"],"notes":""},{"page":"Blog post","sections":["navbar-01","post-hero-01","single-post-01","cta-02","footer-01"],"notes":"Max 70ch line length; table of contents for posts over ~800 words."},{"page":"Shop / catalogue","sections":["banner-01","navbar-01","category-filters-01","products-01","footer-01"],"notes":"Filters become a sheet below lg."},{"page":"Product page","sections":["navbar-01","single-product-01","testimonials-01","products-01","footer-01"],"notes":"Price, variants and add-to-cart visible without scrolling on desktop."},{"page":"Cart → checkout → thank you","sections":["cart-01","checkout-01","thank-you-01"],"notes":"Show totals incl. SST and delivery before payment; FPX, DuitNow, card."},{"page":"Portfolio / agency","sections":["navbar-01","hero-01","portfolio-01","testimonials-01","contact-01","footer-01"],"notes":""},{"page":"Case study","sections":["navbar-01","single-portfolio-01","testimonial-02","cta-01","footer-01"],"notes":"Problem, approach, measurable results."},{"page":"Property listings","sections":["navbar-01","category-filters-01","property-01","footer-01"],"notes":"Price, beds, baths, built-up and location on every card."},{"page":"Property detail","sections":["navbar-01","single-property-01","property-01","footer-01"],"notes":"Agent card with REN number and WhatsApp."},{"page":"Events","sections":["navbar-01","event-01","cta-02","footer-01"],"notes":""},{"page":"Event detail","sections":["navbar-01","single-event-01","footer-01"],"notes":"Date, venue, seats left and registration in a sticky card."},{"page":"Careers","sections":["navbar-01","career-01","gallery-01","footer-01"],"notes":"Salary range and location per role where possible."},{"page":"Contact","sections":["navbar-01","contact-01","faq-01","footer-01"],"notes":"State reply time; offer WhatsApp in Malaysia."},{"page":"Login","sections":["login-01"],"notes":""},{"page":"Link in bio","sections":["link-page-01"],"notes":""},{"page":"Coming soon / maintenance","sections":["coming-soon-01"],"notes":""},{"page":"404 / error","sections":["error-01"],"notes":"Always offer search and 2–3 useful links."}],"anatomy":{"$description":"How a Recanica page is built: for each page type, its regions in reading order and the part that fills each region. Single source for the docs (/docs/page-anatomy), the recanica-page skill and AI tools. A page that needs a region not listed here needs a brief, and maybe a new part.","thinking":["1. Purpose: what is the page for, who arrives, what's the one main action.","2. Page type: pick the closest type below. It fixes the shell and the region order.","3. Regions: fill each region with its part, in order. Skip regions the page doesn't need; don't invent new ones.","4. Content: put real content in each part (longest and shortest cases).","5. Look: render at 375px and 1280px; check reader order, shared edges, one primary action.","6. Measure: recanica review (85+), audit (0 must-fix), check (0 must-fix)."],"types":[{"type":"App overview","example":"/demo/app","use":"Daily landing page of an app: status at a glance, what needs attention.","shell":"AppShell > AppSidebar + AppPanel > Page width=\"content\"","regions":[{"region":"Header","part":"PageHeader","note":"Title, one-line description, at most one primary action"},{"region":"Key numbers","part":"StatGroup + Stat","note":"3–4 stats in one surface, hairline dividers"},{"region":"Trends","part":"Section + Card/Surface + Chart or BarRow","note":"One chart per question"},{"region":"Recent activity","part":"Section + Surface + ListRow (divide-y)","note":"5–8 rows, 'View all' link in the section actions"}]},{"type":"App list (index)","example":"/demo/app/invoices","use":"Find, filter and act on many items.","shell":"AppShell > AppPanel > Page width=\"content\"","regions":[{"region":"Header","part":"PageHeader","note":"Create action in actions"},{"region":"Summary (optional)","part":"StatGroup","note":"Only numbers that change what you do next"},{"region":"Filters","part":"Tabs or ToggleGroup + InputGroup (search)","note":"One row; wraps as a group"},{"region":"Items","part":"Surface + Table (or ListRow on phones)","note":"4–6 columns; hide secondary columns below md; never hide the last"},{"region":"Empty","part":"Empty","note":"What appears here, one action"}]},{"type":"App detail","example":"/demo/app/invoices/inv_2","use":"One record: its state, its facts, what you can do with it.","shell":"AppShell > AppPanel > Page width=\"content\"","regions":[{"region":"Header","part":"PageHeader (back link, status Badge, actions)","note":"Primary action for the record's next step"},{"region":"Body + side facts","part":"SplitLayout","note":"Main content left; key facts and secondary actions in the aside"},{"region":"Sections","part":"Section + Surface / ReferenceTable","note":"One section per question the reader asks"},{"region":"Danger zone","part":"Section + Surface (destructive Button)","note":"Last, if any"}]},{"type":"Create / edit form","example":"/demo/app/invoices/new","use":"Enter or change one thing, then save.","shell":"AppShell > AppPanel > Page width=\"reading\"","regions":[{"region":"Header","part":"PageHeader (back link)","note":"No actions here; the save is at the end"},{"region":"Field groups","part":"Section + Field / FieldGroup","note":"One column; 10+ fields → titled sections or steps"},{"region":"Actions","part":"Button (primary) + Button variant=\"ghost\"","note":"Verb that says what happens: 'Send invoice'"}]},{"type":"Settings","example":"/demo/app/settings","use":"Change how the account behaves, a group at a time.","shell":"AppShell > AppPanel > Page width=\"content\"","regions":[{"region":"Header","part":"PageHeader","note":""},{"region":"Groups","part":"Section per group (title + description left, fields right on desktop)","note":"Each group saves on its own"},{"region":"Danger zone","part":"Section + Surface","note":"Last"}]},{"type":"Sign-in / single task","example":"/demo/sign-in","use":"One focused task with nothing around it.","shell":"CenteredPage","regions":[{"region":"Mark","part":"Logo or IconBadge","note":""},{"region":"Task","part":"Heading + Field + Button","note":"One column, ~22rem wide"},{"region":"Way out","part":"Button variant=\"link\" size=\"inline\"","note":"Back, help, or sign up"}]},{"type":"Cart / checkout","example":"/site/shop/checkout","use":"Review and pay, with the total always visible.","shell":"WebSection size=\"compact\" > SplitLayout","regions":[{"region":"Steps or items","part":"Section + Field / ChoiceCard / ListRow","note":"Left column"},{"region":"Summary","part":"Surface (sticky aside) + primary Button","note":"Total and the one action"}]},{"type":"Marketing landing","example":"/site","use":"Explain one product to someone deciding.","shell":"TopBar (Navbar) + sections + Footer","regions":[{"region":"Hero","part":"Hero01/02/03 (WebHeroTitle)","note":"One promise, one primary action"},{"region":"Proof","part":"Logo cloud or Stats (SurfaceGrid)","note":""},{"region":"How it works / features","part":"WebSection + Content/Features/Bento sections","note":"3–6 points"},{"region":"Pricing","part":"Pricing01","note":""},{"region":"Questions","part":"Faq01","note":""},{"region":"Final call","part":"Cta01/Cta02","note":"Same action as the hero"}]},{"type":"Article / content","example":"/site/blog/e-invoice-2026","use":"Read one piece end to end.","shell":"Page width=\"reading\"","regions":[{"region":"Header","part":"PostHero01 (title, meta)","note":""},{"region":"Body","part":"Prose in .flow","note":"~65ch lines"},{"region":"Next","part":"Blog01 (related) or Cta02","note":""}]},{"type":"Docs / reference","example":"/docs/design-language","use":"Look things up; scan, then read one part.","shell":"TopBar + docs nav + Page width=\"reading\" + table of contents","regions":[{"region":"Header","part":"PageHeader","note":"No eyebrow; the nav shows where you are"},{"region":"Overview","part":"Surface + ListRow list, or ReferenceTable","note":"Scannable in seconds"},{"region":"Detail","part":"Heading + paragraphs + ReferenceTable / CodeBlock","note":"Main content in foreground"},{"region":"Next","part":"Pager","note":""}]}]},"parts":[{"part":"Page column (rhythm + width)","react":"Page","file":"page","css":"rc-flow"},{"part":"Reading width","react":"Page width=\"reading\"","file":"page","css":"rc-reading"},{"part":"Page header","react":"PageHeader","file":"page","css":"rc-page-header"},{"part":"Section","react":"Section","file":"page","css":"rc-section"},{"part":"Heading","react":"Heading","file":"page","css":"rc-section__title"},{"part":"Stack","react":"Stack","file":"page","css":"rc-stack"},{"part":"Reference table","react":"ReferenceTable","file":"page","css":"rc-table"},{"part":"Surface (bordered box)","react":"Surface","file":"surface","css":"rc-surface"},{"part":"Surface grid (hairline cells)","react":"SurfaceGrid","file":"surface","css":"rc-surface-grid"},{"part":"Choice card","react":"ChoiceCard","file":"choice-card","css":"rc-choice"},{"part":"Nav item","react":"NavItem","file":"nav-item","css":"rc-nav-item"},{"part":"List row","react":"ListRow","file":"layout","css":"rc-list-row"},{"part":"Centered page","react":"CenteredPage","file":"layout","css":"rc-centered-page"},{"part":"Split layout (main + aside)","react":"SplitLayout","file":"layout","css":"rc-split"},{"part":"Top bar","react":"TopBar","file":"layout","css":"rc-top-bar"},{"part":"Icon badge","react":"IconBadge","file":"layout","css":"rc-icon-badge"},{"part":"App shell","react":"AppShell","file":"app-shell","css":"rc-shell"},{"part":"App sidebar","react":"AppSidebar","file":"app-shell","css":"rc-sidebar"},{"part":"App sidebar header","react":"AppSidebarHeader","file":"app-shell","css":"rc-sidebar__header"},{"part":"App sidebar sub-list","react":"AppSidebarSub","file":"app-shell","css":"rc-sidebar__sub"},{"part":"App panel","react":"AppPanel","file":"app-shell","css":"rc-panel"},{"part":"Web section","react":"WebSection","file":"web-section","css":"rc-web-section"},{"part":"Web section title","react":"WebSectionTitle","file":"web-section","css":"rc-section-title"},{"part":"Hero title","react":"WebHeroTitle","file":"web-section","css":"rc-hero-title"},{"part":"Button","react":"Button","file":"button","css":"rc-btn"},{"part":"Badge","react":"Badge","file":"badge","css":"rc-badge"},{"part":"Input","react":"Input","file":"input","css":"rc-input"},{"part":"Card","react":"Card","file":"card","css":"rc-card"},{"part":"Stat group","react":"StatGroup","file":"stat","css":"rc-stats"},{"part":"Bar row","react":"BarRow","file":"stat","css":"rc-bar-row"}],"kickoff":[{"id":"team","group":"You","q":"Who's building this?","why":"So we only ask what matters for how you work.","type":"choice","options":[{"value":"solo","label":"Just me, with AI helping"},{"value":"small","label":"Me and a few other people"},{"value":"team","label":"A bigger team"},{"value":"guest","label":"I'm doing the design part of someone else's project"}],"default":"solo"},{"id":"name","group":"The project","q":"What's the project called?","why":"Used as the title of the project notes.","type":"text","default":""},{"id":"purpose","group":"The project","q":"What is it, and who is it for? One sentence is enough.","why":"Every page is written for this person.","type":"text","example":"A booking app for clinic patients in the Klang Valley.","default":""},{"id":"surfaces","group":"The project","q":"What are you making? Pick all that apply.","why":"Each kind has its own building blocks and checks.","type":"multi","options":[{"value":"app","label":"A web app people log into"},{"value":"site","label":"A website"},{"value":"mobile","label":"A phone app"},{"value":"docs","label":"Help pages or documentation"},{"value":"email","label":"Emails"},{"value":"marketing assets","label":"Ads, social posts or slides"}],"default":["app"]},{"id":"locale","group":"The project","q":"Where are most of the people who'll use it?","why":"Money, dates and sample names follow it.","type":"choice","options":[{"value":"en-MY","label":"Malaysia, in English"},{"value":"ms-MY","label":"Malaysia, in Bahasa Melayu"},{"value":"en-SG","label":"Singapore"},{"value":"id-ID","label":"Indonesia"},{"value":"","label":"Somewhere else (type the country and language)","free":true}],"default":"en-MY"},{"id":"owns","group":"Your part","q":"Which parts of the project are yours to change?","why":"Recanica only enforces its rules in your part. Elsewhere it gives advice.","type":"list","askIf":"they're doing the design part of someone else's project","options":[{"value":["src/components/**","src/styles/**"],"label":"The screens' building blocks and the styling"},{"value":["src/**"],"label":"Everything on screen, but not the server side"},{"value":null,"label":"I'll name the folders","free":true}],"default":["src/components/**","src/styles/**"]},{"id":"approver","group":"Your part","q":"Who do you ask before changing anything outside your part?","why":"Suggestions for their code go to them instead of being changed.","type":"text","askIf":"they're doing the design part of someone else's project","options":[{"value":"the tech lead","label":"The project's tech lead"},{"value":"the client","label":"The client"},{"value":"","label":"Someone else (type their name)","free":true}],"default":"the tech lead"},{"id":"stack","group":"How it's built","q":"What is it being built with?","why":"If it isn't decided, we start in a way that works with anything later.","type":"choice","options":[{"value":"detected","label":"What's already in the project (Recanica found it)"},{"value":"nextjs","label":"Next.js"},{"value":"vite-react","label":"React with Vite"},{"value":"react-other","label":"Another React setup"},{"value":"vue","label":"Vue or Nuxt"},{"value":"svelte","label":"Svelte"},{"value":"astro","label":"Astro"},{"value":"angular","label":"Angular"},{"value":"html","label":"Plain HTML, WordPress, Laravel or similar"},{"value":"tailwind-v3","label":"An older Tailwind (version 3) setup"},{"value":"flutter","label":"Flutter"},{"value":"swiftui","label":"iPhone app (SwiftUI)"},{"value":"compose","label":"Android app (Jetpack Compose)"},{"value":"unknown","label":"Not decided yet"}],"default":"detected"},{"id":"flexibility","group":"How strict","q":"How strict should Recanica be?","why":"Colours and type stay fixed either way. This is about how much freedom pages get.","type":"choice","options":[{"value":"guided","label":"Balanced (recommended): the basics are enforced; small exceptions are fine with a reason"},{"value":"locked","label":"Very strict: every exception needs a written reason. Good for big teams."},{"value":"open","label":"Relaxed: for campaign or one-off creative pages. Layout is free."}],"default":"guided"},{"id":"openZones","group":"How strict","q":"Is there a part that should be more relaxed than the rest, like campaign pages?","why":"That part can be art-directed while the rest stays consistent.","type":"list","askIf":"more than one person is building it","options":[{"value":[],"label":"No"},{"value":null,"label":"Yes (name the folder, e.g. src/campaigns)","free":true}],"default":[]},{"id":"brand","group":"How strict","q":"Do you have a brand colour and font yet?","why":"The brand colour is the one colour meant to change.","type":"text","options":[{"value":"later","label":"Not yet, use the defaults for now"},{"value":"","label":"Yes (type the colour code and the font)","free":true}],"default":"later"},{"id":"reviewTarget","group":"When it's done","q":"How polished must a page be before it counts as done?","why":"Recanica scores each page; this is the bar.","type":"number","options":[{"value":85,"label":"Polished (recommended)"},{"value":75,"label":"Good enough for a first version"},{"value":95,"label":"Very polished"}],"default":85},{"id":"reviewer","group":"When it's done","q":"Who checks a page before it counts as finished?","why":"The automatic checks catch broken rules. A person judges whether it feels right.","type":"text","options":[{"value":"me","label":"Me"},{"value":"the client","label":"The client"},{"value":"","label":"Someone else (type their name)","free":true},{"value":"nobody","label":"Nobody for now, just the automatic checks"}],"default":"me"},{"id":"references","group":"When it's done","q":"Any apps or websites you like the look of, and any you don't?","why":"Knowing why you like them helps every new page.","type":"text","options":[{"value":"later","label":"Later"},{"value":"","label":"Yes (name them, with a few words on why)","free":true}],"default":"later"},{"id":"scale","group":"When it's done","q":"Roughly how big will it be?","why":"A small project can rely on checking each page; a big one needs templates.","type":"text","options":[{"value":"small: up to 10 pages or screens","label":"Small: up to 10 pages or screens"},{"value":"medium: 10 to 50 pages or screens","label":"Medium: 10 to 50"},{"value":"large: more than 50 pages or screens","label":"Large: more than 50"}],"default":""}],"kickoffHowToAsk":"How to ask (for AI agents):\n- Ask in these exact words, one group at a time, and offer exactly these options. Use your multiple-choice tool where you have one.\n- Never invent options, people, teams or roles. Don't guess names from the codebase or git history.\n- \"(type …)\" options mean the person types their own answer.\n- Skip a question whose \"ask only if\" doesn't hold. Never answer for the person.\n- Save the answers as JSON keyed by id (use the option's value), then run `npx recanica kickoff --answers <file>`.","copyRules":[["\\bseamless(ly)?\\b","i","“seamless”: say what actually happens","error"],["\\bunlock(s|ing)?\\b","i","“unlock”: name the concrete benefit","error"],["\\belevate(s|d)?\\b","i","“elevate”: vague; say what improves","error"],["\\bleverag(e|es|ing)\\b","i","“leverage”: use “use”","error"],["\\bempower(s|ing)?\\b","i","“empower”: say what people can do","error"],["\\beffortless(ly)?\\b","i","“effortless”: claims, not facts","error"],["\\bcutting[- ]edge\\b|\\bstate[- ]of[- ]the[- ]art\\b|\\bbest[- ]in[- ]class\\b|\\bworld[- ]class\\b|\\bnext[- ]level\\b","i","superlative filler","error"],["\\bgame[- ]chang","i","“game-changer”: filler","error"],["\\brevolutioni[sz]","i","“revolutionize”: filler","error"],["\\bsupercharg","i","“supercharge”: filler","error"],["\\bstreamlin(e|ed|es|ing)\\b","i","“streamline”: say what gets faster or shorter","error"],["\\bdelve\\b|\\btapestry\\b|\\bembark\\b|\\bsynerg","i","LLM tell-tale word","error"],["\\bin today'?s (fast[- ]paced|digital|ever)","i","“in today's … world” opener","error"],["\\bever[- ]evolving\\b|\\bdigital landscape\\b","i","cliché","error"],["\\bwhether you'?re\\b","i","“whether you're X or Y”: pick the actual audience","error"],["\\b(it'?s )?not just (a|an|another)\\b","i","“not just X, it's Y” construction","error"],["\\bsay goodbye to\\b|\\blook no further\\b|\\bat your fingertips\\b|\\btake .{1,20} to the next level\\b","i","ad cliché","error"],["\\blorem ipsum\\b|\\breplace this with\\b|\\byour (value proposition|tagline) here\\b","i","placeholder copy left in","error"],["\\bbuilt for the way you\\b|\\bon autopilot\\b|\\bexplains itself\\b|\\bevery (number|detail) that matters\\b","i","cliché found in the 2026-11 audit","error"],["\\bin (minutes|seconds|days), not (hours|days|weeks|months)\\b","i","“in X, not Y” rhythm: state the fact once","error"],["\\bactually wants?\\b|\\bthat never happens\\b","i","filler intensifier","error"],["\\bunleash(es|ing)?\\b|\\bharness(es|ing)? the power\\b|\\bthe power of\\b","i","“unleash / harness the power of”: name what it does","error"],["\\bnavigat(e|ing) the (complexit|world|landscape)","i","“navigate the complexities”: LLM tell","error"],["\\ba testament to\\b|\\bin the realm of\\b|\\bbeacon of\\b|\\bbustling\\b|\\bever[- ]changing\\b","i","LLM tell-tale phrase","error"],["\\bit'?s (important|worth) (to note|noting)\\b|\\bin conclusion\\b|\\bI hope this helps\\b|\\bas an AI\\b|\\bgreat question\\b","i","assistant voice left in the copy","error"],["\\bnext[- ]gen(eration)?\\b|\\bexperience the (future|power|difference)\\b","i","hype phrase","error"],["(?<![-\\w])click here\\b","i","“click here”: the link text should say where it goes","error"],["\\btransformative\\b|\\breimagin(e|ed|ing)\\b|\\bredefin(e|es|ing)\\b","i","hype verb: say what changed","warn"],["\\bmeticulous(ly)?\\b|\\bcrafted\\b|\\bcurated\\b|\\bpivotal\\b|\\bfoster(s|ing)?\\b|\\bvibrant\\b","i","LLM-flavoured adjective: use a plain word or a fact","warn"],["\\b(deep[- ])?dive (in|into)\\b|\\blet'?s dive\\b","i","“dive into”: filler","warn"],["\\beverything you need\\b|\\ball-in-one\\b|\\bone[- ]stop\\b","i","catch-all claim: list the two or three things","warn"],["\\b(John|Jane) (Doe|Smith)\\b|\\bexample@example\\.com\\b","i","placeholder sample data: use realistic, local names","warn"],["\\brobust\\b","i","“robust”: say what it survives","warn"],["\\binnovative\\b|\\bunparalleled\\b|\\bholistic\\b","i","self-praise","warn"],["\\bAI[- ]powered\\b|\\bmagic(al)?\\b","i","hype; describe the result","warn"],["\\bboost\\b|\\bskyrocket\\b","i","growth-hack verb; give a number","warn"],["\\bjourney\\b","i","“journey”: usually filler","warn"],[" — .* — ","","two em dashes in one line: tell-tale rhythm; split the sentence","warn"],["\\bwelcome to (our|the|your) (platform|app|website|dashboard|site)\\b|\\bwe(?:'re| are) (excited|thrilled|delighted) to\\b","i","throat-clearing opener: start with what the reader came for","error"],["<title>\\s*Vite \\+ React|>\\s*Vite \\+ React\\s*<|\\bget started by editing\\b|\\[insert [^\\]]*\\]","i","scaffold or placeholder text left in","error"],["\\bAcme( Inc| Corp)?\\b|\\bTechCorp\\b|\\(555\\) ?\\d{3}|\\b555-\\d{4}\\b|\\btest@example\\.com\\b","","placeholder company or contact: use realistic local data","warn"],["\\b[\\d.,]+[kKmM]?\\+ (happy |satisfied |active )?(users|customers|teams|companies|developers|businesses)\\b|\\b100% (satisfaction|secure|uptime)\\b|\\b99\\.9+% uptime\\b","i","round-number proof: a real number with its source, or nothing","warn"],["(?<![\\w-])(learn more|read more|try (it )?now)(?![\\w-])","i","vague button: name the action (See pricing, Create invoice)","warn"]],"skills":{"recanica-kickoff":{"SKILL.md":"---\nname: recanica-kickoff\ndescription: Use at the start of any new project, design system, or major redesign that uses Recanica — before the first page is built. Runs the start-of-project questions with the person, in plain words with fixed options (who's building it, what it is, how it's built, how strict, when a page is done), records it with `npx recanica kickoff` (config, docs/ui/KICKOFF.md, the first entries of the decision log), then settles which shared parts exist before any page. Trigger on \"new project\", \"start a project\", \"set up the design system\", \"kickoff\", \"redesign the whole app\".\n---\n\n# Recanica kickoff\n\nProjects drift into inconsistency when the look is defined but the *decisions* aren't: every page then re-decides spacing,\nheaders, sections and emphasis, and every re-decision is a new chance for the same mistake. This skill makes those decisions\nonce, at the start, with the human, and turns them into config, a decision log and shared parts before any page exists.\n\n## 1. Ask the start-of-project questions (required, before any page)\n\n1. Get them: `npx recanica kickoff --questions` (or MCP `get_kickoff_questions`). Each has plain wording, a one-line why and fixed options.\n2. Ask **in those exact words**, one group at a time, starting with \"Who's building this?\". Offer **exactly the options given**,\n using your multiple-choice tool where you have one. Skip a question whose \"ask only if\" doesn't hold:\n someone building alone isn't asked about approvers or relaxed areas.\n3. **Never invent options, people, teams or roles**, and never guess names from the codebase, git history or the client's\n name. If an option says \"type …\", the person types it. Never answer for the person.\n4. Don't add jargon to the questions (globs, tokens, flexibility, owner/guest). The words are written for someone who isn't a developer.\n5. If the person isn't available, use the defaults, list the ids you assumed under `\"_assumed\"` in the answers, and say so in\n the first line of your reply. Assumed answers are marked in KICKOFF.md until someone confirms them.\n6. Save the answers as JSON keyed by question id, using each option's value (e.g. `kickoff-answers.json`, not committed), and run\n `npx recanica kickoff --answers kickoff-answers.json`.\n\nThat writes:\n- `recanica.config.json`: `project` (who's building it, role, how strict, stack, surfaces), `scope` when it's someone else's project, `zones` for relaxed areas.\n- `docs/ui/KICKOFF.md`: the answers, readable.\n- `docs/ui/DECISIONS.md`: D-001… for role, how strict and stack. Re-running with a changed answer supersedes the old entry.\n- `docs/ui/PROPOSALS.md` when it's someone else's project.\n\nBehind the plain answers:\n- **\"I'm doing the design part of someone else's project\"** makes the project a *guest*: Recanica's checks only block inside the\n folders they named; elsewhere you propose instead of changing.\n- **\"Not decided yet\"** for the stack is a good answer. Don't default to Next.js because it has the most examples: it means\n CSS-first (see docs/STACKS.md), which carries over to any stack.\n- **How strict:** Balanced = guided, Very strict = locked (suggested for a bigger team), Relaxed = open. Colours and type are\n fixed in every mode.\n- **Who checks a page:** \"Me\" is the right answer for someone building alone with AI: the AI builds, the person judges.\n\n## 2. Then set up the shared parts (rules, not questions)\n\nEverything after the questionnaire is how a design system works, not a choice for the person. **Don't turn any of it into a\nquestion or a pick-list.** Apply it, record it with `npx recanica decisions new`, and tell the person what you did.\n\n### Everything is a shared part\n\nA design system is decisions made once and reused:\n- Pages are built only from shared parts. **Anything that appears twice** (on two pages, or twice on one page) **is a shared\n part.** There is no list to choose from and nothing is left out: a status chip, a filters bar, a record header, a timeline,\n a member card are all parts the moment they repeat.\n- Before the first page, list every repeated thing you can see (from the purpose, the page list, existing screens and\n mockups) and build each one as a shared part on top of Recanica's parts (React and its `rc-*` twin). Record the list as one\n decision: `npx recanica decisions new --title \"Shared parts\"`.\n- Show the person the list as information, not a choice: \"These repeat, so they're shared parts: …\". Ask only when you\n can't tell whether two things are the same thing (is a member card the same part as an invoice card?).\n- A repeat found later becomes a part then, and every copy is replaced with it. A missing part is added to the system,\n never improvised on a page.\n- `recanica check` enforces this from day one (`hand-built` and `structure` are must; repeated class strings are reported).\n\n### The parts every project has\n\nBuilt before the first page (React names shown; other stacks use the `rc-*` twins from `packages/ui/parts.json`):\n- **Rhythm by role** (tokens): inset · group · flow · stack · section.\n- **Page structure**: page column (`Page`), header (`PageHeader`), sections (`Section`, `Heading`), stacks (`Stack`).\n- **Sites**: section shell (`WebSection`), section title (`WebSectionTitle`), hero headline (`WebHeroTitle`).\n- **Tables**: data table and reference table, with what each column holds decided by the author (`keys=\"label\" | \"code\"`).\n- **Emphasis by role**: main content in foreground, supporting text muted.\n- **Width per column**: reading, content or full.\n\n### What content will each part hold?\n\nFor every shared part, list its content extremes: shortest and longest text, single words, prose vs code/IDs, numbers\n(and the largest), empty, 1 vs 1,000 items, other languages. These decide the part's defaults and become its stress tests\n(component QA at 240px, 400px and full width).\n\n### What does \"right\" look like?\n\nThe kickoff already asked for apps or websites the person likes and doesn't. If they said \"later\", ask that one question\nagain before the first page (it's theirs to answer), and add the answer to `docs/ui/KICKOFF.md`. The \"why\" is what transfers.\n\n### What happens when a bug is found?\n\nDefault, agreed up front:\n1. Name the *class* of problem, not just the instance.\n2. Fix it in the shared part or token, never on one page.\n3. Add a permanent test (component QA content case or audit rule) that fails on the old behaviour.\n4. Record it as a trap: `npx recanica decisions new --trap --title \"<class of mistake>\"`, with Seen as, Cause, Decision and a\n mechanical guard (`rule:`, `pattern:/…/ in <glob>` or `test:`). A pattern guard makes `recanica check` fail if it comes back.\n\n## 3. Then\n\n1. Build the shared parts (on Recanica's parts), with the content cases above.\n2. Only then start pages, each with the `recanica-page` skill.\n3. Re-run `npx recanica kickoff` whenever an answer changes (new stack, the UI work becomes a guest, flexibility changes).\n"},"recanica-page":{"SKILL.md":"---\nname: recanica-page\ndescription: Use for any page in a Recanica project — building a new page, redesigning one, reworking an existing page, or explaining why a page is laid out the way it is. Produces a written page brief (purpose, reader, their questions in order, structure, what was left out, alternatives rejected) before building, checks the rendered page against it, and reports the reasoning with the result. Trigger on \"new page\", \"redesign\", \"rework\", \"make this page\", \"why is this page like this\", \"what's the purpose of this page\".\n---\n\n# Recanica page\n\nA page is a set of decisions about a reader. Make them on paper first, check them on the rendered page, and say them out loud.\nLayout decided in code from habit is how pages end up \"technically correct, visually messy\" (per-element width caps,\ndata shapes rendered as columns, sections stacked because that's the default). This skill exists to stop that.\n\n## Modes\n\n- **Build**: a new page, a redesign or a rework → steps 1–6.\n- **Explain**: \"why is this page like this?\" about an existing page → step E.\n\n## 1. Write the brief (before any code)\n\nFirst run `npx recanica decisions brief`: the decisions in force and the traps this project already fell into. The brief\nmust not contradict them. If the page needs something different, say so in the brief and add a decision that supersedes the\nold one (`npx recanica decisions new`); don't quietly do something else.\n\nCopy `brief-template.md` to `docs/pages/<route>.md` (create the folder if needed) and fill it in. Keep it short; one screen.\n\n- **Purpose**: one sentence. What is this page for?\n- **Reader**: who arrives here, from where, and in what state of mind (first visit, daily use, in a hurry, comparing).\n- **Their questions, in order**: what they need to know or do first, second, third. This order IS the page order.\n- **Main action**: the one thing the page should get done. If there is none, say so (reference pages).\n- **Page type → anatomy**: pick the page type from the page anatomy (MCP `get_page_anatomy`, docs `/docs/page-anatomy`, source `docs/ai/anatomy.json`). It gives the shell, the regions in reading order and the part for each region. Fill those regions; skip the ones you don't need; don't invent new ones without a reason in the brief.\n- **Structure**: each section in order, with the question it answers and why it sits there.\n- **Left out on purpose**: what a reader might expect that isn't here, and where it lives instead.\n- **Alternatives rejected**: at least two other structures you considered, and why not (e.g. \"grid of cards: uneven lengths leave holes\", \"one big table: lists in cells read badly, breaks on phones\").\n- **Width and adapting**: per section (reading column, full width or side panel), and what happens at 375px and in a narrow container.\n- **Deviations**: any should-rule you are deliberately not following, with the reason (these go to `recanica.config.json` \"allow\").\n\nDecide from the reader's questions, never from the shape of your data or what is quickest to code.\n\n## 2. Show the brief and a mockup; agree it\n\nShow the brief and a quick mockup (existing patterns, realistic content). Ask the user to mark each section keep / change / remove.\nDon't build until it's agreed. Update the brief with what changed and why.\n\n## 3. Build from the pattern, parts first\n\nBefore writing markup, list every part the page needs (header, sections, surfaces, rows, controls, tables) and map each to an\nexisting component. If one is missing, add or extend the component first; that is system work, not page work.\nWriting raw `<button>`, `<input>`, `<select>`, `<table>` or a hand-made card fails `recanica check`.\n\n\nUse Recanica components and the pattern named in the brief. Fix components, never patch them on the page.\nBefore reusing a component for different content, check its defaults fit that content (a table built for token names styles its\nfirst column as small monospace; prose labels in it wrap and look like code). If they don't, make the component handle both.\nCompose the page from the shared structure parts. Use `Page`, `PageHeader`, `Section`, `Heading`, `Stack` and `ReferenceTable` for apps, and `WebSection`, `WebSectionTitle` and `WebHeroTitle` for sites.\nNever hand-build a header, heading or section; `recanica check` flags it. If a part doesn't fit, change the part, not the page.\nSingle source for layout decisions: the container owns spacing and width, blocks never do. Stack blocks in a `.flow` column\n(or `gap-*`), put reading pages in `.reading`, and pick text emphasis by role (main = foreground, supporting = muted).\nNever space or size an individual block to make it look right on one page.\n\n### Reuse: every element comes from a part\n\nThe design system only works if pages are built from it. Rules:\n1. **Look up before you write.** For each element on the page, find the part: `npx recanica rules`, MCP `list_components`, or the docs catalog. The usual ones:\n - page structure: `Page`, `PageHeader`, `Section`, `Heading`, `Stack`\n - boxes and grids: `Surface`, `SurfaceGrid`\n - rows and options: `NavItem`, `ChoiceCard`\n - controls: `Button`, `Input`, `NativeSelect`, `Select`, `Field`\n - data: `Table`, `ReferenceTable`, `StatGroup`, `BarRow`\n - states: `Empty`, `Loader`\n - sites: `WebSection`, `WebSectionTitle`, `WebHeroTitle`\n2. **Use it as it is.** Pass props and variants; don't override its spacing, radius, colour or type with classes on the page.\n3. **If it doesn't fit, change the part.** Add a variant or prop, or add a new part (both React and rc-* forms). Never copy its markup and adjust it.\n4. **If you write the same thing twice, it's a part.** The second copy is the signal: stop and add the part.\n5. **Never hand-build** buttons, inputs, selects, tables, cards, headings or section titles. `recanica check` fails them (must in new projects).\n6. **Use what's listed, or remove it.** A component nobody uses has untested defaults. Use it where it belongs, or drop it from the library.\n\n### Naming: components in React, rc-* classes elsewhere\n\nSame parts, two forms. Both read the same tokens, so a change to the part changes every use.\n- **React** (Next.js, Vite): use the components (`<Page>`, `<PageHeader>`, `<Section>`, `<Surface>`, `<NavItem>`, `<ChoiceCard>`, `<Button>`). Never write their Tailwind classes on the page.\n- **No React** (HTML, PHP, WordPress, Rails, Django): use the `@recanica/css` classes. They are named prefixed-BEM:\n - `rc-block` is a part: `rc-btn`, `rc-surface`, `rc-section`, `rc-page-header`, `rc-nav-item`\n - `rc-block__element` is a piece of it: `rc-section__title`, `rc-page-header__title`\n - `rc-block--modifier` is a variant: `rc-btn--brand`, `rc-surface--panel`, `rc-badge--success`\n - layout helpers: `rc-flow` (rhythm), `rc-reading` (width), `rc-stack`, `rc-container`\n- **New part:** add it to both forms, in the same commit, with the same anatomy (elements, modifiers, responsive behaviour), CSS first. Name it after what it *is* (`rc-surface`), never where it's used (`headermain`, `homepage-card`).\n- **Copying a class string is not reuse.** If you need the same look twice, it's a part: add it.\n\n## 4. Render it and look (required)\n\nOpen the page at **1280px and 375px** (and inside a narrow container if it can be embedded). Check the composition:\n\n- [ ] **Reader order**: what the brief says comes first, visibly comes first. One focal point.\n- [ ] **Shared edges**: one right edge per column; text, tables and cards line up.\n- [ ] **Balanced columns**: no column far longer than its neighbours; no big empty holes.\n- [ ] **Grouping**: one surface per group; space, not extra borders, between groups.\n- [ ] **One primary action**; secondary actions quieter or in a menu.\n- [ ] **Nothing wraps, overflows or overlaps**; labels on one line, including the label column of tables.\n- [ ] **Emphasis matches importance**: the main content isn't styled as secondary (muted), and headings are real landmarks.\n- [ ] **Supporting detail is quiet**: metadata, enforcement, \"how it works\" sit below or behind the main content.\n\nIf any box is unchecked, fix the structure (not just the styling) and look again.\n\n## 5. Measure\n\n```bash\nnpx recanica review <url> --paths <route> # target 85+, no dimension under 70\nnpx recanica audit <url> --paths <route> # 0 must-fix\nnpx recanica check <files> # 0 must-fix\nnpx recanica slop <files> # 0 must-fix: no AI jargon, glass, glows, blur blobs, emoji icons\n```\n\nBefore you write copy (headlines, empty states, buttons) run it past `npx recanica slop --text \"…\"` (or MCP `check_copy`).\n\nEvery should-finding is either fixed or recorded in `recanica.config.json` \"allow\" with its reason.\n\n## 6. Record and report\n\nEvery UI/UX decision you made that a later page could get wrong goes in the log: `npx recanica decisions new --title \"…\"`\n(what, why, rejected, guard). A mistake you caught and fixed goes in as a trap (`--trap`) with a mechanical guard.\nIn a guest project, anything you noticed outside your scope goes in `docs/ui/PROPOSALS.md`, at most three per task.\n\n\nReply with: the brief's purpose, reader and section order (3–6 lines), the alternatives you rejected and why, the scores,\nand the two screenshots. If the user asks \"why is it like this?\", the answer is already in `docs/pages/<route>.md`.\n\n## E. Explain an existing page\n\n1. Open the page at 1280px and 375px.\n2. Reconstruct the brief honestly: purpose, reader, the questions each section answers, in order.\n3. For each section say **why it is there and why there** — or say plainly that it isn't justified (habit, default, data shape).\n4. List what's weak against the step-4 checklist and `npx recanica review`, and propose the fix with one alternative.\n5. Write it to `docs/pages/<route>.md` with `Status: explained` so it can be agreed and reworked later.\n\nBe honest about weak reasoning. \"I stacked these because it was the default\" is a useful answer; a made-up rationale is not.\n","brief-template.md":"# <Page name> · `<route>`\n\nStatus: draft | agreed | built | explained · Updated: YYYY-MM-DD\n\n**Purpose:** one sentence.\n\n**Reader:** who arrives, from where, in what state of mind.\n\n**Their questions, in order**\n1. …\n2. …\n3. …\n\n**Main action:** … (or \"none: reference page\")\n\n**Page type → pattern:** … → Recanica pattern/recipe …\n\n**Structure**\n| # | Section | Answers | Why here |\n|---|---|---|---|\n| 1 | | | |\n\n**Left out on purpose:** … (and where it lives instead)\n\n**Alternatives rejected**\n- … because …\n- … because …\n\n**Width and adapting:** per section; what happens at 375px and in a narrow container.\n\n**Deviations (should-rules not followed):** rule · reason · or \"none\"\n\n**Check:** review score … · audit … · screenshots 1280/375 looked at ✓\n"}},"guides":{"README":"# Recanica guides\n\nRecanica is the UI framework by Aturanica Labs. Pick your stack:\n\n| Stack | Guide | What you get |\n|---|---|---|\n| Next.js + Tailwind v4 | [setup-nextjs.md](setup-nextjs.md) | Tokens, 60 React components, patterns & blocks |\n| Vite / React + Tailwind v4 | [setup-vite-react.md](setup-vite-react.md) | Same as above |\n| Tailwind v3 (any framework) | [setup-tailwind-v3.md](setup-tailwind-v3.md) | Tokens via preset; build your own components |\n| Plain HTML / WordPress / Laravel / Django / Rails | [setup-html.md](setup-html.md) | `@recanica/css` with `rc-*` classes |\n| Vue / Nuxt, Svelte / SvelteKit, Astro, Angular | [../STACKS.md](../STACKS.md) | `@recanica/css` wired by `recanica init`; `rc-*` parts in your templates |\n| Stack not decided yet | [../STACKS.md](../STACKS.md) | Start CSS-first (`templates/vite-html`); nothing to rewrite later |\n| Flutter | [setup-flutter.md](setup-flutter.md) | `recanicaTheme()` + color/space/type constants |\n| SwiftUI (iOS) | [setup-swiftui.md](setup-swiftui.md) | `Recanica.Colors`, radius, spacing, type |\n| Jetpack Compose (Android) | [setup-compose.md](setup-compose.md) | `recanicaColorScheme()` + constants |\n| Figma | [setup-figma.md](setup-figma.md) | Variables via Tokens Studio |\n| AI tools (Claude Code, Cursor, …) | [ai.md](ai.md) | MCP server, rules file, prompts, llms.txt |\n| A new project (any stack) | [new-project.md](new-project.md) | The order every time: create, `init`, kickoff, hand to the AI, build with the guards on |\n| An existing site (any stack) | [migrate-existing.md](migrate-existing.md) | Adopting Recanica on a live product: mapping, checks, page-by-page rework |\n\nFastest path for any web project:\n\n```bash\nnpx recanica init\n```\n\nThe CLI detects your stack, installs the right package, wires the CSS and writes an `AGENTS.md` so AI tools follow Recanica.\nThen run `npx recanica kickoff`: the start-of-project questionnaire.\n","ai":"# Using Recanica with AI tools\n\nRecanica is built to be read by LLMs. Four ways in, from most to least integrated:\n\n## 1. MCP server (recommended)\n\nGives Claude Code, Claude Desktop, Cursor, Windsurf and others live access to rules, tokens, component source and patterns.\n\n```bash\n# Claude Code\nclaude mcp add recanica -- npx -y @recanica/mcp\n```\n\n```json\n// Cursor / Claude Desktop / others: mcpServers\n{ \"recanica\": { \"command\": \"npx\", \"args\": [\"-y\", \"@recanica/mcp\"] } }\n```\n\nTools: `get_rules`, `get_tokens(format)`, `list_components`, `get_component(name)`, `list_patterns(kind, category)`, `get_pattern(name)`,\n`get_recipe(page)`, `get_page_library`, `search(query)`, `get_setup(stack)`. Prompt: `apply-recanica`.\n\nTypical requests that work well once the server is connected:\n- \"Build our pricing page with Recanica.\" → the agent calls `get_recipe`, then `get_pattern` for each section.\n- \"Add a team & roles page to the dashboard.\" → `get_page_library`, then the matching demo/pattern source.\n\n## 2. Rules file in the project\n\n`npx recanica init` writes `AGENTS.md` (read by Codex, Cursor, Claude Code via CLAUDE.md import, and others) containing the\nRecanica rules. Every AI session in that repo then follows them.\n\n## 3. Copy-paste prompts\n\nThe docs page `/docs/ai` has prompts for: apply Recanica to a project · brand & style only (any stack) · build a screen ·\naudit UI · rules file. Each embeds the full rules and token values.\n\n## 4. llms.txt\n\n`/llms.txt` (index) and `/llms-full.txt` (everything in one file) on the docs site, for tools that fetch them.\n","migrate-existing":"# Adopting Recanica on an existing site\n\nSwapping colours is not adopting Recanica, but it is the first step. This guide is the order\nthat worked on a live product (a browser studio + marketing site + server-rendered library):\na base layer across every page in one pass, then the checks, then page-by-page rework.\n\n## 1. Bring Recanica in\n\nRecanica is on npm (`recanica`, `@recanica/*`). In the project's root:\n\n```bash\nnpx recanica init --yes\nnpx recanica start\n```\n\n- `init` detects the stack, installs `@recanica/*`, adds `recanica` as a dev dependency, wires the CSS,\n writes the Recanica section of `AGENTS.md` (the rest of the file is kept), `CLAUDE.md` and `recanica.config.json`,\n and turns on the guards: Claude Code Stop and SessionStart hooks, a git pre-commit hook and CI.\n- **The UI is only part of the build** (someone else owns routing, data, the backend):\n `npx recanica init --yes --role guest --owns \"src/ui/**,src/styles/**\"`. Findings outside those paths are advice, never failures.\n- `start` says what's still missing, usually the kickoff questions. Answer them once.\n- AI tools: `claude mcp add recanica -- npx -y @recanica/mcp`.\n- **React components need React 19.** On React 18, start with the framework-free `rc-*`\n classes and the tokens (`--stack html`), and upgrade React before swapping components.\n- **Moving off the old git submodule** (`vendor/recanica`): run `init` as above, change imports and stylesheet\n paths to `@recanica/...`, then `git rm vendor/recanica`.\n\nThe guard checks only the files you change, so existing slop doesn't block you all at once: old pages get flagged as\nyou touch them. To see it all up front: `npx recanica check src` and `npx recanica slop src`\n(the list is [docs/SLOP.md](../SLOP.md)). For the whole picture in one page: `npx recanica report --url http://localhost:3000`.\n\nAlready on Recanica and a new version is out? `npx recanica upgrade`, then `npx recanica report` to see what the new rules find.\n\n## 2. Map the old variables (base layer)\n\nMost existing sites have their own names (`--bg`, `--fg`, `--line`, `--muted` …). Point them\nat Recanica's semantic tokens so the old rules keep working:\n\n```css\n:root {\n --bg: var(--background);\n --fg: var(--foreground);\n --line: var(--border);\n --hair: var(--border);\n}\n```\n\nThree traps:\n\n- **Never define a variable from itself.** If the old name is the same as Recanica's\n (`--ring`, `--card`), delete the old line; `--ring: var(--ring)` is invalid and silently\n disables every rule that uses it (focus rings, card backgrounds). `recanica check` flags it.\n- **Never reuse a semantic name with another meaning.** An old `--muted` that meant *grey\n text* collides with Recanica's `--muted` (a *background*). Rename the old one or use\n `--muted-foreground`.\n- **Hard-coded greys and whites** inside rules (`#000`, `#fff`, `#1f1f1f`) need mapping\n one by one: dark fills to `--primary`, light fills to `--card`, text to `--foreground` /\n `--muted-foreground`, lines to `--border`. Text that sits on images or artwork stays white.\n\nAlso in the base layer: the font (`--font-sans`), `font-weight` never above 500, pill buttons,\n`<html class=\"dark\">` for dark-first, and link the stylesheets in the page `<head>` (not as an\n`@import` chain) so the page never paints unstyled.\n\n## 3. Record what is deliberate\n\nSome colour is content, not interface: gradient artwork, product imagery, a brand moment\nthe owner chose. Record it once, with a reason, so the checks report only real problems:\n\n```json\n{\n \"allow\": [\n { \"rule\": \"gradient\", \"file\": \"src/art/**\", \"reason\": \"Gradient artwork is the product\" },\n { \"rule\": \"spec-color\", \"path\": \"/\", \"reason\": \"The hero's coloured words are the one brand moment\" }\n ],\n \"ignore\": [\"**/*.test.ts\", \"src/data/palettes.ts\"]\n}\n```\n\n`file` globs apply to `recanica check` (source files); `path` globs apply to `audit` and\n`review` (page URLs). Must-rules can't be allowed away.\n\n## 4. Measure, then rework page by page\n\n1. `recanica check src` for the code, `recanica review <url> --crawl` for every page at\n 375 / 900 / 1280 px. Target: 85+ per page, nothing under 70.\n2. **Quick wins first**, across all pages at once: focus rings, equal header padding, the\n current page marked in the nav, banned words, text under 12px, tables that overflow on\n phones, reading width (about 65ch).\n3. **Then rework** from the lowest score up: mockup, owner review (keep / change / remove),\n rebuild from the matching pattern. Narrow blocks are centred as one unit or fill the\n column; headings never end on a lone word.\n","new-project":"# Starting a new project with Recanica\n\nThe same order every time, for people and AI tools. Don't share the Recanica repo and ask the AI to \"study\" it: it learns the look and writes its own components. Install Recanica instead, and let the guards hold the line.\n\n## 1. Create the app\n\nUse the stack's own starter (`npx create-next-app@latest`, `npm create vite@latest`, `flutter create`, …), or copy one from [templates](../../templates). Commit once so the guards have a baseline.\n\n## 2. Install Recanica\n\n```bash\nnpx recanica init --yes\n```\n\nThis installs the parts for the stack and writes:\n\n| File | What it does |\n|---|---|\n| `AGENTS.md`, `CLAUDE.md` | The rules every AI tool reads, kept short |\n| `recanica.config.json` | How strict the checks are; kickoff answers; accepted exceptions |\n| `.claude/settings.json` | SessionStart hook (`recanica start`) and Stop hook (`recanica guard`): Claude can't finish a turn while the files it changed break the rules |\n| `.githooks/pre-commit` | Must-fix findings stop the commit, for any tool or person |\n| `.github/workflows/recanica.yml` | The same checks in CI |\n| `.claude/skills/` | The kickoff and page skills |\n\nConnect the MCP server so the AI can look up rules, components and page types:\n\n```bash\nclaude mcp add recanica -- npx -y @recanica/mcp\n```\n\n## 3. Kickoff\n\n```bash\nnpx recanica kickoff\n```\n\nThe start-of-project questions: who it's for, your role (owner, or guest in someone else's build), how strict, which surfaces, what \"done\" means. The answers are saved in `recanica.config.json` and `docs/ui/KICKOFF.md`. No pages before this.\n\n## 4. Hand it to the AI\n\nOpen the project in Claude Code (or any AI tool) and start with this:\n\n> This project uses Recanica. Run `npx recanica start` and follow what it says. Build every page from the installed Recanica parts, never your own versions, and nothing copied from the Recanica repo. For each page, write the brief first (the recanica-page skill), build it, then look at it at 375 and 1280px. Before you finish, `npx recanica check` and `npx recanica slop` must pass.\n\nYou don't need to repeat it: the SessionStart hook runs `recanica start` in every new session, and the Stop hook checks every turn.\n\n## 5. While building\n\n- `npx recanica decisions brief`: the UI decisions in force. Record new ones with `npx recanica decisions new --title \"…\"`.\n- `npx recanica slop --list`: the AI-slop list and what to do instead ([docs/SLOP.md](../SLOP.md)).\n- `npx recanica audit http://localhost:3000`: the rendered page at 375 / 900 / 1280px (dead links, overflow, wrapped labels, too many badges).\n- A deliberate exception gets `recanica-ignore: <reason>` on the line, so the reason shows in review.\n\n## Staying consistent\n\n- **Every AI session** starts with `recanica start`, which also says when a newer Recanica is out.\n- **Every AI turn** ends with `recanica guard`: the changed files are checked, and when the dev server is running the changed pages are opened at 375 and 1280px too. Set `\"devUrl\": \"http://localhost:3000\"` in `recanica.config.json` if your server isn't on the usual port. Needs Playwright in the project (`npm i -D playwright && npx playwright install chromium`).\n- **Every commit and push**: the pre-commit hook and CI.\n- **New Recanica version**: `npx recanica upgrade` updates the packages and refreshes `AGENTS.md`, skills and hooks. Your own config is kept.\n- **Once a week, or in CI**: `npx recanica report --url http://localhost:3000` gives the project's status (on track, needs attention, off track) and what to fix next.\n\n## Mobile\n\nFlutter, SwiftUI and Compose get the tokens and theme today (`init` detects them). Mobile components, patterns and mobile slop checks are the next piece of work; see [docs/research/2026-11-30-ai-slop-and-mobile.md](../research/2026-11-30-ai-slop-and-mobile.md).\n","setup-compose":"# Jetpack Compose (Android)\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\nCopy [`packages/tokens/generated/android/RecanicaTokens.kt`](../../packages/tokens/generated/android/RecanicaTokens.kt) into your app\nmodule (package `com.aturanica.recanica`, rename if needed) or run `npx recanica init --stack compose`.\n\n```kotlin\nMaterialTheme(colorScheme = recanicaColorScheme(isSystemInDarkTheme())) {\n Surface(color = MaterialTheme.colorScheme.background) { App() }\n}\n\nCard(shape = RoundedCornerShape(RecanicaRadius.Xxl), border = BorderStroke(1.dp, MaterialTheme.colorScheme.outline)) {\n Text(\"RM 4,820\", fontSize = RecanicaTextSize.Metric, fontWeight = FontWeight.Light)\n}\n```\n","setup-figma":"# Figma\n\n1. Install the **Tokens Studio for Figma** plugin.\n2. Load [`packages/tokens/generated/figma/tokens-studio.json`](../../packages/tokens/generated/figma/tokens-studio.json)\n (or sync the plugin to this GitHub repo, path `packages/tokens/generated/figma/tokens-studio.json`).\n3. Themes **Light** and **Dark** are preconfigured. Export to Figma variables from the plugin.\n\nChanges go the other way through `packages/tokens/tokens/*.json` → `pnpm --filter @recanica/tokens build`.\n","setup-flutter":"# Flutter\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\nCopy [`packages/tokens/generated/flutter/recanica_tokens.dart`](../../packages/tokens/generated/flutter/recanica_tokens.dart) into `lib/theme/`\n(or run `npx recanica init --stack flutter` in the project root).\n\nAdd Geist to `pubspec.yaml` (download from Google Fonts):\n\n```yaml\nflutter:\n fonts:\n - family: Geist\n fonts:\n - asset: assets/fonts/Geist-Light.ttf\n weight: 300\n - asset: assets/fonts/Geist-Regular.ttf\n - asset: assets/fonts/Geist-Medium.ttf\n weight: 500\n```\n\n```dart\nimport 'theme/recanica_tokens.dart';\n\nMaterialApp(\n theme: recanicaTheme(Brightness.light),\n darkTheme: recanicaTheme(Brightness.dark),\n themeMode: ThemeMode.dark,\n);\n\n// Direct access\nfinal c = Theme.of(context).brightness == Brightness.dark ? RecanicaColors.dark : RecanicaColors.light;\nText('RM 4,820', style: RecanicaText.metric.copyWith(color: c.foreground));\nPadding(padding: const EdgeInsets.all(RecanicaSpacing.panel), child: …);\n```\n","setup-html":"# Plain HTML, WordPress, Laravel, Django, Rails\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\nNo build step, no React, no Tailwind:\n\n```html\n<html class=\"dark\">\n<head>\n <link href=\"https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500&family=Geist+Mono&display=swap\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://unpkg.com/@recanica/css/dist/recanica.css\" />\n <style>:root { --font-geist-sans: \"Geist\"; --font-geist-mono: \"Geist Mono\"; }</style>\n</head>\n```\n\n```html\n<button class=\"rc-btn rc-btn--brand\">Get started</button>\n\n<section class=\"rc-stats\">\n <div class=\"rc-stat\">\n <div class=\"rc-stat__head\"><span>Revenue</span><a href=\"#\">View all →</a></div>\n <div class=\"rc-stat__value\"><span class=\"rc-metric\">RM 4,820</span><span class=\"rc-caption\">November</span></div>\n </div>\n</section>\n```\n\nFull class list: [packages/css/README.md](../../packages/css/README.md). Working page: [packages/css/examples/index.html](../../packages/css/examples/index.html).\nOr self-host: `npm i @recanica/css` and serve `node_modules/@recanica/css/dist/recanica.css`.\n","setup-nextjs":"# Next.js + Tailwind CSS v4\n\n> **React 19:** `@recanica/ui` needs React 19 (`react` and `react-dom` ^19). On React 18, upgrade first, or use the framework-free `@recanica/css` classes (`rc-*`) until you can.\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\n```bash\nnpm i @recanica/ui @recanica/tokens\n```\n\n**app/globals.css**\n\n```css\n@import \"tailwindcss\";\n@import \"@recanica/tokens/theme.css\";\n\n/* Let Tailwind see the classes used inside the component library */\n@source \"../node_modules/@recanica/ui\";\n```\n\n**app/layout.tsx**\n\n```tsx\nimport { Geist, Geist_Mono } from \"next/font/google\";\nimport { ThemeProvider } from \"next-themes\";\nimport { TooltipProvider } from \"@recanica/ui/components/tooltip\";\nimport { Toaster } from \"@recanica/ui/components/sonner\";\nimport \"./globals.css\";\n\nconst sans = Geist({ subsets: [\"latin\"], variable: \"--font-geist-sans\" });\nconst mono = Geist_Mono({ subsets: [\"latin\"], variable: \"--font-geist-mono\" });\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n return (\n <html lang=\"en\" suppressHydrationWarning className={`${sans.variable} ${mono.variable}`}>\n <body>\n <ThemeProvider attribute=\"class\" defaultTheme=\"dark\" enableSystem>\n <TooltipProvider>{children}<Toaster /></TooltipProvider>\n </ThemeProvider>\n </body>\n </html>\n );\n}\n```\n\n**Use components**\n\n```tsx\nimport { Button } from \"@recanica/ui/components/button\";\n<Button variant=\"brand\">Get started</Button>\n```\n\n**Add a pattern or block** (copied into your app, you own the code):\n\n```bash\nnpx shadcn@latest add https://recanica.aturanica.com/r/data-table.json\n```\n\nInside this monorepo, use `workspace:*` versions and add `transpilePackages: [\"@recanica/ui\"]` to `next.config.ts`.\n","setup-swiftui":"# SwiftUI (iOS)\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\nAdd [`packages/tokens/generated/ios/RecanicaTokens.swift`](../../packages/tokens/generated/ios/RecanicaTokens.swift) to your Xcode target\n(or `npx recanica init --stack swiftui`). Add the Geist font files and list them under `UIAppFonts` in Info.plist.\n\n```swift\nText(\"RM 4,820\")\n .font(Recanica.Typography.metric)\n .foregroundStyle(Recanica.Colors.foreground)\n .padding(Recanica.Spacing.panel)\n .background(Recanica.Colors.card, in: RoundedRectangle(cornerRadius: Recanica.Radius.xxl))\n .overlay(RoundedRectangle(cornerRadius: Recanica.Radius.xxl).stroke(Recanica.Colors.border))\n```\n\nColors switch with the system appearance automatically.\n","setup-tailwind-v3":"# Tailwind CSS v3\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\n```bash\nnpm i @recanica/tokens\n```\n\n**tailwind.config.js**\n\n```js\nmodule.exports = {\n presets: [require(\"@recanica/tokens/tailwind-preset\")],\n content: [\"./src/**/*.{html,js,jsx,ts,tsx,vue,svelte,php,blade.php}\"],\n};\n```\n\n**global CSS**\n\n```css\n@import \"@recanica/tokens/variables.css\";\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n```\n\nYou get `bg-background bg-panel bg-card text-muted-foreground border-border`, `rounded-2xl` on Recanica's radius,\n`p-panel px-gutter gap-stack w-sidebar max-w-content`, `text-title text-heading text-metric`, `shadow-soft shadow-float`.\nDark mode: `class=\"dark\"` on `<html>`. The React components need Tailwind v4; on v3, follow the class recipes in the docs.\n","setup-vite-react":"# Vite + React + Tailwind CSS v4\n\n> **React 19:** `@recanica/ui` needs React 19 (`react` and `react-dom` ^19). On React 18, upgrade first, or use the framework-free `@recanica/css` classes (`rc-*`) until you can.\n\n\n> **Your own font:** Geist is only the default. Load any calm sans with light/regular weights and tabular numerals, then set `--font-sans` / `--font-mono` to it.\n\n```bash\nnpm i @recanica/ui @recanica/tokens tailwindcss @tailwindcss/vite\n```\n\n**vite.config.ts**\n\n```ts\nimport tailwindcss from \"@tailwindcss/vite\";\nimport react from \"@vitejs/plugin-react\";\nexport default { plugins: [react(), tailwindcss()] };\n```\n\n**src/index.css**\n\n```css\n@import \"tailwindcss\";\n@import \"@recanica/tokens/theme.css\";\n@source \"../node_modules/@recanica/ui\";\n\n/* Fonts: load Geist (Google Fonts or @fontsource/geist) and expose it */\n:root { --font-geist-sans: \"Geist\"; --font-geist-mono: \"Geist Mono\"; }\n```\n\n**index.html**: `<html class=\"dark\">`. Toggle dark mode by switching the `dark` class.\n\nComponents, patterns and blocks work exactly as in the [Next.js guide](setup-nextjs.md).\n"}}
|