@phcdevworks/spectre-tokens 4.13.0 → 4.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phcdevworks/spectre-tokens",
3
- "version": "4.13.0",
3
+ "version": "4.15.0",
4
4
  "description": "@phcdevworks/spectre-tokens is the design-token foundation of the Spectre system. It provides the shared visual values and semantic contracts used across Spectre packages and PHCDevworks applications.",
5
5
  "keywords": [
6
6
  "phcdevworks",
@@ -35,7 +35,7 @@
35
35
  "node": "^22.12.0 || >=24.0.0"
36
36
  },
37
37
  "type": "module",
38
- "packageManager": "npm@12.2.0",
38
+ "packageManager": "npm@12.2.1",
39
39
  "main": "./dist/index.cjs",
40
40
  "module": "./dist/index.js",
41
41
  "types": "./dist/index.d.ts",
@@ -101,22 +101,22 @@
101
101
  "typescript": "^5.0 || ^6.0 || ^7.0"
102
102
  },
103
103
  "devDependencies": {
104
- "@phcdevworks/spectre-manifest": "^1.2.0",
104
+ "@phcdevworks/spectre-manifest": "^2.0.0",
105
105
  "@types/node": "^26.6.5",
106
- "@typescript-eslint/eslint-plugin": "^8.71.1",
107
- "@typescript-eslint/parser": "^8.71.1",
106
+ "@typescript-eslint/eslint-plugin": "^8.72.0",
107
+ "@typescript-eslint/parser": "^8.72.0",
108
108
  "@typescript/native": "npm:typescript@^7.0.2",
109
109
  "colord": "^2.10.0",
110
- "eslint": "^10.12.0",
110
+ "eslint": "^10.13.0",
111
111
  "jiti": "^2.7.0",
112
112
  "prettier": "^3.9.10",
113
- "style-dictionary": "^5.6.1",
113
+ "style-dictionary": "^5.7.0",
114
114
  "ts-node": "^10.9.2",
115
- "tsup": "^8.5.1",
115
+ "tsup": "^9.0.0",
116
116
  "tsx": "^4.23.15",
117
117
  "typescript": "npm:@typescript/typescript6@^6.0.2",
118
- "typescript-eslint": "^8.71.1",
119
- "vitest": "^5.0.3"
118
+ "typescript-eslint": "^8.72.0",
119
+ "vitest": "^5.0.5"
120
120
  },
121
121
  "overrides": {
122
122
  "esbuild": "0.28.1"
@@ -1283,7 +1283,7 @@
1283
1283
  "value": "{colors.neutral.200}"
1284
1284
  },
1285
1285
  "stripeBg": {
1286
- "value": "{colors.neutral.50}"
1286
+ "value": "{colors.black} / 0.05"
1287
1287
  },
1288
1288
  "hoverBg": {
1289
1289
  "value": "{colors.neutral.100}"
package/tokens/modes.json CHANGED
@@ -1466,7 +1466,7 @@
1466
1466
  "metadata": {}
1467
1467
  },
1468
1468
  "stripeBg": {
1469
- "value": "{colors.neutral.50}",
1469
+ "value": "{colors.black} / 0.05",
1470
1470
  "metadata": {}
1471
1471
  },
1472
1472
  "hoverBg": {
@@ -2909,6 +2909,30 @@
2909
2909
  }
2910
2910
  },
2911
2911
  "dark": {
2912
+ "action": {
2913
+ "onPage": {
2914
+ "value": "{colors.brand.400}",
2915
+ "description": "action-coloured text on the dark page",
2916
+ "metadata": {
2917
+ "pair": "modes.dark.surface.page"
2918
+ }
2919
+ },
2920
+ "onSurface": {
2921
+ "value": "{colors.brand.400}",
2922
+ "description": "action-coloured text on dark surface containers",
2923
+ "metadata": {
2924
+ "pair": "modes.dark.surface.card"
2925
+ }
2926
+ },
2927
+ "rail": {
2928
+ "value": "{colors.brand.400}",
2929
+ "description": "action-coloured accent rail on the dark page",
2930
+ "metadata": {
2931
+ "pair": "modes.dark.surface.page",
2932
+ "minContrast": 3
2933
+ }
2934
+ }
2935
+ },
2912
2936
  "surface": {
2913
2937
  "page": {
2914
2938
  "value": "{colors.neutral.900}",
@@ -4396,7 +4420,7 @@
4396
4420
  "metadata": {}
4397
4421
  },
4398
4422
  "stripeBg": {
4399
- "value": "{colors.neutral.800}",
4423
+ "value": "{colors.white} / 0.06",
4400
4424
  "metadata": {}
4401
4425
  },
4402
4426
  "hoverBg": {
@@ -5836,9 +5860,94 @@
5836
5860
  }
5837
5861
  }
5838
5862
  }
5863
+ },
5864
+ "link": {
5865
+ "default": {
5866
+ "value": "{colors.brand.400}",
5867
+ "description": "default inline link color",
5868
+ "metadata": {
5869
+ "pair": "modes.dark.surface.card"
5870
+ }
5871
+ },
5872
+ "hover": {
5873
+ "value": "{colors.brand.300}",
5874
+ "description": "link color on hover",
5875
+ "metadata": {
5876
+ "pair": "modes.dark.surface.card"
5877
+ }
5878
+ },
5879
+ "active": {
5880
+ "value": "{colors.brand.200}",
5881
+ "description": "link color while pressed",
5882
+ "metadata": {
5883
+ "pair": "modes.dark.surface.card"
5884
+ }
5885
+ },
5886
+ "visited": {
5887
+ "value": "{colors.accent.300}",
5888
+ "description": "link color after the destination has been visited",
5889
+ "metadata": {
5890
+ "pair": "modes.dark.surface.card"
5891
+ }
5892
+ },
5893
+ "underline": {
5894
+ "value": "{colors.brand.400} / 0.4",
5895
+ "description": "underline colour for inline links; the link text keeps link.default"
5896
+ },
5897
+ "underlineHover": {
5898
+ "value": "{colors.brand.300}",
5899
+ "description": "underline colour for inline links on hover"
5900
+ }
5839
5901
  }
5840
5902
  },
5841
5903
  "highContrast": {
5904
+ "action": {
5905
+ "bg": {
5906
+ "value": "{colors.brand.800}",
5907
+ "description": "action fill lifted one step so its text holds 7:1",
5908
+ "metadata": {
5909
+ "pair": "modes.highContrast.action.text"
5910
+ }
5911
+ },
5912
+ "bgHover": {
5913
+ "value": "{colors.brand.900}",
5914
+ "metadata": {
5915
+ "pair": "modes.highContrast.action.text"
5916
+ }
5917
+ },
5918
+ "bgActive": {
5919
+ "value": "{colors.brand.900}",
5920
+ "description": "same as bgHover: 900 is the darkest step every action family shares",
5921
+ "metadata": {
5922
+ "pair": "modes.highContrast.action.text"
5923
+ }
5924
+ },
5925
+ "text": {
5926
+ "value": "{colors.white}",
5927
+ "metadata": {
5928
+ "pair": "modes.highContrast.action.bg"
5929
+ }
5930
+ },
5931
+ "onPage": {
5932
+ "value": "{colors.brand.900}",
5933
+ "metadata": {
5934
+ "pair": "modes.highContrast.surface.page"
5935
+ }
5936
+ },
5937
+ "onSurface": {
5938
+ "value": "{colors.brand.900}",
5939
+ "metadata": {
5940
+ "pair": "modes.highContrast.surface.card"
5941
+ }
5942
+ },
5943
+ "rail": {
5944
+ "value": "{colors.brand.900}",
5945
+ "metadata": {
5946
+ "pair": "modes.highContrast.surface.page",
5947
+ "minContrast": 3
5948
+ }
5949
+ }
5950
+ },
5842
5951
  "surface": {
5843
5952
  "page": {
5844
5953
  "value": "{colors.white}",
@@ -263,5 +263,20 @@
263
263
  "bold": 700,
264
264
  "extrabold": 800,
265
265
  "black": 900
266
+ },
267
+ "fontSize": {
268
+ "12": "0.75rem",
269
+ "14": "0.875rem",
270
+ "16": "1rem",
271
+ "18": "1.125rem",
272
+ "20": "1.25rem",
273
+ "24": "1.5rem",
274
+ "30": "1.875rem",
275
+ "36": "2.25rem",
276
+ "48": "3rem",
277
+ "60": "3.75rem",
278
+ "72": "4.5rem",
279
+ "96": "6rem",
280
+ "128": "8rem"
266
281
  }
267
282
  }
@@ -89,6 +89,62 @@
89
89
  "description": "underline colour for inline links on hover"
90
90
  }
91
91
  },
92
+ "action": {
93
+ "bg": {
94
+ "value": "{colors.brand.700}",
95
+ "description": "solid fill for the theme's own action colour (buttons, chips); a theme picks the palette family with data-spectre-action on the root element",
96
+ "metadata": {
97
+ "pair": "action.text"
98
+ }
99
+ },
100
+ "bgHover": {
101
+ "value": "{colors.brand.800}",
102
+ "description": "action fill on hover, one step darker in the same family",
103
+ "metadata": {
104
+ "pair": "action.text"
105
+ }
106
+ },
107
+ "bgActive": {
108
+ "value": "{colors.brand.900}",
109
+ "description": "action fill while pressed, two steps darker in the same family",
110
+ "metadata": {
111
+ "pair": "action.text"
112
+ }
113
+ },
114
+ "text": {
115
+ "value": "{colors.white}",
116
+ "description": "text and icons on action.bg, action.bgHover, and action.bgActive",
117
+ "metadata": {
118
+ "pair": "action.bg"
119
+ }
120
+ },
121
+ "focusRing": {
122
+ "value": "{colors.brand.500} / 0.4",
123
+ "description": "focus ring around an action-filled control"
124
+ },
125
+ "onPage": {
126
+ "value": "{colors.brand.700}",
127
+ "description": "action-coloured text on the page background: stat units, eyebrows, quote marks",
128
+ "metadata": {
129
+ "pair": "surface.page"
130
+ }
131
+ },
132
+ "onSurface": {
133
+ "value": "{colors.brand.700}",
134
+ "description": "action-coloured text on surface containers",
135
+ "metadata": {
136
+ "pair": "surface.card"
137
+ }
138
+ },
139
+ "rail": {
140
+ "value": "{colors.brand.700}",
141
+ "description": "action-coloured accent rail or quote rule; a non-text pair held to 3:1",
142
+ "metadata": {
143
+ "pair": "surface.page",
144
+ "minContrast": 3
145
+ }
146
+ }
147
+ },
92
148
  "text": {
93
149
  "onPage": {
94
150
  "default": {
@@ -59,6 +59,24 @@
59
59
  "lineHeight": "{typography.scale.6xl.lineHeight}",
60
60
  "weight": "{typography.scale.6xl.fontWeight}",
61
61
  "letterSpacing": "{typography.scale.6xl.letterSpacing}"
62
+ },
63
+ "7xl": {
64
+ "size": "{typography.scale.7xl.fontSize}",
65
+ "lineHeight": "{typography.scale.7xl.lineHeight}",
66
+ "weight": "{typography.scale.7xl.fontWeight}",
67
+ "letterSpacing": "{typography.scale.7xl.letterSpacing}"
68
+ },
69
+ "8xl": {
70
+ "size": "{typography.scale.8xl.fontSize}",
71
+ "lineHeight": "{typography.scale.8xl.lineHeight}",
72
+ "weight": "{typography.scale.8xl.fontWeight}",
73
+ "letterSpacing": "{typography.scale.8xl.letterSpacing}"
74
+ },
75
+ "9xl": {
76
+ "size": "{typography.scale.9xl.fontSize}",
77
+ "lineHeight": "{typography.scale.9xl.lineHeight}",
78
+ "weight": "{typography.scale.9xl.fontWeight}",
79
+ "letterSpacing": "{typography.scale.9xl.letterSpacing}"
62
80
  }
63
81
  },
64
82
  "typography": {
@@ -87,77 +105,95 @@
87
105
  "letterSpacing": "0em"
88
106
  },
89
107
  "lg": {
108
+ "fontSize": "1.125rem",
109
+ "lineHeight": "1.875rem",
110
+ "fontWeight": 500,
111
+ "letterSpacing": "0em"
112
+ },
113
+ "xl": {
90
114
  "fontSize": "1.25rem",
91
115
  "lineHeight": "2rem",
92
116
  "fontWeight": 600,
93
117
  "letterSpacing": "0em"
94
118
  },
95
- "xl": {
119
+ "2xl": {
96
120
  "fontSize": "1.5rem",
97
121
  "lineHeight": "2.125rem",
98
122
  "fontWeight": 600,
99
123
  "letterSpacing": "0em"
100
124
  },
101
- "2xl": {
125
+ "3xl": {
102
126
  "fontSize": "1.875rem",
103
127
  "lineHeight": "2.5rem",
104
128
  "fontWeight": 700,
105
129
  "letterSpacing": "0em"
106
130
  },
107
- "3xl": {
131
+ "4xl": {
108
132
  "fontSize": "2.25rem",
109
133
  "lineHeight": "2.75rem",
110
134
  "fontWeight": 700,
111
135
  "letterSpacing": "0em"
112
136
  },
113
- "4xl": {
137
+ "5xl": {
114
138
  "fontSize": "3rem",
115
139
  "lineHeight": "3.5rem",
116
140
  "fontWeight": 800,
117
141
  "letterSpacing": "0em"
118
142
  },
119
- "5xl": {
143
+ "6xl": {
120
144
  "fontSize": "3.75rem",
121
145
  "lineHeight": "4.25rem",
122
146
  "fontWeight": 800,
123
147
  "letterSpacing": "0em"
124
148
  },
125
- "6xl": {
149
+ "7xl": {
126
150
  "fontSize": "4.5rem",
127
151
  "lineHeight": "5rem",
128
152
  "fontWeight": 900,
129
153
  "letterSpacing": "0em"
154
+ },
155
+ "8xl": {
156
+ "fontSize": "6rem",
157
+ "lineHeight": "6.5rem",
158
+ "fontWeight": 900,
159
+ "letterSpacing": "0em"
160
+ },
161
+ "9xl": {
162
+ "fontSize": "8rem",
163
+ "lineHeight": "8.5rem",
164
+ "fontWeight": 900,
165
+ "letterSpacing": "0em"
130
166
  }
131
167
  },
132
168
  "heading": {
133
169
  "h1": {
134
- "fontFamily": "{typography.families.sans}",
135
- "fontSize": "{typography.scale.5xl.fontSize}",
136
- "lineHeight": "{typography.scale.5xl.lineHeight}",
137
- "fontWeight": 800,
138
- "letterSpacing": "{typography.scale.5xl.letterSpacing}"
139
- },
140
- "h2": {
141
170
  "fontFamily": "{typography.families.sans}",
142
171
  "fontSize": "{typography.scale.4xl.fontSize}",
143
172
  "lineHeight": "{typography.scale.4xl.lineHeight}",
144
- "fontWeight": 700,
173
+ "fontWeight": 800,
145
174
  "letterSpacing": "{typography.scale.4xl.letterSpacing}"
146
175
  },
147
- "h3": {
176
+ "h2": {
148
177
  "fontFamily": "{typography.families.sans}",
149
178
  "fontSize": "{typography.scale.3xl.fontSize}",
150
179
  "lineHeight": "{typography.scale.3xl.lineHeight}",
151
180
  "fontWeight": 700,
152
181
  "letterSpacing": "{typography.scale.3xl.letterSpacing}"
153
182
  },
154
- "h4": {
183
+ "h3": {
155
184
  "fontFamily": "{typography.families.sans}",
156
185
  "fontSize": "{typography.scale.2xl.fontSize}",
157
186
  "lineHeight": "{typography.scale.2xl.lineHeight}",
158
- "fontWeight": 600,
187
+ "fontWeight": 700,
159
188
  "letterSpacing": "{typography.scale.2xl.letterSpacing}"
160
189
  },
190
+ "h4": {
191
+ "fontFamily": "{typography.families.sans}",
192
+ "fontSize": "{typography.scale.xl.fontSize}",
193
+ "lineHeight": "{typography.scale.xl.lineHeight}",
194
+ "fontWeight": 600,
195
+ "letterSpacing": "{typography.scale.xl.letterSpacing}"
196
+ },
161
197
  "h5": {
162
198
  "fontFamily": "{typography.families.sans}",
163
199
  "fontSize": "{typography.scale.xl.fontSize}",
@@ -167,10 +203,10 @@
167
203
  },
168
204
  "h6": {
169
205
  "fontFamily": "{typography.families.sans}",
170
- "fontSize": "{typography.scale.lg.fontSize}",
171
- "lineHeight": "{typography.scale.lg.lineHeight}",
206
+ "fontSize": "{typography.scale.xl.fontSize}",
207
+ "lineHeight": "{typography.scale.xl.lineHeight}",
172
208
  "fontWeight": 600,
173
- "letterSpacing": "{typography.scale.lg.letterSpacing}"
209
+ "letterSpacing": "{typography.scale.xl.letterSpacing}"
174
210
  }
175
211
  },
176
212
  "body": {
@@ -183,17 +219,17 @@
183
219
  "display": {
184
220
  "1": {
185
221
  "fontFamily": "{typography.families.sans}",
186
- "fontSize": "{typography.scale.6xl.fontSize}",
187
- "lineHeight": "{typography.scale.6xl.lineHeight}",
222
+ "fontSize": "{typography.scale.4xl.fontSize}",
223
+ "lineHeight": "{typography.scale.4xl.lineHeight}",
188
224
  "fontWeight": 800,
189
- "letterSpacing": "{typography.scale.6xl.letterSpacing}"
225
+ "letterSpacing": "{typography.scale.4xl.letterSpacing}"
190
226
  },
191
227
  "2": {
192
228
  "fontFamily": "{typography.families.sans}",
193
- "fontSize": "{typography.scale.5xl.fontSize}",
194
- "lineHeight": "{typography.scale.5xl.lineHeight}",
229
+ "fontSize": "{typography.scale.4xl.fontSize}",
230
+ "lineHeight": "{typography.scale.4xl.lineHeight}",
195
231
  "fontWeight": 800,
196
- "letterSpacing": "{typography.scale.5xl.letterSpacing}"
232
+ "letterSpacing": "{typography.scale.4xl.letterSpacing}"
197
233
  },
198
234
  "3": {
199
235
  "fontFamily": "{typography.families.sans}",
@@ -204,32 +240,72 @@
204
240
  },
205
241
  "4": {
206
242
  "fontFamily": "{typography.families.sans}",
207
- "fontSize": "{typography.scale.3xl.fontSize}",
208
- "lineHeight": "{typography.scale.3xl.lineHeight}",
243
+ "fontSize": "{typography.scale.4xl.fontSize}",
244
+ "lineHeight": "{typography.scale.4xl.lineHeight}",
209
245
  "fontWeight": 700,
210
- "letterSpacing": "{typography.scale.3xl.letterSpacing}"
246
+ "letterSpacing": "{typography.scale.4xl.letterSpacing}"
211
247
  },
212
248
  "5": {
213
249
  "fontFamily": "{typography.families.sans}",
214
- "fontSize": "{typography.scale.2xl.fontSize}",
215
- "lineHeight": "{typography.scale.2xl.lineHeight}",
250
+ "fontSize": "{typography.scale.3xl.fontSize}",
251
+ "lineHeight": "{typography.scale.3xl.lineHeight}",
216
252
  "fontWeight": 600,
217
- "letterSpacing": "{typography.scale.2xl.letterSpacing}"
253
+ "letterSpacing": "{typography.scale.3xl.letterSpacing}"
218
254
  },
219
255
  "6": {
220
256
  "fontFamily": "{typography.families.sans}",
221
- "fontSize": "{typography.scale.xl.fontSize}",
222
- "lineHeight": "{typography.scale.xl.lineHeight}",
257
+ "fontSize": "{typography.scale.2xl.fontSize}",
258
+ "lineHeight": "{typography.scale.2xl.lineHeight}",
223
259
  "fontWeight": 600,
224
- "letterSpacing": "{typography.scale.xl.letterSpacing}"
260
+ "letterSpacing": "{typography.scale.2xl.letterSpacing}"
225
261
  }
226
262
  },
227
263
  "lead": {
228
264
  "fontFamily": "{typography.families.sans}",
229
- "fontSize": "{typography.scale.lg.fontSize}",
230
- "lineHeight": "{typography.scale.lg.lineHeight}",
265
+ "fontSize": "{typography.scale.xl.fontSize}",
266
+ "lineHeight": "{typography.scale.xl.lineHeight}",
231
267
  "fontWeight": 400,
232
- "letterSpacing": "{typography.scale.lg.letterSpacing}"
268
+ "letterSpacing": "{typography.scale.xl.letterSpacing}"
269
+ },
270
+ "responsive": {
271
+ "md": {
272
+ "heading": {
273
+ "h1": {
274
+ "fontSize": "{typography.scale.6xl.fontSize}",
275
+ "lineHeight": "{typography.scale.6xl.lineHeight}"
276
+ },
277
+ "h2": {
278
+ "fontSize": "{typography.scale.5xl.fontSize}",
279
+ "lineHeight": "{typography.scale.5xl.lineHeight}"
280
+ },
281
+ "h3": {
282
+ "fontSize": "{typography.scale.4xl.fontSize}",
283
+ "lineHeight": "{typography.scale.4xl.lineHeight}"
284
+ },
285
+ "h4": {
286
+ "fontSize": "{typography.scale.3xl.fontSize}",
287
+ "lineHeight": "{typography.scale.3xl.lineHeight}"
288
+ },
289
+ "h5": {
290
+ "fontSize": "{typography.scale.2xl.fontSize}",
291
+ "lineHeight": "{typography.scale.2xl.lineHeight}"
292
+ }
293
+ },
294
+ "display": {
295
+ "1": {
296
+ "fontSize": "{typography.scale.7xl.fontSize}",
297
+ "lineHeight": "{typography.scale.7xl.lineHeight}"
298
+ },
299
+ "2": {
300
+ "fontSize": "{typography.scale.6xl.fontSize}",
301
+ "lineHeight": "{typography.scale.6xl.lineHeight}"
302
+ },
303
+ "3": {
304
+ "fontSize": "{typography.scale.5xl.fontSize}",
305
+ "lineHeight": "{typography.scale.5xl.lineHeight}"
306
+ }
307
+ }
308
+ }
233
309
  }
234
310
  }
235
311
  }