@1agh/maude 0.15.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 +21 -0
- package/README.md +166 -0
- package/cli/bin/maude.exe +15 -0
- package/cli/bin/maude.mjs +45 -0
- package/cli/bin/mdcc.exe +10 -0
- package/cli/bin/mdcc.mjs +7 -0
- package/cli/cli-wrapper.cjs +67 -0
- package/cli/commands/config.mjs +94 -0
- package/cli/commands/design.mjs +386 -0
- package/cli/commands/help.mjs +57 -0
- package/cli/commands/init.mjs +178 -0
- package/cli/commands/version.mjs +7 -0
- package/cli/install.cjs +113 -0
- package/cli/lib/argv.mjs +37 -0
- package/cli/lib/argv.test.mjs +46 -0
- package/cli/lib/copy-tree.mjs +78 -0
- package/package.json +94 -0
- package/plugins/design/dev-server/annotations-context-toolbar.tsx +397 -0
- package/plugins/design/dev-server/annotations-layer.tsx +1717 -0
- package/plugins/design/dev-server/api.ts +674 -0
- package/plugins/design/dev-server/bin/_screenshot-playwright.mjs +50 -0
- package/plugins/design/dev-server/bin/bootstrap-check.sh +83 -0
- package/plugins/design/dev-server/bin/canvas-edit.sh +48 -0
- package/plugins/design/dev-server/bin/handoff.sh +27 -0
- package/plugins/design/dev-server/bin/screenshot.sh +232 -0
- package/plugins/design/dev-server/bin/server-up.sh +135 -0
- package/plugins/design/dev-server/bin/slug.sh +22 -0
- package/plugins/design/dev-server/bin/smoke.sh +272 -0
- package/plugins/design/dev-server/build.ts +267 -0
- package/plugins/design/dev-server/canvas-build.ts +219 -0
- package/plugins/design/dev-server/canvas-edit.ts +388 -0
- package/plugins/design/dev-server/canvas-header.ts +165 -0
- package/plugins/design/dev-server/canvas-icons.tsx +131 -0
- package/plugins/design/dev-server/canvas-lib-inline.ts +260 -0
- package/plugins/design/dev-server/canvas-lib-resolver.ts +85 -0
- package/plugins/design/dev-server/canvas-lib.tsx +1995 -0
- package/plugins/design/dev-server/canvas-meta.schema.json +181 -0
- package/plugins/design/dev-server/canvas-pipeline.ts +270 -0
- package/plugins/design/dev-server/canvas-shell.tsx +813 -0
- package/plugins/design/dev-server/client/app.jsx +2027 -0
- package/plugins/design/dev-server/client/hmr.mjs +85 -0
- package/plugins/design/dev-server/client/iframe-lazy.mjs +121 -0
- package/plugins/design/dev-server/client/index.html +15 -0
- package/plugins/design/dev-server/client/styles/0-reset.css +18 -0
- package/plugins/design/dev-server/client/styles/1-tokens.css +297 -0
- package/plugins/design/dev-server/client/styles/2-layout.css +35 -0
- package/plugins/design/dev-server/client/styles/3-shell.css +906 -0
- package/plugins/design/dev-server/client/styles/4-components.css +1268 -0
- package/plugins/design/dev-server/client/styles/5-utilities.css +4 -0
- package/plugins/design/dev-server/client/styles/_index.css +24 -0
- package/plugins/design/dev-server/client/styles.css +1419 -0
- package/plugins/design/dev-server/config.schema.json +147 -0
- package/plugins/design/dev-server/context-menu.tsx +343 -0
- package/plugins/design/dev-server/context.ts +173 -0
- package/plugins/design/dev-server/dist/client.bundle.js +20323 -0
- package/plugins/design/dev-server/dist/styles.css +2875 -0
- package/plugins/design/dev-server/examples/README.md +9 -0
- package/plugins/design/dev-server/examples/perf-100-artboards.tsx +113 -0
- package/plugins/design/dev-server/fs-watch.ts +63 -0
- package/plugins/design/dev-server/handoff.ts +721 -0
- package/plugins/design/dev-server/history.ts +125 -0
- package/plugins/design/dev-server/hmr-broadcast.ts +114 -0
- package/plugins/design/dev-server/http.ts +413 -0
- package/plugins/design/dev-server/input-router.tsx +485 -0
- package/plugins/design/dev-server/inspect.ts +365 -0
- package/plugins/design/dev-server/locator.ts +159 -0
- package/plugins/design/dev-server/mem.ts +97 -0
- package/plugins/design/dev-server/runtime-bundle.ts +235 -0
- package/plugins/design/dev-server/server.mjs +1246 -0
- package/plugins/design/dev-server/server.ts +131 -0
- package/plugins/design/dev-server/test/_helpers.ts +81 -0
- package/plugins/design/dev-server/test/active-state.test.ts +145 -0
- package/plugins/design/dev-server/test/annotations-api.test.ts +146 -0
- package/plugins/design/dev-server/test/annotations-layer.test.ts +419 -0
- package/plugins/design/dev-server/test/binary-smoke.test.ts +47 -0
- package/plugins/design/dev-server/test/bundle-smoke.test.ts +29 -0
- package/plugins/design/dev-server/test/canvas-build.test.ts +78 -0
- package/plugins/design/dev-server/test/canvas-edit.test.ts +139 -0
- package/plugins/design/dev-server/test/canvas-header.test.ts +127 -0
- package/plugins/design/dev-server/test/canvas-lib-inline.test.ts +146 -0
- package/plugins/design/dev-server/test/canvas-lib-resolver.test.ts +112 -0
- package/plugins/design/dev-server/test/canvas-meta-api.test.ts +236 -0
- package/plugins/design/dev-server/test/canvas-pipeline.test.ts +180 -0
- package/plugins/design/dev-server/test/canvas-route.test.ts +176 -0
- package/plugins/design/dev-server/test/fs-watch.test.ts +41 -0
- package/plugins/design/dev-server/test/handoff-static-frames.test.ts +215 -0
- package/plugins/design/dev-server/test/handoff.test.ts +281 -0
- package/plugins/design/dev-server/test/history-rollback.test.ts +62 -0
- package/plugins/design/dev-server/test/hmr-broadcast.test.ts +108 -0
- package/plugins/design/dev-server/test/input-router.test.ts +316 -0
- package/plugins/design/dev-server/test/locator.test.ts +214 -0
- package/plugins/design/dev-server/test/perf-harness.ts +193 -0
- package/plugins/design/dev-server/test/phase-3.6-smoke.test.ts +77 -0
- package/plugins/design/dev-server/test/runtime-bundle.test.ts +69 -0
- package/plugins/design/dev-server/test/server-lifecycle.test.ts +28 -0
- package/plugins/design/dev-server/test/tool-palette.test.tsx +55 -0
- package/plugins/design/dev-server/test/use-annotation-selection.test.tsx +77 -0
- package/plugins/design/dev-server/test/use-artboard-drag.test.ts +325 -0
- package/plugins/design/dev-server/test/use-selection-set.test.tsx +166 -0
- package/plugins/design/dev-server/test/use-snap-guides.test.ts +190 -0
- package/plugins/design/dev-server/test/use-tool-mode.test.tsx +93 -0
- package/plugins/design/dev-server/test/ws-handshake.test.ts +33 -0
- package/plugins/design/dev-server/tool-palette.tsx +278 -0
- package/plugins/design/dev-server/tsconfig.json +26 -0
- package/plugins/design/dev-server/use-annotation-selection.tsx +92 -0
- package/plugins/design/dev-server/use-annotations-visibility.tsx +43 -0
- package/plugins/design/dev-server/use-artboard-drag.tsx +445 -0
- package/plugins/design/dev-server/use-selection-set.tsx +224 -0
- package/plugins/design/dev-server/use-snap-guides.tsx +215 -0
- package/plugins/design/dev-server/use-tool-mode.tsx +114 -0
- package/plugins/design/dev-server/ws.ts +90 -0
- package/plugins/design/templates/_shell.html +177 -0
- package/plugins/design/templates/canvas.tsx.template +54 -0
- package/plugins/design/templates/design-system-inspiration/_MAPPING.md +277 -0
- package/plugins/design/templates/design-system-inspiration/_README.md +71 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-banner.html +68 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-empty-state-generous.html +39 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-feature-grid.html +62 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-marketing-card.html +63 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-testimonial.html +80 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-code-block.html +71 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-diff-view.html +65 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-log-stream.html +62 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-monospace-table.html +57 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-terminal-pane.html +67 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/type-mono.html +57 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/colors-presence.html +74 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-command-palette.html +90 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-keyboard.html +51 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-list.html +89 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-shortcuts-overlay.html +85 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-toast-menu.html +80 -0
- package/plugins/design/templates/design-system-inspiration/core/INDEX.md.tpl +25 -0
- package/plugins/design/templates/design-system-inspiration/core/README.orchestration.md.tpl +71 -0
- package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +77 -0
- package/plugins/design/templates/design-system-inspiration/core/SKILL.md.tpl +50 -0
- package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +111 -0
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +28 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/_layout.css +113 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-accent.html +48 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-surfaces.html +49 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-text.html +52 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/components-buttons.html +83 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/components-cards.html +79 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/components-inputs.html +82 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/motion.html +66 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/spacing-scale.html +53 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/type-scale.html +62 -0
- package/plugins/design/templates/design-system-inspiration/foundations/borders.html +39 -0
- package/plugins/design/templates/design-system-inspiration/foundations/elevation.html +46 -0
- package/plugins/design/templates/design-system-inspiration/foundations/focus.html +48 -0
- package/plugins/design/templates/design-system-inspiration/foundations/grid.html +51 -0
- package/plugins/design/templates/design-system-inspiration/foundations/iconography.html +73 -0
- package/plugins/design/templates/design-system-inspiration/foundations/opacity.html +45 -0
- package/plugins/design/templates/design-system-inspiration/foundations/radii.html +40 -0
- package/plugins/design/templates/design-system-inspiration/foundations/selection.html +45 -0
- package/plugins/design/templates/design-system-inspiration/meta/accessibility.html +62 -0
- package/plugins/design/templates/design-system-inspiration/meta/i18n.html +73 -0
- package/plugins/design/templates/design-system-inspiration/meta/presence-multiplayer.html +71 -0
- package/plugins/design/templates/design-system-inspiration/meta/tokens-index.html +80 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-auth.html +78 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-data-density.html +61 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-error-pages.html +70 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-form-layouts.html +70 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-onboarding.html +71 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-pricing.html +83 -0
- package/plugins/design/templates/design-system-inspiration/platform-desktop/components-resize-panels.html +63 -0
- package/plugins/design/templates/design-system-inspiration/platform-desktop/ui_kits-desktop-index.html +55 -0
- package/plugins/design/templates/design-system-inspiration/platform-desktop/ui_kits-desktop-showcase.html +302 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-bottom-sheet.html +63 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-pull-to-refresh.html +74 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-segmented-control.html +51 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-tab-bar.html +57 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/ui_kits-mobile-index.html +58 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/ui_kits-mobile-showcase.html +237 -0
- package/plugins/design/templates/design-system-inspiration/status/colors-status.html +49 -0
- package/plugins/design/templates/design-system-inspiration/status/components-status.html +63 -0
- package/plugins/design/templates/design-system-inspiration/status/skeletons.html +74 -0
- package/plugins/design/templates/design-system-inspiration/theme-both/colors-themes-side-by-side.html +59 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-callout.html +74 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-dialogs.html +81 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-tables.html +101 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-toggles.html +74 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-tooltips.html +74 -0
- package/plugins/design/templates/design-system-inspiration/universal/empty-state.html.tpl +34 -0
- package/plugins/design/templates/design-system-inspiration/universal/logo.html +42 -0
- package/plugins/design/templates/ds-specimen.tsx.template +59 -0
- package/plugins/flow/.claude-plugin/config.schema.json +398 -0
- package/plugins/flow/README.md +45 -0
- package/plugins/flow/templates/ai-skeleton/INDEX.md +50 -0
- package/plugins/flow/templates/ai-skeleton/README.md +46 -0
- package/plugins/flow/templates/ai-skeleton/browser/har/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/browser/snapshots/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/business/README.md +12 -0
- package/plugins/flow/templates/ai-skeleton/context/README.md +12 -0
- package/plugins/flow/templates/ai-skeleton/decisions/README.md +20 -0
- package/plugins/flow/templates/ai-skeleton/design-import/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/dev-logs/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/device/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/docs/README.md +5 -0
- package/plugins/flow/templates/ai-skeleton/logs/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/logs/README.md +13 -0
- package/plugins/flow/templates/ai-skeleton/plans/README.md +16 -0
- package/plugins/flow/templates/ai-skeleton/plans/archive/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/release-guide.md +35 -0
- package/plugins/flow/templates/ai-skeleton/reviews/README.md +15 -0
- package/plugins/flow/templates/ai-skeleton/scenarios/README.md +26 -0
- package/plugins/flow/templates/ai-skeleton/scenarios/_lib/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/state/STATE.md +25 -0
- package/plugins/flow/templates/ai-skeleton/templates/HANDOFF.md +32 -0
- package/plugins/flow/templates/ai-skeleton/workflows.config.json +74 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* {{project_label}} — design tokens
|
|
3
|
+
*
|
|
4
|
+
* Authoritative token file. Every canvas in <designRoot>/ui/ links to this.
|
|
5
|
+
* Production code should consume the same values (compiled to TS/JS or kept as CSS vars).
|
|
6
|
+
*
|
|
7
|
+
* Contract:
|
|
8
|
+
* - OKLCH for accent + status colors (better gamut control than HSL/hex)
|
|
9
|
+
* - One accent family only (no --accent2)
|
|
10
|
+
* - Theme: {{theme_default}} (single-block) — duplicate for both-equal projects
|
|
11
|
+
* - Motion durations + easings + reduced-motion guard
|
|
12
|
+
* - 8-step type ladder, 4px-base spacing scale
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:root,
|
|
16
|
+
.{{root_class}}[data-theme="{{theme_default}}"] {
|
|
17
|
+
/* ─── Surfaces (deepest → highest) ─────────────────────────────────── */
|
|
18
|
+
--bg-0: {{bg_0_oklch}}; /* page bg */
|
|
19
|
+
--bg-1: {{bg_1_oklch}}; /* card / panel bg */
|
|
20
|
+
--bg-2: {{bg_2_oklch}}; /* nested panel / popover */
|
|
21
|
+
--bg-3: {{bg_3_oklch}}; /* input bg / subtle row hover */
|
|
22
|
+
--bg-4: {{bg_4_oklch}}; /* hover / pressed state */
|
|
23
|
+
|
|
24
|
+
/* ─── Borders ──────────────────────────────────────────────────────── */
|
|
25
|
+
--border-subtle: oklch(from var(--bg-1) calc(l + 0.04) c h);
|
|
26
|
+
--border-default: oklch(from var(--bg-1) calc(l + 0.08) c h);
|
|
27
|
+
--border-strong: oklch(from var(--bg-1) calc(l + 0.14) c h);
|
|
28
|
+
|
|
29
|
+
/* ─── Text ─────────────────────────────────────────────────────────── */
|
|
30
|
+
--fg-0: {{fg_0_oklch}}; /* primary text */
|
|
31
|
+
--fg-1: {{fg_1_oklch}}; /* secondary text */
|
|
32
|
+
--fg-2: {{fg_2_oklch}}; /* tertiary / muted */
|
|
33
|
+
--fg-3: {{fg_3_oklch}}; /* disabled */
|
|
34
|
+
|
|
35
|
+
/* ─── Accent (ONE family only) ─────────────────────────────────────── */
|
|
36
|
+
--accent: {{accent_oklch}};
|
|
37
|
+
--accent-hover: oklch(from var(--accent) calc(l - 0.04) c h);
|
|
38
|
+
--accent-active: oklch(from var(--accent) calc(l - 0.08) c h);
|
|
39
|
+
--accent-fg: {{accent_fg_oklch}};
|
|
40
|
+
|
|
41
|
+
/* ─── Status (only if "status" ∈ activeFamilies) ───────────────────── */
|
|
42
|
+
--status-success: oklch(70% 0.18 145);
|
|
43
|
+
--status-warn: oklch(78% 0.16 85);
|
|
44
|
+
--status-error: oklch(64% 0.21 25);
|
|
45
|
+
--status-info: oklch(70% 0.13 230);
|
|
46
|
+
|
|
47
|
+
/* ─── Presence (only if "presence" ∈ activeFamilies) ───────────────── */
|
|
48
|
+
--presence-online: var(--status-success);
|
|
49
|
+
--presence-away: var(--status-warn);
|
|
50
|
+
--presence-offline: var(--fg-3);
|
|
51
|
+
|
|
52
|
+
/* ─── Shadows / elevation ──────────────────────────────────────────── */
|
|
53
|
+
--shadow-sm: 0 1px 2px oklch(0 0 0 / 0.20);
|
|
54
|
+
--shadow-md: 0 4px 12px oklch(0 0 0 / 0.25);
|
|
55
|
+
--shadow-lg: 0 12px 32px oklch(0 0 0 / 0.30);
|
|
56
|
+
|
|
57
|
+
/* ─── Radii ────────────────────────────────────────────────────────── */
|
|
58
|
+
--radius-xs: {{radius_xs}};
|
|
59
|
+
--radius-sm: {{radius_sm}};
|
|
60
|
+
--radius-md: {{radius_md}};
|
|
61
|
+
--radius-lg: {{radius_lg}};
|
|
62
|
+
--radius-xl: {{radius_xl}};
|
|
63
|
+
--radius-pill: 999px;
|
|
64
|
+
|
|
65
|
+
/* ─── Spacing (4px base) ───────────────────────────────────────────── */
|
|
66
|
+
--space-0: 0;
|
|
67
|
+
--space-1: 4px;
|
|
68
|
+
--space-2: 8px;
|
|
69
|
+
--space-3: 12px;
|
|
70
|
+
--space-4: 16px;
|
|
71
|
+
--space-5: 24px;
|
|
72
|
+
--space-6: 32px;
|
|
73
|
+
--space-7: 48px;
|
|
74
|
+
--space-8: 64px;
|
|
75
|
+
|
|
76
|
+
/* ─── Typography ───────────────────────────────────────────────────── */
|
|
77
|
+
--font-display: {{font_display}};
|
|
78
|
+
--font-body: {{font_body}};
|
|
79
|
+
--font-mono: {{font_mono}};
|
|
80
|
+
|
|
81
|
+
/* 8-step type scale */
|
|
82
|
+
--type-xs: 12px; --lh-xs: 16px;
|
|
83
|
+
--type-sm: 13px; --lh-sm: 18px;
|
|
84
|
+
--type-base: 14px; --lh-base: 20px;
|
|
85
|
+
--type-md: 16px; --lh-md: 22px;
|
|
86
|
+
--type-lg: 18px; --lh-lg: 26px;
|
|
87
|
+
--type-xl: 22px; --lh-xl: 30px;
|
|
88
|
+
--type-2xl: 28px; --lh-2xl: 36px;
|
|
89
|
+
--type-3xl: 36px; --lh-3xl: 44px;
|
|
90
|
+
|
|
91
|
+
/* ─── Motion ───────────────────────────────────────────────────────── */
|
|
92
|
+
--dur-flip: {{dur_flip}};
|
|
93
|
+
--dur-panel: {{dur_panel}};
|
|
94
|
+
--dur-route: {{dur_route}};
|
|
95
|
+
--dur-soft: {{dur_soft}};
|
|
96
|
+
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
|
97
|
+
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
|
|
98
|
+
|
|
99
|
+
/* ─── Layout ───────────────────────────────────────────────────────── */
|
|
100
|
+
--layout-max-w: 1200px;
|
|
101
|
+
--layout-gutter: var(--space-4);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
:root, .{{root_class}}[data-theme="{{theme_default}}"] {
|
|
106
|
+
--dur-flip: 1ms;
|
|
107
|
+
--dur-panel: 1ms;
|
|
108
|
+
--dur-route: 1ms;
|
|
109
|
+
--dur-soft: 1ms;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/1aGh/maude/main/plugins/design/dev-server/config.schema.json",
|
|
3
|
+
"name": "{{project_name}}",
|
|
4
|
+
"projectLabel": "{{project_label}}",
|
|
5
|
+
"designRoot": ".design",
|
|
6
|
+
"canvasGroups": [
|
|
7
|
+
{ "label": "Design system", "path": "system" },
|
|
8
|
+
{ "label": "UI kit", "path": "ui" }
|
|
9
|
+
],
|
|
10
|
+
"rootClass": "{{root_class}}",
|
|
11
|
+
"themeDefault": "{{theme_default}}",
|
|
12
|
+
"tokensCssRel": "system/{{ds_dirname}}/colors_and_type.css",
|
|
13
|
+
"teamAccentDefault": null,
|
|
14
|
+
"handoffTargets": {{handoff_targets}},
|
|
15
|
+
"newCanvasDir": "ui/{{ds_dirname}}",
|
|
16
|
+
"newComponentDir": "ui/{{ds_dirname}}/components",
|
|
17
|
+
"extensions": [],
|
|
18
|
+
"completenessProfile": "standard",
|
|
19
|
+
"activeFamilies": {{active_families}},
|
|
20
|
+
"designSystems": [
|
|
21
|
+
{
|
|
22
|
+
"name": "{{ds_dirname}}",
|
|
23
|
+
"path": "system/{{ds_dirname}}",
|
|
24
|
+
"description": "{{ds_description}}"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"defaultDesignSystem": "{{ds_dirname}}"
|
|
28
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* Shared specimen chrome — copy as-is into every project's preview/_layout.css.
|
|
2
|
+
*
|
|
3
|
+
* Provides the page frame, swatch grid, and label styling for the demo pages.
|
|
4
|
+
* Specimen content uses var(--*) tokens; this file uses neutral base styles so
|
|
5
|
+
* the chrome works regardless of theme.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
* {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
html,
|
|
13
|
+
body {
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
font-family: var(--font-body, system-ui, sans-serif);
|
|
17
|
+
font-size: var(--type-base, 14px);
|
|
18
|
+
line-height: var(--lh-base, 20px);
|
|
19
|
+
color: var(--fg-0, #e8eaed);
|
|
20
|
+
background: var(--bg-0, #0a0c10);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.specimen {
|
|
24
|
+
max-width: 960px;
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
padding: 32px 24px 80px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.specimen h1 {
|
|
30
|
+
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
|
|
31
|
+
font-size: var(--type-2xl, 28px);
|
|
32
|
+
line-height: var(--lh-2xl, 36px);
|
|
33
|
+
margin: 0 0 8px;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
letter-spacing: -0.01em;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.specimen .lede {
|
|
39
|
+
color: var(--fg-1, #b6bac4);
|
|
40
|
+
font-size: var(--type-md, 16px);
|
|
41
|
+
line-height: var(--lh-md, 22px);
|
|
42
|
+
margin: 0 0 32px;
|
|
43
|
+
max-width: 60ch;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.specimen h2 {
|
|
47
|
+
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
|
|
48
|
+
font-size: var(--type-lg, 18px);
|
|
49
|
+
line-height: var(--lh-lg, 26px);
|
|
50
|
+
margin: 32px 0 12px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.specimen p {
|
|
55
|
+
margin: 0 0 12px;
|
|
56
|
+
max-width: 70ch;
|
|
57
|
+
color: var(--fg-1);
|
|
58
|
+
}
|
|
59
|
+
.specimen code {
|
|
60
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.grid {
|
|
65
|
+
display: grid;
|
|
66
|
+
gap: 12px;
|
|
67
|
+
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
68
|
+
margin: 0 0 24px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.swatch {
|
|
72
|
+
border-radius: var(--radius-md, 8px);
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
border: 1px solid var(--border-default, rgba(255, 255, 255, 0.1));
|
|
75
|
+
background: var(--bg-1, #14171c);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.swatch .chip {
|
|
79
|
+
height: 64px;
|
|
80
|
+
}
|
|
81
|
+
.swatch .meta {
|
|
82
|
+
padding: 10px 12px;
|
|
83
|
+
font-size: var(--type-xs, 12px);
|
|
84
|
+
color: var(--fg-1);
|
|
85
|
+
}
|
|
86
|
+
.swatch .meta strong {
|
|
87
|
+
display: block;
|
|
88
|
+
color: var(--fg-0);
|
|
89
|
+
font-size: var(--type-sm, 13px);
|
|
90
|
+
margin-bottom: 2px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.row {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-wrap: wrap;
|
|
96
|
+
gap: 12px;
|
|
97
|
+
align-items: center;
|
|
98
|
+
margin: 0 0 24px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.divider {
|
|
102
|
+
height: 1px;
|
|
103
|
+
background: var(--border-subtle);
|
|
104
|
+
margin: 24px 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
footer.legend {
|
|
108
|
+
margin-top: 64px;
|
|
109
|
+
padding-top: 24px;
|
|
110
|
+
border-top: 1px solid var(--border-subtle);
|
|
111
|
+
font-size: var(--type-xs);
|
|
112
|
+
color: var(--fg-2);
|
|
113
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPECIMEN: colors-accent
|
|
3
|
+
DEMONSTRATES: --accent, --accent-hover, --accent-active, --accent-fg
|
|
4
|
+
COMPOSITION: 4-state swatch grid + contextual button + link sample, demonstrating one-accent rule
|
|
5
|
+
COPY VOICE: action verbs ("Save", "Confirm", "Continue") — never "Click here" / "Get Started"
|
|
6
|
+
WHEN SCAFFOLDED: always (Core)
|
|
7
|
+
NOTES: This is THE place to demonstrate one-accent rule. The card should NOT show any --accent2 variant. accent-fg must clear WCAG AA against the accent background.
|
|
8
|
+
-->
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8" />
|
|
13
|
+
<title>Colors — accent</title>
|
|
14
|
+
<link rel="stylesheet" href="../colors_and_type.css" />
|
|
15
|
+
<link rel="stylesheet" href="./_layout.css" />
|
|
16
|
+
</head>
|
|
17
|
+
<body class="app" data-theme="dark">
|
|
18
|
+
<main class="specimen">
|
|
19
|
+
<h1>Accent</h1>
|
|
20
|
+
<p class="lede">One accent family — four states. The one-accent rule means: when something needs attention, the answer is always this color, never a competing second hue. Sub-states cover hover, active, and the readable foreground that sits on top of it.</p>
|
|
21
|
+
|
|
22
|
+
<div class="grid">
|
|
23
|
+
<div class="swatch"><div class="chip" style="background: var(--accent);"></div><div class="meta"><strong>--accent</strong>Idle</div></div>
|
|
24
|
+
<div class="swatch"><div class="chip" style="background: var(--accent-hover);"></div><div class="meta"><strong>--accent-hover</strong>Hover</div></div>
|
|
25
|
+
<div class="swatch"><div class="chip" style="background: var(--accent-active);"></div><div class="meta"><strong>--accent-active</strong>Pressed</div></div>
|
|
26
|
+
<div class="swatch"><div class="chip" style="background: var(--accent-fg); border: 1px solid var(--border-default);"></div><div class="meta"><strong>--accent-fg</strong>Foreground</div></div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<h2>In use</h2>
|
|
30
|
+
<div class="row">
|
|
31
|
+
<button style="background: var(--accent); color: var(--accent-fg); border: 0; padding: 8px 16px; border-radius: var(--radius-md); font: inherit; cursor: pointer; transition: background var(--dur-flip) var(--ease-out);">Save changes</button>
|
|
32
|
+
<a href="#" style="color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor;">Read the docs</a>
|
|
33
|
+
<span style="background: var(--accent); color: var(--accent-fg); padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--type-xs);">new</span>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<h2>Hover & active visual</h2>
|
|
37
|
+
<div class="row">
|
|
38
|
+
<div style="background: var(--accent); color: var(--accent-fg); padding: 8px 16px; border-radius: var(--radius-md);">idle</div>
|
|
39
|
+
<div style="background: var(--accent-hover); color: var(--accent-fg); padding: 8px 16px; border-radius: var(--radius-md);">hover</div>
|
|
40
|
+
<div style="background: var(--accent-active); color: var(--accent-fg); padding: 8px 16px; border-radius: var(--radius-md);">active</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<footer class="legend">
|
|
44
|
+
<p>The one-accent rule: no <code>--accent2</code>. Calls-to-attention should compete with each other through hierarchy and size, not through parallel hues.</p>
|
|
45
|
+
</footer>
|
|
46
|
+
</main>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPECIMEN: colors-surfaces
|
|
3
|
+
DEMONSTRATES: --bg-0, --bg-1, --bg-2, --bg-3, --bg-4, --border-subtle, --border-default
|
|
4
|
+
COMPOSITION: 5 swatches showing surface ladder, plus stacked panel illustration showing depth in real use
|
|
5
|
+
COPY VOICE: terse labels
|
|
6
|
+
WHEN SCAFFOLDED: always (Core)
|
|
7
|
+
NOTES: --bg-0 is deepest, --bg-4 is highest. Each step should add ~4% lightness in OKLCH. Borders derive from --bg-1 via oklch(from var(--bg-1) calc(l + N) c h).
|
|
8
|
+
-->
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8" />
|
|
13
|
+
<title>Colors — surfaces</title>
|
|
14
|
+
<link rel="stylesheet" href="../colors_and_type.css" />
|
|
15
|
+
<link rel="stylesheet" href="./_layout.css" />
|
|
16
|
+
</head>
|
|
17
|
+
<body class="app" data-theme="dark">
|
|
18
|
+
<main class="specimen">
|
|
19
|
+
<h1>Surface colors</h1>
|
|
20
|
+
<p class="lede">Five layers of background, deepest to highest. Use the lowest layer for the page; step up one level for cards / panels, two levels for nested controls, three for popovers and overlays.</p>
|
|
21
|
+
|
|
22
|
+
<div class="grid">
|
|
23
|
+
<div class="swatch"><div class="chip" style="background: var(--bg-0);"></div><div class="meta"><strong>--bg-0</strong>Page</div></div>
|
|
24
|
+
<div class="swatch"><div class="chip" style="background: var(--bg-1);"></div><div class="meta"><strong>--bg-1</strong>Card</div></div>
|
|
25
|
+
<div class="swatch"><div class="chip" style="background: var(--bg-2);"></div><div class="meta"><strong>--bg-2</strong>Nested</div></div>
|
|
26
|
+
<div class="swatch"><div class="chip" style="background: var(--bg-3);"></div><div class="meta"><strong>--bg-3</strong>Input</div></div>
|
|
27
|
+
<div class="swatch"><div class="chip" style="background: var(--bg-4);"></div><div class="meta"><strong>--bg-4</strong>Pressed</div></div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<h2>Stacked example</h2>
|
|
31
|
+
<div style="background: var(--bg-0); padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);">
|
|
32
|
+
<div style="background: var(--bg-1); padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-default);">
|
|
33
|
+
<strong>Card on page</strong> · <span style="color: var(--fg-1)">--bg-1 inside --bg-0</span>
|
|
34
|
+
<div style="background: var(--bg-2); padding: 12px; margin-top: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);">
|
|
35
|
+
<strong>Nested panel</strong> · <span style="color: var(--fg-1)">--bg-2 inside --bg-1</span>
|
|
36
|
+
<input type="text" placeholder="--bg-3 for inputs" style="background: var(--bg-3); border: 1px solid var(--border-default); color: var(--fg-0); padding: 6px 10px; border-radius: var(--radius-sm); margin-top: 8px; display: block; width: 200px;" />
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<h2>Borders</h2>
|
|
42
|
+
<div class="row">
|
|
43
|
+
<div style="padding: 12px 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md);">subtle</div>
|
|
44
|
+
<div style="padding: 12px 16px; border: 1px solid var(--border-default); border-radius: var(--radius-md);">default</div>
|
|
45
|
+
<div style="padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);">strong</div>
|
|
46
|
+
</div>
|
|
47
|
+
</main>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPECIMEN: colors-text
|
|
3
|
+
DEMONSTRATES: --fg-0, --fg-1, --fg-2, --fg-3
|
|
4
|
+
COMPOSITION: 4 swatches × 1 row + sample paragraph showing hierarchy in context
|
|
5
|
+
COPY VOICE: short labels, no marketing puffery ("Primary", "Secondary", "Muted", "Disabled")
|
|
6
|
+
WHEN SCAFFOLDED: always (Core)
|
|
7
|
+
NOTES: Sample paragraph reuses each level to show how the hierarchy reads. --fg-3 must pass WCAG AA at 14px against --bg-1.
|
|
8
|
+
-->
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8" />
|
|
13
|
+
<title>Colors — text</title>
|
|
14
|
+
<link rel="stylesheet" href="../colors_and_type.css" />
|
|
15
|
+
<link rel="stylesheet" href="./_layout.css" />
|
|
16
|
+
</head>
|
|
17
|
+
<body class="app" data-theme="dark">
|
|
18
|
+
<main class="specimen">
|
|
19
|
+
<h1>Text colors</h1>
|
|
20
|
+
<p class="lede">Four levels of foreground, designed for hierarchy. Use <code>--fg-0</code> for the primary message in a region; lower numbers for supporting context and metadata.</p>
|
|
21
|
+
|
|
22
|
+
<div class="grid">
|
|
23
|
+
<div class="swatch">
|
|
24
|
+
<div class="chip" style="background: var(--fg-0); height: 64px;"></div>
|
|
25
|
+
<div class="meta"><strong>--fg-0</strong>Primary</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="swatch">
|
|
28
|
+
<div class="chip" style="background: var(--fg-1); height: 64px;"></div>
|
|
29
|
+
<div class="meta"><strong>--fg-1</strong>Secondary</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="swatch">
|
|
32
|
+
<div class="chip" style="background: var(--fg-2); height: 64px;"></div>
|
|
33
|
+
<div class="meta"><strong>--fg-2</strong>Muted</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="swatch">
|
|
36
|
+
<div class="chip" style="background: var(--fg-3); height: 64px;"></div>
|
|
37
|
+
<div class="meta"><strong>--fg-3</strong>Disabled</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<h2>In context</h2>
|
|
42
|
+
<p style="color: var(--fg-0)"><strong>Match recap ready.</strong> Hat-trick from the captain; team rating B+.</p>
|
|
43
|
+
<p style="color: var(--fg-1)">Auto-saved at 19:42. View the breakdown or share with the squad.</p>
|
|
44
|
+
<p style="color: var(--fg-2)">Last 7 matches available in the archive.</p>
|
|
45
|
+
<p style="color: var(--fg-3)">Stats sync paused (no connection).</p>
|
|
46
|
+
|
|
47
|
+
<footer class="legend">
|
|
48
|
+
<p><code>--fg-3</code> contrast against <code>--bg-1</code> must clear WCAG AA at 14px. Verify on every theme.</p>
|
|
49
|
+
</footer>
|
|
50
|
+
</main>
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
package/plugins/design/templates/design-system-inspiration/core/preview/components-buttons.html
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPECIMEN: components-buttons
|
|
3
|
+
DEMONSTRATES: --accent, --accent-hover, --accent-active, --accent-fg, --bg-1..4, --fg-0..2, --border-default, --radius-md, --dur-flip, --ease-out
|
|
4
|
+
COMPOSITION: 4 variants × 5 states grid (primary / secondary / ghost / destructive × idle / hover / active / disabled / loading)
|
|
5
|
+
COPY VOICE: action verbs, no marketing puffery ("Save", "Delete", not "Get Started Now!")
|
|
6
|
+
WHEN SCAFFOLDED: always (Core)
|
|
7
|
+
NOTES: Loading state uses --accent-fg color on accent bg with a pulsing dot — never spinner-only. Disabled uses --fg-3 + reduced opacity, no hover.
|
|
8
|
+
-->
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8" />
|
|
13
|
+
<title>Components — buttons</title>
|
|
14
|
+
<link rel="stylesheet" href="../colors_and_type.css" />
|
|
15
|
+
<link rel="stylesheet" href="./_layout.css" />
|
|
16
|
+
<style>
|
|
17
|
+
.btn { font: inherit; padding: 8px 14px; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; transition: background var(--dur-flip) var(--ease-out), border-color var(--dur-flip) var(--ease-out); display: inline-flex; align-items: center; gap: 8px; }
|
|
18
|
+
.btn--primary { background: var(--accent); color: var(--accent-fg); }
|
|
19
|
+
.btn--primary:hover { background: var(--accent-hover); }
|
|
20
|
+
.btn--primary.is-active, .btn--primary:active { background: var(--accent-active); }
|
|
21
|
+
.btn--secondary { background: var(--bg-3); color: var(--fg-0); border-color: var(--border-default); }
|
|
22
|
+
.btn--secondary:hover { background: var(--bg-4); }
|
|
23
|
+
.btn--ghost { background: transparent; color: var(--fg-0); }
|
|
24
|
+
.btn--ghost:hover { background: var(--bg-2); }
|
|
25
|
+
.btn--destructive { background: var(--status-error); color: var(--accent-fg); }
|
|
26
|
+
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
|
|
27
|
+
.btn.is-loading::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1s ease-in-out infinite; }
|
|
28
|
+
@keyframes pulse { 0%, 100% { opacity: 0.4; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
|
|
29
|
+
@media (prefers-reduced-motion: reduce) { .btn.is-loading::after { animation: none; } }
|
|
30
|
+
.col { display: grid; gap: 12px; align-items: start; }
|
|
31
|
+
.grid-states { display: grid; grid-template-columns: 120px repeat(5, max-content); gap: 12px; align-items: center; margin: 16px 0; }
|
|
32
|
+
.grid-states > .head { font-size: var(--type-xs); color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.04em; }
|
|
33
|
+
</style>
|
|
34
|
+
</head>
|
|
35
|
+
<body class="app" data-theme="dark">
|
|
36
|
+
<main class="specimen">
|
|
37
|
+
<h1>Buttons</h1>
|
|
38
|
+
<p class="lede">Four variants, five states. Primary carries the accent; secondary uses neutral surface + border; ghost is invisible until interaction; destructive uses status-error for irreversible actions.</p>
|
|
39
|
+
|
|
40
|
+
<div class="grid-states">
|
|
41
|
+
<span class="head"></span><span class="head">Idle</span><span class="head">Hover</span><span class="head">Active</span><span class="head">Disabled</span><span class="head">Loading</span>
|
|
42
|
+
<span style="color: var(--fg-1);">Primary</span>
|
|
43
|
+
<button class="btn btn--primary">Save</button>
|
|
44
|
+
<button class="btn btn--primary" style="background: var(--accent-hover);">Save</button>
|
|
45
|
+
<button class="btn btn--primary is-active">Save</button>
|
|
46
|
+
<button class="btn btn--primary" disabled>Save</button>
|
|
47
|
+
<button class="btn btn--primary is-loading">Saving</button>
|
|
48
|
+
|
|
49
|
+
<span style="color: var(--fg-1);">Secondary</span>
|
|
50
|
+
<button class="btn btn--secondary">Cancel</button>
|
|
51
|
+
<button class="btn btn--secondary" style="background: var(--bg-4);">Cancel</button>
|
|
52
|
+
<button class="btn btn--secondary" style="background: var(--bg-4); border-color: var(--border-strong);">Cancel</button>
|
|
53
|
+
<button class="btn btn--secondary" disabled>Cancel</button>
|
|
54
|
+
<button class="btn btn--secondary is-loading">Cancel</button>
|
|
55
|
+
|
|
56
|
+
<span style="color: var(--fg-1);">Ghost</span>
|
|
57
|
+
<button class="btn btn--ghost">More</button>
|
|
58
|
+
<button class="btn btn--ghost" style="background: var(--bg-2);">More</button>
|
|
59
|
+
<button class="btn btn--ghost" style="background: var(--bg-3);">More</button>
|
|
60
|
+
<button class="btn btn--ghost" disabled>More</button>
|
|
61
|
+
<button class="btn btn--ghost is-loading">More</button>
|
|
62
|
+
|
|
63
|
+
<span style="color: var(--fg-1);">Destructive</span>
|
|
64
|
+
<button class="btn btn--destructive">Delete</button>
|
|
65
|
+
<button class="btn btn--destructive" style="filter: brightness(1.05);">Delete</button>
|
|
66
|
+
<button class="btn btn--destructive" style="filter: brightness(0.95);">Delete</button>
|
|
67
|
+
<button class="btn btn--destructive" disabled>Delete</button>
|
|
68
|
+
<button class="btn btn--destructive is-loading">Deleting</button>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<h2>With icon</h2>
|
|
72
|
+
<div class="row">
|
|
73
|
+
<button class="btn btn--primary"><span aria-hidden="true">↑</span>Upload</button>
|
|
74
|
+
<button class="btn btn--secondary"><span aria-hidden="true">↓</span>Download</button>
|
|
75
|
+
<button class="btn btn--ghost"><span aria-hidden="true">⌄</span>Filter</button>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<footer class="legend">
|
|
79
|
+
<p>Loading state: keep the verb in the label, not "Loading…". "Saving", "Deleting", "Uploading" tells the user which action is in flight.</p>
|
|
80
|
+
</footer>
|
|
81
|
+
</main>
|
|
82
|
+
</body>
|
|
83
|
+
</html>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPECIMEN: components-cards
|
|
3
|
+
DEMONSTRATES: --bg-1, --bg-2, --border-subtle, --border-default, --radius-lg, --shadow-sm, --shadow-md, --space-3/4/5
|
|
4
|
+
COMPOSITION: 3 card variants — flat (default), elevated, interactive — with realistic product content
|
|
5
|
+
COPY VOICE: real product strings — match recap, scout report, team note — never placeholder
|
|
6
|
+
WHEN SCAFFOLDED: always (Core)
|
|
7
|
+
NOTES: Card hierarchy comes from border + bg step, not shadow alone. Reserve shadow for floating elements (popovers, dropdowns), not stationary cards.
|
|
8
|
+
-->
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8" />
|
|
13
|
+
<title>Components — cards</title>
|
|
14
|
+
<link rel="stylesheet" href="../colors_and_type.css" />
|
|
15
|
+
<link rel="stylesheet" href="./_layout.css" />
|
|
16
|
+
<style>
|
|
17
|
+
.card { background: var(--bg-1); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; gap: var(--space-3); }
|
|
18
|
+
.card--elevated { box-shadow: var(--shadow-md); }
|
|
19
|
+
.card--interactive { transition: background var(--dur-flip) var(--ease-out), border-color var(--dur-flip) var(--ease-out); cursor: pointer; }
|
|
20
|
+
.card--interactive:hover { background: var(--bg-2); border-color: var(--border-strong); }
|
|
21
|
+
.card .head { display: flex; justify-content: space-between; align-items: center; }
|
|
22
|
+
.card .meta { color: var(--fg-2); font-size: var(--type-sm); }
|
|
23
|
+
.card .title { font-family: var(--font-display); font-size: var(--type-lg); font-weight: 600; line-height: var(--lh-lg); }
|
|
24
|
+
.pill { background: var(--accent); color: var(--accent-fg); padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--type-xs); }
|
|
25
|
+
</style>
|
|
26
|
+
</head>
|
|
27
|
+
<body class="app" data-theme="dark">
|
|
28
|
+
<main class="specimen">
|
|
29
|
+
<h1>Cards</h1>
|
|
30
|
+
<p class="lede">Three card patterns: flat for stationary content, elevated for dialogs and overlays, interactive for clickable list rows. Hierarchy comes from the border + bg step; shadow signals "floats above the page".</p>
|
|
31
|
+
|
|
32
|
+
<h2>Flat (default)</h2>
|
|
33
|
+
<div class="card" style="max-width: 360px;">
|
|
34
|
+
<div class="head">
|
|
35
|
+
<span class="title">Match recap</span>
|
|
36
|
+
<span class="meta">19:42</span>
|
|
37
|
+
</div>
|
|
38
|
+
<p style="margin: 0; color: var(--fg-1);">Hat-trick from the captain. Squad rating B+.</p>
|
|
39
|
+
<div class="row" style="gap: var(--space-2);">
|
|
40
|
+
<button style="background: var(--accent); color: var(--accent-fg); border: 0; padding: 6px 12px; border-radius: var(--radius-sm); font: inherit;">View</button>
|
|
41
|
+
<button style="background: var(--bg-3); color: var(--fg-0); border: 1px solid var(--border-default); padding: 6px 12px; border-radius: var(--radius-sm); font: inherit;">Share</button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<h2>Elevated (overlay)</h2>
|
|
46
|
+
<div class="card card--elevated" style="max-width: 360px;">
|
|
47
|
+
<div class="head">
|
|
48
|
+
<span class="title">Confirm delete</span>
|
|
49
|
+
</div>
|
|
50
|
+
<p style="margin: 0; color: var(--fg-1);">This will remove "Scout Radar Mobile" and its iteration history. Cannot be undone.</p>
|
|
51
|
+
<div class="row" style="justify-content: flex-end; gap: var(--space-2);">
|
|
52
|
+
<button style="background: transparent; color: var(--fg-1); border: 0; padding: 6px 12px; border-radius: var(--radius-sm); font: inherit;">Cancel</button>
|
|
53
|
+
<button style="background: var(--status-error); color: var(--accent-fg); border: 0; padding: 6px 12px; border-radius: var(--radius-sm); font: inherit;">Delete</button>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<h2>Interactive (list row)</h2>
|
|
58
|
+
<div style="display: grid; gap: var(--space-2); max-width: 480px;">
|
|
59
|
+
<div class="card card--interactive">
|
|
60
|
+
<div class="head">
|
|
61
|
+
<div>
|
|
62
|
+
<div class="title">Roster: starting XI</div>
|
|
63
|
+
<div class="meta">11 players · last edited 2h ago</div>
|
|
64
|
+
</div>
|
|
65
|
+
<span class="pill">draft</span>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="card card--interactive">
|
|
69
|
+
<div class="head">
|
|
70
|
+
<div>
|
|
71
|
+
<div class="title">Bench shortlist</div>
|
|
72
|
+
<div class="meta">7 players · synced</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</main>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|
package/plugins/design/templates/design-system-inspiration/core/preview/components-inputs.html
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPECIMEN: components-inputs
|
|
3
|
+
DEMONSTRATES: --bg-3, --border-default, --border-strong, --accent (focus ring), --fg-0..2, --status-error, --radius-sm, --space-2/3
|
|
4
|
+
COMPOSITION: text / textarea / select / search — each in idle, focused, error, disabled states
|
|
5
|
+
COPY VOICE: real labels and helper text ("Player name", "Match notes", "Squad role") — never "Enter text here"
|
|
6
|
+
WHEN SCAFFOLDED: always (Core)
|
|
7
|
+
NOTES: Focus ring is --accent at 2px outline-offset 2px (NOT box-shadow inset). Error state colors the border + helper text. Labels are above, helper text below — never inside the input.
|
|
8
|
+
-->
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8" />
|
|
13
|
+
<title>Components — inputs</title>
|
|
14
|
+
<link rel="stylesheet" href="../colors_and_type.css" />
|
|
15
|
+
<link rel="stylesheet" href="./_layout.css" />
|
|
16
|
+
<style>
|
|
17
|
+
.field { display: grid; gap: 4px; max-width: 320px; margin-bottom: 16px; }
|
|
18
|
+
.field label { color: var(--fg-1); font-size: var(--type-sm); }
|
|
19
|
+
.field .helper { color: var(--fg-2); font-size: var(--type-xs); }
|
|
20
|
+
.field.is-error .helper { color: var(--status-error); }
|
|
21
|
+
.input, .select { background: var(--bg-3); color: var(--fg-0); border: 1px solid var(--border-default); padding: 8px 10px; border-radius: var(--radius-sm); font: inherit; transition: border-color var(--dur-flip) var(--ease-out); }
|
|
22
|
+
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--border-strong); }
|
|
23
|
+
.field.is-error .input, .field.is-error .select { border-color: var(--status-error); }
|
|
24
|
+
.input[disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
25
|
+
.row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
<body class="app" data-theme="dark">
|
|
29
|
+
<main class="specimen">
|
|
30
|
+
<h1>Inputs</h1>
|
|
31
|
+
<p class="lede">Text, textarea, select, search. Labels above, helper text below. The focus ring is always <code>--accent</code> at 2px outline-offset 2px — never an inset box-shadow, because that masks the border.</p>
|
|
32
|
+
|
|
33
|
+
<h2>States</h2>
|
|
34
|
+
<div class="row-fields">
|
|
35
|
+
<div class="field">
|
|
36
|
+
<label for="i1">Player name</label>
|
|
37
|
+
<input id="i1" class="input" type="text" value="Captain Kim" />
|
|
38
|
+
<span class="helper">Idle</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="field">
|
|
41
|
+
<label for="i2">Squad role</label>
|
|
42
|
+
<input id="i2" class="input" type="text" value="Forward" style="outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--border-strong);" />
|
|
43
|
+
<span class="helper">Focused</span>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="field is-error">
|
|
46
|
+
<label for="i3">Jersey number</label>
|
|
47
|
+
<input id="i3" class="input" type="text" value="0" />
|
|
48
|
+
<span class="helper">Must be between 1 and 99.</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="field">
|
|
51
|
+
<label for="i4">Birth year</label>
|
|
52
|
+
<input id="i4" class="input" type="text" value="1998" disabled />
|
|
53
|
+
<span class="helper">Disabled (synced from registration)</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<h2>Textarea</h2>
|
|
58
|
+
<div class="field" style="max-width: 480px;">
|
|
59
|
+
<label for="t1">Match notes</label>
|
|
60
|
+
<textarea id="t1" class="input" rows="4" style="resize: vertical;">First-half tempo lifted after the press change; second-half rotation kept legs fresh.</textarea>
|
|
61
|
+
<span class="helper">Visible to the squad only.</span>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<h2>Select</h2>
|
|
65
|
+
<div class="field">
|
|
66
|
+
<label for="s1">Match outcome</label>
|
|
67
|
+
<select id="s1" class="select">
|
|
68
|
+
<option>Win</option>
|
|
69
|
+
<option>Draw</option>
|
|
70
|
+
<option>Loss</option>
|
|
71
|
+
</select>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<h2>Search</h2>
|
|
75
|
+
<div class="field" style="max-width: 360px;">
|
|
76
|
+
<label for="q1">Find a player</label>
|
|
77
|
+
<input id="q1" class="input" type="search" placeholder="Name, number, or position" />
|
|
78
|
+
<span class="helper">Fuzzy match across all squads.</span>
|
|
79
|
+
</div>
|
|
80
|
+
</main>
|
|
81
|
+
</body>
|
|
82
|
+
</html>
|