@classic-homes/theme-tailwind-preset 0.10.0 → 0.13.1
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 +1 -1
- package/theme.js +50 -3
package/package.json
CHANGED
package/theme.js
CHANGED
|
@@ -14,12 +14,12 @@ const tokens = require('@classic-homes/theme-tokens');
|
|
|
14
14
|
const darkMode = ['class'];
|
|
15
15
|
|
|
16
16
|
// Heading sizes for the typography scale (mirrors theme-styles base.css).
|
|
17
|
-
// h1
|
|
17
|
+
// h1 is `font-serif` (Spectral 400 upright, v2.5); h2-h6 are Figtree 600.
|
|
18
18
|
// Exposed as `text-h1`..`text-h6` and emitted on the bare elements by
|
|
19
19
|
// `headingBase` below, so the two never drift.
|
|
20
20
|
const headingScale = {
|
|
21
21
|
// 2.75rem leading: a 2rem line on 40px type made wrapped titles overlap
|
|
22
|
-
h1: ['2.5rem', { lineHeight: '2.75rem', fontWeight: '
|
|
22
|
+
h1: ['2.5rem', { lineHeight: '2.75rem', fontWeight: '400' }], // 40px
|
|
23
23
|
h2: ['1.75rem', { lineHeight: '2.25rem', fontWeight: '600' }], // 28px
|
|
24
24
|
h3: ['1.5rem', { lineHeight: '2rem', fontWeight: '600' }], // 24px
|
|
25
25
|
h4: ['1.25rem', { lineHeight: '1.75rem', fontWeight: '600' }], // 20px
|
|
@@ -51,7 +51,7 @@ const headingStyles = Object.fromEntries(
|
|
|
51
51
|
level === 'h1'
|
|
52
52
|
? {
|
|
53
53
|
fontFamily: `var(--font-serif, ${stack(tokens.fontFamily.serif)})`,
|
|
54
|
-
fontStyle: '
|
|
54
|
+
fontStyle: 'normal',
|
|
55
55
|
fontSize,
|
|
56
56
|
lineHeight,
|
|
57
57
|
fontWeight,
|
|
@@ -168,7 +168,29 @@ const theme = {
|
|
|
168
168
|
DEFAULT: 'hsl(var(--primary))',
|
|
169
169
|
foreground: 'hsl(var(--primary-foreground))',
|
|
170
170
|
hover: 'hsl(var(--primary-hover))',
|
|
171
|
+
active: 'hsl(var(--primary-active))',
|
|
171
172
|
},
|
|
173
|
+
promo: {
|
|
174
|
+
DEFAULT: 'hsl(var(--promo))',
|
|
175
|
+
foreground: 'hsl(var(--promo-foreground))',
|
|
176
|
+
hover: 'hsl(var(--promo-hover))',
|
|
177
|
+
},
|
|
178
|
+
live: {
|
|
179
|
+
DEFAULT: 'hsl(var(--live))',
|
|
180
|
+
foreground: 'hsl(var(--live-foreground))',
|
|
181
|
+
},
|
|
182
|
+
nav: {
|
|
183
|
+
active: 'hsl(var(--nav-active))',
|
|
184
|
+
'active-foreground': 'hsl(var(--nav-active-foreground))',
|
|
185
|
+
hover: 'hsl(var(--nav-hover))',
|
|
186
|
+
},
|
|
187
|
+
row: {
|
|
188
|
+
zebra: 'hsl(var(--row-zebra))',
|
|
189
|
+
hover: 'hsl(var(--row-hover))',
|
|
190
|
+
'hover-zebra': 'hsl(var(--row-hover-zebra))',
|
|
191
|
+
selected: 'hsl(var(--row-selected))',
|
|
192
|
+
},
|
|
193
|
+
link: 'hsl(var(--link))',
|
|
172
194
|
secondary: {
|
|
173
195
|
DEFAULT: 'hsl(var(--secondary))',
|
|
174
196
|
foreground: 'hsl(var(--secondary-foreground))',
|
|
@@ -240,6 +262,31 @@ const theme = {
|
|
|
240
262
|
5: 'hsl(var(--chart-5))',
|
|
241
263
|
},
|
|
242
264
|
|
|
265
|
+
// Digital Color Reference v2.5 palette (hex, by name): bg-ch-paper,
|
|
266
|
+
// border-ch-linen, bg-ch-collection-preamble …
|
|
267
|
+
ch: {
|
|
268
|
+
...Object.fromEntries(
|
|
269
|
+
Object.entries(tokens.ch)
|
|
270
|
+
.filter(([, value]) => typeof value === 'string')
|
|
271
|
+
.map(([key, value]) => [
|
|
272
|
+
key
|
|
273
|
+
.replace(/([a-z])([A-Z0-9])/g, '$1-$2')
|
|
274
|
+
.replace(/([0-9])([A-Za-z])/g, '$1-$2')
|
|
275
|
+
.toLowerCase(),
|
|
276
|
+
value,
|
|
277
|
+
])
|
|
278
|
+
),
|
|
279
|
+
collection: {
|
|
280
|
+
preamble: tokens.ch.collection.preamble,
|
|
281
|
+
cadence: tokens.ch.collection.cadence,
|
|
282
|
+
portrait: tokens.ch.collection.portrait,
|
|
283
|
+
midtown: tokens.ch.collection.midtown,
|
|
284
|
+
'four-square': tokens.ch.collection.fourSquare,
|
|
285
|
+
classic: tokens.ch.collection.classic,
|
|
286
|
+
},
|
|
287
|
+
reserved: tokens.ch.reserved,
|
|
288
|
+
},
|
|
289
|
+
|
|
243
290
|
// Brand colors (direct hex for exact matching)
|
|
244
291
|
brand: {
|
|
245
292
|
'red-logo': 'var(--color-red-logo)',
|