@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,167 @@
|
|
|
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/action-button.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "action-button",
|
|
6
|
+
"displayName": "Action button",
|
|
7
|
+
"description": "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.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "actions",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/action-button/"
|
|
11
|
+
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "ActionButton",
|
|
16
|
+
"package": "@spectrum-web-components/action-button",
|
|
17
|
+
"notes": "Spectrum Web Components custom element: sp-action-button."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"platform": "web",
|
|
21
|
+
"componentName": "ActionButton",
|
|
22
|
+
"package": "@react-spectrum/button"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"documentBlocks": [
|
|
26
|
+
{
|
|
27
|
+
"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."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "guideline",
|
|
32
|
+
"content": "Text overflow.\n\nWhen the action button text is too long for the available horizontal space, it truncates at the end. The full text should be revealed with a tooltip on hover."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"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."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "guideline",
|
|
40
|
+
"content": "Use tooltips.\n\nIcon-only action buttons can be hard to identify. They should always show a tooltip upon hovering for a short period of time, displaying the name and possibly a keyboard shortcut."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"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."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "guideline",
|
|
48
|
+
"content": "Only group related actions with a hold icon.\n\nWhen using a hold icon to switch actions, only group the actions that are part of the same family. Don't group unrelated actions just for the sake of saving space."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "guideline",
|
|
52
|
+
"content": "Respect hold icon placement.\n\nIn left-to-right interfaces, the hold icon is always in the bottom right corner of the action button. It's a symbolic indicator that shows that a popover menu will appear on hold. Don't change the placement of the hold icon based on the design of the interface."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "guideline",
|
|
56
|
+
"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."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"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."
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"options": {
|
|
64
|
+
"label": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"hideLabel": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
71
|
+
"icon": {
|
|
72
|
+
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
|
|
73
|
+
"description": "Icon must be present if the label is not defined."
|
|
74
|
+
},
|
|
75
|
+
"size": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"default": "m",
|
|
78
|
+
"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
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
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
|
+
},
|
|
108
|
+
"staticColor": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"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
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"selectedTextColor": {
|
|
121
|
+
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/hex-color.json"
|
|
122
|
+
},
|
|
123
|
+
"hasHoldIcon": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"default": false
|
|
126
|
+
},
|
|
127
|
+
"isDisabled": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"default": false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"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
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"lifecycle": {
|
|
147
|
+
"introduced": "1.0.0-draft"
|
|
148
|
+
},
|
|
149
|
+
"accessibility": {
|
|
150
|
+
"role": "button",
|
|
151
|
+
"intents": ["trigger"],
|
|
152
|
+
"focusable": true,
|
|
153
|
+
"keyboardIntents": ["activate"],
|
|
154
|
+
"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
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
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/action-group.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "action-group",
|
|
6
|
+
"displayName": "Action group",
|
|
7
|
+
"description": "An action group is a grouping of action buttons that are related to each other.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "actions",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/action-group/"
|
|
11
|
+
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "An action group is a grouping of action buttons that are related to each other."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"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."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "When selection is enabled, an action group's selection behavior can be set to allow for an empty selection, or not."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "When selection is enabled, an action group can allow for single or multiple selection of action buttons."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "By default, selection is not enabled in an action group. This is used for action groups that offer direct actions, rather than toggling."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"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)."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"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."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"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."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"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."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"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."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"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."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"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."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "guideline",
|
|
63
|
+
"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."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "guideline",
|
|
67
|
+
"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."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "guideline",
|
|
71
|
+
"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."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "guideline",
|
|
75
|
+
"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."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "guideline",
|
|
79
|
+
"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."
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"options": {
|
|
83
|
+
"orientation": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"default": "horizontal",
|
|
86
|
+
"values": [
|
|
87
|
+
{
|
|
88
|
+
"value": "horizontal"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"value": "vertical"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"size": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"default": "m",
|
|
98
|
+
"values": [
|
|
99
|
+
{
|
|
100
|
+
"value": "s"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"value": "m"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"value": "l"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"value": "xl"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"density": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"default": "regular",
|
|
116
|
+
"values": [
|
|
117
|
+
{
|
|
118
|
+
"value": "regular"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "compact"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"isJustified": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"default": false
|
|
128
|
+
},
|
|
129
|
+
"isQuiet": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"default": false
|
|
132
|
+
},
|
|
133
|
+
"isEmphasized": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"default": false
|
|
136
|
+
},
|
|
137
|
+
"enableSelection": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"default": false
|
|
140
|
+
},
|
|
141
|
+
"selectionMode": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"default": "single",
|
|
144
|
+
"description": "Only applicable if selection is enabled",
|
|
145
|
+
"values": [
|
|
146
|
+
{
|
|
147
|
+
"value": "single"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"value": "multiple"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"allowsEmptySelection": {
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"default": false,
|
|
157
|
+
"description": "Only applicable if selection is enabled"
|
|
158
|
+
},
|
|
159
|
+
"overflowMode": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"default": "wrap",
|
|
162
|
+
"values": [
|
|
163
|
+
{
|
|
164
|
+
"value": "wrap"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"value": "collapse"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"isDisabled": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"default": false
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"lifecycle": {
|
|
177
|
+
"introduced": "1.0.0-draft"
|
|
178
|
+
},
|
|
179
|
+
"accessibility": {
|
|
180
|
+
"intents": ["trigger"],
|
|
181
|
+
"focusable": false,
|
|
182
|
+
"wcag": [
|
|
183
|
+
{
|
|
184
|
+
"criterion": "2.1.1",
|
|
185
|
+
"level": "A",
|
|
186
|
+
"title": "Keyboard"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
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/alert-banner.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "alert-banner",
|
|
6
|
+
"displayName": "Alert banner",
|
|
7
|
+
"description": "Alert banners show pressing and high-signal messages, such as system alerts. They're meant to be noticed and prompt users to take action.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "feedback",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/alert-banner/"
|
|
11
|
+
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "Alert banners show pressing and high-signal messages, such as system alerts. They're meant to be noticed and prompt users to take action."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Alert banners communicate high-priority messages that need immediate attention. They appear prominently in the interface and often prompt an action."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "An alert banner can include an icon-only close button to dismiss it."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "An alert banner ideally provides a way for a user to address an issue in-line with an action. It can have both an icon-only close button and a button with a contextual action to take. There should never be more than one button with a contextual action in an alert banner."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "An alert banner always has a semantic meaning and uses semantic colors. Only gray (neutral), blue (informative), and red (negative) are available as options."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "Text is required for all alert banners. The message should be concise and, if applicable, describe the next step that a user can take."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "When the text is too long for the available horizontal space, it wraps to form another line. In actionable alert banners, the button moves below the text prior to text wrapping."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "Whenever possible, add an in-line action button if there's a way for a user to quickly address the issue associated with an alert."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "The close button is optional, depending on context. Consider adding one to let a user easily dismiss the alert."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "Alert banners should be reserved only for high-signal, system-level alert messages, such as internet connection issues, expirations of subscriptions, or major changes."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "Don’t use yellow or orange colors for errors because the contrast is not accessible."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"content": "If you need to show a “notice” message or other non-critical communication, use the gray (neutral) or blue (informative) semantic color options. Reserve the red (negative) option only for errors that directly interrupt or block a user’s experience — not for nice-to-know information."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "guideline",
|
|
63
|
+
"content": "Don't include more than one action in an alert banner. Having more than one action to choose from can be overwhelming, and it can become difficult for users to decide what to do next in such a small space."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "guideline",
|
|
67
|
+
"content": "Alert banners should appear at the top of a page, below the header."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "guideline",
|
|
71
|
+
"content": "Don't show multiple alert banners at the same time. If a new alert banner appears with a higher priority message, it should replace an existing alert banner of lesser importance until the higher priority one has been addressed."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "guideline",
|
|
75
|
+
"content": "Overlay an alert banner when it's expected to fade in and out without impacting the content underneath it, and when it's not hiding any important actions or information by being there. An alert banner should only overlay content if it is dismissible."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "guideline",
|
|
79
|
+
"content": "Push an alert banner when it's expected to stay in place, when it's not dismissible, or when no information should be hidden from the view."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "guideline",
|
|
83
|
+
"content": "If a user dismisses an alert banner without addressing an error that needs to be resolved, it should come back into view at the next possible occasion."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "guideline",
|
|
87
|
+
"content": "Never allow alert banners to time out. Since these are system-level messages, they should not dismiss on their own unless there is a change in the system that resolves an issue (e.g., regaining internet connectivity after losing it)."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "guideline",
|
|
91
|
+
"content": "When used in the app frame, the alert banner appears above the Top App Bar (TAB) and header, or above the header if the TAB isn’t active."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "guideline",
|
|
95
|
+
"content": "Learn more about how the Top App Bar (TAB) works in the app frame."
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"options": {
|
|
99
|
+
"text": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"variant": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"default": "neutral",
|
|
105
|
+
"values": [
|
|
106
|
+
{
|
|
107
|
+
"value": "neutral"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"value": "informative"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"value": "negative"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": "accent"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"actionLabel": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "If undefined, this button does not appear."
|
|
123
|
+
},
|
|
124
|
+
"isDismissible": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": false
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"anatomy": [
|
|
130
|
+
{
|
|
131
|
+
"name": "alert-icon",
|
|
132
|
+
"description": "Icon indicating the alert's severity."
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"lifecycle": {
|
|
136
|
+
"introduced": "1.0.0-draft"
|
|
137
|
+
},
|
|
138
|
+
"accessibility": {
|
|
139
|
+
"focusable": false,
|
|
140
|
+
"wcag": [
|
|
141
|
+
{
|
|
142
|
+
"criterion": "4.1.3",
|
|
143
|
+
"level": "AA",
|
|
144
|
+
"title": "Status Messages"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
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/alert-dialog.json",
|
|
4
|
+
"specVersion": "1.0.0-draft",
|
|
5
|
+
"name": "alert-dialog",
|
|
6
|
+
"displayName": "Alert dialog",
|
|
7
|
+
"description": "Alert dialogs display important information that users need to acknowledge. They appear over the interface and block further interactions until an action is selected.",
|
|
8
|
+
"meta": {
|
|
9
|
+
"category": "feedback",
|
|
10
|
+
"documentationUrl": "https://spectrum.adobe.com/page/alert-dialog/"
|
|
11
|
+
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "Alert dialogs display important information that users need to acknowledge. They appear over the interface and block further interactions until an action is selected."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Alert dialogs present critical information that must be acknowledged. They appear over the interface and block further interaction until an action is selected."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "By default, an alert dialog that includes a button to cancel or go back will be labeled “Cancel.”"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Alert dialogs can include up to three buttons if a secondary outline button label is defined. If no label is defined, the button won’t appear. The secondary outline button should use a short, actionable phrase that clearly communicates the result of selecting the action—typically describing the previous step or an alternative choice."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "An alert dialog must include at least one button. The primary action label refers to the rightmost button in the dialog footer for languages that read left to right. It should use a short, actionable phrase that clearly communicates the result of selecting the action—whether that means moving forward or dismissing the dialog."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "Use the appropriate variant based on the context of the message:"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Alert dialogs should include a description when available. The description briefly communicates any additional information or context a user needs to make a decision based on the options presented."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "All alert dialogs must have a title. The title appears at the top of the dialog and uses a few words to convey the outcome of what will happen if a user continues with the primary action."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "When the title and description text are too long for the available horizontal space, they wrap to form another line."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "Alert dialogs can include up to three buttons. When horizontal space is limited, the buttons stack vertically. Buttons should be ordered by ascending importance, with the most critical action placed at the end or bottom of the stack."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "Alert dialogs are interruptive, so they should be reserved for important information that users must acknowledge before continuing a task or workflow. Use them only when absolutely necessary—not for low-priority notifications or excessive confirmations."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"content": "Alert dialogs are designed to pause the experience until a decision is made, so only one should appear at a time. Avoid opening an alert dialog from within another. If a situation seems to require a sequence of decisions, consider using a different design pattern."
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"options": {
|
|
63
|
+
"title": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"description": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"variant": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"default": "confirmation",
|
|
72
|
+
"values": [
|
|
73
|
+
{
|
|
74
|
+
"value": "confirmation"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"value": "information"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": "warning"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "destructive"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"value": "error"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"primaryActionLabel": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"secondaryActionLabel": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "If undefined, this button does not appear."
|
|
96
|
+
},
|
|
97
|
+
"cancelActionLabel": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"default": "cancel",
|
|
100
|
+
"description": "If undefined, this button does not appear."
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"lifecycle": {
|
|
104
|
+
"introduced": "1.0.0-draft"
|
|
105
|
+
},
|
|
106
|
+
"accessibility": {
|
|
107
|
+
"role": "dialog",
|
|
108
|
+
"intents": ["dismiss"],
|
|
109
|
+
"focusable": false,
|
|
110
|
+
"keyboardIntents": ["dismiss"],
|
|
111
|
+
"wcag": [
|
|
112
|
+
{
|
|
113
|
+
"criterion": "2.4.3",
|
|
114
|
+
"level": "A",
|
|
115
|
+
"title": "Focus Order"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"criterion": "4.1.2",
|
|
119
|
+
"level": "A",
|
|
120
|
+
"title": "Name, Role, Value"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|