@eagami/ui 2.5.0 → 2.5.2

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": "@eagami/ui",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "Lightweight, accessible Angular UI component library built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -103,21 +103,28 @@
103
103
  --color-brand-secondary-subtle: var(--color-secondary-50);
104
104
  --color-brand-secondary-muted: var(--color-secondary-100);
105
105
 
106
+ // *-text is the status hue as a foreground on its own *-subtle/-muted wash
107
+ // (badge, tag, toast). It needs 4.5:1 vs that wash and flips lighter in dark
108
+ // mode, mirroring --color-brand-text.
106
109
  --color-success-default: var(--color-success-600);
107
110
  --color-success-subtle: var(--color-success-50);
108
111
  --color-success-muted: var(--color-success-100);
112
+ --color-success-text: var(--color-success-700);
109
113
 
110
114
  --color-warning-default: var(--color-warning-600);
111
115
  --color-warning-subtle: var(--color-warning-50);
112
116
  --color-warning-muted: var(--color-warning-100);
117
+ --color-warning-text: var(--color-warning-700);
113
118
 
114
119
  --color-error-default: var(--color-error-600);
115
120
  --color-error-subtle: var(--color-error-50);
116
121
  --color-error-muted: var(--color-error-100);
122
+ --color-error-text: var(--color-error-700);
117
123
 
118
124
  --color-info-default: var(--color-info-600);
119
125
  --color-info-subtle: var(--color-info-50);
120
126
  --color-info-muted: var(--color-info-100);
127
+ --color-info-text: var(--color-info-700);
121
128
 
122
129
  // Pure RGB primaries for the picker's hue wheel and saturation/value
123
130
  // gradient. Intrinsic to the picker, not themeable; kept here so component
@@ -151,7 +158,9 @@
151
158
  --color-bg-subtle: var(--color-neutral-700);
152
159
  --color-bg-stripe: var(--color-neutral-900);
153
160
  --color-bg-elevated: var(--color-neutral-700);
154
- --color-bg-muted: var(--color-neutral-600);
161
+ // One step above bg-base so hover fills (ghost/secondary button, table row)
162
+ // and muted surfaces lift subtly; neutral-600 read too strong on dark.
163
+ --color-bg-muted: var(--color-neutral-700);
155
164
 
156
165
  // Borders stay clear of every bg-* shade so they stay visible. subtle mixes
157
166
  // neutral-700/-800 to sit between card and cell backgrounds; default can't go
@@ -185,6 +194,13 @@
185
194
  --color-error-muted: rgba(239, 68, 68, 0.25);
186
195
  --color-info-subtle: rgba(6, 182, 212, 0.15);
187
196
  --color-info-muted: rgba(6, 182, 212, 0.25);
197
+
198
+ // The *-700 shades are unreadable on the dark translucent washes above; flip
199
+ // to the light *-200 pastels so status text keeps 4.5:1.
200
+ --color-success-text: var(--color-success-200);
201
+ --color-warning-text: var(--color-warning-200);
202
+ --color-error-text: var(--color-error-200);
203
+ --color-info-text: var(--color-info-200);
188
204
  }
189
205
 
190
206
  @media (prefers-color-scheme: dark) {
@@ -8,6 +8,10 @@
8
8
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
9
9
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
10
10
 
11
+ // Composable top-edge highlight appended to every dark-mode shadow so elevated
12
+ // surfaces catch light along their top edge; a no-op in light mode.
13
+ --shadow-edge-highlight: 0 0 #0000;
14
+
11
15
  // Bevel: paired inset highlight (top) + shadow (bottom) for a raised look;
12
16
  // compose with --shadow-* for an ambient drop.
13
17
  --shadow-bevel:
@@ -36,20 +40,27 @@
36
40
  --z-index-tooltip: 700;
37
41
  }
38
42
 
39
- // Dark mode: black drop shadows vanish on a near-black page, so flip to white
40
- // at low alpha (reads as a muted dark cast). xl/2xl also tighten offset/blur so
41
- // the lighter fade doesn't bloom into a halo.
43
+ // Dark mode: a drop shadow is the absence of light, so it stays black (deeper
44
+ // than light mode); a white "shadow" reads as a glow and looks wrong. Elevation
45
+ // is carried instead by the lifted surface tone plus a hairline top highlight
46
+ // that catches light, appended to every level via --shadow-edge-highlight.
42
47
  @mixin dark-elevation-tokens {
43
- --shadow-xs: 0 1px 2px 0 rgba(255, 255, 255, 0.04);
48
+ --shadow-edge-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
49
+
50
+ --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4), var(--shadow-edge-highlight);
44
51
  --shadow-sm:
45
- 0 1px 3px 0 rgba(255, 255, 255, 0.05), 0 1px 2px -1px rgba(255, 255, 255, 0.04);
52
+ 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.4),
53
+ var(--shadow-edge-highlight);
46
54
  --shadow-md:
47
- 0 4px 6px -1px rgba(255, 255, 255, 0.06), 0 2px 4px -2px rgba(255, 255, 255, 0.04);
55
+ 0 4px 8px -2px rgba(0, 0, 0, 0.55), 0 2px 4px -2px rgba(0, 0, 0, 0.4),
56
+ var(--shadow-edge-highlight);
48
57
  --shadow-lg:
49
- 0 8px 12px -2px rgba(255, 255, 255, 0.08), 0 3px 5px -3px rgba(255, 255, 255, 0.05);
58
+ 0 12px 20px -4px rgba(0, 0, 0, 0.6), 0 4px 8px -4px rgba(0, 0, 0, 0.45),
59
+ var(--shadow-edge-highlight);
50
60
  --shadow-xl:
51
- 0 12px 18px -4px rgba(255, 255, 255, 0.05), 0 5px 8px -4px rgba(255, 255, 255, 0.03);
52
- --shadow-2xl: 0 16px 28px -8px rgba(255, 255, 255, 0.06);
61
+ 0 20px 28px -6px rgba(0, 0, 0, 0.65), 0 8px 12px -6px rgba(0, 0, 0, 0.5),
62
+ var(--shadow-edge-highlight);
63
+ --shadow-2xl: 0 28px 50px -12px rgba(0, 0, 0, 0.75), var(--shadow-edge-highlight);
53
64
 
54
65
  // On a dark surface a bright highlight reads as a halo, so drop the highlight
55
66
  // alpha and raise the shadow alpha to keep the relief without glowing.