decantr 0.9.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/AGENTS.md +868 -0
- package/CHANGELOG.md +255 -0
- package/CLAUDE.md +178 -0
- package/LICENSE +21 -0
- package/README.md +229 -0
- package/cli/art.js +127 -0
- package/cli/commands/a11y.js +61 -0
- package/cli/commands/audit.js +225 -0
- package/cli/commands/build.js +38 -0
- package/cli/commands/dev.js +18 -0
- package/cli/commands/doctor.js +197 -0
- package/cli/commands/figma-sync.js +48 -0
- package/cli/commands/figma-tokens.js +55 -0
- package/cli/commands/generate.js +26 -0
- package/cli/commands/init.js +116 -0
- package/cli/commands/lint.js +209 -0
- package/cli/commands/mcp.js +530 -0
- package/cli/commands/migrate.js +175 -0
- package/cli/commands/test.js +38 -0
- package/cli/commands/validate.js +354 -0
- package/cli/index.js +113 -0
- package/package.json +95 -0
- package/reference/atoms.md +517 -0
- package/reference/behaviors.md +384 -0
- package/reference/build-tooling.md +275 -0
- package/reference/color-guidelines.md +965 -0
- package/reference/component-lifecycle.md +137 -0
- package/reference/compound-spacing.md +95 -0
- package/reference/decantation-process.md +499 -0
- package/reference/dev-server-routes.md +93 -0
- package/reference/form-system.md +253 -0
- package/reference/i18n.md +336 -0
- package/reference/icons.md +576 -0
- package/reference/llm-primer.md +953 -0
- package/reference/plugins.md +252 -0
- package/reference/registry-consumption.md +76 -0
- package/reference/router.md +217 -0
- package/reference/shells.md +116 -0
- package/reference/spatial-guidelines.md +541 -0
- package/reference/ssr.md +234 -0
- package/reference/state-data.md +215 -0
- package/reference/state-patterns.md +166 -0
- package/reference/state.md +194 -0
- package/reference/style-system.md +110 -0
- package/reference/tokens.md +460 -0
- package/src/app.js +19 -0
- package/src/chart/_animate.js +266 -0
- package/src/chart/_base.js +109 -0
- package/src/chart/_data.js +209 -0
- package/src/chart/_format.js +106 -0
- package/src/chart/_interact.js +364 -0
- package/src/chart/_palette.js +105 -0
- package/src/chart/_renderer.js +52 -0
- package/src/chart/_scene.js +262 -0
- package/src/chart/_shared.js +371 -0
- package/src/chart/index.js +637 -0
- package/src/chart/layouts/_layout-base.js +328 -0
- package/src/chart/layouts/cartesian.js +148 -0
- package/src/chart/layouts/hierarchy.js +562 -0
- package/src/chart/layouts/polar.js +101 -0
- package/src/chart/renderers/canvas.js +179 -0
- package/src/chart/renderers/svg.js +256 -0
- package/src/chart/renderers/webgpu.js +715 -0
- package/src/chart/types/_type-base.js +26 -0
- package/src/chart/types/area.js +134 -0
- package/src/chart/types/bar.js +173 -0
- package/src/chart/types/box-plot.js +125 -0
- package/src/chart/types/bubble.js +63 -0
- package/src/chart/types/candlestick.js +115 -0
- package/src/chart/types/chord.js +85 -0
- package/src/chart/types/combination.js +108 -0
- package/src/chart/types/funnel.js +68 -0
- package/src/chart/types/gauge.js +163 -0
- package/src/chart/types/heatmap.js +98 -0
- package/src/chart/types/histogram.js +71 -0
- package/src/chart/types/line.js +111 -0
- package/src/chart/types/org-chart.js +93 -0
- package/src/chart/types/pie.js +81 -0
- package/src/chart/types/radar.js +96 -0
- package/src/chart/types/radial.js +68 -0
- package/src/chart/types/range-area.js +55 -0
- package/src/chart/types/range-bar.js +61 -0
- package/src/chart/types/sankey.js +73 -0
- package/src/chart/types/scatter.js +66 -0
- package/src/chart/types/sparkline.js +81 -0
- package/src/chart/types/sunburst.js +69 -0
- package/src/chart/types/swimlane.js +88 -0
- package/src/chart/types/treemap.js +62 -0
- package/src/chart/types/waterfall.js +100 -0
- package/src/components/_base.js +1658 -0
- package/src/components/_behaviors.js +1140 -0
- package/src/components/_primitives.js +534 -0
- package/src/components/_qr-encoder.js +539 -0
- package/src/components/accordion.js +207 -0
- package/src/components/affix.js +62 -0
- package/src/components/alert-dialog.js +75 -0
- package/src/components/alert.js +47 -0
- package/src/components/aspect-ratio.js +24 -0
- package/src/components/avatar-group.js +55 -0
- package/src/components/avatar.js +38 -0
- package/src/components/back-top.js +75 -0
- package/src/components/badge.js +74 -0
- package/src/components/banner.js +68 -0
- package/src/components/breadcrumb.js +162 -0
- package/src/components/button.js +115 -0
- package/src/components/calendar.js +131 -0
- package/src/components/card.js +192 -0
- package/src/components/carousel.js +98 -0
- package/src/components/cascader.js +261 -0
- package/src/components/checkbox.js +80 -0
- package/src/components/chip.js +81 -0
- package/src/components/code-block.js +82 -0
- package/src/components/collapsible.js +50 -0
- package/src/components/color-palette.js +438 -0
- package/src/components/color-picker.js +314 -0
- package/src/components/combobox.js +181 -0
- package/src/components/command.js +174 -0
- package/src/components/comment.js +206 -0
- package/src/components/context-menu.js +76 -0
- package/src/components/data-table.js +724 -0
- package/src/components/date-picker.js +217 -0
- package/src/components/date-range-picker.js +244 -0
- package/src/components/datetime-picker.js +271 -0
- package/src/components/descriptions.js +68 -0
- package/src/components/drawer.js +179 -0
- package/src/components/dropdown.js +88 -0
- package/src/components/empty.js +41 -0
- package/src/components/float-button.js +90 -0
- package/src/components/form.js +106 -0
- package/src/components/hover-card.js +49 -0
- package/src/components/icon.js +87 -0
- package/src/components/image.js +97 -0
- package/src/components/index.js +117 -0
- package/src/components/input-group.js +75 -0
- package/src/components/input-number.js +155 -0
- package/src/components/input-otp.js +178 -0
- package/src/components/input.js +91 -0
- package/src/components/kbd.js +36 -0
- package/src/components/label.js +25 -0
- package/src/components/list.js +118 -0
- package/src/components/masked-input.js +236 -0
- package/src/components/mentions.js +165 -0
- package/src/components/menu.js +259 -0
- package/src/components/message.js +80 -0
- package/src/components/modal.js +147 -0
- package/src/components/navigation-menu.js +166 -0
- package/src/components/notification.js +84 -0
- package/src/components/pagination.js +104 -0
- package/src/components/placeholder.js +132 -0
- package/src/components/popconfirm.js +70 -0
- package/src/components/popover.js +58 -0
- package/src/components/progress.js +61 -0
- package/src/components/qrcode.js +251 -0
- package/src/components/radiogroup.js +120 -0
- package/src/components/range-slider.js +176 -0
- package/src/components/rate.js +186 -0
- package/src/components/resizable.js +83 -0
- package/src/components/result.js +57 -0
- package/src/components/scroll-area.js +43 -0
- package/src/components/segmented.js +97 -0
- package/src/components/select.js +165 -0
- package/src/components/separator.js +31 -0
- package/src/components/shell.js +407 -0
- package/src/components/skeleton.js +39 -0
- package/src/components/slider.js +141 -0
- package/src/components/sortable-list.js +176 -0
- package/src/components/space.js +42 -0
- package/src/components/spinner.js +112 -0
- package/src/components/splitter.js +147 -0
- package/src/components/statistic.js +136 -0
- package/src/components/steps.js +99 -0
- package/src/components/switch.js +95 -0
- package/src/components/table.js +44 -0
- package/src/components/tabs.js +216 -0
- package/src/components/tag.js +115 -0
- package/src/components/textarea.js +82 -0
- package/src/components/time-picker.js +153 -0
- package/src/components/time-range-picker.js +170 -0
- package/src/components/timeline.js +226 -0
- package/src/components/toast.js +71 -0
- package/src/components/toggle.js +213 -0
- package/src/components/tooltip.js +57 -0
- package/src/components/tour.js +159 -0
- package/src/components/transfer.js +163 -0
- package/src/components/tree-select.js +274 -0
- package/src/components/tree.js +141 -0
- package/src/components/typography.js +136 -0
- package/src/components/upload.js +118 -0
- package/src/components/visually-hidden.js +20 -0
- package/src/components/watermark.js +124 -0
- package/src/core/index.js +539 -0
- package/src/core/lifecycle.js +69 -0
- package/src/css/atoms.js +651 -0
- package/src/css/components.js +940 -0
- package/src/css/derive.js +1296 -0
- package/src/css/index.js +265 -0
- package/src/css/runtime.js +268 -0
- package/src/css/styles/addons/bioluminescent.js +93 -0
- package/src/css/styles/addons/clay.js +70 -0
- package/src/css/styles/addons/clean.js +57 -0
- package/src/css/styles/addons/command-center.js +143 -0
- package/src/css/styles/addons/dopamine.js +83 -0
- package/src/css/styles/addons/editorial.js +80 -0
- package/src/css/styles/addons/glassmorphism.js +99 -0
- package/src/css/styles/addons/liquid-glass.js +105 -0
- package/src/css/styles/addons/prismatic.js +100 -0
- package/src/css/styles/addons/retro.js +63 -0
- package/src/css/styles/auradecantism.js +96 -0
- package/src/css/theme-registry.js +444 -0
- package/src/data/entity.js +281 -0
- package/src/data/index.js +13 -0
- package/src/data/persist.js +225 -0
- package/src/data/query.js +839 -0
- package/src/data/realtime.js +299 -0
- package/src/data/url.js +177 -0
- package/src/data/worker.js +134 -0
- package/src/explorer/archetypes.js +243 -0
- package/src/explorer/atoms.js +228 -0
- package/src/explorer/charts.js +497 -0
- package/src/explorer/components.js +129 -0
- package/src/explorer/foundations.js +949 -0
- package/src/explorer/icons.js +178 -0
- package/src/explorer/patterns.js +247 -0
- package/src/explorer/recipes.js +194 -0
- package/src/explorer/shared/pattern-examples.js +1337 -0
- package/src/explorer/shared/showcase-renderer.js +958 -0
- package/src/explorer/shared/spec-table.js +41 -0
- package/src/explorer/shared/usage-links.js +87 -0
- package/src/explorer/shell-config.js +10 -0
- package/src/explorer/shells.js +551 -0
- package/src/explorer/styles.js +161 -0
- package/src/explorer/tokens.js +262 -0
- package/src/explorer/tools.js +525 -0
- package/src/form/index.js +804 -0
- package/src/i18n/index.js +251 -0
- package/src/icons/essential.js +479 -0
- package/src/icons/index.js +53 -0
- package/src/plugins/index.js +282 -0
- package/src/registry/archetypes/content-site.json +71 -0
- package/src/registry/archetypes/docs-explorer.json +23 -0
- package/src/registry/archetypes/ecommerce.json +104 -0
- package/src/registry/archetypes/financial-dashboard.json +77 -0
- package/src/registry/archetypes/index.json +41 -0
- package/src/registry/archetypes/portfolio.json +82 -0
- package/src/registry/archetypes/recipe-community.json +159 -0
- package/src/registry/archetypes/saas-dashboard.json +86 -0
- package/src/registry/architect/cross-cutting.json +45 -0
- package/src/registry/architect/domains/ecommerce.json +294 -0
- package/src/registry/architect/domains/financial-services.json +302 -0
- package/src/registry/architect/index.json +26 -0
- package/src/registry/architect/traits.json +379 -0
- package/src/registry/atoms.json +16 -0
- package/src/registry/chart-showcase.json +160 -0
- package/src/registry/chart.json +136 -0
- package/src/registry/components.json +8616 -0
- package/src/registry/core.json +216 -0
- package/src/registry/css.json +319 -0
- package/src/registry/data.json +135 -0
- package/src/registry/foundations.json +11 -0
- package/src/registry/icons.json +463 -0
- package/src/registry/index.json +101 -0
- package/src/registry/patterns/activity-feed.json +37 -0
- package/src/registry/patterns/article-content.json +27 -0
- package/src/registry/patterns/auth-form.json +37 -0
- package/src/registry/patterns/author-card.json +20 -0
- package/src/registry/patterns/card-grid.json +127 -0
- package/src/registry/patterns/category-nav.json +26 -0
- package/src/registry/patterns/chart-grid.json +36 -0
- package/src/registry/patterns/chat-interface.json +37 -0
- package/src/registry/patterns/checklist-card.json +55 -0
- package/src/registry/patterns/comparison-panel.json +27 -0
- package/src/registry/patterns/component-showcase.json +24 -0
- package/src/registry/patterns/contact-form.json +31 -0
- package/src/registry/patterns/cta-section.json +20 -0
- package/src/registry/patterns/data-table.json +37 -0
- package/src/registry/patterns/detail-header.json +83 -0
- package/src/registry/patterns/detail-panel.json +27 -0
- package/src/registry/patterns/explorer-shell.json +22 -0
- package/src/registry/patterns/filter-bar.json +33 -0
- package/src/registry/patterns/filter-sidebar.json +27 -0
- package/src/registry/patterns/form-sections.json +110 -0
- package/src/registry/patterns/goal-tracker.json +27 -0
- package/src/registry/patterns/hero.json +107 -0
- package/src/registry/patterns/index.json +47 -0
- package/src/registry/patterns/kpi-grid.json +36 -0
- package/src/registry/patterns/media-gallery.json +20 -0
- package/src/registry/patterns/order-history.json +20 -0
- package/src/registry/patterns/pagination.json +19 -0
- package/src/registry/patterns/photo-to-recipe.json +36 -0
- package/src/registry/patterns/pipeline-tracker.json +28 -0
- package/src/registry/patterns/post-list.json +27 -0
- package/src/registry/patterns/pricing-table.json +32 -0
- package/src/registry/patterns/scorecard.json +28 -0
- package/src/registry/patterns/search-bar.json +20 -0
- package/src/registry/patterns/specimen-grid.json +19 -0
- package/src/registry/patterns/stat-card.json +55 -0
- package/src/registry/patterns/stats-bar.json +55 -0
- package/src/registry/patterns/steps-card.json +55 -0
- package/src/registry/patterns/table-of-contents.json +19 -0
- package/src/registry/patterns/testimonials.json +21 -0
- package/src/registry/patterns/timeline.json +27 -0
- package/src/registry/patterns/token-inspector.json +21 -0
- package/src/registry/patterns/wizard.json +27 -0
- package/src/registry/recipe-auradecantism.json +69 -0
- package/src/registry/recipe-clean.json +65 -0
- package/src/registry/recipe-command-center.json +78 -0
- package/src/registry/router.json +73 -0
- package/src/registry/schema/README.md +197 -0
- package/src/registry/skeletons.json +259 -0
- package/src/registry/state.json +137 -0
- package/src/registry/tokens.json +40 -0
- package/src/router/hash.js +17 -0
- package/src/router/history.js +18 -0
- package/src/router/index.js +598 -0
- package/src/ssr/index.js +922 -0
- package/src/state/arrays.js +181 -0
- package/src/state/devtools.js +647 -0
- package/src/state/index.js +498 -0
- package/src/state/middleware.js +288 -0
- package/src/state/scheduler.js +206 -0
- package/src/state/store.js +300 -0
- package/src/tags/index.js +19 -0
- package/src/tannins/auth.js +396 -0
- package/src/test/dom.js +352 -0
- package/src/test/index.js +62 -0
- package/src/test/state.js +306 -0
- package/tools/a11y-audit.js +487 -0
- package/tools/analyzer.js +315 -0
- package/tools/audit.js +706 -0
- package/tools/builder.js +1422 -0
- package/tools/css-extract.js +188 -0
- package/tools/dev-server.js +316 -0
- package/tools/dts-gen.js +1260 -0
- package/tools/figma-components.js +329 -0
- package/tools/figma-patterns.js +516 -0
- package/tools/figma-plugin/code.js +453 -0
- package/tools/figma-plugin/manifest.json +14 -0
- package/tools/figma-plugin/ui.html +268 -0
- package/tools/figma-render.js +293 -0
- package/tools/figma-tokens.js +712 -0
- package/tools/figma-upload.js +318 -0
- package/tools/generate.js +738 -0
- package/tools/icons.js +133 -0
- package/tools/init-templates.js +265 -0
- package/tools/install-hooks.sh +5 -0
- package/tools/migrations/0.5.0.js +53 -0
- package/tools/migrations/0.6.0.js +95 -0
- package/tools/minify.js +170 -0
- package/tools/pre-commit +4 -0
- package/tools/registry.js +662 -0
- package/tools/reset-playground.js +61 -0
- package/tools/starter-templates/content-site/app.js +49 -0
- package/tools/starter-templates/content-site/essence.js +19 -0
- package/tools/starter-templates/content-site/pages.js +31 -0
- package/tools/starter-templates/ecommerce/app.js +50 -0
- package/tools/starter-templates/ecommerce/essence.js +19 -0
- package/tools/starter-templates/ecommerce/pages.js +31 -0
- package/tools/starter-templates/landing-page/app.js +38 -0
- package/tools/starter-templates/landing-page/essence.js +18 -0
- package/tools/starter-templates/landing-page/pages.js +21 -0
- package/tools/starter-templates/portfolio/app.js +45 -0
- package/tools/starter-templates/portfolio/essence.js +19 -0
- package/tools/starter-templates/portfolio/pages.js +33 -0
- package/tools/starter-templates/saas-dashboard/app.js +70 -0
- package/tools/starter-templates/saas-dashboard/essence.js +19 -0
- package/tools/starter-templates/saas-dashboard/pages.js +31 -0
- package/tools/verify-pack.js +203 -0
- package/types/chart.d.ts +77 -0
- package/types/components.d.ts +587 -0
- package/types/core.d.ts +89 -0
- package/types/css.d.ts +149 -0
- package/types/data.d.ts +238 -0
- package/types/form.d.ts +164 -0
- package/types/i18n.d.ts +51 -0
- package/types/icons.d.ts +27 -0
- package/types/index.d.ts +13 -0
- package/types/router.d.ts +116 -0
- package/types/ssr.d.ts +102 -0
- package/types/state.d.ts +83 -0
- package/types/tags.d.ts +62 -0
- package/types/tannins.d.ts +63 -0
- package/types/test.d.ts +48 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "auth-form",
|
|
4
|
+
"name": "Auth Form",
|
|
5
|
+
"description": "Authentication form with login, registration, and password recovery flows. Centered card layout with branding and social auth options.",
|
|
6
|
+
"components": ["Input", "Button", "Card", "Card.Header", "Card.Body", "Card.Footer", "Separator"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "stack",
|
|
9
|
+
"atoms": "_flex _flexCol _itemsCenter _justifyCenter _minHScreen _p6",
|
|
10
|
+
"slots": {
|
|
11
|
+
"branding": "Logo and app name at top with _heading4 _textCenter",
|
|
12
|
+
"form": "Input fields (email, password) inside a Card with validation and submit Button",
|
|
13
|
+
"footer": "Card.Footer with links to alternate flows (sign up / forgot password) and optional social auth Buttons separated by Separator"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"recipe_overrides": {
|
|
17
|
+
"command-center": {
|
|
18
|
+
"wrapper": "cc-frame-sm",
|
|
19
|
+
"atoms": "cc-grid",
|
|
20
|
+
"notes": "Card uses cc-frame-sm. Branding uses cc-label with cc-glow. Submit button gets cc-glow. Background uses cc-grid."
|
|
21
|
+
},
|
|
22
|
+
"auradecantism": {
|
|
23
|
+
"wrapper": "d-mesh",
|
|
24
|
+
"atoms": "",
|
|
25
|
+
"notes": "Auth page on d-mesh background. Card uses d-glass. Brand text uses d-gradient-text. Submit button prominent."
|
|
26
|
+
},
|
|
27
|
+
"clean": {
|
|
28
|
+
"wrapper": "",
|
|
29
|
+
"atoms": "_bgmuted",
|
|
30
|
+
"notes": "Simple centered card on muted background. Standard form styling."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"code": {
|
|
34
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { createSignal } from 'decantr/state';\nimport { css } from 'decantr/css';\nimport { Input, Button, Card, Separator } from 'decantr/components';\nimport { link } from 'decantr/router';",
|
|
35
|
+
"example": "function AuthForm() {\n const { div, h2, p, span } = tags;\n const [email, setEmail] = createSignal('');\n const [password, setPassword] = createSignal('');\n\n return div({ class: css('_flex _col _aic _jcc _minhscreen _p6') },\n Card({ class: css('_w[400px] _mw[100%]') },\n Card.Header({},\n h2({ class: css('_heading4 _tc') }, 'Sign In'),\n p({ class: css('_fgmuted _tc _mt1') }, 'Enter your credentials to continue')\n ),\n Card.Body({ class: css('_flex _col _gap3') },\n Input({ label: 'Email', type: 'email', placeholder: 'you@example.com', value: email, onchange: e => setEmail(e.target.value) }),\n Input({ label: 'Password', type: 'password', placeholder: '••••••••', value: password, onchange: e => setPassword(e.target.value) }),\n Button({ variant: 'primary', class: css('_wfull _mt2') }, 'Sign In')\n ),\n Card.Footer({ class: css('_flex _col _gap3 _aic') },\n Separator(),\n span({ class: css('_fgmuted _textsm') }, 'Don\\'t have an account? ', link({ href: '/register' }, 'Sign Up'))\n )\n )\n );\n}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "author-card",
|
|
4
|
+
"name": "Author Card",
|
|
5
|
+
"description": "Author attribution card with avatar, name, bio, and social links.",
|
|
6
|
+
"components": ["Card", "Avatar", "Badge", "Text", "Button"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "row",
|
|
9
|
+
"atoms": "_flex _gap4 _aic _p4",
|
|
10
|
+
"slots": {
|
|
11
|
+
"avatar": "Author Avatar image",
|
|
12
|
+
"author-info": "Name, bio text, and optional role Badge",
|
|
13
|
+
"social-links": "Row of social link Buttons or icon links"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"code": {
|
|
17
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Avatar, Button, icon } from 'decantr/components';",
|
|
18
|
+
"example": "function AuthorCard() {\n const { div, h3, p } = tags;\n const author = {\n avatar: '', name: 'Jane Doe',\n bio: 'Senior Design Engineer focusing on design systems and component architecture.',\n socials: [{ icon: 'github' }, { icon: 'twitter' }, { icon: 'linkedin' }]\n };\n\n return div({ class: css('_flex _gap4 _p4 _b1 _r4') },\n Avatar({ src: author.avatar, name: author.name, size: 'lg' }),\n div({ class: css('_flex _col _gap2 _flex1') },\n h3({ class: css('_heading5') }, author.name),\n p({ class: css('_textsm _fgmuted') }, author.bio),\n div({ class: css('_flex _gap2 _mt1') },\n ...author.socials.map(s =>\n Button({ variant: 'ghost', size: 'sm' }, icon(s.icon))\n )\n )\n )\n );\n}"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v2.json",
|
|
3
|
+
"id": "card-grid",
|
|
4
|
+
"name": "Card Grid",
|
|
5
|
+
"description": "Responsive grid of cards with configurable content. Supports product catalogs, recipe collections, feature showcases, and collection browsers via presets.",
|
|
6
|
+
"components": ["Card", "Card.Header", "Card.Body", "Card.Footer", "Button", "Badge", "icon"],
|
|
7
|
+
"default_preset": "product",
|
|
8
|
+
"presets": {
|
|
9
|
+
"product": {
|
|
10
|
+
"description": "Product cards with image, title, price, CTA. For e-commerce catalogs.",
|
|
11
|
+
"components": ["Card", "Card.Body", "Button", "Badge", "Image", "icon"],
|
|
12
|
+
"blend": {
|
|
13
|
+
"layout": "grid",
|
|
14
|
+
"atoms": "_grid _gc3 _gap6 _p4",
|
|
15
|
+
"slots": {
|
|
16
|
+
"card-image": "Product image in Card.Header with aspect ratio container",
|
|
17
|
+
"card-body": "Card.Body with product title (_heading6), description (_caption), price (_heading5)",
|
|
18
|
+
"card-footer": "Card.Footer with primary Button CTA and optional secondary action",
|
|
19
|
+
"badge": "Optional Badge overlay for sale/new/featured status"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"code": {
|
|
23
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, Badge, Button, Image } from 'decantr/components';",
|
|
24
|
+
"example": "function ProductGrid() {\n const { div, span, h3 } = tags;\n const products = [\n { image: '/images/product-1.jpg', name: 'Wireless Headphones', badge: 'New', description: 'Premium noise-cancelling headphones.', price: 199.99 },\n { image: '/images/product-2.jpg', name: 'Mechanical Keyboard', badge: null, description: 'RGB backlit mechanical keyboard.', price: 149.99 },\n { image: '/images/product-3.jpg', name: 'USB-C Hub', badge: 'Sale', description: '7-in-1 USB-C hub with HDMI output.', price: 49.99 },\n { image: '/images/product-4.jpg', name: 'Monitor Stand', badge: null, description: 'Adjustable aluminum monitor stand.', price: 79.99 }\n ];\n\n return div({ class: css('_grid _gcaf280 _gap4 _p4') },\n ...products.map(p =>\n Card({},\n Image({ src: p.image, alt: p.name, class: css('_wfull _h[200px] _object[cover]') }),\n Card.Body({ class: css('_flex _col _gap2') },\n div({ class: css('_flex _aic _jcsb') },\n h3({ class: css('_heading5') }, p.name),\n p.badge ? Badge({ variant: 'accent' }, p.badge) : null\n ),\n span({ class: css('_fgmuted _textsm') }, p.description),\n div({ class: css('_flex _aic _jcsb _mt2') },\n span({ class: css('_heading4') }, `$${p.price}`),\n Button({ variant: 'primary', size: 'sm' }, 'Add to Cart')\n )\n )\n )\n )\n );\n}"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"content": {
|
|
28
|
+
"description": "Content cards with cover image, metadata, tags, and author attribution. For recipe/article feeds.",
|
|
29
|
+
"components": ["Card", "Card.Body", "Chip", "Avatar", "Badge", "icon"],
|
|
30
|
+
"blend": {
|
|
31
|
+
"layout": "grid",
|
|
32
|
+
"atoms": "_grid _gc3 _gap6 _p4",
|
|
33
|
+
"slots": {
|
|
34
|
+
"card-image": "Cover photo with aspect ratio container and optional Badge overlay",
|
|
35
|
+
"card-body": "Title (_heading5), truncated description (_caption _fgmuted), metadata row",
|
|
36
|
+
"card-tags": "Horizontal Chip row for tags",
|
|
37
|
+
"card-footer": "Author Avatar + name link, optional count"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"code": {
|
|
41
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, Chip, Avatar, Badge, icon } from 'decantr/components';",
|
|
42
|
+
"example": "function ContentCardGrid({ items }) {\n const { div, span, h3, img } = tags;\n\n return div({ class: css('_grid _gc3 _gap6 _p4') },\n ...items.map(item =>\n Card({},\n img({ src: item.image, alt: item.title, class: css('_wfull _h[200px] _object[cover]') }),\n Card.Body({ class: css('_flex _col _gap2') },\n h3({ class: css('_heading5') }, item.title),\n span({ class: css('_caption _fgmuted _lineClamp2') }, item.description),\n div({ class: css('_flex _aic _gap3 _fgmuted _textsm') },\n span({}, icon('clock'), ` ${item.time} min`),\n span({}, icon('users'), ` ${item.servings} servings`)\n ),\n div({ class: css('_flex _gap1 _flexWrap') },\n ...(item.tags || []).map(t => Chip({ size: 'sm' }, t))\n ),\n div({ class: css('_flex _aic _jcsb _mt2') },\n div({ class: css('_flex _aic _gap2') },\n Avatar({ src: item.author?.avatar, size: 'xs' }),\n span({ class: css('_textsm') }, item.author?.name)\n ),\n span({ class: css('_textsm _fgmuted') }, icon('git-fork'), ` ${item.forks || 0}`)\n )\n )\n )\n )\n );\n}"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"collection": {
|
|
46
|
+
"description": "Collection cards with cover image, title, item count, and status badge. For browsing grouped content.",
|
|
47
|
+
"components": ["Card", "Card.Body", "Badge", "icon"],
|
|
48
|
+
"blend": {
|
|
49
|
+
"layout": "grid",
|
|
50
|
+
"atoms": "_grid _gc3 _gap6 _p4",
|
|
51
|
+
"slots": {
|
|
52
|
+
"card-image": "Collection cover image with aspect ratio container",
|
|
53
|
+
"card-body": "Title (_heading5), description (_caption _fgmuted), item count",
|
|
54
|
+
"card-badge": "Badge showing public/private or other status"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"code": {
|
|
58
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, Badge, icon } from 'decantr/components';",
|
|
59
|
+
"example": "function CollectionGrid({ collections }) {\n const { div, span, h3, img } = tags;\n\n return div({ class: css('_grid _gc3 _gap6 _p4') },\n ...collections.map(col =>\n Card({},\n img({ src: col.cover, alt: col.title, class: css('_wfull _h[180px] _object[cover]') }),\n Card.Body({ class: css('_flex _col _gap2') },\n div({ class: css('_flex _aic _jcsb') },\n h3({ class: css('_heading5') }, col.title),\n Badge({ variant: col.isPublic ? 'success' : 'default' }, col.isPublic ? 'Public' : 'Private')\n ),\n span({ class: css('_caption _fgmuted _lineClamp2') }, col.description),\n span({ class: css('_textsm _fgmuted') }, icon('book-open'), ` ${col.itemCount} items`)\n )\n )\n )\n );\n}"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"icon": {
|
|
63
|
+
"description": "Feature cards with icon, title, and description. For landing page capabilities.",
|
|
64
|
+
"components": ["Card", "Card.Body", "icon"],
|
|
65
|
+
"blend": {
|
|
66
|
+
"layout": "grid",
|
|
67
|
+
"atoms": "_grid _gc3 _gap6 _p4",
|
|
68
|
+
"slots": {
|
|
69
|
+
"cards": "Array of feature cards, each with icon circle, title (_heading5), and description (_caption _fgmuted)"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"code": {
|
|
73
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, icon } from 'decantr/components';",
|
|
74
|
+
"example": "function FeatureGrid({ features }) {\n const { div, h3, p } = tags;\n\n return div({ class: css('_grid _gc3 _gap6 _p4') },\n ...features.map(f =>\n Card({},\n Card.Body({ class: css('_flex _col _gap3 _aic _tc') },\n div({ class: css('_w[48px] _h[48px] _r4 _bgmuted _flex _aic _jcc _fgprimary') },\n icon(f.icon)\n ),\n h3({ class: css('_heading5') }, f.title),\n p({ class: css('_caption _fgmuted') }, f.description)\n )\n )\n )\n );\n}"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"default_blend": {
|
|
79
|
+
"layout": "grid",
|
|
80
|
+
"atoms": "_grid _gc3 _gap6 _p4",
|
|
81
|
+
"slots": {
|
|
82
|
+
"card-image": "Card image with aspect ratio container",
|
|
83
|
+
"card-body": "Card.Body with title, description, and metadata",
|
|
84
|
+
"card-footer": "Card.Footer with CTA and optional secondary action",
|
|
85
|
+
"badge": "Optional Badge overlay for status"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"recipe_overrides": {
|
|
89
|
+
"command-center": {
|
|
90
|
+
"wrapper": "cc-frame",
|
|
91
|
+
"atoms": "cc-grid",
|
|
92
|
+
"notes": "Cards use cc-frame-sm. Prices/counts use cc-data. Badges use cc-label. Grid background gets cc-grid.",
|
|
93
|
+
"preset_notes": {
|
|
94
|
+
"product": "Each Card uses cc-frame-sm. Prices use cc-data with cc-glow. Badge uses cc-label.",
|
|
95
|
+
"content": "Cards use cc-frame-sm. Metadata uses cc-data. Tag chips use cc-label.",
|
|
96
|
+
"collection": "Cards use cc-frame-sm. Item count uses cc-data. Status badge uses cc-label.",
|
|
97
|
+
"icon": "Cards use cc-frame-sm. Icons use cc-glow. Titles use cc-label."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"auradecantism": {
|
|
101
|
+
"wrapper": "",
|
|
102
|
+
"atoms": "",
|
|
103
|
+
"notes": "Cards use d-glass. Titles highlighted on hover. Subtle aura-glow on card border.",
|
|
104
|
+
"preset_notes": {
|
|
105
|
+
"product": "Product cards use d-glass. Price highlighted. CTA button with aura-glow.",
|
|
106
|
+
"content": "Content cards use d-glass. Title highlighted. Hover reveals subtle aura-glow.",
|
|
107
|
+
"collection": "Collection cards use d-glass. Title highlighted on hover.",
|
|
108
|
+
"icon": "Feature cards use d-glass. Icon circles use d-gradient-text. Subtle hover glow."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"clean": {
|
|
112
|
+
"wrapper": "",
|
|
113
|
+
"atoms": "",
|
|
114
|
+
"notes": "Standard cards with subtle shadow. Clean image + text layout. No extra decoration.",
|
|
115
|
+
"preset_notes": {
|
|
116
|
+
"product": "Standard product cards with shadow. Clean image + text layout.",
|
|
117
|
+
"content": "Standard card with subtle shadow. Clean image + text layout.",
|
|
118
|
+
"collection": "Standard cards with subtle shadow. Clean image + text layout.",
|
|
119
|
+
"icon": "Standard cards with subtle border. Clean icon + text layout."
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"code": {
|
|
124
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, Badge, Button, Image } from 'decantr/components';",
|
|
125
|
+
"example": "function ProductGrid() {\n const { div, span, h3 } = tags;\n const products = [\n { image: '/images/product-1.jpg', name: 'Wireless Headphones', badge: 'New', description: 'Premium noise-cancelling headphones.', price: 199.99 },\n { image: '/images/product-2.jpg', name: 'Mechanical Keyboard', badge: null, description: 'RGB backlit mechanical keyboard.', price: 149.99 }\n ];\n\n return div({ class: css('_grid _gcaf280 _gap4 _p4') },\n ...products.map(p =>\n Card({},\n Image({ src: p.image, alt: p.name, class: css('_wfull _h[200px] _object[cover]') }),\n Card.Body({ class: css('_flex _col _gap2') },\n div({ class: css('_flex _aic _jcsb') },\n h3({ class: css('_heading5') }, p.name),\n p.badge ? Badge({ variant: 'accent' }, p.badge) : null\n ),\n span({ class: css('_fgmuted _textsm') }, p.description),\n div({ class: css('_flex _aic _jcsb _mt2') },\n span({ class: css('_heading4') }, `$${p.price}`),\n Button({ variant: 'primary', size: 'sm' }, 'Add to Cart')\n )\n )\n )\n )\n );\n}"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "category-nav",
|
|
4
|
+
"name": "Category Navigation",
|
|
5
|
+
"description": "Horizontal pill or tab navigation for filtering content by category. Scrollable on narrow viewports. Pairs with post-list and product-grid patterns.",
|
|
6
|
+
"components": ["Chip", "Badge", "Button", "Segmented"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "flex",
|
|
9
|
+
"atoms": "_flex _gap2 _p2 _overflowXAuto _flexWrap",
|
|
10
|
+
"slots": {
|
|
11
|
+
"categories": "Row of Chip or Segmented elements with active state styling",
|
|
12
|
+
"count-badges": "Optional Badge on each category showing item count"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"recipe_overrides": {
|
|
16
|
+
"command-center": {
|
|
17
|
+
"wrapper": "none",
|
|
18
|
+
"atoms": "cc-bar",
|
|
19
|
+
"notes": "Entire nav uses cc-bar. Active category gets cc-glow. Count badges use cc-data. Category labels use cc-label."
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"code": {
|
|
23
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { createSignal } from 'decantr/state';\nimport { css } from 'decantr/css';\nimport { Chip } from 'decantr/components';",
|
|
24
|
+
"example": "function CategoryNav() {\n const { div } = tags;\n const categories = [\n { id: 'design', name: 'Design' },\n { id: 'engineering', name: 'Engineering' },\n { id: 'product', name: 'Product' },\n { id: 'marketing', name: 'Marketing' }\n ];\n const [active, setActive] = createSignal('all');\n\n return div({ class: css('_flex _gap2 _wrap _py3 _overflow[auto]') },\n Chip({\n label: 'All',\n variant: active() === 'all' ? 'primary' : 'outline',\n onclick: () => setActive('all')\n }),\n ...categories.map(cat =>\n Chip({\n label: cat.name,\n variant: active() === cat.id ? 'primary' : 'outline',\n onclick: () => setActive(cat.id)\n })\n )\n );\n}"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "chart-grid",
|
|
4
|
+
"name": "Chart Grid",
|
|
5
|
+
"description": "Responsive grid of chart containers for data visualization dashboards. Charts use their own title prop — no Card wrapping.",
|
|
6
|
+
"components": ["Chart", "Select"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "grid",
|
|
9
|
+
"atoms": "_grid _gc2 _gap4 _p4",
|
|
10
|
+
"slots": {
|
|
11
|
+
"header": "Dashboard section title with _heading4 and time-range Select",
|
|
12
|
+
"charts": "Array of Chart({ type }) instances (line, bar, pie, area) using the title prop directly"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"recipe_overrides": {
|
|
16
|
+
"command-center": {
|
|
17
|
+
"wrapper": "cc-frame",
|
|
18
|
+
"atoms": "cc-grid",
|
|
19
|
+
"notes": "Chart titles use cc-label. Axis labels use cc-data. Background gets cc-grid. Header uses cc-bar."
|
|
20
|
+
},
|
|
21
|
+
"auradecantism": {
|
|
22
|
+
"wrapper": "d-glass",
|
|
23
|
+
"atoms": "_r4",
|
|
24
|
+
"notes": "Each chart in d-glass panel. Chart title uses d-gradient-text. Section background can use d-mesh."
|
|
25
|
+
},
|
|
26
|
+
"clean": {
|
|
27
|
+
"wrapper": "",
|
|
28
|
+
"atoms": "_b1 _r4",
|
|
29
|
+
"notes": "Charts in simple bordered containers. Clean header with border-bottom divider."
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"code": {
|
|
33
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Select } from 'decantr/components';\nimport { Chart } from 'decantr/chart';",
|
|
34
|
+
"example": "function ChartGrid() {\n const { div, h2 } = tags;\n const data = {\n revenue: [{ date: 'Jan', value: 4200 }, { date: 'Feb', value: 5100 }, { date: 'Mar', value: 4800 }, { date: 'Apr', value: 6200 }],\n orders: [{ month: 'Jan', count: 120 }, { month: 'Feb', count: 145 }, { month: 'Mar', count: 132 }, { month: 'Apr', count: 168 }],\n categories: [{ name: 'Electronics', value: 42 }, { name: 'Clothing', value: 28 }, { name: 'Books', value: 18 }, { name: 'Home', value: 12 }],\n traffic: [{ date: 'Jan', visits: 8400 }, { date: 'Feb', visits: 9200 }, { date: 'Mar', visits: 8800 }, { date: 'Apr', visits: 11500 }]\n };\n\n return div({ class: css('_flex _col _gap4') },\n div({ class: css('_flex _aic _jcsb') },\n h2({ class: css('_heading4') }, 'Analytics'),\n Select({ value: '7d', options: [\n { label: 'Last 7 days', value: '7d' },\n { label: 'Last 30 days', value: '30d' },\n { label: 'Last 90 days', value: '90d' }\n ] })\n ),\n div({ class: css('_grid _gc2 _gap4') },\n Chart({ type: 'line', data: data.revenue, x: 'date', y: 'value', title: 'Revenue', height: 280 }),\n Chart({ type: 'bar', data: data.orders, x: 'month', y: 'count', title: 'Orders', height: 280 }),\n Chart({ type: 'pie', data: data.categories, x: 'name', y: 'value', title: 'Categories', height: 280 }),\n Chart({ type: 'area', data: data.traffic, x: 'date', y: 'visits', title: 'Traffic', height: 280 })\n )\n );\n}"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "chat-interface",
|
|
4
|
+
"name": "Chat Interface",
|
|
5
|
+
"description": "AI chat interface with scrollable message area, suggestion prompt chips, and input bar with send button. Messages alternate between user and assistant bubbles. Used for chef chat and AI cooking assistants.",
|
|
6
|
+
"components": ["Card", "Card.Body", "Input", "Button", "Avatar", "Chip", "ScrollArea", "icon"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "stack",
|
|
9
|
+
"atoms": "_flex _col _h[calc(100vh-200px)] _b1 _r4 _overflow[hidden]",
|
|
10
|
+
"slots": {
|
|
11
|
+
"messages": "ScrollArea of chat bubbles — user messages right-aligned, assistant messages left-aligned with Avatar",
|
|
12
|
+
"suggestions": "Horizontal row of Chip suggestion prompts (e.g. 'What can I make with chicken?')",
|
|
13
|
+
"input-bar": "Bottom bar with text Input and send Button"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"recipe_overrides": {
|
|
17
|
+
"command-center": {
|
|
18
|
+
"wrapper": "cc-frame",
|
|
19
|
+
"atoms": "",
|
|
20
|
+
"notes": "Chat frame uses cc-frame. Assistant messages use cc-data. Suggestion chips use cc-label. Send button uses cc-glow."
|
|
21
|
+
},
|
|
22
|
+
"auradecantism": {
|
|
23
|
+
"wrapper": "d-glass",
|
|
24
|
+
"atoms": "_r4",
|
|
25
|
+
"notes": "Chat container on d-glass. Assistant avatar has aura-glow ring. User messages use accent background."
|
|
26
|
+
},
|
|
27
|
+
"clean": {
|
|
28
|
+
"wrapper": "",
|
|
29
|
+
"atoms": "_b1 _r4",
|
|
30
|
+
"notes": "Simple bordered chat container. Clean message bubbles with muted backgrounds."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"code": {
|
|
34
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { createSignal } from 'decantr/state';\nimport { css } from 'decantr/css';\nimport { Card, Input, Button, Avatar, Chip, ScrollArea, icon } from 'decantr/components';",
|
|
35
|
+
"example": "function ChatInterface() {\n const { div, span, p } = tags;\n const [input, setInput] = createSignal('');\n const [messages, setMessages] = createSignal([\n { role: 'assistant', text: 'Hi! I\\'m your AI chef assistant. Ask me anything about cooking!' }\n ]);\n const suggestions = ['What can I make with chicken?', 'Suggest a quick dinner', 'How do I make pasta from scratch?'];\n\n const send = () => {\n if (!input()) return;\n setMessages([...messages(), { role: 'user', text: input() }]);\n setInput('');\n };\n\n return div({ class: css('_flex _col _h[calc(100vh-200px)] _b1 _r4 _overflow[hidden]') },\n ScrollArea({ class: css('_flex1 _p4') },\n div({ class: css('_flex _col _gap3') },\n ...messages().map(m =>\n div({ class: css(m.role === 'user' ? '_flex _jce' : '_flex _gap2') },\n m.role === 'assistant' ? Avatar({ size: 'sm', fallback: 'AI' }) : null,\n div({ class: css(`_p3 _r4 _mw[70%] ${m.role === 'user' ? '_bgprimary _fgprimary' : '_bgmuted'}`) },\n p({}, m.text)\n )\n )\n )\n )\n ),\n div({ class: css('_flex _gap2 _p3 _borderb _flexWrap') },\n ...suggestions.map(s =>\n Chip({ variant: 'outline', onclick: () => setInput(s) }, s)\n )\n ),\n div({ class: css('_flex _gap2 _p3 _bordert') },\n Input({ placeholder: 'Ask your chef assistant...', value: input, onchange: e => setInput(e.target.value), class: css('_flex1') }),\n Button({ variant: 'primary', onclick: send }, icon('send'))\n )\n );\n}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v2.json",
|
|
3
|
+
"id": "checklist-card",
|
|
4
|
+
"name": "Checklist Card",
|
|
5
|
+
"description": "Item list in a Card with optional checkboxes for completion tracking. Used for ingredient lists, task lists, and checklists.",
|
|
6
|
+
"components": ["Card", "Card.Header", "Card.Body", "Checkbox", "icon"],
|
|
7
|
+
"default_preset": "default",
|
|
8
|
+
"presets": {
|
|
9
|
+
"default": {
|
|
10
|
+
"description": "Vertical list of items with Checkbox for completion tracking inside a Card.",
|
|
11
|
+
"components": ["Card", "Card.Header", "Card.Body", "Checkbox", "icon"],
|
|
12
|
+
"blend": {
|
|
13
|
+
"layout": "stack",
|
|
14
|
+
"atoms": "_flex _col _gap0",
|
|
15
|
+
"slots": {
|
|
16
|
+
"header": "Card.Header with title and optional count/adjuster",
|
|
17
|
+
"list": "Vertical list of items with Checkbox for completion tracking"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"code": {
|
|
21
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, Checkbox, icon } from 'decantr/components';",
|
|
22
|
+
"example": "function ChecklistCard({ title, items }) {\n const { div, h3, span } = tags;\n\n return Card({},\n Card.Header({},\n div({ class: css('_flex _aic _jcsb') },\n h3({ class: css('_heading5') }, icon('list'), ` ${title}`),\n span({ class: css('_textsm _fgmuted') }, `${items.length} items`)\n )\n ),\n Card.Body({ class: css('_flex _col _gap2') },\n ...items.map(item =>\n Checkbox({ label: typeof item === 'string' ? item : `${item.quantity} ${item.unit} ${item.name}${item.preparation ? ' — ' + item.preparation : ''}` })\n )\n )\n );\n}"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"default_blend": {
|
|
27
|
+
"layout": "stack",
|
|
28
|
+
"atoms": "_flex _col _gap0",
|
|
29
|
+
"slots": {
|
|
30
|
+
"header": "Card.Header with title and optional count",
|
|
31
|
+
"list": "Vertical list of items with Checkbox"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"recipe_overrides": {
|
|
35
|
+
"command-center": {
|
|
36
|
+
"wrapper": "cc-frame-sm",
|
|
37
|
+
"atoms": "",
|
|
38
|
+
"notes": "Card uses cc-frame-sm. Quantities use cc-data. Checked items dimmed."
|
|
39
|
+
},
|
|
40
|
+
"auradecantism": {
|
|
41
|
+
"wrapper": "d-glass",
|
|
42
|
+
"atoms": "_r4",
|
|
43
|
+
"notes": "Card on glass background. Section title uses d-gradient-text."
|
|
44
|
+
},
|
|
45
|
+
"clean": {
|
|
46
|
+
"wrapper": "",
|
|
47
|
+
"atoms": "_b1 _r4",
|
|
48
|
+
"notes": "Simple bordered card. Clean checkbox list."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"code": {
|
|
52
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Card, Checkbox, icon } from 'decantr/components';",
|
|
53
|
+
"example": "function ChecklistCard({ title, items }) {\n const { div, h3, span } = tags;\n\n return Card({},\n Card.Header({},\n div({ class: css('_flex _aic _jcsb') },\n h3({ class: css('_heading5') }, icon('list'), ` ${title}`),\n span({ class: css('_textsm _fgmuted') }, `${items.length} items`)\n )\n ),\n Card.Body({ class: css('_flex _col _gap2') },\n ...items.map(item =>\n Checkbox({ label: typeof item === 'string' ? item : item.text })\n )\n )\n );\n}"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "comparison-panel",
|
|
4
|
+
"name": "Comparison Panel",
|
|
5
|
+
"description": "Side-by-side metric comparison across two or more periods, segments, or benchmarks. Each column shows labeled value, trend indicator, mini chart, and delta from baseline.",
|
|
6
|
+
"components": ["Statistic", "Sparkline", "Badge", "Chart", "Separator"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "grid",
|
|
9
|
+
"atoms": "_grid _gc3 _gap4 _p4",
|
|
10
|
+
"slots": {
|
|
11
|
+
"header": "Comparison title with _heading4 and metric/period selector",
|
|
12
|
+
"columns": "Grid of comparison columns. Each: label (Text), value (Statistic), delta Badge, trend Sparkline, optional mini Chart with reference line annotation",
|
|
13
|
+
"summary": "Optional bottom row with overall comparison verdict"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"recipe_overrides": {
|
|
17
|
+
"command-center": {
|
|
18
|
+
"wrapper": "cc-frame",
|
|
19
|
+
"atoms": "cc-grid",
|
|
20
|
+
"notes": "Values use cc-data. Positive deltas get cc-glow. Negative deltas get warning. Mini charts inherit cc-grid. Header uses cc-bar."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"code": {
|
|
24
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Statistic, Badge, Separator } from 'decantr/components';\nimport { Sparkline } from 'decantr/chart';",
|
|
25
|
+
"example": "function ComparisonPanel() {\n const { div, h3, span } = tags;\n const periods = [\n { label: 'This Quarter', revenue: 142000, delta: 12.5, trend: [40, 52, 48, 61, 58, 72] },\n { label: 'Last Quarter', revenue: 126200, delta: -3.1, trend: [38, 42, 40, 44, 41, 43] },\n { label: 'Year Ago', revenue: 98400, delta: 0, trend: [30, 32, 28, 35, 33, 34] }\n ];\n\n return div({ class: css('_flex _col _gap4 _p4') },\n h3({ class: css('_heading4') }, 'Period Comparison'),\n div({ class: css('_grid _gc3 _gap4') },\n ...periods.map(period =>\n div({ class: css('_flex _col _gap3 _p4 _b1 _r4') },\n span({ class: css('_textsm _fgmuted _bold') }, period.label),\n Statistic({ label: 'Revenue', value: period.revenue, prefix: '$' }),\n div({ class: css('_flex _aic _gap2') },\n Badge({ variant: period.delta > 0 ? 'success' : 'error' }, `${period.delta > 0 ? '+' : ''}${period.delta}%`),\n span({ class: css('_textxs _fgmuted') }, 'vs baseline')\n ),\n Sparkline({ data: period.trend, height: 40 })\n )\n )\n )\n );\n}"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "component-showcase",
|
|
4
|
+
"name": "Component Showcase",
|
|
5
|
+
"description": "Auto-generated component demo from registry spec. Renders variant grid, size grid, state demos, and interactive sandbox. Used by workbench, docs site, and CLI preview.",
|
|
6
|
+
"components": ["*"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "stack",
|
|
9
|
+
"atoms": "_flex _col _gap10",
|
|
10
|
+
"slots": {
|
|
11
|
+
"variant-grid": "Labeled flex grid of all variant enum values, merged with showcase.defaults",
|
|
12
|
+
"size-grid": "Labeled flex grid of all size enum values, merged with showcase.defaults",
|
|
13
|
+
"state-grid": "Labeled flex grid of boolean states toggled on, merged with showcase.defaults",
|
|
14
|
+
"examples": "Curated preset cards (.de-example-card): live demo + name + description from showcase.examples",
|
|
15
|
+
"interactive-sandbox": "Unified card (.de-sandbox): demo area left (.de-sandbox-demo) + flush props sidebar right (.de-sandbox-props). PropsPanel pre-populated with showcase.defaults.",
|
|
16
|
+
"code-example": "CodeBlock with generated import and usage, uses showcase.labelProp for API shape"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"recipe_overrides": {},
|
|
20
|
+
"code": {
|
|
21
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { createSignal } from 'decantr/state';\nimport { css } from 'decantr/css';\nimport { Card, Tabs, Badge, Button } from 'decantr/components';",
|
|
22
|
+
"example": "function ComponentShowcase() {\n const { div, h2, p, pre, code: codeEl } = tags;\n const name = 'Button';\n const description = 'Interactive button component with multiple variants and sizes.';\n const variants = [\n Button({ variant: 'primary' }, 'Primary'),\n Button({ variant: 'secondary' }, 'Secondary'),\n Button({ variant: 'outline' }, 'Outline'),\n Button({ variant: 'ghost' }, 'Ghost')\n ];\n const code = \"Button({ variant: 'primary' }, 'Click me')\";\n\n return Card({ class: css('_flex _col _gap4') },\n Card.Header({},\n div({ class: css('_flex _aic _gap3') },\n h2({ class: css('_heading4') }, name),\n Badge({}, 'Component')\n ),\n p({ class: css('_fgmuted _textsm _mt1') }, description)\n ),\n Card.Body({},\n Tabs({ items: [\n { label: 'Preview', content: () =>\n div({ class: css('_flex _wrap _gap4 _p4 _bgmuted _r4') }, ...variants)\n },\n { label: 'Code', content: () =>\n pre({ class: css('_p4 _bgmuted _r4 _overflow[auto]') }, codeEl({}, code))\n }\n ] })\n )\n );\n}"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "contact-form",
|
|
4
|
+
"name": "Contact Form",
|
|
5
|
+
"description": "Multi-field contact form with name, email, message, and optional subject/category.",
|
|
6
|
+
"components": ["Input", "Textarea", "Button", "Select"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "stack",
|
|
9
|
+
"atoms": "_flex _col _gap4 _maxw2xl _mx-auto",
|
|
10
|
+
"slots": {
|
|
11
|
+
"form-fields": "Stacked input fields for name, email, subject, and message",
|
|
12
|
+
"submit-row": "Submit button with optional cancel or reset action"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"recipe_overrides": {
|
|
16
|
+
"auradecantism": {
|
|
17
|
+
"wrapper": "d-glass",
|
|
18
|
+
"atoms": "_r4",
|
|
19
|
+
"notes": "Form in d-glass card. Submit button prominent. Heading uses d-gradient-text."
|
|
20
|
+
},
|
|
21
|
+
"clean": {
|
|
22
|
+
"wrapper": "",
|
|
23
|
+
"atoms": "",
|
|
24
|
+
"notes": "Standard card form. No extra decoration needed."
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"code": {
|
|
28
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { createSignal } from 'decantr/state';\nimport { css } from 'decantr/css';\nimport { Input, Textarea, Button, Select, Card } from 'decantr/components';",
|
|
29
|
+
"example": "function ContactForm() {\n const { div, h2, p } = tags;\n\n return Card({ class: css('_mw[600px] _mxa') },\n Card.Header({},\n h2({ class: css('_heading4') }, 'Get in Touch'),\n p({ class: css('_fgmuted _mt1') }, 'We\\'ll get back to you within 24 hours.')\n ),\n Card.Body({ class: css('_flex _col _gap4') },\n div({ class: css('_grid _gc2 _gap4') },\n Input({ label: 'First Name', placeholder: 'John' }),\n Input({ label: 'Last Name', placeholder: 'Doe' })\n ),\n Input({ label: 'Email', type: 'email', placeholder: 'john@example.com' }),\n Select({ label: 'Subject', options: [\n { label: 'General Inquiry', value: 'general' },\n { label: 'Sales', value: 'sales' },\n { label: 'Support', value: 'support' }\n ] }),\n Textarea({ label: 'Message', placeholder: 'Tell us about your project...', rows: 4 }),\n Button({ variant: 'primary', class: css('_wfull') }, 'Send Message')\n )\n );\n}"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "cta-section",
|
|
4
|
+
"name": "CTA Section",
|
|
5
|
+
"description": "Call-to-action section with headline, supporting text, and action buttons.",
|
|
6
|
+
"components": ["Button", "Title", "Text"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "stack",
|
|
9
|
+
"atoms": "_flex _col _aic _tc _gap4 _py12 _px6",
|
|
10
|
+
"slots": {
|
|
11
|
+
"headline": "Primary heading to drive user action",
|
|
12
|
+
"description": "Supporting text that reinforces the CTA message",
|
|
13
|
+
"cta-group": "One or more action buttons, typically primary + secondary"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"code": {
|
|
17
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Button } from 'decantr/components';",
|
|
18
|
+
"example": "function CtaSection() {\n const { div, h2, p } = tags;\n\n return div({ class: css('_flex _col _aic _tc _gap4 _py12 _px6 _bgmuted _r4') },\n h2({ class: css('_heading2') }, 'Ready to get started?'),\n p({ class: css('_body _fgmuted _mw[480px]') }, 'Join thousands of teams building better products with our platform.'),\n div({ class: css('_flex _gap3') },\n Button({ variant: 'primary', size: 'lg' }, 'Start Free Trial'),\n Button({ variant: 'outline', size: 'lg' }, 'Talk to Sales')\n )\n );\n}"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v1.json",
|
|
3
|
+
"id": "data-table",
|
|
4
|
+
"name": "Data Table",
|
|
5
|
+
"description": "Sortable, filterable, paginated data table with a toolbar for search, filters, and bulk actions.",
|
|
6
|
+
"components": ["DataTable", "Input", "Select", "Button", "Badge", "Chip"],
|
|
7
|
+
"default_blend": {
|
|
8
|
+
"layout": "stack",
|
|
9
|
+
"atoms": "_flex _flexCol _gap4 _p4",
|
|
10
|
+
"slots": {
|
|
11
|
+
"toolbar": "Horizontal bar with search Input, filter Select, action Buttons via _flex _gap3 _justifyBetween",
|
|
12
|
+
"table": "DataTable instance with columns, data, sort, and pagination props",
|
|
13
|
+
"bulk-actions": "Conditional bar shown when rows selected, with Buttons and Badge count"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"recipe_overrides": {
|
|
17
|
+
"command-center": {
|
|
18
|
+
"wrapper": "cc-frame",
|
|
19
|
+
"atoms": "cc-scanline",
|
|
20
|
+
"notes": "Toolbar gets cc-bar. Numeric cells use cc-data. Row hover uses cc-glow subtle. Table area wrapped in cc-scanline for data-heavy visual."
|
|
21
|
+
},
|
|
22
|
+
"auradecantism": {
|
|
23
|
+
"wrapper": "d-glass",
|
|
24
|
+
"atoms": "_r4 _overflow[hidden]",
|
|
25
|
+
"notes": "Table wrapped in d-glass with rounded overflow. Toolbar header with d-gradient-text title."
|
|
26
|
+
},
|
|
27
|
+
"clean": {
|
|
28
|
+
"wrapper": "",
|
|
29
|
+
"atoms": "_b1 _r4 _overflow[hidden]",
|
|
30
|
+
"notes": "Table in bordered container. Clean toolbar with border-bottom divider."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"code": {
|
|
34
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { createSignal } from 'decantr/state';\nimport { css } from 'decantr/css';\nimport { DataTable, Input, Select, Button, Badge } from 'decantr/components';",
|
|
35
|
+
"example": "function DataTablePattern() {\n const { div } = tags;\n const [search, setSearch] = createSignal('');\n const [status, setStatus] = createSignal('all');\n const columns = [\n { key: 'name', label: 'Name', sortable: true },\n { key: 'email', label: 'Email', sortable: true },\n { key: 'role', label: 'Role' },\n { key: 'status', label: 'Status' }\n ];\n const data = [\n { name: 'Alice Chen', email: 'alice@example.com', role: 'Admin', status: 'active' },\n { name: 'Bob Patel', email: 'bob@example.com', role: 'Editor', status: 'active' },\n { name: 'Carol Liu', email: 'carol@example.com', role: 'Viewer', status: 'inactive' },\n { name: 'Dan Kim', email: 'dan@example.com', role: 'Editor', status: 'active' }\n ];\n\n return div({ class: css('_flex _col _gap4') },\n div({ class: css('_flex _gap3 _aic _jcsb') },\n Input({ placeholder: 'Search...', value: search, onchange: e => setSearch(e.target.value) }),\n div({ class: css('_flex _gap2') },\n Select({ value: status, onchange: v => setStatus(v), options: [\n { label: 'All', value: 'all' },\n { label: 'Active', value: 'active' },\n { label: 'Inactive', value: 'inactive' }\n ] }),\n Button({ variant: 'outline' }, 'Export')\n )\n ),\n DataTable({ columns, data, sortable: true, paginate: true, pageSize: 10 })\n );\n}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://decantr.ai/schemas/pattern.v2.json",
|
|
3
|
+
"id": "detail-header",
|
|
4
|
+
"name": "Detail Header",
|
|
5
|
+
"description": "Page header with breadcrumb, title, status badge, and action buttons. Supports standard page headers and user profile headers via presets.",
|
|
6
|
+
"components": ["Breadcrumb", "Title", "Badge", "Button"],
|
|
7
|
+
"default_preset": "standard",
|
|
8
|
+
"presets": {
|
|
9
|
+
"standard": {
|
|
10
|
+
"description": "Page header with breadcrumb, title, status badge, and action buttons.",
|
|
11
|
+
"components": ["Breadcrumb", "Badge", "Button", "icon"],
|
|
12
|
+
"blend": {
|
|
13
|
+
"layout": "stack",
|
|
14
|
+
"atoms": "_flex _col _gap3 _pb4 _borderb",
|
|
15
|
+
"slots": {
|
|
16
|
+
"breadcrumb": "Breadcrumb navigation trail for page hierarchy",
|
|
17
|
+
"title-row": "Title with inline status Badge",
|
|
18
|
+
"actions": "Action Buttons for edit, delete, or export"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"code": {
|
|
22
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Breadcrumb, Badge, Button, icon } from 'decantr/components';",
|
|
23
|
+
"example": "function DetailHeader() {\n const { div, h1 } = tags;\n const title = 'Project Alpha';\n const breadcrumbs = [{ label: 'Home', href: '/' }, { label: 'Projects', href: '/projects' }, { label: 'Project Alpha' }];\n const status = 'active';\n\n return div({ class: css('_flex _col _gap3 _pb4 _borderB') },\n Breadcrumb({ items: breadcrumbs }),\n div({ class: css('_flex _aic _jcsb') },\n div({ class: css('_flex _aic _gap3') },\n h1({ class: css('_heading3') }, title),\n status ? Badge({ variant: status === 'active' ? 'success' : 'default' }, status) : null\n ),\n div({ class: css('_flex _gap2') },\n Button({ variant: 'outline', size: 'sm' }, icon('edit'), 'Edit'),\n Button({ variant: 'outline', size: 'sm' }, icon('share'), 'Share')\n )\n )\n );\n}"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"profile": {
|
|
27
|
+
"description": "User profile header with banner image, avatar, display name, bio, and edit button.",
|
|
28
|
+
"components": ["Avatar", "Button", "Upload", "Badge", "icon"],
|
|
29
|
+
"blend": {
|
|
30
|
+
"layout": "stack",
|
|
31
|
+
"atoms": "_flex _col _gap0",
|
|
32
|
+
"slots": {
|
|
33
|
+
"banner": "Full-width banner image (200px height) with gradient overlay",
|
|
34
|
+
"avatar-row": "Overlapping Avatar (offset -40px) with upload overlay on hover, plus edit Button",
|
|
35
|
+
"info": "Display name (_heading3), bio paragraph, location + website row with icons"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"code": {
|
|
39
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Avatar, Button, icon } from 'decantr/components';",
|
|
40
|
+
"example": "function ProfileHeader({ user }) {\n const { div, h2, p, span, img } = tags;\n\n return div({ class: css('_flex _col') },\n div({ class: css('_relative _wfull _h[200px] _overflow[hidden] _r4') },\n img({ src: user.banner, alt: 'Banner', class: css('_wfull _hfull _object[cover]') })\n ),\n div({ class: css('_flex _aic _jcsb _px6 _mt[-40px]') },\n div({ class: css('_flex _aic _gap4') },\n Avatar({ src: user.avatar, size: 'xl', class: css('_b[3px_solid_var(--d-bg)]') }),\n div({ class: css('_flex _col _gap1 _mt[40px]') },\n h2({ class: css('_heading3') }, user.name),\n p({ class: css('_fgmuted') }, user.bio),\n div({ class: css('_flex _aic _gap4 _textsm _fgmuted') },\n user.location ? span({}, icon('map-pin'), ` ${user.location}`) : null,\n user.website ? span({}, icon('link'), ` ${user.website}`) : null\n )\n )\n ),\n Button({ variant: 'outline', class: css('_mt[40px]') }, icon('edit'), 'Edit Profile')\n )\n );\n}"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"default_blend": {
|
|
45
|
+
"layout": "stack",
|
|
46
|
+
"atoms": "_flex _col _gap3 _pb4 _borderb",
|
|
47
|
+
"slots": {
|
|
48
|
+
"breadcrumb": "Breadcrumb navigation trail for page hierarchy",
|
|
49
|
+
"title-row": "Title with inline status Badge",
|
|
50
|
+
"actions": "Action Buttons for edit, delete, or export"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"recipe_overrides": {
|
|
54
|
+
"command-center": {
|
|
55
|
+
"wrapper": "cc-frame",
|
|
56
|
+
"atoms": "",
|
|
57
|
+
"notes": "Header uses cc-frame. Title uses cc-data. Actions get cc-glow.",
|
|
58
|
+
"preset_notes": {
|
|
59
|
+
"profile": "Banner uses cc-grid overlay. Avatar ring uses cc-glow. Name uses cc-data."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"auradecantism": {
|
|
63
|
+
"wrapper": "",
|
|
64
|
+
"atoms": "",
|
|
65
|
+
"notes": "Header blends with page background. Title can use d-gradient-text.",
|
|
66
|
+
"preset_notes": {
|
|
67
|
+
"profile": "Banner blends with d-mesh. Avatar has aura-glow ring. Name uses d-gradient-text."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"clean": {
|
|
71
|
+
"wrapper": "",
|
|
72
|
+
"atoms": "",
|
|
73
|
+
"notes": "Standard header with subtle border. Clean layout.",
|
|
74
|
+
"preset_notes": {
|
|
75
|
+
"profile": "Simple banner image. Clean avatar with border. Standard text layout."
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"code": {
|
|
80
|
+
"imports": "import { tags } from 'decantr/tags';\nimport { css } from 'decantr/css';\nimport { Breadcrumb, Badge, Button, icon } from 'decantr/components';",
|
|
81
|
+
"example": "function DetailHeader() {\n const { div, h1 } = tags;\n const title = 'Project Alpha';\n const breadcrumbs = [{ label: 'Home', href: '/' }, { label: 'Projects', href: '/projects' }, { label: 'Project Alpha' }];\n const status = 'active';\n\n return div({ class: css('_flex _col _gap3 _pb4 _borderB') },\n Breadcrumb({ items: breadcrumbs }),\n div({ class: css('_flex _aic _jcsb') },\n div({ class: css('_flex _aic _gap3') },\n h1({ class: css('_heading3') }, title),\n status ? Badge({ variant: status === 'active' ? 'success' : 'default' }, status) : null\n ),\n div({ class: css('_flex _gap2') },\n Button({ variant: 'outline', size: 'sm' }, icon('edit'), 'Edit'),\n Button({ variant: 'outline', size: 'sm' }, icon('share'), 'Share')\n )\n )\n );\n}"
|
|
82
|
+
}
|
|
83
|
+
}
|