@adobe/spectrum-component-api-schemas 0.0.0-schema-20240613154750

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 (124) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +201 -0
  3. package/dist/v1/schemas/component.json +29 -0
  4. package/dist/v1/schemas/components/action-bar.json +18 -0
  5. package/dist/v1/schemas/components/action-button.json +62 -0
  6. package/dist/v1/schemas/components/action-group.json +69 -0
  7. package/dist/v1/schemas/components/alert-banner.json +29 -0
  8. package/dist/v1/schemas/components/alert-dialog.json +42 -0
  9. package/dist/v1/schemas/components/avatar.json +30 -0
  10. package/dist/v1/schemas/components/badge.json +50 -0
  11. package/dist/v1/schemas/components/body.json +25 -0
  12. package/dist/v1/schemas/components/bottom-navigation-android.json +37 -0
  13. package/dist/v1/schemas/components/breadcrumbs.json +18 -0
  14. package/dist/v1/schemas/components/button-group.json +28 -0
  15. package/dist/v1/schemas/components/button.json +60 -0
  16. package/dist/v1/schemas/components/checkbox-group.json +53 -0
  17. package/dist/v1/schemas/components/checkbox.json +52 -0
  18. package/dist/v1/schemas/components/close-button.json +35 -0
  19. package/dist/v1/schemas/components/code.json +21 -0
  20. package/dist/v1/schemas/components/color-area.json +64 -0
  21. package/dist/v1/schemas/components/color-loupe.json +21 -0
  22. package/dist/v1/schemas/components/color-slider.json +52 -0
  23. package/dist/v1/schemas/components/color-wheel.json +47 -0
  24. package/dist/v1/schemas/components/combo-box.json +84 -0
  25. package/dist/v1/schemas/components/contextual-help.json +64 -0
  26. package/dist/v1/schemas/components/detail.json +26 -0
  27. package/dist/v1/schemas/components/divider.json +23 -0
  28. package/dist/v1/schemas/components/field-label.json +39 -0
  29. package/dist/v1/schemas/components/heading.json +29 -0
  30. package/dist/v1/schemas/components/help-text.json +35 -0
  31. package/dist/v1/schemas/components/in-line-alert.json +25 -0
  32. package/dist/v1/schemas/components/link.json +32 -0
  33. package/dist/v1/schemas/components/menu.json +65 -0
  34. package/dist/v1/schemas/components/meter.json +37 -0
  35. package/dist/v1/schemas/components/picker.json +85 -0
  36. package/dist/v1/schemas/components/popover.json +65 -0
  37. package/dist/v1/schemas/components/progress-bar.json +50 -0
  38. package/dist/v1/schemas/components/progress-circle.json +41 -0
  39. package/dist/v1/schemas/components/radio-group.json +62 -0
  40. package/dist/v1/schemas/components/rating.json +31 -0
  41. package/dist/v1/schemas/components/scroll-zoom-bar.json +44 -0
  42. package/dist/v1/schemas/components/side-navigation.json +18 -0
  43. package/dist/v1/schemas/components/slider.json +74 -0
  44. package/dist/v1/schemas/components/status-light.json +44 -0
  45. package/dist/v1/schemas/components/swatch-group.json +38 -0
  46. package/dist/v1/schemas/components/swatch.json +45 -0
  47. package/dist/v1/schemas/components/switch.json +42 -0
  48. package/dist/v1/schemas/components/tab-bar-ios.json +37 -0
  49. package/dist/v1/schemas/components/tabs.json +32 -0
  50. package/dist/v1/schemas/components/tag.json +41 -0
  51. package/dist/v1/schemas/components/text-area.json +98 -0
  52. package/dist/v1/schemas/components/text-field.json +86 -0
  53. package/dist/v1/schemas/components/toast.json +29 -0
  54. package/dist/v1/schemas/components/tooltip.json +50 -0
  55. package/dist/v1/schemas/components/tray.json +17 -0
  56. package/dist/v1/schemas/components/tree-view.json +50 -0
  57. package/dist/v1/schemas/types/component-size.json +8 -0
  58. package/dist/v1/schemas/types/hex-color.json +8 -0
  59. package/dist/v1/schemas/types/typography-classification.json +9 -0
  60. package/dist/v1/schemas/types/typography-script.json +9 -0
  61. package/dist/v1/schemas/types/workflow-icon.json +901 -0
  62. package/index.js +52 -0
  63. package/moon.yml +59 -0
  64. package/package.json +26 -0
  65. package/schemas/component.json +29 -0
  66. package/schemas/components/action-bar.json +18 -0
  67. package/schemas/components/action-button.json +62 -0
  68. package/schemas/components/action-group.json +69 -0
  69. package/schemas/components/alert-banner.json +29 -0
  70. package/schemas/components/alert-dialog.json +42 -0
  71. package/schemas/components/avatar.json +30 -0
  72. package/schemas/components/badge.json +50 -0
  73. package/schemas/components/body.json +25 -0
  74. package/schemas/components/bottom-navigation-android.json +37 -0
  75. package/schemas/components/breadcrumbs.json +18 -0
  76. package/schemas/components/button-group.json +28 -0
  77. package/schemas/components/button.json +60 -0
  78. package/schemas/components/checkbox-group.json +53 -0
  79. package/schemas/components/checkbox.json +52 -0
  80. package/schemas/components/close-button.json +35 -0
  81. package/schemas/components/code.json +21 -0
  82. package/schemas/components/color-area.json +64 -0
  83. package/schemas/components/color-loupe.json +21 -0
  84. package/schemas/components/color-slider.json +52 -0
  85. package/schemas/components/color-wheel.json +47 -0
  86. package/schemas/components/combo-box.json +84 -0
  87. package/schemas/components/contextual-help.json +64 -0
  88. package/schemas/components/detail.json +26 -0
  89. package/schemas/components/divider.json +23 -0
  90. package/schemas/components/field-label.json +39 -0
  91. package/schemas/components/heading.json +29 -0
  92. package/schemas/components/help-text.json +35 -0
  93. package/schemas/components/in-line-alert.json +25 -0
  94. package/schemas/components/link.json +32 -0
  95. package/schemas/components/menu.json +65 -0
  96. package/schemas/components/meter.json +37 -0
  97. package/schemas/components/picker.json +85 -0
  98. package/schemas/components/popover.json +65 -0
  99. package/schemas/components/progress-bar.json +50 -0
  100. package/schemas/components/progress-circle.json +41 -0
  101. package/schemas/components/radio-group.json +62 -0
  102. package/schemas/components/rating.json +31 -0
  103. package/schemas/components/scroll-zoom-bar.json +44 -0
  104. package/schemas/components/side-navigation.json +18 -0
  105. package/schemas/components/slider.json +74 -0
  106. package/schemas/components/status-light.json +44 -0
  107. package/schemas/components/swatch-group.json +38 -0
  108. package/schemas/components/swatch.json +45 -0
  109. package/schemas/components/switch.json +42 -0
  110. package/schemas/components/tab-bar-ios.json +37 -0
  111. package/schemas/components/tabs.json +32 -0
  112. package/schemas/components/tag.json +41 -0
  113. package/schemas/components/text-area.json +98 -0
  114. package/schemas/components/text-field.json +86 -0
  115. package/schemas/components/toast.json +29 -0
  116. package/schemas/components/tooltip.json +50 -0
  117. package/schemas/components/tray.json +17 -0
  118. package/schemas/components/tree-view.json +50 -0
  119. package/schemas/types/component-size.json +8 -0
  120. package/schemas/types/hex-color.json +8 -0
  121. package/schemas/types/typography-classification.json +9 -0
  122. package/schemas/types/typography-script.json +9 -0
  123. package/schemas/types/workflow-icon.json +901 -0
  124. package/test/componentSchemaValidator.test.js +74 -0
package/index.js ADDED
@@ -0,0 +1,52 @@
1
+ /*
2
+ Copyright 2024 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { glob } from "glob";
14
+
15
+ import { resolve } from "path";
16
+ import { readFile } from "fs/promises";
17
+ import * as url from "url";
18
+ import { writeFile } from "fs/promises";
19
+ import { format } from "prettier";
20
+
21
+ const readJson = async (fileName) =>
22
+ JSON.parse(await readFile(fileName, "utf8"));
23
+
24
+ const writeJson = async (fileName, jsonData) => {
25
+ await writeFile(
26
+ fileName,
27
+ await format(JSON.stringify(jsonData), { parser: "json-stringify" }),
28
+ );
29
+ };
30
+
31
+ const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
32
+
33
+ export const schemaFileNames = await glob(
34
+ `${resolve(__dirname, "./schemas")}/**/*.json`,
35
+ );
36
+
37
+ export const getFile = async (schemaFileName) =>
38
+ await readJson(resolve(__dirname, "src", schemaFileName));
39
+
40
+ export const getAllSchemas = async () => {
41
+ return await Promise.all(schemaFileNames.map(getFileTokens)).then(
42
+ (tokenFileDataAr) => {
43
+ return tokenFileDataAr.reduce(
44
+ (tokenDataAcc, tokenFileData) => ({
45
+ ...tokenDataAcc,
46
+ ...tokenFileData,
47
+ }),
48
+ {},
49
+ );
50
+ },
51
+ );
52
+ };
package/moon.yml ADDED
@@ -0,0 +1,59 @@
1
+ # Copyright 2024 Adobe. All rights reserved.
2
+ # This file is licensed to you under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License. You may obtain a copy
4
+ # of the License at http://www.apache.org/licenses/LICENSE-2.0
5
+
6
+ # Unless required by applicable law or agreed to in writing, software distributed under
7
+ # the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
8
+ # OF ANY KIND, either express or implied. See the License for the specific language
9
+ # governing permissions and limitations under the License.
10
+ $schema: "https://moonrepo.dev/schemas/project.json"
11
+ type: library
12
+ fileGroups:
13
+ schemas:
14
+ - "schemas/**/*.{yaml,yml,json}"
15
+ tests:
16
+ - "test/**/*"
17
+ tasks:
18
+ build:
19
+ deps:
20
+ - ~:make
21
+ command:
22
+ - cp
23
+ - -R
24
+ - schemas/
25
+ - dist/v1
26
+ platform: system
27
+ inputs:
28
+ - "@globs(schemas)"
29
+ outputs:
30
+ - dist/v1
31
+ local: true
32
+ make:
33
+ command:
34
+ - mkdir
35
+ - -p
36
+ - dist/v1
37
+ platform: system
38
+ local: true
39
+ clean:
40
+ command:
41
+ - rm
42
+ - -rf
43
+ - dist
44
+ platform: system
45
+ local: true
46
+ test:
47
+ command:
48
+ - pnpm
49
+ - ava
50
+ inputs:
51
+ - "@globs(schemas)"
52
+ - "@globs(tests)"
53
+ platform: node
54
+ test-watch:
55
+ command:
56
+ - ava
57
+ - --watch
58
+ local: true
59
+ platform: node
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@adobe/spectrum-component-api-schemas",
3
+ "version": "0.0.0-schema-20240613154750",
4
+ "description": "",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/adobe/spectrum-tokens.git"
10
+ },
11
+ "author": "Garth Braithwaite <garthdb@gmail.com> (https://garthdb.com/)",
12
+ "bugs": {
13
+ "url": "https://github.com/adobe/spectrum-tokens/issues"
14
+ },
15
+ "publishConfig": {
16
+ "provenance": true
17
+ },
18
+ "homepage": "https://github.com/adobe/spectrum-tokens/tree/main/packages/component-schemas#readme",
19
+ "license": "Apache-2.0",
20
+ "devDependencies": {
21
+ "ajv": "^8.12.0",
22
+ "ajv-formats": "^3.0.1",
23
+ "glob": "^10.3.12"
24
+ },
25
+ "scripts": {}
26
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
4
+ "title": "Component",
5
+ "type": "object",
6
+ "properties": {
7
+ "meta": {
8
+ "type": "object",
9
+ "properties": {
10
+ "category": {
11
+ "type": "string",
12
+ "enum": [
13
+ "actions",
14
+ "containers",
15
+ "data visualization",
16
+ "feedback",
17
+ "inputs",
18
+ "navigation",
19
+ "status",
20
+ "typography"
21
+ ]
22
+ },
23
+ "documentationUrl": { "type": "string", "format": "uri" }
24
+ },
25
+ "required": ["category", "documentationUrl"]
26
+ }
27
+ },
28
+ "required": ["meta", "title", "description", "properties", "$id"]
29
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/action-bar.json",
4
+ "title": "Action bar",
5
+ "description": "Action bars are used for single and bulk selection patterns, when a user needs to perform actions on either a single or multiple items at the same time.",
6
+ "meta": {
7
+ "category": "actions",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/action-bar/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "isEmphasized": {
13
+ "type": "boolean",
14
+ "default": false
15
+ }
16
+ },
17
+ "examples": [{ "isEmphasized": true }, { "isEmphasized": false }, {}]
18
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/action-button.json",
4
+ "title": "Action button",
5
+ "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.",
6
+ "meta": {
7
+ "category": "actions",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/action-button/"
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
+ "size": {
24
+ "type": "string",
25
+ "enum": ["s", "m", "l", "xl"],
26
+ "default": "m",
27
+ "pattern": "^(x?s|m|x{0,3}l)$"
28
+ },
29
+ "isQuiet": {
30
+ "type": "boolean",
31
+ "default": false
32
+ },
33
+ "isSelected": {
34
+ "type": "boolean",
35
+ "default": false
36
+ },
37
+ "isEmphasized": {
38
+ "type": "boolean",
39
+ "default": false
40
+ },
41
+ "staticColor": {
42
+ "type": "string",
43
+ "enum": ["white", "black"]
44
+ },
45
+ "selectedTextColor": {
46
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/types/hex-color.json"
47
+ },
48
+ "hasHoldIcon": {
49
+ "type": "boolean",
50
+ "default": false
51
+ },
52
+ "isDisabled": {
53
+ "type": "boolean",
54
+ "default": false
55
+ },
56
+ "state": {
57
+ "type": "string",
58
+ "enum": ["default", "hover", "down", "keyboard focus"],
59
+ "default": "default"
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/action-group.json",
4
+ "title": "Action group",
5
+ "description": "An action group is a grouping of action buttons that are related to each other.",
6
+ "meta": {
7
+ "category": "actions",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/action-group/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "orientation": {
13
+ "type": "string",
14
+ "enum": ["horizontal", "vertical"],
15
+ "default": "horizontal"
16
+ },
17
+ "size": {
18
+ "type": "string",
19
+ "enum": ["s", "m", "l", "xl"],
20
+ "default": "m"
21
+ },
22
+ "density": {
23
+ "type": "string",
24
+ "enum": ["regular", "compact"],
25
+ "default": "regular"
26
+ },
27
+ "isJustified": {
28
+ "type": "boolean",
29
+ "default": false
30
+ },
31
+ "isQuiet": {
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ "isEmphasized": {
36
+ "type": "boolean",
37
+ "default": false
38
+ },
39
+ "enableSelection": {
40
+ "type": "boolean",
41
+ "default": false
42
+ },
43
+ "selectionMode": {
44
+ "type": "string",
45
+ "enum": ["single", "multiple"],
46
+ "default": "single",
47
+ "description": "Only applicable if selection is enabled"
48
+ },
49
+ "allowsEmptySelection": {
50
+ "type": "boolean",
51
+ "default": false,
52
+ "description": "Only applicable if selection is enabled"
53
+ },
54
+ "overflowMode": {
55
+ "type": "string",
56
+ "enum": ["wrap", "collapse"],
57
+ "default": "wrap"
58
+ },
59
+ "isDisabled": {
60
+ "type": "boolean",
61
+ "default": false
62
+ }
63
+ },
64
+ "examples": [
65
+ {
66
+ "size": "s"
67
+ }
68
+ ]
69
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/alert-banner.json",
4
+ "title": "Alert banner",
5
+ "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.",
6
+ "meta": {
7
+ "category": "feedback",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/alert-banner/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "text": {
13
+ "type": "string"
14
+ },
15
+ "variant": {
16
+ "type": "string",
17
+ "enum": ["neutral", "informative", "negative"],
18
+ "default": "neutral"
19
+ },
20
+ "actionLabel": {
21
+ "type": "string",
22
+ "description": "If undefined, this button does not appear."
23
+ },
24
+ "isDismissible": {
25
+ "type": "boolean",
26
+ "default": false
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/alert-dialog.json",
4
+ "title": "Alert dialog",
5
+ "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.",
6
+ "meta": {
7
+ "category": "feedback",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/alert-dialog/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "title": {
13
+ "type": "string"
14
+ },
15
+ "description": {
16
+ "type": "string"
17
+ },
18
+ "variant": {
19
+ "type": "string",
20
+ "enum": [
21
+ "confirmation",
22
+ "information",
23
+ "warning",
24
+ "destructive",
25
+ "error"
26
+ ],
27
+ "default": "confirmation"
28
+ },
29
+ "primaryActionLabel": {
30
+ "type": "string"
31
+ },
32
+ "secondaryActionLabel": {
33
+ "type": "string",
34
+ "description": "If undefined, this button does not appear."
35
+ },
36
+ "cancelActionLabel": {
37
+ "type": "string",
38
+ "default": "cancel",
39
+ "description": "If undefined, this button does not appear."
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/avatar.json",
4
+ "title": "Avatar",
5
+ "description": "An avatar is a thumbnail representation of an entity, such as a user or an organization.",
6
+ "meta": {
7
+ "category": "navigation",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/avatar/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "size": {
13
+ "type": "number",
14
+ "enum": [50, 75, 100, 200, 300, 400, 500, 600, 700],
15
+ "default": 100
16
+ },
17
+ "image": {
18
+ "type": "string"
19
+ },
20
+ "isDisabled": {
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "state": {
25
+ "type": "string",
26
+ "enum": ["default", "hover", "down", "keyboard focus"],
27
+ "default": "default"
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/badge.json",
4
+ "title": "Badge",
5
+ "description": "Similar to status lights, badges are for showing a small amount of color-categorized metadata. They're ideal for getting a user''s attention.",
6
+ "meta": {
7
+ "category": "status",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/badge/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string",
14
+ "description": "When the label is not defined, the badge appears as icon-only."
15
+ },
16
+ "icon": {
17
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/types/workflow-icon.json"
18
+ },
19
+ "variant": {
20
+ "type": "string",
21
+ "enum": [
22
+ "neutral",
23
+ "info",
24
+ "positive",
25
+ "negative",
26
+ "indigo",
27
+ "yellow",
28
+ "magenta",
29
+ "fuchsia",
30
+ "purple",
31
+ "seafoam"
32
+ ]
33
+ },
34
+ "fixed": {
35
+ "type": "string",
36
+ "enum": ["none", "top", "right", "bottom", "left"],
37
+ "default": "none"
38
+ },
39
+ "isDisabled": {
40
+ "type": "boolean",
41
+ "default": false
42
+ },
43
+ "size": {
44
+ "type": "string",
45
+ "pattern": "^(x?s|m|x{0,3}l)$",
46
+ "enum": ["s", "m", "l", "xl"],
47
+ "default": "s"
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/body.json",
4
+ "title": "Body",
5
+ "description": "Body is a typography component primarily used within Spectrum components and for blocks of text.",
6
+ "meta": {
7
+ "category": "typography",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/body/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "script": {
13
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/types/typography-script.json"
14
+ },
15
+ "classification": {
16
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/types/typography-classification.json"
17
+ },
18
+ "size": {
19
+ "type": "string",
20
+ "pattern": "^(x?s|m|x{0,3}l)$",
21
+ "enum": ["xs", "s", "m", "l", "xl", "xxl", "xxxl"],
22
+ "default": "m"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/bottom-navigation-android.json",
4
+ "title": "Bottom navigation (Android)",
5
+ "description": "Bottom navigation is a top-level navigation control for Android apps.",
6
+ "meta": {
7
+ "category": "navigation",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/bottom-navigation-android/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "labelPosition": {
16
+ "type": "string",
17
+ "enum": ["bottom", "side"],
18
+ "default": "bottom"
19
+ },
20
+ "icon": {
21
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/types/workflow-icon.json"
22
+ },
23
+ "background": {
24
+ "type": "string",
25
+ "enum": ["primary", "secondary"],
26
+ "default": "primary"
27
+ },
28
+ "hasBadge": {
29
+ "type": "boolean",
30
+ "default": false
31
+ },
32
+ "isDisabled": {
33
+ "type": "boolean",
34
+ "default": false
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/breadcrumbs.json",
4
+ "title": "Breadcrumbs",
5
+ "description": "Breadcrumbs show hierarchy and navigational context for a user’s location within an app.",
6
+ "meta": {
7
+ "category": "navigation",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/breadcrumbs/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "state": {
13
+ "type": "string",
14
+ "enum": ["default", "hover", "down", "keyboard focus", "drag and drop"],
15
+ "default": "default"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/button-group.json",
4
+ "title": "Button group",
5
+ "description": "A button group is a grouping of buttons whose actions are related to each other.",
6
+ "meta": {
7
+ "category": "actions",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/button-group/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "orientation": {
13
+ "type": "string",
14
+ "default": "horizontal",
15
+ "enum": ["horizontal", "vertical"]
16
+ },
17
+ "size": {
18
+ "type": "string",
19
+ "pattern": "^(x?s|m|x{0,3}l)$",
20
+ "enum": ["s", "m", "l", "xl"],
21
+ "default": "m"
22
+ },
23
+ "isDisabled": {
24
+ "type": "boolean",
25
+ "default": false
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/button.json",
4
+ "title": "Button",
5
+ "description": "Buttons allow users to perform an action or to navigate to another page. They have multiple styles for various needs, and are ideal for calling attention to where a user needs to do something in order to move forward in a flow.",
6
+ "meta": {
7
+ "category": "actions",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
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
+ "variant": {
24
+ "type": "string",
25
+ "enum": ["accent", "negative", "primary", "secondary"],
26
+ "default": "accent"
27
+ },
28
+ "staticColor": {
29
+ "type": "string",
30
+ "enum": ["white", "black"]
31
+ },
32
+ "style": {
33
+ "type": "string",
34
+ "default": "fill",
35
+ "enum": ["fill", "outline"]
36
+ },
37
+ "size": {
38
+ "type": "string",
39
+ "enum": ["s", "m", "l", "xl"],
40
+ "default": "m"
41
+ },
42
+ "justified": {
43
+ "type": "boolean",
44
+ "default": false
45
+ },
46
+ "isPending": {
47
+ "type": "boolean",
48
+ "default": false
49
+ },
50
+ "isDisabled": {
51
+ "type": "boolean",
52
+ "default": false
53
+ },
54
+ "state": {
55
+ "type": "string",
56
+ "enum": ["default", "hover", "down", "keyboard focus"],
57
+ "default": "default"
58
+ }
59
+ }
60
+ }