@warmio/design 1.1.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.1.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
  ══════════════════════════════════════════════════════════════════════════ */
@@ -221,6 +224,24 @@
221
224
  --button-primary-border: oklch(0 0 0 / 0.18);
222
225
  --button-primary-hover: oklch(from var(--primary) calc(l + 0.08) c h);
223
226
  --button-primary-active: oklch(from var(--primary) calc(l - 0.04) c h);
227
+ --button-primary-shadow:
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,
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);
231
+ --button-primary-gradient: linear-gradient(
232
+ to bottom,
233
+ #46453e 0%,
234
+ #383731 28%,
235
+ #292824 64%,
236
+ #1d1c19 100%
237
+ );
238
+ --button-primary-gradient-hover: linear-gradient(
239
+ to bottom,
240
+ #4f4e48 0%,
241
+ #42413b 28%,
242
+ #34332f 64%,
243
+ #282724 100%
244
+ );
224
245
  --apple-button-background: var(--foreground);
225
246
  --apple-button-foreground: var(--background);
226
247
  --apple-button-hover: var(--apple-button-background);
@@ -326,6 +347,23 @@
326
347
  --button-primary-border: oklch(1 0 0 / 0.18);
327
348
  --button-primary-hover: oklch(1 0 0);
328
349
  --button-primary-active: oklch(0.94 0 0);
350
+ --button-primary-shadow:
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);
353
+ --button-primary-gradient: linear-gradient(
354
+ to bottom,
355
+ #ffffff 0%,
356
+ #f8f7f4 28%,
357
+ #f0eee9 64%,
358
+ #e4e1db 100%
359
+ );
360
+ --button-primary-gradient-hover: linear-gradient(
361
+ to bottom,
362
+ #f2f2f2 0%,
363
+ #ecebe8 28%,
364
+ #e4e2dd 64%,
365
+ #d9d6d0 100%
366
+ );
329
367
  --apple-button-background: oklch(0 0 0);
330
368
  --apple-button-foreground: oklch(1 0 0);
331
369
  --apple-button-hover: var(--apple-button-background);
@@ -385,6 +423,7 @@
385
423
 
386
424
  /* ─── Effects (dark mode) ─── */
387
425
  --overlay-subtle: rgb(0 0 0 / 0.2);
426
+ --shadow-card-edge-tight: rgb(0 0 0 / 0.26);
388
427
  --overlay-light: rgb(0 0 0 / 0.3);
389
428
  --overlay-medium: rgb(0 0 0 / 0.4);
390
429
  --overlay-strong: rgb(0 0 0 / 0.5);
@@ -447,6 +486,24 @@
447
486
  --default-button-gradient-start: oklch(1 0 0);
448
487
  --default-button-gradient-end: oklch(0.92 0 0);
449
488
  --default-button-active: oklch(0.91 0 0);
489
+ --button-primary-shadow:
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,
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);
493
+ --button-primary-gradient: linear-gradient(
494
+ to bottom,
495
+ #46453e 0%,
496
+ #383731 28%,
497
+ #292824 64%,
498
+ #1d1c19 100%
499
+ );
500
+ --button-primary-gradient-hover: linear-gradient(
501
+ to bottom,
502
+ #4f4e48 0%,
503
+ #42413b 28%,
504
+ #34332f 64%,
505
+ #282724 100%
506
+ );
450
507
 
451
508
  /* Charts */
452
509
  --chart-1: var(--brand-primary);
@@ -495,6 +552,7 @@
495
552
 
496
553
  /* ─── Effects (light mode) ─── */
497
554
  --overlay-subtle: rgb(0 0 0 / 0.05);
555
+ --shadow-card-edge-tight: rgb(0 0 0 / 0.08);
498
556
  --overlay-light: rgb(0 0 0 / 0.1);
499
557
  --overlay-medium: rgb(0 0 0 / 0.2);
500
558
  --overlay-strong: rgb(0 0 0 / 0.25);