@behavioral-agentic-design-system/core 0.1.1

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.
Files changed (41) hide show
  1. package/README.md +22 -0
  2. package/package.json +25 -0
  3. package/src/components/ui/alert.tsx +66 -0
  4. package/src/components/ui/avatar.tsx +109 -0
  5. package/src/components/ui/badge.tsx +48 -0
  6. package/src/components/ui/breadcrumb.tsx +109 -0
  7. package/src/components/ui/button.tsx +65 -0
  8. package/src/components/ui/calendar.tsx +217 -0
  9. package/src/components/ui/card.tsx +92 -0
  10. package/src/components/ui/chart.tsx +387 -0
  11. package/src/components/ui/checkbox.tsx +32 -0
  12. package/src/components/ui/collapsible.tsx +33 -0
  13. package/src/components/ui/command.tsx +184 -0
  14. package/src/components/ui/dialog.tsx +158 -0
  15. package/src/components/ui/dropdown-menu.tsx +257 -0
  16. package/src/components/ui/index.ts +35 -0
  17. package/src/components/ui/input.tsx +21 -0
  18. package/src/components/ui/label.tsx +24 -0
  19. package/src/components/ui/popover.tsx +89 -0
  20. package/src/components/ui/progress.tsx +31 -0
  21. package/src/components/ui/radio-group.tsx +45 -0
  22. package/src/components/ui/resizable.tsx +53 -0
  23. package/src/components/ui/scroll-area.tsx +58 -0
  24. package/src/components/ui/select.tsx +190 -0
  25. package/src/components/ui/separator.tsx +29 -0
  26. package/src/components/ui/sheet.tsx +143 -0
  27. package/src/components/ui/sidebar.tsx +726 -0
  28. package/src/components/ui/skeleton.tsx +13 -0
  29. package/src/components/ui/slider.tsx +63 -0
  30. package/src/components/ui/sonner.tsx +40 -0
  31. package/src/components/ui/switch.tsx +35 -0
  32. package/src/components/ui/table.tsx +116 -0
  33. package/src/components/ui/tabs.tsx +88 -0
  34. package/src/components/ui/tag.tsx +46 -0
  35. package/src/components/ui/textarea.tsx +18 -0
  36. package/src/components/ui/toggle-group.tsx +83 -0
  37. package/src/components/ui/toggle.tsx +47 -0
  38. package/src/components/ui/tooltip.tsx +57 -0
  39. package/src/index.ts +2 -0
  40. package/src/lib/utils.ts +6 -0
  41. package/src/tokens.json +476 -0
@@ -0,0 +1,476 @@
1
+ {
2
+ "$schema": "https://tokens.studio/schema/draft.json",
3
+ "version": "0.2.0",
4
+
5
+ "color": {
6
+ "primitive": {
7
+ "blue": {
8
+ "50": { "$value": "#EBF0FF", "$type": "color", "$description": "Lightest blue tint" },
9
+ "100": { "$value": "#D1DFFF", "$type": "color" },
10
+ "200": { "$value": "#7BA8FF", "$type": "color" },
11
+ "300": { "$value": "#8BD6E5", "$type": "color" },
12
+ "400": { "$value": "#4080FF", "$type": "color" },
13
+ "500": { "$value": "#025FFF", "$type": "color", "$description": "Primary brand color" },
14
+ "600": { "$value": "#0020D6", "$type": "color" },
15
+ "700": { "$value": "#0E295E", "$type": "color", "$description": "Secondary brand color" },
16
+ "800": { "$value": "#0A1D42", "$type": "color" },
17
+ "850": { "$value": "#09142A", "$type": "color", "$description": "Dark mode card surface" },
18
+ "900": { "$value": "#051A3F", "$type": "color", "$description": "Darkest blue" },
19
+ "950": { "$value": "#040D20", "$type": "color", "$description": "Dark mode page background — deepest brand blue" }
20
+ },
21
+ "slate": {
22
+ "100": { "$value": "#B8D6E5", "$type": "color", "$description": "Light blue-gray — secondary text on dark backgrounds" },
23
+ "300": { "$value": "#7292A1", "$type": "color", "$description": "Mid blue-gray — input borders on dark backgrounds" },
24
+ "500": { "$value": "#324852", "$type": "color", "$description": "Deep blue-gray — default borders/dividers on dark backgrounds" }
25
+ },
26
+ "cream": {
27
+ "100": { "$value": "#FFECDC", "$type": "color", "$description": "Warm accent highlight" }
28
+ },
29
+ "coral": {
30
+ "500": { "$value": "#DB6A58", "$type": "color", "$description": "Brand coral. Use for accents and status indicators. Does not meet AA 4.5:1 on white text — pair with coral.700 for primary CTA usage." },
31
+ "700": { "$value": "#A03A2A", "$type": "color", "$description": "Dark accessible coral — meets AA 4.5:1 on white for error text and primary CTAs" }
32
+ },
33
+ "orange": {
34
+ "500": { "$value": "#FF5532", "$type": "color", "$description": "Warning/attention color" }
35
+ },
36
+ "green": {
37
+ "500": { "$value": "#10B981", "$type": "color", "$description": "Success/positive color (light variant)" },
38
+ "700": { "$value": "#047857", "$type": "color", "$description": "Dark accessible green — meets 3:1 on white for status indicators" }
39
+ },
40
+ "neutral": {
41
+ "0": { "$value": "#FFFFFF", "$type": "color" },
42
+ "50": { "$value": "#FAFCFC", "$type": "color" },
43
+ "100": { "$value": "#F5F5F5", "$type": "color" },
44
+ "200": { "$value": "#E5E5E5", "$type": "color", "$description": "Decorative borders, dividers (exempt from 3:1)" },
45
+ "300": { "$value": "#767676", "$type": "color", "$description": "Functional borders — meets WCAG 1.4.11 (3:1) for inputs and UI components" },
46
+ "400": { "$value": "#ABABAB", "$type": "color" },
47
+ "500": { "$value": "#887B73", "$type": "color" },
48
+ "700": { "$value": "#555555", "$type": "color" },
49
+ "900": { "$value": "#1A1A1A", "$type": "color" }
50
+ }
51
+ },
52
+ "semantic": {
53
+ "action": {
54
+ "primary": {
55
+ "$value": "{color.primitive.blue.500}",
56
+ "$type": "color",
57
+ "$description": "Primary buttons, CTAs, links",
58
+ "$extensions": {
59
+ "bads.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "normal-text" }
60
+ }
61
+ },
62
+ "primary-hover": {
63
+ "$value": "{color.primitive.blue.600}",
64
+ "$type": "color",
65
+ "$description": "Primary button hover state",
66
+ "$extensions": {
67
+ "bads.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "normal-text" }
68
+ }
69
+ },
70
+ "secondary": {
71
+ "$value": "{color.primitive.blue.700}",
72
+ "$type": "color",
73
+ "$description": "Secondary buttons",
74
+ "$extensions": {
75
+ "bads.wcag": { "pairWith": "color.semantic.text.on-primary", "level": "AA", "useCase": "normal-text" }
76
+ }
77
+ },
78
+ "destructive": {
79
+ "$value": "{color.primitive.orange.500}",
80
+ "$type": "color",
81
+ "$description": "Delete, remove, destructive actions",
82
+ "$extensions": {
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
+ }
85
+ },
86
+ "disabled": {
87
+ "$value": "{color.primitive.neutral.400}",
88
+ "$type": "color",
89
+ "$description": "Disabled buttons and controls",
90
+ "$extensions": {
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
+ }
94
+ }
95
+ },
96
+ "surface": {
97
+ "page": {
98
+ "$value": "{color.primitive.neutral.50}",
99
+ "$type": "color",
100
+ "$description": "Page background",
101
+ "$extensions": {
102
+ "bads.modes": { "dark": "{color.primitive.blue.950}" }
103
+ }
104
+ },
105
+ "card": {
106
+ "$value": "{color.primitive.neutral.0}",
107
+ "$type": "color",
108
+ "$description": "Card backgrounds, elevated surfaces",
109
+ "$extensions": {
110
+ "bads.modes": { "dark": "{color.primitive.blue.850}" }
111
+ }
112
+ },
113
+ "muted": {
114
+ "$value": "{color.primitive.neutral.50}",
115
+ "$type": "color",
116
+ "$description": "Muted backgrounds, secondary panels",
117
+ "$extensions": {
118
+ "bads.modes": { "dark": "{color.primitive.blue.700}" }
119
+ }
120
+ },
121
+ "sidebar": {
122
+ "$value": "{color.primitive.neutral.50}",
123
+ "$type": "color",
124
+ "$description": "Sidebar background (light mode)",
125
+ "$extensions": {
126
+ "bads.modes": { "dark": "{color.primitive.blue.950}" }
127
+ }
128
+ },
129
+ "sidebar-dark": {
130
+ "$value": "{color.primitive.blue.800}",
131
+ "$type": "color",
132
+ "$description": "Sidebar background — dark variant available regardless of mode (for split layouts)"
133
+ },
134
+ "overlay": {
135
+ "$value": "{color.primitive.neutral.900}",
136
+ "$type": "color",
137
+ "$description": "Modal overlays, scrims (with opacity)"
138
+ }
139
+ },
140
+ "text": {
141
+ "primary": {
142
+ "$value": "{color.primitive.neutral.900}",
143
+ "$type": "color",
144
+ "$description": "Body text, headings",
145
+ "$extensions": {
146
+ "bads.wcag": { "pairWith": "color.semantic.surface.card", "level": "AAA", "useCase": "normal-text" },
147
+ "bads.modes": { "dark": "{color.primitive.neutral.50}" }
148
+ }
149
+ },
150
+ "secondary": {
151
+ "$value": "{color.primitive.neutral.500}",
152
+ "$type": "color",
153
+ "$description": "Muted text, descriptions",
154
+ "$extensions": {
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
+ }
158
+ },
159
+ "on-primary": {
160
+ "$value": "{color.primitive.neutral.50}",
161
+ "$type": "color",
162
+ "$description": "Text on primary-colored backgrounds",
163
+ "$extensions": {
164
+ "bads.wcag": { "pairWith": "color.semantic.action.primary", "level": "AA", "useCase": "normal-text" }
165
+ }
166
+ },
167
+ "on-dark": {
168
+ "$value": "{color.primitive.neutral.50}",
169
+ "$type": "color",
170
+ "$description": "Text on dark backgrounds",
171
+ "$extensions": {
172
+ "bads.wcag": { "pairWith": "color.semantic.surface.sidebar-dark", "level": "AAA", "useCase": "normal-text" }
173
+ }
174
+ },
175
+ "link": {
176
+ "$value": "{color.primitive.blue.500}",
177
+ "$type": "color",
178
+ "$description": "Hyperlinks, clickable text",
179
+ "$extensions": {
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
+ }
183
+ },
184
+ "error": {
185
+ "$value": "{color.primitive.coral.700}",
186
+ "$type": "color",
187
+ "$description": "Error messages — uses dark coral to stay on-brand and meet AA contrast",
188
+ "$extensions": {
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
+ }
192
+ }
193
+ },
194
+ "border": {
195
+ "default": {
196
+ "$value": "{color.primitive.neutral.200}",
197
+ "$type": "color",
198
+ "$description": "Card borders, dividers",
199
+ "$extensions": {
200
+ "bads.wcag": { "exempt": true, "reason": "Decorative border, not load-bearing for meaning" },
201
+ "bads.modes": { "dark": "{color.primitive.slate.500}" }
202
+ }
203
+ },
204
+ "input": {
205
+ "$value": "{color.primitive.neutral.300}",
206
+ "$type": "color",
207
+ "$description": "Form input borders — uses functional-border primitive that meets WCAG 1.4.11",
208
+ "$extensions": {
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
+ }
212
+ },
213
+ "focus": {
214
+ "$value": "{color.primitive.blue.500}",
215
+ "$type": "color",
216
+ "$description": "Focus rings",
217
+ "$extensions": {
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
+ }
221
+ },
222
+ "error": {
223
+ "$value": "{color.primitive.orange.500}",
224
+ "$type": "color",
225
+ "$description": "Error state borders",
226
+ "$extensions": {
227
+ "bads.wcag": { "pairWith": "color.semantic.surface.card", "level": "AA", "useCase": "ui-component", "minimumRequired": "3:1 per WCAG 1.4.11" }
228
+ }
229
+ }
230
+ },
231
+ "status": {
232
+ "success": {
233
+ "$value": "{color.primitive.green.700}",
234
+ "$type": "color",
235
+ "$extensions": {
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
+ }
239
+ },
240
+ "warning": {
241
+ "$value": "{color.primitive.orange.500}",
242
+ "$type": "color",
243
+ "$extensions": {
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
+ }
246
+ },
247
+ "error": {
248
+ "$value": "{color.primitive.coral.500}",
249
+ "$type": "color",
250
+ "$extensions": {
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
+ }
253
+ },
254
+ "info": {
255
+ "$value": "{color.primitive.blue.400}",
256
+ "$type": "color",
257
+ "$extensions": {
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
+ }
260
+ }
261
+ }
262
+ }
263
+ },
264
+
265
+ "fontFamily": {
266
+ "sans": {
267
+ "$value": "Season, 'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
268
+ "$type": "fontFamily",
269
+ "$description": "Primary sans (body, UI). Season is the brand variable font; Hyperlegible is the production-safe fallback."
270
+ },
271
+ "serif": {
272
+ "$value": "Season, ui-serif, Georgia, serif",
273
+ "$type": "fontFamily",
274
+ "$description": "Display/serif. Uses Season variable font's serif axis. For now points to Season family — switch via font-variation-settings to access Serif subfamily."
275
+ },
276
+ "mono": {
277
+ "$value": "'Messina Sans Mono', 'JetBrains Mono', ui-monospace, monospace",
278
+ "$type": "fontFamily",
279
+ "$description": "Monospace (code, captions). Messina is the brand variable mono; JetBrains Mono is the fallback."
280
+ }
281
+ },
282
+
283
+ "fontSize": {
284
+ "xs": { "$value": "14px", "$type": "dimension", "$description": "Captions, labels. Floor for legibility." },
285
+ "sm": { "$value": "16px", "$type": "dimension", "$description": "Secondary text. Sits just under body." },
286
+ "base": { "$value": "18px", "$type": "dimension", "$description": "Body text baseline. 18px reads comfortably across devices and is generous for low-vision users without feeling oversized." },
287
+ "lg": { "$value": "20px", "$type": "dimension" },
288
+ "xl": { "$value": "24px", "$type": "dimension" },
289
+ "2xl": { "$value": "28px", "$type": "dimension" },
290
+ "3xl": { "$value": "32px", "$type": "dimension" }
291
+ },
292
+
293
+ "fontWeight": {
294
+ "regular": { "$value": "400", "$type": "fontWeight" },
295
+ "medium": { "$value": "500", "$type": "fontWeight" },
296
+ "bold": { "$value": "700", "$type": "fontWeight" }
297
+ },
298
+
299
+ "lineHeight": {
300
+ "tight": { "$value": "1.2", "$type": "lineHeight" },
301
+ "snug": { "$value": "1.3", "$type": "lineHeight" },
302
+ "normal": { "$value": "1.5", "$type": "lineHeight" },
303
+ "relaxed": { "$value": "1.6", "$type": "lineHeight" }
304
+ },
305
+
306
+ "spacing": {
307
+ "0": { "$value": "0px", "$type": "dimension" },
308
+ "1": { "$value": "4px", "$type": "dimension" },
309
+ "2": { "$value": "8px", "$type": "dimension" },
310
+ "3": { "$value": "12px", "$type": "dimension" },
311
+ "4": { "$value": "16px", "$type": "dimension" },
312
+ "5": { "$value": "20px", "$type": "dimension" },
313
+ "6": { "$value": "24px", "$type": "dimension" },
314
+ "8": { "$value": "32px", "$type": "dimension" },
315
+ "12": { "$value": "48px", "$type": "dimension" },
316
+ "16": { "$value": "64px", "$type": "dimension" }
317
+ },
318
+
319
+ "borderRadius": {
320
+ "none": { "$value": "0px", "$type": "dimension" },
321
+ "sm": { "$value": "2px", "$type": "dimension" },
322
+ "md": { "$value": "4px", "$type": "dimension" },
323
+ "lg": { "$value": "8px", "$type": "dimension" },
324
+ "xl": { "$value": "12px", "$type": "dimension" },
325
+ "full": { "$value": "9999px", "$type": "dimension" }
326
+ },
327
+
328
+ "shadow": {
329
+ "none": { "$value": "none", "$type": "shadow" },
330
+ "xs": { "$value": "0 1px 3px 0px hsl(0 0% 0% / 0.05)", "$type": "shadow" },
331
+ "sm": { "$value": "0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10)", "$type": "shadow" },
332
+ "md": { "$value": "0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10)", "$type": "shadow" },
333
+ "lg": { "$value": "0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10)", "$type": "shadow" },
334
+ "xl": { "$value": "0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10)", "$type": "shadow" }
335
+ },
336
+
337
+ "breakpoint": {
338
+ "mobile": { "$value": "320px", "$type": "dimension" },
339
+ "tablet": { "$value": "640px", "$type": "dimension" },
340
+ "desktop": { "$value": "1024px", "$type": "dimension" },
341
+ "wide": { "$value": "1280px", "$type": "dimension" }
342
+ },
343
+
344
+ "duration": {
345
+ "fast": { "$value": "150ms", "$type": "dimension" },
346
+ "base": { "$value": "200ms", "$type": "dimension" },
347
+ "slow": { "$value": "300ms", "$type": "dimension" }
348
+ },
349
+
350
+ "easing": {
351
+ "ease-in": { "$value": "cubic-bezier(0.4, 0, 1, 1)", "$type": "cubic-bezier" },
352
+ "ease-out": { "$value": "cubic-bezier(0, 0, 0.2, 1)", "$type": "cubic-bezier" },
353
+ "ease-in-out": { "$value": "cubic-bezier(0.4, 0, 0.2, 1)", "$type": "cubic-bezier" },
354
+ "ease-spring": { "$value": "cubic-bezier(0.34, 1.56, 0.64, 1)", "$type": "cubic-bezier" }
355
+ },
356
+
357
+ "typography": {
358
+ "heading-xl": {
359
+ "fontSize": { "$value": "{fontSize.3xl}", "$type": "dimension" },
360
+ "fontWeight": { "$value": "{fontWeight.bold}", "$type": "fontWeight" },
361
+ "lineHeight": { "$value": "{lineHeight.tight}", "$type": "lineHeight" }
362
+ },
363
+ "heading-lg": {
364
+ "fontSize": { "$value": "{fontSize.2xl}", "$type": "dimension" },
365
+ "fontWeight": { "$value": "{fontWeight.bold}", "$type": "fontWeight" },
366
+ "lineHeight": { "$value": "{lineHeight.snug}", "$type": "lineHeight" }
367
+ },
368
+ "heading-md": {
369
+ "fontSize": { "$value": "{fontSize.xl}", "$type": "dimension" },
370
+ "fontWeight": { "$value": "{fontWeight.bold}", "$type": "fontWeight" },
371
+ "lineHeight": { "$value": "{lineHeight.snug}", "$type": "lineHeight" }
372
+ },
373
+ "heading-sm": {
374
+ "fontSize": { "$value": "{fontSize.lg}", "$type": "dimension" },
375
+ "fontWeight": { "$value": "{fontWeight.medium}", "$type": "fontWeight" },
376
+ "lineHeight": { "$value": "{lineHeight.normal}", "$type": "lineHeight" }
377
+ },
378
+ "body": {
379
+ "fontSize": { "$value": "{fontSize.base}", "$type": "dimension" },
380
+ "fontWeight": { "$value": "{fontWeight.medium}", "$type": "fontWeight" },
381
+ "lineHeight": { "$value": "{lineHeight.relaxed}", "$type": "lineHeight" },
382
+ "$description": "Body text uses 500 (medium) as the accessibility baseline. 400 (regular) renders too thin at small sizes and on high-DPI screens, especially for low-vision users."
383
+ },
384
+ "body-sm": {
385
+ "fontSize": { "$value": "{fontSize.sm}", "$type": "dimension" },
386
+ "fontWeight": { "$value": "{fontWeight.medium}", "$type": "fontWeight" },
387
+ "lineHeight": { "$value": "{lineHeight.normal}", "$type": "lineHeight" }
388
+ },
389
+ "caption": {
390
+ "fontSize": { "$value": "{fontSize.xs}", "$type": "dimension" },
391
+ "fontWeight": { "$value": "{fontWeight.medium}", "$type": "fontWeight" },
392
+ "lineHeight": { "$value": "{lineHeight.normal}", "$type": "lineHeight" }
393
+ },
394
+ "code": {
395
+ "fontFamily": { "$value": "{fontFamily.mono}", "$type": "fontFamily" },
396
+ "fontSize": { "$value": "{fontSize.sm}", "$type": "dimension" },
397
+ "fontWeight": { "$value": "{fontWeight.regular}", "$type": "fontWeight" }
398
+ }
399
+ },
400
+
401
+ "component": {
402
+ "button": {
403
+ "primary": {
404
+ "background": { "$value": "{color.semantic.action.primary}", "$type": "color" },
405
+ "text": { "$value": "{color.semantic.text.on-primary}", "$type": "color" },
406
+ "background-hover": { "$value": "{color.semantic.action.primary-hover}", "$type": "color" },
407
+ "border-radius": { "$value": "{borderRadius.lg}", "$type": "dimension" },
408
+ "padding-x": { "$value": "{spacing.3}", "$type": "dimension" },
409
+ "padding-y": { "$value": "{spacing.2}", "$type": "dimension" }
410
+ },
411
+ "secondary": {
412
+ "background": { "$value": "transparent", "$type": "color" },
413
+ "border": { "$value": "{color.semantic.border.default}", "$type": "color" },
414
+ "text": { "$value": "{color.semantic.text.primary}", "$type": "color" },
415
+ "border-radius": { "$value": "{borderRadius.lg}", "$type": "dimension" }
416
+ },
417
+ "destructive": {
418
+ "background": { "$value": "{color.semantic.action.destructive}", "$type": "color" },
419
+ "text": { "$value": "{color.semantic.text.on-primary}", "$type": "color" }
420
+ }
421
+ },
422
+ "input": {
423
+ "$description": "Form inputs collect user data — pair with explicit labels and consent UX where applicable",
424
+ "$extensions": {
425
+ "bads.ethics": {
426
+ "consentRequired": "conditional",
427
+ "dataScope": "user-provided",
428
+ "requirements": [
429
+ "Always pair with a visible <label> (not just placeholder) per WCAG 3.3.2",
430
+ "If collecting personal data (PII, location, payment, biometric), require explicit consent UX per layer-2-ethics-responsibility/decision-trees.json",
431
+ "If under-13 surface, require parental consent flow (COPPA)",
432
+ "Honor data minimization — only collect what is necessary (GDPR Art. 5)"
433
+ ],
434
+ "seeAlso": "layer-2-ethics-responsibility/decision-trees.json"
435
+ }
436
+ },
437
+ "background": { "$value": "{color.semantic.surface.card}", "$type": "color" },
438
+ "border": { "$value": "{color.semantic.border.input}", "$type": "color" },
439
+ "border-focus": { "$value": "{color.semantic.border.focus}", "$type": "color" },
440
+ "text": { "$value": "{color.semantic.text.primary}", "$type": "color" },
441
+ "placeholder": { "$value": "{color.semantic.text.secondary}", "$type": "color" },
442
+ "border-radius": { "$value": "{borderRadius.lg}", "$type": "dimension" },
443
+ "padding-x": { "$value": "{spacing.3}", "$type": "dimension" },
444
+ "padding-y": { "$value": "{spacing.2}", "$type": "dimension" }
445
+ },
446
+ "card": {
447
+ "background": { "$value": "{color.semantic.surface.card}", "$type": "color" },
448
+ "border": { "$value": "{color.semantic.border.default}", "$type": "color" },
449
+ "text": { "$value": "{color.semantic.text.primary}", "$type": "color" },
450
+ "border-radius": { "$value": "{borderRadius.lg}", "$type": "dimension" },
451
+ "padding": { "$value": "{spacing.4}", "$type": "dimension" },
452
+ "shadow": { "$value": "{shadow.sm}", "$type": "shadow" }
453
+ },
454
+ "modal": {
455
+ "$description": "Modals interrupt the user — use sparingly and never to coerce action",
456
+ "$extensions": {
457
+ "bads.ethics": {
458
+ "antiPatterns": [
459
+ "confirmshame (e.g. 'Are you sure? You'll lose your progress!')",
460
+ "manufactured urgency ('Only 2 left!' timers)",
461
+ "asymmetric flows (subscribe in 1 click, cancel in 5)"
462
+ ],
463
+ "requirements": [
464
+ "Cancel/dismiss must be as easy as confirm",
465
+ "Trap focus; restore on close (a11y)",
466
+ "Cancel flow must mirror subscribe flow in click count"
467
+ ],
468
+ "seeAlso": "layer-2-ethics-responsibility/anti-patterns.md"
469
+ }
470
+ },
471
+ "overlay": { "$value": "{color.semantic.surface.overlay}", "$type": "color" },
472
+ "background": { "$value": "{color.semantic.surface.card}", "$type": "color" },
473
+ "shadow": { "$value": "{shadow.xl}", "$type": "shadow" }
474
+ }
475
+ }
476
+ }