@warmio/design 1.2.0 → 1.4.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 -0
- package/globals.css +1 -0
- package/interfaces.css +93 -0
- package/package.json +4 -2
- package/theme.css +19 -3
- package/themes.css +3 -0
package/README.md
CHANGED
|
@@ -10,6 +10,9 @@ styles, and pinned local font assets used by Warm products.
|
|
|
10
10
|
The default product typefaces are Geist and Geist Mono. The `font-editorial`
|
|
11
11
|
utility uses Inter and should be reserved for deliberate editorial accents.
|
|
12
12
|
|
|
13
|
+
`--accent-solid` / `--accent-solid-text` are the chromatic accent for links,
|
|
14
|
+
badges, and highlights. They derive from `--brand-accent-solid` in `themes.css`.
|
|
15
|
+
|
|
13
16
|
This package has no JavaScript entry point or runtime dependencies.
|
|
14
17
|
|
|
15
18
|
## Releases
|
package/globals.css
CHANGED
package/interfaces.css
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* Shared interfaces.dev baseline — https://interfaces.dev/cheat-sheet */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* Concentric radius: nested surfaces subtract padding from the outer radius. */
|
|
5
|
+
--interface-image-outline: oklch(0 0 0 / 0.08);
|
|
6
|
+
--interface-prose-measure: 65ch;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dark {
|
|
10
|
+
--interface-image-outline: oklch(1 0 0 / 0.08);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Disable incidental CSS transitions while the theme class toggles. View transitions stay enabled. */
|
|
14
|
+
html.theme-switching,
|
|
15
|
+
html.theme-switching *,
|
|
16
|
+
html.theme-switching *::before,
|
|
17
|
+
html.theme-switching *::after {
|
|
18
|
+
transition-duration: 0s !important;
|
|
19
|
+
transition-delay: 0s !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@layer base {
|
|
23
|
+
img:not([data-slot='avatar-image']) {
|
|
24
|
+
outline: 1px solid var(--interface-image-outline);
|
|
25
|
+
outline-offset: -1px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
a:not([data-slot='button']):not([role='button']) {
|
|
29
|
+
text-underline-position: from-font;
|
|
30
|
+
text-decoration-skip-ink: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-slot='card'] {
|
|
34
|
+
--interface-outer-radius: var(--radius-xl);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[data-slot='card']
|
|
38
|
+
:is(
|
|
39
|
+
[data-slot='input'],
|
|
40
|
+
[data-slot='textarea'],
|
|
41
|
+
[data-slot='select-trigger'],
|
|
42
|
+
[data-slot='input-group']
|
|
43
|
+
) {
|
|
44
|
+
--interface-inset: var(--spacing-lg);
|
|
45
|
+
border-radius: max(0px, calc(var(--interface-outer-radius) - var(--interface-inset)));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@layer utilities {
|
|
50
|
+
.interface-prose {
|
|
51
|
+
max-width: var(--interface-prose-measure);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.interface-concentric {
|
|
55
|
+
border-radius: max(0px, calc(var(--interface-outer-radius, var(--radius-xl)) - var(--interface-inset, 0px)));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.interface-icon-crossfade {
|
|
59
|
+
position: relative;
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.interface-icon-crossfade > svg {
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
transition:
|
|
69
|
+
opacity 200ms ease-out,
|
|
70
|
+
transform 200ms ease-out,
|
|
71
|
+
filter 200ms ease-out;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.interface-icon-crossfade > svg[data-state='inactive'] {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transform: scale(0.25);
|
|
77
|
+
filter: blur(4px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.interface-icon-crossfade > svg[data-state='active'] {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: scale(1);
|
|
83
|
+
filter: blur(0);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
.interface-icon-crossfade > svg {
|
|
88
|
+
transition: none;
|
|
89
|
+
filter: none;
|
|
90
|
+
transform: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmio/design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Warm's public CSS-only design contract.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"globals.css",
|
|
21
21
|
"base.css",
|
|
22
22
|
"fonts.css",
|
|
23
|
+
"interfaces.css",
|
|
23
24
|
"theme.css",
|
|
24
25
|
"themes.css",
|
|
25
26
|
"fonts",
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
"./base.css": "./base.css",
|
|
31
32
|
"./fonts.css": "./fonts.css",
|
|
32
33
|
"./theme.css": "./theme.css",
|
|
33
|
-
"./themes.css": "./themes.css"
|
|
34
|
+
"./themes.css": "./themes.css",
|
|
35
|
+
"./interfaces.css": "./interfaces.css"
|
|
34
36
|
},
|
|
35
37
|
"scripts": {
|
|
36
38
|
"pack:check": "node ../../tools/tasks/check-design-package.mjs"
|
package/theme.css
CHANGED
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
══════════════════════════════════════════════════════════════════════════ */
|
|
42
42
|
--accent: oklch(0.96 0.002 17.2);
|
|
43
43
|
--accent-foreground: oklch(0.214 0.009 43.1);
|
|
44
|
+
--accent-solid: var(--brand-accent-solid);
|
|
45
|
+
--accent-solid-text: oklch(from var(--brand-accent-solid) calc(l - 0.14) calc(c + 0.02) h);
|
|
44
46
|
|
|
45
47
|
/* Interactive hover background - single source of truth for all hover states */
|
|
46
48
|
--hover-bg: color-mix(in oklch, var(--foreground) 4%, transparent);
|
|
@@ -149,6 +151,7 @@
|
|
|
149
151
|
══════════════════════════════════════════════════════════════════════════ */
|
|
150
152
|
|
|
151
153
|
--overlay-subtle: rgb(0 0 0 / 0.05);
|
|
154
|
+
--shadow-card-edge-tight: rgb(0 0 0 / 0.08);
|
|
152
155
|
--overlay-light: rgb(0 0 0 / 0.1);
|
|
153
156
|
--overlay-medium: rgb(0 0 0 / 0.2);
|
|
154
157
|
--overlay-strong: rgb(0 0 0 / 0.25);
|
|
@@ -178,9 +181,11 @@
|
|
|
178
181
|
--shadow-xl: 0px 1px 2px 0px var(--overlay-light), 0px 8px 10px -1px var(--overlay-light);
|
|
179
182
|
--shadow-2xl: 0px 1px 2px 0px var(--overlay-strong);
|
|
180
183
|
--shadow-border:
|
|
181
|
-
0 0 0
|
|
182
|
-
0
|
|
183
|
-
|
|
184
|
+
0 -1px 0 0 var(--card-edge-border, var(--border)),
|
|
185
|
+
1px 0 0 0 var(--card-edge-border, var(--border)),
|
|
186
|
+
-1px 0 0 0 var(--card-edge-border, var(--border)),
|
|
187
|
+
0 1px 0 0 color-mix(in oklch, var(--card-edge-border, var(--border)) 75%, black),
|
|
188
|
+
0 1px 2px -1px var(--shadow-card-edge-tight), 0 2px 4px 0 var(--overlay-subtle);
|
|
184
189
|
/* ══════════════════════════════════════════════════════════════════════════
|
|
185
190
|
NON-COLOR TOKENS (shared across all themes)
|
|
186
191
|
══════════════════════════════════════════════════════════════════════════ */
|
|
@@ -224,6 +229,7 @@
|
|
|
224
229
|
--button-primary-shadow:
|
|
225
230
|
inset 0 1px 0 rgb(255 255 255 / 0.18), inset 0 -1px 0 rgb(0 0 0 / 0.55), 0 0 0 1px #26251f,
|
|
226
231
|
0 1px 2px rgb(0 0 0 / 0.18);
|
|
232
|
+
--button-outline-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.18);
|
|
227
233
|
--button-primary-gradient: linear-gradient(
|
|
228
234
|
to bottom,
|
|
229
235
|
#46453e 0%,
|
|
@@ -333,6 +339,8 @@
|
|
|
333
339
|
--secondary-foreground: var(--foreground);
|
|
334
340
|
--accent: oklch(from var(--brand-accent) calc(l + 0.08) calc(c - 0.02) h);
|
|
335
341
|
--accent-foreground: var(--foreground);
|
|
342
|
+
--accent-solid: oklch(from var(--brand-accent-solid) calc(l + 0.08) c h);
|
|
343
|
+
--accent-solid-text: var(--accent-solid);
|
|
336
344
|
|
|
337
345
|
/* Default button gradient (dark) */
|
|
338
346
|
--default-button-gradient-start: oklch(0.4 0 0);
|
|
@@ -345,6 +353,7 @@
|
|
|
345
353
|
--button-primary-active: oklch(0.94 0 0);
|
|
346
354
|
--button-primary-shadow:
|
|
347
355
|
inset 0 1px 0 rgb(255 255 255), 0 0 0 1px rgb(0 0 0 / 0.42), 0 2px 3px rgb(0 0 0 / 0.28);
|
|
356
|
+
--button-outline-shadow: 0 0 0 1px var(--border), 0 2px 3px rgb(0 0 0 / 0.28);
|
|
348
357
|
--button-primary-gradient: linear-gradient(
|
|
349
358
|
to bottom,
|
|
350
359
|
#ffffff 0%,
|
|
@@ -418,6 +427,7 @@
|
|
|
418
427
|
|
|
419
428
|
/* ─── Effects (dark mode) ─── */
|
|
420
429
|
--overlay-subtle: rgb(0 0 0 / 0.2);
|
|
430
|
+
--shadow-card-edge-tight: rgb(0 0 0 / 0.26);
|
|
421
431
|
--overlay-light: rgb(0 0 0 / 0.3);
|
|
422
432
|
--overlay-medium: rgb(0 0 0 / 0.4);
|
|
423
433
|
--overlay-strong: rgb(0 0 0 / 0.5);
|
|
@@ -475,6 +485,8 @@
|
|
|
475
485
|
--secondary-foreground: oklch(from var(--brand-neutral) 0.35 0.015 h);
|
|
476
486
|
--accent: var(--brand-accent);
|
|
477
487
|
--accent-foreground: oklch(from var(--brand-neutral) 0.25 0.01 h);
|
|
488
|
+
--accent-solid: var(--brand-accent-solid);
|
|
489
|
+
--accent-solid-text: oklch(from var(--brand-accent-solid) calc(l - 0.14) calc(c + 0.02) h);
|
|
478
490
|
|
|
479
491
|
/* Default button gradient (light) */
|
|
480
492
|
--default-button-gradient-start: oklch(1 0 0);
|
|
@@ -483,6 +495,7 @@
|
|
|
483
495
|
--button-primary-shadow:
|
|
484
496
|
inset 0 1px 0 rgb(255 255 255 / 0.18), inset 0 -1px 0 rgb(0 0 0 / 0.55), 0 0 0 1px #26251f,
|
|
485
497
|
0 1px 2px rgb(0 0 0 / 0.18);
|
|
498
|
+
--button-outline-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.18);
|
|
486
499
|
--button-primary-gradient: linear-gradient(
|
|
487
500
|
to bottom,
|
|
488
501
|
#46453e 0%,
|
|
@@ -545,6 +558,7 @@
|
|
|
545
558
|
|
|
546
559
|
/* ─── Effects (light mode) ─── */
|
|
547
560
|
--overlay-subtle: rgb(0 0 0 / 0.05);
|
|
561
|
+
--shadow-card-edge-tight: rgb(0 0 0 / 0.08);
|
|
548
562
|
--overlay-light: rgb(0 0 0 / 0.1);
|
|
549
563
|
--overlay-medium: rgb(0 0 0 / 0.2);
|
|
550
564
|
--overlay-strong: rgb(0 0 0 / 0.25);
|
|
@@ -592,6 +606,8 @@
|
|
|
592
606
|
--color-muted-foreground: var(--muted-foreground);
|
|
593
607
|
--color-accent: var(--accent);
|
|
594
608
|
--color-accent-foreground: var(--accent-foreground);
|
|
609
|
+
--color-accent-solid: var(--accent-solid);
|
|
610
|
+
--color-accent-solid-text: var(--accent-solid-text);
|
|
595
611
|
--color-destructive: var(--destructive);
|
|
596
612
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
597
613
|
--color-success: var(--success);
|
package/themes.css
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
OPTIONAL:
|
|
14
14
|
--logo-gradient-start/end Logo gradient colors
|
|
15
|
+
--brand-accent-solid Chromatic accent for links, badges, and highlights
|
|
15
16
|
|
|
16
17
|
════════════════════════════════════════════════════════════════════════════ */
|
|
17
18
|
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
:root {
|
|
23
24
|
--brand-primary: #85807a;
|
|
24
25
|
--brand-accent: #7e7a8a;
|
|
26
|
+
--brand-accent-solid: #8b80a6;
|
|
25
27
|
--brand-muted: #848079;
|
|
26
28
|
--brand-neutral: #837f7c;
|
|
27
29
|
--logo-gradient-start: #85807a;
|
|
@@ -39,6 +41,7 @@
|
|
|
39
41
|
[data-theme='ocean'] {
|
|
40
42
|
--brand-primary: #4a6fa5;
|
|
41
43
|
--brand-accent: #5a8a7a;
|
|
44
|
+
--brand-accent-solid: #8b80a6;
|
|
42
45
|
--brand-muted: #6b7f99;
|
|
43
46
|
--brand-neutral: #6e7a85;
|
|
44
47
|
--logo-gradient-start: #4a6fa5;
|