@warmio/design 1.10.0 → 1.11.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/LICENSES/inter-OFL-1.1.txt +93 -0
- package/README.md +11 -6
- package/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
- package/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/fonts/inter-latin-wght-italic.woff2 +0 -0
- package/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/fonts.css +45 -5
- package/globals.css +1 -1
- package/logo.css +39 -0
- package/package.json +4 -8
- package/theme.css +11 -34
- package/components.css +0 -583
- package/dist/button.d.ts +0 -49
- package/dist/button.js +0 -61
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
# @warmio/design
|
|
2
2
|
|
|
3
3
|
Warm's public design contract: CSS tokens (fonts, colors, spacing, radii, shadows, motion,
|
|
4
|
-
reduced-motion, marketing surfaces + dot patterns) and
|
|
4
|
+
reduced-motion, marketing surfaces + dot patterns) and the Logo primitive.
|
|
5
5
|
|
|
6
6
|
```css
|
|
7
7
|
@import '@warmio/design/globals.css';
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Import
|
|
10
|
+
Import the Logo primitive directly:
|
|
11
11
|
|
|
12
12
|
```ts
|
|
13
|
-
import { Button, ButtonLink } from '@warmio/design/button';
|
|
14
13
|
import { Logo, WarmLogoIcon } from '@warmio/design/logo';
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
The product UI uses Inter from
|
|
18
|
-
|
|
16
|
+
The product UI uses Inter, self-hosted from `fonts/` as wght variable latin and
|
|
17
|
+
latin-ext subsets (normal and italic, Inter 4.001 from `@fontsource-variable/inter`
|
|
18
|
+
5.3.0, OFL in `LICENSES/inter-OFL-1.1.txt`). No font loads from Google.
|
|
19
|
+
JetBrains Mono remains for numbers, code, and measurements. The interface uses regular (400) and medium (500) weights.
|
|
19
20
|
|
|
20
21
|
`--accent-solid` / `--accent-solid-text` are the chromatic accent for links,
|
|
21
22
|
badges, and highlights. They derive from `--brand-accent-solid` in `themes.css`.
|
|
22
23
|
|
|
23
|
-
Package ships `
|
|
24
|
+
Package ships `logo.css` (token-only Logo styles) and `dist/` (ESM + .d.ts). `dependencies` and `devDependencies` are empty.
|
|
24
25
|
`peerDependencies.react` is `^19.0.0`. No root JS export.
|
|
25
26
|
|
|
26
27
|
## Releases
|
|
27
28
|
|
|
29
|
+
The next release is `1.11.0`. It adds the 18px `--type-size-large` token for
|
|
30
|
+
large body copy, self-hosts Inter instead of importing it from Google Fonts, and
|
|
31
|
+
removes the `./button` and `./components.css` exports (Button now lives in `@warm/ui`).
|
|
32
|
+
|
|
28
33
|
The `1.10.0` release adds the `tableHeaderLink` Button presentation for
|
|
29
34
|
borderless, underlined sortable table headers. The `1.9.1` release updated the
|
|
30
35
|
light default button shadow and white-to-gray gradient. Version `1.9.0`
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/fonts.css
CHANGED
|
@@ -1,8 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Inter';
|
|
3
|
+
font-style: normal;
|
|
4
|
+
font-display: swap;
|
|
5
|
+
font-weight: 100 900;
|
|
6
|
+
src: url('./fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
|
|
7
|
+
unicode-range:
|
|
8
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
9
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
10
|
+
U+A720-A7FF;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'Inter';
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-display: swap;
|
|
17
|
+
font-weight: 100 900;
|
|
18
|
+
src: url('./fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
|
|
19
|
+
unicode-range:
|
|
20
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
21
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: 'Inter';
|
|
26
|
+
font-style: italic;
|
|
27
|
+
font-display: swap;
|
|
28
|
+
font-weight: 100 900;
|
|
29
|
+
src: url('./fonts/inter-latin-ext-wght-italic.woff2') format('woff2-variations');
|
|
30
|
+
unicode-range:
|
|
31
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
32
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
33
|
+
U+A720-A7FF;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: 'Inter';
|
|
38
|
+
font-style: italic;
|
|
39
|
+
font-display: swap;
|
|
40
|
+
font-weight: 100 900;
|
|
41
|
+
src: url('./fonts/inter-latin-wght-italic.woff2') format('woff2-variations');
|
|
42
|
+
unicode-range:
|
|
43
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
44
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
45
|
+
}
|
|
6
46
|
|
|
7
47
|
@font-face {
|
|
8
48
|
font-family: 'JetBrains Mono';
|
package/globals.css
CHANGED
package/logo.css
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Logo - keep data-warm-logo on wrapper div AND svg; unambiguous element selectors + data to avoid sizing wrapper or constraining width; wrapper inline-flex (not inline-block); preserve gap/text/typography/tone/icon sizes from old */
|
|
2
|
+
[data-warm-logo] {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--logo-gap);
|
|
6
|
+
}
|
|
7
|
+
[data-warm-logo] > span {
|
|
8
|
+
font-size: var(--logo-font-size);
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
letter-spacing: var(--logo-letter-spacing);
|
|
11
|
+
}
|
|
12
|
+
svg[data-warm-logo] {
|
|
13
|
+
display: block;
|
|
14
|
+
fill: currentColor;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
}
|
|
17
|
+
[data-warm-logo][data-size='badge'] svg[data-warm-logo] {
|
|
18
|
+
width: var(--logo-size-badge);
|
|
19
|
+
height: var(--logo-size-badge);
|
|
20
|
+
}
|
|
21
|
+
[data-warm-logo][data-size='default'] svg[data-warm-logo] {
|
|
22
|
+
width: var(--logo-size-default);
|
|
23
|
+
height: var(--logo-size-default);
|
|
24
|
+
}
|
|
25
|
+
[data-warm-logo][data-size='feature'] svg[data-warm-logo] {
|
|
26
|
+
width: var(--logo-size-feature);
|
|
27
|
+
height: var(--logo-size-feature);
|
|
28
|
+
}
|
|
29
|
+
[data-warm-logo][data-size='hero'] svg[data-warm-logo] {
|
|
30
|
+
width: var(--logo-size-hero);
|
|
31
|
+
height: var(--logo-size-hero);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[data-warm-logo][data-tone='foreground'] {
|
|
35
|
+
color: var(--foreground);
|
|
36
|
+
}
|
|
37
|
+
[data-warm-logo][data-tone='sidebar'] {
|
|
38
|
+
color: var(--sidebar-foreground);
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmio/design",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Warm's public design contract: CSS tokens and
|
|
3
|
+
"version": "1.11.0",
|
|
4
|
+
"description": "Warm's public design contract: CSS tokens and the Logo primitive.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"interfaces.css",
|
|
24
24
|
"theme.css",
|
|
25
25
|
"themes.css",
|
|
26
|
-
"
|
|
26
|
+
"logo.css",
|
|
27
27
|
"fonts",
|
|
28
28
|
"dist",
|
|
29
29
|
"LICENSES"
|
|
@@ -35,11 +35,7 @@
|
|
|
35
35
|
"./theme.css": "./theme.css",
|
|
36
36
|
"./themes.css": "./themes.css",
|
|
37
37
|
"./interfaces.css": "./interfaces.css",
|
|
38
|
-
"./
|
|
39
|
-
"./button": {
|
|
40
|
-
"types": "./dist/button.d.ts",
|
|
41
|
-
"import": "./dist/button.js"
|
|
42
|
-
},
|
|
38
|
+
"./logo.css": "./logo.css",
|
|
43
39
|
"./logo": {
|
|
44
40
|
"types": "./dist/logo.d.ts",
|
|
45
41
|
"import": "./dist/logo.js"
|
package/theme.css
CHANGED
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
--border: oklch(0.922 0 0);
|
|
72
72
|
--input: var(--border);
|
|
73
73
|
|
|
74
|
-
/* Type scale: caption 12px, label 13px, body 14px, display 24px. */
|
|
74
|
+
/* Type scale: caption 12px, label 13px, body 14px, large body 18px, display 24px. */
|
|
75
75
|
--type-size-caption: 0.75rem;
|
|
76
76
|
--type-size-label: 0.8125rem;
|
|
77
77
|
--type-size-body: 0.875rem;
|
|
78
|
+
--type-size-large: 1.125rem;
|
|
78
79
|
--type-size-display: 1.5rem;
|
|
79
80
|
|
|
80
81
|
/* Alternating section backgrounds for marketing pages */
|
|
@@ -133,11 +134,7 @@
|
|
|
133
134
|
--warning-bg-subtle: oklch(0.96 0.03 85);
|
|
134
135
|
--warning-bg-muted: oklch(0.9 0.1 85);
|
|
135
136
|
--warning-border: oklch(0.75 0.12 85);
|
|
136
|
-
--warning-card-surface: color-mix(
|
|
137
|
-
in oklch,
|
|
138
|
-
var(--card) 82%,
|
|
139
|
-
oklch(from var(--warning) l calc(c + 0.08) h) 18%
|
|
140
|
-
);
|
|
137
|
+
--warning-card-surface: color-mix(in oklab, var(--warning) 10%, transparent);
|
|
141
138
|
|
|
142
139
|
/* Finance = legible on-surface tones of WARM_COLORS.finance
|
|
143
140
|
(libraries/app-core/utils/colors.ts): cash=sage, debt=mauve, investment=seafoam.
|
|
@@ -153,12 +150,8 @@
|
|
|
153
150
|
--error-text: oklch(0.35 0.14 30);
|
|
154
151
|
--error-bg-subtle: oklch(0.96 0.02 30);
|
|
155
152
|
--error-bg-muted: oklch(0.9 0.06 30);
|
|
156
|
-
--error-border: oklch(0.
|
|
157
|
-
--danger-card-surface: color-mix(
|
|
158
|
-
in oklch,
|
|
159
|
-
var(--card) 98%,
|
|
160
|
-
oklch(from var(--destructive) l calc(c + 0.1) h) 2%
|
|
161
|
-
);
|
|
153
|
+
--error-border: oklch(0.68 0.08 30);
|
|
154
|
+
--danger-card-surface: color-mix(in oklab, var(--destructive) 10%, transparent);
|
|
162
155
|
|
|
163
156
|
/* Info = Blue (H: 250) */
|
|
164
157
|
--info-text: oklch(0.35 0.1 250);
|
|
@@ -485,12 +478,8 @@
|
|
|
485
478
|
--warning-text: oklch(0.7 0.15 85);
|
|
486
479
|
--warning-bg-subtle: oklch(0.2 0.05 85);
|
|
487
480
|
--warning-bg-muted: oklch(0.25 0.08 85);
|
|
488
|
-
--warning-border: oklch(0.35 0.
|
|
489
|
-
--warning-card-surface: color-mix(
|
|
490
|
-
in oklch,
|
|
491
|
-
var(--card) 80%,
|
|
492
|
-
oklch(from var(--warning) l calc(c + 0.06) h) 20%
|
|
493
|
-
);
|
|
481
|
+
--warning-border: oklch(0.35 0.06 85);
|
|
482
|
+
--warning-card-surface: color-mix(in oklab, var(--warning) 10%, transparent);
|
|
494
483
|
|
|
495
484
|
/* Finance (dark variants) — lightened for legibility on dark surfaces */
|
|
496
485
|
--finance-cash: oklch(0.74 0.06 128);
|
|
@@ -501,12 +490,8 @@
|
|
|
501
490
|
--error-text: oklch(0.7 0.12 30);
|
|
502
491
|
--error-bg-subtle: oklch(0.2 0.05 30);
|
|
503
492
|
--error-bg-muted: oklch(0.25 0.06 30);
|
|
504
|
-
--error-border: oklch(0.35 0.
|
|
505
|
-
--danger-card-surface: color-mix(
|
|
506
|
-
in oklch,
|
|
507
|
-
var(--card) 92%,
|
|
508
|
-
oklch(from var(--destructive) l calc(c + 0.1) h) 8%
|
|
509
|
-
);
|
|
493
|
+
--error-border: oklch(0.35 0.04 30);
|
|
494
|
+
--danger-card-surface: color-mix(in oklab, var(--destructive) 10%, transparent);
|
|
510
495
|
|
|
511
496
|
--info-text: oklch(0.7 0.08 250);
|
|
512
497
|
--info-bg-subtle: oklch(0.2 0.02 250);
|
|
@@ -603,11 +588,7 @@
|
|
|
603
588
|
--warning-bg-subtle: oklch(0.96 0.03 85);
|
|
604
589
|
--warning-bg-muted: oklch(0.9 0.1 85);
|
|
605
590
|
--warning-border: oklch(0.75 0.12 85);
|
|
606
|
-
--warning-card-surface: color-mix(
|
|
607
|
-
in oklch,
|
|
608
|
-
var(--card) 82%,
|
|
609
|
-
oklch(from var(--warning) l calc(c + 0.08) h) 18%
|
|
610
|
-
);
|
|
591
|
+
--warning-card-surface: color-mix(in oklab, var(--warning) 10%, transparent);
|
|
611
592
|
|
|
612
593
|
/* Finance (light variants) — darkened for legibility on light surfaces */
|
|
613
594
|
--finance-cash: oklch(0.43 0.055 128);
|
|
@@ -619,11 +600,7 @@
|
|
|
619
600
|
--error-bg-subtle: oklch(0.96 0.02 30);
|
|
620
601
|
--error-bg-muted: oklch(0.9 0.06 30);
|
|
621
602
|
--error-border: oklch(0.75 0.08 30);
|
|
622
|
-
--danger-card-surface: color-mix(
|
|
623
|
-
in oklch,
|
|
624
|
-
var(--card) 98%,
|
|
625
|
-
oklch(from var(--destructive) l calc(c + 0.1) h) 2%
|
|
626
|
-
);
|
|
603
|
+
--danger-card-surface: color-mix(in oklab, var(--destructive) 10%, transparent);
|
|
627
604
|
|
|
628
605
|
--info-text: oklch(0.35 0.1 250);
|
|
629
606
|
--info-bg-subtle: oklch(0.96 0.02 250);
|
package/components.css
DELETED
|
@@ -1,583 +0,0 @@
|
|
|
1
|
-
/* @warmio/design components.css - Warm Button/Logo recipes.
|
|
2
|
-
* Colors, typography, geometry, and edges remain Warm-owned.
|
|
3
|
-
* Surface-only press feedback adapted from Fluid Functionalism (MIT):
|
|
4
|
-
* https://www.fluidfunctionalism.com/r/base/button.json
|
|
5
|
-
* Native CSS keeps the published primitive free of a motion runtime.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
[data-warm-button] {
|
|
9
|
-
position: relative;
|
|
10
|
-
isolation: isolate;
|
|
11
|
-
/* Strip native button chrome when this stylesheet is used without preflight.
|
|
12
|
-
* `appearance` is deliberately left at its UA default (matches the
|
|
13
|
-
* pre-migration PrimitiveButton/buttonVariants recipe, which never applied
|
|
14
|
-
* `appearance-none`): every other property below already fully overrides
|
|
15
|
-
* native border/background/padding rendering, and resetting `appearance`
|
|
16
|
-
* here would diverge from the origin recipe's actual computed style. */
|
|
17
|
-
border: 0 solid;
|
|
18
|
-
background: transparent;
|
|
19
|
-
background-clip: padding-box;
|
|
20
|
-
padding: 0;
|
|
21
|
-
margin: 0;
|
|
22
|
-
font: inherit;
|
|
23
|
-
color: inherit;
|
|
24
|
-
display: inline-flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
border-radius: var(--radius-full);
|
|
28
|
-
font-size: var(--button-font-size);
|
|
29
|
-
font-weight: 400;
|
|
30
|
-
line-height: var(--button-line-height);
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
transition-property: var(--button-transition-property);
|
|
33
|
-
/* Exact legacy duration (200ms), derived from the locked motion scale
|
|
34
|
-
(fast=100ms) rather than a literal: fast x 2 = 200ms exactly, and it
|
|
35
|
-
zeroes correctly under reduced motion since `--motion-duration-fast`
|
|
36
|
-
itself is zeroed there (see the reduced-motion block below). */
|
|
37
|
-
transition-duration: calc(var(--motion-duration-fast) * 2);
|
|
38
|
-
transition-timing-function: ease-out;
|
|
39
|
-
outline: none;
|
|
40
|
-
user-select: none;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
flex-shrink: 0;
|
|
43
|
-
/* border handled by variant shadows/tokens; no default regression border */
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Move only the painted surface, never the label or the hit target. Fluid's
|
|
47
|
-
* fixed 1px-per-edge collapse avoids width-dependent scaling of wide buttons.
|
|
48
|
-
* Warm gradients and edge shadows stay on this layer at their original bounds. */
|
|
49
|
-
[data-warm-button]::before {
|
|
50
|
-
content: '';
|
|
51
|
-
position: absolute;
|
|
52
|
-
z-index: -1;
|
|
53
|
-
inset: 0;
|
|
54
|
-
border-radius: inherit;
|
|
55
|
-
background-color: transparent;
|
|
56
|
-
background-image: none;
|
|
57
|
-
background-clip: inherit;
|
|
58
|
-
box-shadow: none;
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
transition-property: var(--button-surface-transition-property);
|
|
61
|
-
transition-duration:
|
|
62
|
-
calc(var(--motion-duration-fast) * 1.8), calc(var(--motion-duration-fast) * 0.8),
|
|
63
|
-
calc(var(--motion-duration-fast) * 1.8);
|
|
64
|
-
transition-timing-function: var(--button-press-easing);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
[data-warm-button]:focus-visible {
|
|
68
|
-
box-shadow: 0 0 0 var(--button-focus-ring)
|
|
69
|
-
color-mix(in oklab, var(--ring) var(--button-mix-50), transparent);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
[data-warm-button][data-width='full'] {
|
|
73
|
-
width: var(--button-width-full);
|
|
74
|
-
}
|
|
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
|
-
|
|
87
|
-
[data-warm-button]:not(:disabled):not([aria-disabled='true']):not(
|
|
88
|
-
[data-variant='arrow']
|
|
89
|
-
):active::before {
|
|
90
|
-
inset: var(--button-press-inset);
|
|
91
|
-
transition-duration: calc(var(--motion-duration-fast) * 0.8);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@media (prefers-reduced-motion: reduce) {
|
|
95
|
-
[data-warm-button],
|
|
96
|
-
[data-warm-button]::before {
|
|
97
|
-
transition: none;
|
|
98
|
-
}
|
|
99
|
-
[data-warm-button]:not(:disabled):not([aria-disabled='true']):not(
|
|
100
|
-
[data-variant='arrow']
|
|
101
|
-
):active::before {
|
|
102
|
-
inset: 0;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* Variants (from cva + overrides + edge; tokens for color/shadow/radius) */
|
|
107
|
-
[data-warm-button][data-variant='default'] {
|
|
108
|
-
color: var(--button-primary-foreground);
|
|
109
|
-
}
|
|
110
|
-
[data-warm-button][data-variant='default']::before {
|
|
111
|
-
background-color: var(--button-primary-bg);
|
|
112
|
-
background-image: var(--button-primary-gradient);
|
|
113
|
-
box-shadow: var(--button-primary-shadow);
|
|
114
|
-
/* no explicit border to avoid regression; shadow provides chrome */
|
|
115
|
-
}
|
|
116
|
-
[data-warm-button][data-variant='default']:hover::before {
|
|
117
|
-
background-color: var(--button-primary-hover);
|
|
118
|
-
background-image: var(--button-primary-gradient-hover);
|
|
119
|
-
}
|
|
120
|
-
[data-warm-button][data-variant='default']:active::before {
|
|
121
|
-
background-color: var(--button-primary-active);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
[data-warm-button][data-variant='outline'] {
|
|
125
|
-
border-style: none;
|
|
126
|
-
color: var(--background);
|
|
127
|
-
}
|
|
128
|
-
[data-warm-button][data-variant='outline']::before {
|
|
129
|
-
background-color: var(--background);
|
|
130
|
-
background-image: var(--button-outline-fill-image);
|
|
131
|
-
box-shadow: var(--button-outline-shadow);
|
|
132
|
-
}
|
|
133
|
-
[data-warm-button][data-variant='outline']:hover {
|
|
134
|
-
color: var(--background);
|
|
135
|
-
}
|
|
136
|
-
[data-warm-button][data-variant='outline']:hover::before {
|
|
137
|
-
background-color: var(--muted);
|
|
138
|
-
background-image: var(--button-outline-fill-image-hover);
|
|
139
|
-
}
|
|
140
|
-
[data-warm-button][data-variant='outline']:active::before {
|
|
141
|
-
background-color: var(--muted);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
[data-warm-button][data-variant='ghost']::before {
|
|
145
|
-
background-color: transparent;
|
|
146
|
-
box-shadow: var(--button-ghost-shadow);
|
|
147
|
-
}
|
|
148
|
-
[data-warm-button][data-variant='ghost']:hover {
|
|
149
|
-
color: var(--foreground);
|
|
150
|
-
}
|
|
151
|
-
[data-warm-button][data-variant='ghost']:hover::before {
|
|
152
|
-
background-color: var(--muted);
|
|
153
|
-
}
|
|
154
|
-
.dark [data-warm-button][data-variant='ghost']:hover::before {
|
|
155
|
-
background-color: color-mix(in oklab, var(--muted) var(--button-mix-50), transparent);
|
|
156
|
-
}
|
|
157
|
-
[data-warm-button][data-variant='destructive'] {
|
|
158
|
-
color: var(--destructive);
|
|
159
|
-
}
|
|
160
|
-
[data-warm-button][data-variant='destructive']::before {
|
|
161
|
-
background-color: color-mix(in oklab, var(--destructive) var(--button-mix-10), transparent);
|
|
162
|
-
}
|
|
163
|
-
[data-warm-button][data-variant='destructive']:hover::before {
|
|
164
|
-
background-color: color-mix(in oklab, var(--destructive) var(--button-mix-20), transparent);
|
|
165
|
-
}
|
|
166
|
-
.dark [data-warm-button][data-variant='destructive']::before {
|
|
167
|
-
background-color: color-mix(in oklab, var(--destructive) var(--button-mix-20), transparent);
|
|
168
|
-
}
|
|
169
|
-
.dark [data-warm-button][data-variant='destructive']:hover::before {
|
|
170
|
-
background-color: color-mix(in oklab, var(--destructive) var(--button-mix-30), transparent);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
[data-warm-button][data-variant='apple'] {
|
|
174
|
-
/* Apple buttons use one flat color in both themes and never cast a shadow. */
|
|
175
|
-
color: var(--apple-button-foreground) !important;
|
|
176
|
-
}
|
|
177
|
-
[data-warm-button][data-variant='apple']::before {
|
|
178
|
-
background-color: var(--apple-button-background) !important;
|
|
179
|
-
box-shadow: none;
|
|
180
|
-
}
|
|
181
|
-
button[data-warm-button][data-variant='apple'] {
|
|
182
|
-
appearance: button;
|
|
183
|
-
background-clip: padding-box;
|
|
184
|
-
}
|
|
185
|
-
[data-warm-button][data-variant='apple']:hover {
|
|
186
|
-
color: var(--apple-button-foreground);
|
|
187
|
-
}
|
|
188
|
-
[data-warm-button][data-variant='apple']:hover::before {
|
|
189
|
-
background-color: var(--apple-button-background) !important;
|
|
190
|
-
}
|
|
191
|
-
[data-warm-button][data-variant='arrow'] {
|
|
192
|
-
border-width: 0;
|
|
193
|
-
text-decoration: underline;
|
|
194
|
-
}
|
|
195
|
-
[data-warm-button][data-variant='arrow'] svg {
|
|
196
|
-
width: var(--button-icon-size);
|
|
197
|
-
height: var(--button-icon-size);
|
|
198
|
-
transition: transform calc(var(--motion-duration-fast) * 2);
|
|
199
|
-
}
|
|
200
|
-
[data-warm-button][data-variant='arrow']:hover svg {
|
|
201
|
-
transform: translate(
|
|
202
|
-
calc(var(--motion-distance-sm) / 2),
|
|
203
|
-
calc(-1 * var(--motion-distance-sm) / 2)
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
@media (prefers-reduced-motion: reduce) {
|
|
207
|
-
[data-warm-button][data-variant='arrow']:hover svg {
|
|
208
|
-
transform: none;
|
|
209
|
-
transition: none;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* Sizes (public only; presentation overrides suppressed by explicit size via data attr, matches old resolveButton) */
|
|
214
|
-
[data-warm-button][data-size='compact'] {
|
|
215
|
-
height: var(--button-size-md);
|
|
216
|
-
padding-left: var(--button-padding-x-md);
|
|
217
|
-
padding-right: var(--button-padding-x-md);
|
|
218
|
-
gap: var(--button-gap);
|
|
219
|
-
}
|
|
220
|
-
[data-warm-button][data-size='default'] {
|
|
221
|
-
height: var(--button-height-default);
|
|
222
|
-
padding-left: var(--button-padding-x);
|
|
223
|
-
padding-right: var(--button-padding-x);
|
|
224
|
-
gap: var(--button-gap);
|
|
225
|
-
}
|
|
226
|
-
[data-warm-button][data-size='jumbo'] {
|
|
227
|
-
height: var(--button-height-jumbo);
|
|
228
|
-
padding-left: var(--button-padding-x-lg);
|
|
229
|
-
padding-right: var(--button-padding-x-lg);
|
|
230
|
-
font-size: var(--button-font-size-jumbo);
|
|
231
|
-
font-weight: 500;
|
|
232
|
-
line-height: var(--button-line-height-jumbo);
|
|
233
|
-
gap: var(--button-gap);
|
|
234
|
-
}
|
|
235
|
-
[data-warm-button][data-size='icon'] {
|
|
236
|
-
width: var(--button-height-icon);
|
|
237
|
-
height: var(--button-height-icon);
|
|
238
|
-
}
|
|
239
|
-
/* Explicit-size 'default' gets an extra vertical inset (legacy
|
|
240
|
-
buttonInputAlignmentClasses.default = 'bg-clip-border py-2'); this only
|
|
241
|
-
applies when the caller passes size="default" explicitly, never when
|
|
242
|
-
'default' is reached through presentation-driven implicit sizing. */
|
|
243
|
-
[data-warm-button][data-size='default'][data-explicit-size] {
|
|
244
|
-
padding-top: var(--button-padding-y-md);
|
|
245
|
-
padding-bottom: var(--button-padding-y-md);
|
|
246
|
-
background-clip: border-box;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Presentations: private legacy maps drive resolve to public data-size; geometry only when !data-explicit-size. Exact from old buttonPresentationClasses + primitive sizes (icon-round=36px etc) + edge + variants. */
|
|
250
|
-
[data-warm-button][data-presentation='assistantIcon']:not([data-explicit-size]) {
|
|
251
|
-
width: var(--button-size-xs);
|
|
252
|
-
height: var(--button-size-xs);
|
|
253
|
-
padding: var(--button-padding-y-md);
|
|
254
|
-
}
|
|
255
|
-
[data-warm-button][data-presentation='assistantRoundIcon']:not([data-explicit-size]) {
|
|
256
|
-
/* old icon-round 36px */
|
|
257
|
-
width: var(--button-height-icon);
|
|
258
|
-
height: var(--button-height-icon);
|
|
259
|
-
}
|
|
260
|
-
[data-warm-button][data-presentation='composerIcon']:not([data-explicit-size]) {
|
|
261
|
-
width: var(--button-size-sm);
|
|
262
|
-
height: var(--button-size-sm);
|
|
263
|
-
padding: var(--button-padding-y-md);
|
|
264
|
-
}
|
|
265
|
-
[data-warm-button][data-presentation='editPill']:not([data-explicit-size]) {
|
|
266
|
-
/* old sm 32px */
|
|
267
|
-
height: var(--button-size-md);
|
|
268
|
-
padding-left: var(--button-padding-x);
|
|
269
|
-
padding-right: var(--button-padding-x);
|
|
270
|
-
}
|
|
271
|
-
[data-warm-button][data-presentation='hero']:not([data-explicit-size]) {
|
|
272
|
-
height: var(--button-size-lg);
|
|
273
|
-
padding-left: var(--button-padding-x);
|
|
274
|
-
padding-right: var(--button-padding-x);
|
|
275
|
-
padding-top: var(--button-padding-y-md);
|
|
276
|
-
padding-bottom: var(--button-padding-y-md);
|
|
277
|
-
font-size: var(--button-font-size-base);
|
|
278
|
-
font-weight: 500;
|
|
279
|
-
line-height: var(--button-line-height-base);
|
|
280
|
-
background-clip: border-box;
|
|
281
|
-
}
|
|
282
|
-
[data-warm-button][data-presentation='promptCategory']:not([data-explicit-size]) {
|
|
283
|
-
height: var(--button-height-default);
|
|
284
|
-
gap: var(--button-gap);
|
|
285
|
-
padding-left: var(--button-padding-x);
|
|
286
|
-
padding-right: var(--button-padding-x);
|
|
287
|
-
font-size: var(--button-font-size);
|
|
288
|
-
font-weight: 400;
|
|
289
|
-
color: var(--foreground);
|
|
290
|
-
transition-property: var(--button-transition-property-colors);
|
|
291
|
-
}
|
|
292
|
-
[data-warm-button][data-presentation='promptCategory']:not([data-explicit-size])::before {
|
|
293
|
-
background-color: var(--background);
|
|
294
|
-
}
|
|
295
|
-
/* legacy's `getButtonEdgeClassName` applies `shadow-xs!` (Tailwind's `!`
|
|
296
|
-
important modifier) to every `default`-variant promptCategory button
|
|
297
|
-
regardless of explicit/implicit sizing, overriding the default variant's
|
|
298
|
-
own gradient shadow unconditionally; mirror that with `!important` here. */
|
|
299
|
-
[data-warm-button][data-presentation='promptCategory'][data-variant='default']::before {
|
|
300
|
-
box-shadow: var(--shadow-xs) !important;
|
|
301
|
-
}
|
|
302
|
-
/* buttonPresentationClasses.promptCategory's own (non-!important) `shadow-xs`
|
|
303
|
-
utility: only present in implicit mode (resolveLegacyButton's `!size`
|
|
304
|
-
branch), and only survives the cascade for variants without their own
|
|
305
|
-
later shadow override — arrow forces `shadow-none` and must keep winning;
|
|
306
|
-
default is already covered, unconditionally, by the rule above. */
|
|
307
|
-
[data-warm-button][data-presentation='promptCategory']:not([data-explicit-size]):not(
|
|
308
|
-
[data-variant='arrow']
|
|
309
|
-
)::before {
|
|
310
|
-
box-shadow: var(--shadow-xs) !important;
|
|
311
|
-
}
|
|
312
|
-
[data-warm-button][data-presentation='promptCategory']:hover::before {
|
|
313
|
-
background-color: var(--muted);
|
|
314
|
-
}
|
|
315
|
-
[data-warm-button][data-presentation='promptOption']:not([data-explicit-size]) {
|
|
316
|
-
height: auto;
|
|
317
|
-
min-height: var(--button-min-height-option);
|
|
318
|
-
align-items: flex-start;
|
|
319
|
-
justify-content: flex-start;
|
|
320
|
-
gap: var(--button-gap);
|
|
321
|
-
padding: var(--button-padding-x);
|
|
322
|
-
font-size: var(--button-font-size);
|
|
323
|
-
}
|
|
324
|
-
[data-warm-button][data-presentation='sidebarIcon']:not([data-explicit-size]) {
|
|
325
|
-
color: var(--sidebar-foreground);
|
|
326
|
-
background-clip: border-box;
|
|
327
|
-
}
|
|
328
|
-
[data-warm-button][data-presentation='sidebarIcon']:hover {
|
|
329
|
-
color: var(--sidebar-accent-foreground);
|
|
330
|
-
}
|
|
331
|
-
[data-warm-button][data-presentation='sidebarIcon']:hover::before {
|
|
332
|
-
background-color: var(--sidebar-accent);
|
|
333
|
-
}
|
|
334
|
-
[data-warm-button][data-presentation='tableHeader']:not([data-explicit-size]) {
|
|
335
|
-
height: auto;
|
|
336
|
-
min-height: 0;
|
|
337
|
-
width: var(--button-width-full);
|
|
338
|
-
justify-content: flex-start;
|
|
339
|
-
gap: var(--button-gap);
|
|
340
|
-
padding: 0;
|
|
341
|
-
font-weight: 400;
|
|
342
|
-
/* text-sm's line-height: tableHeader is the only non-arrow presentation
|
|
343
|
-
relying on `height: auto` with real text content, so the base rule's
|
|
344
|
-
`line-height: 1` (matching cva's other fixed-height presentations,
|
|
345
|
-
where line-height is irrelevant) would otherwise under-measure it. */
|
|
346
|
-
line-height: var(--button-line-height);
|
|
347
|
-
color: var(--muted-foreground);
|
|
348
|
-
}
|
|
349
|
-
[data-warm-button][data-presentation='tableHeader']:hover {
|
|
350
|
-
color: var(--foreground);
|
|
351
|
-
}
|
|
352
|
-
[data-warm-button][data-presentation='tableHeader']:hover::before {
|
|
353
|
-
background-color: transparent;
|
|
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
|
-
}
|
|
383
|
-
[data-warm-button][data-presentation='touch']:not([data-explicit-size]) {
|
|
384
|
-
min-height: var(--button-min-height-touch);
|
|
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
|
-
}
|
|
392
|
-
[data-warm-button][data-presentation='threadMore']:not([data-explicit-size]) {
|
|
393
|
-
width: var(--button-size-xs);
|
|
394
|
-
height: var(--button-size-xs);
|
|
395
|
-
padding: 0;
|
|
396
|
-
}
|
|
397
|
-
[data-warm-button][data-presentation='threadNew']:not([data-explicit-size]) {
|
|
398
|
-
height: var(--button-size-md);
|
|
399
|
-
justify-content: flex-start;
|
|
400
|
-
gap: var(--button-gap);
|
|
401
|
-
padding-left: var(--button-padding-x-sm);
|
|
402
|
-
padding-right: var(--button-padding-x-sm);
|
|
403
|
-
font-size: var(--button-font-size);
|
|
404
|
-
font-weight: 400;
|
|
405
|
-
}
|
|
406
|
-
[data-warm-button][data-presentation='threadNew']:hover::before {
|
|
407
|
-
background-color: var(--muted);
|
|
408
|
-
}
|
|
409
|
-
[data-warm-button][data-presentation='compact']:not([data-explicit-size]) {
|
|
410
|
-
height: var(--button-size-md);
|
|
411
|
-
padding-left: var(--button-padding-x-md);
|
|
412
|
-
padding-right: var(--button-padding-x-md);
|
|
413
|
-
}
|
|
414
|
-
/* 'default' and 'controlPeer' both resolve to private size 'default' with no
|
|
415
|
-
own `buttonPresentationClasses` entry, so origin's `resolveLegacyButton`
|
|
416
|
-
falls through to `buttonInputAlignmentClasses.default = 'bg-clip-border
|
|
417
|
-
py-2'` even with no explicit size passed. Mirror that here (the explicit
|
|
418
|
-
`[data-size="default"][data-explicit-size]` rule below only fires once a
|
|
419
|
-
caller passes size="default" explicitly, so implicit 'default'/'controlPeer'
|
|
420
|
-
need their own copy of the same two properties). */
|
|
421
|
-
[data-warm-button][data-presentation='default']:not([data-explicit-size]),
|
|
422
|
-
[data-warm-button][data-presentation='controlPeer']:not([data-explicit-size]) {
|
|
423
|
-
padding-top: var(--button-padding-y-md);
|
|
424
|
-
padding-bottom: var(--button-padding-y-md);
|
|
425
|
-
background-clip: border-box;
|
|
426
|
-
}
|
|
427
|
-
[data-warm-button][data-presentation='menuOption']:not([data-explicit-size]) {
|
|
428
|
-
/* old option min-height/auto 64px */
|
|
429
|
-
height: auto;
|
|
430
|
-
min-height: var(--button-min-height-option);
|
|
431
|
-
align-items: flex-start;
|
|
432
|
-
justify-content: flex-start;
|
|
433
|
-
gap: var(--button-gap);
|
|
434
|
-
padding: var(--button-padding-x);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/* Arrow overrides any presentation-driven box geometry declared above it:
|
|
438
|
-
legacy's cn(presentationClassName, variantClassName, ...) always merges the
|
|
439
|
-
arrow variant classes last, so arrow's box reset wins whenever it conflicts
|
|
440
|
-
with a presentation, and height is always content-driven (verified against
|
|
441
|
-
the real compiled legacy recipe: every presentation x size combination
|
|
442
|
-
renders the same auto height once variant="arrow"). Width is intentionally
|
|
443
|
-
left alone everywhere: arrow's own recipe never sets it, so an explicit
|
|
444
|
-
public size's fixed width (e.g. `[data-size="icon"]`) or a presentation's
|
|
445
|
-
own private width (e.g. assistantIcon's 1.5rem) still applies underneath
|
|
446
|
-
it. The selector repeats `[data-variant="arrow"]` to match the (0,3,0)
|
|
447
|
-
specificity of the `:not([data-explicit-size])` presentation rules and the
|
|
448
|
-
`[data-size][data-explicit-size]` size rule above, so this later rule wins
|
|
449
|
-
the cascade instead of losing on specificity. */
|
|
450
|
-
[data-warm-button][data-variant='arrow'][data-variant='arrow'] {
|
|
451
|
-
height: auto;
|
|
452
|
-
padding: 0;
|
|
453
|
-
gap: var(--button-gap);
|
|
454
|
-
border-radius: 0;
|
|
455
|
-
color: var(--foreground);
|
|
456
|
-
font-size: var(--button-font-size-base);
|
|
457
|
-
/* text-base's line-height (verified to win over any competing presentation
|
|
458
|
-
or size text utility, e.g. jumbo's text-lg, in the real compiled legacy
|
|
459
|
-
recipe). Only affects buttons with a real text node: an icon-only arrow
|
|
460
|
-
button has no inline content to lay out a line box for, so this is a
|
|
461
|
-
no-op there and height still resolves from the icon's own box (verified:
|
|
462
|
-
icon-only arrow buttons measure 16/20px tall matching their glyph, never
|
|
463
|
-
the 24px text strut). */
|
|
464
|
-
line-height: var(--button-line-height-base);
|
|
465
|
-
font-weight: 500;
|
|
466
|
-
}
|
|
467
|
-
[data-warm-button][data-variant='arrow'][data-variant='arrow']::before {
|
|
468
|
-
background-color: transparent;
|
|
469
|
-
background-image: none;
|
|
470
|
-
box-shadow: none;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* SVG rules (from cva) */
|
|
474
|
-
[data-warm-button] svg {
|
|
475
|
-
pointer-events: none;
|
|
476
|
-
flex-shrink: 0;
|
|
477
|
-
}
|
|
478
|
-
[data-warm-button] svg:not([class*='size-']) {
|
|
479
|
-
width: var(--button-icon-size);
|
|
480
|
-
height: var(--button-icon-size);
|
|
481
|
-
}
|
|
482
|
-
[data-warm-button][data-size='jumbo'] svg:not([class*='size-']) {
|
|
483
|
-
width: var(--button-icon-size-jumbo);
|
|
484
|
-
height: var(--button-icon-size-jumbo);
|
|
485
|
-
}
|
|
486
|
-
/* `hero`'s private size (`lg`) publicly maps to the same `data-size="jumbo"`
|
|
487
|
-
bucket as the genuine cva `jumbo` size (both being the "larger" public
|
|
488
|
-
size per `resolveButton`), but legacy's real `lg` primitive size carries no
|
|
489
|
-
svg-shrink/grow override at all, unlike `jumbo`'s own `size-5`. Restore the
|
|
490
|
-
unscaled glyph for `hero` specifically so it doesn't inherit jumbo's larger
|
|
491
|
-
icon. Gated to implicit sizing only: if the caller explicitly passes
|
|
492
|
-
`size="jumbo"` on a hero-presentation button, that is a real request for
|
|
493
|
-
the genuine cva `jumbo` size (own `size-5` icon included), not hero's
|
|
494
|
-
private `lg` behavior. `:not([data-explicit-size])` also raises this rule's
|
|
495
|
-
specificity above the plain jumbo rule above, so it wins unconditionally
|
|
496
|
-
whenever it matches. */
|
|
497
|
-
[data-warm-button][data-presentation='hero']:not([data-explicit-size]) svg:not([class*='size-']) {
|
|
498
|
-
width: var(--button-icon-size);
|
|
499
|
-
height: var(--button-icon-size);
|
|
500
|
-
}
|
|
501
|
-
/* Arrow's own icon size (legacy `[&_svg]:size-4`) wins over the base and
|
|
502
|
-
default-size svg rules above via source order, but intentionally has lower
|
|
503
|
-
specificity than the jumbo icon rule below: legacy's own jumbo svg rule
|
|
504
|
-
(`[&_svg:not([class*='size-'])]:size-5`) carries one more selector
|
|
505
|
-
component than arrow's (`[&_svg]:size-4`), so jumbo's larger glyph size
|
|
506
|
-
wins whenever both apply (verified against the real compiled recipe). */
|
|
507
|
-
[data-warm-button][data-variant='arrow'] svg {
|
|
508
|
-
width: var(--button-icon-size);
|
|
509
|
-
height: var(--button-icon-size);
|
|
510
|
-
}
|
|
511
|
-
/* icon-xs primitive size (assistantIcon, threadMore) shrinks the icon glyph;
|
|
512
|
-
suppressed when the caller passes an explicit public size. */
|
|
513
|
-
[data-warm-button][data-presentation='assistantIcon']:not([data-explicit-size])
|
|
514
|
-
svg:not([class*='size-']),
|
|
515
|
-
[data-warm-button][data-presentation='threadMore']:not([data-explicit-size])
|
|
516
|
-
svg:not([class*='size-']) {
|
|
517
|
-
width: var(--button-icon-size-xs);
|
|
518
|
-
height: var(--button-icon-size-xs);
|
|
519
|
-
}
|
|
520
|
-
/* Aria states (from cva aria-invalid + aria-expanded + dark) */
|
|
521
|
-
[data-warm-button][aria-invalid] {
|
|
522
|
-
box-shadow: 0 0 0 var(--button-focus-ring)
|
|
523
|
-
color-mix(in oklab, var(--destructive) var(--button-mix-20), transparent);
|
|
524
|
-
}
|
|
525
|
-
.dark [data-warm-button][aria-invalid] {
|
|
526
|
-
box-shadow: 0 0 0 var(--button-focus-ring)
|
|
527
|
-
color-mix(in oklab, var(--destructive) var(--button-mix-40), transparent);
|
|
528
|
-
}
|
|
529
|
-
[data-warm-button][data-variant='ghost'][aria-expanded='true'] {
|
|
530
|
-
color: var(--foreground);
|
|
531
|
-
}
|
|
532
|
-
[data-warm-button][data-variant='ghost'][aria-expanded='true']::before {
|
|
533
|
-
background-color: var(--muted);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
/* Disabled base + variant overrides (keep full shadow/border for some) */
|
|
537
|
-
[data-warm-button]:disabled {
|
|
538
|
-
pointer-events: none;
|
|
539
|
-
opacity: 0.5;
|
|
540
|
-
}
|
|
541
|
-
[data-warm-button][data-variant='apple']:disabled {
|
|
542
|
-
opacity: 1;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/* Logo - keep data-warm-logo on wrapper div AND svg; unambiguous element selectors + data to avoid sizing wrapper or constraining width; wrapper inline-flex (not inline-block); preserve gap/text/typography/tone/icon sizes from old */
|
|
546
|
-
[data-warm-logo] {
|
|
547
|
-
display: inline-flex;
|
|
548
|
-
align-items: center;
|
|
549
|
-
gap: var(--logo-gap);
|
|
550
|
-
}
|
|
551
|
-
[data-warm-logo] > span {
|
|
552
|
-
font-size: var(--logo-font-size);
|
|
553
|
-
font-weight: 500;
|
|
554
|
-
letter-spacing: var(--logo-letter-spacing);
|
|
555
|
-
}
|
|
556
|
-
svg[data-warm-logo] {
|
|
557
|
-
display: block;
|
|
558
|
-
fill: currentColor;
|
|
559
|
-
flex-shrink: 0;
|
|
560
|
-
}
|
|
561
|
-
[data-warm-logo][data-size='badge'] svg[data-warm-logo] {
|
|
562
|
-
width: var(--logo-size-badge);
|
|
563
|
-
height: var(--logo-size-badge);
|
|
564
|
-
}
|
|
565
|
-
[data-warm-logo][data-size='default'] svg[data-warm-logo] {
|
|
566
|
-
width: var(--logo-size-default);
|
|
567
|
-
height: var(--logo-size-default);
|
|
568
|
-
}
|
|
569
|
-
[data-warm-logo][data-size='feature'] svg[data-warm-logo] {
|
|
570
|
-
width: var(--logo-size-feature);
|
|
571
|
-
height: var(--logo-size-feature);
|
|
572
|
-
}
|
|
573
|
-
[data-warm-logo][data-size='hero'] svg[data-warm-logo] {
|
|
574
|
-
width: var(--logo-size-hero);
|
|
575
|
-
height: var(--logo-size-hero);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
[data-warm-logo][data-tone='foreground'] {
|
|
579
|
-
color: var(--foreground);
|
|
580
|
-
}
|
|
581
|
-
[data-warm-logo][data-tone='sidebar'] {
|
|
582
|
-
color: var(--sidebar-foreground);
|
|
583
|
-
}
|
package/dist/button.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type ButtonPresentation = 'assistantIcon' | 'assistantRoundIcon' | 'composerIcon' | 'default' | 'headerAction' | 'compact' | 'controlPeer' | 'editPill' | 'hero' | 'menuOption' | 'promptCategory' | 'promptOption' | 'sidebarIcon' | 'tableHeader' | 'tableHeaderLink' | 'threadMore' | 'threadNew' | 'touch';
|
|
3
|
-
export type ButtonVariant = 'default' | 'outline' | 'ghost' | 'destructive' | 'apple' | 'arrow';
|
|
4
|
-
export type ButtonSize = 'compact' | 'default' | 'jumbo' | 'icon';
|
|
5
|
-
export type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> & {
|
|
6
|
-
asChild?: never;
|
|
7
|
-
className?: never;
|
|
8
|
-
presentation?: ButtonPresentation;
|
|
9
|
-
render?: never;
|
|
10
|
-
size?: ButtonSize;
|
|
11
|
-
style?: never;
|
|
12
|
-
variant?: ButtonVariant;
|
|
13
|
-
width?: 'full';
|
|
14
|
-
};
|
|
15
|
-
export type ButtonLinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'disabled' | 'style'> & {
|
|
16
|
-
href: string;
|
|
17
|
-
presentation?: ButtonPresentation;
|
|
18
|
-
size?: ButtonSize;
|
|
19
|
-
variant?: ButtonVariant;
|
|
20
|
-
width?: 'full';
|
|
21
|
-
asChild?: never;
|
|
22
|
-
className?: never;
|
|
23
|
-
disabled?: never;
|
|
24
|
-
render?: never;
|
|
25
|
-
style?: never;
|
|
26
|
-
};
|
|
27
|
-
declare const Button: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> & {
|
|
28
|
-
asChild?: never;
|
|
29
|
-
className?: never;
|
|
30
|
-
presentation?: ButtonPresentation;
|
|
31
|
-
render?: never;
|
|
32
|
-
size?: ButtonSize;
|
|
33
|
-
style?: never;
|
|
34
|
-
variant?: ButtonVariant;
|
|
35
|
-
width?: 'full';
|
|
36
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
37
|
-
declare const ButtonLink: React.ForwardRefExoticComponent<Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "disabled" | "style"> & {
|
|
38
|
-
href: string;
|
|
39
|
-
presentation?: ButtonPresentation;
|
|
40
|
-
size?: ButtonSize;
|
|
41
|
-
variant?: ButtonVariant;
|
|
42
|
-
width?: 'full';
|
|
43
|
-
asChild?: never;
|
|
44
|
-
className?: never;
|
|
45
|
-
disabled?: never;
|
|
46
|
-
render?: never;
|
|
47
|
-
style?: never;
|
|
48
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
49
|
-
export { Button, ButtonLink };
|
package/dist/button.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
const presentationToPrivateSize = {
|
|
4
|
-
assistantIcon: 'icon-xs',
|
|
5
|
-
assistantRoundIcon: 'icon-round',
|
|
6
|
-
composerIcon: 'icon-sm',
|
|
7
|
-
default: 'default',
|
|
8
|
-
headerAction: 'icon-xs',
|
|
9
|
-
compact: 'sm',
|
|
10
|
-
controlPeer: 'default',
|
|
11
|
-
editPill: 'sm',
|
|
12
|
-
hero: 'lg',
|
|
13
|
-
menuOption: 'option',
|
|
14
|
-
promptCategory: 'default',
|
|
15
|
-
promptOption: 'option',
|
|
16
|
-
sidebarIcon: 'icon',
|
|
17
|
-
tableHeader: 'default',
|
|
18
|
-
tableHeaderLink: 'default',
|
|
19
|
-
threadMore: 'icon-xs',
|
|
20
|
-
threadNew: 'sm',
|
|
21
|
-
touch: 'default',
|
|
22
|
-
};
|
|
23
|
-
const presentationAliases = {
|
|
24
|
-
controlPeer: 'default',
|
|
25
|
-
menuOption: 'promptOption',
|
|
26
|
-
touch: 'default',
|
|
27
|
-
};
|
|
28
|
-
function resolvePresentation(presentation) {
|
|
29
|
-
return presentationAliases[presentation] ?? presentation;
|
|
30
|
-
}
|
|
31
|
-
function resolveButton(presentation, size) {
|
|
32
|
-
const privateSize = presentationToPrivateSize[presentation];
|
|
33
|
-
const resolvedSize = size ??
|
|
34
|
-
(privateSize === 'lg'
|
|
35
|
-
? 'jumbo'
|
|
36
|
-
: privateSize === 'sm'
|
|
37
|
-
? 'compact'
|
|
38
|
-
: privateSize === 'icon' ||
|
|
39
|
-
privateSize === 'icon-round' ||
|
|
40
|
-
privateSize === 'icon-sm' ||
|
|
41
|
-
privateSize === 'icon-xs'
|
|
42
|
-
? 'icon'
|
|
43
|
-
: 'default');
|
|
44
|
-
return { resolvedSize, explicitSize: size ? resolvedSize : undefined };
|
|
45
|
-
}
|
|
46
|
-
function withArrow(variant, children) {
|
|
47
|
-
if (variant !== 'arrow')
|
|
48
|
-
return children;
|
|
49
|
-
return (_jsxs(_Fragment, { children: [children, _jsxs("svg", { "aria-hidden": "true", "data-icon": "inline-end", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M7 7h10v10" }), _jsx("path", { d: "M7 17L17 7" })] })] }));
|
|
50
|
-
}
|
|
51
|
-
const Button = React.forwardRef(function Button({ children, className: _className, presentation = 'default', render: _render, size, style: _style, type, variant = 'default', width, asChild: _asChild, ...props }, ref) {
|
|
52
|
-
const { resolvedSize, explicitSize } = resolveButton(presentation, size);
|
|
53
|
-
return (_jsx("button", { ...props, ref: ref, type: type ?? 'button', "data-warm-button": "", "data-slot": "button", "data-presentation": resolvePresentation(presentation), "data-variant": variant, "data-size": resolvedSize, "data-explicit-size": explicitSize, "data-width": width, children: withArrow(variant, children) }));
|
|
54
|
-
});
|
|
55
|
-
Button.displayName = 'WarmButton';
|
|
56
|
-
const ButtonLink = React.forwardRef(function ButtonLink({ children, className: _className, disabled: _disabled, presentation = 'default', render: _render, size, style: _style, variant = 'default', width, asChild: _asChild, ...props }, ref) {
|
|
57
|
-
const { resolvedSize, explicitSize } = resolveButton(presentation, size);
|
|
58
|
-
return (_jsx("a", { ...props, ref: ref, "data-warm-button": "", "data-slot": "button", "data-presentation": resolvePresentation(presentation), "data-variant": variant, "data-size": resolvedSize, "data-explicit-size": explicitSize, "data-width": width, children: withArrow(variant, children) }));
|
|
59
|
-
});
|
|
60
|
-
ButtonLink.displayName = 'WarmButtonLink';
|
|
61
|
-
export { Button, ButtonLink };
|