@adobe/spectrum-design-data 0.0.0-size-token-taxonomy-20260929225107
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.
- package/LICENSE +201 -0
- package/README.md +75 -0
- package/components/accordion.json +185 -0
- package/components/action-bar.json +89 -0
- package/components/action-button.json +167 -0
- package/components/action-group.json +190 -0
- package/components/alert-banner.json +148 -0
- package/components/alert-dialog.json +124 -0
- package/components/avatar-group.json +82 -0
- package/components/avatar.json +162 -0
- package/components/badge.json +227 -0
- package/components/bar-panel.json +14 -0
- package/components/body.json +54 -0
- package/components/bottom-navigation-android.json +72 -0
- package/components/breadcrumbs.json +213 -0
- package/components/button-group.json +122 -0
- package/components/button.json +239 -0
- package/components/calendar.json +196 -0
- package/components/card-horizontal.json +14 -0
- package/components/card.json +22 -0
- package/components/cards.json +117 -0
- package/components/checkbox-group.json +128 -0
- package/components/checkbox.json +171 -0
- package/components/close-button.json +116 -0
- package/components/coach-indicator.json +109 -0
- package/components/coach-mark.json +151 -0
- package/components/code.json +44 -0
- package/components/collection-card.json +13 -0
- package/components/color-area.json +150 -0
- package/components/color-control.json +14 -0
- package/components/color-handle.json +79 -0
- package/components/color-loupe.json +49 -0
- package/components/color-slider.json +189 -0
- package/components/color-wheel.json +137 -0
- package/components/combo-box.json +319 -0
- package/components/contextual-help.json +186 -0
- package/components/date-field.json +13 -0
- package/components/date-picker.json +297 -0
- package/components/detail.json +53 -0
- package/components/divider.json +62 -0
- package/components/double-calendar.json +13 -0
- package/components/drop-zone.json +102 -0
- package/components/field-label.json +125 -0
- package/components/field.json +13 -0
- package/components/floating-action-button.json +13 -0
- package/components/form-item.json +13 -0
- package/components/heading.json +68 -0
- package/components/help-text.json +117 -0
- package/components/illustrated-message.json +159 -0
- package/components/in-field-button.json +14 -0
- package/components/in-field-progress-button.json +88 -0
- package/components/in-field-progress-circle.json +62 -0
- package/components/in-line-alert.json +109 -0
- package/components/link.json +127 -0
- package/components/list-view.json +233 -0
- package/components/menu.json +310 -0
- package/components/meter.json +127 -0
- package/components/number-field.json +264 -0
- package/components/opacity-checkerboard.json +51 -0
- package/components/picker.json +287 -0
- package/components/popover.json +182 -0
- package/components/progress-bar.json +177 -0
- package/components/progress-circle.json +108 -0
- package/components/radio-button.json +130 -0
- package/components/radio-group.json +202 -0
- package/components/rating.json +120 -0
- package/components/scroll-zoom-bar.json +82 -0
- package/components/search-field.json +206 -0
- package/components/segmented-control.json +184 -0
- package/components/segmented-text-field.json +13 -0
- package/components/select-box.json +165 -0
- package/components/side-navigation.json +185 -0
- package/components/single-calendar.json +13 -0
- package/components/slider.json +238 -0
- package/components/stack-item.json +23 -0
- package/components/standard-dialog.json +155 -0
- package/components/standard-panel.json +135 -0
- package/components/status-light.json +175 -0
- package/components/steplist.json +127 -0
- package/components/swatch-group.json +126 -0
- package/components/swatch.json +153 -0
- package/components/switch.json +156 -0
- package/components/table.json +273 -0
- package/components/tabs.json +163 -0
- package/components/tag-field.json +147 -0
- package/components/tag-group.json +111 -0
- package/components/tag.json +123 -0
- package/components/takeover-dialog.json +129 -0
- package/components/text-area.json +299 -0
- package/components/text-field.json +263 -0
- package/components/thumbnail.json +109 -0
- package/components/time-field.json +13 -0
- package/components/title.json +53 -0
- package/components/toast.json +136 -0
- package/components/tooltip.json +171 -0
- package/components/tray.json +32 -0
- package/components/tree-view.json +270 -0
- package/components/triple-calendar.json +13 -0
- package/components/user-card.json +14 -0
- package/fields/alignment.json +15 -0
- package/fields/anatomy.json +15 -0
- package/fields/color-scheme.json +16 -0
- package/fields/colorFamily.json +16 -0
- package/fields/colorRole.json +16 -0
- package/fields/component.json +15 -0
- package/fields/contrast.json +16 -0
- package/fields/density.json +15 -0
- package/fields/easing.json +15 -0
- package/fields/emphasis.json +16 -0
- package/fields/family.json +16 -0
- package/fields/from.json +16 -0
- package/fields/icon.json +15 -0
- package/fields/motionRole.json +15 -0
- package/fields/object.json +15 -0
- package/fields/orientation.json +15 -0
- package/fields/position.json +15 -0
- package/fields/property.json +15 -0
- package/fields/qualifier.json +15 -0
- package/fields/referenceScaleIndex.json +16 -0
- package/fields/role.json +15 -0
- package/fields/scale.json +16 -0
- package/fields/scaleIndex.json +16 -0
- package/fields/script.json +16 -0
- package/fields/shape.json +15 -0
- package/fields/size.json +15 -0
- package/fields/state.json +15 -0
- package/fields/structure.json +16 -0
- package/fields/style.json +15 -0
- package/fields/substructure.json +15 -0
- package/fields/to.json +16 -0
- package/fields/variant.json +15 -0
- package/fields/weight.json +15 -0
- package/guidelines/app-frame-content-area.json +81 -0
- package/guidelines/app-frame-creating-bluelines.json +58 -0
- package/guidelines/app-frame-header.json +72 -0
- package/guidelines/app-frame-overview.json +167 -0
- package/guidelines/app-frame-side-navigation.json +138 -0
- package/guidelines/attention-hierarchy.json +42 -0
- package/guidelines/background-layers.json +38 -0
- package/guidelines/brand.json +50 -0
- package/guidelines/colors.json +62 -0
- package/guidelines/containers.json +62 -0
- package/guidelines/developer-overview.json +35 -0
- package/guidelines/faqs.json +35 -0
- package/guidelines/fonts.json +58 -0
- package/guidelines/grays.json +66 -0
- package/guidelines/icon-fundamentals.json +45 -0
- package/guidelines/illustrations.json +111 -0
- package/guidelines/introduction.json +31 -0
- package/guidelines/manifest.json +204 -0
- package/guidelines/motion.json +41 -0
- package/guidelines/object-styles.json +102 -0
- package/guidelines/principles.json +30 -0
- package/guidelines/resources.json +59 -0
- package/guidelines/spacing.json +25 -0
- package/guidelines/states.json +34 -0
- package/guidelines/typography-fundamentals.json +142 -0
- package/guidelines/using-icons.json +107 -0
- package/mode-sets/color-scheme.json +8 -0
- package/mode-sets/contrast.json +8 -0
- package/mode-sets/scale.json +8 -0
- package/package.json +68 -0
- package/registry/alignments.json +22 -0
- package/registry/anatomy-terms.json +860 -0
- package/registry/categories.json +55 -0
- package/registry/color-families.json +177 -0
- package/registry/color-roles.json +47 -0
- package/registry/components.json +472 -0
- package/registry/densities.json +17 -0
- package/registry/easing-curves.json +42 -0
- package/registry/glossary.json +181 -0
- package/registry/icon-terms.json +104 -0
- package/registry/motion-roles.json +32 -0
- package/registry/navigation-terms.json +241 -0
- package/registry/orientations.json +17 -0
- package/registry/platform-extensions/web-components-states.json +58 -0
- package/registry/platforms.json +37 -0
- package/registry/positions.json +70 -0
- package/registry/property-terms.json +352 -0
- package/registry/qualifiers.json +47 -0
- package/registry/roles.json +17 -0
- package/registry/scale-values.json +133 -0
- package/registry/scripts.json +12 -0
- package/registry/shapes.json +27 -0
- package/registry/sizes.json +78 -0
- package/registry/states.json +187 -0
- package/registry/structures.json +67 -0
- package/registry/substructures.json +12 -0
- package/registry/token-objects.json +32 -0
- package/registry/token-terminology.json +925 -0
- package/registry/typography-emphasis.json +32 -0
- package/registry/typography-families.json +22 -0
- package/registry/typography-styles.json +22 -0
- package/registry/typography-weights.json +37 -0
- package/registry/variants.json +366 -0
- package/tokens/color-aliases.tokens.json +5579 -0
- package/tokens/color-component.tokens.json +1 -0
- package/tokens/color-palette.tokens.json +13458 -0
- package/tokens/icons.tokens.json +2777 -0
- package/tokens/layout-component.tokens.json +3121 -0
- package/tokens/layout.tokens.json +8741 -0
- package/tokens/semantic-color-palette.tokens.json +1246 -0
- package/tokens/typography.tokens.json +1447 -0
|
@@ -0,0 +1,213 @@
|
|
|
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/breadcrumbs.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "breadcrumbs",
|
|
6
|
+
"displayName": "Breadcrumbs",
|
|
7
|
+
"description": "Breadcrumbs show hierarchy and navigational context for a user’s location within an app.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "navigation",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/breadcrumbs/"
|
|
11
|
+
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "Breadcrumbs show hierarchy and navigational context for a user’s location within an app."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "When set to true, the breadcrumb item is displayed as an icon only."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "Separators visually divide breadcrumb items and convey hierarchy."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Breadcrumbs can include multiple items, but too many levels can overwhelm users. Limit the hierarchy to four items (including the root, if shown) to provide clear context while keeping truncated options accessible."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "Breadcrumbs come in two sizes: medium, and large. The medium size is the default and most frequently used option."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "The multiline variation places emphasis on the selected breadcrumb item as a page title, helping a user to more clearly identify their current location."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Breadcrumbs truncate when there is not enough room to display all levels of the breadcrumb list, or as a way of managing relevance of the visible breadcrumb items in a deeply nested hierarchy. The truncation of breadcrumb items begins when either there is not enough room to display all items, or if there are 5 or more breadcrumbs to display."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "The truncation menu displays all options within a breadcrumb. Items are listed with the hierarchy ordered from top (root) to bottom and include the currently selected item."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "Breadcrumbs need a consistent hierarchical structure because they create a path for discovery and context for a user’s current location."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "Breadcrumbs should be a form of navigating a linear hierarchy. They should not be used for any other interactions, such as displaying filters."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "The truncation menu should display all available options within the hierarchy where a user is located — not as indented. Doing this provides context for the directionality of how the menu is being displayed. Adding indentation to the menu items does not add value to understanding the hierarchy, and it can actually decrease the readability of the menu options."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"content": "When list items are truncated into a menu but the label text is still too large for the horizontal space, truncate the text with an ellipsis. By default, truncation should occur at the end of the title. If your users need to see the end of truncated titles, truncating the middle of the title is acceptable."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "guideline",
|
|
63
|
+
"content": "When the breadcrumb title is truncated, a tooltip should display the full title when the user hovers, keyboard focuses, or single-taps on mobile."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "guideline",
|
|
67
|
+
"content": "Prioritize using the truncation menu when breadcrumb labels are long. Never truncate more than one breadcrumb label. If the current location has a long label, all items can be truncated into the menu."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "guideline",
|
|
71
|
+
"content": "Truncation should be avoided by way of the breadcrumbs overflow behavior, although in some cases the final breadcrumb title may truncate with an ellipsis."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "guideline",
|
|
75
|
+
"content": "Be mindful of your user’s cognitive load and truncate breadcrumbs appropriately. Displaying too many levels can be overwhelming. By displaying only 4 items in the hierarchy (including the root item, if you are displaying it), users will quickly understand context while still having easy access to any truncated options. Truncation of breadcrumb items begins when either there is not enough room to display all items, or if there are 5 or more breadcrumbs to display."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "guideline",
|
|
79
|
+
"content": "Don't use icons within the labels for breadcrumbs. Since breadcrumb labels are horizontally distributed, icons disrupt the rhythm and readability of the list."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "guideline",
|
|
83
|
+
"content": "Breadcrumbs are a way for traveling up a hierarchical navigation and should not be mixed with controls intended for lateral or non-hierarchical navigation."
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"options": {
|
|
87
|
+
"isMultiline": {
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"default": false,
|
|
90
|
+
"description": "If true, the breadcrumb items will wrap to multiple lines."
|
|
91
|
+
},
|
|
92
|
+
"size": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"default": "m",
|
|
95
|
+
"description": "Controls the overall size of the breadcrumb component.",
|
|
96
|
+
"values": [
|
|
97
|
+
{
|
|
98
|
+
"value": "m"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"value": "l"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"description": "An array of breadcrumb items.",
|
|
108
|
+
"items": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"label": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "The text displayed for the breadcrumb item."
|
|
114
|
+
},
|
|
115
|
+
"href": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "Optional URL the breadcrumb item links to."
|
|
118
|
+
},
|
|
119
|
+
"isCurrent": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"description": "Indicates if the breadcrumb item represents the current page.",
|
|
122
|
+
"default": false
|
|
123
|
+
},
|
|
124
|
+
"isDisabled": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": false
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": ["label"]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"separator": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"default": "chevron",
|
|
135
|
+
"description": "The separator icon used between breadcrumb items.",
|
|
136
|
+
"values": [
|
|
137
|
+
{
|
|
138
|
+
"value": "chevron"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"value": "none"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"isTruncated": {
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"default": false,
|
|
148
|
+
"description": "If true, the breadcrumb item is truncated and displayed as icon only."
|
|
149
|
+
},
|
|
150
|
+
"sizeOverride": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "Overrides the size of the breadcrumb items when isMultiline is true.",
|
|
153
|
+
"values": [
|
|
154
|
+
{
|
|
155
|
+
"value": "s"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"value": "m"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"value": "l"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"value": "xl"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"anatomy": [
|
|
170
|
+
{
|
|
171
|
+
"name": "separator-icon",
|
|
172
|
+
"description": "Icon separating breadcrumb items."
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"states": [
|
|
176
|
+
{
|
|
177
|
+
"name": "hover",
|
|
178
|
+
"trigger": "interaction"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "down",
|
|
182
|
+
"trigger": "interaction"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "keyboard-focus",
|
|
186
|
+
"trigger": "interaction"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "drag-and-drop",
|
|
190
|
+
"trigger": "prop"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"lifecycle": {
|
|
194
|
+
"introduced": "1.0.0-draft"
|
|
195
|
+
},
|
|
196
|
+
"accessibility": {
|
|
197
|
+
"intents": ["navigate"],
|
|
198
|
+
"focusable": true,
|
|
199
|
+
"keyboardIntents": ["navigate-items", "activate"],
|
|
200
|
+
"wcag": [
|
|
201
|
+
{
|
|
202
|
+
"criterion": "2.1.1",
|
|
203
|
+
"level": "A",
|
|
204
|
+
"title": "Keyboard"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"criterion": "4.1.2",
|
|
208
|
+
"level": "A",
|
|
209
|
+
"title": "Name, Role, Value"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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/button-group.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "button-group",
|
|
6
|
+
"displayName": "Button group",
|
|
7
|
+
"description": "A button group is a grouping of buttons whose actions are related to each other.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "actions",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/button-group/"
|
|
11
|
+
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "A button group is a grouping of buttons whose actions are related to each other."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Button groups organize related buttons into a single group for presenting multiple, related actions."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "A button group in a disabled state shows that the 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 a button group may become available later."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "This option stacks button groups vertically when horizontal space is limited, placing the most important action at the bottom."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "Button 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."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "A button group can be either horizontal or vertical in its orientation. By default, a button group is horizontal. Use vertical option when horizontal space is limited."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "When horizontal space is limited, button groups stack vertically. Buttons are stacked by the importance of the action, with the most critical or primary action at the bottom."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "Button groups are aligned contextually. In general, button groups are left-aligned to follow content such as a block of text. They are center-aligned in the context of an empty state. And, they should be right-aligned inside container components such as dialogs, popovers, or cards."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "The order of button priority should match the alignment of surrounding text. When text is left-aligned, buttons should be arranged so that the leftmost button is the most critical. When text is right- or center- aligned, the most critical action should be the furthest right."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "Not all buttons in a group require an icon, but buttons with icons should always be of a higher priority than ones without icons. If the most critical action in a group doesn’t have an icon, don’t use icons in the remaining lower-level actions."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "Instead of a single split button (now a deprecated component), use a button group to show any additional actions related to the most critical action."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"options": {
|
|
59
|
+
"orientation": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"default": "horizontal",
|
|
62
|
+
"values": [
|
|
63
|
+
{
|
|
64
|
+
"value": "horizontal"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"value": "vertical"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"size": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^(x?s|m|x{0,3}l)$",
|
|
74
|
+
"default": "m",
|
|
75
|
+
"values": [
|
|
76
|
+
{
|
|
77
|
+
"value": "s"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": "m"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "l"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"value": "xl"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"overflowMode": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"default": "wrap",
|
|
93
|
+
"values": [
|
|
94
|
+
{
|
|
95
|
+
"value": "wrap"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"value": "collapse"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"isDisabled": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"default": false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"lifecycle": {
|
|
108
|
+
"introduced": "1.0.0-draft"
|
|
109
|
+
},
|
|
110
|
+
"accessibility": {
|
|
111
|
+
"role": "group",
|
|
112
|
+
"intents": ["trigger"],
|
|
113
|
+
"focusable": false,
|
|
114
|
+
"wcag": [
|
|
115
|
+
{
|
|
116
|
+
"criterion": "4.1.2",
|
|
117
|
+
"level": "A",
|
|
118
|
+
"title": "Name, Role, Value"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
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/button.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "button",
|
|
6
|
+
"displayName": "Button",
|
|
7
|
+
"description": "Buttons allow users to perform an action or to navigate to another page.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "actions",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/button/"
|
|
11
|
+
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "Button",
|
|
16
|
+
"package": "@spectrum-web-components/button",
|
|
17
|
+
"notes": "Spectrum Web Components custom element: sp-button."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"platform": "web",
|
|
21
|
+
"componentName": "Button",
|
|
22
|
+
"package": "@react-spectrum/button"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"documentBlocks": [
|
|
26
|
+
{
|
|
27
|
+
"type": "purpose",
|
|
28
|
+
"content": "Buttons enable actions or navigation between views. They come in multiple styles to support different levels of emphasis, and are commonly used to guide progression through a flow."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "guideline",
|
|
32
|
+
"content": "Keyboard focus.\n\nA 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."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "guideline",
|
|
36
|
+
"content": "Tooltip when the label is hidden.\n\nWhen the button label is hidden, a tooltip is shown on hover that displays the label text and, if appropriate, a keyboard shortcut."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "guideline",
|
|
40
|
+
"content": "Flexible width.\n\nThe width of a button automatically adjusts to fit the label text. The padding on each side of the button is equal to half its height."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "guideline",
|
|
44
|
+
"content": "Minimum width.\n\nButtons have a minimum width of 2.25× the height of the button. This ensures that small buttons retain an identifiable shape."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "guideline",
|
|
48
|
+
"content": "Text overflow.\n\nWhen the button text is too long for the horizontal space available, it wraps to form another line."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "guideline",
|
|
52
|
+
"content": "Cursor style.\n\nButtons use the default arrow cursor for all states, including hover and down. The only exception occurs on the web; if the button is using the href property it will display the pointer cursor instead."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "guideline",
|
|
56
|
+
"content": "Delay before pending state.\n\nSome progress can be very quick. In order to avoid showing a progress circle for a fraction of a second, which results in an unpleasant flickering, there is a delay of 1 second before the pending state appears. During this delay, the button continues to visually respond to interactive events (e.g., hover), but additional clicks do not result in repeated submissions."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "guideline",
|
|
60
|
+
"content": "Use icons only when necessary.\n\nIcons can be used in buttons when additional clarity is required and the icon is highly relevant to the action. Icons should not be used for decoration."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "do-dont",
|
|
64
|
+
"content": "Don't override color",
|
|
65
|
+
"dont": "Do not use custom colors for buttons. The colors of different button variations have been designed to be consistent and accessible."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "guideline",
|
|
69
|
+
"content": "When to use static black and static white.\n\nTo ensure maximum contrast with the background, use static black for light backgrounds and images, and use static white for dark backgrounds and images. Avoid placing static components on top of busy images with a lot of variance in contrast."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "do-dont",
|
|
73
|
+
"content": "Don't use the pending state for long progress",
|
|
74
|
+
"dont": "The pending state should be reserved for indeterminate actions that are expected to take 5 seconds or less. For determinate or longer actions, use a [progress bar](https://spectrum.adobe.com/page/progress-bar/) or [progress circle](https://spectrum.adobe.com/page/progress-circle/) outside of the button."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "guideline",
|
|
78
|
+
"content": "Use a button group to show additional actions.\n\nInstead of a single split button (now a deprecated component), use a [button group](https://spectrum.adobe.com/page/button-group/) to show any additional actions related to the most critical action."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "guideline",
|
|
82
|
+
"content": "Display a popover when featuring subsequent options.\n\nIn some instances, it's possible to have a call to action button display a popover (or tray) to feature subsequent options. These options should extend and parallel the action of the button. Do not include arbitrary or unrelated options."
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"options": {
|
|
86
|
+
"variant": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"default": "accent",
|
|
89
|
+
"description": "Visual emphasis level.",
|
|
90
|
+
"values": [
|
|
91
|
+
{
|
|
92
|
+
"value": "accent"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"value": "negative"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"value": "primary"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"value": "secondary"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"style": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"default": "fill",
|
|
108
|
+
"values": [
|
|
109
|
+
{
|
|
110
|
+
"value": "fill"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"value": "outline"
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"size": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"default": "m",
|
|
120
|
+
"values": [
|
|
121
|
+
{
|
|
122
|
+
"value": "s"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"value": "m"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"value": "l"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"value": "xl"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"isDisabled": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"default": false
|
|
138
|
+
},
|
|
139
|
+
"isPending": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"default": false
|
|
142
|
+
},
|
|
143
|
+
"isLabelHidden": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"default": false
|
|
146
|
+
},
|
|
147
|
+
"icon": {
|
|
148
|
+
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
|
|
149
|
+
"description": "Icon placed at the start of the button. Required when isLabelHidden is true."
|
|
150
|
+
},
|
|
151
|
+
"staticColor": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "Static color for use on colored backgrounds.",
|
|
154
|
+
"values": [
|
|
155
|
+
{
|
|
156
|
+
"value": "white"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"value": "black"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"slots": [
|
|
165
|
+
{
|
|
166
|
+
"name": "default",
|
|
167
|
+
"description": "Text label of the button.",
|
|
168
|
+
"required": false
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "icon",
|
|
172
|
+
"description": "Icon placed at the start of the button."
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"anatomy": [
|
|
176
|
+
{
|
|
177
|
+
"name": "icon",
|
|
178
|
+
"description": "Leading icon."
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "label",
|
|
182
|
+
"description": "Button text.",
|
|
183
|
+
"required": true
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"states": [
|
|
187
|
+
{
|
|
188
|
+
"name": "hover",
|
|
189
|
+
"trigger": "interaction",
|
|
190
|
+
"precedence": 50
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "focus",
|
|
194
|
+
"trigger": "interaction",
|
|
195
|
+
"precedence": 60,
|
|
196
|
+
"layered": true
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "disabled",
|
|
200
|
+
"trigger": "prop",
|
|
201
|
+
"precedence": 100
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"lifecycle": {
|
|
205
|
+
"introduced": "1.0.0-draft"
|
|
206
|
+
},
|
|
207
|
+
"tokenBindings": [
|
|
208
|
+
{
|
|
209
|
+
"token": "corner-radius-button-small",
|
|
210
|
+
"context": "Rounding (with wrapping)"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"token": "corner-radius-button-large",
|
|
214
|
+
"context": "Rounding (with wrapping)"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"token": "corner-radius-button-extra-large",
|
|
218
|
+
"context": "Rounding (with wrapping)"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"accessibility": {
|
|
222
|
+
"role": "button",
|
|
223
|
+
"intents": ["trigger"],
|
|
224
|
+
"focusable": true,
|
|
225
|
+
"keyboardIntents": ["activate"],
|
|
226
|
+
"wcag": [
|
|
227
|
+
{
|
|
228
|
+
"criterion": "2.1.1",
|
|
229
|
+
"level": "A",
|
|
230
|
+
"title": "Keyboard"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"criterion": "4.1.2",
|
|
234
|
+
"level": "A",
|
|
235
|
+
"title": "Name, Role, Value"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
}
|