@adobe/spectrum-design-data 0.4.0 → 0.7.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 (96) hide show
  1. package/components/accordion.json +108 -194
  2. package/components/action-bar.json +64 -97
  3. package/components/action-button.json +95 -230
  4. package/components/action-group.json +88 -86
  5. package/components/alert-banner.json +104 -76
  6. package/components/alert-dialog.json +78 -126
  7. package/components/avatar-group.json +61 -119
  8. package/components/avatar.json +98 -212
  9. package/components/badge.json +138 -256
  10. package/components/breadcrumbs.json +95 -89
  11. package/components/button-group.json +57 -48
  12. package/components/button.json +151 -368
  13. package/components/calendar.json +97 -34
  14. package/components/cards.json +109 -250
  15. package/components/checkbox-group.json +50 -58
  16. package/components/checkbox.json +121 -186
  17. package/components/close-button.json +61 -124
  18. package/components/coach-indicator.json +63 -72
  19. package/components/coach-mark.json +89 -93
  20. package/components/color-area.json +68 -94
  21. package/components/color-handle.json +39 -79
  22. package/components/color-loupe.json +35 -52
  23. package/components/color-slider.json +95 -116
  24. package/components/color-wheel.json +67 -73
  25. package/components/combo-box.json +243 -331
  26. package/components/contextual-help.json +86 -175
  27. package/components/date-picker.json +139 -179
  28. package/components/divider.json +30 -69
  29. package/components/drop-zone.json +51 -92
  30. package/components/field-label.json +75 -117
  31. package/components/help-text.json +81 -105
  32. package/components/illustrated-message.json +106 -73
  33. package/components/in-line-alert.json +50 -83
  34. package/components/link.json +63 -85
  35. package/components/list-view.json +107 -146
  36. package/components/menu.json +180 -274
  37. package/components/meter.json +72 -118
  38. package/components/number-field.json +213 -305
  39. package/components/picker.json +208 -320
  40. package/components/popover.json +94 -129
  41. package/components/progress-bar.json +94 -131
  42. package/components/progress-circle.json +45 -72
  43. package/components/radio-button.json +87 -156
  44. package/components/radio-group.json +107 -74
  45. package/components/rating.json +66 -99
  46. package/components/search-field.json +132 -202
  47. package/components/segmented-control.json +94 -109
  48. package/components/select-box.json +119 -179
  49. package/components/side-navigation.json +108 -118
  50. package/components/slider.json +143 -228
  51. package/components/standard-dialog.json +96 -114
  52. package/components/standard-panel.json +105 -53
  53. package/components/status-light.json +104 -240
  54. package/components/steplist.json +77 -161
  55. package/components/swatch-group.json +42 -58
  56. package/components/swatch.json +75 -162
  57. package/components/switch.json +101 -189
  58. package/components/table.json +97 -102
  59. package/components/tabs.json +77 -104
  60. package/components/tag-field.json +86 -150
  61. package/components/tag-group.json +50 -44
  62. package/components/tag.json +81 -198
  63. package/components/takeover-dialog.json +59 -57
  64. package/components/text-area.json +200 -323
  65. package/components/text-field.json +183 -304
  66. package/components/thumbnail.json +63 -105
  67. package/components/toast.json +97 -83
  68. package/components/tooltip.json +104 -96
  69. package/components/tree-view.json +169 -181
  70. package/guidelines/app-frame-content-area.json +81 -0
  71. package/guidelines/app-frame-creating-bluelines.json +58 -0
  72. package/guidelines/app-frame-header.json +72 -0
  73. package/guidelines/app-frame-overview.json +167 -0
  74. package/guidelines/app-frame-side-navigation.json +138 -0
  75. package/guidelines/attention-hierarchy.json +42 -0
  76. package/guidelines/background-layers.json +38 -0
  77. package/guidelines/brand.json +50 -0
  78. package/guidelines/colors.json +62 -0
  79. package/guidelines/containers.json +62 -0
  80. package/guidelines/developer-overview.json +35 -0
  81. package/guidelines/faqs.json +35 -0
  82. package/guidelines/fonts.json +58 -0
  83. package/guidelines/grays.json +66 -0
  84. package/guidelines/icon-fundamentals.json +45 -0
  85. package/guidelines/illustrations.json +111 -0
  86. package/guidelines/introduction.json +31 -0
  87. package/guidelines/manifest.json +204 -0
  88. package/guidelines/motion.json +41 -0
  89. package/guidelines/object-styles.json +102 -0
  90. package/guidelines/principles.json +30 -0
  91. package/guidelines/resources.json +59 -0
  92. package/guidelines/spacing.json +25 -0
  93. package/guidelines/states.json +34 -0
  94. package/guidelines/typography-fundamentals.json +142 -0
  95. package/guidelines/using-icons.json +107 -0
  96. package/package.json +4 -2
@@ -9,18 +9,61 @@
9
9
  "category": "navigation",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/tabs/"
11
11
  },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Tabs organize related content into multiple sections. They allow navigation between views while keeping the content grouped under a single context. Use when content can be divided logically into categories within the same view."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Tabs can be horizontal or vertical. By default, tabs are horizontal and should be used when horizontal space is limited."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "Use vertical tabs when horizontal space is more generous or when the list of sections is too long for a horizontal layout. Vertical tabs can also serve as anchor links, providing shortcuts to sections on a single page. In this case, tab items link to on-page anchors rather than opening a new tab view."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "When a user selects a tab item, the selection indicator slides along the base to the newly selected tab. The text and icon colors of both tabs fade during the transition. The tab view changes immediately upon selection."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "When there are too many tabs to fit horizontally across the viewport, display the tabs component as a quiet picker. When appropriate, you can also use alternative overflow methods such as horizontal scrolling."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "When there are too many tabs to fit horizontally across the viewport, you can either allow horizontal scrolling or place all tab items in a quiet picker. Do not truncate multiple tab items just to make them fit horizontally."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Use tabs to organize sections of equal importance. Groups of content under each tab item should not be of different natures. Don't use tabs to replace a flow; use pagination components instead."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "Avoid using multiple levels of tabs. Instead, consider other organizational patterns such as side navigation, accordions or collapsible panels. Nesting tabs is acceptable only when there is a clear separation between the two tab experiences or when different orientations are used."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "content": "Do not compromise hierarchy by using the same tab variations or orientations."
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "content": "Don’t mix the use of icons in tabs. Navigation controls require a clear spacial relationship to one another, and mixing the use of icons can dramatically impact the visual balance and presence for each tab item. Keep in mind that if one tab item has an icon, then they all should have an icon."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "It can often be hard to identify the meaning of icon-only tabs. An icon-only tab should always show a tooltip displaying the label on hover."
60
+ }
61
+ ],
12
62
  "options": {
13
63
  "orientation": {
14
64
  "type": "string",
15
65
  "default": "horizontal",
16
- "values": [
17
- {
18
- "value": "horizontal"
19
- },
20
- {
21
- "value": "vertical"
22
- }
23
- ]
66
+ "values": [{ "value": "horizontal" }, { "value": "vertical" }]
24
67
  },
25
68
  "items": {
26
69
  "type": "array",
@@ -59,18 +102,13 @@
59
102
  "default": false,
60
103
  "description": "This overrides density and is only applicable to horizontal tabs."
61
104
  },
62
- "isEmphasized": {
63
- "type": "boolean",
64
- "default": false
65
- },
105
+ "isEmphasized": { "type": "boolean", "default": false },
66
106
  "alignment": {
67
107
  "type": "string",
68
108
  "enum": ["start", "center"],
69
109
  "default": "start"
70
110
  },
71
- "selectedItem": {
72
- "description": "(list of available items)"
73
- },
111
+ "selectedItem": { "description": "(list of available items)" },
74
112
  "keyboardActivation": {
75
113
  "type": "string",
76
114
  "enum": ["manual", "automatic"],
@@ -80,30 +118,13 @@
80
118
  }
81
119
  }
82
120
  },
83
- "lifecycle": {
84
- "introduced": "1.0.0-draft"
85
- },
121
+ "lifecycle": { "introduced": "1.0.0-draft" },
86
122
  "tokenBindings": [
87
- {
88
- "token": "tab-item-compact-height-medium",
89
- "context": "Height "
90
- },
91
- {
92
- "token": "tab-item-height-medium",
93
- "context": "Regular density "
94
- },
95
- {
96
- "token": "corner-radius-0",
97
- "context": "Corner radius"
98
- },
99
- {
100
- "token": "workflow-icon-size-100",
101
- "context": "Icon "
102
- },
103
- {
104
- "token": "text-to-visual-100",
105
- "context": "Spacing (icon to label)"
106
- },
123
+ { "token": "tab-item-compact-height-medium", "context": "Height " },
124
+ { "token": "tab-item-height-medium", "context": "Regular density " },
125
+ { "token": "corner-radius-0", "context": "Corner radius" },
126
+ { "token": "workflow-icon-size-100", "context": "Icon " },
127
+ { "token": "text-to-visual-100", "context": "Spacing (icon to label)" },
107
128
  {
108
129
  "token": "tab-item-top-to-workflow-icon-compact-medium",
109
130
  "context": "Spacing (top/bottom to edge, workflow icon only)"
@@ -120,10 +141,7 @@
120
141
  "token": "tab-item-side-to-workflow-icon-medium",
121
142
  "context": "Spacing (side to edge, workflow icon only)"
122
143
  },
123
- {
124
- "token": "spacing-100",
125
- "context": "Spacing (edge to edge)"
126
- },
144
+ { "token": "spacing-100", "context": "Spacing (edge to edge)" },
127
145
  {
128
146
  "token": "tab-item-top-to-text-compact-medium",
129
147
  "context": "Spacing (top edge to label)"
@@ -148,26 +166,14 @@
148
166
  "token": "tab-item-to-tab-item-horizontal-medium",
149
167
  "context": "Spacing (between tab items, horizontal)"
150
168
  },
151
- {
152
- "token": "focus-indicator-thickness",
153
- "context": "Focus ring"
154
- },
155
- {
156
- "token": "focus-indicator-gap",
157
- "context": "Focus ring"
158
- },
169
+ { "token": "focus-indicator-thickness", "context": "Focus ring" },
170
+ { "token": "focus-indicator-gap", "context": "Focus ring" },
159
171
  {
160
172
  "token": "tab-selection-indicator-thickness",
161
173
  "context": "Selection indicator (underline)"
162
174
  },
163
- {
164
- "token": "spacing-75",
165
- "context": "Spacing (selected) "
166
- },
167
- {
168
- "token": "spacing-200",
169
- "context": "Spacing (selected) "
170
- },
175
+ { "token": "spacing-75", "context": "Spacing (selected) " },
176
+ { "token": "spacing-200", "context": "Spacing (selected) " },
171
177
  {
172
178
  "token": "spacing-50",
173
179
  "context": "Spacing (selected with keyboard focus) "
@@ -196,58 +202,25 @@
196
202
  "token": "neutral-subdued-content-color-key-focus",
197
203
  "context": "Tab items and selection indicator"
198
204
  },
199
- {
200
- "token": "disabled-border-color",
201
- "context": "Disabled"
202
- },
203
- {
204
- "token": "disabled-content-color",
205
- "context": "Disabled"
206
- },
207
- {
208
- "token": "focus-indicator-color",
209
- "context": "Focus ring"
210
- },
211
- {
212
- "token": "default-font-family"
213
- },
214
- {
215
- "token": "default-font-style"
216
- },
217
- {
218
- "token": "regular-font-weight"
219
- },
220
- {
221
- "token": "font-size-75"
222
- },
223
- {
224
- "token": "font-size-100"
225
- },
226
- {
227
- "token": "font-size-200"
228
- },
229
- {
230
- "token": "font-size-300"
231
- },
232
- {
233
- "token": "line-height-100"
234
- }
205
+ { "token": "disabled-border-color", "context": "Disabled" },
206
+ { "token": "disabled-content-color", "context": "Disabled" },
207
+ { "token": "focus-indicator-color", "context": "Focus ring" },
208
+ { "token": "default-font-family" },
209
+ { "token": "default-font-style" },
210
+ { "token": "regular-font-weight" },
211
+ { "token": "font-size-75" },
212
+ { "token": "font-size-100" },
213
+ { "token": "font-size-200" },
214
+ { "token": "font-size-300" },
215
+ { "token": "line-height-100" }
235
216
  ],
236
217
  "accessibility": {
237
218
  "intents": ["navigate"],
238
219
  "focusable": true,
239
220
  "keyboardIntents": ["navigate-items"],
240
221
  "wcag": [
241
- {
242
- "criterion": "2.1.1",
243
- "level": "A",
244
- "title": "Keyboard"
245
- },
246
- {
247
- "criterion": "4.1.2",
248
- "level": "A",
249
- "title": "Name, Role, Value"
250
- }
222
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
223
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
251
224
  ]
252
225
  }
253
226
  }
@@ -9,131 +9,111 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/tag-field/"
11
11
  },
12
- "options": {
13
- "size": {
14
- "type": "string",
15
- "default": "m",
16
- "values": [
17
- {
18
- "value": "s"
19
- },
20
- {
21
- "value": "m"
22
- },
23
- {
24
- "value": "l"
25
- }
26
- ]
27
- },
28
- "style": {
29
- "type": "string",
30
- "default": "keyword",
31
- "values": [
32
- {
33
- "value": "keyword"
34
- },
35
- {
36
- "value": "icon"
37
- },
38
- {
39
- "value": "thumbnail"
40
- },
41
- {
42
- "value": "avatar"
43
- }
44
- ]
45
- },
46
- "isDisabled": {
47
- "type": "boolean",
48
- "default": false
49
- },
50
- "hideLabel": {
51
- "type": "boolean",
52
- "default": false
53
- }
54
- },
55
- "states": [
12
+ "documentBlocks": [
56
13
  {
57
- "name": "hover",
58
- "trigger": "interaction"
14
+ "type": "purpose",
15
+ "content": "A tag field is an input field that allows users to enter and manage tags."
59
16
  },
60
17
  {
61
- "name": "focus-+-hover",
62
- "trigger": "prop"
18
+ "type": "guideline",
19
+ "content": "Tag field is an input component for adding and editing multiple tags. It includes standard field label and error options, and is used to capture grouped keywords or descriptors. Tags can be added directly in the field and displayed inline for editing or removal."
63
20
  },
64
21
  {
65
- "name": "focus-+-not-hover",
66
- "trigger": "prop"
67
- },
68
- {
69
- "name": "keyboard-focus",
70
- "trigger": "interaction"
71
- }
72
- ],
73
- "lifecycle": {
74
- "introduced": "1.0.0-draft"
75
- },
76
- "tokenBindings": [
77
- {
78
- "token": "tag-field-default-width-small",
79
- "context": "Width (default)"
22
+ "type": "guideline",
23
+ "content": "The label of the tag field can be hidden if the context for the tags is sufficient without the title — for example, when the page title or section title applies to the group of tags."
80
24
  },
81
25
  {
82
- "token": "tag-field-default-width-medium",
83
- "context": "Width (default)"
26
+ "type": "guideline",
27
+ "content": "A tag field in a disabled state indicates that it exists but is not available in that context. This state helps maintain layout continuity and signals that tagging may become available later."
84
28
  },
85
29
  {
86
- "token": "tag-field-default-width-large",
87
- "context": "Width (default)"
30
+ "type": "guideline",
31
+ "content": "Tag groups within a tag field can include a keyword, icon, thumbnail or avatar. Icons, thumbnails and avatars should also include a keyword."
88
32
  },
89
33
  {
90
- "token": "tag-field-minimum-width",
91
- "context": "Width (minimum)"
34
+ "type": "guideline",
35
+ "content": "Tag fields come in three different sizes: 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."
92
36
  },
93
37
  {
94
- "token": "tag-field-minimum-height-small",
95
- "context": "Height (minimum)"
38
+ "type": "guideline",
39
+ "content": "A flyout/menu appears when the user starts typing to suggest tags that are supported or have already been entered previously."
96
40
  },
97
41
  {
98
- "token": "tag-field-minimum-height-medium",
99
- "context": "Height (minimum)"
42
+ "type": "guideline",
43
+ "content": "Sometimes tag field can be additive, meaning new tags may be added from this particular tag field. They can also be restricted to only allowing tags that already exist in the system"
100
44
  },
101
45
  {
102
- "token": "tag-field-minimum-height-large",
103
- "context": "Height (minimum)"
46
+ "type": "guideline",
47
+ "content": "When there are more tags than fit in the horizontal space, tags wrap to another line."
104
48
  },
105
49
  {
106
- "token": "corner-radius-medium-size-small",
107
- "context": "Rounding"
50
+ "type": "guideline",
51
+ "content": "If the order of tags within the group matters, the user must be able to click or use keyboard focus between tags to add more."
108
52
  },
109
53
  {
110
- "token": "corner-radius-medium-size-medium",
111
- "context": "Rounding"
54
+ "type": "guideline",
55
+ "content": "If there is space in an experience for the field to grow with the tags, such as at the bottom of a page or dialog, you can use the multi-line option."
112
56
  },
113
57
  {
114
- "token": "corner-radius-medium-size-large",
115
- "context": "Rounding"
58
+ "type": "guideline",
59
+ "content": "If the tag field is located at the top of a header or otherwise constrained space, it is better to use a non-multi-line tag field."
116
60
  },
117
61
  {
118
- "token": "border-width-200",
119
- "context": "Border"
62
+ "type": "guideline",
63
+ "content": "The default option should be a standard text field with tags displayed below it. You may use a tag field if space is limited, especially when using a single-line tag field. This allows all fields to stay contained within a defined area."
64
+ }
65
+ ],
66
+ "options": {
67
+ "size": {
68
+ "type": "string",
69
+ "default": "m",
70
+ "values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
120
71
  },
121
- {
122
- "token": "focus-indicator-thickness",
123
- "context": "Focus indicator"
72
+ "style": {
73
+ "type": "string",
74
+ "default": "keyword",
75
+ "values": [
76
+ { "value": "keyword" },
77
+ { "value": "icon" },
78
+ { "value": "thumbnail" },
79
+ { "value": "avatar" }
80
+ ]
124
81
  },
82
+ "isDisabled": { "type": "boolean", "default": false },
83
+ "hideLabel": { "type": "boolean", "default": false }
84
+ },
85
+ "states": [
86
+ { "name": "hover", "trigger": "interaction" },
87
+ { "name": "focus-+-hover", "trigger": "prop" },
88
+ { "name": "focus-+-not-hover", "trigger": "prop" },
89
+ { "name": "keyboard-focus", "trigger": "interaction" }
90
+ ],
91
+ "lifecycle": { "introduced": "1.0.0-draft" },
92
+ "tokenBindings": [
93
+ { "token": "tag-field-default-width-small", "context": "Width (default)" },
94
+ { "token": "tag-field-default-width-medium", "context": "Width (default)" },
95
+ { "token": "tag-field-default-width-large", "context": "Width (default)" },
96
+ { "token": "tag-field-minimum-width", "context": "Width (minimum)" },
125
97
  {
126
- "token": "workflow-icon-size-75",
127
- "context": "Alert icon"
98
+ "token": "tag-field-minimum-height-small",
99
+ "context": "Height (minimum)"
128
100
  },
129
101
  {
130
- "token": "workflow-icon-size-100",
131
- "context": "Alert icon"
102
+ "token": "tag-field-minimum-height-medium",
103
+ "context": "Height (minimum)"
132
104
  },
133
105
  {
134
- "token": "workflow-icon-size-200",
135
- "context": "Alert icon"
106
+ "token": "tag-field-minimum-height-large",
107
+ "context": "Height (minimum)"
136
108
  },
109
+ { "token": "corner-radius-medium-size-small", "context": "Rounding" },
110
+ { "token": "corner-radius-medium-size-medium", "context": "Rounding" },
111
+ { "token": "corner-radius-medium-size-large", "context": "Rounding" },
112
+ { "token": "border-width-200", "context": "Border" },
113
+ { "token": "focus-indicator-thickness", "context": "Focus indicator" },
114
+ { "token": "workflow-icon-size-75", "context": "Alert icon" },
115
+ { "token": "workflow-icon-size-100", "context": "Alert icon" },
116
+ { "token": "workflow-icon-size-200", "context": "Alert icon" },
137
117
  {
138
118
  "token": "field-edge-to-alert-icon-small",
139
119
  "context": "Spacing (top/bottom edge to alert icon)"
@@ -170,74 +150,30 @@
170
150
  "token": "spacing-200",
171
151
  "context": "Spacing (minimum, field label to field)"
172
152
  },
173
- {
174
- "token": "gray-25",
175
- "context": "Background and border"
176
- },
177
- {
178
- "token": "gray-300",
179
- "context": "Background and border"
180
- },
181
- {
182
- "token": "gray-400",
183
- "context": "Background and border"
184
- },
185
- {
186
- "token": "gray-900",
187
- "context": "Background and border"
188
- },
189
- {
190
- "token": "gray-800",
191
- "context": "Background and border"
192
- },
193
- {
194
- "token": "negative-border-color-default",
195
- "context": "Border (error)"
196
- },
197
- {
198
- "token": "negative-border-color-hover",
199
- "context": "Border (error)"
200
- },
153
+ { "token": "gray-25", "context": "Background and border" },
154
+ { "token": "gray-300", "context": "Background and border" },
155
+ { "token": "gray-400", "context": "Background and border" },
156
+ { "token": "gray-900", "context": "Background and border" },
157
+ { "token": "gray-800", "context": "Background and border" },
158
+ { "token": "negative-border-color-default", "context": "Border (error)" },
159
+ { "token": "negative-border-color-hover", "context": "Border (error)" },
201
160
  {
202
161
  "token": "negative-border-color-focus-hover",
203
162
  "context": "Border (error)"
204
163
  },
205
- {
206
- "token": "negative-border-color-focus",
207
- "context": "Border (error)"
208
- },
209
- {
210
- "token": "negative-border-color-key-focus",
211
- "context": "Border (error)"
212
- },
213
- {
214
- "token": "negative-visual-color",
215
- "context": "Alert icon"
216
- },
217
- {
218
- "token": "disabled-border-color",
219
- "context": "Disabled"
220
- },
221
- {
222
- "token": "focus-indicator-color",
223
- "context": "Focus ring"
224
- }
164
+ { "token": "negative-border-color-focus", "context": "Border (error)" },
165
+ { "token": "negative-border-color-key-focus", "context": "Border (error)" },
166
+ { "token": "negative-visual-color", "context": "Alert icon" },
167
+ { "token": "disabled-border-color", "context": "Disabled" },
168
+ { "token": "focus-indicator-color", "context": "Focus ring" }
225
169
  ],
226
170
  "accessibility": {
227
171
  "intents": ["input", "select"],
228
172
  "focusable": true,
229
173
  "keyboardIntents": ["navigate-items", "activate"],
230
174
  "wcag": [
231
- {
232
- "criterion": "1.3.1",
233
- "level": "A",
234
- "title": "Info and Relationships"
235
- },
236
- {
237
- "criterion": "4.1.2",
238
- "level": "A",
239
- "title": "Name, Role, Value"
240
- }
175
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
176
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
241
177
  ]
242
178
  }
243
179
  }
@@ -9,55 +9,69 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/tag-group/"
11
11
  },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "A tag group is a collection of tags that represent a set of related items."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Tag groups organize multiple tags into a single visual group. They’re used to categorize content like keywords or names that describe an item or search query. Tags within the group can be added, removed, or styled to reflect different types of content."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Tag groups come in three different sizes: 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": "Labels can be placed either on top or on the side of a group of tags. Top labels are the default and are recommended because they work better with long copy, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "The label of the tag group can be hidden if the context for the tags is sufficient without the title — for example, when the page title or section title applies to the group of tags."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "Define an action label to include a link-style button to perform an action on the entire group of tags. This button always appears at the end of the tag group."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "When horizontal space is limited in a tag group, the individual tags wrap to form another line."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "If the order of tags within the group matters, the user must be able to click or use keyboard focus between tags to add more."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "In some instances, it's possible to add an action next to a group of tags to provide a way to easily act on the entire group at once. Reveal the action only when more than one tag is displayed."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "content": "In cases where users cannot interact with a large group of tags, consider hiding the group and its broader construct rather than disabling all the individual tags."
52
+ }
53
+ ],
12
54
  "options": {
13
55
  "size": {
14
56
  "type": "string",
15
57
  "default": "m",
16
- "values": [
17
- {
18
- "value": "s"
19
- },
20
- {
21
- "value": "m"
22
- },
23
- {
24
- "value": "l"
25
- }
26
- ]
58
+ "values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
27
59
  },
28
60
  "labelPosition": {
29
61
  "type": "string",
30
62
  "default": "top",
31
- "values": [
32
- {
33
- "value": "top"
34
- },
35
- {
36
- "value": "side"
37
- }
38
- ]
39
- },
40
- "hideLabel": {
41
- "type": "boolean",
42
- "default": false
63
+ "values": [{ "value": "top" }, { "value": "side" }]
43
64
  },
65
+ "hideLabel": { "type": "boolean", "default": false },
44
66
  "actionLabel": {
45
67
  "type": "string",
46
68
  "description": "If undefined, this button does not appear."
47
69
  }
48
70
  },
49
- "lifecycle": {
50
- "introduced": "1.0.0-draft"
51
- },
71
+ "lifecycle": { "introduced": "1.0.0-draft" },
52
72
  "tokenBindings": [
53
- {
54
- "token": "spacing-100",
55
- "context": "Spacing (vertical)"
56
- },
57
- {
58
- "token": "spacing-200",
59
- "context": "Spacing (vertical)"
60
- },
73
+ { "token": "spacing-100", "context": "Spacing (vertical)" },
74
+ { "token": "spacing-200", "context": "Spacing (vertical)" },
61
75
  {
62
76
  "token": "field-label-to-component",
63
77
  "context": "Spacing (Field label to Tags)"
@@ -72,16 +86,8 @@
72
86
  "focusable": true,
73
87
  "keyboardIntents": ["navigate-items", "activate"],
74
88
  "wcag": [
75
- {
76
- "criterion": "1.3.1",
77
- "level": "A",
78
- "title": "Info and Relationships"
79
- },
80
- {
81
- "criterion": "4.1.2",
82
- "level": "A",
83
- "title": "Name, Role, Value"
84
- }
89
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
90
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
85
91
  ]
86
92
  }
87
93
  }