@phcdevworks/spectre-tokens 4.3.0 → 4.5.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 +2 -1
- package/dist/index.cjs +30 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +12 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/tokens.dtcg.json +52 -0
- package/package.json +6 -6
- package/tokens/primitives.json +17 -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.5.0 |
|
|
21
21
|
|
|
22
22
|
## Standard Workflow
|
|
23
23
|
|
|
@@ -301,6 +301,7 @@ The generated token object includes these namespaces:
|
|
|
301
301
|
- `text`
|
|
302
302
|
- `component`
|
|
303
303
|
- `modes`
|
|
304
|
+
- `tracking`
|
|
304
305
|
|
|
305
306
|
The exported runtime token object is a flattened string-based tree generated
|
|
306
307
|
from `tokens/`. Source-only wrapper fields such as `value` and `metadata` are
|
package/dist/index.cjs
CHANGED
|
@@ -1209,7 +1209,14 @@ var coreTokens = {
|
|
|
1209
1209
|
"md": "0 2px 6px -1px {colors.black} / 0.08",
|
|
1210
1210
|
"lg": "0 6px 16px -4px {colors.black} / 0.12",
|
|
1211
1211
|
"xl": "0 12px 24px -6px {colors.black} / 0.15",
|
|
1212
|
-
"2xl": "0 20px 48px -12px {colors.black} / 0.20"
|
|
1212
|
+
"2xl": "0 20px 48px -12px {colors.black} / 0.20",
|
|
1213
|
+
"inset": {
|
|
1214
|
+
"sm": "inset 0 1px 2px 0 {colors.black} / 0.06, inset 0 -1px 2px 0 {colors.black} / 0.06",
|
|
1215
|
+
"md": "inset 0 2px 6px -1px {colors.black} / 0.08, inset 0 -2px 6px -1px {colors.black} / 0.08",
|
|
1216
|
+
"lg": "inset 0 6px 16px -4px {colors.black} / 0.12, inset 0 -6px 16px -4px {colors.black} / 0.12",
|
|
1217
|
+
"xl": "inset 0 12px 24px -6px {colors.black} / 0.15, inset 0 -12px 24px -6px {colors.black} / 0.15",
|
|
1218
|
+
"2xl": "inset 0 20px 48px -12px {colors.black} / 0.20, inset 0 -20px 48px -12px {colors.black} / 0.20"
|
|
1219
|
+
}
|
|
1213
1220
|
},
|
|
1214
1221
|
"breakpoints": {
|
|
1215
1222
|
"sm": "640px",
|
|
@@ -1386,6 +1393,15 @@ var coreTokens = {
|
|
|
1386
1393
|
"dotted": "dotted"
|
|
1387
1394
|
}
|
|
1388
1395
|
},
|
|
1396
|
+
"tracking": {
|
|
1397
|
+
"tightest": "-0.075em",
|
|
1398
|
+
"tighter": "-0.05em",
|
|
1399
|
+
"tight": "-0.025em",
|
|
1400
|
+
"normal": "0em",
|
|
1401
|
+
"wide": "0.025em",
|
|
1402
|
+
"wider": "0.05em",
|
|
1403
|
+
"widest": "0.1em"
|
|
1404
|
+
},
|
|
1389
1405
|
"surface": {
|
|
1390
1406
|
"page": "{colors.neutral.50}",
|
|
1391
1407
|
"card": "{colors.white}",
|
|
@@ -1784,6 +1800,12 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
1784
1800
|
Object.entries(baseTokens.radii).forEach(([key, value]) => {
|
|
1785
1801
|
assign(toVariableName(prefix, "radius", key), value);
|
|
1786
1802
|
});
|
|
1803
|
+
const tracking = baseTokens.tracking;
|
|
1804
|
+
if (tracking) {
|
|
1805
|
+
Object.entries(tracking).forEach(([key, value]) => {
|
|
1806
|
+
assign(toVariableName(prefix, "tracking", key), value);
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1787
1809
|
const icons = baseTokens.icons;
|
|
1788
1810
|
if (icons) {
|
|
1789
1811
|
Object.entries(icons).forEach(([key, value]) => {
|
|
@@ -1836,7 +1858,13 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
1836
1858
|
assignRole(["body"], body);
|
|
1837
1859
|
}
|
|
1838
1860
|
Object.entries(baseTokens.shadows).forEach(([key, value]) => {
|
|
1839
|
-
|
|
1861
|
+
if (typeof value === "string") {
|
|
1862
|
+
assign(toVariableName(prefix, "shadow", key), value);
|
|
1863
|
+
return;
|
|
1864
|
+
}
|
|
1865
|
+
Object.entries(value).forEach(([nestedKey, nestedValue]) => {
|
|
1866
|
+
assign(toVariableName(prefix, "shadow", key, nestedKey), nestedValue);
|
|
1867
|
+
});
|
|
1840
1868
|
});
|
|
1841
1869
|
Object.entries(baseTokens.breakpoints).forEach(([key, value]) => {
|
|
1842
1870
|
assign(toVariableName(prefix, "breakpoint", key), value);
|