@robr0/design-system 0.2.0 → 0.3.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.
Files changed (66) hide show
  1. package/README.md +8 -6
  2. package/components/Accordion/Accordion.js +0 -1
  3. package/components/Avatar/Avatar.js +1 -0
  4. package/components/Breadcrumb/Breadcrumb.d.ts +7 -1
  5. package/components/Breadcrumb/Breadcrumb.js +3 -2
  6. package/components/Button/Button.css +18 -0
  7. package/components/Button/Button.d.ts +6 -0
  8. package/components/Button/Button.js +13 -3
  9. package/components/Card/Card.css +6 -0
  10. package/components/CircularButton/CircularButton.css +11 -0
  11. package/components/CircularButton/CircularButton.d.ts +7 -1
  12. package/components/CircularButton/CircularButton.js +15 -4
  13. package/components/CodeBlock/CodeBlock.js +10 -1
  14. package/components/ColorPicker/ColorPicker.css +278 -0
  15. package/components/ColorPicker/ColorPicker.d.ts +50 -0
  16. package/components/ColorPicker/ColorPicker.js +338 -0
  17. package/components/Combobox/Combobox.css +0 -36
  18. package/components/Combobox/Combobox.js +90 -82
  19. package/components/CommandPalette/CommandPalette.css +1 -15
  20. package/components/CommandPalette/CommandPalette.js +6 -5
  21. package/components/ContextMenu/ContextMenu.css +262 -0
  22. package/components/ContextMenu/ContextMenu.d.ts +26 -0
  23. package/components/ContextMenu/ContextMenu.js +350 -0
  24. package/components/DateInput/DateInput.css +0 -36
  25. package/components/DateInput/DateInput.js +37 -33
  26. package/components/DatePicker/DatePicker.js +45 -34
  27. package/components/Dialog/Dialog.js +5 -4
  28. package/components/Drawer/Drawer.js +7 -2
  29. package/components/Dropdown/Dropdown.css +0 -36
  30. package/components/Dropdown/Dropdown.js +119 -109
  31. package/components/DropdownMenu/DropdownMenu.js +10 -7
  32. package/components/Field/Field.css +80 -0
  33. package/components/Field/Field.d.ts +50 -0
  34. package/components/Field/Field.js +58 -0
  35. package/components/Field/FieldContext.d.ts +42 -0
  36. package/components/Field/FieldContext.js +7 -0
  37. package/components/FileInput/FileInput.css +0 -36
  38. package/components/FileInput/FileInput.js +111 -103
  39. package/components/Input/Input.css +0 -43
  40. package/components/Input/Input.js +51 -46
  41. package/components/Kbd/Kbd.css +28 -0
  42. package/components/Kbd/Kbd.d.ts +19 -0
  43. package/components/Kbd/Kbd.js +14 -0
  44. package/components/Popover/Popover.d.ts +0 -6
  45. package/components/Popover/Popover.js +22 -16
  46. package/components/ProgressBar/ProgressBar.js +1 -1
  47. package/components/SelectionCard/SelectionCard.css +6 -2
  48. package/components/Skeleton/Skeleton.css +2 -0
  49. package/components/Spinner/Spinner.css +11 -0
  50. package/components/Spinner/Spinner.d.ts +2 -2
  51. package/components/Swatch/Swatch.css +52 -0
  52. package/components/Swatch/Swatch.d.ts +34 -0
  53. package/components/Swatch/Swatch.js +44 -0
  54. package/components/Table/Table.css +19 -0
  55. package/components/Table/Table.js +1 -1
  56. package/components/Textarea/Textarea.css +0 -43
  57. package/components/Textarea/Textarea.js +37 -35
  58. package/components/ToggleSwitch/ToggleSwitch.css +7 -2
  59. package/components/registry.d.ts +47 -10
  60. package/components/registry.js +5 -1
  61. package/components/registry.json +498 -56
  62. package/components/registry.json.d.ts +498 -56
  63. package/components/registry.json.js +4 -1
  64. package/index.d.ts +8 -1
  65. package/index.js +16 -1
  66. package/package.json +1 -1
@@ -1,62 +1,504 @@
1
1
  {
2
2
  "$comment": "SINGLE SOURCE OF TRUTH for the public component count. Every folder in src/components must appear in exactly one of these lists; scripts/validate-component-registry.mjs enforces this at build time. Import COMPONENT_COUNT from src/components/registry.ts wherever a count is displayed - never hardcode the number.",
3
+ "categories": [
4
+ "actions",
5
+ "charts",
6
+ "data-display",
7
+ "feedback",
8
+ "forms",
9
+ "layout",
10
+ "navigation",
11
+ "overlays"
12
+ ],
3
13
  "components": [
4
- "Accordion",
5
- "Alert",
6
- "AlertDialog",
7
- "AppLayout",
8
- "AppSidebar",
9
- "Avatar",
10
- "Badge",
11
- "Breadcrumb",
12
- "Button",
13
- "ButtonGroup",
14
- "Card",
15
- "Carousel",
16
- "Chart",
17
- "Checkbox",
18
- "Chip",
19
- "CircularButton",
20
- "CodeBlock",
21
- "Combobox",
22
- "CommandPalette",
23
- "ContactCard",
24
- "ContributionGraph",
25
- "DateInput",
26
- "DatePicker",
27
- "Dialog",
28
- "Divider",
29
- "Drawer",
30
- "Dropdown",
31
- "DropdownMenu",
32
- "EmptyState",
33
- "EntityCard",
34
- "Figure",
35
- "FileInput",
36
- "Input",
37
- "Instructions",
38
- "LinkList",
39
- "Nav",
40
- "Pagination",
41
- "Popover",
42
- "ProgressBar",
43
- "Quote",
44
- "RadioButton",
45
- "SectionTitle",
46
- "SegmentedControl",
47
- "SelectionCard",
48
- "Skeleton",
49
- "Slider",
50
- "Spinner",
51
- "Stat",
52
- "Table",
53
- "Tabs",
54
- "Textarea",
55
- "Timeline",
56
- "Toast",
57
- "ToggleGroup",
58
- "ToggleSwitch",
59
- "Tooltip"
14
+ {
15
+ "name": "Accordion",
16
+ "label": "Accordion",
17
+ "slug": "accordion",
18
+ "description": "Collapsible content sections for organising related information.",
19
+ "category": "data-display",
20
+ "client": true
21
+ },
22
+ {
23
+ "name": "Alert",
24
+ "label": "Alert",
25
+ "slug": "alert",
26
+ "description": "Contextual feedback with status variants, optional dismiss, and compact sizing.",
27
+ "category": "feedback",
28
+ "client": false
29
+ },
30
+ {
31
+ "name": "AlertDialog",
32
+ "label": "Alert dialog",
33
+ "slug": "alert-dialog",
34
+ "description": "Modal confirmation overlay with title, description, and confirm / cancel actions.",
35
+ "category": "overlays",
36
+ "client": true
37
+ },
38
+ {
39
+ "name": "AppLayout",
40
+ "label": "App layout",
41
+ "slug": "app-layout",
42
+ "description": "Full-page template pairing the collapsible App sidebar with a centred content area.",
43
+ "category": "layout",
44
+ "client": true
45
+ },
46
+ {
47
+ "name": "AppSidebar",
48
+ "label": "App sidebar",
49
+ "slug": "app-sidebar",
50
+ "description": "Collapsible navigation rail with accordion sub-items, category headings, and profile section.",
51
+ "category": "layout",
52
+ "client": true
53
+ },
54
+ {
55
+ "name": "Avatar",
56
+ "label": "Avatar",
57
+ "slug": "avatar",
58
+ "description": "User profile image with initials and icon fallback, status indicator, and multiple sizes.",
59
+ "category": "data-display",
60
+ "client": true
61
+ },
62
+ {
63
+ "name": "Badge",
64
+ "label": "Badge",
65
+ "slug": "badge",
66
+ "description": "Small inline status labels with info, positive, warning, error, and neutral variants.",
67
+ "category": "data-display",
68
+ "client": false
69
+ },
70
+ {
71
+ "name": "Breadcrumb",
72
+ "label": "Breadcrumb",
73
+ "slug": "breadcrumb",
74
+ "description": "Hierarchical navigation trail showing the user's location within the site.",
75
+ "category": "navigation",
76
+ "client": false
77
+ },
78
+ {
79
+ "name": "Button",
80
+ "label": "Button",
81
+ "slug": "button",
82
+ "description": "Primary and secondary button variants in default and compact sizes, with icon support and multiple states.",
83
+ "category": "actions",
84
+ "client": true
85
+ },
86
+ {
87
+ "name": "ButtonGroup",
88
+ "label": "Button group",
89
+ "slug": "button-group",
90
+ "description": "Horizontal and vertical button group layouts for related actions and navigation patterns.",
91
+ "category": "actions",
92
+ "client": false
93
+ },
94
+ {
95
+ "name": "Card",
96
+ "label": "Card",
97
+ "slug": "card",
98
+ "description": "Card components for previews, navigation, and token documentation \u2014 from content cards to colour swatches and typography specimens.",
99
+ "category": "data-display",
100
+ "client": true
101
+ },
102
+ {
103
+ "name": "Carousel",
104
+ "label": "Carousel",
105
+ "slug": "carousel",
106
+ "description": "Sliding content viewer with navigation arrows, dot indicators, auto-play, and keyboard support.",
107
+ "category": "data-display",
108
+ "client": true
109
+ },
110
+ {
111
+ "name": "Chart",
112
+ "label": "Chart",
113
+ "slug": "chart",
114
+ "description": "Data visualisation components built on Recharts. Includes bar, line, pie, and radial chart types with design-system token integration.",
115
+ "category": "charts",
116
+ "client": false
117
+ },
118
+ {
119
+ "name": "Checkbox",
120
+ "label": "Checkbox",
121
+ "slug": "checkbox",
122
+ "description": "Custom checkbox with check and indeterminate states, keyboard accessible with animated transitions.",
123
+ "category": "forms",
124
+ "client": true
125
+ },
126
+ {
127
+ "name": "Chip",
128
+ "label": "Chip",
129
+ "slug": "chip",
130
+ "description": "Compact pills for attributes, filters, and inline metadata.",
131
+ "category": "data-display",
132
+ "client": false
133
+ },
134
+ {
135
+ "name": "CircularButton",
136
+ "label": "Circular button",
137
+ "slug": "circular-button",
138
+ "description": "Round icon button with primary and secondary variants, default and compact sizes.",
139
+ "category": "actions",
140
+ "client": false
141
+ },
142
+ {
143
+ "name": "CodeBlock",
144
+ "label": "Code block",
145
+ "slug": "code-block",
146
+ "description": "Monospace code with a header and one-click copy.",
147
+ "category": "data-display",
148
+ "client": true
149
+ },
150
+ {
151
+ "name": "ColorPicker",
152
+ "label": "Colour picker",
153
+ "slug": "color-picker",
154
+ "description": "Swatch trigger opening a saturation area, hue and alpha sliders, and a hex field; controlled or uncontrolled.",
155
+ "category": "forms",
156
+ "client": true
157
+ },
158
+ {
159
+ "name": "Combobox",
160
+ "label": "Combobox",
161
+ "slug": "combobox",
162
+ "description": "A filterable select that narrows options as you type, with multi-select chips, grouping, and async loading.",
163
+ "category": "forms",
164
+ "client": true
165
+ },
166
+ {
167
+ "name": "CommandPalette",
168
+ "label": "Command palette",
169
+ "slug": "command-palette",
170
+ "description": "A modal Cmd+K launcher that searches a grouped command list, with keyboard navigation and shortcut hints.",
171
+ "category": "overlays",
172
+ "client": true
173
+ },
174
+ {
175
+ "name": "ContactCard",
176
+ "label": "Contact card",
177
+ "slug": "contact-card",
178
+ "description": "Linked contact method with icon, label, and value.",
179
+ "category": "data-display",
180
+ "client": true
181
+ },
182
+ {
183
+ "name": "ContextMenu",
184
+ "label": "Context menu",
185
+ "slug": "context-menu",
186
+ "description": "Right-click menu at the pointer with groups, sub-menus, and shortcut hints.",
187
+ "category": "overlays",
188
+ "client": true
189
+ },
190
+ {
191
+ "name": "ContributionGraph",
192
+ "label": "Contribution graph",
193
+ "slug": "contribution-graph",
194
+ "description": "A year of activity, one cell per day.",
195
+ "category": "charts",
196
+ "client": false
197
+ },
198
+ {
199
+ "name": "DateInput",
200
+ "label": "Date input",
201
+ "slug": "date-input",
202
+ "description": "Date input with native picker, calendar icon, label, and validation states.",
203
+ "category": "forms",
204
+ "client": true
205
+ },
206
+ {
207
+ "name": "DatePicker",
208
+ "label": "Date picker",
209
+ "slug": "date-picker",
210
+ "description": "Inline calendar with month navigation, day selection, and today indicator.",
211
+ "category": "forms",
212
+ "client": true
213
+ },
214
+ {
215
+ "name": "Dialog",
216
+ "label": "Dialog",
217
+ "slug": "dialog",
218
+ "description": "A general-purpose modal for focused tasks, with sizes, an optional footer, and full focus management.",
219
+ "category": "overlays",
220
+ "client": true
221
+ },
222
+ {
223
+ "name": "Divider",
224
+ "label": "Divider",
225
+ "slug": "divider",
226
+ "description": "A thin rule separating stacked content, with optional inline label and vertical orientation.",
227
+ "category": "layout",
228
+ "client": false
229
+ },
230
+ {
231
+ "name": "Drawer",
232
+ "label": "Drawer",
233
+ "slug": "drawer",
234
+ "description": "An edge-anchored modal panel that slides in from any side, for filter panels, detail views, and mobile navigation.",
235
+ "category": "overlays",
236
+ "client": true
237
+ },
238
+ {
239
+ "name": "Dropdown",
240
+ "label": "Dropdown",
241
+ "slug": "dropdown",
242
+ "description": "Custom select dropdown with keyboard navigation, disabled options, and error states.",
243
+ "category": "forms",
244
+ "client": true
245
+ },
246
+ {
247
+ "name": "DropdownMenu",
248
+ "label": "Dropdown menu",
249
+ "slug": "dropdown-menu",
250
+ "description": "Contextual menu with sections, sub-menus, keyboard shortcuts, and inset-gap hover styling.",
251
+ "category": "overlays",
252
+ "client": true
253
+ },
254
+ {
255
+ "name": "EmptyState",
256
+ "label": "Empty state",
257
+ "slug": "empty-state",
258
+ "description": "The placeholder for a list, table, or search with nothing to show \u2014 icon, headline, guidance, and a next action.",
259
+ "category": "feedback",
260
+ "client": false
261
+ },
262
+ {
263
+ "name": "EntityCard",
264
+ "label": "Entity card",
265
+ "slug": "entity-card",
266
+ "description": "Compact display-only card with a centred icon or image and a label \u2014 powers the Icons and Logos galleries.",
267
+ "category": "data-display",
268
+ "client": false
269
+ },
270
+ {
271
+ "name": "Field",
272
+ "label": "Field",
273
+ "slug": "field",
274
+ "description": "The shared scaffolding for labelled form controls \u2014 label, required marker, helper and error text, and the ARIA wiring that ties them together.",
275
+ "category": "forms",
276
+ "client": true
277
+ },
278
+ {
279
+ "name": "Figure",
280
+ "label": "Figure",
281
+ "slug": "figure",
282
+ "description": "Images with captions, in the case-study frame.",
283
+ "category": "data-display",
284
+ "client": false
285
+ },
286
+ {
287
+ "name": "FileInput",
288
+ "label": "File input",
289
+ "slug": "file-input",
290
+ "description": "A click-or-drop upload zone paired with a controlled file list showing size, progress, and per-file errors.",
291
+ "category": "forms",
292
+ "client": true
293
+ },
294
+ {
295
+ "name": "Input",
296
+ "label": "Input",
297
+ "slug": "input",
298
+ "description": "Text input with label, placeholder, left and right icons, helper text, and error states.",
299
+ "category": "forms",
300
+ "client": true
301
+ },
302
+ {
303
+ "name": "Instructions",
304
+ "label": "Instructions",
305
+ "slug": "instructions",
306
+ "description": "Step-by-step guidance with numbered badges, connecting lines, and horizontal layout.",
307
+ "category": "data-display",
308
+ "client": false
309
+ },
310
+ {
311
+ "name": "Kbd",
312
+ "label": "Kbd",
313
+ "slug": "kbd",
314
+ "description": "A keyboard key rendered as a keycap, for shortcut hints in menus and prose.",
315
+ "category": "data-display",
316
+ "client": false
317
+ },
318
+ {
319
+ "name": "LinkList",
320
+ "label": "Link list",
321
+ "slug": "link-list",
322
+ "description": "Linked items with logo, label, and subtitle.",
323
+ "category": "data-display",
324
+ "client": false
325
+ },
326
+ {
327
+ "name": "Nav",
328
+ "label": "Navigation",
329
+ "slug": "navigation",
330
+ "description": "Desktop and mobile navigation components including top-level nav bar, collapsed mobile bar, and hamburger slide-out menu.",
331
+ "category": "navigation",
332
+ "client": false
333
+ },
334
+ {
335
+ "name": "Pagination",
336
+ "label": "Pagination",
337
+ "slug": "pagination",
338
+ "description": "Numbered page navigation for long datasets, with ellipses, disabled end arrows, and a compact readout mode.",
339
+ "category": "navigation",
340
+ "client": true
341
+ },
342
+ {
343
+ "name": "Popover",
344
+ "label": "Popover",
345
+ "slug": "popover",
346
+ "description": "Contextual overlay panel with click and hover triggers, positioned relative to its anchor.",
347
+ "category": "overlays",
348
+ "client": true
349
+ },
350
+ {
351
+ "name": "ProgressBar",
352
+ "label": "Progress bar",
353
+ "slug": "progress-bar",
354
+ "description": "Horizontal bar indicating completion progress, with an optional percentage label.",
355
+ "category": "feedback",
356
+ "client": false
357
+ },
358
+ {
359
+ "name": "Quote",
360
+ "label": "Quote",
361
+ "slug": "quote",
362
+ "description": "Blockquotes and pull-quotes with attribution.",
363
+ "category": "data-display",
364
+ "client": false
365
+ },
366
+ {
367
+ "name": "RadioButton",
368
+ "label": "Radio button",
369
+ "slug": "radio-button",
370
+ "description": "Radio button and radio group with vertical and horizontal layouts, animated dot indicator.",
371
+ "category": "forms",
372
+ "client": true
373
+ },
374
+ {
375
+ "name": "SectionTitle",
376
+ "label": "Section title",
377
+ "slug": "section-title",
378
+ "description": "Heading with a divider line and optional trailing content for organising page sections.",
379
+ "category": "layout",
380
+ "client": false
381
+ },
382
+ {
383
+ "name": "SegmentedControl",
384
+ "label": "Segmented control",
385
+ "slug": "segmented-control",
386
+ "description": "Pill-style toggle between related views with keyboard navigation and icon support.",
387
+ "category": "actions",
388
+ "client": true
389
+ },
390
+ {
391
+ "name": "SelectionCard",
392
+ "label": "Selection card",
393
+ "slug": "selection-card",
394
+ "description": "Large selectable option cards with radio or checkbox indicators for high-visibility choices like settings and onboarding.",
395
+ "category": "data-display",
396
+ "client": true
397
+ },
398
+ {
399
+ "name": "Skeleton",
400
+ "label": "Skeleton",
401
+ "slug": "skeleton",
402
+ "description": "Placeholder loading indicators with text, circular, and rectangular variants.",
403
+ "category": "feedback",
404
+ "client": false
405
+ },
406
+ {
407
+ "name": "Slider",
408
+ "label": "Slider",
409
+ "slug": "slider",
410
+ "description": "Range input for selecting a value within a given range with default and compact sizes.",
411
+ "category": "forms",
412
+ "client": true
413
+ },
414
+ {
415
+ "name": "Spinner",
416
+ "label": "Spinner",
417
+ "slug": "spinner",
418
+ "description": "Animated circular loading indicator in three sizes and primary, neutral, or inherit variants.",
419
+ "category": "feedback",
420
+ "client": false
421
+ },
422
+ {
423
+ "name": "Stat",
424
+ "label": "Stat",
425
+ "slug": "stat",
426
+ "description": "Headline metrics with labels and trend deltas.",
427
+ "category": "data-display",
428
+ "client": false
429
+ },
430
+ {
431
+ "name": "Swatch",
432
+ "label": "Swatch",
433
+ "slug": "swatch",
434
+ "description": "Clickable colour tile for preset palettes and picker triggers, with a theme-aware selection ring.",
435
+ "category": "forms",
436
+ "client": false
437
+ },
438
+ {
439
+ "name": "Table",
440
+ "label": "Table",
441
+ "slug": "table",
442
+ "description": "Data table with flexible cell content, striped rows, compact sizing, and support for icons, inputs, buttons, and interactive controls.",
443
+ "category": "data-display",
444
+ "client": false
445
+ },
446
+ {
447
+ "name": "Tabs",
448
+ "label": "Tabs",
449
+ "slug": "tabs",
450
+ "description": "Tab navigation with underline indicator, icon support, compact size, and full-width mode.",
451
+ "category": "navigation",
452
+ "client": true
453
+ },
454
+ {
455
+ "name": "Textarea",
456
+ "label": "Textarea",
457
+ "slug": "textarea",
458
+ "description": "Multi-line text input with character counter, resize control, helper text, and error states.",
459
+ "category": "forms",
460
+ "client": true
461
+ },
462
+ {
463
+ "name": "Timeline",
464
+ "label": "Timeline",
465
+ "slug": "timeline",
466
+ "description": "Ordered sequences \u2014 histories and steppers.",
467
+ "category": "data-display",
468
+ "client": false
469
+ },
470
+ {
471
+ "name": "Toast",
472
+ "label": "Toast",
473
+ "slug": "toast",
474
+ "description": "Temporary notification with status variants, auto-dismiss, and stacking via ToastProvider.",
475
+ "category": "feedback",
476
+ "client": true
477
+ },
478
+ {
479
+ "name": "ToggleGroup",
480
+ "label": "Toggle group",
481
+ "slug": "toggle-group",
482
+ "description": "A set of two-state buttons that can be toggled on or off, supporting text and icon items.",
483
+ "category": "actions",
484
+ "client": true
485
+ },
486
+ {
487
+ "name": "ToggleSwitch",
488
+ "label": "Toggle switch",
489
+ "slug": "toggle-switch",
490
+ "description": "Binary on/off toggle control with sliding thumb and check indicator, used for settings like theme switching.",
491
+ "category": "forms",
492
+ "client": true
493
+ },
494
+ {
495
+ "name": "Tooltip",
496
+ "label": "Tooltip",
497
+ "slug": "tooltip",
498
+ "description": "Contextual text label that appears on hover or focus with position and delay options.",
499
+ "category": "overlays",
500
+ "client": true
501
+ }
60
502
  ],
61
503
  "docOnlyHelpers": [
62
504
  "ColourSwatch",