@adobe/spectrum-design-data 3.3.0 → 3.4.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 (121) hide show
  1. package/components/accordion.json +32 -102
  2. package/components/action-bar.json +9 -23
  3. package/components/action-button.json +52 -92
  4. package/components/action-group.json +18 -129
  5. package/components/alert-banner.json +8 -27
  6. package/components/alert-dialog.json +45 -55
  7. package/components/avatar-group.json +20 -50
  8. package/components/avatar.json +44 -123
  9. package/components/badge.json +66 -160
  10. package/components/breadcrumbs.json +26 -100
  11. package/components/button-group.json +32 -63
  12. package/components/button.json +74 -105
  13. package/components/calendar.json +8 -67
  14. package/components/cards.json +31 -46
  15. package/components/checkbox-group.json +22 -84
  16. package/components/checkbox.json +33 -96
  17. package/components/close-button.json +31 -73
  18. package/components/coach-indicator.json +14 -44
  19. package/components/coach-mark.json +8 -26
  20. package/components/color-area.json +20 -93
  21. package/components/color-handle.json +25 -38
  22. package/components/color-loupe.json +18 -18
  23. package/components/color-slider.json +26 -122
  24. package/components/color-wheel.json +17 -84
  25. package/components/combo-box.json +56 -188
  26. package/components/contextual-help.json +87 -126
  27. package/components/date-picker.json +24 -120
  28. package/components/divider.json +25 -38
  29. package/components/drop-zone.json +25 -37
  30. package/components/field-label.json +22 -59
  31. package/components/help-text.json +16 -53
  32. package/components/illustrated-message.json +21 -72
  33. package/components/in-line-alert.json +13 -53
  34. package/components/link.json +31 -63
  35. package/components/list-view.json +15 -73
  36. package/components/menu.json +51 -180
  37. package/components/meter.json +35 -76
  38. package/components/number-field.json +34 -168
  39. package/components/picker.json +48 -187
  40. package/components/popover.json +47 -123
  41. package/components/progress-bar.json +33 -105
  42. package/components/progress-circle.json +25 -55
  43. package/components/radio-button.json +14 -67
  44. package/components/radio-group.json +34 -131
  45. package/components/rating.json +9 -38
  46. package/components/search-field.json +40 -125
  47. package/components/segmented-control.json +27 -69
  48. package/components/select-box.json +29 -96
  49. package/components/side-navigation.json +28 -69
  50. package/components/slider.json +45 -154
  51. package/components/standard-dialog.json +16 -88
  52. package/components/status-light.json +51 -133
  53. package/components/steplist.json +5 -24
  54. package/components/swatch-group.json +19 -55
  55. package/components/swatch.json +24 -79
  56. package/components/switch.json +42 -79
  57. package/components/table.json +26 -73
  58. package/components/tabs.json +35 -52
  59. package/components/tag-field.json +14 -60
  60. package/components/tag-group.json +22 -55
  61. package/components/tag.json +27 -77
  62. package/components/takeover-dialog.json +10 -61
  63. package/components/text-area.json +55 -204
  64. package/components/text-field.json +48 -169
  65. package/components/thumbnail.json +22 -63
  66. package/components/toast.json +30 -47
  67. package/components/tooltip.json +37 -84
  68. package/components/tree-view.json +51 -146
  69. package/fields/structure.json +1 -2
  70. package/guidelines/ai-resource-guide.json +42 -0
  71. package/guidelines/app-frame-overview.json +45 -44
  72. package/guidelines/applying-the-type-system.json +71 -0
  73. package/guidelines/attention-hierarchy.json +13 -22
  74. package/guidelines/background-layers.json +84 -10
  75. package/guidelines/bi-directionality.json +57 -0
  76. package/guidelines/border-width.json +70 -0
  77. package/guidelines/brand.json +24 -12
  78. package/guidelines/cognitive.json +229 -0
  79. package/guidelines/colors.json +55 -17
  80. package/guidelines/component-spacing.json +65 -0
  81. package/guidelines/contact-us.json +27 -0
  82. package/guidelines/containers.json +21 -28
  83. package/guidelines/content-area-browsing-context.json +73 -0
  84. package/guidelines/creating-bluelines-browsing-context.json +71 -0
  85. package/guidelines/design-tokens.json +186 -0
  86. package/guidelines/developer-overview.json +33 -9
  87. package/guidelines/drop-shadow.json +76 -0
  88. package/guidelines/faqs.json +100 -9
  89. package/guidelines/fonts.json +33 -14
  90. package/guidelines/grammar-and-mechanics.json +276 -0
  91. package/guidelines/grays.json +17 -44
  92. package/guidelines/header-browsing-context.json +40 -0
  93. package/guidelines/icon-fundamentals.json +7 -18
  94. package/guidelines/illustration.json +120 -0
  95. package/guidelines/in-product-word-list.json +25 -0
  96. package/guidelines/inclusive-design.json +101 -0
  97. package/guidelines/inclusive-ux-writing.json +34 -0
  98. package/guidelines/internationalization.json +103 -0
  99. package/guidelines/layout-spacing.json +39 -0
  100. package/guidelines/manifest.json +280 -16
  101. package/guidelines/motion.json +18 -13
  102. package/guidelines/object-styles-overview.json +17 -0
  103. package/guidelines/principles.json +7 -8
  104. package/guidelines/resources.json +29 -15
  105. package/guidelines/rounding.json +85 -0
  106. package/guidelines/side-navigation-browsing-context.json +74 -0
  107. package/guidelines/spacing-overview.json +78 -0
  108. package/guidelines/states.json +16 -11
  109. package/guidelines/support.json +125 -0
  110. package/guidelines/typography-overview.json +39 -0
  111. package/guidelines/typography-system.json +212 -0
  112. package/guidelines/using-icons.json +32 -47
  113. package/guidelines/voice-and-tone.json +51 -0
  114. package/guidelines/whats-new.json +21 -0
  115. package/guidelines/writing-about-people.json +99 -0
  116. package/guidelines/writing-for-errors.json +140 -0
  117. package/guidelines/writing-for-onboarding.json +123 -0
  118. package/guidelines/writing-for-readability.json +66 -0
  119. package/guidelines/writing-with-visuals.json +78 -0
  120. package/package.json +2 -2
  121. package/tokens/layout.tokens.json +88 -0
@@ -9,19 +9,6 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/accordion/"
11
11
  },
12
- "implementations": [
13
- {
14
- "platform": "web",
15
- "componentName": "Accordion",
16
- "package": "@react-spectrum/s2"
17
- },
18
- {
19
- "platform": "web",
20
- "componentName": "Accordion",
21
- "importPath": "@adobe/spectrum-wc/components/accordion",
22
- "notes": "Spectrum 2 web component custom element: swc-accordion."
23
- }
24
- ],
25
12
  "documentBlocks": [
26
13
  {
27
14
  "type": "purpose",
@@ -29,55 +16,37 @@
29
16
  },
30
17
  {
31
18
  "type": "guideline",
32
- "content": "An accordion displays a list of items that can be expanded or collapsed to show additional content. It can support zero, one, or multiple expanded items at a time."
33
- },
34
- {
35
- "type": "guideline",
36
- "content": "By default, only one accordion item can be expanded at a time. Use the isMultiple option to allow multiple items to be expanded simultaneously."
37
- },
38
- {
39
- "type": "guideline",
40
- "content": "Accordions can contain any number of items. Each item can be expanded or collapsed by interacting with any part of the item."
41
- },
42
- {
43
- "type": "guideline",
44
- "content": "Accordions come in three densities: compact, regular, and spacious. Each of the different densities have the same font size, but have tighter or looser vertical spacing between the rows."
45
- },
46
- {
47
- "type": "guideline",
48
- "content": "Individual accordion items can be disabled using the isDisabled option. Disabled items cannot be expanded or collapsed."
49
- },
50
- {
51
- "type": "guideline",
52
- "content": "By default, accordions have dividers between sections. This style works best when lots of content is inside each section."
53
- },
54
- {
55
- "type": "guideline",
56
- "content": "Alternatively, you can have no dividers between sections. This style works best when a clear layout (vertical stack, table, grid) makes it easy see and understand. Too many quiet components in a small space can be hard to differentiate."
19
+ "content": "Single vs. multiple expansion.\n\nBy default, only one accordion item may be expanded at a time. However, the component can be configured to allow multiple items to remain open simultaneously."
57
20
  },
58
21
  {
59
22
  "type": "guideline",
60
- "content": "Accordions come in four different sizes: small, medium, large, and extra-large. The medium size is the default and recommended option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page. Each of the different sizes have varying font sizes, and tighter or looser vertical spacing between the rows."
23
+ "content": "Title wrapping.\n\nAccordion titles wrap automatically if they exceed the available width."
61
24
  },
62
25
  {
63
26
  "type": "guideline",
64
- "content": "By default, only one accordion item may be expanded at a time. However, the component can be configured to allow multiple items to remain open simultaneously."
27
+ "content": "Optional actions.\n\nAn optional action button or switch can be placed on the trailing edge of an accordion item to support contextual interactions."
65
28
  },
66
29
  {
67
30
  "type": "guideline",
68
- "content": "Accordion titles wrap automatically if they exceed the available width."
31
+ "content": "Progressive disclosure.\n\nAccordions are effective for organizing large amounts of related content within a limited space. They help users stay focused by revealing information only when it's needed, making them ideal for scenarios where not all content needs to be visible at once."
69
32
  },
70
33
  {
71
- "type": "guideline",
72
- "content": "An optional action button or switch can be placed on the trailing edge of an accordion item to support contextual interactions."
73
- },
34
+ "type": "do-dont",
35
+ "content": "Avoid accordion overuse",
36
+ "dont": "Avoid using accordions when users are likely to read all the content in one go, as they can introduce unnecessary clicks and hinder the user experience. For complex or deeply nested information structures, consider alternative components such as tree views or tabs to maintain clarity and ease of navigation"
37
+ }
38
+ ],
39
+ "implementations": [
74
40
  {
75
- "type": "guideline",
76
- "content": "Accordions are effective for organizing large amounts of related content within a limited space. They help users stay focused by revealing information only when it's needed, making them ideal for scenarios where not all content needs to be visible at once."
41
+ "platform": "web",
42
+ "componentName": "Accordion",
43
+ "package": "@react-spectrum/s2"
77
44
  },
78
45
  {
79
- "type": "guideline",
80
- "content": "Avoid using accordions when users are likely to read all the content in one go, as they can introduce unnecessary clicks and hinder the user experience. For complex or deeply nested information structures, consider alternative components such as tree views or tabs to maintain clarity and ease of navigation."
46
+ "platform": "web",
47
+ "componentName": "Accordion",
48
+ "importPath": "@adobe/spectrum-wc/components/accordion",
49
+ "notes": "Spectrum 2 web component custom element: swc-accordion."
81
50
  }
82
51
  ],
83
52
  "options": {
@@ -85,41 +54,21 @@
85
54
  "type": "string",
86
55
  "default": "m",
87
56
  "values": [
88
- {
89
- "value": "s"
90
- },
91
- {
92
- "value": "m"
93
- },
94
- {
95
- "value": "l"
96
- },
97
- {
98
- "value": "xl"
99
- }
57
+ { "value": "s" },
58
+ { "value": "m" },
59
+ { "value": "l" },
60
+ { "value": "xl" }
100
61
  ]
101
62
  },
102
- "isQuiet": {
103
- "type": "boolean",
104
- "default": false
105
- },
106
- "isDisabled": {
107
- "type": "boolean",
108
- "default": false
109
- },
63
+ "isQuiet": { "type": "boolean", "default": false },
64
+ "isDisabled": { "type": "boolean", "default": false },
110
65
  "density": {
111
66
  "type": "string",
112
67
  "default": "regular",
113
68
  "values": [
114
- {
115
- "value": "compact"
116
- },
117
- {
118
- "value": "regular"
119
- },
120
- {
121
- "value": "spacious"
122
- }
69
+ { "value": "compact" },
70
+ { "value": "regular" },
71
+ { "value": "spacious" }
123
72
  ]
124
73
  },
125
74
  "items": {
@@ -162,37 +111,18 @@
162
111
  }
163
112
  },
164
113
  "states": [
165
- {
166
- "name": "hover",
167
- "trigger": "interaction"
168
- },
169
- {
170
- "name": "down",
171
- "trigger": "interaction"
172
- },
173
- {
174
- "name": "keyboard-focus",
175
- "trigger": "interaction"
176
- }
114
+ { "name": "hover", "trigger": "interaction" },
115
+ { "name": "down", "trigger": "interaction" },
116
+ { "name": "keyboard-focus", "trigger": "interaction" }
177
117
  ],
178
- "lifecycle": {
179
- "introduced": "1.0.0-draft"
180
- },
118
+ "lifecycle": { "introduced": "1.0.0-draft" },
181
119
  "accessibility": {
182
120
  "intents": ["expand"],
183
121
  "focusable": true,
184
122
  "keyboardIntents": ["activate", "expand", "collapse"],
185
123
  "wcag": [
186
- {
187
- "criterion": "2.1.1",
188
- "level": "A",
189
- "title": "Keyboard"
190
- },
191
- {
192
- "criterion": "4.1.2",
193
- "level": "A",
194
- "title": "Name, Role, Value"
195
- }
124
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
125
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
196
126
  ]
197
127
  }
198
128
  }
@@ -23,7 +23,7 @@
23
23
  },
24
24
  {
25
25
  "type": "guideline",
26
- "content": "Action bar in Dark theme.\n\nAction bar is split into a separate component for each color theme — light and dark. Since each is set to either light or dark mode in Figma, they do not switch automatically like the rest of the UI when placed in frames that are set to \"auto\" mode.\n\nIn dark theme, the action bar also includes a 1px inner border to help it stand out against the background colors."
26
+ "content": "Action bar in Dark theme.\n\nAction bar is split into a separate component for each color theme — light and dark. Since each is set to either light or dark mode in Figma, they do not switch automatically like the rest of the UI when placed in frames that are set to “auto” mode. In dark theme, the action bar also includes a 1px inner border to help it stand out against the background colors."
27
27
  },
28
28
  {
29
29
  "type": "guideline",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  {
37
37
  "type": "guideline",
38
- "content": "Placement.\n\nWhen a user selects items with relevant actions, an action bar appears at the bottom of the viewport. The bar should have margins of `spacing-200` (12 pixels on desktop scale) on the sides and bottom."
38
+ "content": "Placement.\n\nWhen a user selects items with relevant actions, an action bar appears at the bottom of the viewport. The bar should have margins of spacing-200 (12 pixels on desktop scale) on the sides and bottom."
39
39
  },
40
40
  {
41
41
  "type": "guideline",
42
- "content": "Safe zone.\n\nInclude a safe zone of at least `spacing-400` (24 pixels on desktop scale) between the item counter and the action group."
42
+ "content": "Safe zone.\n\nInclude a safe zone of at least spacing-400 (24 pixels on desktop scale) between the item counter and the action group."
43
43
  },
44
44
  {
45
45
  "type": "guideline",
@@ -55,17 +55,11 @@
55
55
  "content": "Allow scrolling to view underlying content.\n\nAction bars appear on top of content. Allow space for a user to still be able to view the content underneath, especially if they're taking actions on a table or a list of items and need to be able to scroll."
56
56
  },
57
57
  {
58
- "type": "do-dont",
59
- "content": "Don't use quick actions",
60
- "dont": "Instead of quick actions, use an action bar for both single and bulk selection patterns. An action bar is useful for when a user needs to perform actions on either a single or multiple items at the same time. It can be used on either a grid view or a table view.\n\nDon't use quick actions — a deprecated component — because it presents conflicting nested actions (for example, a whole asset card could open a detailed view). This makes targeting specific actions very difficult, especially on smaller screens or with the keyboard."
58
+ "type": "guideline",
59
+ "content": "Don’t use quick actions.\n\nInstead of quick actions, use an action bar for both single and bulk selection patterns. An action bar is useful for when a user needs to perform actions on either a single or multiple items at the same time. It can be used on either a grid view or a table view. Don’t use quick actions — a deprecated component — because it presents conflicting nested actions (for example, a whole asset card could open a detailed view). This makes targeting specific actions very difficult, especially on smaller screens or with the keyboard."
61
60
  }
62
61
  ],
63
- "options": {
64
- "isEmphasized": {
65
- "type": "boolean",
66
- "default": false
67
- }
68
- },
62
+ "options": { "isEmphasized": { "type": "boolean", "default": false } },
69
63
  "anatomy": [
70
64
  {
71
65
  "name": "action-group-area",
@@ -75,22 +69,14 @@
75
69
  "name": "item-counter",
76
70
  "description": "Badge showing a count of items or actions."
77
71
  },
78
- {
79
- "name": "counter"
80
- }
72
+ { "name": "counter" }
81
73
  ],
82
- "lifecycle": {
83
- "introduced": "1.0.0-draft"
84
- },
74
+ "lifecycle": { "introduced": "1.0.0-draft" },
85
75
  "accessibility": {
86
76
  "intents": ["trigger"],
87
77
  "focusable": false,
88
78
  "wcag": [
89
- {
90
- "criterion": "4.1.2",
91
- "level": "A",
92
- "title": "Name, Role, Value"
93
- }
79
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
94
80
  ]
95
81
  }
96
82
  }
@@ -9,23 +9,10 @@
9
9
  "category": "actions",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/action-button/"
11
11
  },
12
- "implementations": [
13
- {
14
- "platform": "web",
15
- "componentName": "ActionButton",
16
- "package": "@react-spectrum/s2"
17
- },
18
- {
19
- "platform": "web",
20
- "componentName": "ActionButton",
21
- "importPath": "@adobe/spectrum-wc/components/action-button",
22
- "notes": "Spectrum 2 web component custom element: swc-action-button."
23
- }
24
- ],
25
12
  "documentBlocks": [
26
13
  {
27
14
  "type": "purpose",
28
- "content": "Action buttons perform tasks or mark selections. They're suited for task-based workflows where buttons don't need to draw attention."
15
+ "content": "Action buttons allow users to perform an action or mark a selection. They're used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of attention."
29
16
  },
30
17
  {
31
18
  "type": "guideline",
@@ -33,7 +20,7 @@
33
20
  },
34
21
  {
35
22
  "type": "guideline",
36
- "content": "Keyboard focus.\n\nAn action button can be navigated using a keyboard. The keyboard focus state takes the button's visual hover state and adds a blue ring to the button in focus."
23
+ "content": "Keyboard focus.\n\nAn action button can be navigated using a keyboard. The keyboard focus state takes the button’s visual hover state and adds a blue ring to the button in focus."
37
24
  },
38
25
  {
39
26
  "type": "guideline",
@@ -41,7 +28,7 @@
41
28
  },
42
29
  {
43
30
  "type": "guideline",
44
- "content": "Isolated action buttons.\n\nIf you have an icon-only or text-only isolated action button, use the standard style to make sure it's more easily identifiable as a button."
31
+ "content": "Isolated action buttons.\n\nIf you have an icon-only or text-only isolated action button, use the standard style to make sure it’s more easily identifiable as a button."
45
32
  },
46
33
  {
47
34
  "type": "guideline",
@@ -57,17 +44,41 @@
57
44
  },
58
45
  {
59
46
  "type": "guideline",
60
- "content": "Selected state text color.\n\nThe text color on the selected state of the over-background variant can be customized to match the background it's on. Use the background color for selected text when the action button is on a solid color, and is dark enough to meet a 4.5:1 contrast ratio with a white background (or black background, for the static black variant).\n\nUse black text when the button is on top of an image, or if the background is too low-contrast to meet the 4.5:1 contrast ratio."
47
+ "content": "Selected state text color.\n\nThe text color on the selected state of the over-background variant can be customized to match the background it’s on. Use the background color for selected text when the action button is on a solid color, and is dark enough to meet a 4.5:1 contrast ratio with a white background (or black background, for the static black variant). Use black text when the button is on top of an image, or if the background is too low-contrast to meet the 4.5:1 contrast ratio."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the action button is mirrored. The icon is placed on the right side of the text and the hold icon is placed on the left side of the icon."
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "content": "Keyboard interactions.\n\nWhen an action button does not feature a hold icon: Key Interaction Space or Enter Executes the action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller. Tab Moves focus into the action button component and places focus on the selected action item. Shift + Tab Returns focus to the previous action within the action button component. When an action button features a hold icon: Key Interaction Enter Executes the action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller. Space Opens the popover menu. Alt + Down Arrow Opens the popover menu. Tab Moves focus into the action button component and places focus on the selected action item. Shift + Tab Returns focus to the previous action within the action button component."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components in every state."
60
+ },
61
+ {
62
+ "type": "guideline",
63
+ "content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 A Non‑text elements—such as icons used in action buttons—must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, need an accessible name (for example, via a title, aria‑label, or associated text) so screen readers can announce their function. Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Action buttons should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized. Text contrast 1.4.3 AA Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size if text is wrapped inside an action button. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus can be moved away from the component using only a keyboard. Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
61
64
  }
62
65
  ],
63
- "options": {
64
- "label": {
65
- "type": "string"
66
- },
67
- "hideLabel": {
68
- "type": "boolean",
69
- "default": false
66
+ "implementations": [
67
+ {
68
+ "platform": "web",
69
+ "componentName": "ActionButton",
70
+ "package": "@react-spectrum/s2"
70
71
  },
72
+ {
73
+ "platform": "web",
74
+ "componentName": "ActionButton",
75
+ "importPath": "@adobe/spectrum-wc/components/action-button",
76
+ "notes": "Spectrum 2 web component custom element: swc-action-button."
77
+ }
78
+ ],
79
+ "options": {
80
+ "label": { "type": "string" },
81
+ "hideLabel": { "type": "boolean", "default": false },
71
82
  "icon": {
72
83
  "$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
73
84
  "description": "Icon must be present if the label is not defined."
@@ -76,92 +87,41 @@
76
87
  "type": "string",
77
88
  "default": "m",
78
89
  "values": [
79
- {
80
- "value": "xs"
81
- },
82
- {
83
- "value": "s"
84
- },
85
- {
86
- "value": "m"
87
- },
88
- {
89
- "value": "l"
90
- },
91
- {
92
- "value": "xl"
93
- }
90
+ { "value": "xs" },
91
+ { "value": "s" },
92
+ { "value": "m" },
93
+ { "value": "l" },
94
+ { "value": "xl" }
94
95
  ]
95
96
  },
96
- "isQuiet": {
97
- "type": "boolean",
98
- "default": false
99
- },
100
- "isSelected": {
101
- "type": "boolean",
102
- "default": false
103
- },
104
- "isEmphasized": {
105
- "type": "boolean",
106
- "default": false
107
- },
97
+ "isQuiet": { "type": "boolean", "default": false },
98
+ "isSelected": { "type": "boolean", "default": false },
99
+ "isEmphasized": { "type": "boolean", "default": false },
108
100
  "staticColor": {
109
101
  "type": "string",
110
102
  "description": "Static color must not be set for the default version of this component.",
111
- "values": [
112
- {
113
- "value": "white"
114
- },
115
- {
116
- "value": "black"
117
- }
118
- ]
103
+ "values": [{ "value": "white" }, { "value": "black" }]
119
104
  },
120
105
  "selectedTextColor": {
121
106
  "$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/hex-color.json"
122
107
  },
123
- "hasHoldIcon": {
124
- "type": "boolean",
125
- "default": false
126
- },
127
- "isDisabled": {
128
- "type": "boolean",
129
- "default": false
130
- }
108
+ "hasHoldIcon": { "type": "boolean", "default": false },
109
+ "isDisabled": { "type": "boolean", "default": false }
131
110
  },
132
111
  "states": [
133
- {
134
- "name": "hover",
135
- "trigger": "interaction"
136
- },
137
- {
138
- "name": "down",
139
- "trigger": "interaction"
140
- },
141
- {
142
- "name": "keyboard-focus",
143
- "trigger": "interaction"
144
- }
112
+ { "name": "hover", "trigger": "interaction" },
113
+ { "name": "down", "trigger": "interaction" },
114
+ { "name": "keyboard-focus", "trigger": "interaction" }
145
115
  ],
146
- "lifecycle": {
147
- "introduced": "1.0.0-draft"
148
- },
116
+ "lifecycle": { "introduced": "1.0.0-draft" },
149
117
  "accessibility": {
150
118
  "role": "button",
151
119
  "intents": ["trigger"],
152
120
  "focusable": true,
153
121
  "keyboardIntents": ["activate"],
154
122
  "wcag": [
155
- {
156
- "criterion": "2.1.1",
157
- "level": "A",
158
- "title": "Keyboard"
159
- },
160
- {
161
- "criterion": "4.1.2",
162
- "level": "A",
163
- "title": "Name, Role, Value"
164
- }
123
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
124
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
165
125
  ]
166
126
  }
167
127
  }
@@ -24,140 +24,47 @@
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "An action group in a disabled state shows that the action buttons within the group exist, but are not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action group may become available later."
27
+ "content": "Use an Action menu to show additional actions.\n\nWhen there are more actions than the action group has horizontal space for, overflowMode collapse will use an Action menu to contain additional actions. This is used in the components like action bar or panels to show an array of actions to select from when horizontal space is limited."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "When selection is enabled, an action group's selection behavior can be set to allow for an empty selection, or not."
31
+ "content": "When to use Action group vs. Segmented control.\n\nWhen multiple items can be selected at a time use an action group when taking actions or making choices from a list of options. Action group is the preferred competent to use when those actions are simple (1-2 words or icon only). If you are switching views or navigating to different content, a segmented control is the preferred component."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "When selection is enabled, an action group can allow for single or multiple selection of action buttons."
36
- },
37
- {
38
- "type": "guideline",
39
- "content": "By default, selection is not enabled in an action group. This is used for action groups that offer direct actions, rather than toggling."
40
- },
41
- {
42
- "type": "guideline",
43
- "content": "Selection can be enabled for an action group to allow for toggling. This can be used to disclose parts of an interface (for example, showing or hiding panels) or to switch between views (for example, grid or list views)."
44
- },
45
- {
46
- "type": "guideline",
47
- "content": "Like action buttons, action groups are not emphasized by default. This is optimal for when the action group is not the core part of an interface, such as in application panels, where all components are monochrome in order to direct focus to the content."
48
- },
49
- {
50
- "type": "guideline",
51
- "content": "The emphasized action group has a blue background for its selected state in order to provide a visual prominence that meets the accessible color contrast ratio. This is optimal for when the selection should call attention, such as within a tool bar."
52
- },
53
- {
54
- "type": "guideline",
55
- "content": "By default, an action group uses not-quiet action buttons. This style works best in a dense array of controls where the background helps to separate action buttons from the surrounding container, or to give visibility to isolated buttons."
56
- },
57
- {
58
- "type": "guideline",
59
- "content": "Alternatively, quiet action groups can have no visible background until they’re interacted with. This style works best when a clear layout (vertical stack, table, grid) makes it easy to parse the buttons. Too many quiet components in a small space can be hard to read."
60
- },
61
- {
62
- "type": "guideline",
63
- "content": "An action group can become justified. By default, it is not justified since the action button size depends on the label and/or icon inside each button. When an action group is justified, it takes up the entire available container width, divided equally for each action button that is inside the group."
64
- },
65
- {
66
- "type": "guideline",
67
- "content": "Action groups come in two densities: regular and compact. The compact density retains the same font and icon sizes, but has tighter spacing. The action buttons also become connected for non-quiet action groups."
68
- },
69
- {
70
- "type": "guideline",
71
- "content": "Action groups come in four different sizes: small, medium, large, and extra-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."
72
- },
73
- {
74
- "type": "guideline",
75
- "content": "An action group can be either horizontal or vertical in its orientation. By default, an action group is horizontal. The vertical option should be reserved for when horizontal space is limited."
76
- },
77
- {
78
- "type": "guideline",
79
- "content": "When there are more actions than the action group has horizontal space for, overflowMode collapse will use an Action menu to contain additional actions. This is used in the components like action bar or panels to show an array of actions to select from when horizontal space is limited."
80
- },
81
- {
82
- "type": "guideline",
83
- "content": "When multiple items can be selected at a time use an action group when taking actions or making choices from a list of options. Action group is the preferred competent to use when those actions are simple (1-2 words or icon only). If you are switching views or navigating to different content, a segmented control is the preferred component."
84
- },
85
- {
86
- "type": "guideline",
87
- "content": "Use the fully justified variant when using the vertical compact action group (both the quiet and not quiet options). This will ensure the buttons have the same width."
35
+ "content": "Fully justified action groups.\n\nUse the fully justified variant when using the vertical compact action group (both the quiet and not quiet options). This will ensure the buttons have the same width."
88
36
  }
89
37
  ],
90
38
  "options": {
91
39
  "orientation": {
92
40
  "type": "string",
93
41
  "default": "horizontal",
94
- "values": [
95
- {
96
- "value": "horizontal"
97
- },
98
- {
99
- "value": "vertical"
100
- }
101
- ]
42
+ "values": [{ "value": "horizontal" }, { "value": "vertical" }]
102
43
  },
103
44
  "size": {
104
45
  "type": "string",
105
46
  "default": "m",
106
47
  "values": [
107
- {
108
- "value": "s"
109
- },
110
- {
111
- "value": "m"
112
- },
113
- {
114
- "value": "l"
115
- },
116
- {
117
- "value": "xl"
118
- }
48
+ { "value": "s" },
49
+ { "value": "m" },
50
+ { "value": "l" },
51
+ { "value": "xl" }
119
52
  ]
120
53
  },
121
54
  "density": {
122
55
  "type": "string",
123
56
  "default": "regular",
124
- "values": [
125
- {
126
- "value": "regular"
127
- },
128
- {
129
- "value": "compact"
130
- }
131
- ]
132
- },
133
- "isJustified": {
134
- "type": "boolean",
135
- "default": false
136
- },
137
- "isQuiet": {
138
- "type": "boolean",
139
- "default": false
140
- },
141
- "isEmphasized": {
142
- "type": "boolean",
143
- "default": false
144
- },
145
- "enableSelection": {
146
- "type": "boolean",
147
- "default": false
57
+ "values": [{ "value": "regular" }, { "value": "compact" }]
148
58
  },
59
+ "isJustified": { "type": "boolean", "default": false },
60
+ "isQuiet": { "type": "boolean", "default": false },
61
+ "isEmphasized": { "type": "boolean", "default": false },
62
+ "enableSelection": { "type": "boolean", "default": false },
149
63
  "selectionMode": {
150
64
  "type": "string",
151
65
  "default": "single",
152
66
  "description": "Only applicable if selection is enabled",
153
- "values": [
154
- {
155
- "value": "single"
156
- },
157
- {
158
- "value": "multiple"
159
- }
160
- ]
67
+ "values": [{ "value": "single" }, { "value": "multiple" }]
161
68
  },
162
69
  "allowsEmptySelection": {
163
70
  "type": "boolean",
@@ -167,32 +74,14 @@
167
74
  "overflowMode": {
168
75
  "type": "string",
169
76
  "default": "wrap",
170
- "values": [
171
- {
172
- "value": "wrap"
173
- },
174
- {
175
- "value": "collapse"
176
- }
177
- ]
77
+ "values": [{ "value": "wrap" }, { "value": "collapse" }]
178
78
  },
179
- "isDisabled": {
180
- "type": "boolean",
181
- "default": false
182
- }
183
- },
184
- "lifecycle": {
185
- "introduced": "1.0.0-draft"
79
+ "isDisabled": { "type": "boolean", "default": false }
186
80
  },
81
+ "lifecycle": { "introduced": "1.0.0-draft" },
187
82
  "accessibility": {
188
83
  "intents": ["trigger"],
189
84
  "focusable": false,
190
- "wcag": [
191
- {
192
- "criterion": "2.1.1",
193
- "level": "A",
194
- "title": "Keyboard"
195
- }
196
- ]
85
+ "wcag": [{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" }]
197
86
  }
198
87
  }