@warmio/design 5.1.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.1.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,13 +175,14 @@
148
175
  :root:where(*),
149
176
  .light {
150
177
  --theme-hue: 82;
178
+ --accent-hue: 270;
151
179
  --theme-tint: 1;
152
180
  --theme-shadow-hue: calc(var(--theme-hue) + 213);
153
181
  --theme-data-lightness: 50%;
154
- --background: oklch(97% calc(0.003 * var(--theme-tint)) calc(var(--theme-hue) + 13));
182
+ --background: oklch(100% 0 0);
155
183
  --foreground: oklch(24% calc(0.006 * var(--theme-tint)) calc(var(--theme-hue) - 12));
156
184
  --muted-foreground: oklch(46% calc(0.01 * var(--theme-tint)) calc(var(--theme-hue) - 12));
157
- --accent: oklch(48% calc(0.065 * var(--theme-tint)) var(--theme-hue));
185
+ --accent: oklch(48% calc(0.065 * var(--theme-tint)) var(--accent-hue));
158
186
  --negative: oklch(47% 0.095 32);
159
187
  --warning: oklch(54% 0.13 62);
160
188
  --muted: oklch(94.8% calc(0.004 * var(--theme-tint)) calc(var(--theme-hue) + 3));
@@ -164,20 +192,13 @@
164
192
  --negative-tint: oklch(94.7% 0.0095 32);
165
193
  --warning-tint: oklch(95% 0.02 62);
166
194
  --shadow-color: oklch(12% calc(0.025 * var(--theme-tint)) var(--theme-shadow-hue) / 10%);
167
- --card: oklch(100% 0 0);
168
- --primary: var(--foreground);
169
- --primary-foreground: var(--card);
170
- --secondary: oklch(96.5% calc(0.005 * var(--theme-tint)) calc(var(--theme-hue) - 4));
171
- --secondary-foreground: oklch(35.2% calc(0.005 * var(--theme-tint)) calc(var(--theme-hue) + 10));
172
- --control-hover: oklch(91.5% calc(0.008 * var(--theme-tint)) calc(var(--theme-hue) + 3));
173
- --control-active: oklch(88% calc(0.01 * var(--theme-tint)) calc(var(--theme-hue) - 2));
174
- --segmented-surface: oklch(93.4% 0 0);
175
- --segmented-border: oklch(89% 0 0);
176
195
  --shadow-button:
177
- 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),
178
197
  0 1px 2px var(--shadow-color), 0 4px 10px -2px var(--shadow-color),
179
198
  0 12px 32px -6px var(--shadow-color);
180
- --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);
181
202
  --gain: var(--foreground);
182
203
  --chart-mid: oklch(75% calc(0.03 * var(--theme-tint)) var(--theme-hue));
183
204
  }
@@ -200,19 +221,11 @@
200
221
  --negative-tint: oklch(25.85% 0.007695 351.2865);
201
222
  --warning-tint: oklch(26.05% 0.005194 33.0617);
202
223
  --shadow-color: oklch(12% calc(0.025 * var(--theme-tint)) var(--theme-shadow-hue) / 50%);
203
- --card: var(--background);
204
- --primary: oklch(92% calc(0.01 * var(--theme-tint)) var(--theme-hue));
205
- --primary-foreground: oklch(18% calc(0.01 * var(--theme-tint)) var(--theme-hue));
206
- --secondary: var(--muted);
207
- --secondary-foreground: var(--foreground);
208
- --control-hover: var(--muted);
209
- --control-active: var(--border);
210
- --segmented-surface: var(--muted);
211
- --segmented-border: var(--border);
212
224
  --shadow-button:
213
- 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);
214
226
  --shadow-button-secondary:
215
- 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),
216
229
  0 1px 2px var(--shadow-color);
217
230
  --gain: var(--accent);
218
231
  --chart-mid: oklch(44.575% calc(0.0348 * var(--theme-tint)) var(--theme-hue));
@@ -237,21 +250,30 @@
237
250
  [data-accent='rose'],
238
251
  [data-accent='rose'] :where(.light, .dark):where(:not([data-accent])) {
239
252
  --theme-hue: 345;
253
+ --accent-hue: 345;
240
254
  }
241
255
 
242
256
  [data-accent='sage'],
243
257
  [data-accent='sage'] :where(.light, .dark):where(:not([data-accent])) {
244
258
  --theme-hue: 150;
259
+ --accent-hue: 150;
245
260
  }
246
261
 
247
262
  [data-accent='sky'],
248
263
  [data-accent='sky'] :where(.light, .dark):where(:not([data-accent])) {
249
264
  --theme-hue: 225;
265
+ --accent-hue: 225;
250
266
  }
251
267
 
252
268
  [data-accent='indigo'],
253
269
  [data-accent='indigo'] :where(.light, .dark):where(:not([data-accent])) {
254
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;
255
277
  }
256
278
 
257
279
  [data-accent='grayscale'],
@@ -278,15 +300,6 @@
278
300
  --color-muted: var(--muted);
279
301
  --color-border: var(--border);
280
302
  --color-control-border: var(--control-border);
281
- --color-card: var(--card);
282
- --color-primary: var(--primary);
283
- --color-primary-foreground: var(--primary-foreground);
284
- --color-secondary: var(--secondary);
285
- --color-secondary-foreground: var(--secondary-foreground);
286
- --color-control-hover: var(--control-hover);
287
- --color-control-active: var(--control-active);
288
- --color-segmented-surface: var(--segmented-surface);
289
- --color-segmented-border: var(--segmented-border);
290
303
  --color-accent-tint: var(--accent-tint);
291
304
  --color-negative-tint: var(--negative-tint);
292
305
  --color-warning-tint: var(--warning-tint);