@phcdevworks/spectre-tokens 2.6.0 → 2.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.
- package/README.md +15 -13
- package/dist/index.cjs +96 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -25
- package/dist/index.d.cts +47 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +96 -65
- package/dist/index.js.map +1 -1
- package/dist/tokens.dtcg.json +2478 -0
- package/package.json +19 -11
- package/tokens/components.json +6 -0
- package/tokens/modes.json +1 -1
- package/tokens/palette.json +3 -3
- package/tokens/primitives.json +47 -20
- package/tokens/typography.json +36 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phcdevworks/spectre-tokens",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "@phcdevworks/spectre-tokens is the design-token package of the Spectre system for downstream Spectre packages and compatible applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"phcdevworks",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"node": "^22.12.0 || >=24.0.0"
|
|
38
38
|
},
|
|
39
39
|
"type": "module",
|
|
40
|
-
"packageManager": "npm@11.
|
|
40
|
+
"packageManager": "npm@11.16.0",
|
|
41
41
|
"main": "./dist/index.cjs",
|
|
42
42
|
"module": "./dist/index.js",
|
|
43
43
|
"types": "./dist/index.d.ts",
|
|
@@ -59,9 +59,10 @@
|
|
|
59
59
|
"scripts": {
|
|
60
60
|
"generate": "tsx scripts/generate-types.ts",
|
|
61
61
|
"prebuild": "npm run generate",
|
|
62
|
-
"build": "npm run build:ts && npm run build:css",
|
|
62
|
+
"build": "npm run build:ts && npm run build:css && npm run build:design",
|
|
63
63
|
"build:ts": "tsup --config tsup.config.ts",
|
|
64
64
|
"build:css": "tsx scripts/build-css.ts",
|
|
65
|
+
"build:design": "tsx scripts/build-dtcg.ts",
|
|
65
66
|
"check:manifest": "tsx scripts/check-contract-manifest.ts",
|
|
66
67
|
"check:docs": "tsx scripts/check-doc-contract.ts",
|
|
67
68
|
"check:dist": "tsx scripts/check-dist-sync.ts",
|
|
@@ -73,12 +74,17 @@
|
|
|
73
74
|
"check:css": "tsx scripts/check-css-contract.ts",
|
|
74
75
|
"check:tailwind": "tsx scripts/check-tailwind-contract.ts",
|
|
75
76
|
"check:consumer": "tsx scripts/check-consumer-smoke.ts",
|
|
77
|
+
"check:integration": "tsx scripts/check-integration.ts",
|
|
78
|
+
"check:ecosystem": "spectre-manifest-validate spectre.manifest.json && spectre-manifest-check spectre.manifest.json .",
|
|
76
79
|
"check:classification": "tsx scripts/check-change-classification.ts",
|
|
80
|
+
"check:deprecation": "tsx scripts/check-deprecation.ts",
|
|
81
|
+
"release:propose": "tsx scripts/propose-version.ts",
|
|
77
82
|
"lint": "eslint .",
|
|
78
83
|
"format": "prettier --write .",
|
|
79
|
-
"check": "npm run build && npm run check:manifest && npm run check:structure && npm run check:locked && npm run check:contrast && npm run check:regression && npm run check:docs && npm run check:exports && npm run check:css && npm run check:tailwind && npm run check:consumer && npm run check:classification && npm run check:dist && npm run lint",
|
|
84
|
+
"check": "npm run build && npm run check:manifest && npm run check:structure && npm run check:locked && npm run check:contrast && npm run check:regression && npm run check:docs && npm run check:exports && npm run check:css && npm run check:tailwind && npm run check:consumer && npm run check:integration && npm run check:ecosystem && npm run check:classification && npm run check:deprecation && npm run check:dist && npm run lint",
|
|
80
85
|
"check:all": "npm run check",
|
|
81
|
-
"test": "
|
|
86
|
+
"test:unit": "vitest run",
|
|
87
|
+
"test": "npm run test:unit && npm run check",
|
|
82
88
|
"prepublishOnly": "npm run check"
|
|
83
89
|
},
|
|
84
90
|
"publishConfig": {
|
|
@@ -88,17 +94,19 @@
|
|
|
88
94
|
"typescript": "^5.9 || ^6.0"
|
|
89
95
|
},
|
|
90
96
|
"devDependencies": {
|
|
91
|
-
"@
|
|
92
|
-
"@
|
|
93
|
-
"@typescript-eslint/
|
|
97
|
+
"@phcdevworks/spectre-manifest": "^1.0.0",
|
|
98
|
+
"@types/node": "^25.9.2",
|
|
99
|
+
"@typescript-eslint/eslint-plugin": "^8.60.1",
|
|
100
|
+
"@typescript-eslint/parser": "^8.60.1",
|
|
94
101
|
"colord": "^2.9.3",
|
|
95
|
-
"eslint": "^10.4.
|
|
102
|
+
"eslint": "^10.4.1",
|
|
96
103
|
"jiti": "^2.7.0",
|
|
97
104
|
"prettier": "^3.8.3",
|
|
98
105
|
"ts-node": "^10.9.2",
|
|
99
106
|
"tsup": "^8.5.1",
|
|
100
|
-
"tsx": "^4.22.
|
|
107
|
+
"tsx": "^4.22.4",
|
|
101
108
|
"typescript": "^6.0.3",
|
|
102
|
-
"typescript-eslint": "^8.
|
|
109
|
+
"typescript-eslint": "^8.60.1",
|
|
110
|
+
"vitest": "^4.1.8"
|
|
103
111
|
}
|
|
104
112
|
}
|
package/tokens/components.json
CHANGED
|
@@ -403,6 +403,9 @@
|
|
|
403
403
|
},
|
|
404
404
|
"focusRing": {
|
|
405
405
|
"value": "{colors.error.500} / 0.4"
|
|
406
|
+
},
|
|
407
|
+
"focusVisible": {
|
|
408
|
+
"value": "{colors.error.500} / 0.4"
|
|
406
409
|
}
|
|
407
410
|
},
|
|
408
411
|
"success": {
|
|
@@ -435,6 +438,9 @@
|
|
|
435
438
|
},
|
|
436
439
|
"focusRing": {
|
|
437
440
|
"value": "{colors.success.500} / 0.4"
|
|
441
|
+
},
|
|
442
|
+
"focusVisible": {
|
|
443
|
+
"value": "{colors.success.500} / 0.4"
|
|
438
444
|
}
|
|
439
445
|
},
|
|
440
446
|
"cta": {
|
package/tokens/modes.json
CHANGED
package/tokens/palette.json
CHANGED
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
"600": "#6f3fd7"
|
|
93
93
|
},
|
|
94
94
|
"focus": {
|
|
95
|
-
"primary": "
|
|
96
|
-
"error": "
|
|
97
|
-
"info": "
|
|
95
|
+
"primary": "{colors.brand.500}",
|
|
96
|
+
"error": "{colors.error.500}",
|
|
97
|
+
"info": "{colors.info.600}"
|
|
98
98
|
},
|
|
99
99
|
"white": "#ffffff",
|
|
100
100
|
"black": "#000000"
|
package/tokens/primitives.json
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"space": {
|
|
3
3
|
"0": "0rem",
|
|
4
|
+
"1": "0.0625rem",
|
|
5
|
+
"2": "0.125rem",
|
|
4
6
|
"4": "0.25rem",
|
|
7
|
+
"6": "0.375rem",
|
|
5
8
|
"8": "0.5rem",
|
|
9
|
+
"10": "0.625rem",
|
|
6
10
|
"12": "0.75rem",
|
|
11
|
+
"14": "0.875rem",
|
|
7
12
|
"16": "1rem",
|
|
8
13
|
"20": "1.25rem",
|
|
9
14
|
"24": "1.5rem",
|
|
15
|
+
"28": "1.75rem",
|
|
10
16
|
"32": "2rem",
|
|
11
17
|
"40": "2.5rem",
|
|
12
18
|
"48": "3rem",
|
|
13
19
|
"56": "3.5rem",
|
|
14
20
|
"64": "4rem",
|
|
21
|
+
"72": "4.5rem",
|
|
15
22
|
"80": "5rem",
|
|
16
23
|
"96": "6rem"
|
|
17
24
|
},
|
|
@@ -20,13 +27,19 @@
|
|
|
20
27
|
"sm": "2px",
|
|
21
28
|
"md": "4px",
|
|
22
29
|
"lg": "8px",
|
|
30
|
+
"xl": "12px",
|
|
31
|
+
"2xl": "16px",
|
|
32
|
+
"3xl": "24px",
|
|
33
|
+
"4xl": "32px",
|
|
23
34
|
"pill": "999px"
|
|
24
35
|
},
|
|
25
36
|
"shadows": {
|
|
26
37
|
"none": "none",
|
|
27
38
|
"sm": "0 1px 2px 0 {colors.black} / 0.06",
|
|
28
39
|
"md": "0 2px 6px -1px {colors.black} / 0.08",
|
|
29
|
-
"lg": "0 6px 16px -4px {colors.black} / 0.12"
|
|
40
|
+
"lg": "0 6px 16px -4px {colors.black} / 0.12",
|
|
41
|
+
"xl": "0 12px 24px -6px {colors.black} / 0.15",
|
|
42
|
+
"2xl": "0 20px 48px -12px {colors.black} / 0.20"
|
|
30
43
|
},
|
|
31
44
|
"breakpoints": {
|
|
32
45
|
"sm": "640px",
|
|
@@ -43,64 +56,69 @@
|
|
|
43
56
|
"overlay": "1300",
|
|
44
57
|
"modal": "1400",
|
|
45
58
|
"popover": "1500",
|
|
46
|
-
"tooltip": "1600"
|
|
59
|
+
"tooltip": "1600",
|
|
60
|
+
"toast": "1700"
|
|
47
61
|
},
|
|
48
62
|
"transitions": {
|
|
49
63
|
"duration": {
|
|
50
64
|
"instant": "75ms",
|
|
51
65
|
"fast": "150ms",
|
|
52
66
|
"base": "200ms",
|
|
67
|
+
"relaxed": "250ms",
|
|
53
68
|
"moderate": "300ms",
|
|
54
69
|
"slow": "500ms",
|
|
55
|
-
"slower": "700ms"
|
|
70
|
+
"slower": "700ms",
|
|
71
|
+
"long": "1000ms",
|
|
72
|
+
"slowest": "1200ms"
|
|
56
73
|
},
|
|
57
74
|
"easing": {
|
|
58
75
|
"linear": "linear",
|
|
59
76
|
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
60
77
|
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
61
78
|
"inOut": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
62
|
-
"spring": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
79
|
+
"spring": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
80
|
+
"overshoot": "cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
63
81
|
}
|
|
64
82
|
},
|
|
65
83
|
"animations": {
|
|
66
84
|
"fadeIn": {
|
|
67
|
-
"duration": "
|
|
68
|
-
"easing": "
|
|
85
|
+
"duration": "{transitions.duration.base}",
|
|
86
|
+
"easing": "{transitions.easing.out}",
|
|
69
87
|
"keyframes": "fade-in"
|
|
70
88
|
},
|
|
71
89
|
"fadeOut": {
|
|
72
|
-
"duration": "
|
|
73
|
-
"easing": "
|
|
90
|
+
"duration": "{transitions.duration.fast}",
|
|
91
|
+
"easing": "{transitions.easing.in}",
|
|
74
92
|
"keyframes": "fade-out"
|
|
75
93
|
},
|
|
76
94
|
"slideUp": {
|
|
77
|
-
"duration": "
|
|
78
|
-
"easing": "
|
|
95
|
+
"duration": "{transitions.duration.moderate}",
|
|
96
|
+
"easing": "{transitions.easing.out}",
|
|
79
97
|
"keyframes": "slide-up"
|
|
80
98
|
},
|
|
81
99
|
"slideDown": {
|
|
82
|
-
"duration": "
|
|
83
|
-
"easing": "
|
|
100
|
+
"duration": "{transitions.duration.moderate}",
|
|
101
|
+
"easing": "{transitions.easing.out}",
|
|
84
102
|
"keyframes": "slide-down"
|
|
85
103
|
},
|
|
86
104
|
"scaleIn": {
|
|
87
|
-
"duration": "
|
|
88
|
-
"easing": "
|
|
105
|
+
"duration": "{transitions.duration.base}",
|
|
106
|
+
"easing": "{transitions.easing.overshoot}",
|
|
89
107
|
"keyframes": "scale-in"
|
|
90
108
|
},
|
|
91
109
|
"bounce": {
|
|
92
|
-
"duration": "
|
|
93
|
-
"easing": "
|
|
110
|
+
"duration": "{transitions.duration.moderate}",
|
|
111
|
+
"easing": "{transitions.easing.spring}",
|
|
94
112
|
"keyframes": "bounce"
|
|
95
113
|
},
|
|
96
114
|
"shake": {
|
|
97
|
-
"duration": "
|
|
98
|
-
"easing": "
|
|
115
|
+
"duration": "{transitions.duration.relaxed}",
|
|
116
|
+
"easing": "{transitions.easing.spring}",
|
|
99
117
|
"keyframes": "shake"
|
|
100
118
|
},
|
|
101
119
|
"pulse": {
|
|
102
|
-
"duration": "
|
|
103
|
-
"easing": "
|
|
120
|
+
"duration": "{transitions.duration.slowest}",
|
|
121
|
+
"easing": "{transitions.easing.spring}",
|
|
104
122
|
"keyframes": "pulse"
|
|
105
123
|
}
|
|
106
124
|
},
|
|
@@ -108,6 +126,7 @@
|
|
|
108
126
|
"disabled": "0.38",
|
|
109
127
|
"hover": "0.92",
|
|
110
128
|
"active": "0.84",
|
|
129
|
+
"loading": "0.6",
|
|
111
130
|
"focus": "1",
|
|
112
131
|
"overlay": "0.5",
|
|
113
132
|
"tooltip": "0.95"
|
|
@@ -115,6 +134,7 @@
|
|
|
115
134
|
"aspectRatios": {
|
|
116
135
|
"square": "1/1",
|
|
117
136
|
"video": "16/9",
|
|
137
|
+
"classic": "3/2",
|
|
118
138
|
"portrait": "3/4",
|
|
119
139
|
"landscape": "4/3",
|
|
120
140
|
"ultrawide": "21/9",
|
|
@@ -140,8 +160,15 @@
|
|
|
140
160
|
},
|
|
141
161
|
"border": {
|
|
142
162
|
"width": {
|
|
163
|
+
"none": "0",
|
|
143
164
|
"base": "1px",
|
|
144
165
|
"thick": "2px"
|
|
166
|
+
},
|
|
167
|
+
"style": {
|
|
168
|
+
"none": "none",
|
|
169
|
+
"solid": "solid",
|
|
170
|
+
"dashed": "dashed",
|
|
171
|
+
"dotted": "dotted"
|
|
145
172
|
}
|
|
146
173
|
}
|
|
147
174
|
}
|
package/tokens/typography.json
CHANGED
|
@@ -9,47 +9,56 @@
|
|
|
9
9
|
"sm": {
|
|
10
10
|
"size": "0.875rem",
|
|
11
11
|
"lineHeight": "1.5rem",
|
|
12
|
-
"weight": 400
|
|
12
|
+
"weight": 400,
|
|
13
|
+
"letterSpacing": "0em"
|
|
13
14
|
},
|
|
14
15
|
"md": {
|
|
15
16
|
"size": "1rem",
|
|
16
17
|
"lineHeight": "1.75rem",
|
|
17
|
-
"weight": 500
|
|
18
|
+
"weight": 500,
|
|
19
|
+
"letterSpacing": "0em"
|
|
18
20
|
},
|
|
19
21
|
"lg": {
|
|
20
22
|
"size": "1.25rem",
|
|
21
23
|
"lineHeight": "2rem",
|
|
22
|
-
"weight": 600
|
|
24
|
+
"weight": 600,
|
|
25
|
+
"letterSpacing": "0em"
|
|
23
26
|
},
|
|
24
27
|
"xl": {
|
|
25
28
|
"size": "1.5rem",
|
|
26
29
|
"lineHeight": "2.125rem",
|
|
27
|
-
"weight": 600
|
|
30
|
+
"weight": 600,
|
|
31
|
+
"letterSpacing": "0em"
|
|
28
32
|
},
|
|
29
33
|
"2xl": {
|
|
30
34
|
"size": "1.875rem",
|
|
31
35
|
"lineHeight": "2.5rem",
|
|
32
|
-
"weight": 700
|
|
36
|
+
"weight": 700,
|
|
37
|
+
"letterSpacing": "0em"
|
|
33
38
|
},
|
|
34
39
|
"3xl": {
|
|
35
40
|
"size": "2.25rem",
|
|
36
41
|
"lineHeight": "2.75rem",
|
|
37
|
-
"weight": 700
|
|
42
|
+
"weight": 700,
|
|
43
|
+
"letterSpacing": "0em"
|
|
38
44
|
},
|
|
39
45
|
"4xl": {
|
|
40
46
|
"size": "3rem",
|
|
41
47
|
"lineHeight": "3.5rem",
|
|
42
|
-
"weight": 800
|
|
48
|
+
"weight": 800,
|
|
49
|
+
"letterSpacing": "0em"
|
|
43
50
|
},
|
|
44
51
|
"5xl": {
|
|
45
52
|
"size": "3.75rem",
|
|
46
53
|
"lineHeight": "4.25rem",
|
|
47
|
-
"weight": 800
|
|
54
|
+
"weight": 800,
|
|
55
|
+
"letterSpacing": "0em"
|
|
48
56
|
},
|
|
49
57
|
"6xl": {
|
|
50
58
|
"size": "4.5rem",
|
|
51
59
|
"lineHeight": "5rem",
|
|
52
|
-
"weight": 900
|
|
60
|
+
"weight": 900,
|
|
61
|
+
"letterSpacing": "0em"
|
|
53
62
|
}
|
|
54
63
|
},
|
|
55
64
|
"typography": {
|
|
@@ -68,47 +77,56 @@
|
|
|
68
77
|
"sm": {
|
|
69
78
|
"fontSize": "0.875rem",
|
|
70
79
|
"lineHeight": "1.5rem",
|
|
71
|
-
"fontWeight": 400
|
|
80
|
+
"fontWeight": 400,
|
|
81
|
+
"letterSpacing": "0em"
|
|
72
82
|
},
|
|
73
83
|
"md": {
|
|
74
84
|
"fontSize": "1rem",
|
|
75
85
|
"lineHeight": "1.75rem",
|
|
76
|
-
"fontWeight": 500
|
|
86
|
+
"fontWeight": 500,
|
|
87
|
+
"letterSpacing": "0em"
|
|
77
88
|
},
|
|
78
89
|
"lg": {
|
|
79
90
|
"fontSize": "1.25rem",
|
|
80
91
|
"lineHeight": "2rem",
|
|
81
|
-
"fontWeight": 600
|
|
92
|
+
"fontWeight": 600,
|
|
93
|
+
"letterSpacing": "0em"
|
|
82
94
|
},
|
|
83
95
|
"xl": {
|
|
84
96
|
"fontSize": "1.5rem",
|
|
85
97
|
"lineHeight": "2.125rem",
|
|
86
|
-
"fontWeight": 600
|
|
98
|
+
"fontWeight": 600,
|
|
99
|
+
"letterSpacing": "0em"
|
|
87
100
|
},
|
|
88
101
|
"2xl": {
|
|
89
102
|
"fontSize": "1.875rem",
|
|
90
103
|
"lineHeight": "2.5rem",
|
|
91
|
-
"fontWeight": 700
|
|
104
|
+
"fontWeight": 700,
|
|
105
|
+
"letterSpacing": "0em"
|
|
92
106
|
},
|
|
93
107
|
"3xl": {
|
|
94
108
|
"fontSize": "2.25rem",
|
|
95
109
|
"lineHeight": "2.75rem",
|
|
96
|
-
"fontWeight": 700
|
|
110
|
+
"fontWeight": 700,
|
|
111
|
+
"letterSpacing": "0em"
|
|
97
112
|
},
|
|
98
113
|
"4xl": {
|
|
99
114
|
"fontSize": "3rem",
|
|
100
115
|
"lineHeight": "3.5rem",
|
|
101
|
-
"fontWeight": 800
|
|
116
|
+
"fontWeight": 800,
|
|
117
|
+
"letterSpacing": "0em"
|
|
102
118
|
},
|
|
103
119
|
"5xl": {
|
|
104
120
|
"fontSize": "3.75rem",
|
|
105
121
|
"lineHeight": "4.25rem",
|
|
106
|
-
"fontWeight": 800
|
|
122
|
+
"fontWeight": 800,
|
|
123
|
+
"letterSpacing": "0em"
|
|
107
124
|
},
|
|
108
125
|
"6xl": {
|
|
109
126
|
"fontSize": "4.5rem",
|
|
110
127
|
"lineHeight": "5rem",
|
|
111
|
-
"fontWeight": 900
|
|
128
|
+
"fontWeight": 900,
|
|
129
|
+
"letterSpacing": "0em"
|
|
112
130
|
}
|
|
113
131
|
}
|
|
114
132
|
}
|