|
| 1 | +{ |
| 2 | + "schemaVersion": 2, |
| 3 | + "generatedAt": "2026-07-06T08:45:00Z", |
| 4 | + "title": "Design System: codebar Auth", |
| 5 | + "extensions": { |
| 6 | + "colorMeta": { |
| 7 | + "primary-btn": { "role": "primary", "displayName": "Trust Blue", "canonical": "#1a6cb3", "tonalRamp": ["#0a2e4f", "#0f4775", "#145994", "#1a6cb3", "#3a8ad0", "#6aa9e0", "#9fc8ef", "#d4e6f8"] }, |
| 8 | + "brand-blue": { "role": "secondary", "displayName": "Brand Blue", "canonical": "#4bafff", "tonalRamp": ["#1a4a7a", "#2e6ea8", "#3a8ad0", "#4bafff", "#72bfff", "#9acfff", "#c2dfff", "#e6f3ff"] }, |
| 9 | + "brand-green": { "role": "secondary", "displayName": "Brand Green", "canonical": "#19f3be", "tonalRamp": ["#0a5c47", "#0d8a6e", "#10b892", "#19f3be", "#4df5cd", "#80f8dc", "#b3faea", "#e6fdf7"] }, |
| 10 | + "brand-magenta": { "role": "tertiary", "displayName": "Brand Magenta", "canonical": "#ff036a", "tonalRamp": ["#8a0036", "#b80048", "#e0005a", "#ff036a", "#ff3d89", "#ff70a7", "#ffa3c5", "#ffd6e5"] } |
| 11 | + }, |
| 12 | + "typographyMeta": { |
| 13 | + "body": { "displayName": "Body", "purpose": "All body text, paragraphs, form content" } |
| 14 | + }, |
| 15 | + "shadows": [], |
| 16 | + "motion": [ |
| 17 | + { "name": "btn-hover", "value": "background-color 0.15s ease-in-out", "purpose": "Button hover/focus state transitions" } |
| 18 | + ], |
| 19 | + "breakpoints": [ |
| 20 | + { "name": "sm", "value": "576px" }, |
| 21 | + { "name": "md", "value": "768px" }, |
| 22 | + { "name": "lg", "value": "992px" } |
| 23 | + ] |
| 24 | + }, |
| 25 | + "components": [ |
| 26 | + { |
| 27 | + "name": "Primary Button", |
| 28 | + "kind": "button", |
| 29 | + "refersTo": "button-primary", |
| 30 | + "description": "Primary call-to-action. Sign in, submit, confirm.", |
| 31 | + "html": "<button class=\"ds-btn-primary\">Sign In</button>", |
| 32 | + "css": ".ds-btn-primary { background: #1a6cb3; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-family: 'Open Sans', system-ui, sans-serif; font-weight: 600; font-size: 1rem; transition: background-color 0.15s ease-in-out; } .ds-btn-primary:hover { background: #145994; } .ds-btn-primary:active { background: #0f4775; }" |
| 33 | + }, |
| 34 | + { |
| 35 | + "name": "Outline Button", |
| 36 | + "kind": "button", |
| 37 | + "refersTo": "button-outline", |
| 38 | + "description": "Secondary action. Back, cancel, navigation.", |
| 39 | + "html": "<button class=\"ds-btn-outline\">← Back</button>", |
| 40 | + "css": ".ds-btn-outline { background: transparent; color: #6c757d; border: 1px solid #6c757d; padding: 4px 8px; border-radius: 6px; font-family: 'Open Sans', system-ui, sans-serif; font-weight: 400; font-size: 0.875rem; transition: background-color 0.15s ease-in-out; } .ds-btn-outline:hover { background: #f8f9fa; color: #5a6268; }" |
| 41 | + }, |
| 42 | + { |
| 43 | + "name": "Navbar", |
| 44 | + "kind": "nav", |
| 45 | + "refersTo": "nav", |
| 46 | + "description": "Top navigation bar with logo.", |
| 47 | + "html": "<nav class=\"ds-nav\"><a class=\"ds-nav-brand\" href=\"/\"><img src=\"codebar-logo.svg\" alt=\"codebar logo\" height=\"30\" /><span>auth</span></a></nav>", |
| 48 | + "css": ".ds-nav { background: #1a6cb3; padding: 8px 16px; display: flex; align-items: center; } .ds-nav-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-family: 'Open Sans', system-ui, sans-serif; } .ds-nav-brand img { filter: brightness(0) invert(1); }" |
| 49 | + }, |
| 50 | + { |
| 51 | + "name": "Alert — Error", |
| 52 | + "kind": "custom", |
| 53 | + "refersTo": "alert-error", |
| 54 | + "description": "Error or destructive message.", |
| 55 | + "html": "<div class=\"ds-alert-error\"><strong>Error:</strong> Something went wrong.</div>", |
| 56 | + "css": ".ds-alert-error { background: #ffccdd; color: #8a0036; border: 1px solid #ff99bb; border-radius: 8px; padding: 12px 16px; font-family: 'Open Sans', system-ui, sans-serif; font-size: 0.875rem; margin-bottom: 16px; }" |
| 57 | + }, |
| 58 | + { |
| 59 | + "name": "Alert — Success", |
| 60 | + "kind": "custom", |
| 61 | + "refersTo": "alert-success", |
| 62 | + "description": "Success confirmation message.", |
| 63 | + "html": "<div class=\"ds-alert-success\">✅ Magic link sent!</div>", |
| 64 | + "css": ".ds-alert-success { background: #d1f9ee; color: #0a5c47; border: 1px solid #a3f3dd; border-radius: 8px; padding: 12px 16px; font-family: 'Open Sans', system-ui, sans-serif; font-size: 0.875rem; margin-bottom: 16px; }" |
| 65 | + }, |
| 66 | + { |
| 67 | + "name": "Form Input", |
| 68 | + "kind": "input", |
| 69 | + "refersTo": "input-text", |
| 70 | + "description": "Text input field with label.", |
| 71 | + "html": "<label class=\"ds-label\">Email address</label><input class=\"ds-input\" type=\"email\" placeholder=\"you@example.com\" />", |
| 72 | + "css": ".ds-label { display: block; font-family: 'Open Sans', system-ui, sans-serif; font-weight: 400; font-size: 0.875rem; color: #212529; margin-bottom: 4px; } .ds-input { display: block; width: 100%; padding: 6px 12px; font-family: 'Open Sans', system-ui, sans-serif; font-size: 1rem; font-weight: 300; color: #212529; background: #fff; border: 1px solid #dee2e6; border-radius: 8px; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; box-sizing: border-box; } .ds-input:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25); }" |
| 73 | + }, |
| 74 | + { |
| 75 | + "name": "Card with Accent Header", |
| 76 | + "kind": "card", |
| 77 | + "refersTo": "card-accent", |
| 78 | + "description": "Data surface with magenta header accent.", |
| 79 | + "html": "<div class=\"ds-card\"><div class=\"ds-card-header\"><h3>User Information</h3></div><div class=\"ds-card-body\"><dl><dt>Name</dt><dd>Alex</dd><dt>Email</dt><dd>alex@example.com</dd></dl></div></div>", |
| 80 | + "css": ".ds-card { background: #fff; border: 1px solid rgba(0,0,0,0.125); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); } .ds-card-header { padding: 12px 16px; border-bottom: 3px solid #ff036a; } .ds-card-header h3 { margin: 0; font-family: 'Open Sans', system-ui, sans-serif; font-weight: 600; font-size: 1.25rem; } .ds-card-body { padding: 16px; font-family: 'Open Sans', system-ui, sans-serif; font-weight: 300; }" |
| 81 | + }, |
| 82 | + { |
| 83 | + "name": "Admin Table", |
| 84 | + "kind": "custom", |
| 85 | + "refersTo": "table-admin", |
| 86 | + "description": "Admin user list with inline role selector.", |
| 87 | + "html": "<table class=\"ds-table\"><thead><tr><th>Name</th><th>Email</th><th>Role</th></tr></thead><tbody><tr><td>Alex</td><td>alex@example.com</td><td><select class=\"ds-select\"><option>User</option><option>Admin</option></select></td></tr></tbody></table>", |
| 88 | + "css": ".ds-table { width: 100%; border-collapse: collapse; font-family: 'Open Sans', system-ui, sans-serif; font-size: 0.875rem; } .ds-table th { background: #f8f9fa; padding: 8px 12px; text-align: left; font-weight: 600; border-bottom: 2px solid #dee2e6; } .ds-table td { padding: 8px 12px; border-bottom: 1px solid #dee2e6; } .ds-table tbody tr:hover { background: #f8f9fa; } .ds-select { padding: 4px 8px; font-size: 0.875rem; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; }" |
| 89 | + } |
| 90 | + ], |
| 91 | + "narrative": { |
| 92 | + "northStar": "The Welcome Desk", |
| 93 | + "overview": "The auth app is a warm, unceremonious gateway — like a friendly reception desk at a community event. Users arrive to sign in, check their profile, or get a quick admin task done, then move on to what matters (the workshop). Every element should feel intentional but never demanding.", |
| 94 | + "keyCharacteristics": [ |
| 95 | + "Warm but efficient: a smile and a clear direction, not small talk", |
| 96 | + "Flat and grounded: no floating cards, no shadows — Bootstrap\u2019s default flatness with subtle layering via tinted backgrounds", |
| 97 | + "Friendly and tactile: buttons feel pressable, labels are plain language, space breathes without being sparse", |
| 98 | + "Distinctively codebar: the unusual brand palette (blue, green, magenta) is used deliberately, never as decoration" |
| 99 | + ], |
| 100 | + "rules": [ |
| 101 | + { "name": "The Rarity Rule", "body": "Each brand accent appears on at most one surface per page. Blue header, green success message, or magenta card accent \u2014 never two at once. Their infrequency is the point.", "section": "colors" }, |
| 102 | + { "name": "The Flat-By-Default Rule", "body": "Surfaces sit flush. No box-shadows on cards, no floating elements, no drag-and-drop affordances.", "section": "elevation" } |
| 103 | + ], |
| 104 | + "dos": [ |
| 105 | + "Do use the darker Trust Blue (#1a6cb3) for any interactive surface (buttons, nav) \u2014 it passes WCAG AA with white text", |
| 106 | + "Do reserve the brand accent colours (blue #4bafff, green #19f3be, magenta #ff036a) for tinted backgrounds and decorative borders only", |
| 107 | + "Do keep pages flat \u2014 no card shadows, no floating elements, no drag-and-drop", |
| 108 | + "Do use plain-language labels on forms (\u201cEmail address\u201d, not \u201cE-mail\u201d)", |
| 109 | + "Do use the magenta card-header accent to distinguish data surfaces from content surfaces" |
| 110 | + ], |
| 111 | + "donts": [ |
| 112 | + "Don\u2019t use brand accent colours as text or button backgrounds on white \u2014 they fail contrast", |
| 113 | + "Don\u2019t add corporate SaaS patterns (dark sidebars, metric dashboards, status badges)", |
| 114 | + "Don\u2019t use AI-slop patterns: gradient text, glassmorphism, hero-metric templates, generic card grids", |
| 115 | + "Don\u2019t nest cards \u2014 one level of card depth is the limit", |
| 116 | + "Don\u2019t use border-left greater than 1px as a coloured accent stripe on cards or alerts", |
| 117 | + "Don\u2019t use em dashes in UX copy", |
| 118 | + "Don\u2019t render the data-bs-theme as light \u2014 use auto to respect OS preference" |
| 119 | + ] |
| 120 | + } |
| 121 | +} |
0 commit comments