@adobe/design-data-spec 0.3.0 → 0.5.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 (92) hide show
  1. package/components/accordion.json +517 -0
  2. package/components/action-bar.json +203 -0
  3. package/components/action-button.json +481 -0
  4. package/components/action-group.json +82 -0
  5. package/components/alert-banner.json +111 -0
  6. package/components/alert-dialog.json +152 -0
  7. package/components/avatar-group.json +140 -0
  8. package/components/avatar.json +184 -0
  9. package/components/badge.json +502 -0
  10. package/components/body.json +29 -0
  11. package/components/bottom-navigation-android.json +41 -0
  12. package/components/breadcrumbs.json +263 -0
  13. package/components/button-group.json +47 -0
  14. package/components/button.json +466 -8
  15. package/components/calendar.json +104 -0
  16. package/components/cards.json +512 -0
  17. package/components/checkbox-group.json +54 -0
  18. package/components/checkbox.json +303 -0
  19. package/components/close-button.json +170 -0
  20. package/components/coach-indicator.json +76 -0
  21. package/components/coach-mark.json +157 -0
  22. package/components/code.json +25 -0
  23. package/components/color-area.json +115 -0
  24. package/components/color-handle.json +85 -0
  25. package/components/color-loupe.json +74 -0
  26. package/components/color-slider.json +121 -0
  27. package/components/color-wheel.json +94 -0
  28. package/components/combo-box.json +480 -0
  29. package/components/contextual-help.json +162 -0
  30. package/components/date-picker.json +439 -0
  31. package/components/detail.json +30 -0
  32. package/components/divider.json +73 -0
  33. package/components/drop-zone.json +211 -0
  34. package/components/field-label.json +189 -0
  35. package/components/heading.json +33 -0
  36. package/components/help-text.json +186 -0
  37. package/components/illustrated-message.json +155 -0
  38. package/components/in-field-progress-button.json +44 -0
  39. package/components/in-field-progress-circle.json +80 -0
  40. package/components/in-line-alert.json +201 -0
  41. package/components/link.json +135 -0
  42. package/components/list-view.json +355 -0
  43. package/components/menu.json +542 -0
  44. package/components/meter.json +162 -0
  45. package/components/number-field.json +468 -0
  46. package/components/opacity-checkerboard.json +43 -0
  47. package/components/picker.json +522 -0
  48. package/components/popover.json +119 -0
  49. package/components/progress-bar.json +182 -0
  50. package/components/progress-circle.json +99 -0
  51. package/components/radio-button.json +285 -0
  52. package/components/radio-group.json +63 -0
  53. package/components/rating.json +145 -0
  54. package/components/scroll-zoom-bar.json +53 -0
  55. package/components/search-field.json +306 -0
  56. package/components/segmented-control.json +210 -0
  57. package/components/select-box.json +248 -0
  58. package/components/side-navigation.json +293 -0
  59. package/components/slider.json +370 -0
  60. package/components/standard-dialog.json +151 -0
  61. package/components/standard-panel.json +53 -0
  62. package/components/status-light.json +272 -0
  63. package/components/steplist.json +270 -0
  64. package/components/swatch-group.json +62 -0
  65. package/components/swatch.json +193 -0
  66. package/components/switch.json +305 -0
  67. package/components/tab-bar-ios.json +41 -0
  68. package/components/table.json +392 -0
  69. package/components/tabs.json +229 -0
  70. package/components/tag-field.json +203 -0
  71. package/components/tag-group.json +53 -0
  72. package/components/tag.json +376 -0
  73. package/components/takeover-dialog.json +92 -0
  74. package/components/text-area.json +485 -0
  75. package/components/text-field.json +501 -0
  76. package/components/thumbnail.json +109 -0
  77. package/components/title.json +39 -0
  78. package/components/toast.json +131 -0
  79. package/components/tooltip.json +140 -0
  80. package/components/tray.json +21 -0
  81. package/components/tree-view.json +341 -0
  82. package/conformance/invalid/SPEC-027/dataset.json +25 -0
  83. package/conformance/invalid/SPEC-027/expected-errors.json +10 -0
  84. package/conformance/valid/token-bindings.json +27 -0
  85. package/package.json +2 -1
  86. package/rules/rules.yaml +9 -0
  87. package/schemas/component.schema.json +24 -2
  88. package/schemas/token.schema.json +27 -0
  89. package/spec/agent-surface.md +39 -9
  90. package/spec/component-format.md +41 -16
  91. package/spec/token-format.md +18 -0
  92. package/src/validate.js +27 -3
@@ -26,9 +26,18 @@
26
26
  "enum": ["s", "m", "l", "xl"],
27
27
  "default": "m"
28
28
  },
29
- "isDisabled": { "type": "boolean", "default": false },
30
- "isPending": { "type": "boolean", "default": false },
31
- "isLabelHidden": { "type": "boolean", "default": false },
29
+ "isDisabled": {
30
+ "type": "boolean",
31
+ "default": false
32
+ },
33
+ "isPending": {
34
+ "type": "boolean",
35
+ "default": false
36
+ },
37
+ "isLabelHidden": {
38
+ "type": "boolean",
39
+ "default": false
40
+ },
32
41
  "icon": {
33
42
  "$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
34
43
  "description": "Icon placed at the start of the button. Required when isLabelHidden is true."
@@ -51,20 +60,469 @@
51
60
  }
52
61
  ],
53
62
  "anatomy": [
54
- { "name": "icon", "description": "Leading icon." },
55
- { "name": "label", "description": "Button text.", "required": true }
63
+ {
64
+ "name": "icon",
65
+ "description": "Leading icon."
66
+ },
67
+ {
68
+ "name": "label",
69
+ "description": "Button text.",
70
+ "required": true
71
+ }
56
72
  ],
57
73
  "states": [
58
- { "name": "hover", "trigger": "interaction", "precedence": 50 },
74
+ {
75
+ "name": "hover",
76
+ "trigger": "interaction",
77
+ "precedence": 50
78
+ },
59
79
  {
60
80
  "name": "focus",
61
81
  "trigger": "interaction",
62
82
  "precedence": 60,
63
83
  "layered": true
64
84
  },
65
- { "name": "disabled", "trigger": "prop", "precedence": 100 }
85
+ {
86
+ "name": "disabled",
87
+ "trigger": "prop",
88
+ "precedence": 100
89
+ }
66
90
  ],
67
91
  "lifecycle": {
68
92
  "introduced": "1.0.0-draft"
69
- }
93
+ },
94
+ "tokenBindings": [
95
+ {
96
+ "token": "component-height-75",
97
+ "context": "Minimum height"
98
+ },
99
+ {
100
+ "token": "component-height-100",
101
+ "context": "Minimum height"
102
+ },
103
+ {
104
+ "token": "component-height-200",
105
+ "context": "Minimum height"
106
+ },
107
+ {
108
+ "token": "component-height-300",
109
+ "context": "Minimum height"
110
+ },
111
+ {
112
+ "token": "corner-radius-full",
113
+ "context": "Rounding"
114
+ },
115
+ {
116
+ "token": "corner-radius-button-small",
117
+ "context": "Rounding (with wrapping)"
118
+ },
119
+ {
120
+ "token": "corner-radius-extra-large-default",
121
+ "context": "Rounding (with wrapping)"
122
+ },
123
+ {
124
+ "token": "corner-radius-button-large",
125
+ "context": "Rounding (with wrapping)"
126
+ },
127
+ {
128
+ "token": "corner-radius-button-extra-large",
129
+ "context": "Rounding (with wrapping)"
130
+ },
131
+ {
132
+ "token": "button-minimum-width-multiplier",
133
+ "context": "Minimum width (with label)"
134
+ },
135
+ {
136
+ "token": "component-size-difference-down",
137
+ "context": "Component size (down)"
138
+ },
139
+ {
140
+ "token": "component-size-width-ratio-down",
141
+ "context": "Component size (down)"
142
+ },
143
+ {
144
+ "token": "component-size-minimum-perspective-down",
145
+ "context": "Component size (down)"
146
+ },
147
+ {
148
+ "token": "workflow-icon-size-75",
149
+ "context": "Icon"
150
+ },
151
+ {
152
+ "token": "workflow-icon-size-100",
153
+ "context": "Icon"
154
+ },
155
+ {
156
+ "token": "workflow-icon-size-200",
157
+ "context": "Icon"
158
+ },
159
+ {
160
+ "token": "workflow-icon-size-300",
161
+ "context": "Icon"
162
+ },
163
+ {
164
+ "token": "component-pill-edge-to-visual-75",
165
+ "context": "Spacing (start/end edges)"
166
+ },
167
+ {
168
+ "token": "component-pill-edge-to-visual-100",
169
+ "context": "Spacing (start/end edges)"
170
+ },
171
+ {
172
+ "token": "component-pill-edge-to-visual-200",
173
+ "context": "Spacing (start/end edges)"
174
+ },
175
+ {
176
+ "token": "component-pill-edge-to-visual-300",
177
+ "context": "Spacing (start/end edges)"
178
+ },
179
+ {
180
+ "token": "component-pill-edge-to-text-75",
181
+ "context": "Spacing (start/end edges)"
182
+ },
183
+ {
184
+ "token": "component-pill-edge-to-text-100",
185
+ "context": "Spacing (start/end edges)"
186
+ },
187
+ {
188
+ "token": "component-pill-edge-to-text-200",
189
+ "context": "Spacing (start/end edges)"
190
+ },
191
+ {
192
+ "token": "component-pill-edge-to-text-300",
193
+ "context": "Spacing (start/end edges)"
194
+ },
195
+ {
196
+ "token": "component-pill-edge-to-visual-only-75",
197
+ "context": "Spacing (start/end edges, icon only)"
198
+ },
199
+ {
200
+ "token": "component-pill-edge-to-visual-only-100",
201
+ "context": "Spacing (start/end edges, icon only)"
202
+ },
203
+ {
204
+ "token": "component-pill-edge-to-visual-only-200",
205
+ "context": "Spacing (start/end edges, icon only)"
206
+ },
207
+ {
208
+ "token": "component-pill-edge-to-visual-only-300",
209
+ "context": "Spacing (start/end edges, icon only)"
210
+ },
211
+ {
212
+ "token": "text-to-visual-75",
213
+ "context": "Spacing (icon to label)"
214
+ },
215
+ {
216
+ "token": "text-to-visual-100",
217
+ "context": "Spacing (icon to label)"
218
+ },
219
+ {
220
+ "token": "text-to-visual-200",
221
+ "context": "Spacing (icon to label)"
222
+ },
223
+ {
224
+ "token": "text-to-visual-300",
225
+ "context": "Spacing (icon to label)"
226
+ },
227
+ {
228
+ "token": "component-top-to-workflow-icon-75",
229
+ "context": "Spacing (top edge to icon)"
230
+ },
231
+ {
232
+ "token": "component-top-to-workflow-icon-100",
233
+ "context": "Spacing (top edge to icon)"
234
+ },
235
+ {
236
+ "token": "component-top-to-workflow-icon-200",
237
+ "context": "Spacing (top edge to icon)"
238
+ },
239
+ {
240
+ "token": "component-top-to-workflow-icon-300",
241
+ "context": "Spacing (top edge to icon)"
242
+ },
243
+ {
244
+ "token": "component-top-to-text-75",
245
+ "context": "Spacing (top/bottom edge to label)"
246
+ },
247
+ {
248
+ "token": "component-top-to-text-100",
249
+ "context": "Spacing (top/bottom edge to label)"
250
+ },
251
+ {
252
+ "token": "component-top-to-text-200",
253
+ "context": "Spacing (top/bottom edge to label)"
254
+ },
255
+ {
256
+ "token": "component-top-to-text-300",
257
+ "context": "Spacing (top/bottom edge to label)"
258
+ },
259
+ {
260
+ "token": "component-bottom-to-text-75",
261
+ "context": "Spacing (top/bottom edge to label)"
262
+ },
263
+ {
264
+ "token": "component-bottom-to-text-100",
265
+ "context": "Spacing (top/bottom edge to label)"
266
+ },
267
+ {
268
+ "token": "component-bottom-to-text-200",
269
+ "context": "Spacing (top/bottom edge to label)"
270
+ },
271
+ {
272
+ "token": "component-bottom-to-text-300",
273
+ "context": "Spacing (top/bottom edge to label)"
274
+ },
275
+ {
276
+ "token": "border-width-200",
277
+ "context": "Border"
278
+ },
279
+ {
280
+ "token": "focus-indicator-thickness",
281
+ "context": "Focus indicator"
282
+ },
283
+ {
284
+ "token": "focus-indicator-gap",
285
+ "context": "Focus indicator"
286
+ },
287
+ {
288
+ "token": "default-font-family",
289
+ "context": "Label"
290
+ },
291
+ {
292
+ "token": "bold-font-weight",
293
+ "context": "Label"
294
+ },
295
+ {
296
+ "token": "default-font-style",
297
+ "context": "Label"
298
+ },
299
+ {
300
+ "token": "font-size-75",
301
+ "context": "Label"
302
+ },
303
+ {
304
+ "token": "font-size-100",
305
+ "context": "Label"
306
+ },
307
+ {
308
+ "token": "font-size-200",
309
+ "context": "Label"
310
+ },
311
+ {
312
+ "token": "font-size-300",
313
+ "context": "Label"
314
+ },
315
+ {
316
+ "token": "line-height-100",
317
+ "context": "Label"
318
+ },
319
+ {
320
+ "token": "cjk-line-height-100",
321
+ "context": "Label"
322
+ },
323
+ {
324
+ "token": "accent-background-color-default",
325
+ "context": "Background"
326
+ },
327
+ {
328
+ "token": "accent-background-color-hover",
329
+ "context": "Background"
330
+ },
331
+ {
332
+ "token": "accent-background-color-down",
333
+ "context": "Background"
334
+ },
335
+ {
336
+ "token": "accent-background-color-key-focus",
337
+ "context": "Background"
338
+ },
339
+ {
340
+ "token": "white",
341
+ "context": "Icon"
342
+ },
343
+ {
344
+ "token": "negative-background-color-default",
345
+ "context": "Background"
346
+ },
347
+ {
348
+ "token": "negative-background-color-hover",
349
+ "context": "Background"
350
+ },
351
+ {
352
+ "token": "negative-background-color-down",
353
+ "context": "Background"
354
+ },
355
+ {
356
+ "token": "negative-background-color-key-focus",
357
+ "context": "Background"
358
+ },
359
+ {
360
+ "token": "neutral-background-color-default",
361
+ "context": "Background"
362
+ },
363
+ {
364
+ "token": "neutral-background-color-hover",
365
+ "context": "Background"
366
+ },
367
+ {
368
+ "token": "neutral-background-color-down",
369
+ "context": "Background"
370
+ },
371
+ {
372
+ "token": "neutral-background-color-key-focus",
373
+ "context": "Background"
374
+ },
375
+ {
376
+ "token": "gray-25",
377
+ "context": "Icon"
378
+ },
379
+ {
380
+ "token": "gray-100",
381
+ "context": "Background"
382
+ },
383
+ {
384
+ "token": "gray-800",
385
+ "context": "Border"
386
+ },
387
+ {
388
+ "token": "gray-900",
389
+ "context": "Border"
390
+ },
391
+ {
392
+ "token": "neutral-content-color-default",
393
+ "context": "Icon"
394
+ },
395
+ {
396
+ "token": "neutral-content-color-hover",
397
+ "context": "Icon"
398
+ },
399
+ {
400
+ "token": "neutral-content-color-down",
401
+ "context": "Icon"
402
+ },
403
+ {
404
+ "token": "neutral-content-color-key-focus",
405
+ "context": "Icon"
406
+ },
407
+ {
408
+ "token": "gray-200",
409
+ "context": "Background"
410
+ },
411
+ {
412
+ "token": "gray-300",
413
+ "context": "Border"
414
+ },
415
+ {
416
+ "token": "gray-400",
417
+ "context": "Border"
418
+ },
419
+ {
420
+ "token": "disabled-background-color",
421
+ "context": "Fill"
422
+ },
423
+ {
424
+ "token": "disabled-border-color",
425
+ "context": "Outline"
426
+ },
427
+ {
428
+ "token": "disabled-content-color",
429
+ "context": "Icon"
430
+ },
431
+ {
432
+ "token": "focus-indicator-color",
433
+ "context": "Focus indicator"
434
+ },
435
+ {
436
+ "token": "transparent-white-900",
437
+ "context": "Background"
438
+ },
439
+ {
440
+ "token": "transparent-white-1000",
441
+ "context": "Background"
442
+ },
443
+ {
444
+ "token": "black",
445
+ "context": "Icon"
446
+ },
447
+ {
448
+ "token": "transparent-white-25",
449
+ "context": "Background"
450
+ },
451
+ {
452
+ "token": "transparent-white-100",
453
+ "context": "Background"
454
+ },
455
+ {
456
+ "token": "transparent-white-200",
457
+ "context": "Background"
458
+ },
459
+ {
460
+ "token": "transparent-white-300",
461
+ "context": "Border"
462
+ },
463
+ {
464
+ "token": "transparent-white-400",
465
+ "context": "Border"
466
+ },
467
+ {
468
+ "token": "disabled-static-white-background-color",
469
+ "context": "Background"
470
+ },
471
+ {
472
+ "token": "disabled-static-white-content-color",
473
+ "context": "Icon and label"
474
+ },
475
+ {
476
+ "token": "disabled-static-white-border-color",
477
+ "context": "Border"
478
+ },
479
+ {
480
+ "token": "static-white-focus-indicator-color",
481
+ "context": "Static white – Focus indicator"
482
+ },
483
+ {
484
+ "token": "transparent-black-900",
485
+ "context": "Background"
486
+ },
487
+ {
488
+ "token": "transparent-black-1000",
489
+ "context": "Background"
490
+ },
491
+ {
492
+ "token": "transparent-black-25",
493
+ "context": "Background"
494
+ },
495
+ {
496
+ "token": "transparent-black-100",
497
+ "context": "Background"
498
+ },
499
+ {
500
+ "token": "transparent-black-200",
501
+ "context": "Background"
502
+ },
503
+ {
504
+ "token": "transparent-black-300",
505
+ "context": "Border"
506
+ },
507
+ {
508
+ "token": "transparent-black-400",
509
+ "context": "Border"
510
+ },
511
+ {
512
+ "token": "disabled-static-black-background-color",
513
+ "context": "Background"
514
+ },
515
+ {
516
+ "token": "disabled-static-black-content-color",
517
+ "context": "Icon and label"
518
+ },
519
+ {
520
+ "token": "disabled-static-black-border-color",
521
+ "context": "Border"
522
+ },
523
+ {
524
+ "token": "static-black-focus-indicator-color",
525
+ "context": "Static black – Focus indicator"
526
+ }
527
+ ]
70
528
  }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/calendar.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "calendar",
6
+ "displayName": "Calendar",
7
+ "description": "Calendars display days, weeks, and months, allowing users to select dates or ranges.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/calendar/"
11
+ },
12
+ "options": {
13
+ "currentMonth": {
14
+ "type": "number",
15
+ "minimum": 1,
16
+ "maximum": 12,
17
+ "description": "The month currently displayed in the calendar (1 = January, 12 = December)."
18
+ },
19
+ "currentYear": {
20
+ "type": "number",
21
+ "description": "The year currently displayed in the calendar (Gregorian year number)."
22
+ },
23
+ "selectionMode": {
24
+ "type": "string",
25
+ "enum": ["single", "range"],
26
+ "default": "single",
27
+ "description": "Controls whether the calendar allows selecting a single date or a date range."
28
+ },
29
+ "isDisabled": {
30
+ "type": "boolean",
31
+ "default": false
32
+ },
33
+ "isError": {
34
+ "type": "boolean",
35
+ "default": false
36
+ },
37
+ "minValue": {
38
+ "type": "string",
39
+ "description": "The minimum allowed date that a user may select (ISO format string)."
40
+ },
41
+ "maxValue": {
42
+ "type": "string",
43
+ "description": "The maximum allowed date that a user may select (ISO format string)."
44
+ },
45
+ "showTimeZone": {
46
+ "type": "boolean",
47
+ "default": false,
48
+ "description": "Whether to show a time zone indicator in the calendar."
49
+ },
50
+ "days": {
51
+ "type": "array",
52
+ "description": "An array of days displayed in the current calendar view.",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "date": {
57
+ "type": "string",
58
+ "description": "The date represented by this day (ISO format string)."
59
+ },
60
+ "isDisabled": {
61
+ "type": "boolean",
62
+ "default": false,
63
+ "description": "Whether this day is disabled."
64
+ },
65
+ "isSelected": {
66
+ "type": "boolean",
67
+ "default": false,
68
+ "description": "Whether this day is currently selected."
69
+ },
70
+ "isRangeStart": {
71
+ "type": "boolean",
72
+ "default": false,
73
+ "description": "Whether this day is the start of a selected range."
74
+ },
75
+ "isRangeEnd": {
76
+ "type": "boolean",
77
+ "default": false,
78
+ "description": "Whether this day is the end of a selected range."
79
+ },
80
+ "isUnavailable": {
81
+ "type": "boolean",
82
+ "default": false,
83
+ "description": "Whether this day is unavailable for selection. If true, the day appears with a strikethrough."
84
+ },
85
+ "isToday": {
86
+ "type": "boolean",
87
+ "default": false,
88
+ "description": "Whether this day represents the current date."
89
+ },
90
+ "state": {
91
+ "type": "string",
92
+ "enum": ["default", "hover", "keyboard focus"],
93
+ "default": "default",
94
+ "description": "The interaction state of the day cell."
95
+ }
96
+ },
97
+ "required": ["date"]
98
+ }
99
+ }
100
+ },
101
+ "lifecycle": {
102
+ "introduced": "1.0.0-draft"
103
+ }
104
+ }