@adobe/spectrum-component-api-schemas 5.0.1 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +187 -184
  2. package/index.js +28 -12
  3. package/moon.yml +1 -4
  4. package/package.json +6 -5
  5. package/scripts/convert-to-spec-format.mjs +136 -0
  6. package/test/index.test.js +64 -34
  7. package/test/integration.test.js +4 -6
  8. package/test/performance.test.js +10 -10
  9. package/test/schema-validation.test.js +64 -105
  10. package/test/snapshots/index.test.js.md +36 -34
  11. package/schemas/component.json +0 -29
  12. package/schemas/components/accordion.json +0 -74
  13. package/schemas/components/action-bar.json +0 -18
  14. package/schemas/components/action-button.json +0 -62
  15. package/schemas/components/action-group.json +0 -69
  16. package/schemas/components/alert-banner.json +0 -29
  17. package/schemas/components/alert-dialog.json +0 -42
  18. package/schemas/components/avatar-group.json +0 -22
  19. package/schemas/components/avatar.json +0 -45
  20. package/schemas/components/badge.json +0 -69
  21. package/schemas/components/body.json +0 -25
  22. package/schemas/components/bottom-navigation-android.json +0 -37
  23. package/schemas/components/breadcrumbs.json +0 -72
  24. package/schemas/components/button-group.json +0 -33
  25. package/schemas/components/button.json +0 -61
  26. package/schemas/components/calendar.json +0 -109
  27. package/schemas/components/cards.json +0 -238
  28. package/schemas/components/checkbox-group.json +0 -49
  29. package/schemas/components/checkbox.json +0 -49
  30. package/schemas/components/close-button.json +0 -35
  31. package/schemas/components/coach-indicator.json +0 -34
  32. package/schemas/components/coach-mark.json +0 -51
  33. package/schemas/components/code.json +0 -21
  34. package/schemas/components/color-area.json +0 -64
  35. package/schemas/components/color-handle.json +0 -31
  36. package/schemas/components/color-loupe.json +0 -21
  37. package/schemas/components/color-slider.json +0 -66
  38. package/schemas/components/color-wheel.json +0 -47
  39. package/schemas/components/combo-box.json +0 -80
  40. package/schemas/components/contextual-help.json +0 -67
  41. package/schemas/components/date-picker.json +0 -157
  42. package/schemas/components/detail.json +0 -26
  43. package/schemas/components/divider.json +0 -23
  44. package/schemas/components/drop-zone.json +0 -41
  45. package/schemas/components/field-label.json +0 -39
  46. package/schemas/components/heading.json +0 -29
  47. package/schemas/components/help-text.json +0 -36
  48. package/schemas/components/illustrated-message.json +0 -52
  49. package/schemas/components/in-field-progress-button.json +0 -31
  50. package/schemas/components/in-field-progress-circle.json +0 -22
  51. package/schemas/components/in-line-alert.json +0 -43
  52. package/schemas/components/link.json +0 -32
  53. package/schemas/components/list-view.json +0 -106
  54. package/schemas/components/menu.json +0 -63
  55. package/schemas/components/meter.json +0 -44
  56. package/schemas/components/number-field.json +0 -57
  57. package/schemas/components/opacity-checkerboard.json +0 -21
  58. package/schemas/components/picker.json +0 -95
  59. package/schemas/components/popover.json +0 -65
  60. package/schemas/components/progress-bar.json +0 -64
  61. package/schemas/components/progress-circle.json +0 -41
  62. package/schemas/components/radio-button.json +0 -30
  63. package/schemas/components/radio-group.json +0 -58
  64. package/schemas/components/rating.json +0 -34
  65. package/schemas/components/scroll-zoom-bar.json +0 -44
  66. package/schemas/components/search-field.json +0 -58
  67. package/schemas/components/segmented-control.json +0 -72
  68. package/schemas/components/select-box.json +0 -50
  69. package/schemas/components/side-navigation.json +0 -77
  70. package/schemas/components/slider.json +0 -79
  71. package/schemas/components/standard-dialog.json +0 -53
  72. package/schemas/components/standard-panel.json +0 -49
  73. package/schemas/components/status-light.json +0 -51
  74. package/schemas/components/steplist.json +0 -52
  75. package/schemas/components/swatch-group.json +0 -44
  76. package/schemas/components/swatch.json +0 -46
  77. package/schemas/components/switch.json +0 -42
  78. package/schemas/components/tab-bar-ios.json +0 -37
  79. package/schemas/components/table.json +0 -144
  80. package/schemas/components/tabs.json +0 -75
  81. package/schemas/components/tag-field.json +0 -42
  82. package/schemas/components/tag-group.json +0 -31
  83. package/schemas/components/tag.json +0 -41
  84. package/schemas/components/takeover-dialog.json +0 -60
  85. package/schemas/components/text-area.json +0 -92
  86. package/schemas/components/text-field.json +0 -80
  87. package/schemas/components/thumbnail.json +0 -22
  88. package/schemas/components/toast.json +0 -29
  89. package/schemas/components/tooltip.json +0 -50
  90. package/schemas/components/tray.json +0 -17
  91. package/schemas/components/tree-view.json +0 -50
  92. package/schemas/types/hex-color.json +0 -8
  93. package/schemas/types/typography-classification.json +0 -9
  94. package/schemas/types/typography-script.json +0 -9
  95. package/schemas/types/workflow-icon.json +0 -901
  96. package/test/componentSchemaValidator.test.js +0 -74
@@ -1,95 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/picker.json",
4
- "title": "Picker",
5
- "description": "Pickers (sometimes known as \"dropdowns\" or \"selects\") allow users to choose from a list of options in a limited space. The list of options can change based on the context.",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/picker/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "label": {
13
- "type": "string"
14
- },
15
- "labelPosition": {
16
- "type": "string",
17
- "default": "top",
18
- "enum": [
19
- "top",
20
- "side"
21
- ]
22
- },
23
- "placeholder": {
24
- "type": "string"
25
- },
26
- "value": {
27
- "type": "string"
28
- },
29
- "width": {
30
- "type": "number",
31
- "description": "Not applicable to quiet picker."
32
- },
33
- "size": {
34
- "type": "string",
35
- "enum": [
36
- "s",
37
- "m",
38
- "l",
39
- "xl"
40
- ],
41
- "default": "m"
42
- },
43
- "isQuiet": {
44
- "type": "boolean",
45
- "default": false
46
- },
47
- "necessityIndicator": {
48
- "type": "string",
49
- "enum": [
50
- "text",
51
- "icon"
52
- ],
53
- "default": "icon"
54
- },
55
- "isRequired": {
56
- "type": "boolean",
57
- "default": false
58
- },
59
- "menuContainer": {
60
- "type": "string",
61
- "enum": [
62
- "popover",
63
- "tray"
64
- ],
65
- "default": "popover"
66
- },
67
- "isDisabled": {
68
- "type": "boolean",
69
- "default": false
70
- },
71
- "isError": {
72
- "type": "boolean",
73
- "default": false
74
- },
75
- "description": {
76
- "type": "string",
77
- "default": null
78
- },
79
- "errorMessage": {
80
- "type": "string",
81
- "default": null
82
- },
83
- "state": {
84
- "type": "string",
85
- "enum": [
86
- "default",
87
- "hover",
88
- "focus + hover",
89
- "focus + not hover",
90
- "keyboard focus"
91
- ],
92
- "default": "default"
93
- }
94
- }
95
- }
@@ -1,65 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/popover.json",
4
- "title": "Popover",
5
- "description": "Popovers are containers used to display transient content such as menus, options, additional actions, and more. They visually stand out through stroke and drop shadow and float on top of the interface.",
6
- "meta": {
7
- "category": "containers",
8
- "documentationUrl": "https://spectrum.adobe.com/page/popover/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "width": {
13
- "type": "number"
14
- },
15
- "height": {
16
- "type": "number"
17
- },
18
- "hideTip": {
19
- "type": "boolean",
20
- "default": false
21
- },
22
- "placement": {
23
- "type": "string",
24
- "enum": [
25
- "top",
26
- "top left",
27
- "top right",
28
- "top start",
29
- "top end",
30
- "bottom",
31
- "bottom left",
32
- "bottom right",
33
- "bottom start",
34
- "bottom end",
35
- "left",
36
- "left top",
37
- "left bottom",
38
- "start",
39
- "start top",
40
- "start bottom",
41
- "right",
42
- "right top",
43
- "right bottom",
44
- "end",
45
- "end top",
46
- "end bottom"
47
- ],
48
- "default": "top"
49
- },
50
- "offset": {
51
- "type": "number",
52
- "default": 8,
53
- "description": "pixel measurement"
54
- },
55
- "crossOffset": {
56
- "type": "number",
57
- "default": 0
58
- },
59
- "containerPadding": {
60
- "type": "number",
61
- "default": 8,
62
- "description": "pixel measurement"
63
- }
64
- }
65
- }
@@ -1,64 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/progress-bar.json",
4
- "title": "Progress bar",
5
- "description": "Progress bars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way. They can represent either determinate or indeterminate progress.",
6
- "meta": {
7
- "category": "status",
8
- "documentationUrl": "https://spectrum.adobe.com/page/progress-bar/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "variant": {
13
- "type": "string",
14
- "enum": ["default", "over background"],
15
- "default": "default"
16
- },
17
- "staticColor": {
18
- "type": "string",
19
- "enum": ["white"],
20
- "description": "Static color can only be white, otherwise it is default."
21
- },
22
- "label": {
23
- "type": "string"
24
- },
25
- "labelPosition": {
26
- "type": "string",
27
- "enum": ["top", "side"],
28
- "default": "top"
29
- },
30
- "hideLabel": {
31
- "type": "boolean",
32
- "default": false
33
- },
34
- "value": {
35
- "type": "number",
36
- "description": "Not applicable when indeterminate."
37
- },
38
- "minValue": {
39
- "type": "number",
40
- "default": 0,
41
- "description": "Not applicable when indeterminate."
42
- },
43
- "maxValue": {
44
- "type": "number",
45
- "default": 1,
46
- "description": "Not applicable when indeterminate."
47
- },
48
- "valueLabel": {
49
- "type": "string"
50
- },
51
- "width": {
52
- "type": "number"
53
- },
54
- "size": {
55
- "type": "string",
56
- "enum": ["s", "m", "l", "xl"],
57
- "default": "m"
58
- },
59
- "isIndeterminate": {
60
- "type": "boolean",
61
- "default": false
62
- }
63
- }
64
- }
@@ -1,41 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/progress-circle.json",
4
- "title": "Progress circle",
5
- "description": "Progress circles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way. They can represent determinate or indeterminate progress.",
6
- "meta": {
7
- "category": "status",
8
- "documentationUrl": "https://spectrum.adobe.com/page/progress-circle/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "variant": {
13
- "type": "string",
14
- "enum": ["default", "over background"],
15
- "default": "default"
16
- },
17
- "value": {
18
- "type": "number",
19
- "description": "Not applicable when indeterminate."
20
- },
21
- "minValue": {
22
- "type": "number",
23
- "default": 0,
24
- "description": "Not applicable when indeterminate."
25
- },
26
- "maxValue": {
27
- "type": "number",
28
- "default": 1,
29
- "description": "Not applicable when indeterminate."
30
- },
31
- "size": {
32
- "type": "string",
33
- "enum": ["s", "m", "l"],
34
- "default": "m"
35
- },
36
- "isIndeterminate": {
37
- "type": "boolean",
38
- "default": false
39
- }
40
- }
41
- }
@@ -1,30 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/radio-button.json",
4
- "title": "Radio button",
5
- "description": "Radio buttons allow users to select a single option from a list of mutually exclusive options.",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/radio-button/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "state": {
13
- "type": "string",
14
- "enum": ["default", "hover", "down", "keyboard focus"],
15
- "default": "default"
16
- },
17
- "isSelected": {
18
- "type": "boolean",
19
- "default": false
20
- },
21
- "isEmphasized": {
22
- "type": "boolean",
23
- "default": false
24
- },
25
- "label": {
26
- "type": "string",
27
- "description": "The text displayed next to a radio button."
28
- }
29
- }
30
- }
@@ -1,58 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/radio-group.json",
4
- "title": "Radio Group",
5
- "description": "A radio group is a grouping of radio buttons that are related to each other.",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/radio-group/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "label": {
13
- "type": "string"
14
- },
15
- "labelPosition": {
16
- "type": "string",
17
- "enum": ["top", "side"],
18
- "default": "top"
19
- },
20
- "orientation": {
21
- "type": "string",
22
- "enum": ["horizontal", "vertical"],
23
- "default": "vertical"
24
- },
25
- "size": {
26
- "type": "string",
27
- "enum": ["s", "m", "l", "xl"],
28
- "default": "m"
29
- },
30
- "isEmphasized": {
31
- "type": "boolean",
32
- "default": false
33
- },
34
- "necessityIndicator": {
35
- "type": "string",
36
- "enum": ["text", "icon"],
37
- "default": "icon"
38
- },
39
- "isRequired": {
40
- "type": "boolean",
41
- "default": false
42
- },
43
- "isError": {
44
- "type": "boolean",
45
- "default": false
46
- },
47
- "isDisabled": {
48
- "type": "boolean",
49
- "default": false
50
- },
51
- "errorMessage": {
52
- "type": "string"
53
- },
54
- "description": {
55
- "type": "string"
56
- }
57
- }
58
- }
@@ -1,34 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/rating.json",
4
- "title": "Rating",
5
- "description": "The rating component lets users apply a rating to an item or experience, such as an image, a forum post, an item for sale in a marketplace, and more.",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/rating/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "value": {
13
- "type": "number",
14
- "minimum": 0,
15
- "maximum": 5,
16
- "default": 0,
17
- "multipleOf": 0.5,
18
- "description": "From 0 to 5, can be a decimal to represent half stars"
19
- },
20
- "isEmphasized": {
21
- "type": "boolean",
22
- "default": false
23
- },
24
- "isDisabled": {
25
- "type": "boolean",
26
- "default": false
27
- },
28
- "state": {
29
- "type": "string",
30
- "enum": ["default", "hover", "down", "keyboard focus"],
31
- "default": "default"
32
- }
33
- }
34
- }
@@ -1,44 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/scroll-zoom-bar.json",
4
- "title": "Scroll-zoom bar",
5
- "description": "Primarily for usage in timelines, a scroll-zoom bar lets a user scroll or zoom with the same control.",
6
- "meta": {
7
- "category": "navigation",
8
- "documentationUrl": "https://spectrum.adobe.com/page/scroll-zoom-bar/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "size": {
13
- "type": "string",
14
- "enum": ["s", "m", "l"],
15
- "default": "m"
16
- },
17
- "orientation": {
18
- "type": "string",
19
- "enum": ["horizontal", "vertical"],
20
- "default": "horizontal"
21
- },
22
- "hideTrack": {
23
- "type": "boolean",
24
- "default": false
25
- },
26
- "hideHandles": {
27
- "type": "boolean",
28
- "default": false
29
- },
30
- "scaleDown": {
31
- "type": "boolean",
32
- "default": false
33
- },
34
- "isDetached": {
35
- "type": "boolean",
36
- "default": false
37
- },
38
- "state": {
39
- "type": "string",
40
- "enum": ["default", "hover", "keyboard focus"],
41
- "default": "default"
42
- }
43
- }
44
- }
@@ -1,58 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/search-field.json",
4
- "title": "Search field",
5
- "description": "A search field is used for searching and filtering items.",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/search-field/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "label": {
13
- "type": "string"
14
- },
15
- "hideLabel": {
16
- "type": "boolean",
17
- "default": false
18
- },
19
- "icon": {
20
- "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/types/workflow-icon.json",
21
- "description": "Icon must be present if the label is not defined."
22
- },
23
- "value": {
24
- "type": "string"
25
- },
26
- "width": {
27
- "type": "number"
28
- },
29
- "size": {
30
- "type": "string",
31
- "enum": ["s", "m", "l", "xl"],
32
- "default": "m",
33
- "pattern": "^(x?s|m|x{0,3}l)$"
34
- },
35
- "helpText": {
36
- "type": "string"
37
- },
38
- "placeholder": {
39
- "type": "string"
40
- },
41
- "isDisabled": {
42
- "type": "boolean",
43
- "default": false
44
- },
45
- "state": {
46
- "type": "string",
47
- "enum": [
48
- "default",
49
- "down",
50
- "hover",
51
- "focus + hover",
52
- "focus + not hover",
53
- "keyboard focus"
54
- ],
55
- "default": "default"
56
- }
57
- }
58
- }
@@ -1,72 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/segmented-control.json",
4
- "title": "Segmented Control",
5
- "description": "Segmented controls allow users to select one option from a set of mutually exclusive options.",
6
- "meta": {
7
- "category": "navigation",
8
- "documentationUrl": "https://spectrum.adobe.com/page/segmented-control/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "orientation": {
13
- "type": "string",
14
- "enum": ["horizontal", "vertical"],
15
- "default": "horizontal"
16
- },
17
- "isFluid": {
18
- "type": "boolean",
19
- "default": false,
20
- "description": "If true, the control takes up the full width of its container. Only applicable to horizontal segmented controls."
21
- },
22
- "alignment": {
23
- "type": "string",
24
- "enum": ["start", "center"],
25
- "default": "start"
26
- },
27
- "hideTracker": {
28
- "type": "boolean",
29
- "default": false,
30
- "description": "If true, the tracker that indicates the selected item is hidden."
31
- },
32
- "selectedItem": {
33
- "type": "string",
34
- "description": "The identifier of the currently selected item."
35
- },
36
- "keyboardActivation": {
37
- "type": "string",
38
- "enum": ["manual", "automatic"],
39
- "default": "manual"
40
- },
41
- "items": {
42
- "type": "array",
43
- "description": "An array of segmented control items.",
44
- "items": {
45
- "type": "object",
46
- "properties": {
47
- "label": {
48
- "type": "string",
49
- "description": "The text displayed for the segmented control item."
50
- },
51
- "isDisabled": {
52
- "type": "boolean",
53
- "default": false,
54
- "description": "Whether the segmented control item is disabled."
55
- },
56
- "state": {
57
- "type": "string",
58
- "enum": ["default", "hover", "keyboard focus"],
59
- "default": "default",
60
- "description": "The interaction state of the segmented control item."
61
- },
62
- "contentVariant": {
63
- "type": "string",
64
- "enum": ["label-only", "icon-only", "icon-label"],
65
- "default": "icon-label",
66
- "description": "Controls whether the segmented control item displays a label, an icon, or both."
67
- }
68
- }
69
- }
70
- }
71
- }
72
- }
@@ -1,50 +0,0 @@
1
- {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/select-box.json",
4
- "title": "Select box",
5
- "description": "",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/select-box/"
9
- },
10
- "type": "object",
11
- "properties": {
12
- "label": {
13
- "type": "string"
14
- },
15
- "orientation": {
16
- "type": "string",
17
- "enum": ["horizontal", "vertical"],
18
- "default": "vertical"
19
- },
20
- "body": {
21
- "type": "string"
22
- },
23
- "isSelected": {
24
- "type": "boolean",
25
- "default": false
26
- },
27
- "hideIllustration": {
28
- "type": "boolean",
29
- "default": false
30
- },
31
- "showCheckbox": {
32
- "type": "boolean",
33
- "default": false
34
- },
35
- "isDisabled": {
36
- "type": "boolean",
37
- "default": false
38
- },
39
- "state": {
40
- "type": "string",
41
- "enum": ["default", "down", "hover", "keyboard focus"],
42
- "default": "default"
43
- },
44
- "multiple": {
45
- "type": "boolean",
46
- "default": false,
47
- "description": "Set to true to allow multiple selections."
48
- }
49
- }
50
- }