@adobe/spectrum-tokens 15.6.0 → 15.8.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 (60) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/json/drover.json +159 -12
  3. package/dist/json/variables.json +1145 -101
  4. package/package.json +1 -1
  5. package/src/accordion.json +4 -1
  6. package/src/action-bar.json +8 -2
  7. package/src/alert-banner.json +8 -2
  8. package/src/alert-dialog.json +4 -1
  9. package/src/avatar-group.json +28 -7
  10. package/src/avatar.json +68 -17
  11. package/src/button.json +4 -1
  12. package/src/card.json +83 -22
  13. package/src/checkbox.json +16 -4
  14. package/src/coach-mark.json +20 -5
  15. package/src/collection-card.json +40 -10
  16. package/src/color-loupe.json +8 -2
  17. package/src/color-slider.json +4 -1
  18. package/src/color-wheel.json +2 -2
  19. package/src/combo-box.json +4 -1
  20. package/src/contextual-help.json +4 -1
  21. package/src/divider.json +20 -5
  22. package/src/drop-zone.json +4 -1
  23. package/src/field.json +16 -40
  24. package/src/illustrated-message.json +5 -2
  25. package/src/in-field-progress-circle.json +16 -4
  26. package/src/in-line-alert.json +4 -1
  27. package/src/layout-component.json +793 -1
  28. package/src/layout.json +677 -15
  29. package/src/list-view.json +8 -2
  30. package/src/meter.json +25 -7
  31. package/src/number-field.json +20 -5
  32. package/src/picker.json +4 -1
  33. package/src/progress-bar.json +20 -5
  34. package/src/progress-circle.json +12 -3
  35. package/src/radio-button.json +16 -4
  36. package/src/rating.json +8 -2
  37. package/src/search-field.json +4 -1
  38. package/src/segmented-control.json +8 -2
  39. package/src/select-box.json +16 -4
  40. package/src/side-navigation.json +16 -4
  41. package/src/slider.json +36 -9
  42. package/src/standard-dialog.json +12 -3
  43. package/src/standard-panel.json +11 -3
  44. package/src/status-light.json +16 -4
  45. package/src/steplist.json +40 -13
  46. package/src/swatch.json +20 -5
  47. package/src/switch.json +16 -4
  48. package/src/table.json +40 -16
  49. package/src/tabs.json +16 -4
  50. package/src/tag-field.json +28 -7
  51. package/src/takeover-dialog.json +6 -2
  52. package/src/text-area.json +8 -2
  53. package/src/text-field.json +4 -1
  54. package/src/thumbnail.json +48 -12
  55. package/src/toast.json +8 -2
  56. package/src/tooltip.json +8 -5
  57. package/src/tree-view.json +8 -2
  58. package/src/user-card.json +32 -8
  59. package/test/checkSetsUnique.js +9 -0
  60. package/test/sizeRefinements.test.js +261 -0
package/src/toast.json CHANGED
@@ -23,6 +23,8 @@
23
23
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
24
24
  "component": "toast",
25
25
  "uuid": "28138e79-4a91-4446-a07e-7c8bac379b18",
26
+ "deprecated": true,
27
+ "deprecated_comment": "Content + padding derived; matches banner-height exactly.",
26
28
  "sets": {
27
29
  "desktop": {
28
30
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
@@ -34,12 +36,15 @@
34
36
  "value": "60px",
35
37
  "uuid": "12c8ae92-16b9-48ec-801c-bf07785da4b3"
36
38
  }
37
- }
39
+ },
40
+ "renamed": "banner-height"
38
41
  },
39
42
  "toast-maximum-width": {
40
43
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
41
44
  "component": "toast",
42
45
  "uuid": "e8dc3919-27bb-4fec-9c7c-7842ca1e6946",
46
+ "deprecated": true,
47
+ "deprecated_comment": "Consolidated into the shared banner-maximum-width token.",
43
48
  "sets": {
44
49
  "desktop": {
45
50
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
@@ -51,7 +56,8 @@
51
56
  "value": "420px",
52
57
  "uuid": "a4de5997-1eb1-430f-9a9f-cf2637d02d34"
53
58
  }
54
- }
59
+ },
60
+ "renamed": "banner-maximum-width"
55
61
  },
56
62
  "toast-top-to-text": {
57
63
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
package/src/tooltip.json CHANGED
@@ -3,6 +3,8 @@
3
3
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
4
4
  "component": "tooltip",
5
5
  "uuid": "e606fea0-3540-4461-96b5-c57e9d9b39ef",
6
+ "deprecated": true,
7
+ "deprecated_comment": "Consolidated into the shared container-maximum-width-* scale.",
6
8
  "sets": {
7
9
  "desktop": {
8
10
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
@@ -14,7 +16,8 @@
14
16
  "value": "200px",
15
17
  "uuid": "6d7623e1-65f5-4af5-8c08-b33b093b85ae"
16
18
  }
17
- }
19
+ },
20
+ "renamed": "container-maximum-width-2x-small"
18
21
  },
19
22
  "tooltip-tip-corner-radius": {
20
23
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
@@ -29,12 +32,12 @@
29
32
  "sets": {
30
33
  "desktop": {
31
34
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
32
- "value": "5px",
35
+ "value": "4px",
33
36
  "uuid": "481757aa-c6b5-4281-9a63-feeb1c88aec6"
34
37
  },
35
38
  "mobile": {
36
39
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
37
- "value": "6px",
40
+ "value": "5px",
38
41
  "uuid": "70c9f65f-1e23-4c47-94dd-0c3ddde15743"
39
42
  }
40
43
  }
@@ -46,12 +49,12 @@
46
49
  "sets": {
47
50
  "desktop": {
48
51
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
49
- "value": "10px",
52
+ "value": "8px",
50
53
  "uuid": "0732bd0e-c5c0-4e58-8fee-2015c1753237"
51
54
  },
52
55
  "mobile": {
53
56
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
54
- "value": "12px",
57
+ "value": "10px",
55
58
  "uuid": "ad2c09a6-c42e-4eef-94a3-6c2180c6e2af"
56
59
  }
57
60
  }
@@ -231,6 +231,8 @@
231
231
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
232
232
  "component": "tree-view",
233
233
  "uuid": "b8dc040f-e26d-4d80-b27b-8af4381d24da",
234
+ "deprecated": true,
235
+ "deprecated_comment": "Consolidated into the shared list-item-minimum-height-* scale.",
234
236
  "sets": {
235
237
  "desktop": {
236
238
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
@@ -242,7 +244,8 @@
242
244
  "value": "50px",
243
245
  "uuid": "36d1219e-f34a-4ee9-bfa0-a93a42046d94"
244
246
  }
245
- }
247
+ },
248
+ "renamed": "list-item-minimum-height"
246
249
  },
247
250
  "tree-view-minimum-top-to-context-area": {
248
251
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
@@ -268,6 +271,8 @@
268
271
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
269
272
  "component": "tree-view",
270
273
  "uuid": "85b826d7-84dc-4843-9df4-b8385e7ce133",
274
+ "deprecated": true,
275
+ "deprecated_comment": "Consolidated into the shared list-item-minimum-width-* scale.",
271
276
  "sets": {
272
277
  "desktop": {
273
278
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
@@ -279,7 +284,8 @@
279
284
  "value": "200px",
280
285
  "uuid": "06c90c91-1598-4150-a431-e733ba39bec5"
281
286
  }
282
- }
287
+ },
288
+ "renamed": "list-item-minimum-width-medium"
283
289
  },
284
290
  "tree-view-row-background-hover": {
285
291
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/alias.json",
@@ -3,48 +3,72 @@
3
3
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
4
4
  "component": "user-card",
5
5
  "value": "236px",
6
- "uuid": "9a9f173d-6262-490f-976f-bd9abb9ec355"
6
+ "uuid": "9a9f173d-6262-490f-976f-bd9abb9ec355",
7
+ "deprecated": true,
8
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
9
+ "renamed": "container-minimum-height-medium"
7
10
  },
8
11
  "user-card-minimum-height-large": {
9
12
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
10
13
  "component": "user-card",
11
14
  "value": "219px",
12
- "uuid": "7cf979ef-c47b-41f3-8230-49d67ad47740"
15
+ "uuid": "7cf979ef-c47b-41f3-8230-49d67ad47740",
16
+ "deprecated": true,
17
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
18
+ "renamed": "container-minimum-height-medium"
13
19
  },
14
20
  "user-card-minimum-height-medium": {
15
21
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
16
22
  "component": "user-card",
17
23
  "value": "202px",
18
- "uuid": "53c81b30-6d98-4eaa-857f-15707d54a548"
24
+ "uuid": "53c81b30-6d98-4eaa-857f-15707d54a548",
25
+ "deprecated": true,
26
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
27
+ "renamed": "container-minimum-height-small"
19
28
  },
20
29
  "user-card-minimum-height-small": {
21
30
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
22
31
  "component": "user-card",
23
32
  "value": "192px",
24
- "uuid": "f646530e-480c-4dbb-85fe-771eb5685966"
33
+ "uuid": "f646530e-480c-4dbb-85fe-771eb5685966",
34
+ "deprecated": true,
35
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
36
+ "renamed": "container-minimum-height-small"
25
37
  },
26
38
  "user-card-minimum-height-title-below-extra-large": {
27
39
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
28
40
  "component": "user-card",
29
41
  "value": "263px",
30
- "uuid": "a603a785-8cd8-4caf-a2b4-cfe3371cc10e"
42
+ "uuid": "a603a785-8cd8-4caf-a2b4-cfe3371cc10e",
43
+ "deprecated": true,
44
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
45
+ "renamed": "container-minimum-height-medium"
31
46
  },
32
47
  "user-card-minimum-height-title-below-large": {
33
48
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
34
49
  "component": "user-card",
35
50
  "value": "244px",
36
- "uuid": "4cc4f673-912b-4e53-a75e-c8bd4603ab19"
51
+ "uuid": "4cc4f673-912b-4e53-a75e-c8bd4603ab19",
52
+ "deprecated": true,
53
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
54
+ "renamed": "container-minimum-height-medium"
37
55
  },
38
56
  "user-card-minimum-height-title-below-medium": {
39
57
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
40
58
  "component": "user-card",
41
59
  "value": "224px",
42
- "uuid": "5f4edfbc-eb2e-4dd5-add1-bf45530b0e61"
60
+ "uuid": "5f4edfbc-eb2e-4dd5-add1-bf45530b0e61",
61
+ "deprecated": true,
62
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
63
+ "renamed": "container-minimum-height-small"
43
64
  },
44
65
  "user-card-minimum-height-title-below-small": {
45
66
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
46
67
  "component": "user-card",
47
68
  "value": "212px",
48
- "uuid": "3373c4d2-d81b-4649-bc24-5251879778c1"
69
+ "uuid": "3373c4d2-d81b-4649-bc24-5251879778c1",
70
+ "deprecated": true,
71
+ "deprecated_comment": "Consolidated into the shared container-minimum-height-* scale.",
72
+ "renamed": "container-minimum-height-small"
49
73
  }
50
74
  }
@@ -31,10 +31,19 @@ test("Single set properties shouldn't be deprecated", async (t) => {
31
31
  t.deepEqual(failingTokens, []);
32
32
  });
33
33
 
34
+ // Sets that intentionally keep identical values across scales per design request.
35
+ const intentionallyUniformSets = new Set([
36
+ "tooltip-tip-height",
37
+ "tooltip-tip-width",
38
+ ]);
39
+
34
40
  test("Sets should have unique values", async (t) => {
35
41
  const tokens = await getAllTokens();
36
42
  const result = Object.keys(tokens).filter((tokenName) => {
37
43
  const token = tokens[tokenName];
44
+ if (intentionallyUniformSets.has(tokenName)) {
45
+ return false;
46
+ }
38
47
  if (Object.hasOwn(token, "sets") && !isDeprecated(token)) {
39
48
  const setValues = Object.keys(token.sets).reduce(
40
49
  (accumulator, currentValue) =>
@@ -0,0 +1,261 @@
1
+ /*
2
+ Copyright 2026 Adobe. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0.
4
+ */
5
+
6
+ import test from "ava";
7
+ import { getAllTokens, readJson } from "../index.js";
8
+
9
+ const sourceUrl = new URL("../../design-data/", import.meta.url);
10
+ const sourceTokens = (
11
+ await Promise.all(
12
+ ["layout", "layout-component"].map((file) =>
13
+ readJson(new URL(`tokens/${file}.tokens.json`, sourceUrl)),
14
+ ),
15
+ )
16
+ ).flat();
17
+ // A scale-set has a desktop and a mobile record that share one legacyKey.
18
+ const byKey = new Map(
19
+ sourceTokens
20
+ .filter((token) => token.name.scale !== "mobile")
21
+ .map((token) => [token.name.legacyKey, token]),
22
+ );
23
+ const legacyTokens = await getAllTokens();
24
+ const legacy = (key) => legacyTokens[key].sets?.desktop ?? legacyTokens[key];
25
+ const aliasSchema =
26
+ "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/alias.json";
27
+
28
+ for (const [key, targetKey, value] of [
29
+ ["container-maximum-width-2x-small", "size-1200", "144px"],
30
+ ["container-maximum-width-extra-small", "size-1300", "192px"],
31
+ ["container-maximum-width-small", "size-1400", "240px"],
32
+ ["list-item-minimum-height", "size-600", "40px"],
33
+ ]) {
34
+ test(`${key} aliases ${targetKey} (${value}) in canonical and legacy data`, (t) => {
35
+ const token = byKey.get(key);
36
+ const target = byKey.get(targetKey);
37
+
38
+ t.truthy(token);
39
+ t.truthy(target);
40
+ t.is(token.$schema, aliasSchema);
41
+ t.is(token.$ref, target.uuid);
42
+ t.false(Object.hasOwn(token, "value"));
43
+ t.is(target.value, value);
44
+ t.is(legacy(key).$schema, aliasSchema);
45
+ t.is(legacy(key).value, `{${targetKey}}`);
46
+ t.is(legacy(targetKey).value, value);
47
+ t.is(legacy(key).uuid, token.uuid);
48
+ });
49
+ }
50
+
51
+ test("the new container maximum width uses the 2x-small taxonomy", (t) => {
52
+ t.deepEqual(byKey.get("container-maximum-width-2x-small").name, {
53
+ structure: "container",
54
+ property: "maximum-width",
55
+ size: "xxs",
56
+ scale: "desktop",
57
+ legacyKey: "container-maximum-width-2x-small",
58
+ });
59
+ });
60
+
61
+ for (const [key, uuid, value] of [
62
+ ["banner-width", "1236fe9c-ea39-415c-94b6-e35333bbfe39", "896px"],
63
+ ["banner-height", "b9e67494-44bb-48d9-b4e6-d2385c6ab41d", "56px"],
64
+ ["banner-minimum-height", "e271c350-f967-4425-8f24-12be5f43f7c7", "56px"],
65
+ ]) {
66
+ test(`${key} drops the medium size while preserving its identity and value`, (t) => {
67
+ const token = byKey.get(key);
68
+
69
+ t.truthy(token);
70
+ t.false(Object.hasOwn(token.name, "size"));
71
+ t.is(token.uuid, uuid);
72
+ t.is(token.value, value);
73
+ t.false(byKey.has(`${key}-medium`));
74
+ t.false(Object.hasOwn(legacyTokens, `${key}-medium`));
75
+ t.is(legacy(key).uuid, uuid);
76
+ t.is(legacy(key).value, value);
77
+ });
78
+ }
79
+
80
+ for (const [file, key, targetKey, count] of [
81
+ [
82
+ "card",
83
+ "card-maximum-width-extra-small",
84
+ "container-maximum-width-2x-small",
85
+ 1,
86
+ ],
87
+ [
88
+ "card",
89
+ "card-maximum-width-large",
90
+ "container-maximum-width-extra-large",
91
+ 1,
92
+ ],
93
+ [
94
+ "card",
95
+ "card-maximum-width-extra-large",
96
+ "container-maximum-width-2x-large",
97
+ 1,
98
+ ],
99
+ ["tooltip", "tooltip-maximum-width", "container-maximum-width-2x-small", 2],
100
+ [
101
+ "illustrated-message",
102
+ "illustrated-message-horizontal-maximum-width",
103
+ "container-maximum-width-2x-large",
104
+ 1,
105
+ ],
106
+ ["alert-banner", "alert-banner-minimum-height", "banner-minimum-height", 2],
107
+ ]) {
108
+ test(`${key} maps every scale to ${targetKey}`, async (t) => {
109
+ const relationships = await readJson(
110
+ new URL(`relationships/${file}.json`, sourceUrl),
111
+ );
112
+ const matches = relationships.filter((token) => token.legacyKey === key);
113
+ const target = byKey.get(targetKey);
114
+
115
+ t.is(matches.length, count);
116
+ t.truthy(target);
117
+ for (const token of matches) {
118
+ t.is(token.lifecycle.replacedBy, target.uuid);
119
+ }
120
+ t.is(legacyTokens[key].renamed, targetKey);
121
+ });
122
+ }
123
+
124
+ const byUuid = new Map(sourceTokens.map((token) => [token.uuid, token]));
125
+ const resolvePx = (token) =>
126
+ token.$ref
127
+ ? resolvePx(byUuid.get(token.$ref))
128
+ : Number.parseFloat(token.value);
129
+ const mobileTwins = sourceTokens.filter(
130
+ (token) =>
131
+ token.name.scale === "mobile" &&
132
+ token.rationale?.startsWith("Mobile value: desktop x 1.25"),
133
+ );
134
+
135
+ test("mobile twins are desktop x 1.25, rounded half up", (t) => {
136
+ t.true(mobileTwins.length > 0);
137
+ for (const twin of mobileTwins) {
138
+ const desktop = sourceTokens.find(
139
+ (token) =>
140
+ token.conceptId === twin.conceptId && token.name.scale === "desktop",
141
+ );
142
+ t.truthy(desktop, twin.name.legacyKey);
143
+ t.is(
144
+ Number.parseFloat(twin.value),
145
+ Math.floor(resolvePx(desktop) * 1.25 + 0.5),
146
+ twin.name.legacyKey,
147
+ );
148
+ t.deepEqual(Object.keys(legacyTokens[twin.name.legacyKey].sets), [
149
+ "desktop",
150
+ "mobile",
151
+ ]);
152
+ }
153
+ });
154
+
155
+ test("hand-set mobile values keep the previous S2 mobile size", (t) => {
156
+ for (const [key, mobile] of [
157
+ ["banner-width", "680px"],
158
+ ["container-maximum-width-large", "248px"],
159
+ ["container-minimum-width-extra-large", "216px"],
160
+ ["field-width-2x-large", "312px"],
161
+ ]) {
162
+ t.is(legacyTokens[key].sets.mobile.value, mobile, key);
163
+ }
164
+ });
165
+
166
+ test("color controls stay active and scale 1.25x on mobile", (t) => {
167
+ for (const [key, desktop, mobile] of [
168
+ ["color-control-track-width", "24px", "30px"],
169
+ ["color-slider-minimum-length", "80px", "100px"],
170
+ ["color-wheel-minimum-width", "144px", "180px"],
171
+ ]) {
172
+ t.is(legacyTokens[key].sets.desktop.value, desktop, key);
173
+ t.is(legacyTokens[key].sets.mobile.value, mobile, key);
174
+ t.falsy(legacyTokens[key].deprecated, key);
175
+ t.falsy(legacyTokens[key].renamed, key);
176
+ }
177
+ });
178
+
179
+ test("shared heights gain mobile values so their old tokens rename to a mobile-aware token", (t) => {
180
+ for (const [key, desktop, mobile, olds] of [
181
+ ["base-height-2x-large", "56px", "70px", ["component-height-400"]],
182
+ ["base-height-3x-large", "64px", "80px", ["component-height-500"]],
183
+ [
184
+ "list-item-height-large",
185
+ "48px",
186
+ "60px",
187
+ ["table-row-height-large", "table-section-header-row-height-extra-large"],
188
+ ],
189
+ [
190
+ "list-item-height-extra-large",
191
+ "56px",
192
+ "70px",
193
+ ["table-row-height-extra-large"],
194
+ ],
195
+ [
196
+ "list-item-height-extra-small",
197
+ "24px",
198
+ "30px",
199
+ ["table-section-header-row-height-small"],
200
+ ],
201
+ ]) {
202
+ t.is(legacyTokens[key].sets.desktop.value, desktop, key);
203
+ t.is(legacyTokens[key].sets.mobile.value, mobile, key);
204
+ for (const old of olds) {
205
+ t.is(legacyTokens[old].renamed, key, old);
206
+ t.is(
207
+ legacyTokens[old].sets.mobile.value,
208
+ legacyTokens[key].sets.mobile.value,
209
+ old,
210
+ );
211
+ }
212
+ }
213
+ });
214
+
215
+ test("component tokens stay active at the sizes the S2 team set", (t) => {
216
+ for (const [key, desktop, mobile] of [
217
+ ["color-area-height", "192px", "240px"],
218
+ ["color-area-width", "192px", "240px"],
219
+ ["color-wheel-width", "192px", "240px"],
220
+ ["color-area-minimum-height", "64px", "80px"],
221
+ ["color-area-minimum-width", "64px", "80px"],
222
+ ["color-handle-size", "16px", "20px"],
223
+ ["color-handle-size-key-focus", "32px", "40px"],
224
+ ]) {
225
+ t.is(legacyTokens[key].sets.desktop.value, desktop, key);
226
+ t.is(legacyTokens[key].sets.mobile.value, mobile, key);
227
+ t.falsy(legacyTokens[key].deprecated, key);
228
+ t.falsy(legacyTokens[key].renamed, key);
229
+ }
230
+ for (const [key, value] of [
231
+ ["illustrated-message-vertical-maximum-width", "352px"],
232
+ ["card-minimum-width-large", "288px"],
233
+ ["standard-dialog-minimum-width", "288px"],
234
+ ["alert-dialog-minimum-width", "288px"],
235
+ ]) {
236
+ t.is(legacyTokens[key].value, value, key);
237
+ t.falsy(legacyTokens[key].deprecated, key);
238
+ }
239
+ t.is(
240
+ legacyTokens["illustrated-message-maximum-width"].value,
241
+ "{illustrated-message-vertical-maximum-width}",
242
+ );
243
+ });
244
+
245
+ test("mobile relationships point at the mobile twin, not the desktop token", async (t) => {
246
+ for (const [file, key] of [
247
+ ["table", "table-row-height-large-regular"],
248
+ ["table", "table-row-height-extra-large-regular"],
249
+ ["table", "table-row-height-medium-regular"],
250
+ ["table", "table-row-height-small-regular"],
251
+ ["field", "field-width"],
252
+ ]) {
253
+ const relationships = await readJson(
254
+ new URL(`relationships/${file}.json`, sourceUrl),
255
+ );
256
+ const mobile = relationships.find(
257
+ (r) => r.legacyKey === key && r.scope.options.scale === "mobile",
258
+ );
259
+ t.is(byUuid.get(mobile.$ref).name.scale, "mobile", key);
260
+ }
261
+ });