@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/dist/index.js
CHANGED
|
@@ -3,7 +3,12 @@ var coreTokens = {
|
|
|
3
3
|
"component": {
|
|
4
4
|
"card": {
|
|
5
5
|
"text": "{colors.neutral.900}",
|
|
6
|
-
"textMuted": "{colors.neutral.600}"
|
|
6
|
+
"textMuted": "{colors.neutral.600}",
|
|
7
|
+
"padding": {
|
|
8
|
+
"sm": "1.5rem",
|
|
9
|
+
"md": "2rem",
|
|
10
|
+
"lg": "2.5rem"
|
|
11
|
+
}
|
|
7
12
|
},
|
|
8
13
|
"input": {
|
|
9
14
|
"text": "{colors.neutral.900}",
|
|
@@ -28,7 +33,11 @@ var coreTokens = {
|
|
|
28
33
|
"warningText": "{colors.warning.800}",
|
|
29
34
|
"dangerBg": "{colors.error.100}",
|
|
30
35
|
"dangerBgHover": "{colors.error.200}",
|
|
31
|
-
"dangerText": "{colors.error.800}"
|
|
36
|
+
"dangerText": "{colors.error.800}",
|
|
37
|
+
"inverseBg": "{colors.white} / 0.16",
|
|
38
|
+
"inverseBgHover": "{colors.white} / 0.24",
|
|
39
|
+
"inverseText": "{colors.white}",
|
|
40
|
+
"inverseBorder": "{colors.white} / 0.3"
|
|
32
41
|
},
|
|
33
42
|
"iconBox": {
|
|
34
43
|
"bg": "{colors.white}",
|
|
@@ -255,6 +264,18 @@ var coreTokens = {
|
|
|
255
264
|
"textDisabled": "{colors.neutral.400}",
|
|
256
265
|
"focusRing": "{colors.accent.500} / 0.4",
|
|
257
266
|
"focusVisible": "{colors.accent.500} / 0.4"
|
|
267
|
+
},
|
|
268
|
+
"inverse": {
|
|
269
|
+
"bg": "{colors.white} / 0.12",
|
|
270
|
+
"bgHover": "{colors.white} / 0.2",
|
|
271
|
+
"bgActive": "{colors.white} / 0.28",
|
|
272
|
+
"bgDisabled": "{colors.white} / 0.08",
|
|
273
|
+
"text": "{colors.white}",
|
|
274
|
+
"textDisabled": "{colors.neutral.400}",
|
|
275
|
+
"border": "{colors.white} / 0.3",
|
|
276
|
+
"borderDisabled": "{colors.white} / 0.16",
|
|
277
|
+
"focusRing": "{colors.info.500} / 0.4",
|
|
278
|
+
"focusVisible": "{colors.info.500} / 0.4"
|
|
258
279
|
}
|
|
259
280
|
},
|
|
260
281
|
"forms": {
|
|
@@ -1137,6 +1158,97 @@ var coreTokens = {
|
|
|
1137
1158
|
"800": "#2b2422",
|
|
1138
1159
|
"900": "#1d1816",
|
|
1139
1160
|
"950": "#0c0a09"
|
|
1161
|
+
},
|
|
1162
|
+
"integration-ink": {
|
|
1163
|
+
"50": "#fafafb",
|
|
1164
|
+
"100": "#f5f5f6",
|
|
1165
|
+
"200": "#e7e8e9",
|
|
1166
|
+
"300": "#d3d4d6",
|
|
1167
|
+
"400": "#9ea0a3",
|
|
1168
|
+
"500": "#707376",
|
|
1169
|
+
"600": "#525457",
|
|
1170
|
+
"700": "#3e4143",
|
|
1171
|
+
"800": "#27292b",
|
|
1172
|
+
"900": "#16181a",
|
|
1173
|
+
"950": "#06080a"
|
|
1174
|
+
},
|
|
1175
|
+
"integration-gunmetal": {
|
|
1176
|
+
"50": "#f0f0f1",
|
|
1177
|
+
"100": "#eaebec",
|
|
1178
|
+
"200": "#dddedf",
|
|
1179
|
+
"300": "#c8cbcd",
|
|
1180
|
+
"400": "#93979a",
|
|
1181
|
+
"500": "#666b6e",
|
|
1182
|
+
"600": "#484c50",
|
|
1183
|
+
"700": "#35393c",
|
|
1184
|
+
"800": "#1f2225",
|
|
1185
|
+
"900": "#0c1014",
|
|
1186
|
+
"950": "#000104"
|
|
1187
|
+
},
|
|
1188
|
+
"integration-signal-blue": {
|
|
1189
|
+
"50": "#ebf0f9",
|
|
1190
|
+
"100": "#d8e3f8",
|
|
1191
|
+
"200": "#bfd4f9",
|
|
1192
|
+
"300": "#95bdf9",
|
|
1193
|
+
"400": "#4a9df7",
|
|
1194
|
+
"500": "#0083f7",
|
|
1195
|
+
"600": "#006dfa",
|
|
1196
|
+
"700": "#005ce8",
|
|
1197
|
+
"800": "#004bb8",
|
|
1198
|
+
"900": "#003f8a",
|
|
1199
|
+
"950": "#002552"
|
|
1200
|
+
},
|
|
1201
|
+
"integration-icy-blue": {
|
|
1202
|
+
"50": "#e4f0fa",
|
|
1203
|
+
"100": "#cbe5fb",
|
|
1204
|
+
"200": "#a4d8ff",
|
|
1205
|
+
"300": "#59c4ff",
|
|
1206
|
+
"400": "#00a8ff",
|
|
1207
|
+
"500": "#0090ff",
|
|
1208
|
+
"600": "#007cff",
|
|
1209
|
+
"700": "#006aff",
|
|
1210
|
+
"800": "#0055ce",
|
|
1211
|
+
"900": "#004699",
|
|
1212
|
+
"950": "#002a5a"
|
|
1213
|
+
},
|
|
1214
|
+
"phcdevworks-raspberry-red": {
|
|
1215
|
+
"50": "#fff3f4",
|
|
1216
|
+
"100": "#ffe7e8",
|
|
1217
|
+
"200": "#ffcfd2",
|
|
1218
|
+
"300": "#fea5ae",
|
|
1219
|
+
"400": "#fd6982",
|
|
1220
|
+
"500": "#fe2b67",
|
|
1221
|
+
"600": "#ee005a",
|
|
1222
|
+
"700": "#c8054b",
|
|
1223
|
+
"800": "#a4113e",
|
|
1224
|
+
"900": "#8a1635",
|
|
1225
|
+
"950": "#4d081a"
|
|
1226
|
+
},
|
|
1227
|
+
"phcdevworks-deep-space-blue": {
|
|
1228
|
+
"50": "#edf1f7",
|
|
1229
|
+
"100": "#dce5f1",
|
|
1230
|
+
"200": "#c4d5ec",
|
|
1231
|
+
"300": "#a1bee3",
|
|
1232
|
+
"400": "#6b9ed5",
|
|
1233
|
+
"500": "#2583ca",
|
|
1234
|
+
"600": "#006dc2",
|
|
1235
|
+
"700": "#005bb0",
|
|
1236
|
+
"800": "#004a8c",
|
|
1237
|
+
"900": "#003f6d",
|
|
1238
|
+
"950": "#012641"
|
|
1239
|
+
},
|
|
1240
|
+
"phcdevworks-paper": {
|
|
1241
|
+
"50": "#fcfaf7",
|
|
1242
|
+
"100": "#f7f5f2",
|
|
1243
|
+
"200": "#e9e5e0",
|
|
1244
|
+
"300": "#d9d3ca",
|
|
1245
|
+
"400": "#aca08b",
|
|
1246
|
+
"500": "#807056",
|
|
1247
|
+
"600": "#5e523d",
|
|
1248
|
+
"700": "#4a3f2d",
|
|
1249
|
+
"800": "#2b251b",
|
|
1250
|
+
"900": "#1f190e",
|
|
1251
|
+
"950": "#0e0a05"
|
|
1140
1252
|
}
|
|
1141
1253
|
}
|
|
1142
1254
|
},
|
|
@@ -1181,7 +1293,14 @@ var coreTokens = {
|
|
|
1181
1293
|
"md": "0 2px 6px -1px {colors.black} / 0.08",
|
|
1182
1294
|
"lg": "0 6px 16px -4px {colors.black} / 0.12",
|
|
1183
1295
|
"xl": "0 12px 24px -6px {colors.black} / 0.15",
|
|
1184
|
-
"2xl": "0 20px 48px -12px {colors.black} / 0.20"
|
|
1296
|
+
"2xl": "0 20px 48px -12px {colors.black} / 0.20",
|
|
1297
|
+
"inset": {
|
|
1298
|
+
"sm": "inset 0 1px 2px 0 {colors.black} / 0.06, inset 0 -1px 2px 0 {colors.black} / 0.06",
|
|
1299
|
+
"md": "inset 0 2px 6px -1px {colors.black} / 0.08, inset 0 -2px 6px -1px {colors.black} / 0.08",
|
|
1300
|
+
"lg": "inset 0 6px 16px -4px {colors.black} / 0.12, inset 0 -6px 16px -4px {colors.black} / 0.12",
|
|
1301
|
+
"xl": "inset 0 12px 24px -6px {colors.black} / 0.15, inset 0 -12px 24px -6px {colors.black} / 0.15",
|
|
1302
|
+
"2xl": "inset 0 20px 48px -12px {colors.black} / 0.20, inset 0 -20px 48px -12px {colors.black} / 0.20"
|
|
1303
|
+
}
|
|
1185
1304
|
},
|
|
1186
1305
|
"breakpoints": {
|
|
1187
1306
|
"sm": "640px",
|
|
@@ -1375,13 +1494,16 @@ var coreTokens = {
|
|
|
1375
1494
|
"hover": "{colors.neutral.100}",
|
|
1376
1495
|
"selected": "{colors.info.50}",
|
|
1377
1496
|
"active": "{colors.neutral.200}",
|
|
1378
|
-
"divider": "{colors.neutral.200}"
|
|
1497
|
+
"divider": "{colors.neutral.200}",
|
|
1498
|
+
"inverse": "{colors.neutral.900}"
|
|
1379
1499
|
},
|
|
1380
1500
|
"link": {
|
|
1381
1501
|
"default": "{colors.brand.600}",
|
|
1382
1502
|
"hover": "{colors.brand.700}",
|
|
1383
1503
|
"active": "{colors.brand.800}",
|
|
1384
|
-
"visited": "{colors.accent.700}"
|
|
1504
|
+
"visited": "{colors.accent.700}",
|
|
1505
|
+
"onInverse": "{colors.neutral.300}",
|
|
1506
|
+
"onInverseHover": "{colors.brand.300}"
|
|
1385
1507
|
},
|
|
1386
1508
|
"text": {
|
|
1387
1509
|
"onPage": {
|
|
@@ -1397,6 +1519,10 @@ var coreTokens = {
|
|
|
1397
1519
|
"subtle": "{colors.neutral.500}",
|
|
1398
1520
|
"meta": "{colors.neutral.500}",
|
|
1399
1521
|
"brand": "{colors.brand.600}"
|
|
1522
|
+
},
|
|
1523
|
+
"onInverse": {
|
|
1524
|
+
"default": "{colors.neutral.50}",
|
|
1525
|
+
"muted": "{colors.neutral.300}"
|
|
1400
1526
|
}
|
|
1401
1527
|
},
|
|
1402
1528
|
"layout": {
|
|
@@ -1426,7 +1552,8 @@ var coreTokens = {
|
|
|
1426
1552
|
"lg": "2rem"
|
|
1427
1553
|
},
|
|
1428
1554
|
"maxWidth": "72rem",
|
|
1429
|
-
"maxWidthProse": "65ch"
|
|
1555
|
+
"maxWidthProse": "65ch",
|
|
1556
|
+
"maxWidthWide": "80rem"
|
|
1430
1557
|
},
|
|
1431
1558
|
"sidebar": {
|
|
1432
1559
|
"width": "16rem"
|
|
@@ -1746,6 +1873,9 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
1746
1873
|
if (container?.maxWidthProse) {
|
|
1747
1874
|
assign(toVariableName(prefix, "layout", "container", "max-width-prose"), container.maxWidthProse);
|
|
1748
1875
|
}
|
|
1876
|
+
if (container?.maxWidthWide) {
|
|
1877
|
+
assign(toVariableName(prefix, "layout", "container", "max-width-wide"), container.maxWidthWide);
|
|
1878
|
+
}
|
|
1749
1879
|
const sidebar = layout.sidebar;
|
|
1750
1880
|
if (sidebar?.width) {
|
|
1751
1881
|
assign(toVariableName(prefix, "layout", "sidebar", "width"), sidebar.width);
|
|
@@ -1823,7 +1953,13 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
1823
1953
|
assignRole(["body"], body);
|
|
1824
1954
|
}
|
|
1825
1955
|
Object.entries(baseTokens.shadows).forEach(([key, value]) => {
|
|
1826
|
-
|
|
1956
|
+
if (typeof value === "string") {
|
|
1957
|
+
assign(toVariableName(prefix, "shadow", key), value);
|
|
1958
|
+
return;
|
|
1959
|
+
}
|
|
1960
|
+
Object.entries(value).forEach(([nestedKey, nestedValue]) => {
|
|
1961
|
+
assign(toVariableName(prefix, "shadow", key, nestedKey), nestedValue);
|
|
1962
|
+
});
|
|
1827
1963
|
});
|
|
1828
1964
|
Object.entries(baseTokens.breakpoints).forEach(([key, value]) => {
|
|
1829
1965
|
assign(toVariableName(prefix, "breakpoint", key), value);
|
|
@@ -1948,7 +2084,7 @@ var generateCssVariables = (tokens2, options = {}) => {
|
|
|
1948
2084
|
componentAliases
|
|
1949
2085
|
);
|
|
1950
2086
|
Object.entries(linkTokens).forEach(([key, value]) => {
|
|
1951
|
-
const varName = toVariableName(prefix, "link", key);
|
|
2087
|
+
const varName = toVariableName(prefix, "link", kebabPathSegment(key));
|
|
1952
2088
|
const resolved = pickSemantic(tokens2, value);
|
|
1953
2089
|
addBase(varName, resolved);
|
|
1954
2090
|
addDark(varName, resolved);
|