@warmio/design 1.2.0 → 1.3.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/globals.css CHANGED
@@ -1,3 +1,4 @@
1
1
  @import './fonts.css';
2
2
  @import './theme.css';
3
3
  @import './base.css';
4
+ @import './interfaces.css';
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.2.0",
3
+ "version": "1.3.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
@@ -149,6 +149,7 @@
149
149
  ══════════════════════════════════════════════════════════════════════════ */
150
150
 
151
151
  --overlay-subtle: rgb(0 0 0 / 0.05);
152
+ --shadow-card-edge-tight: rgb(0 0 0 / 0.08);
152
153
  --overlay-light: rgb(0 0 0 / 0.1);
153
154
  --overlay-medium: rgb(0 0 0 / 0.2);
154
155
  --overlay-strong: rgb(0 0 0 / 0.25);
@@ -178,9 +179,11 @@
178
179
  --shadow-xl: 0px 1px 2px 0px var(--overlay-light), 0px 8px 10px -1px var(--overlay-light);
179
180
  --shadow-2xl: 0px 1px 2px 0px var(--overlay-strong);
180
181
  --shadow-border:
181
- 0 0 0 1px var(--card-edge-border, var(--border)), 0 1px 2px -1px var(--overlay-subtle),
182
- 0 2px 4px 0 var(--overlay-subtle);
183
-
182
+ 0 -1px 0 0 var(--card-edge-border, var(--border)),
183
+ 1px 0 0 0 var(--card-edge-border, var(--border)),
184
+ -1px 0 0 0 var(--card-edge-border, var(--border)),
185
+ 0 1px 0 0 color-mix(in oklch, var(--card-edge-border, var(--border)) 75%, black),
186
+ 0 1px 2px -1px var(--shadow-card-edge-tight), 0 2px 4px 0 var(--overlay-subtle);
184
187
  /* ══════════════════════════════════════════════════════════════════════════
185
188
  NON-COLOR TOKENS (shared across all themes)
186
189
  ══════════════════════════════════════════════════════════════════════════ */
@@ -224,6 +227,7 @@
224
227
  --button-primary-shadow:
225
228
  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
229
  0 1px 2px rgb(0 0 0 / 0.18);
230
+ --button-outline-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.18);
227
231
  --button-primary-gradient: linear-gradient(
228
232
  to bottom,
229
233
  #46453e 0%,
@@ -345,6 +349,7 @@
345
349
  --button-primary-active: oklch(0.94 0 0);
346
350
  --button-primary-shadow:
347
351
  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);
352
+ --button-outline-shadow: 0 0 0 1px var(--border), 0 2px 3px rgb(0 0 0 / 0.28);
348
353
  --button-primary-gradient: linear-gradient(
349
354
  to bottom,
350
355
  #ffffff 0%,
@@ -418,6 +423,7 @@
418
423
 
419
424
  /* ─── Effects (dark mode) ─── */
420
425
  --overlay-subtle: rgb(0 0 0 / 0.2);
426
+ --shadow-card-edge-tight: rgb(0 0 0 / 0.26);
421
427
  --overlay-light: rgb(0 0 0 / 0.3);
422
428
  --overlay-medium: rgb(0 0 0 / 0.4);
423
429
  --overlay-strong: rgb(0 0 0 / 0.5);
@@ -483,6 +489,7 @@
483
489
  --button-primary-shadow:
484
490
  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
491
  0 1px 2px rgb(0 0 0 / 0.18);
492
+ --button-outline-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.18);
486
493
  --button-primary-gradient: linear-gradient(
487
494
  to bottom,
488
495
  #46453e 0%,
@@ -545,6 +552,7 @@
545
552
 
546
553
  /* ─── Effects (light mode) ─── */
547
554
  --overlay-subtle: rgb(0 0 0 / 0.05);
555
+ --shadow-card-edge-tight: rgb(0 0 0 / 0.08);
548
556
  --overlay-light: rgb(0 0 0 / 0.1);
549
557
  --overlay-medium: rgb(0 0 0 / 0.2);
550
558
  --overlay-strong: rgb(0 0 0 / 0.25);