@warmio/design 1.9.0 → 1.9.1
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 +2 -1
- package/components.css +21 -17
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -0
- package/package.json +1 -1
- package/theme.css +28 -28
package/README.md
CHANGED
|
@@ -25,7 +25,8 @@ Package ships `components.css` (token-only styles for the primitives) and `dist/
|
|
|
25
25
|
|
|
26
26
|
## Releases
|
|
27
27
|
|
|
28
|
-
The next version, `1.9.
|
|
28
|
+
The next version, `1.9.1`, updates the light default button shadow and white-to-gray gradient.
|
|
29
|
+
Version `1.9.0` switches shared UI type to Inter, keeps JetBrains Mono
|
|
29
30
|
for numbers and code, and adds the closed type-size tokens. The previous `1.8.0`
|
|
30
31
|
release added Fluid-derived surface-only Button press feedback.
|
|
31
32
|
|
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,11 +186,7 @@ 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;
|
|
@@ -358,6 +356,12 @@ button[data-warm-button][data-variant='apple'] {
|
|
|
358
356
|
[data-warm-button][data-presentation='touch']:not([data-explicit-size]) {
|
|
359
357
|
min-height: var(--button-min-height-touch);
|
|
360
358
|
}
|
|
359
|
+
[data-warm-button][data-presentation='headerAction']:not([data-explicit-size]) {
|
|
360
|
+
width: auto;
|
|
361
|
+
height: var(--button-size-xs);
|
|
362
|
+
padding-left: var(--button-padding-x-md);
|
|
363
|
+
padding-right: var(--button-padding-x-md);
|
|
364
|
+
}
|
|
361
365
|
[data-warm-button][data-presentation='threadMore']:not([data-explicit-size]) {
|
|
362
366
|
width: var(--button-size-xs);
|
|
363
367
|
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' | '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
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);
|
|
@@ -364,7 +368,7 @@
|
|
|
364
368
|
--page-padding-tablet: 1rem;
|
|
365
369
|
--page-padding-desktop: 1rem;
|
|
366
370
|
--page-gap: 1rem;
|
|
367
|
-
--header-height:
|
|
371
|
+
--header-height: 3.25rem;
|
|
368
372
|
|
|
369
373
|
/* Sidebar Dimensions */
|
|
370
374
|
--sidebar-width: 12.8rem;
|
|
@@ -440,12 +444,17 @@
|
|
|
440
444
|
--button-primary-border: oklch(0 0 0 / 0.18);
|
|
441
445
|
--button-primary-hover: oklch(from var(--primary) calc(l + 0.08) c h);
|
|
442
446
|
--button-primary-active: oklch(from var(--primary) calc(l - 0.04) c h);
|
|
443
|
-
--button-primary-shadow:
|
|
447
|
+
--button-primary-shadow:
|
|
448
|
+
inset 0 1px 0 #808080, inset 0 -1px rgba(255, 255, 255, 0.1), 0 1px 2px black;
|
|
449
|
+
--button-hover-brightness: 1.2;
|
|
444
450
|
--button-outline-shadow: inset 0 1px 0 rgb(255 255 255);
|
|
451
|
+
--button-ghost-shadow:
|
|
452
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.02),
|
|
453
|
+
0 1px 0 rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
445
454
|
--button-outline-fill-image: linear-gradient(to bottom, #f2f2f2 0%, #e6e6e6 100%);
|
|
446
|
-
--button-outline-fill-image-hover: linear-gradient(to bottom, #
|
|
455
|
+
--button-outline-fill-image-hover: linear-gradient(to bottom, #fafafa 0%, #ececec 100%);
|
|
447
456
|
--button-primary-gradient: linear-gradient(to bottom, #4d4d4d 0%, #333333 100%);
|
|
448
|
-
--button-primary-gradient-hover: linear-gradient(to bottom, #
|
|
457
|
+
--button-primary-gradient-hover: linear-gradient(to bottom, #5a5a5a 0%, #404040 100%);
|
|
449
458
|
--apple-button-background: oklch(0 0 0);
|
|
450
459
|
--apple-button-foreground: oklch(1 0 0);
|
|
451
460
|
--apple-button-hover: var(--apple-button-background);
|
|
@@ -563,26 +572,17 @@
|
|
|
563
572
|
--accent-solid-text: oklch(from var(--brand-accent-solid) calc(l - 0.14) calc(c + 0.02) h);
|
|
564
573
|
|
|
565
574
|
/* Default button gradient (light) */
|
|
566
|
-
--default-button-gradient-start:
|
|
567
|
-
--default-button-gradient-end:
|
|
575
|
+
--default-button-gradient-start: #fff;
|
|
576
|
+
--default-button-gradient-end: #f2f2f2;
|
|
568
577
|
--default-button-active: oklch(0.91 0 0);
|
|
569
578
|
--button-primary-shadow:
|
|
570
|
-
inset 0 1px 0
|
|
579
|
+
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
580
|
--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
|
-
);
|
|
581
|
+
--button-ghost-shadow:
|
|
582
|
+
inset 0 1px 0 0px rgba(255, 255, 255, 1), 0 1px 0px rgba(0, 0, 0, 0.1),
|
|
583
|
+
0 1px 2px rgba(0, 0, 0, 0.2);
|
|
584
|
+
--button-primary-gradient: linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
|
|
585
|
+
--button-primary-gradient-hover: linear-gradient(to bottom, #fafafa 0%, #e0e0e0 100%);
|
|
586
586
|
|
|
587
587
|
/* Charts */
|
|
588
588
|
--chart-1: var(--brand-primary);
|