@adobe/spectrum-tokens 13.0.0-beta.2 → 13.0.0-beta.21

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 (84) hide show
  1. package/CHANGELOG.md +1379 -0
  2. package/dist/json/drover.json +826 -473
  3. package/dist/json/variables.json +9794 -6005
  4. package/moon.yml +1 -1
  5. package/package.json +7 -4
  6. package/schemas/components/action-bar.json +1 -1
  7. package/schemas/components/action-button.json +1 -1
  8. package/schemas/components/action-group.json +1 -1
  9. package/schemas/components/alert-banner.json +1 -1
  10. package/schemas/components/alert-dialog.json +1 -1
  11. package/schemas/components/avatar.json +1 -1
  12. package/schemas/components/badge.json +1 -1
  13. package/schemas/components/body.json +1 -1
  14. package/schemas/components/bottom-navigation-android.json +1 -1
  15. package/schemas/components/breadcrumbs.json +1 -1
  16. package/schemas/components/button-group.json +1 -1
  17. package/schemas/components/button.json +1 -1
  18. package/schemas/components/checkbox-group.json +1 -1
  19. package/schemas/components/checkbox.json +1 -1
  20. package/schemas/components/close-button.json +1 -1
  21. package/schemas/components/code.json +1 -1
  22. package/schemas/components/color-area.json +1 -1
  23. package/schemas/components/color-loupe.json +1 -1
  24. package/schemas/components/color-slider.json +1 -1
  25. package/schemas/components/color-wheel.json +1 -1
  26. package/schemas/components/combo-box.json +1 -1
  27. package/schemas/components/contextual-help.json +1 -1
  28. package/schemas/components/detail.json +1 -1
  29. package/schemas/components/divider.json +1 -1
  30. package/schemas/components/field-label.json +1 -1
  31. package/schemas/components/heading.json +1 -1
  32. package/schemas/components/help-text.json +1 -1
  33. package/schemas/components/in-line-alert.json +1 -1
  34. package/schemas/components/link.json +1 -1
  35. package/schemas/components/menu.json +1 -1
  36. package/schemas/components/meter.json +1 -1
  37. package/schemas/components/picker.json +1 -1
  38. package/schemas/components/popover.json +1 -1
  39. package/schemas/components/progress-bar.json +1 -1
  40. package/schemas/components/progress-circle.json +1 -1
  41. package/schemas/components/radio-group.json +1 -1
  42. package/schemas/components/rating.json +1 -1
  43. package/schemas/components/scroll-zoom-bar.json +1 -1
  44. package/schemas/components/side-navigation.json +1 -1
  45. package/schemas/components/slider.json +1 -1
  46. package/schemas/components/status-light.json +1 -1
  47. package/schemas/components/swatch-group.json +1 -1
  48. package/schemas/components/swatch.json +1 -1
  49. package/schemas/components/switch.json +1 -1
  50. package/schemas/components/tab-bar-ios.json +1 -1
  51. package/schemas/components/tabs.json +1 -1
  52. package/schemas/components/tag.json +1 -1
  53. package/schemas/components/text-area.json +1 -1
  54. package/schemas/components/text-field.json +1 -1
  55. package/schemas/components/toast.json +1 -1
  56. package/schemas/components/tooltip.json +1 -1
  57. package/schemas/components/tray.json +1 -1
  58. package/schemas/components/tree-view.json +1 -1
  59. package/schemas/token-types/alias.json +25 -0
  60. package/schemas/token-types/color-set.json +69 -0
  61. package/schemas/token-types/color.json +25 -0
  62. package/schemas/token-types/dimension.json +25 -0
  63. package/schemas/token-types/font-family.json +25 -0
  64. package/schemas/token-types/font-size.json +25 -0
  65. package/schemas/token-types/font-style.json +25 -0
  66. package/schemas/token-types/font-weight.json +25 -0
  67. package/schemas/token-types/multiplier.json +25 -0
  68. package/schemas/token-types/opacity.json +25 -0
  69. package/schemas/token-types/scale-set.json +60 -0
  70. package/schemas/token-types/set.json +22 -0
  71. package/schemas/token-types/text-transform.json +25 -0
  72. package/schemas/token-types/token.json +27 -0
  73. package/src/color-aliases.json +573 -119
  74. package/src/color-component.json +52 -12
  75. package/src/color-palette.json +3038 -414
  76. package/src/icons.json +18 -0
  77. package/src/layout-component.json +5120 -2385
  78. package/src/layout.json +773 -102
  79. package/src/semantic-color-palette.json +101 -1
  80. package/src/typography.json +285 -0
  81. package/test/checkId.test.js +55 -33
  82. package/test/componentSchemaValidator.test.js +74 -0
  83. package/test/schemaValidators/alias.test.js +41 -0
  84. package/test/tokenSchemaValidator.test.js +97 -0
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color-set.json",
4
+ "title": "Color set",
5
+ "description": "A set that contains color values that change based on color theme.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/set.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color-set.json"
15
+ },
16
+ "sets": {
17
+ "type": "object",
18
+ "anyOf": [
19
+ {
20
+ "properties": {
21
+ "light": {
22
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color.json"
23
+ },
24
+ "dark": {
25
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color.json"
26
+ },
27
+ "wireframe": {
28
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color.json"
29
+ }
30
+ },
31
+ "required": ["light", "dark", "wireframe"]
32
+ },
33
+ {
34
+ "properties": {
35
+ "light": {
36
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
37
+ },
38
+ "dark": {
39
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
40
+ },
41
+ "wireframe": {
42
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
43
+ }
44
+ },
45
+ "required": ["light", "dark", "wireframe"]
46
+ },
47
+ {
48
+ "properties": {
49
+ "light": {
50
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/opacity.json"
51
+ },
52
+ "dark": {
53
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/opacity.json"
54
+ },
55
+ "wireframe": {
56
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/opacity.json"
57
+ }
58
+ },
59
+ "required": ["light", "dark", "wireframe"]
60
+ }
61
+ ]
62
+ },
63
+ "component": {},
64
+ "deprecated": {},
65
+ "deprecated_comment": {},
66
+ "uuid": {}
67
+ },
68
+ "required": ["sets"]
69
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color.json",
4
+ "title": "Color",
5
+ "description": "Color token schema.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^rgba\\((([0-1]?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5]),\\s?){3}(0|1|0?\\.\\d+)\\)|rgb\\(([0-1]?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5]){1,3}(,\\s?\\d{1,3}%?){2}\\)$"
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
4
+ "title": "Dimension",
5
+ "description": "Pixel or relative dimension.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em|%))|0|\\d+dp$"
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-family.json",
4
+ "title": "Font family",
5
+ "description": "A font family token defines a font family that can be used in a component.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-family.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:\"?\\w+\"? ?,? ?)*\"?\\w+\"?$"
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-size.json",
4
+ "title": "Dimension",
5
+ "description": "Pixel, rem, and em font sizes dimension.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-size.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em))$"
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-style.json",
4
+ "title": "Font style",
5
+ "description": "Sets whether a font should be styled with a normal, italic, or oblique face from its font-family",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-style.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["italic", "normal"]
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-weight.json",
4
+ "title": "Font weight",
5
+ "description": "Defines sets the weight (or boldness) of the font",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-weight.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["light", "regular", "medium", "bold", "extra-bold", "black"]
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/multiplier.json",
4
+ "title": "Multiplier",
5
+ "description": "A float used to multiply a value by a given amount. Also used as a line-height multiplier.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/multiplier.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:\\d+\\.?\\d*)|(?:\\.?\\d+)$"
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/opacity.json",
4
+ "title": "Opacity",
5
+ "description": "A percentage measurement of the opacity.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/opacity.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:\\d+(?:\\.\\d)+%)|(?:1|0)(?:\\.0)?|0?\\.\\d*$"
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/scale-set.json",
4
+ "title": "Scale set",
5
+ "description": "A set that contains dimension values that change based on platform scale.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/set.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/scale-set.json"
15
+ },
16
+ "sets": {
17
+ "type": "object",
18
+ "properties": {
19
+ "mobile": {
20
+ "anyOf": [
21
+ {
22
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json"
23
+ },
24
+ {
25
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-size.json"
26
+ },
27
+ {
28
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
29
+ },
30
+ {
31
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/multiplier.json"
32
+ }
33
+ ]
34
+ },
35
+ "desktop": {
36
+ "anyOf": [
37
+ {
38
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json"
39
+ },
40
+ {
41
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/font-size.json"
42
+ },
43
+ {
44
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
45
+ },
46
+ {
47
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/multiplier.json"
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ "required": ["mobile", "desktop"]
53
+ },
54
+ "component": {},
55
+ "deprecated": {},
56
+ "deprecated_comment": {},
57
+ "uuid": {}
58
+ },
59
+ "required": ["sets"]
60
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/set.json",
4
+ "title": "sets",
5
+ "description": "A generic token set.",
6
+ "type": "object",
7
+ "properties": {
8
+ "sets": {
9
+ "type": "object"
10
+ },
11
+ "component": {
12
+ "type": "string"
13
+ },
14
+ "deprecated": {
15
+ "type": "boolean"
16
+ },
17
+ "deprecated_comment": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": ["sets"]
22
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/text-transform.json",
4
+ "title": "Text transform",
5
+ "description": "A token that specifies how to capitalize an element's text.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/text-transform.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["uppercase", "lowercase", "capitalize", "none"]
19
+ },
20
+ "component": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "uuid": {}
24
+ }
25
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json",
4
+ "title": "Token",
5
+ "description": "A general token.",
6
+ "type": "object",
7
+ "properties": {
8
+ "value": {
9
+ "type": "string"
10
+ },
11
+ "component": {
12
+ "type": "string"
13
+ },
14
+ "deprecated": {
15
+ "type": "boolean"
16
+ },
17
+ "deprecated_comment": {
18
+ "type": "string"
19
+ },
20
+ "uuid": {
21
+ "type": "string",
22
+ "pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$",
23
+ "format": "uuid"
24
+ }
25
+ },
26
+ "required": ["value", "uuid"]
27
+ }