@warmio/design 1.9.0 → 1.10.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 +6 -3
- package/components.css +49 -18
- package/dist/button.d.ts +1 -1
- package/dist/button.js +2 -0
- package/interfaces.css +1 -1
- package/package.json +1 -1
- package/theme.css +29 -28
package/README.md
CHANGED
|
@@ -25,9 +25,12 @@ Package ships `components.css` (token-only styles for the primitives) and `dist/
|
|
|
25
25
|
|
|
26
26
|
## Releases
|
|
27
27
|
|
|
28
|
-
The
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
The `1.10.0` release adds the `tableHeaderLink` Button presentation for
|
|
29
|
+
borderless, underlined sortable table headers. The `1.9.1` release updated the
|
|
30
|
+
light default button shadow and white-to-gray gradient. Version `1.9.0`
|
|
31
|
+
switched shared UI type to Inter, kept JetBrains Mono for numbers and code, and
|
|
32
|
+
added the closed type-size tokens. The previous `1.8.0` release added
|
|
33
|
+
Fluid-derived surface-only Button press feedback.
|
|
31
34
|
|
|
32
35
|
Bump this `package.json` version for additive tokens (incl. motion/surface), fonts,
|
|
33
36
|
spacing, or primitive changes. Follow the exact sequence in
|
package/components.css
CHANGED
|
@@ -73,6 +73,17 @@
|
|
|
73
73
|
width: var(--button-width-full);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
[data-warm-button]:not(:disabled):not([aria-disabled='true']):hover {
|
|
77
|
+
filter: brightness(var(--button-hover-brightness));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-slot='toggle-group'][data-appearance='segmented']:has(
|
|
81
|
+
[data-slot='toggle-group-item'][data-pressed]:hover:not(:disabled):not([aria-disabled='true'])
|
|
82
|
+
)
|
|
83
|
+
[data-slot='toggle-group-indicator'] {
|
|
84
|
+
filter: brightness(var(--button-hover-brightness));
|
|
85
|
+
}
|
|
86
|
+
|
|
76
87
|
[data-warm-button]:not(:disabled):not([aria-disabled='true']):not(
|
|
77
88
|
[data-variant='arrow']
|
|
78
89
|
):active::before {
|
|
@@ -132,6 +143,7 @@
|
|
|
132
143
|
|
|
133
144
|
[data-warm-button][data-variant='ghost']::before {
|
|
134
145
|
background-color: transparent;
|
|
146
|
+
box-shadow: var(--button-ghost-shadow);
|
|
135
147
|
}
|
|
136
148
|
[data-warm-button][data-variant='ghost']:hover {
|
|
137
149
|
color: var(--foreground);
|
|
@@ -159,22 +171,12 @@
|
|
|
159
171
|
}
|
|
160
172
|
|
|
161
173
|
[data-warm-button][data-variant='apple'] {
|
|
162
|
-
/*
|
|
163
|
-
overlay always applies after any presentation overlay in `cn()` order
|
|
164
|
-
(e.g. promptCategory's own `bg-background`/`text-foreground`,
|
|
165
|
-
sidebarIcon's `text-sidebar-foreground`, tableHeader's
|
|
166
|
-
`text-muted-foreground`), so apple's colors always win regardless of
|
|
167
|
-
presentation. Presentation rules here use `:not([data-explicit-size])`,
|
|
168
|
-
which raises their specificity above a plain variant selector, so
|
|
169
|
-
`!important` is required to reproduce that same always-wins order. Box
|
|
170
|
-
shadow is deliberately NOT `!important`: promptCategory's own `shadow-xs`
|
|
171
|
-
legitimately overrides apple's outline-style shadow (see the promptCategory
|
|
172
|
-
rules above), matching origin exactly. */
|
|
174
|
+
/* Apple buttons use one flat color in both themes and never cast a shadow. */
|
|
173
175
|
color: var(--apple-button-foreground) !important;
|
|
174
176
|
}
|
|
175
177
|
[data-warm-button][data-variant='apple']::before {
|
|
176
178
|
background-color: var(--apple-button-background) !important;
|
|
177
|
-
box-shadow:
|
|
179
|
+
box-shadow: none;
|
|
178
180
|
}
|
|
179
181
|
button[data-warm-button][data-variant='apple'] {
|
|
180
182
|
appearance: button;
|
|
@@ -184,16 +186,11 @@ button[data-warm-button][data-variant='apple'] {
|
|
|
184
186
|
color: var(--apple-button-foreground);
|
|
185
187
|
}
|
|
186
188
|
[data-warm-button][data-variant='apple']:hover::before {
|
|
187
|
-
background-color:
|
|
188
|
-
in oklab,
|
|
189
|
-
var(--apple-button-hover) var(--button-mix-90),
|
|
190
|
-
transparent
|
|
191
|
-
);
|
|
189
|
+
background-color: var(--apple-button-background) !important;
|
|
192
190
|
}
|
|
193
191
|
[data-warm-button][data-variant='arrow'] {
|
|
194
192
|
border-width: 0;
|
|
195
193
|
text-decoration: underline;
|
|
196
|
-
text-underline-offset: var(--button-underline-offset);
|
|
197
194
|
}
|
|
198
195
|
[data-warm-button][data-variant='arrow'] svg {
|
|
199
196
|
width: var(--button-icon-size);
|
|
@@ -355,9 +352,43 @@ button[data-warm-button][data-variant='apple'] {
|
|
|
355
352
|
[data-warm-button][data-presentation='tableHeader']:hover::before {
|
|
356
353
|
background-color: transparent;
|
|
357
354
|
}
|
|
355
|
+
[data-warm-button][data-presentation='tableHeaderLink']:not([data-explicit-size]) {
|
|
356
|
+
height: auto;
|
|
357
|
+
min-height: 0;
|
|
358
|
+
width: var(--button-width-full);
|
|
359
|
+
justify-content: flex-start;
|
|
360
|
+
gap: var(--button-gap);
|
|
361
|
+
padding: 0;
|
|
362
|
+
border-radius: 0;
|
|
363
|
+
font-weight: 400;
|
|
364
|
+
line-height: var(--button-line-height);
|
|
365
|
+
color: var(--muted-foreground);
|
|
366
|
+
text-decoration: underline;
|
|
367
|
+
text-decoration-thickness: var(--button-underline-thickness);
|
|
368
|
+
text-underline-offset: var(--button-underline-offset);
|
|
369
|
+
}
|
|
370
|
+
[data-warm-button][data-presentation='tableHeaderLink']::before {
|
|
371
|
+
background-image: none;
|
|
372
|
+
background-color: transparent;
|
|
373
|
+
box-shadow: none;
|
|
374
|
+
}
|
|
375
|
+
[data-warm-button][data-presentation='tableHeaderLink']:hover {
|
|
376
|
+
color: var(--foreground);
|
|
377
|
+
}
|
|
378
|
+
[data-warm-button][data-presentation='tableHeaderLink']:hover::before {
|
|
379
|
+
background-image: none;
|
|
380
|
+
background-color: transparent;
|
|
381
|
+
box-shadow: none;
|
|
382
|
+
}
|
|
358
383
|
[data-warm-button][data-presentation='touch']:not([data-explicit-size]) {
|
|
359
384
|
min-height: var(--button-min-height-touch);
|
|
360
385
|
}
|
|
386
|
+
[data-warm-button][data-presentation='headerAction']:not([data-explicit-size]) {
|
|
387
|
+
width: auto;
|
|
388
|
+
height: var(--button-size-xs);
|
|
389
|
+
padding-left: var(--button-padding-x-md);
|
|
390
|
+
padding-right: var(--button-padding-x-md);
|
|
391
|
+
}
|
|
361
392
|
[data-warm-button][data-presentation='threadMore']:not([data-explicit-size]) {
|
|
362
393
|
width: var(--button-size-xs);
|
|
363
394
|
height: var(--button-size-xs);
|
package/dist/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export type ButtonPresentation = 'assistantIcon' | 'assistantRoundIcon' | 'default' | '
|
|
2
|
+
export type ButtonPresentation = 'assistantIcon' | 'assistantRoundIcon' | 'composerIcon' | 'default' | 'headerAction' | 'compact' | 'controlPeer' | 'editPill' | 'hero' | 'menuOption' | 'promptCategory' | 'promptOption' | 'sidebarIcon' | 'tableHeader' | 'tableHeaderLink' | 'threadMore' | 'threadNew' | 'touch';
|
|
3
3
|
export type ButtonVariant = 'default' | 'outline' | 'ghost' | 'destructive' | 'apple' | 'arrow';
|
|
4
4
|
export type ButtonSize = 'compact' | 'default' | 'jumbo' | 'icon';
|
|
5
5
|
export type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> & {
|
package/dist/button.js
CHANGED
|
@@ -5,6 +5,7 @@ const presentationToPrivateSize = {
|
|
|
5
5
|
assistantRoundIcon: 'icon-round',
|
|
6
6
|
composerIcon: 'icon-sm',
|
|
7
7
|
default: 'default',
|
|
8
|
+
headerAction: 'icon-xs',
|
|
8
9
|
compact: 'sm',
|
|
9
10
|
controlPeer: 'default',
|
|
10
11
|
editPill: 'sm',
|
|
@@ -14,6 +15,7 @@ const presentationToPrivateSize = {
|
|
|
14
15
|
promptOption: 'option',
|
|
15
16
|
sidebarIcon: 'icon',
|
|
16
17
|
tableHeader: 'default',
|
|
18
|
+
tableHeaderLink: 'default',
|
|
17
19
|
threadMore: 'icon-xs',
|
|
18
20
|
threadNew: 'sm',
|
|
19
21
|
touch: 'default',
|
package/interfaces.css
CHANGED
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
--sidebar-foreground: var(--foreground);
|
|
112
112
|
--sidebar-primary: var(--primary);
|
|
113
113
|
--sidebar-primary-foreground: var(--primary-foreground);
|
|
114
|
-
--sidebar-accent: oklch(
|
|
114
|
+
--sidebar-accent: oklch(1 0 0);
|
|
115
115
|
--sidebar-accent-foreground: oklch(0.214 0.009 43.1);
|
|
116
116
|
--sidebar-border: oklch(0.922 0 0);
|
|
117
117
|
--sidebar-ring: oklch(0.714 0.014 41.2);
|
|
@@ -236,6 +236,7 @@
|
|
|
236
236
|
--motion-distance-lg: 1rem;
|
|
237
237
|
--button-press-inset: 1px;
|
|
238
238
|
--button-press-easing: cubic-bezier(0.23, 1, 0.32, 1);
|
|
239
|
+
--button-hover-brightness: 1.1;
|
|
239
240
|
|
|
240
241
|
/* Aliases keep one scale; legacy names resolve to motion; chart uses slow (nonessential scale) */
|
|
241
242
|
--transition-fast: var(--motion-duration-fast);
|
|
@@ -250,8 +251,8 @@
|
|
|
250
251
|
--button-padding-y-lg: 0.75rem;
|
|
251
252
|
--button-font-size: var(--type-size-body);
|
|
252
253
|
--button-gap: 0.5rem;
|
|
253
|
-
--default-button-gradient-start:
|
|
254
|
-
--default-button-gradient-end:
|
|
254
|
+
--default-button-gradient-start: #fff;
|
|
255
|
+
--default-button-gradient-end: #f2f2f2;
|
|
255
256
|
--default-button-active: oklch(0.91 0 0);
|
|
256
257
|
--button-primary-bg: oklch(0.99 0 0);
|
|
257
258
|
--button-primary-foreground: oklch(0.17 0 0);
|
|
@@ -259,13 +260,16 @@
|
|
|
259
260
|
--button-primary-hover: oklch(1 0 0);
|
|
260
261
|
--button-primary-active: oklch(0.94 0 0);
|
|
261
262
|
--button-primary-shadow:
|
|
262
|
-
inset 0 1px 0
|
|
263
|
+
inset 0 -1px 0 rgba(255, 255, 255, 1), 0 0 0 1px rgb(0 0 0 / 0.1), 0 1px 1px rgba(0, 0, 0, 0.1);
|
|
263
264
|
--button-outline-shadow: none;
|
|
265
|
+
--button-ghost-shadow:
|
|
266
|
+
inset 0 1px 0 0px rgba(255, 255, 255, 1), 0 1px 0px rgba(0, 0, 0, 0.1),
|
|
267
|
+
0 1px 2px rgba(0, 0, 0, 0.2);
|
|
264
268
|
/* Outline uses the neutral dark button gradient in light mode. */
|
|
265
269
|
--button-outline-fill-image: linear-gradient(to bottom, #4d4d4d 0%, #333333 100%);
|
|
266
|
-
--button-outline-fill-image-hover: linear-gradient(to bottom, #
|
|
267
|
-
--button-primary-gradient: linear-gradient(to bottom, #
|
|
268
|
-
--button-primary-gradient-hover: linear-gradient(to bottom, #
|
|
270
|
+
--button-outline-fill-image-hover: linear-gradient(to bottom, #5a5a5a 0%, #404040 100%);
|
|
271
|
+
--button-primary-gradient: linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
|
|
272
|
+
--button-primary-gradient-hover: linear-gradient(to bottom, #fafafa 0%, #e0e0e0 100%);
|
|
269
273
|
--apple-button-background: var(--foreground);
|
|
270
274
|
--apple-button-foreground: var(--background);
|
|
271
275
|
--apple-button-hover: var(--apple-button-background);
|
|
@@ -294,6 +298,7 @@
|
|
|
294
298
|
--button-size-md: 2rem;
|
|
295
299
|
--button-size-lg: 3rem;
|
|
296
300
|
--button-underline-offset: 0.25rem;
|
|
301
|
+
--button-underline-thickness: 1px;
|
|
297
302
|
--button-focus-ring: 3px;
|
|
298
303
|
--logo-size-badge: 0.75rem;
|
|
299
304
|
--logo-size-default: 1.75rem;
|
|
@@ -364,7 +369,7 @@
|
|
|
364
369
|
--page-padding-tablet: 1rem;
|
|
365
370
|
--page-padding-desktop: 1rem;
|
|
366
371
|
--page-gap: 1rem;
|
|
367
|
-
--header-height:
|
|
372
|
+
--header-height: 3.25rem;
|
|
368
373
|
|
|
369
374
|
/* Sidebar Dimensions */
|
|
370
375
|
--sidebar-width: 12.8rem;
|
|
@@ -440,12 +445,17 @@
|
|
|
440
445
|
--button-primary-border: oklch(0 0 0 / 0.18);
|
|
441
446
|
--button-primary-hover: oklch(from var(--primary) calc(l + 0.08) c h);
|
|
442
447
|
--button-primary-active: oklch(from var(--primary) calc(l - 0.04) c h);
|
|
443
|
-
--button-primary-shadow:
|
|
448
|
+
--button-primary-shadow:
|
|
449
|
+
inset 0 1px 0 #808080, inset 0 -1px rgba(255, 255, 255, 0.1), 0 1px 2px black;
|
|
450
|
+
--button-hover-brightness: 1.2;
|
|
444
451
|
--button-outline-shadow: inset 0 1px 0 rgb(255 255 255);
|
|
452
|
+
--button-ghost-shadow:
|
|
453
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.02),
|
|
454
|
+
0 1px 0 rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
445
455
|
--button-outline-fill-image: linear-gradient(to bottom, #f2f2f2 0%, #e6e6e6 100%);
|
|
446
|
-
--button-outline-fill-image-hover: linear-gradient(to bottom, #
|
|
456
|
+
--button-outline-fill-image-hover: linear-gradient(to bottom, #fafafa 0%, #ececec 100%);
|
|
447
457
|
--button-primary-gradient: linear-gradient(to bottom, #4d4d4d 0%, #333333 100%);
|
|
448
|
-
--button-primary-gradient-hover: linear-gradient(to bottom, #
|
|
458
|
+
--button-primary-gradient-hover: linear-gradient(to bottom, #5a5a5a 0%, #404040 100%);
|
|
449
459
|
--apple-button-background: oklch(0 0 0);
|
|
450
460
|
--apple-button-foreground: oklch(1 0 0);
|
|
451
461
|
--apple-button-hover: var(--apple-button-background);
|
|
@@ -563,26 +573,17 @@
|
|
|
563
573
|
--accent-solid-text: oklch(from var(--brand-accent-solid) calc(l - 0.14) calc(c + 0.02) h);
|
|
564
574
|
|
|
565
575
|
/* Default button gradient (light) */
|
|
566
|
-
--default-button-gradient-start:
|
|
567
|
-
--default-button-gradient-end:
|
|
576
|
+
--default-button-gradient-start: #fff;
|
|
577
|
+
--default-button-gradient-end: #f2f2f2;
|
|
568
578
|
--default-button-active: oklch(0.91 0 0);
|
|
569
579
|
--button-primary-shadow:
|
|
570
|
-
inset 0 1px 0
|
|
580
|
+
inset 0 -1px 0 rgba(255, 255, 255, 1), 0 0 0 1px rgb(0 0 0 / 0.1), 0 1px 1px rgba(0, 0, 0, 0.1);
|
|
571
581
|
--button-outline-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.18);
|
|
572
|
-
--button-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
#e4e1db 100%
|
|
578
|
-
);
|
|
579
|
-
--button-primary-gradient-hover: linear-gradient(
|
|
580
|
-
to bottom,
|
|
581
|
-
#f2f2f2 0%,
|
|
582
|
-
#ecebe8 28%,
|
|
583
|
-
#e4e2dd 64%,
|
|
584
|
-
#d9d6d0 100%
|
|
585
|
-
);
|
|
582
|
+
--button-ghost-shadow:
|
|
583
|
+
inset 0 1px 0 0px rgba(255, 255, 255, 1), 0 1px 0px rgba(0, 0, 0, 0.1),
|
|
584
|
+
0 1px 2px rgba(0, 0, 0, 0.2);
|
|
585
|
+
--button-primary-gradient: linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
|
|
586
|
+
--button-primary-gradient-hover: linear-gradient(to bottom, #fafafa 0%, #e0e0e0 100%);
|
|
586
587
|
|
|
587
588
|
/* Charts */
|
|
588
589
|
--chart-1: var(--brand-primary);
|