@adobe/spectrum-design-data 0.3.0 → 0.6.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 (99) hide show
  1. package/LICENSE +1 -1
  2. package/components/accordion.json +108 -194
  3. package/components/action-bar.json +64 -97
  4. package/components/action-button.json +95 -230
  5. package/components/action-group.json +88 -86
  6. package/components/alert-banner.json +104 -76
  7. package/components/alert-dialog.json +78 -126
  8. package/components/avatar-group.json +61 -119
  9. package/components/avatar.json +98 -212
  10. package/components/badge.json +138 -256
  11. package/components/breadcrumbs.json +95 -89
  12. package/components/button-group.json +57 -48
  13. package/components/button.json +151 -368
  14. package/components/calendar.json +97 -34
  15. package/components/cards.json +109 -250
  16. package/components/checkbox-group.json +50 -58
  17. package/components/checkbox.json +121 -186
  18. package/components/close-button.json +61 -124
  19. package/components/coach-indicator.json +63 -72
  20. package/components/coach-mark.json +89 -93
  21. package/components/color-area.json +68 -94
  22. package/components/color-handle.json +39 -79
  23. package/components/color-loupe.json +35 -52
  24. package/components/color-slider.json +95 -116
  25. package/components/color-wheel.json +67 -73
  26. package/components/combo-box.json +243 -331
  27. package/components/contextual-help.json +86 -175
  28. package/components/date-picker.json +139 -179
  29. package/components/divider.json +30 -69
  30. package/components/drop-zone.json +51 -92
  31. package/components/field-label.json +75 -117
  32. package/components/help-text.json +81 -105
  33. package/components/illustrated-message.json +106 -73
  34. package/components/in-line-alert.json +50 -83
  35. package/components/link.json +63 -85
  36. package/components/list-view.json +107 -146
  37. package/components/menu.json +180 -274
  38. package/components/meter.json +72 -118
  39. package/components/number-field.json +213 -305
  40. package/components/picker.json +208 -320
  41. package/components/popover.json +94 -129
  42. package/components/progress-bar.json +94 -131
  43. package/components/progress-circle.json +45 -72
  44. package/components/radio-button.json +87 -156
  45. package/components/radio-group.json +107 -74
  46. package/components/rating.json +66 -99
  47. package/components/search-field.json +132 -202
  48. package/components/segmented-control.json +94 -109
  49. package/components/select-box.json +119 -179
  50. package/components/side-navigation.json +108 -118
  51. package/components/slider.json +143 -228
  52. package/components/standard-dialog.json +96 -114
  53. package/components/standard-panel.json +105 -53
  54. package/components/status-light.json +104 -240
  55. package/components/steplist.json +77 -161
  56. package/components/swatch-group.json +42 -58
  57. package/components/swatch.json +75 -162
  58. package/components/switch.json +101 -189
  59. package/components/table.json +97 -102
  60. package/components/tabs.json +77 -104
  61. package/components/tag-field.json +86 -150
  62. package/components/tag-group.json +50 -44
  63. package/components/tag.json +81 -198
  64. package/components/takeover-dialog.json +59 -57
  65. package/components/text-area.json +200 -323
  66. package/components/text-field.json +183 -304
  67. package/components/thumbnail.json +63 -105
  68. package/components/toast.json +97 -83
  69. package/components/tooltip.json +104 -96
  70. package/components/tree-view.json +169 -181
  71. package/guidelines/app-frame-content-area.json +87 -0
  72. package/guidelines/app-frame-creating-bluelines.json +61 -0
  73. package/guidelines/app-frame-header.json +75 -0
  74. package/guidelines/app-frame-overview.json +167 -0
  75. package/guidelines/app-frame-side-navigation.json +138 -0
  76. package/guidelines/attention-hierarchy.json +42 -0
  77. package/guidelines/background-layers.json +41 -0
  78. package/guidelines/brand.json +50 -0
  79. package/guidelines/colors.json +65 -0
  80. package/guidelines/containers.json +65 -0
  81. package/guidelines/developer-overview.json +38 -0
  82. package/guidelines/faqs.json +35 -0
  83. package/guidelines/fonts.json +58 -0
  84. package/guidelines/grays.json +69 -0
  85. package/guidelines/icon-fundamentals.json +45 -0
  86. package/guidelines/illustrations.json +114 -0
  87. package/guidelines/introduction.json +34 -0
  88. package/guidelines/manifest.json +204 -0
  89. package/guidelines/motion.json +41 -0
  90. package/guidelines/object-styles.json +105 -0
  91. package/guidelines/principles.json +30 -0
  92. package/guidelines/resources.json +59 -0
  93. package/guidelines/spacing.json +25 -0
  94. package/guidelines/states.json +34 -0
  95. package/guidelines/typography-fundamentals.json +145 -0
  96. package/guidelines/using-icons.json +110 -0
  97. package/package.json +5 -2
  98. package/tokens/layout-component.tokens.json +72 -36
  99. package/tokens/layout.tokens.json +207 -92
@@ -9,56 +9,58 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/swatch-group/"
11
11
  },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "A swatch group is a grouping of swatches that are related to each other."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Swatch groups organize related swatches into a single container. They’re used to display collections of colors, gradients, textures, or materials for comparison or selection."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Swatch groups come in 3 densities: regular (default), compact, and spacious. Compact and spacious densities retain the same swatch size as regular density but have less or more padding between each swatch, respectively."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "By default, selection is not enabled in a swatch group. Selection can be enabled for a swatch group to allow for toggling. This is often used inside of swatch panels."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "When selection is enabled, a swatch group can allow for either single or multiple selection of swatches. This is often used inside of swatch panels to allow for bulk operations, such as deleting multiple swatches at once."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "It’s important for users to compare colors when they’re displayed in a swatch group. Because of this, swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself. This reduces the likelihood of the UI interfering with color perception and comparisons."
36
+ }
37
+ ],
12
38
  "options": {
13
39
  "size": {
14
40
  "type": "string",
15
41
  "default": "m",
16
42
  "values": [
17
- {
18
- "value": "xs"
19
- },
20
- {
21
- "value": "s"
22
- },
23
- {
24
- "value": "m"
25
- },
26
- {
27
- "value": "l"
28
- }
43
+ { "value": "xs" },
44
+ { "value": "s" },
45
+ { "value": "m" },
46
+ { "value": "l" }
29
47
  ]
30
48
  },
31
49
  "density": {
32
50
  "type": "string",
33
51
  "default": "regular",
34
52
  "values": [
35
- {
36
- "value": "compact"
37
- },
38
- {
39
- "value": "regular"
40
- },
41
- {
42
- "value": "spacious"
43
- }
53
+ { "value": "compact" },
54
+ { "value": "regular" },
55
+ { "value": "spacious" }
44
56
  ]
45
57
  },
46
- "enableSelection": {
47
- "type": "boolean",
48
- "default": false
49
- },
58
+ "enableSelection": { "type": "boolean", "default": false },
50
59
  "selectionMode": {
51
60
  "type": "string",
52
61
  "description": "Only applicable if selection is enabled.",
53
62
  "default": "single",
54
- "values": [
55
- {
56
- "value": "single"
57
- },
58
- {
59
- "value": "multiple"
60
- }
61
- ]
63
+ "values": [{ "value": "single" }, { "value": "multiple" }]
62
64
  },
63
65
  "allowsEmptySelection": {
64
66
  "type": "boolean",
@@ -70,45 +72,27 @@
70
72
  "default": "none",
71
73
  "description": "Determines the corner radius of each swatch in the group. Partial refers to corner-radius-75.",
72
74
  "values": [
73
- {
74
- "value": "none"
75
- },
76
- {
77
- "value": "full"
78
- },
79
- {
80
- "value": "partial"
81
- }
75
+ { "value": "none" },
76
+ { "value": "full" },
77
+ { "value": "partial" }
82
78
  ]
83
79
  }
84
80
  },
85
- "lifecycle": {
86
- "introduced": "1.0.0-draft"
87
- },
81
+ "lifecycle": { "introduced": "1.0.0-draft" },
88
82
  "tokenBindings": [
89
83
  {
90
84
  "token": "swatch-group-spacing-spacious",
91
85
  "context": "Spacing (spacious)"
92
86
  },
93
- {
94
- "token": "swatch-group-border-color",
95
- "context": "Border"
96
- },
97
- {
98
- "token": "swatch-group-border-opacity",
99
- "context": "Border"
100
- }
87
+ { "token": "swatch-group-border-color", "context": "Border" },
88
+ { "token": "swatch-group-border-opacity", "context": "Border" }
101
89
  ],
102
90
  "accessibility": {
103
91
  "role": "group",
104
92
  "intents": ["choose"],
105
93
  "focusable": false,
106
94
  "wcag": [
107
- {
108
- "criterion": "4.1.2",
109
- "level": "A",
110
- "title": "Name, Role, Value"
111
- }
95
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
112
96
  ]
113
97
  }
114
98
  }
@@ -9,6 +9,40 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/swatch/"
11
11
  },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "A swatch shows a small sample of a fill — such as a color, gradient, texture, or material — that is intended to be applied to an object."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "The preview shows the sample of the fill that the swatch represents. This property can be a color, gradient, texture, or material. The exact format this property takes will depend on implementation. Some examples of the format include color values, image, canvas, and gradient."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Swatches come in four different sizes: extra-small, small, medium, and large. The medium size is the default and most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "By default, swatches have partial rounding. There are 3 options for a swatch’s rounding: none, partial rounding, and full rounding."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "A swatch can have a selected state to allow for selection. This is often used in a swatch group."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "A swatch in a disabled state shows that the swatch exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that a swatch may become available later. Disabled swatches should be used with caution."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "A swatch can be navigated using a keyboard. The keyboard focus state adds a blue ring to the swatch in focus."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Even though swatches can have a disabled state, hiding unavailable swatches reduces visual clutter and eases cognitive load. Only show disabled swatches if hiding them would cause confusion to your users."
44
+ }
45
+ ],
12
46
  "options": {
13
47
  "preview": {
14
48
  "type": "string",
@@ -18,123 +52,55 @@
18
52
  "type": "string",
19
53
  "default": "m",
20
54
  "values": [
21
- {
22
- "value": "xs"
23
- },
24
- {
25
- "value": "s"
26
- },
27
- {
28
- "value": "m"
29
- },
30
- {
31
- "value": "l"
32
- }
55
+ { "value": "xs" },
56
+ { "value": "s" },
57
+ { "value": "m" },
58
+ { "value": "l" }
33
59
  ]
34
60
  },
35
61
  "shape": {
36
62
  "type": "string",
37
63
  "default": "square",
38
- "values": [
39
- {
40
- "value": "square"
41
- },
42
- {
43
- "value": "rectangle"
44
- }
45
- ]
64
+ "values": [{ "value": "square" }, { "value": "rectangle" }]
46
65
  },
47
66
  "cornerRounding": {
48
67
  "type": "string",
49
68
  "default": "none",
50
69
  "description": "Determines the corner radius of the swatch. Partial refers to corner-radius-75.",
51
70
  "values": [
52
- {
53
- "value": "none"
54
- },
55
- {
56
- "value": "partial"
57
- },
58
- {
59
- "value": "full"
60
- }
71
+ { "value": "none" },
72
+ { "value": "partial" },
73
+ { "value": "full" }
61
74
  ]
62
75
  },
63
- "isSelected": {
64
- "type": "boolean",
65
- "default": false
66
- },
67
- "isDisabled": {
68
- "type": "boolean",
69
- "default": false
70
- }
76
+ "isSelected": { "type": "boolean", "default": false },
77
+ "isDisabled": { "type": "boolean", "default": false }
71
78
  },
72
79
  "states": [
73
- {
74
- "name": "hover",
75
- "trigger": "interaction"
76
- },
77
- {
78
- "name": "down",
79
- "trigger": "interaction"
80
- },
81
- {
82
- "name": "keyboard-focus",
83
- "trigger": "interaction"
84
- }
80
+ { "name": "hover", "trigger": "interaction" },
81
+ { "name": "down", "trigger": "interaction" },
82
+ { "name": "keyboard-focus", "trigger": "interaction" }
85
83
  ],
86
- "lifecycle": {
87
- "introduced": "1.0.0-draft"
88
- },
84
+ "lifecycle": { "introduced": "1.0.0-draft" },
89
85
  "tokenBindings": [
90
- {
91
- "token": "swatch-size-extra-small",
92
- "context": "Size (square)"
93
- },
94
- {
95
- "token": "swatch-size-small",
96
- "context": "Size (square)"
97
- },
98
- {
99
- "token": "swatch-size-medium",
100
- "context": "Size (square)"
101
- },
102
- {
103
- "token": "swatch-size-large",
104
- "context": "Size (square)"
105
- },
86
+ { "token": "swatch-size-extra-small", "context": "Size (square)" },
87
+ { "token": "swatch-size-small", "context": "Size (square)" },
88
+ { "token": "swatch-size-medium", "context": "Size (square)" },
89
+ { "token": "swatch-size-large", "context": "Size (square)" },
106
90
  {
107
91
  "token": "swatch-rectangle-width-multiplier",
108
92
  "context": "Width (rectangle)"
109
93
  },
110
- {
111
- "token": "corner-radius-75",
112
- "context": "Rounding"
113
- },
114
- {
115
- "token": "border-width-100",
116
- "context": "Border"
117
- },
94
+ { "token": "corner-radius-75", "context": "Rounding" },
95
+ { "token": "border-width-100", "context": "Border" },
118
96
  {
119
97
  "token": "border-width-200",
120
98
  "context": "Border and inner border (selected)"
121
99
  },
122
- {
123
- "token": "workflow-icon-size-50",
124
- "context": "Disabled icon asset"
125
- },
126
- {
127
- "token": "workflow-icon-size-75",
128
- "context": "Disabled icon asset"
129
- },
130
- {
131
- "token": "workflow-icon-size-100",
132
- "context": "Disabled icon asset"
133
- },
134
- {
135
- "token": "workflow-icon-size-200",
136
- "context": "Disabled icon asset"
137
- },
100
+ { "token": "workflow-icon-size-50", "context": "Disabled icon asset" },
101
+ { "token": "workflow-icon-size-75", "context": "Disabled icon asset" },
102
+ { "token": "workflow-icon-size-100", "context": "Disabled icon asset" },
103
+ { "token": "workflow-icon-size-200", "context": "Disabled icon asset" },
138
104
  {
139
105
  "token": "swatch-slash-thickness-extra-small",
140
106
  "context": "Slash thickness (empty)"
@@ -151,34 +117,13 @@
151
117
  "token": "swatch-slash-thickness-large",
152
118
  "context": "Slash thickness (empty)"
153
119
  },
154
- {
155
- "token": "focus-indicator-thickness",
156
- "context": "Focus ring"
157
- },
158
- {
159
- "token": "focus-indicator-gap",
160
- "context": "Focus ring"
161
- },
162
- {
163
- "token": "spacing-75",
164
- "context": "Spacing (Tooltip to Swatch)"
165
- },
166
- {
167
- "token": "swatch-border-color",
168
- "context": "Border"
169
- },
170
- {
171
- "token": "swatch-border-opacity",
172
- "context": "Border"
173
- },
174
- {
175
- "token": "gray-1000",
176
- "context": "Border and inner border (selected)"
177
- },
178
- {
179
- "token": "gray-25",
180
- "context": "Border and inner border (selected)"
181
- },
120
+ { "token": "focus-indicator-thickness", "context": "Focus ring" },
121
+ { "token": "focus-indicator-gap", "context": "Focus ring" },
122
+ { "token": "spacing-75", "context": "Spacing (Tooltip to Swatch)" },
123
+ { "token": "swatch-border-color", "context": "Border" },
124
+ { "token": "swatch-border-opacity", "context": "Border" },
125
+ { "token": "gray-1000", "context": "Border and inner border (selected)" },
126
+ { "token": "gray-25", "context": "Border and inner border (selected)" },
182
127
  {
183
128
  "token": "swatch-disabled-icon-border-color",
184
129
  "context": "Disabled icon"
@@ -187,54 +132,22 @@
187
132
  "token": "swatch-disabled-icon-border-opacity",
188
133
  "context": "Disabled icon"
189
134
  },
190
- {
191
- "token": "white",
192
- "context": "Disabled icon"
193
- },
194
- {
195
- "token": "negative-visual-color",
196
- "context": "Slash"
197
- },
198
- {
199
- "token": "neutral-content-color-default",
200
- "context": "Dash UI icon"
201
- },
202
- {
203
- "token": "gray-100",
204
- "context": "Add “button” background"
205
- },
206
- {
207
- "token": "gray-200",
208
- "context": "Add “button” background"
209
- },
210
- {
211
- "token": "focus-indicator-color",
212
- "context": "Focus ring"
213
- },
214
- {
215
- "token": "spacing-50",
216
- "context": "Spacing (compact)"
217
- },
218
- {
219
- "token": "spacing-100",
220
- "context": "Spacing (spacious)"
221
- }
135
+ { "token": "white", "context": "Disabled icon" },
136
+ { "token": "negative-visual-color", "context": "Slash" },
137
+ { "token": "neutral-content-color-default", "context": "Dash UI icon" },
138
+ { "token": "gray-100", "context": "Add “button” background" },
139
+ { "token": "gray-200", "context": "Add “button” background" },
140
+ { "token": "focus-indicator-color", "context": "Focus ring" },
141
+ { "token": "spacing-50", "context": "Spacing (compact)" },
142
+ { "token": "spacing-100", "context": "Spacing (spacious)" }
222
143
  ],
223
144
  "accessibility": {
224
145
  "intents": ["choose"],
225
146
  "focusable": true,
226
147
  "keyboardIntents": ["activate"],
227
148
  "wcag": [
228
- {
229
- "criterion": "2.1.1",
230
- "level": "A",
231
- "title": "Keyboard"
232
- },
233
- {
234
- "criterion": "4.1.2",
235
- "level": "A",
236
- "title": "Name, Role, Value"
237
- }
149
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
150
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
238
151
  ]
239
152
  }
240
153
  }