@adobe/spectrum-tokens 14.6.0 → 14.7.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.
@@ -20,12 +20,10 @@ test("ensure all component tokens are have component data", async (t) => {
20
20
  ...(await getFileTokens("icons.json")),
21
21
  };
22
22
  const result = Object.keys(tokenData).filter((tokenName) => {
23
- const component = tokenData[tokenName].component;
24
- if (!component) return true;
25
- // Spec-order names may have a variant prefix before the component,
26
- // so check that the component appears in the name rather than
27
- // requiring it at position 0.
28
- return !tokenName.includes(component);
23
+ return (
24
+ !Object.hasOwn(tokenData[tokenName], "component") ||
25
+ tokenName.indexOf(tokenData[tokenName].component) != 0
26
+ );
29
27
  });
30
28
  t.deepEqual(result, []);
31
29
  });
@@ -1,82 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/typography-scale.json",
4
- "title": "Typography Scale",
5
- "description": "A composite token that pairs a font size with its corresponding line height at a single typographic tier. Values change based on platform scale (desktop/mobile).",
6
- "type": "object",
7
- "allOf": [
8
- {
9
- "$ref": "set.json"
10
- }
11
- ],
12
- "properties": {
13
- "$schema": {
14
- "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/typography-scale.json"
15
- },
16
- "sets": {
17
- "type": "object",
18
- "properties": {
19
- "desktop": {
20
- "type": "object",
21
- "properties": {
22
- "value": {
23
- "type": "object",
24
- "properties": {
25
- "fontSize": {
26
- "type": "string"
27
- },
28
- "lineHeight": {
29
- "type": "string"
30
- }
31
- },
32
- "required": ["fontSize", "lineHeight"],
33
- "additionalProperties": false
34
- },
35
- "uuid": {
36
- "type": "string",
37
- "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}$",
38
- "format": "uuid"
39
- }
40
- },
41
- "required": ["value", "uuid"],
42
- "additionalProperties": false
43
- },
44
- "mobile": {
45
- "type": "object",
46
- "properties": {
47
- "value": {
48
- "type": "object",
49
- "properties": {
50
- "fontSize": {
51
- "type": "string"
52
- },
53
- "lineHeight": {
54
- "type": "string"
55
- }
56
- },
57
- "required": ["fontSize", "lineHeight"],
58
- "additionalProperties": false
59
- },
60
- "uuid": {
61
- "type": "string",
62
- "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}$",
63
- "format": "uuid"
64
- }
65
- },
66
- "required": ["value", "uuid"],
67
- "additionalProperties": false
68
- }
69
- },
70
- "required": ["desktop", "mobile"],
71
- "additionalProperties": false
72
- },
73
- "component": {},
74
- "private": {},
75
- "deprecated": {},
76
- "deprecated_comment": {},
77
- "replaced_by": {},
78
- "description": {},
79
- "uuid": {}
80
- },
81
- "required": ["sets", "uuid"]
82
- }