@warmio/design 5.0.0 → 6.0.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 CHANGED
@@ -26,7 +26,15 @@ Package ships `logo.css` (token-only Logo styles) and `dist/` (ESM + .d.ts). `de
26
26
 
27
27
  ## Releases
28
28
 
29
- The next release is `2.0.0`, the closed-scale release. It replaces the 4-color brand
29
+ `6.0.0` merges seven theme colors into existing ones and removes them with their Tailwind
30
+ colors: `--card` and `--primary-foreground` into `--background`, `--secondary` and
31
+ `--segmented-surface` into `--muted`, `--secondary-foreground` into `--muted-foreground`, and
32
+ `--control-active` and `--segmented-border` into `--border`. The light background is white and
33
+ the light accent hue is fixed at 270. It sets `--control-height` to 32px and adds
34
+ `--row-height-ledger`, the `data-ui-size="large"` scale, and the `compact` Logo size.
35
+ [DESIGN_PACKAGE.md](../../docs/reference/DESIGN_PACKAGE.md) lists every release.
36
+
37
+ `2.0.0` was the closed-scale release. It replaces the 4-color brand
30
38
  derivation and `themes.css` with fixed primitives (`--gray-*`, `--black-*`, `--white-*`), merges
31
39
  duplicate tokens (`--secondary` into `--accent`, `--*-bg-muted` into `--*-bg-subtle`, shadow
32
40
  `2xs`/`xs`/`xl`/`2xl` into `sm`/`lg`, font aliases into `--font-sans`), aligns motion with
package/dist/logo.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export type WarmLogoSize = 'badge' | 'default' | 'feature' | 'hero';
2
+ export type WarmLogoSize = 'badge' | 'compact' | 'default' | 'feature' | 'hero';
3
3
  export type WarmLogoTone = 'default' | 'foreground' | 'sidebar';
4
4
  export type WarmLogoIconProps = {
5
5
  size?: WarmLogoSize;
package/dist/logo.js CHANGED
@@ -1,9 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  const WShape = (_jsxs("g", { fill: "currentColor", transform: "translate(0 108)", children: [_jsx("path", { d: "M 33.500 40.660 C 20.206 42.744, 0 48.560, -0 50.302 C -0 51.759, 123.955 348.889, 127.738 356.500 C 142.182 385.561, 169.450 410.275, 198.946 421.040 C 218.922 428.330, 243.683 430.825, 264.526 427.648 C 277.151 425.724, 294.628 420.011, 294.194 417.952 C 293.790 416.040, 172.732 124.599, 168.522 115.405 C 161.779 100.679, 149.168 84.171, 135.093 71.646 C 119.358 57.644, 98.880 47.362, 77 42.478 C 69.645 40.836, 40.220 39.606, 33.500 40.660" }), _jsx("path", { d: "M 229.651 41.597 C 217.916 43.718, 202.443 49.144, 202.744 51.035 C 203.418 55.268, 329.689 356.584, 333.687 363.500 C 340.525 375.327, 345.293 381.483, 355.408 391.538 C 374.603 410.619, 398.878 423.014, 425.907 427.533 C 439.649 429.831, 463.594 429.132, 476 426.072 C 489.892 422.645, 497.188 419.815, 496.703 418.043 C 495.416 413.331, 371.058 116.094, 367.406 109 C 349.467 74.149, 313.008 47.875, 273.752 41.509 C 262.281 39.648, 240.195 39.693, 229.651 41.597" }), _jsx("path", { d: "M 463 40.593 C 451.670 42.545, 447.288 43.569, 439 46.203 C 433.775 47.864, 429.338 49.372, 429.140 49.555 C 428.942 49.737, 434.670 64.021, 441.868 81.297 C 455.574 114.190, 462.215 131.660, 468.447 151.208 C 475.360 172.892, 486.124 186.213, 503.834 194.997 C 530.956 208.450, 564.982 201.679, 583.654 179.112 C 604.399 154.041, 605.407 121.944, 586.291 95.155 C 567.827 69.280, 539.107 50.114, 508 42.907 C 500.680 41.212, 494.713 40.644, 482 40.434 C 472.925 40.284, 464.375 40.356, 463 40.593" })] }));
4
+ const LOGO_PIXELS = {
5
+ badge: 12,
6
+ compact: 24,
7
+ default: 28,
8
+ feature: 32,
9
+ hero: 56,
10
+ };
4
11
  export function WarmLogoIcon({ size = 'default', tone = 'default', decorative = false, className: _className, style: _style, asChild: _asChild, render: _render, ...props }) {
5
12
  const label = decorative ? undefined : 'Warm logo';
6
- return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 600 600", "data-warm-logo": true, "data-size": size, "data-tone": tone, width: size === 'hero' ? 56 : size === 'feature' ? 32 : size === 'default' ? 28 : 12, height: size === 'hero' ? 56 : size === 'feature' ? 32 : size === 'default' ? 28 : 12, "aria-hidden": decorative ? true : undefined, "aria-label": label, ...props, children: WShape }));
13
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 600 600", "data-warm-logo": true, "data-size": size, "data-tone": tone, width: LOGO_PIXELS[size], height: LOGO_PIXELS[size], "aria-hidden": decorative ? true : undefined, "aria-label": label, ...props, children: WShape }));
7
14
  }
8
15
  export const Logo = React.forwardRef(function Logo({ size = 'default', tone = 'default', showText = true, className: _className, style: _style, textClass: _textClass, asChild: _asChild, render: _render, ...props }, ref) {
9
16
  return (_jsxs("div", { ref: ref, "data-warm-logo": true, "data-size": size, "data-tone": tone, ...props, children: [_jsx(WarmLogoIcon, { size: size, tone: tone, decorative: showText }), showText ? _jsx("span", { children: "Warm" }) : null] }));
package/logo.css CHANGED
@@ -18,6 +18,10 @@ svg[data-warm-logo] {
18
18
  width: var(--logo-size-badge);
19
19
  height: var(--logo-size-badge);
20
20
  }
21
+ [data-warm-logo][data-size='compact'] svg[data-warm-logo] {
22
+ width: calc(var(--spacing) * 6);
23
+ height: calc(var(--spacing) * 6);
24
+ }
21
25
  [data-warm-logo][data-size='default'] svg[data-warm-logo] {
22
26
  width: var(--logo-size-default);
23
27
  height: var(--logo-size-default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmio/design",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Warm's public design contract: CSS tokens and the Logo primitive.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/theme.css CHANGED
@@ -65,12 +65,13 @@
65
65
  --motion-distance: 0.25rem;
66
66
  --motion-easing: cubic-bezier(0.23, 1, 0.32, 1);
67
67
 
68
- /* ─── Controls: default 28 (44 on phones), large 36, cta 48 ─── */
69
- --control-height: 1.75rem;
68
+ /* ─── Controls: default 32 (44 on phones), large 36, cta 48 ─── */
69
+ --control-height: 2rem;
70
70
  --control-height-lg: 2.25rem;
71
71
  --control-height-cta: 3rem;
72
72
  --row-height-menu: 2rem;
73
73
  --row-height-list: 2.25rem;
74
+ --row-height-ledger: 3.25rem;
74
75
  --row-height: 3rem;
75
76
  --row-height-two-line: 3.5rem;
76
77
  --icon-size-sm: 0.75rem;
@@ -116,24 +117,50 @@
116
117
  --chart-area-gradient-mid-offset: 55%;
117
118
  }
118
119
 
119
- @media (width >= 48rem) and (width < 64rem) and (pointer: fine) {
120
+ @media (pointer: coarse), (width < 48rem) {
120
121
  :root {
121
- --field-type-size: var(--type-size-label);
122
+ --field-type-size: var(--type-size-body-large);
122
123
  }
123
124
  }
124
125
 
125
- @media (pointer: coarse), (width < 48rem) {
126
+ @media (width < 48rem) {
126
127
  :root {
127
- --field-type-size: var(--type-size-body-large);
128
+ --row-height-ledger: 2.75rem;
128
129
  }
129
130
  }
130
131
 
131
- @media (width < 48rem) {
132
+ @media (width < 48rem), (pointer: coarse) and (width < 64rem) {
132
133
  :root {
133
134
  --control-height: 2.75rem;
134
135
  }
135
136
  }
136
137
 
138
+ @media (width < 64rem) {
139
+ :root {
140
+ --control-height-compact: 2.75rem;
141
+ }
142
+ }
143
+
144
+ :root[data-ui-size='large'] {
145
+ --type-size-label: 0.9375rem;
146
+ --type-size-body: 0.875rem;
147
+ --type-size-body-emphasis: 1rem;
148
+ --type-leading-label: 1.375rem;
149
+ --type-leading-body: 1.25rem;
150
+ --type-leading-body-emphasis: 1.5rem;
151
+ --control-height: 2.25rem;
152
+ --control-height-lg: 2.75rem;
153
+ --row-height-menu: 2.5rem;
154
+ --row-height-list: 2.75rem;
155
+ --icon-size: 1.125rem;
156
+ }
157
+
158
+ @media (width < 48rem), (pointer: coarse) and (width < 64rem) {
159
+ :root[data-ui-size='large'] {
160
+ --control-height: 2.75rem;
161
+ }
162
+ }
163
+
137
164
  @media (prefers-reduced-motion: reduce) {
138
165
  :root {
139
166
  --motion-duration-fast: 0ms;
@@ -148,72 +175,60 @@
148
175
  :root:where(*),
149
176
  .light {
150
177
  --theme-hue: 82;
178
+ --accent-hue: 270;
179
+ --theme-tint: 1;
151
180
  --theme-shadow-hue: calc(var(--theme-hue) + 213);
152
181
  --theme-data-lightness: 50%;
153
- --background: oklch(97% 0.003 calc(var(--theme-hue) + 13));
154
- --foreground: oklch(24% 0.006 calc(var(--theme-hue) - 12));
155
- --muted-foreground: oklch(46% 0.01 calc(var(--theme-hue) - 12));
156
- --accent: oklch(48% 0.065 var(--theme-hue));
182
+ --background: oklch(100% 0 0);
183
+ --foreground: oklch(24% calc(0.006 * var(--theme-tint)) calc(var(--theme-hue) - 12));
184
+ --muted-foreground: oklch(46% calc(0.01 * var(--theme-tint)) calc(var(--theme-hue) - 12));
185
+ --accent: oklch(48% calc(0.065 * var(--theme-tint)) var(--accent-hue));
157
186
  --negative: oklch(47% 0.095 32);
158
187
  --warning: oklch(54% 0.13 62);
159
- --muted: oklch(94.8% 0.004 calc(var(--theme-hue) + 3));
160
- --border: oklch(90.5% 0.005 calc(var(--theme-hue) + 3));
161
- --control-border: oklch(58% 0.01 calc(var(--theme-hue) - 12));
162
- --accent-tint: oklch(93.4% 0.015 calc(var(--theme-hue) - 5));
188
+ --muted: oklch(94.8% calc(0.004 * var(--theme-tint)) calc(var(--theme-hue) + 3));
189
+ --border: oklch(90.5% calc(0.005 * var(--theme-tint)) calc(var(--theme-hue) + 3));
190
+ --control-border: oklch(58% calc(0.01 * var(--theme-tint)) calc(var(--theme-hue) - 12));
191
+ --accent-tint: oklch(93.4% calc(0.015 * var(--theme-tint)) calc(var(--theme-hue) - 5));
163
192
  --negative-tint: oklch(94.7% 0.0095 32);
164
193
  --warning-tint: oklch(95% 0.02 62);
165
- --shadow-color: oklch(12% 0.025 var(--theme-shadow-hue) / 10%);
166
- --card: oklch(100% 0 0);
167
- --primary: var(--foreground);
168
- --primary-foreground: var(--card);
169
- --secondary: oklch(96.5% 0.005 calc(var(--theme-hue) - 4));
170
- --secondary-foreground: oklch(35.2% 0.005 calc(var(--theme-hue) + 10));
171
- --control-hover: oklch(91.5% 0.008 calc(var(--theme-hue) + 3));
172
- --control-active: oklch(88% 0.01 calc(var(--theme-hue) - 2));
173
- --segmented-surface: oklch(93.4% 0 0);
174
- --segmented-border: oklch(89% 0 0);
194
+ --shadow-color: oklch(12% calc(0.025 * var(--theme-tint)) var(--theme-shadow-hue) / 10%);
175
195
  --shadow-button:
176
- inset 0 1px 0 color-mix(in oklab, var(--primary-foreground) 20%, transparent),
196
+ inset 0 1px 0 color-mix(in oklab, var(--background) 20%, transparent),
177
197
  0 1px 2px var(--shadow-color), 0 4px 10px -2px var(--shadow-color),
178
198
  0 12px 32px -6px var(--shadow-color);
179
- --shadow-button-secondary: 0 1px 2px var(--shadow-color);
199
+ --shadow-button-secondary:
200
+ 0 0 0 1px color-mix(in oklab, var(--foreground) 20%, transparent),
201
+ inset 0 0 0 1px var(--background), 0 1px 2px var(--shadow-color);
180
202
  --gain: var(--foreground);
181
- --chart-mid: oklch(75% 0.03 var(--theme-hue));
203
+ --chart-mid: oklch(75% calc(0.03 * var(--theme-tint)) var(--theme-hue));
182
204
  }
183
205
 
184
206
  .dark {
185
207
  --theme-hue: 295;
208
+ --theme-tint: 1;
186
209
  --theme-shadow-hue: var(--theme-hue);
187
210
  --theme-data-lightness: 78%;
188
- --background: oklch(20.5% 0.012 var(--theme-hue));
189
- --foreground: oklch(94% 0.012 var(--theme-hue));
190
- --muted-foreground: oklch(74% 0.02 var(--theme-hue));
191
- --accent: oklch(74% 0.07 var(--theme-hue));
211
+ --background: oklch(20.5% calc(0.012 * var(--theme-tint)) var(--theme-hue));
212
+ --foreground: oklch(94% calc(0.012 * var(--theme-tint)) var(--theme-hue));
213
+ --muted-foreground: oklch(74% calc(0.02 * var(--theme-tint)) var(--theme-hue));
214
+ --accent: oklch(74% calc(0.07 * var(--theme-tint)) var(--theme-hue));
192
215
  --negative: oklch(74% 0.065 35);
193
216
  --warning: oklch(76% 0.08 75);
194
- --muted: oklch(30% 0.018 var(--theme-hue));
195
- --border: oklch(34% 0.018 var(--theme-hue));
196
- --control-border: oklch(62% 0.015 var(--theme-hue));
197
- --accent-tint: oklch(25.85% 0.0124 var(--theme-hue));
217
+ --muted: oklch(30% calc(0.018 * var(--theme-tint)) var(--theme-hue));
218
+ --border: oklch(34% calc(0.018 * var(--theme-tint)) var(--theme-hue));
219
+ --control-border: oklch(62% calc(0.015 * var(--theme-tint)) var(--theme-hue));
220
+ --accent-tint: oklch(25.85% calc(0.0124 * var(--theme-tint)) var(--theme-hue));
198
221
  --negative-tint: oklch(25.85% 0.007695 351.2865);
199
222
  --warning-tint: oklch(26.05% 0.005194 33.0617);
200
- --shadow-color: oklch(12% 0.025 var(--theme-shadow-hue) / 50%);
201
- --card: var(--background);
202
- --primary: oklch(92% 0.01 var(--theme-hue));
203
- --primary-foreground: oklch(18% 0.01 var(--theme-hue));
204
- --secondary: var(--muted);
205
- --secondary-foreground: var(--foreground);
206
- --control-hover: var(--muted);
207
- --control-active: var(--border);
208
- --segmented-surface: var(--muted);
209
- --segmented-border: var(--border);
223
+ --shadow-color: oklch(12% calc(0.025 * var(--theme-tint)) var(--theme-shadow-hue) / 50%);
210
224
  --shadow-button:
211
- inset 0 1px 0 oklch(from var(--primary) calc(l + 0.1) c h), 0 1px 2px var(--shadow-color);
225
+ inset 0 1px 0 oklch(from var(--foreground) calc(l + 0.1) c h), 0 1px 2px var(--shadow-color);
212
226
  --shadow-button-secondary:
213
- inset 0 1px 0 color-mix(in oklab, var(--foreground) 8%, transparent),
227
+ 0 0 0 1px oklch(from var(--background) calc(l - 0.1) c h),
228
+ inset 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent),
214
229
  0 1px 2px var(--shadow-color);
215
230
  --gain: var(--accent);
216
- --chart-mid: oklch(44.575% 0.0348 var(--theme-hue));
231
+ --chart-mid: oklch(44.575% calc(0.0348 * var(--theme-tint)) var(--theme-hue));
217
232
  --onboarding-v2-hero-halo-edge-stop: 55%;
218
233
  --onboarding-setup-field-label-size: var(--type-size-body-emphasis);
219
234
  --onboarding-setup-field-label-weight: 400;
@@ -221,7 +236,7 @@
221
236
  }
222
237
 
223
238
  :is(:root, .light, .dark) {
224
- --scrim: oklch(12% 0.025 var(--theme-shadow-hue) / 10%);
239
+ --scrim: oklch(12% calc(0.025 * var(--theme-tint)) var(--theme-shadow-hue) / 10%);
225
240
  --hue-sky: oklch(var(--theme-data-lightness) 0.08 232);
226
241
  --hue-rose: oklch(var(--theme-data-lightness) 0.08 12);
227
242
  --hue-mint: oklch(var(--theme-data-lightness) 0.08 160);
@@ -232,11 +247,45 @@
232
247
  --hue-orchid: oklch(var(--theme-data-lightness) 0.08 335);
233
248
  }
234
249
 
250
+ [data-accent='rose'],
251
+ [data-accent='rose'] :where(.light, .dark):where(:not([data-accent])) {
252
+ --theme-hue: 345;
253
+ --accent-hue: 345;
254
+ }
255
+
256
+ [data-accent='sage'],
257
+ [data-accent='sage'] :where(.light, .dark):where(:not([data-accent])) {
258
+ --theme-hue: 150;
259
+ --accent-hue: 150;
260
+ }
261
+
262
+ [data-accent='sky'],
263
+ [data-accent='sky'] :where(.light, .dark):where(:not([data-accent])) {
264
+ --theme-hue: 225;
265
+ --accent-hue: 225;
266
+ }
267
+
268
+ [data-accent='indigo'],
269
+ [data-accent='indigo'] :where(.light, .dark):where(:not([data-accent])) {
270
+ --theme-hue: 268;
271
+ --accent-hue: 290;
272
+ }
273
+
274
+ [data-accent='indigo'].dark,
275
+ [data-accent='indigo'] .dark:where(:not([data-accent])) {
276
+ --accent-hue: 268;
277
+ }
278
+
279
+ [data-accent='grayscale'],
280
+ [data-accent='grayscale'] :where(.light, .dark):where(:not([data-accent])) {
281
+ --theme-tint: 0;
282
+ }
283
+
235
284
  @media (prefers-reduced-transparency: reduce) {
236
285
  :root:where(*),
237
286
  .light,
238
287
  .dark {
239
- --scrim: oklch(12% 0.025 var(--theme-shadow-hue) / 60%);
288
+ --scrim: oklch(12% calc(0.025 * var(--theme-tint)) var(--theme-shadow-hue) / 60%);
240
289
  }
241
290
  }
242
291
 
@@ -251,15 +300,6 @@
251
300
  --color-muted: var(--muted);
252
301
  --color-border: var(--border);
253
302
  --color-control-border: var(--control-border);
254
- --color-card: var(--card);
255
- --color-primary: var(--primary);
256
- --color-primary-foreground: var(--primary-foreground);
257
- --color-secondary: var(--secondary);
258
- --color-secondary-foreground: var(--secondary-foreground);
259
- --color-control-hover: var(--control-hover);
260
- --color-control-active: var(--control-active);
261
- --color-segmented-surface: var(--segmented-surface);
262
- --color-segmented-border: var(--segmented-border);
263
303
  --color-accent-tint: var(--accent-tint);
264
304
  --color-negative-tint: var(--negative-tint);
265
305
  --color-warning-tint: var(--warning-tint);