@phcdevworks/spectre-tokens 4.4.0 → 4.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.
- package/README.md +3 -3
- package/dist/index.cjs +144 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +117 -0
- package/dist/index.d.cts +129 -0
- package/dist/index.d.ts +129 -0
- package/dist/index.js +144 -8
- package/dist/index.js.map +1 -1
- package/dist/tokens.dtcg.json +447 -0
- package/package.json +11 -10
- package/tokens/components.json +55 -0
- package/tokens/palette.json +91 -0
- package/tokens/primitives.json +8 -1
- package/tokens/semantic-roles.json +36 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ contracts for specific frameworks and runtimes.
|
|
|
17
17
|
| Project team | `project-design` |
|
|
18
18
|
| Repository role | Spectre L1 design-token contract |
|
|
19
19
|
| Package/artifact | `@phcdevworks/spectre-tokens` |
|
|
20
|
-
| Current version/status | 4.
|
|
20
|
+
| Current version/status | 4.7.0 |
|
|
21
21
|
|
|
22
22
|
## Standard Workflow
|
|
23
23
|
|
|
@@ -312,8 +312,8 @@ of every token path, resolved value, and usage note.
|
|
|
312
312
|
|
|
313
313
|
The `layout` namespace includes section, stack, and container spacing tokens,
|
|
314
314
|
plus fixed layout width tokens for common consumer shells:
|
|
315
|
-
`layout.container.maxWidth`, `layout.container.maxWidthProse`,
|
|
316
|
-
`layout.sidebar.width`.
|
|
315
|
+
`layout.container.maxWidth`, `layout.container.maxWidthProse`,
|
|
316
|
+
`layout.container.maxWidthWide`, and `layout.sidebar.width`.
|
|
317
317
|
|
|
318
318
|
## Public Contract Guarantees
|
|
319
319
|
|
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,12 @@ var coreTokens = {
|
|
|
31
31
|
"component": {
|
|
32
32
|
"card": {
|
|
33
33
|
"text": "{colors.neutral.900}",
|
|
34
|
-
"textMuted": "{colors.neutral.600}"
|
|
34
|
+
"textMuted": "{colors.neutral.600}",
|
|
35
|
+
"padding": {
|
|
36
|
+
"sm": "1.5rem",
|
|
37
|
+
"md": "2rem",
|
|
38
|
+
"lg": "2.5rem"
|
|
39
|
+
}
|
|
35
40
|
},
|
|
36
41
|
"input": {
|
|
37
42
|
"text": "{colors.neutral.900}",
|
|
@@ -56,7 +61,11 @@ var coreTokens = {
|
|
|
56
61
|
"warningText": "{colors.warning.800}",
|
|
57
62
|
"dangerBg": "{colors.error.100}",
|
|
58
63
|
"dangerBgHover": "{colors.error.200}",
|
|
59
|
-
"dangerText": "{colors.error.800}"
|
|
64
|
+
"dangerText": "{colors.error.800}",
|
|
65
|
+
"inverseBg": "{colors.white} / 0.16",
|
|
66
|
+
"inverseBgHover": "{colors.white} / 0.24",
|
|
67
|
+
"inverseText": "{colors.white}",
|
|
68
|
+
"inverseBorder": "{colors.white} / 0.3"
|
|
60
69
|
},
|
|
61
70
|
"iconBox": {
|
|
62
71
|
"bg": "{colors.white}",
|
|
@@ -283,6 +292,18 @@ var coreTokens = {
|
|
|
283
292
|
"textDisabled": "{colors.neutral.400}",
|
|
284
293
|
"focusRing": "{colors.accent.500} / 0.4",
|
|
285
294
|
"focusVisible": "{colors.accent.500} / 0.4"
|
|
295
|
+
},
|
|
296
|
+
"inverse": {
|
|
297
|
+
"bg": "{colors.white} / 0.12",
|
|
298
|
+
"bgHover": "{colors.white} / 0.2",
|
|
299
|
+
"bgActive": "{colors.white} / 0.28",
|
|
300
|
+
"bgDisabled": "{colors.white} / 0.08",
|
|
301
|
+
"text": "{colors.white}",
|
|
302
|
+
"textDisabled": "{colors.neutral.400}",
|
|
303
|
+
"border": "{colors.white} / 0.3",
|
|
304
|
+
"borderDisabled": "{colors.white} / 0.16",
|
|
305
|
+
"focusRing": "{colors.info.500} / 0.4",
|
|
306
|
+
"focusVisible": "{colors.info.500} / 0.4"
|
|
286
307
|
}
|
|
287
308
|
},
|
|
288
309
|
"forms": {
|
|
@@ -1165,6 +1186,97 @@ var coreTokens = {
|
|
|
1165
1186
|
"800": "#2b2422",
|
|
1166
1187
|
"900": "#1d1816",
|
|
1167
1188
|
"950": "#0c0a09"
|
|
1189
|
+
},
|
|
1190
|
+
"integration-ink": {
|
|
1191
|
+
"50": "#fafafb",
|
|
1192
|
+
"100": "#f5f5f6",
|
|
1193
|
+
"200": "#e7e8e9",
|
|
1194
|
+
"300": "#d3d4d6",
|
|
1195
|
+
"400": "#9ea0a3",
|
|
1196
|
+
"500": "#707376",
|
|
1197
|
+
"600": "#525457",
|
|
1198
|
+
"700": "#3e4143",
|
|
1199
|
+
"800": "#27292b",
|
|
1200
|
+
"900": "#16181a",
|
|
1201
|
+
"950": "#06080a"
|
|
1202
|
+
},
|
|
1203
|
+
"integration-gunmetal": {
|
|
1204
|
+
"50": "#f0f0f1",
|
|
1205
|
+
"100": "#eaebec",
|
|
1206
|
+
"200": "#dddedf",
|
|
1207
|
+
"300": "#c8cbcd",
|
|
1208
|
+
"400": "#93979a",
|
|
1209
|
+
"500": "#666b6e",
|
|
1210
|
+
"600": "#484c50",
|
|
1211
|
+
"700": "#35393c",
|
|
1212
|
+
"800": "#1f2225",
|
|
1213
|
+
"900": "#0c1014",
|
|
1214
|
+
"950": "#000104"
|
|
1215
|
+
},
|
|
1216
|
+
"integration-signal-blue": {
|
|
1217
|
+
"50": "#ebf0f9",
|
|
1218
|
+
"100": "#d8e3f8",
|
|
1219
|
+
"200": "#bfd4f9",
|
|
1220
|
+
"300": "#95bdf9",
|
|
1221
|
+
"400": "#4a9df7",
|
|
1222
|
+
"500": "#0083f7",
|
|
1223
|
+
"600": "#006dfa",
|
|
1224
|
+
"700": "#005ce8",
|
|
1225
|
+
"800": "#004bb8",
|
|
1226
|
+
"900": "#003f8a",
|
|
1227
|
+
"950": "#002552"
|
|
1228
|
+
},
|
|
1229
|
+
"integration-icy-blue": {
|
|
1230
|
+
"50": "#e4f0fa",
|
|
1231
|
+
"100": "#cbe5fb",
|
|
1232
|
+
"200": "#a4d8ff",
|
|
1233
|
+
"300": "#59c4ff",
|
|
1234
|
+
"400": "#00a8ff",
|
|
1235
|
+
"500": "#0090ff",
|
|
1236
|
+
"600": "#007cff",
|
|
1237
|
+
"700": "#006aff",
|
|
1238
|
+
"800": "#0055ce",
|
|
1239
|
+
"900": "#004699",
|
|
1240
|
+
"950": "#002a5a"
|
|
1241
|
+
},
|
|
1242
|
+
"phcdevworks-raspberry-red": {
|
|
1243
|
+
"50": "#fff3f4",
|
|
1244
|
+
"100": "#ffe7e8",
|
|
1245
|
+
"200": "#ffcfd2",
|
|
1246
|
+
"300": "#fea5ae",
|
|
1247
|
+
"400": "#fd6982",
|
|
1248
|
+
"500": "#fe2b67",
|
|
1249
|
+
"600": "#ee005a",
|
|
1250
|
+
"700": "#c8054b",
|
|
1251
|
+
"800": "#a4113e",
|
|
1252
|
+
"900": "#8a1635",
|
|
1253
|
+
"950": "#4d081a"
|
|
1254
|
+
},
|
|
1255
|
+
"phcdevworks-deep-space-blue": {
|
|
1256
|
+
"50": "#edf1f7",
|
|
1257
|
+
"100": "#dce5f1",
|
|
1258
|
+
"200": "#c4d5ec",
|
|
1259
|
+
"300": "#a1bee3",
|
|
1260
|
+
"400": "#6b9ed5",
|
|
1261
|
+
"500": "#2583ca",
|
|
1262
|
+
"600": "#006dc2",
|
|
1263
|
+
"700": "#005bb0",
|
|
1264
|
+
"800": "#004a8c",
|
|
1265
|
+
"900": "#003f6d",
|
|
1266
|
+
"950": "#012641"
|
|
1267
|
+
},
|
|
1268
|
+
"phcdevworks-paper": {
|
|
1269
|
+
"50": "#fcfaf7",
|
|
1270
|
+
"100": "#f7f5f2",
|
|
1271
|
+
"200": "#e9e5e0",
|
|
1272
|
+
"300": "#d9d3ca",
|
|
1273
|
+
"400": "#aca08b",
|
|
1274
|
+
"500": "#807056",
|
|
1275
|
+
"600": "#5e523d",
|
|
1276
|
+
"700": "#4a3f2d",
|
|
1277
|
+
"800": "#2b251b",
|
|
1278
|
+
"900": "#1f190e",
|
|
1279
|
+
"950": "#0e0a05"
|
|
1168
1280
|
}
|
|
1169
1281
|
}
|
|
1170
1282
|
},
|
|
@@ -1209,7 +1321,14 @@ var coreTokens = {
|
|
|
1209
1321
|
"md": "0 2px 6px -1px {colors.black} / 0.08",
|
|
1210
1322
|
"lg": "0 6px 16px -4px {colors.black} / 0.12",
|
|
1211
1323
|
"xl": "0 12px 24px -6px {colors.black} / 0.15",
|
|
1212
|
-
"2xl": "0 20px 48px -12px {colors.black} / 0.20"
|
|
1324
|
+
"2xl": "0 20px 48px -12px {colors.black} / 0.20",
|
|
1325
|
+
"inset": {
|
|
1326
|
+
"sm": "inset 0 1px 2px 0 {colors.black} / 0.06, inset 0 -1px 2px 0 {colors.black} / 0.06",
|
|
1327
|
+
"md": "inset 0 2px 6px -1px {colors.black} / 0.08, inset 0 -2px 6px -1px {colors.black} / 0.08",
|
|
1328
|
+
"lg": "inset 0 6px 16px -4px {colors.black} / 0.12, inset 0 -6px 16px -4px {colors.black} / 0.12",
|
|
1329
|
+
"xl": "inset 0 12px 24px -6px {colors.black} / 0.15, inset 0 -12px 24px -6px {colors.black} / 0.15",
|
|
1330
|
+
"2xl": "inset 0 20px 48px -12px {colors.black} / 0.20, inset 0 -20px 48px -12px {colors.black} / 0.20"
|
|
1331
|
+
}
|
|
1213
1332
|
},
|
|
1214
1333
|
"breakpoints": {
|
|
1215
1334
|
"sm": "640px",
|
|
@@ -1403,13 +1522,16 @@ var coreTokens = {
|
|
|
1403
1522
|
"hover": "{colors.neutral.100}",
|
|
1404
1523
|
"selected": "{colors.info.50}",
|
|
1405
1524
|
"active": "{colors.neutral.200}",
|
|
1406
|
-
"divider": "{colors.neutral.200}"
|
|
1525
|
+
"divider": "{colors.neutral.200}",
|
|
1526
|
+
"inverse": "{colors.neutral.900}"
|
|
1407
1527
|
},
|
|
1408
1528
|
"link": {
|
|
1409
1529
|
"default": "{colors.brand.600}",
|
|
1410
1530
|
"hover": "{colors.brand.700}",
|
|
1411
1531
|
"active": "{colors.brand.800}",
|
|
1412
|
-
"visited": "{colors.accent.700}"
|
|
1532
|
+
"visited": "{colors.accent.700}",
|
|
1533
|
+
"onInverse": "{colors.neutral.300}",
|
|
1534
|
+
"onInverseHover": "{colors.brand.300}"
|
|
1413
1535
|
},
|
|
1414
1536
|
"text": {
|
|
1415
1537
|
"onPage": {
|
|
@@ -1425,6 +1547,10 @@ var coreTokens = {
|
|
|
1425
1547
|
"subtle": "{colors.neutral.500}",
|
|
1426
1548
|
"meta": "{colors.neutral.500}",
|
|
1427
1549
|
"brand": "{colors.brand.600}"
|
|
1550
|
+
},
|
|
1551
|
+
"onInverse": {
|
|
1552
|
+
"default": "{colors.neutral.50}",
|
|
1553
|
+
"muted": "{colors.neutral.300}"
|
|
1428
1554
|
}
|
|
1429
1555
|
},
|
|
1430
1556
|
"layout": {
|
|
@@ -1454,7 +1580,8 @@ var coreTokens = {
|
|
|
1454
1580
|
"lg": "2rem"
|
|
1455
1581
|
},
|
|
1456
1582
|
"maxWidth": "72rem",
|
|
1457
|
-
"maxWidthProse": "65ch"
|
|
1583
|
+
"maxWidthProse": "65ch",
|
|
1584
|
+
"maxWidthWide": "80rem"
|
|
1458
1585
|
},
|
|
1459
1586
|
"sidebar": {
|
|
1460
1587
|
"width": "16rem"
|
|
@@ -1774,6 +1901,9 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
1774
1901
|
if (container?.maxWidthProse) {
|
|
1775
1902
|
assign(toVariableName(prefix, "layout", "container", "max-width-prose"), container.maxWidthProse);
|
|
1776
1903
|
}
|
|
1904
|
+
if (container?.maxWidthWide) {
|
|
1905
|
+
assign(toVariableName(prefix, "layout", "container", "max-width-wide"), container.maxWidthWide);
|
|
1906
|
+
}
|
|
1777
1907
|
const sidebar = layout.sidebar;
|
|
1778
1908
|
if (sidebar?.width) {
|
|
1779
1909
|
assign(toVariableName(prefix, "layout", "sidebar", "width"), sidebar.width);
|
|
@@ -1851,7 +1981,13 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
1851
1981
|
assignRole(["body"], body);
|
|
1852
1982
|
}
|
|
1853
1983
|
Object.entries(baseTokens.shadows).forEach(([key, value]) => {
|
|
1854
|
-
|
|
1984
|
+
if (typeof value === "string") {
|
|
1985
|
+
assign(toVariableName(prefix, "shadow", key), value);
|
|
1986
|
+
return;
|
|
1987
|
+
}
|
|
1988
|
+
Object.entries(value).forEach(([nestedKey, nestedValue]) => {
|
|
1989
|
+
assign(toVariableName(prefix, "shadow", key, nestedKey), nestedValue);
|
|
1990
|
+
});
|
|
1855
1991
|
});
|
|
1856
1992
|
Object.entries(baseTokens.breakpoints).forEach(([key, value]) => {
|
|
1857
1993
|
assign(toVariableName(prefix, "breakpoint", key), value);
|
|
@@ -1976,7 +2112,7 @@ var generateCssVariables = (tokens2, options = {}) => {
|
|
|
1976
2112
|
componentAliases
|
|
1977
2113
|
);
|
|
1978
2114
|
Object.entries(linkTokens).forEach(([key, value]) => {
|
|
1979
|
-
const varName = toVariableName(prefix, "link", key);
|
|
2115
|
+
const varName = toVariableName(prefix, "link", kebabPathSegment(key));
|
|
1980
2116
|
const resolved = pickSemantic(tokens2, value);
|
|
1981
2117
|
addBase(varName, resolved);
|
|
1982
2118
|
addDark(varName, resolved);
|