@adobe/spectrum-design-data 3.3.0 → 3.5.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 (122) 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/llms.txt +27 -0
  121. package/package.json +3 -2
  122. package/tokens/layout.tokens.json +88 -0
@@ -9,19 +9,6 @@
9
9
  "category": "actions",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/close-button/"
11
11
  },
12
- "implementations": [
13
- {
14
- "platform": "web",
15
- "componentName": "CloseButton",
16
- "package": "@react-spectrum/s2"
17
- },
18
- {
19
- "platform": "web",
20
- "componentName": "CloseButton",
21
- "importPath": "@adobe/spectrum-wc/components/close-button",
22
- "notes": "Spectrum 2 web component custom element: swc-close-button."
23
- }
24
- ],
25
12
  "documentBlocks": [
26
13
  {
27
14
  "type": "purpose",
@@ -29,27 +16,37 @@
29
16
  },
30
17
  {
31
18
  "type": "guideline",
32
- "content": "A close button in a disabled state shows that an action exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action may become available later."
19
+ "content": "Keyboard focus.\n\nA close button can be navigated using a keyboard. The keyboard focus state takes the close button's visual hover state and adds a ring to the button in focus."
33
20
  },
34
21
  {
35
- "type": "guideline",
36
- "content": "Use this option when a close button needs to be placed on top of a color background or visual. Static color close buttons are available in black or white, regardless of color theme."
22
+ "type": "do-dont",
23
+ "content": "Don't use close buttons for delete actions",
24
+ "dont": "A close button is only for dismissing or closing its parent component, not for taking a destructive action (like deleting a file). Use an action button instead."
37
25
  },
38
26
  {
39
27
  "type": "guideline",
40
- "content": "Use static black on light color or image backgrounds, and static white on dark color or image backgrounds, regardless of color theme. Make sure that the background and the close button color meet the minimum color contrast ratio."
28
+ "content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the close button. Space or Enter Executes the button (closes or dismisses the parent component). Focus moves to the target or back to the caller."
41
29
  },
42
30
  {
43
31
  "type": "guideline",
44
- "content": "The icon inside of the close button comes in two options: regular and large. These scale up and down for each close button size. This is a cross UI icon, not a workflow icon or the letter “x.”"
32
+ "content": "Cursor guidelines.\n\nCursor Description Pointer Use the pointer cursor for all interactive components in every state."
45
33
  },
46
34
  {
47
35
  "type": "guideline",
48
- "content": "Close buttons 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."
36
+ "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—including the close icon—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 Close buttons should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role of buttons should be utilized. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. 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."
37
+ }
38
+ ],
39
+ "implementations": [
40
+ {
41
+ "platform": "web",
42
+ "componentName": "CloseButton",
43
+ "package": "@react-spectrum/s2"
49
44
  },
50
45
  {
51
- "type": "guideline",
52
- "content": "A close button can be navigated using a keyboard. The keyboard focus state takes the close button’s visual hover state and adds a ring to the button in focus."
46
+ "platform": "web",
47
+ "componentName": "CloseButton",
48
+ "importPath": "@adobe/spectrum-wc/components/close-button",
49
+ "notes": "Spectrum 2 web component custom element: swc-close-button."
53
50
  }
54
51
  ],
55
52
  "options": {
@@ -57,73 +54,34 @@
57
54
  "type": "string",
58
55
  "default": "m",
59
56
  "values": [
60
- {
61
- "value": "s"
62
- },
63
- {
64
- "value": "m"
65
- },
66
- {
67
- "value": "l"
68
- },
69
- {
70
- "value": "xl"
71
- }
57
+ { "value": "s" },
58
+ { "value": "m" },
59
+ { "value": "l" },
60
+ { "value": "xl" }
72
61
  ]
73
62
  },
74
- "iconSize": {
75
- "type": "string"
76
- },
63
+ "iconSize": { "type": "string" },
77
64
  "staticColor": {
78
65
  "type": "string",
79
66
  "description": "Static color must not be set for the default version of this component.",
80
- "values": [
81
- {
82
- "value": "white"
83
- },
84
- {
85
- "value": "black"
86
- }
87
- ]
67
+ "values": [{ "value": "white" }, { "value": "black" }]
88
68
  },
89
- "isDisabled": {
90
- "type": "boolean",
91
- "default": false
92
- }
69
+ "isDisabled": { "type": "boolean", "default": false }
93
70
  },
94
71
  "states": [
95
- {
96
- "name": "hover",
97
- "trigger": "interaction"
98
- },
99
- {
100
- "name": "down",
101
- "trigger": "interaction"
102
- },
103
- {
104
- "name": "keyboard-focus",
105
- "trigger": "interaction"
106
- }
72
+ { "name": "hover", "trigger": "interaction" },
73
+ { "name": "down", "trigger": "interaction" },
74
+ { "name": "keyboard-focus", "trigger": "interaction" }
107
75
  ],
108
- "lifecycle": {
109
- "introduced": "1.0.0-draft"
110
- },
76
+ "lifecycle": { "introduced": "1.0.0-draft" },
111
77
  "accessibility": {
112
78
  "role": "button",
113
79
  "intents": ["dismiss"],
114
80
  "focusable": true,
115
81
  "keyboardIntents": ["activate"],
116
82
  "wcag": [
117
- {
118
- "criterion": "2.1.1",
119
- "level": "A",
120
- "title": "Keyboard"
121
- },
122
- {
123
- "criterion": "4.1.2",
124
- "level": "A",
125
- "title": "Name, Role, Value"
126
- }
83
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
84
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
127
85
  ]
128
86
  }
129
87
  }
@@ -55,55 +55,25 @@
55
55
  "cornerRounding": {
56
56
  "type": "string",
57
57
  "values": [
58
- {
59
- "value": "none"
60
- },
61
- {
62
- "value": "corner-radius-75"
63
- },
64
- {
65
- "value": "corner-radius-100"
66
- },
67
- {
68
- "value": "corner-radius-200"
69
- },
70
- {
71
- "value": "corner-radius-300"
72
- },
73
- {
74
- "value": "corner-radius-400"
75
- },
76
- {
77
- "value": "corner-radius-500"
78
- },
79
- {
80
- "value": "corner-radius-600"
81
- },
82
- {
83
- "value": "corner-radius-700"
84
- },
85
- {
86
- "value": "corner-radius-800"
87
- },
88
- {
89
- "value": "full"
90
- }
58
+ { "value": "none" },
59
+ { "value": "corner-radius-75" },
60
+ { "value": "corner-radius-100" },
61
+ { "value": "corner-radius-200" },
62
+ { "value": "corner-radius-300" },
63
+ { "value": "corner-radius-400" },
64
+ { "value": "corner-radius-500" },
65
+ { "value": "corner-radius-600" },
66
+ { "value": "corner-radius-700" },
67
+ { "value": "corner-radius-800" },
68
+ { "value": "full" }
91
69
  ]
92
70
  },
93
71
  "staticColor": {
94
72
  "type": "string",
95
73
  "description": "If not set to white, the coach indicator uses the default color.",
96
- "values": [
97
- {
98
- "value": "white"
99
- }
100
- ]
74
+ "values": [{ "value": "white" }]
101
75
  }
102
76
  },
103
- "lifecycle": {
104
- "introduced": "1.0.0-draft"
105
- },
106
- "accessibility": {
107
- "focusable": false
108
- }
77
+ "lifecycle": { "introduced": "1.0.0-draft" },
78
+ "accessibility": { "focusable": false }
109
79
  }
@@ -76,12 +76,8 @@
76
76
  }
77
77
  ],
78
78
  "options": {
79
- "title": {
80
- "type": "string"
81
- },
82
- "description": {
83
- "type": "string"
84
- },
79
+ "title": { "type": "string" },
80
+ "description": { "type": "string" },
85
81
  "hideImage": {
86
82
  "type": "boolean",
87
83
  "default": false,
@@ -120,32 +116,18 @@
120
116
  "name": "pagination-text",
121
117
  "description": "Text indicating step position (e.g. '2 of 5')."
122
118
  },
123
- {
124
- "name": "body"
125
- },
126
- {
127
- "name": "media"
128
- },
129
- {
130
- "name": "pagination"
131
- },
132
- {
133
- "name": "title"
134
- }
119
+ { "name": "body" },
120
+ { "name": "media" },
121
+ { "name": "pagination" },
122
+ { "name": "title" }
135
123
  ],
136
- "lifecycle": {
137
- "introduced": "1.0.0-draft"
138
- },
124
+ "lifecycle": { "introduced": "1.0.0-draft" },
139
125
  "accessibility": {
140
126
  "intents": ["dismiss"],
141
127
  "focusable": true,
142
128
  "keyboardIntents": ["dismiss"],
143
129
  "wcag": [
144
- {
145
- "criterion": "4.1.2",
146
- "level": "A",
147
- "title": "Name, Role, Value"
148
- }
130
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
149
131
  ]
150
132
  }
151
133
  }
@@ -23,47 +23,23 @@
23
23
  },
24
24
  {
25
25
  "type": "guideline",
26
- "content": "A color area enables visual selection of two color properties at once. It's often paired with a color slider or color wheel."
26
+ "content": "Keyboard focus.\n\nA color area can be navigated using a keyboard. The keyboard focus state enlarges the handle to become twice as large."
27
27
  },
28
28
  {
29
29
  "type": "guideline",
30
- "content": "A color area in a disabled state shows that an input exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that the area may become available later."
30
+ "content": "Handle behavior.\n\nThe color area's handle can slide all the way over the edge of the area. It always displays the selected color inside the handle and never gets cut off by the border or any container."
31
31
  },
32
32
  {
33
33
  "type": "guideline",
34
- "content": "A color area’s height and width can be customized appropriately for its context."
34
+ "content": "Minimum width and height.\n\nMinimum sizing ensures that the component remains clear, usable, and visually consistent, even in flexible or responsive layouts."
35
35
  },
36
36
  {
37
37
  "type": "guideline",
38
- "content": "The step refers to the increment by which these values increase or decrease. A step value of 1 (default) allows a user to only select whole numbers within the min and max range."
38
+ "content": "Display color selection.\n\nWhen using color areas, it's important to clearly display the color selection in real time. This can be in a color swatch, directly on the canvas, or both."
39
39
  },
40
40
  {
41
41
  "type": "guideline",
42
- "content": "The x and y values are the numbers selected within the color area’s horizontal and vertical axes, respectively."
43
- },
44
- {
45
- "type": "guideline",
46
- "content": "The x/y min and max values also can be customized appropriately for what the color area is being used for. By default, the min value starts at 0 and max value is set to 100."
47
- },
48
- {
49
- "type": "guideline",
50
- "content": "A color area can be navigated using a keyboard. The keyboard focus state enlarges the handle to become twice as large."
51
- },
52
- {
53
- "type": "guideline",
54
- "content": "The color area’s handle can slide all the way over the edge of the area. It always displays the selected color inside the handle and never gets cut off by the border or any container."
55
- },
56
- {
57
- "type": "guideline",
58
- "content": "Minimum sizing ensures that the component remains clear, usable, and visually consistent, even in flexible or responsive layouts."
59
- },
60
- {
61
- "type": "guideline",
62
- "content": "When using color areas, it’s important to clearly display the color selection in real time. This can be in a color swatch, directly on the canvas, or both."
63
- },
64
- {
65
- "type": "guideline",
66
- "content": "The color loupe component can be used above the handle to show the selected color that would otherwise be covered by a mouse, stylus, or finger on the down/touch state. This can be customized to appear only on finger-input, or always appear regardless of input type."
42
+ "content": "Color loupe on down/touch states.\n\nThe color loupe component can be used above the handle to show the selected color that would otherwise be covered by a mouse, stylus, or finger on the down/touch state. This can be customized to appear only on finger-input, or always appear regardless of input type."
67
43
  }
68
44
  ],
69
45
  "options": {
@@ -75,83 +51,34 @@
75
51
  "type": "number",
76
52
  "description": "Number (from x-minValue to x-maxValue)"
77
53
  },
78
- "x-minValue": {
79
- "type": "number",
80
- "default": 0
81
- },
82
- "x-maxValue": {
83
- "type": "number",
84
- "default": 100
85
- },
54
+ "x-minValue": { "type": "number", "default": 0 },
55
+ "x-maxValue": { "type": "number", "default": 100 },
86
56
  "y-value": {
87
57
  "type": "number",
88
58
  "description": "Number (from y-minValue to y-maxValue)"
89
59
  },
90
- "y-minValue": {
91
- "type": "number",
92
- "default": 0
93
- },
94
- "y-maxValue": {
95
- "type": "number",
96
- "default": 100
97
- },
98
- "step": {
99
- "type": "number",
100
- "default": 1
101
- },
102
- "width": {
103
- "type": "number",
104
- "default": 192,
105
- "description": "units: px"
106
- },
107
- "height": {
108
- "type": "number",
109
- "default": 192,
110
- "description": "units: px"
111
- },
112
- "isDisabled": {
113
- "type": "boolean",
114
- "default": false
115
- }
60
+ "y-minValue": { "type": "number", "default": 0 },
61
+ "y-maxValue": { "type": "number", "default": 100 },
62
+ "step": { "type": "number", "default": 1 },
63
+ "width": { "type": "number", "default": 192, "description": "units: px" },
64
+ "height": { "type": "number", "default": 192, "description": "units: px" },
65
+ "isDisabled": { "type": "boolean", "default": false }
116
66
  },
117
67
  "states": [
118
- {
119
- "name": "hover",
120
- "trigger": "interaction"
121
- },
122
- {
123
- "name": "down",
124
- "trigger": "interaction"
125
- },
126
- {
127
- "name": "keyboard-focus",
128
- "trigger": "interaction"
129
- }
68
+ { "name": "hover", "trigger": "interaction" },
69
+ { "name": "down", "trigger": "interaction" },
70
+ { "name": "keyboard-focus", "trigger": "interaction" }
130
71
  ],
131
- "lifecycle": {
132
- "introduced": "1.0.0-draft"
133
- },
72
+ "lifecycle": { "introduced": "1.0.0-draft" },
134
73
  "accessibility": {
135
74
  "role": "slider",
136
75
  "intents": ["choose"],
137
76
  "focusable": true,
138
77
  "keyboardIntents": ["increment", "decrement"],
139
78
  "wcag": [
140
- {
141
- "criterion": "1.3.1",
142
- "level": "A",
143
- "title": "Info and Relationships"
144
- },
145
- {
146
- "criterion": "2.1.1",
147
- "level": "A",
148
- "title": "Keyboard"
149
- },
150
- {
151
- "criterion": "4.1.2",
152
- "level": "A",
153
- "title": "Name, Role, Value"
154
- }
79
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
80
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
81
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
155
82
  ]
156
83
  }
157
84
  }
@@ -20,7 +20,7 @@
20
20
  "documentBlocks": [
21
21
  {
22
22
  "type": "purpose",
23
- "content": "Color handles select or adjust a color value along a track or wheel. The outer border is not included in the handle's size."
23
+ "content": "Color handles allow users to select and adjust colors in a color picker."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
@@ -28,11 +28,23 @@
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "Transparent colors.\n\nWhen using transparent colors, the handle displays an opacity checkerboard background to clearly show the level of transparency."
31
+ "content": "Transparent colors.\n\nWhen using transparent colors, the handle and loupe display an opacity checkerboard background to clearly show the level of transparency."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "Keyboard focus.\n\nThe keyboard focus state enlarges the handle to become twice as large."
35
+ "content": "Color loupe.\n\nThe loupe is a floating element positioned above the handle. It provides a preview that reflects the color currently sampled by its parent color component and disappears when the interaction ends."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "Keyboard focus.\n\nThe keyboard focus state enlarges the handle to become twice as large. The loupe is a visual-only element and should not receive focus since it does not provide interactive functionality."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Display combined values.\n\nColor selection usually happens using a variety of input methods (color area, color slider, color wheel). The color loupe should display the final output color: the combined values from multiple color inputs. The number of input methods is determined by the color space (or \"mode\"), for example: 2 controls: HSL using color wheel (hue) and color area (saturation and lightness) 3 controls: RGB using unique color sliders for Red, Green, and Blue 4 controls: RGBa using unique color sliders for Red, Green, Blue, and Alpha"
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "Color loupe on down/touch state.\n\nThe color loupe component can be used above the handle to show the selected color that would otherwise be covered by a cursor, stylus, or finger on the down/touch state. This can be customized to appear only on finger-input, or always appear regardless of input type."
36
48
  }
37
49
  ],
38
50
  "options": {
@@ -41,47 +53,22 @@
41
53
  "default": "hue",
42
54
  "description": "Which channel of the color this handle controls. Use 'alpha' for opacity.",
43
55
  "values": [
44
- {
45
- "value": "hue"
46
- },
47
- {
48
- "value": "saturation"
49
- },
50
- {
51
- "value": "lightness"
52
- },
53
- {
54
- "value": "red"
55
- },
56
- {
57
- "value": "green"
58
- },
59
- {
60
- "value": "blue"
61
- },
62
- {
63
- "value": "alpha"
64
- }
56
+ { "value": "hue" },
57
+ { "value": "saturation" },
58
+ { "value": "lightness" },
59
+ { "value": "red" },
60
+ { "value": "green" },
61
+ { "value": "blue" },
62
+ { "value": "alpha" }
65
63
  ]
66
64
  },
67
- "isDisabled": {
68
- "type": "boolean",
69
- "default": false
70
- }
71
- },
72
- "lifecycle": {
73
- "introduced": "1.0.0-draft"
65
+ "isDisabled": { "type": "boolean", "default": false }
74
66
  },
67
+ "lifecycle": { "introduced": "1.0.0-draft" },
75
68
  "accessibility": {
76
69
  "intents": ["choose"],
77
70
  "focusable": true,
78
71
  "keyboardIntents": ["increment", "decrement"],
79
- "wcag": [
80
- {
81
- "criterion": "2.1.1",
82
- "level": "A",
83
- "title": "Keyboard"
84
- }
85
- ]
72
+ "wcag": [{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" }]
86
73
  }
87
74
  }
@@ -9,14 +9,6 @@
9
9
  "category": "feedback",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/color-loupe/"
11
11
  },
12
- "implementations": [
13
- {
14
- "platform": "web",
15
- "componentName": "ColorLoupe",
16
- "importPath": "@adobe/spectrum-wc/components/color-loupe",
17
- "notes": "Spectrum 2 web component custom element: swc-color-loupe."
18
- }
19
- ],
20
12
  "documentBlocks": [
21
13
  {
22
14
  "type": "purpose",
@@ -24,34 +16,42 @@
24
16
  },
25
17
  {
26
18
  "type": "guideline",
27
- "content": "Color loupe.\n\nThe loupe is a floating element positioned above the handle. It provides a preview that reflects the color currently sampled by its parent color component and disappears when the interaction ends."
19
+ "content": "Handle behavior.\n\nIn the color area and color slider, the handle can slide all the way to the edge of the component. It always displays the selected color inside the handle and never gets cut off by the border or any container."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Transparent colors.\n\nWhen using transparent colors, the handle and loupe display an opacity checkerboard background to clearly show the level of transparency."
28
24
  },
29
25
  {
30
26
  "type": "guideline",
31
- "content": "Transparent colors.\n\nWhen using transparent colors, the loupe displays an opacity checkerboard background to clearly show the level of transparency."
27
+ "content": "Color loupe.\n\nThe loupe is a floating element positioned above the handle. It provides a preview that reflects the color currently sampled by its parent color component and disappears when the interaction ends."
32
28
  },
33
29
  {
34
30
  "type": "guideline",
35
- "content": "Keyboard focus.\n\nThe loupe is a visual-only element and should not receive focus since it does not provide interactive functionality."
31
+ "content": "Keyboard focus.\n\nThe keyboard focus state enlarges the handle to become twice as large. The loupe is a visual-only element and should not receive focus since it does not provide interactive functionality."
36
32
  },
37
33
  {
38
34
  "type": "guideline",
39
- "content": "Display combined values.\n\nColor selection usually happens using a variety of input methods (color area, color slider, color wheel). The color loupe should display the final output color: the combined values from multiple color inputs.\n\nThe number of input methods is determined by the color space (or \"mode\"), for example:\n\n* 2 controls: HSL using color wheel (hue) and color area (saturation and lightness)\n* 3 controls: RGB using unique color sliders for Red, Green, and Blue\n* 4 controls: RGBa using unique color sliders for Red, Green, Blue, and Alpha"
35
+ "content": "Display combined values.\n\nColor selection usually happens using a variety of input methods (color area, color slider, color wheel). The color loupe should display the final output color: the combined values from multiple color inputs. The number of input methods is determined by the color space (or \"mode\"), for example: 2 controls: HSL using color wheel (hue) and color area (saturation and lightness) 3 controls: RGB using unique color sliders for Red, Green, and Blue 4 controls: RGBa using unique color sliders for Red, Green, Blue, and Alpha"
40
36
  },
41
37
  {
42
38
  "type": "guideline",
43
39
  "content": "Color loupe on down/touch state.\n\nThe color loupe component can be used above the handle to show the selected color that would otherwise be covered by a cursor, stylus, or finger on the down/touch state. This can be customized to appear only on finger-input, or always appear regardless of input type."
44
40
  }
45
41
  ],
42
+ "implementations": [
43
+ {
44
+ "platform": "web",
45
+ "componentName": "ColorLoupe",
46
+ "importPath": "@adobe/spectrum-wc/components/color-loupe",
47
+ "notes": "Spectrum 2 web component custom element: swc-color-loupe."
48
+ }
49
+ ],
46
50
  "options": {
47
51
  "value": {
48
52
  "$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/hex-color.json"
49
53
  }
50
54
  },
51
- "lifecycle": {
52
- "introduced": "1.0.0-draft"
53
- },
54
- "accessibility": {
55
- "focusable": false
56
- }
55
+ "lifecycle": { "introduced": "1.0.0-draft" },
56
+ "accessibility": { "focusable": false }
57
57
  }