@behavioral-agentic-design-system/core 0.1.3 → 0.1.4
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/package.json +2 -1
- package/src/components/ui/index.ts +38 -0
- package/src/styles.css +170 -0
- package/src/tokens.json +40 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behavioral-agentic-design-system/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "BADS core — tokens and base shadcn/ui components for the Behavioral Agentic Design System.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": "./src/index.ts",
|
|
14
|
+
"./styles.css": "./src/styles.css",
|
|
14
15
|
"./tokens.json": "./src/tokens.json",
|
|
15
16
|
"./lib/utils": "./src/lib/utils.ts",
|
|
16
17
|
"./hooks/*": "./src/hooks/*.ts",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Local convenience barrel for preview routes and example components.
|
|
2
|
+
// NOT exported from package.json — published consumers must use per-component
|
|
3
|
+
// import paths so optional peer deps stay optional.
|
|
4
|
+
export * from "./alert";
|
|
5
|
+
export * from "./avatar";
|
|
6
|
+
export * from "./badge";
|
|
7
|
+
export * from "./breadcrumb";
|
|
8
|
+
export * from "./button";
|
|
9
|
+
export * from "./calendar";
|
|
10
|
+
export * from "./card";
|
|
11
|
+
export * from "./chart";
|
|
12
|
+
export * from "./checkbox";
|
|
13
|
+
export * from "./collapsible";
|
|
14
|
+
export * from "./command";
|
|
15
|
+
export * from "./dialog";
|
|
16
|
+
export * from "./dropdown-menu";
|
|
17
|
+
export * from "./input";
|
|
18
|
+
export * from "./label";
|
|
19
|
+
export * from "./popover";
|
|
20
|
+
export * from "./progress";
|
|
21
|
+
export * from "./radio-group";
|
|
22
|
+
export * from "./resizable";
|
|
23
|
+
export * from "./scroll-area";
|
|
24
|
+
export * from "./select";
|
|
25
|
+
export * from "./separator";
|
|
26
|
+
export * from "./sheet";
|
|
27
|
+
export * from "./sidebar";
|
|
28
|
+
export * from "./skeleton";
|
|
29
|
+
export * from "./slider";
|
|
30
|
+
export * from "./sonner";
|
|
31
|
+
export * from "./switch";
|
|
32
|
+
export * from "./table";
|
|
33
|
+
export * from "./tabs";
|
|
34
|
+
export * from "./tag";
|
|
35
|
+
export * from "./textarea";
|
|
36
|
+
export * from "./toggle";
|
|
37
|
+
export * from "./toggle-group";
|
|
38
|
+
export * from "./tooltip";
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* @behavioral-agentic-design-system/core — single-file theme import.
|
|
2
|
+
*
|
|
3
|
+
* Usage in your app's global stylesheet:
|
|
4
|
+
* @import "tailwindcss";
|
|
5
|
+
* @import "tw-animate-css";
|
|
6
|
+
* @import "@behavioral-agentic-design-system/core/styles.css";
|
|
7
|
+
*
|
|
8
|
+
* This file ships:
|
|
9
|
+
* - Atkinson Hyperlegible from Google Fonts (default sans, zero setup)
|
|
10
|
+
* - The full :root + .dark token set (shadcn neutral palette)
|
|
11
|
+
* - The @theme inline mapping so Tailwind v4 picks up every token
|
|
12
|
+
* - Accessibility floor: text-xs=14px, text-sm=16px, text-base=18px
|
|
13
|
+
*
|
|
14
|
+
* It does NOT ship Tailwind itself — your app must already have Tailwind v4.
|
|
15
|
+
* Override any token by re-declaring it after this @import. See
|
|
16
|
+
* ENGINEERING.md for customization patterns.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');
|
|
20
|
+
|
|
21
|
+
@custom-variant dark (&:is(.dark *));
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
--font-sans: 'Atkinson Hyperlegible', ui-sans-serif, sans-serif, system-ui;
|
|
25
|
+
--font-mono: ui-monospace, 'Menlo', 'Monaco', monospace;
|
|
26
|
+
--font-serif: ui-serif, Georgia, serif;
|
|
27
|
+
|
|
28
|
+
--background: oklch(1 0 0);
|
|
29
|
+
--foreground: oklch(0.145 0 0);
|
|
30
|
+
--card: oklch(1 0 0);
|
|
31
|
+
--card-foreground: oklch(0.145 0 0);
|
|
32
|
+
--popover: oklch(1 0 0);
|
|
33
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
34
|
+
--primary: oklch(0.205 0 0);
|
|
35
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
36
|
+
--secondary: oklch(0.97 0 0);
|
|
37
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
38
|
+
--muted: oklch(0.97 0 0);
|
|
39
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
40
|
+
--accent: oklch(0.97 0 0);
|
|
41
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
42
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
43
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
44
|
+
--border: oklch(0.922 0 0);
|
|
45
|
+
--input: oklch(0.922 0 0);
|
|
46
|
+
--ring: oklch(0.708 0 0);
|
|
47
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
48
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
49
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
50
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
51
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
52
|
+
--sidebar: oklch(0.985 0 0);
|
|
53
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
54
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
55
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
56
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
57
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
58
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
59
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
60
|
+
|
|
61
|
+
--radius: 0.625rem;
|
|
62
|
+
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
63
|
+
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
64
|
+
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
65
|
+
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
66
|
+
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
|
67
|
+
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
|
68
|
+
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
|
69
|
+
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dark {
|
|
73
|
+
--background: oklch(0.145 0 0);
|
|
74
|
+
--foreground: oklch(0.985 0 0);
|
|
75
|
+
--card: oklch(0.205 0 0);
|
|
76
|
+
--card-foreground: oklch(0.985 0 0);
|
|
77
|
+
--popover: oklch(0.205 0 0);
|
|
78
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
79
|
+
--primary: oklch(0.922 0 0);
|
|
80
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
81
|
+
--secondary: oklch(0.269 0 0);
|
|
82
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
83
|
+
--muted: oklch(0.269 0 0);
|
|
84
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
85
|
+
--accent: oklch(0.269 0 0);
|
|
86
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
87
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
88
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
89
|
+
--border: oklch(1 0 0 / 10%);
|
|
90
|
+
--input: oklch(1 0 0 / 15%);
|
|
91
|
+
--ring: oklch(0.556 0 0);
|
|
92
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
93
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
94
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
95
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
96
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
97
|
+
--sidebar: oklch(0.205 0 0);
|
|
98
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
99
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
100
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
101
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
102
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
103
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
104
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@theme inline {
|
|
108
|
+
--color-background: var(--background);
|
|
109
|
+
--color-foreground: var(--foreground);
|
|
110
|
+
--color-card: var(--card);
|
|
111
|
+
--color-card-foreground: var(--card-foreground);
|
|
112
|
+
--color-popover: var(--popover);
|
|
113
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
114
|
+
--color-primary: var(--primary);
|
|
115
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
116
|
+
--color-secondary: var(--secondary);
|
|
117
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
118
|
+
--color-muted: var(--muted);
|
|
119
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
120
|
+
--color-accent: var(--accent);
|
|
121
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
122
|
+
--color-destructive: var(--destructive);
|
|
123
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
124
|
+
--color-border: var(--border);
|
|
125
|
+
--color-input: var(--input);
|
|
126
|
+
--color-ring: var(--ring);
|
|
127
|
+
--color-chart-1: var(--chart-1);
|
|
128
|
+
--color-chart-2: var(--chart-2);
|
|
129
|
+
--color-chart-3: var(--chart-3);
|
|
130
|
+
--color-chart-4: var(--chart-4);
|
|
131
|
+
--color-chart-5: var(--chart-5);
|
|
132
|
+
--color-sidebar: var(--sidebar);
|
|
133
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
134
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
135
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
136
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
137
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
138
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
139
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
140
|
+
|
|
141
|
+
--font-sans: var(--font-sans);
|
|
142
|
+
--font-mono: var(--font-mono);
|
|
143
|
+
--font-serif: var(--font-serif);
|
|
144
|
+
|
|
145
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
146
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
147
|
+
--radius-lg: var(--radius);
|
|
148
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
149
|
+
|
|
150
|
+
/* Accessibility floor — minimum 14px for text-xs (vs Tailwind's 12px default).
|
|
151
|
+
* See ENGINEERING.md "Accessibility" for the full WCAG AA contract. */
|
|
152
|
+
--text-xs: 14px;
|
|
153
|
+
--text-sm: 16px;
|
|
154
|
+
--text-base: 18px;
|
|
155
|
+
--text-lg: 20px;
|
|
156
|
+
--text-xl: 24px;
|
|
157
|
+
--text-2xl: 28px;
|
|
158
|
+
--text-3xl: 32px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@layer base {
|
|
162
|
+
* {
|
|
163
|
+
@apply border-border outline-ring/50;
|
|
164
|
+
}
|
|
165
|
+
body {
|
|
166
|
+
@apply bg-background text-foreground;
|
|
167
|
+
-webkit-font-smoothing: antialiased;
|
|
168
|
+
-moz-osx-font-smoothing: grayscale;
|
|
169
|
+
}
|
|
170
|
+
}
|
package/src/tokens.json
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"$type": "color",
|
|
57
57
|
"$description": "Primary buttons, CTAs, links",
|
|
58
58
|
"$extensions": {
|
|
59
|
-
"
|
|
59
|
+
"BADS.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "normal-text" }
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"primary-hover": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"$type": "color",
|
|
65
65
|
"$description": "Primary button hover state",
|
|
66
66
|
"$extensions": {
|
|
67
|
-
"
|
|
67
|
+
"BADS.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "normal-text" }
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"secondary": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"$type": "color",
|
|
73
73
|
"$description": "Secondary buttons",
|
|
74
74
|
"$extensions": {
|
|
75
|
-
"
|
|
75
|
+
"BADS.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "normal-text" }
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"destructive": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"$type": "color",
|
|
81
81
|
"$description": "Delete, remove, destructive actions",
|
|
82
82
|
"$extensions": {
|
|
83
|
-
"
|
|
83
|
+
"BADS.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "large-text", "note": "Orange/white pairing only meets AA for large text (18pt+ or 14pt bold). Use for buttons sized lg or with bold weight." }
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"disabled": {
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"$type": "color",
|
|
89
89
|
"$description": "Disabled buttons and controls",
|
|
90
90
|
"$extensions": {
|
|
91
|
-
"
|
|
92
|
-
"
|
|
91
|
+
"BADS.wcag": { "exempt": true, "reason": "WCAG 1.4.3 — disabled controls are exempt from contrast requirements" },
|
|
92
|
+
"BADS.modes": { "dark": "{color.primitive.slate.500}" }
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
},
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"$type": "color",
|
|
100
100
|
"$description": "Page background",
|
|
101
101
|
"$extensions": {
|
|
102
|
-
"
|
|
102
|
+
"BADS.modes": { "dark": "{color.primitive.blue.950}" }
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"card": {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"$type": "color",
|
|
108
108
|
"$description": "Card backgrounds, elevated surfaces",
|
|
109
109
|
"$extensions": {
|
|
110
|
-
"
|
|
110
|
+
"BADS.modes": { "dark": "{color.primitive.blue.850}" }
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"muted": {
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"$type": "color",
|
|
116
116
|
"$description": "Muted backgrounds, secondary panels",
|
|
117
117
|
"$extensions": {
|
|
118
|
-
"
|
|
118
|
+
"BADS.modes": { "dark": "{color.primitive.blue.700}" }
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
"sidebar": {
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"$type": "color",
|
|
124
124
|
"$description": "Sidebar background (light mode)",
|
|
125
125
|
"$extensions": {
|
|
126
|
-
"
|
|
126
|
+
"BADS.modes": { "dark": "{color.primitive.blue.950}" }
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"sidebar-dark": {
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
"$type": "color",
|
|
144
144
|
"$description": "Body text, headings",
|
|
145
145
|
"$extensions": {
|
|
146
|
-
"
|
|
147
|
-
"
|
|
146
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AAA", "useCase": "normal-text" },
|
|
147
|
+
"BADS.modes": { "dark": "{color.primitive.neutral.50}" }
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
"secondary": {
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
"$type": "color",
|
|
153
153
|
"$description": "Muted text, descriptions",
|
|
154
154
|
"$extensions": {
|
|
155
|
-
"
|
|
156
|
-
"
|
|
155
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "large-text", "note": "Neutral-500 only meets AA for large text. Use for captions/labels at 18pt+ or restrict to non-essential text." },
|
|
156
|
+
"BADS.modes": { "dark": "{color.primitive.slate.100}" }
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
"on-primary": {
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"$type": "color",
|
|
162
162
|
"$description": "Text on primary-colored backgrounds",
|
|
163
163
|
"$extensions": {
|
|
164
|
-
"
|
|
164
|
+
"BADS.wcag": { "pairWith": "color.semantic.action.primary", "level": "AA", "useCase": "normal-text" }
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
"on-dark": {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"$type": "color",
|
|
170
170
|
"$description": "Text on dark backgrounds",
|
|
171
171
|
"$extensions": {
|
|
172
|
-
"
|
|
172
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.sidebar-dark", "level": "AAA", "useCase": "normal-text" }
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
"link": {
|
|
@@ -177,8 +177,8 @@
|
|
|
177
177
|
"$type": "color",
|
|
178
178
|
"$description": "Hyperlinks, clickable text",
|
|
179
179
|
"$extensions": {
|
|
180
|
-
"
|
|
181
|
-
"
|
|
180
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "normal-text", "note": "Brand blue (#025FFF) hits ~5.1:1 on white — passes AA normal text but not AAA. Underline links to satisfy WCAG 1.4.1 (color isn't the only indicator)." },
|
|
181
|
+
"BADS.modes": { "dark": "{color.primitive.blue.300}" }
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
"error": {
|
|
@@ -186,8 +186,8 @@
|
|
|
186
186
|
"$type": "color",
|
|
187
187
|
"$description": "Error messages — uses dark coral to stay on-brand and meet AA contrast",
|
|
188
188
|
"$extensions": {
|
|
189
|
-
"
|
|
190
|
-
"
|
|
189
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "normal-text", "note": "Switched from orange.500 to coral.700 for brand consistency with status.error and to pass AA contrast." },
|
|
190
|
+
"BADS.modes": { "dark": "{color.primitive.coral.500}" }
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
},
|
|
@@ -197,8 +197,8 @@
|
|
|
197
197
|
"$type": "color",
|
|
198
198
|
"$description": "Card borders, dividers",
|
|
199
199
|
"$extensions": {
|
|
200
|
-
"
|
|
201
|
-
"
|
|
200
|
+
"BADS.wcag": { "exempt": true, "reason": "Decorative border, not load-bearing for meaning" },
|
|
201
|
+
"BADS.modes": { "dark": "{color.primitive.slate.500}" }
|
|
202
202
|
}
|
|
203
203
|
},
|
|
204
204
|
"input": {
|
|
@@ -206,8 +206,8 @@
|
|
|
206
206
|
"$type": "color",
|
|
207
207
|
"$description": "Form input borders — uses functional-border primitive that meets WCAG 1.4.11",
|
|
208
208
|
"$extensions": {
|
|
209
|
-
"
|
|
210
|
-
"
|
|
209
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "note": "Switched from neutral.200 to neutral.300 for accessible input boundaries. Decorative borders still use neutral.200 via border.default." },
|
|
210
|
+
"BADS.modes": { "dark": "{color.primitive.slate.300}" }
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
"focus": {
|
|
@@ -215,8 +215,8 @@
|
|
|
215
215
|
"$type": "color",
|
|
216
216
|
"$description": "Focus rings",
|
|
217
217
|
"$extensions": {
|
|
218
|
-
"
|
|
219
|
-
"
|
|
218
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AAA", "useCase": "ui-component", "minimumRequired": "3:1 per WCAG 1.4.11" },
|
|
219
|
+
"BADS.modes": { "dark": "{color.primitive.neutral.50}" }
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"error": {
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"$type": "color",
|
|
225
225
|
"$description": "Error state borders",
|
|
226
226
|
"$extensions": {
|
|
227
|
-
"
|
|
227
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "minimumRequired": "3:1 per WCAG 1.4.11" }
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
},
|
|
@@ -233,29 +233,29 @@
|
|
|
233
233
|
"$value": "{color.primitive.green.700}",
|
|
234
234
|
"$type": "color",
|
|
235
235
|
"$extensions": {
|
|
236
|
-
"
|
|
237
|
-
"
|
|
236
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "note": "Always pair status color with text or icon — color cannot be the only indicator (WCAG 1.4.1)." },
|
|
237
|
+
"BADS.modes": { "dark": "{color.primitive.green.500}" }
|
|
238
238
|
}
|
|
239
239
|
},
|
|
240
240
|
"warning": {
|
|
241
241
|
"$value": "{color.primitive.orange.500}",
|
|
242
242
|
"$type": "color",
|
|
243
243
|
"$extensions": {
|
|
244
|
-
"
|
|
244
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "note": "Always pair status color with text or icon — color cannot be the only indicator (WCAG 1.4.1)." }
|
|
245
245
|
}
|
|
246
246
|
},
|
|
247
247
|
"error": {
|
|
248
248
|
"$value": "{color.primitive.coral.500}",
|
|
249
249
|
"$type": "color",
|
|
250
250
|
"$extensions": {
|
|
251
|
-
"
|
|
251
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "note": "Always pair status color with text or icon — color cannot be the only indicator (WCAG 1.4.1)." }
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
"info": {
|
|
255
255
|
"$value": "{color.primitive.blue.400}",
|
|
256
256
|
"$type": "color",
|
|
257
257
|
"$extensions": {
|
|
258
|
-
"
|
|
258
|
+
"BADS.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "note": "Always pair status color with text or icon — color cannot be the only indicator (WCAG 1.4.1)." }
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -264,19 +264,19 @@
|
|
|
264
264
|
|
|
265
265
|
"fontFamily": {
|
|
266
266
|
"sans": {
|
|
267
|
-
"$value": "
|
|
267
|
+
"$value": "'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
|
|
268
268
|
"$type": "fontFamily",
|
|
269
|
-
"$description": "Primary sans (body, UI).
|
|
269
|
+
"$description": "Primary sans (body, UI). Hyperlegible Sans is the BADS default — production-safe and accessibility-friendly. Override per client."
|
|
270
270
|
},
|
|
271
271
|
"serif": {
|
|
272
|
-
"$value": "
|
|
272
|
+
"$value": "ui-serif, Georgia, serif",
|
|
273
273
|
"$type": "fontFamily",
|
|
274
|
-
"$description": "Display/serif
|
|
274
|
+
"$description": "Display/serif fallback stack. No default brand serif — clients should override."
|
|
275
275
|
},
|
|
276
276
|
"mono": {
|
|
277
|
-
"$value": "'
|
|
277
|
+
"$value": "'JetBrains Mono', ui-monospace, monospace",
|
|
278
278
|
"$type": "fontFamily",
|
|
279
|
-
"$description": "Monospace (code, captions).
|
|
279
|
+
"$description": "Monospace (code, captions). JetBrains Mono is the default fallback."
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
"input": {
|
|
423
423
|
"$description": "Form inputs collect user data — pair with explicit labels and consent UX where applicable",
|
|
424
424
|
"$extensions": {
|
|
425
|
-
"
|
|
425
|
+
"BADS.ethics": {
|
|
426
426
|
"consentRequired": "conditional",
|
|
427
427
|
"dataScope": "user-provided",
|
|
428
428
|
"requirements": [
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
"modal": {
|
|
455
455
|
"$description": "Modals interrupt the user — use sparingly and never to coerce action",
|
|
456
456
|
"$extensions": {
|
|
457
|
-
"
|
|
457
|
+
"BADS.ethics": {
|
|
458
458
|
"antiPatterns": [
|
|
459
459
|
"confirmshame (e.g. 'Are you sure? You'll lose your progress!')",
|
|
460
460
|
"manufactured urgency ('Only 2 left!' timers)",
|