@pantoia/ui 0.2.0 → 0.3.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/accordion/AGENTS.md +1 -1
- package/accordion/index.tsx +10 -8
- package/alert-dialog/index.tsx +3 -3
- package/badge/index.tsx +2 -2
- package/button/index.tsx +4 -4
- package/callout/AGENTS.md +0 -4
- package/callout/index.tsx +29 -8
- package/checkbox/AGENTS.md +1 -1
- package/checkbox/index.tsx +4 -3
- package/combobox/AGENTS.md +1 -1
- package/combobox/index.tsx +24 -20
- package/command-palette/AGENTS.md +0 -4
- package/command-palette/index.tsx +4 -2
- package/dialog/index.tsx +3 -3
- package/dist/index.js +153 -25
- package/drawer/index.tsx +3 -3
- package/dropdown-menu/AGENTS.md +1 -1
- package/dropdown-menu/index.tsx +10 -7
- package/field/AGENTS.md +0 -4
- package/field/index.tsx +16 -8
- package/input/index.tsx +6 -6
- package/kbd/index.tsx +1 -1
- package/label/index.tsx +1 -1
- package/number-field/AGENTS.md +0 -4
- package/number-field/index.tsx +14 -10
- package/package.json +11 -10
- package/palette.css +114 -0
- package/popover/index.tsx +2 -2
- package/radio-group/index.tsx +1 -1
- package/registry.json +6 -20
- package/select/AGENTS.md +1 -1
- package/select/index.tsx +26 -19
- package/switch/index.tsx +1 -1
- package/table/index.tsx +4 -4
- package/tabs/AGENTS.md +1 -0
- package/tabs/index.module.css +3 -1
- package/tabs/index.tsx +9 -6
- package/tailwind.css +3 -0
- package/textarea/index.tsx +6 -6
- package/toast/index.tsx +5 -5
- package/toggle/index.tsx +4 -4
- package/{styles.css → tokens.css} +76 -303
- package/tooltip/index.tsx +2 -2
- package/tv.ts +0 -1
- package/utilities.css +119 -0
- package/press.css +0 -37
package/palette.css
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
:root, .light {
|
|
2
|
+
--pds-gray-50:#f9fafb; --pds-gray-100:#f2f4f6; --pds-gray-200:#e5e8eb; --pds-gray-300:#d1d6db;
|
|
3
|
+
--pds-gray-400:#b0b8c1; --pds-gray-500:#8b95a1; --pds-gray-600:#6b7684; --pds-gray-700:#4e5968;
|
|
4
|
+
--pds-gray-800:#333d4b; --pds-gray-900:#191f28;
|
|
5
|
+
|
|
6
|
+
--pds-brand-50:#f5f1fd; --pds-brand-100:#e4d6ff; --pds-brand-200:#ceb0ff; --pds-brand-300:#bb8ffa;
|
|
7
|
+
--pds-brand-400:#aa74f2; --pds-brand-500:#9c63e4; --pds-brand-600:#8750c9; --pds-brand-700:#7543b0;
|
|
8
|
+
--pds-brand-800:#633997; --pds-brand-900:#54317f;
|
|
9
|
+
|
|
10
|
+
--pds-blue-50:#e8f3ff; --pds-blue-100:#c9e2ff; --pds-blue-200:#90c2ff; --pds-blue-300:#64a8ff;
|
|
11
|
+
--pds-blue-400:#4593fc; --pds-blue-500:#3182f6; --pds-blue-600:#2272eb; --pds-blue-700:#1b64da;
|
|
12
|
+
--pds-blue-800:#1957c2; --pds-blue-900:#194aa6;
|
|
13
|
+
|
|
14
|
+
--pds-green-50:#f0faf6; --pds-green-100:#aeefd5; --pds-green-200:#76e4b8; --pds-green-300:#3fd599;
|
|
15
|
+
--pds-green-400:#15c47e; --pds-green-500:#03b26c; --pds-green-600:#02a262; --pds-green-700:#029359;
|
|
16
|
+
--pds-green-800:#028450; --pds-green-900:#027648;
|
|
17
|
+
|
|
18
|
+
--pds-orange-50:#fff3e0; --pds-orange-100:#ffe0b0; --pds-orange-200:#ffcd80; --pds-orange-300:#ffbd51;
|
|
19
|
+
--pds-orange-400:#ffa927; --pds-orange-500:#fe9800; --pds-orange-600:#fb8800; --pds-orange-700:#f57800;
|
|
20
|
+
--pds-orange-800:#ed6700; --pds-orange-900:#e45600;
|
|
21
|
+
|
|
22
|
+
--pds-red-50:#ffeeee; --pds-red-100:#ffd4d6; --pds-red-200:#feafb4; --pds-red-300:#fb8890;
|
|
23
|
+
--pds-red-400:#f66570; --pds-red-500:#f04452; --pds-red-600:#e42939; --pds-red-700:#d22030;
|
|
24
|
+
--pds-red-800:#bc1b2a; --pds-red-900:#a51926;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dark {
|
|
28
|
+
--pds-gray-50:#202027; --pds-gray-100:#2c2c35; --pds-gray-200:#3c3c47; --pds-gray-300:#4d4d59;
|
|
29
|
+
--pds-gray-400:#62626d; --pds-gray-500:#7e7e87; --pds-gray-600:#9e9ea4; --pds-gray-700:#c3c3c6;
|
|
30
|
+
--pds-gray-800:#e4e4e5; --pds-gray-900:#ffffff;
|
|
31
|
+
|
|
32
|
+
--pds-brand-50:#362949; --pds-brand-100:#462e66; --pds-brand-200:#583682; --pds-brand-300:#6b3fa0;
|
|
33
|
+
--pds-brand-400:#8451c4; --pds-brand-500:#9c63e4; --pds-brand-600:#ad75f7; --pds-brand-700:#c094ff;
|
|
34
|
+
--pds-brand-800:#d6baff; --pds-brand-900:#eadeff;
|
|
35
|
+
|
|
36
|
+
--pds-blue-50:#202c4d; --pds-blue-100:#23386a; --pds-blue-200:#25478c; --pds-blue-300:#265ab3;
|
|
37
|
+
--pds-blue-400:#2970d9; --pds-blue-500:#3485fa; --pds-blue-600:#449bff; --pds-blue-700:#61b0ff;
|
|
38
|
+
--pds-blue-800:#8fcdff; --pds-blue-900:#c8e7ff;
|
|
39
|
+
|
|
40
|
+
--pds-green-50:#153729; --pds-green-100:#135338; --pds-green-200:#136d47; --pds-green-300:#138a59;
|
|
41
|
+
--pds-green-400:#13a065; --pds-green-500:#16bb76; --pds-green-600:#26cf88; --pds-green-700:#4ee4a6;
|
|
42
|
+
--pds-green-800:#82f6c5; --pds-green-900:#ccffea;
|
|
43
|
+
|
|
44
|
+
--pds-orange-50:#3d2500; --pds-orange-100:#563200; --pds-orange-200:#804600; --pds-orange-300:#a85f00;
|
|
45
|
+
--pds-orange-400:#cf7200; --pds-orange-500:#f18600; --pds-orange-600:#fd9528; --pds-orange-700:#ffa861;
|
|
46
|
+
--pds-orange-800:#ffc39e; --pds-orange-900:#ffe4d6;
|
|
47
|
+
|
|
48
|
+
--pds-red-50:#3c2020; --pds-red-100:#562025; --pds-red-200:#7a242d; --pds-red-300:#9e2733;
|
|
49
|
+
--pds-red-400:#ca2f3d; --pds-red-500:#f04251; --pds-red-600:#fa616d; --pds-red-700:#fe818b;
|
|
50
|
+
--pds-red-800:#ffa8ad; --pds-red-900:#ffd1d3;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@theme inline {
|
|
54
|
+
--color-pds-gray-50: var(--pds-gray-50);
|
|
55
|
+
--color-pds-gray-100: var(--pds-gray-100);
|
|
56
|
+
--color-pds-gray-200: var(--pds-gray-200);
|
|
57
|
+
--color-pds-gray-300: var(--pds-gray-300);
|
|
58
|
+
--color-pds-gray-400: var(--pds-gray-400);
|
|
59
|
+
--color-pds-gray-500: var(--pds-gray-500);
|
|
60
|
+
--color-pds-gray-600: var(--pds-gray-600);
|
|
61
|
+
--color-pds-gray-700: var(--pds-gray-700);
|
|
62
|
+
--color-pds-gray-800: var(--pds-gray-800);
|
|
63
|
+
--color-pds-gray-900: var(--pds-gray-900);
|
|
64
|
+
--color-pds-brand-50: var(--pds-brand-50);
|
|
65
|
+
--color-pds-brand-100: var(--pds-brand-100);
|
|
66
|
+
--color-pds-brand-200: var(--pds-brand-200);
|
|
67
|
+
--color-pds-brand-300: var(--pds-brand-300);
|
|
68
|
+
--color-pds-brand-400: var(--pds-brand-400);
|
|
69
|
+
--color-pds-brand-500: var(--pds-brand-500);
|
|
70
|
+
--color-pds-brand-600: var(--pds-brand-600);
|
|
71
|
+
--color-pds-brand-700: var(--pds-brand-700);
|
|
72
|
+
--color-pds-brand-800: var(--pds-brand-800);
|
|
73
|
+
--color-pds-brand-900: var(--pds-brand-900);
|
|
74
|
+
--color-pds-blue-50: var(--pds-blue-50);
|
|
75
|
+
--color-pds-blue-100: var(--pds-blue-100);
|
|
76
|
+
--color-pds-blue-200: var(--pds-blue-200);
|
|
77
|
+
--color-pds-blue-300: var(--pds-blue-300);
|
|
78
|
+
--color-pds-blue-400: var(--pds-blue-400);
|
|
79
|
+
--color-pds-blue-500: var(--pds-blue-500);
|
|
80
|
+
--color-pds-blue-600: var(--pds-blue-600);
|
|
81
|
+
--color-pds-blue-700: var(--pds-blue-700);
|
|
82
|
+
--color-pds-blue-800: var(--pds-blue-800);
|
|
83
|
+
--color-pds-blue-900: var(--pds-blue-900);
|
|
84
|
+
--color-pds-green-50: var(--pds-green-50);
|
|
85
|
+
--color-pds-green-100: var(--pds-green-100);
|
|
86
|
+
--color-pds-green-200: var(--pds-green-200);
|
|
87
|
+
--color-pds-green-300: var(--pds-green-300);
|
|
88
|
+
--color-pds-green-400: var(--pds-green-400);
|
|
89
|
+
--color-pds-green-500: var(--pds-green-500);
|
|
90
|
+
--color-pds-green-600: var(--pds-green-600);
|
|
91
|
+
--color-pds-green-700: var(--pds-green-700);
|
|
92
|
+
--color-pds-green-800: var(--pds-green-800);
|
|
93
|
+
--color-pds-green-900: var(--pds-green-900);
|
|
94
|
+
--color-pds-orange-50: var(--pds-orange-50);
|
|
95
|
+
--color-pds-orange-100: var(--pds-orange-100);
|
|
96
|
+
--color-pds-orange-200: var(--pds-orange-200);
|
|
97
|
+
--color-pds-orange-300: var(--pds-orange-300);
|
|
98
|
+
--color-pds-orange-400: var(--pds-orange-400);
|
|
99
|
+
--color-pds-orange-500: var(--pds-orange-500);
|
|
100
|
+
--color-pds-orange-600: var(--pds-orange-600);
|
|
101
|
+
--color-pds-orange-700: var(--pds-orange-700);
|
|
102
|
+
--color-pds-orange-800: var(--pds-orange-800);
|
|
103
|
+
--color-pds-orange-900: var(--pds-orange-900);
|
|
104
|
+
--color-pds-red-50: var(--pds-red-50);
|
|
105
|
+
--color-pds-red-100: var(--pds-red-100);
|
|
106
|
+
--color-pds-red-200: var(--pds-red-200);
|
|
107
|
+
--color-pds-red-300: var(--pds-red-300);
|
|
108
|
+
--color-pds-red-400: var(--pds-red-400);
|
|
109
|
+
--color-pds-red-500: var(--pds-red-500);
|
|
110
|
+
--color-pds-red-600: var(--pds-red-600);
|
|
111
|
+
--color-pds-red-700: var(--pds-red-700);
|
|
112
|
+
--color-pds-red-800: var(--pds-red-800);
|
|
113
|
+
--color-pds-red-900: var(--pds-red-900);
|
|
114
|
+
}
|
package/popover/index.tsx
CHANGED
|
@@ -39,7 +39,7 @@ export interface PopoverContentProps extends Omit<ComponentProps<typeof PopoverP
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const popoverContent = tv({
|
|
42
|
-
base: 'float text-
|
|
42
|
+
base: 'float text-fg rounded-r16 z-overlay p-4'
|
|
43
43
|
+ ' open:animate-enter closed:animate-exit'
|
|
44
44
|
+ ' focus-visible:outline-none',
|
|
45
45
|
})
|
|
@@ -65,7 +65,7 @@ export function PopoverContent({
|
|
|
65
65
|
{children}
|
|
66
66
|
{arrow && (
|
|
67
67
|
<PopoverPrimitive.Arrow asChild width={12} height={6}>
|
|
68
|
-
<svg viewBox="0 0 12 6" preserveAspectRatio="none" className="fill-
|
|
68
|
+
<svg viewBox="0 0 12 6" preserveAspectRatio="none" className="fill-bg-panel -translate-y-px">
|
|
69
69
|
<path d="M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0" className="stroke-line stroke-1" />
|
|
70
70
|
</svg>
|
|
71
71
|
</PopoverPrimitive.Arrow>
|
package/radio-group/index.tsx
CHANGED
|
@@ -126,7 +126,7 @@ export function RadioGroupItemLabel({ className, children }: { className?: strin
|
|
|
126
126
|
)
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
const radioGroupItemDescription = tv({ base: 'text-caption text-
|
|
129
|
+
const radioGroupItemDescription = tv({ base: 'text-caption text-fg-subtle' })
|
|
130
130
|
|
|
131
131
|
export function RadioGroupItemDescription({ className, children }: { className?: string, children?: ReactNode }) {
|
|
132
132
|
const ctx = use(ItemContext)
|
package/registry.json
CHANGED
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
}
|
|
38
38
|
],
|
|
39
39
|
"dependencies": [
|
|
40
|
-
"lucide-react",
|
|
41
40
|
"radix-ui"
|
|
42
41
|
],
|
|
43
42
|
"registryDependencies": [
|
|
@@ -133,9 +132,6 @@
|
|
|
133
132
|
"target": "callout/AGENTS.md"
|
|
134
133
|
}
|
|
135
134
|
],
|
|
136
|
-
"dependencies": [
|
|
137
|
-
"lucide-react"
|
|
138
|
-
],
|
|
139
135
|
"registryDependencies": [
|
|
140
136
|
"tv"
|
|
141
137
|
],
|
|
@@ -159,7 +155,6 @@
|
|
|
159
155
|
}
|
|
160
156
|
],
|
|
161
157
|
"dependencies": [
|
|
162
|
-
"lucide-react",
|
|
163
158
|
"radix-ui"
|
|
164
159
|
],
|
|
165
160
|
"registryDependencies": [
|
|
@@ -185,14 +180,14 @@
|
|
|
185
180
|
}
|
|
186
181
|
],
|
|
187
182
|
"dependencies": [
|
|
188
|
-
"lucide-react",
|
|
189
183
|
"radix-ui"
|
|
190
184
|
],
|
|
191
185
|
"registryDependencies": [
|
|
192
186
|
"tv"
|
|
193
187
|
],
|
|
194
188
|
"meta": {
|
|
195
|
-
"layer": "ui"
|
|
189
|
+
"layer": "ui",
|
|
190
|
+
"radius": "rounded-r12"
|
|
196
191
|
}
|
|
197
192
|
},
|
|
198
193
|
{
|
|
@@ -210,9 +205,6 @@
|
|
|
210
205
|
"target": "command-palette/AGENTS.md"
|
|
211
206
|
}
|
|
212
207
|
],
|
|
213
|
-
"dependencies": [
|
|
214
|
-
"lucide-react"
|
|
215
|
-
],
|
|
216
208
|
"registryDependencies": [
|
|
217
209
|
"combobox",
|
|
218
210
|
"dialog",
|
|
@@ -293,14 +285,14 @@
|
|
|
293
285
|
}
|
|
294
286
|
],
|
|
295
287
|
"dependencies": [
|
|
296
|
-
"lucide-react",
|
|
297
288
|
"radix-ui"
|
|
298
289
|
],
|
|
299
290
|
"registryDependencies": [
|
|
300
291
|
"tv"
|
|
301
292
|
],
|
|
302
293
|
"meta": {
|
|
303
|
-
"layer": "ui"
|
|
294
|
+
"layer": "ui",
|
|
295
|
+
"radius": "rounded-r12"
|
|
304
296
|
}
|
|
305
297
|
},
|
|
306
298
|
{
|
|
@@ -318,9 +310,6 @@
|
|
|
318
310
|
"target": "field/AGENTS.md"
|
|
319
311
|
}
|
|
320
312
|
],
|
|
321
|
-
"dependencies": [
|
|
322
|
-
"lucide-react"
|
|
323
|
-
],
|
|
324
313
|
"registryDependencies": [
|
|
325
314
|
"label",
|
|
326
315
|
"tv"
|
|
@@ -413,9 +402,6 @@
|
|
|
413
402
|
"target": "number-field/AGENTS.md"
|
|
414
403
|
}
|
|
415
404
|
],
|
|
416
|
-
"dependencies": [
|
|
417
|
-
"lucide-react"
|
|
418
|
-
],
|
|
419
405
|
"registryDependencies": [
|
|
420
406
|
"tv"
|
|
421
407
|
],
|
|
@@ -490,14 +476,14 @@
|
|
|
490
476
|
}
|
|
491
477
|
],
|
|
492
478
|
"dependencies": [
|
|
493
|
-
"lucide-react",
|
|
494
479
|
"radix-ui"
|
|
495
480
|
],
|
|
496
481
|
"registryDependencies": [
|
|
497
482
|
"tv"
|
|
498
483
|
],
|
|
499
484
|
"meta": {
|
|
500
|
-
"layer": "ui"
|
|
485
|
+
"layer": "ui",
|
|
486
|
+
"radius": "rounded-r12"
|
|
501
487
|
}
|
|
502
488
|
},
|
|
503
489
|
{
|
package/select/AGENTS.md
CHANGED
package/select/index.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { Check, ChevronDown, ChevronUp } from 'lucide-react'
|
|
4
3
|
import { Select as SelectPrimitive } from 'radix-ui'
|
|
5
4
|
import type { ComponentProps, ReactNode } from 'react'
|
|
6
5
|
|
|
@@ -8,17 +7,17 @@ import { tv } from '../tv'
|
|
|
8
7
|
|
|
9
8
|
export const selectTrigger = tv({
|
|
10
9
|
base: 'flex w-full items-center justify-between gap-tight rounded-r8'
|
|
11
|
-
+ ' text-value text-
|
|
10
|
+
+ ' text-value text-fg'
|
|
12
11
|
+ ' transition-state'
|
|
13
12
|
+ ' invalid:ring-2 invalid:ring-line-danger'
|
|
14
13
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
|
|
15
|
-
+ ' disabled:bg-bg-neutral-disabled disabled:text-
|
|
16
|
-
+ ' unset:text-
|
|
14
|
+
+ ' disabled:bg-bg-neutral-disabled disabled:text-fg-disabled disabled:cursor-not-allowed'
|
|
15
|
+
+ ' unset:text-fg-placeholder',
|
|
17
16
|
|
|
18
17
|
variants: {
|
|
19
18
|
surface: {
|
|
20
19
|
bare: 'bg-transparent ring-1 ring-inset ring-line-strong',
|
|
21
|
-
well: 'bg-
|
|
20
|
+
well: 'bg-bg-well',
|
|
22
21
|
},
|
|
23
22
|
size: {
|
|
24
23
|
sm: 'h-8 px-3',
|
|
@@ -72,35 +71,41 @@ export function Select({
|
|
|
72
71
|
<span className="min-w-0 truncate">
|
|
73
72
|
<SelectPrimitive.Value placeholder={placeholder} />
|
|
74
73
|
</span>
|
|
75
|
-
<SelectPrimitive.Icon className="text-
|
|
76
|
-
<
|
|
74
|
+
<SelectPrimitive.Icon className="text-fg-subtle">
|
|
75
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
76
|
+
<path d="m6 9 6 6 6-6" />
|
|
77
|
+
</svg>
|
|
77
78
|
</SelectPrimitive.Icon>
|
|
78
79
|
</SelectPrimitive.Trigger>
|
|
79
80
|
|
|
80
81
|
<SelectPrimitive.Portal>
|
|
81
82
|
<SelectPrimitive.Content
|
|
82
|
-
className="float text-
|
|
83
|
+
className="float text-fg rounded-r12 z-overlay
|
|
83
84
|
min-w-(--radix-select-trigger-width) py-1
|
|
84
85
|
open:animate-enter closed:animate-exit"
|
|
85
86
|
position="popper"
|
|
86
87
|
sideOffset={8}
|
|
87
88
|
arrowPadding={16}
|
|
88
89
|
>
|
|
89
|
-
<SelectPrimitive.ScrollUpButton className="text-
|
|
90
|
-
<
|
|
90
|
+
<SelectPrimitive.ScrollUpButton className="text-fg-subtle flex h-6 cursor-default items-center justify-center">
|
|
91
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
92
|
+
<path d="m18 15-6-6-6 6" />
|
|
93
|
+
</svg>
|
|
91
94
|
</SelectPrimitive.ScrollUpButton>
|
|
92
95
|
|
|
93
96
|
<SelectPrimitive.Viewport className="flex flex-col gap-px px-1">
|
|
94
97
|
{children}
|
|
95
98
|
</SelectPrimitive.Viewport>
|
|
96
99
|
|
|
97
|
-
<SelectPrimitive.ScrollDownButton className="text-
|
|
98
|
-
<
|
|
100
|
+
<SelectPrimitive.ScrollDownButton className="text-fg-subtle flex h-6 cursor-default items-center justify-center">
|
|
101
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
102
|
+
<path d="m6 9 6 6 6-6" />
|
|
103
|
+
</svg>
|
|
99
104
|
</SelectPrimitive.ScrollDownButton>
|
|
100
105
|
|
|
101
106
|
{arrow && (
|
|
102
107
|
<SelectPrimitive.Arrow asChild width={12} height={6}>
|
|
103
|
-
<svg viewBox="0 0 12 6" preserveAspectRatio="none" className="fill-
|
|
108
|
+
<svg viewBox="0 0 12 6" preserveAspectRatio="none" className="fill-bg-panel -translate-y-px">
|
|
104
109
|
<path d="M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0" className="stroke-line stroke-1" />
|
|
105
110
|
</svg>
|
|
106
111
|
</SelectPrimitive.Arrow>
|
|
@@ -121,7 +126,7 @@ export function SelectGroup({ label, className, children }: {
|
|
|
121
126
|
return (
|
|
122
127
|
<SelectPrimitive.Group className={selectGroup({ className })}>
|
|
123
128
|
{label && (
|
|
124
|
-
<SelectPrimitive.Label className="text-caption text-
|
|
129
|
+
<SelectPrimitive.Label className="text-caption text-fg-subtle px-2 pb-1 pt-2">
|
|
125
130
|
{label}
|
|
126
131
|
</SelectPrimitive.Label>
|
|
127
132
|
)}
|
|
@@ -134,7 +139,7 @@ const selectItem = tv({
|
|
|
134
139
|
base: 'flex min-h-9 cursor-default items-center justify-between gap-stack'
|
|
135
140
|
+ ' rounded-r8 px-2 py-1 transition-state'
|
|
136
141
|
+ ' data-highlighted:bg-bg-neutral-hover data-highlighted:outline-none'
|
|
137
|
-
+ ' data-disabled:text-
|
|
142
|
+
+ ' data-disabled:text-fg-disabled data-disabled:pointer-events-none',
|
|
138
143
|
})
|
|
139
144
|
|
|
140
145
|
export function SelectItem({ value, disabled, className, children }: {
|
|
@@ -153,14 +158,16 @@ export function SelectItem({ value, disabled, className, children }: {
|
|
|
153
158
|
{children}
|
|
154
159
|
</span>
|
|
155
160
|
|
|
156
|
-
<SelectPrimitive.ItemIndicator className="text-
|
|
157
|
-
<
|
|
161
|
+
<SelectPrimitive.ItemIndicator className="text-fg-muted flex shrink-0">
|
|
162
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
163
|
+
<path d="M20 6 9 17l-5-5" />
|
|
164
|
+
</svg>
|
|
158
165
|
</SelectPrimitive.ItemIndicator>
|
|
159
166
|
</SelectPrimitive.Item>
|
|
160
167
|
)
|
|
161
168
|
}
|
|
162
169
|
|
|
163
|
-
const selectItemText = tv({ base: 'text-label text-
|
|
170
|
+
const selectItemText = tv({ base: 'text-label text-fg' })
|
|
164
171
|
|
|
165
172
|
export function SelectItemText({ className, children }: { className?: string, children?: ReactNode }) {
|
|
166
173
|
return (
|
|
@@ -170,7 +177,7 @@ export function SelectItemText({ className, children }: { className?: string, ch
|
|
|
170
177
|
)
|
|
171
178
|
}
|
|
172
179
|
|
|
173
|
-
const selectItemDescription = tv({ base: 'text-caption text-
|
|
180
|
+
const selectItemDescription = tv({ base: 'text-caption text-fg-subtle' })
|
|
174
181
|
|
|
175
182
|
export function SelectItemDescription({ className, children }: { className?: string, children?: ReactNode }) {
|
|
176
183
|
return (
|
package/switch/index.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { tv } from '../tv'
|
|
|
7
7
|
|
|
8
8
|
export const uiSwitch = tv({
|
|
9
9
|
base: 'h-6 w-10 shrink-0 rounded-full p-0.5 transition-state press press-shrink'
|
|
10
|
-
+ ' bg-
|
|
10
|
+
+ ' bg-bg-well ring-1 ring-inset ring-line-strong'
|
|
11
11
|
+ ' invalid:ring-2 invalid:ring-line-danger'
|
|
12
12
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
|
|
13
13
|
+ ' disabled:bg-bg-neutral-disabled disabled:cursor-not-allowed'
|
package/table/index.tsx
CHANGED
|
@@ -20,7 +20,7 @@ export interface TableProps {
|
|
|
20
20
|
children?: ReactNode
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const tableFrame = tv({ base: 'frame rounded-
|
|
23
|
+
const tableFrame = tv({ base: 'frame rounded-r12 overflow-hidden' })
|
|
24
24
|
|
|
25
25
|
export function Table({ label, fixed = false, className, children }: TableProps) {
|
|
26
26
|
const [box, setBox] = useState<HTMLDivElement | null>(null)
|
|
@@ -59,7 +59,7 @@ export function Table({ label, fixed = false, className, children }: TableProps)
|
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const tableHeader = tv({ base: 'bg-
|
|
62
|
+
const tableHeader = tv({ base: 'bg-bg-well border-b border-line' })
|
|
63
63
|
|
|
64
64
|
export function TableHeader({ className, children }: { className?: string, children?: ReactNode }) {
|
|
65
65
|
return (
|
|
@@ -71,7 +71,7 @@ export function TableHeader({ className, children }: { className?: string, child
|
|
|
71
71
|
)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
const tableHeadCell = tv({ base: 'text-caption text-
|
|
74
|
+
const tableHeadCell = tv({ base: 'text-caption text-fg-muted h-9 px-4 text-left whitespace-nowrap' })
|
|
75
75
|
|
|
76
76
|
export function TableHeadCell({ className, children }: { className?: string, children?: ReactNode }) {
|
|
77
77
|
return (
|
|
@@ -104,7 +104,7 @@ export function TableRow({ className, children }: { className?: string, children
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export const tableCell = tv({
|
|
107
|
-
base: 'text-label text-
|
|
107
|
+
base: 'text-label text-fg h-11 px-4',
|
|
108
108
|
|
|
109
109
|
variants: {
|
|
110
110
|
mono: { true: 'font-mono', false: '' },
|
package/tabs/AGENTS.md
CHANGED
package/tabs/index.module.css
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
position: absolute;
|
|
3
3
|
bottom: 0;
|
|
4
4
|
height: 2px;
|
|
5
|
-
background: var(--color-
|
|
5
|
+
background: var(--color-fg);
|
|
6
6
|
width: var(--tabs-indicator-size);
|
|
7
7
|
translate: var(--tabs-indicator-position) 0;
|
|
8
8
|
transition: translate var(--dur-state) var(--ease-state),
|
|
9
9
|
width var(--dur-state) var(--ease-state);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.content[data-state="inactive"] { display: none; }
|
|
13
|
+
|
|
12
14
|
@media (prefers-reduced-motion: reduce) {
|
|
13
15
|
.underline { transition: none; }
|
|
14
16
|
}
|
package/tabs/index.tsx
CHANGED
|
@@ -74,11 +74,11 @@ export function TabsList({ className, children }: { className?: string, children
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const tabsTrigger = tv({
|
|
77
|
-
base: 'text-label text-
|
|
77
|
+
base: 'text-label text-fg-muted inline-flex h-9 items-center gap-tight px-3 transition-state'
|
|
78
78
|
+ ' [&_svg]:size-4'
|
|
79
|
-
+ ' press-shrink enabled:hover:text-
|
|
80
|
-
+ ' disabled:text-
|
|
81
|
-
+ ' aria-selected:text-
|
|
79
|
+
+ ' press-shrink enabled:hover:text-fg'
|
|
80
|
+
+ ' disabled:text-fg-disabled disabled:cursor-not-allowed'
|
|
81
|
+
+ ' aria-selected:text-fg'
|
|
82
82
|
+ ' focus-visible:outline-2 focus-visible:-outline-offset-2'
|
|
83
83
|
+ ' focus-visible:outline-line-focus-ring',
|
|
84
84
|
})
|
|
@@ -100,13 +100,16 @@ export function TabsTrigger({ value, disabled, className, children }: {
|
|
|
100
100
|
)
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
const tabsContent = tv({ base: s.content })
|
|
104
|
+
|
|
105
|
+
export function TabsContent({ value, forceMount, className, children }: {
|
|
104
106
|
value: string
|
|
107
|
+
forceMount?: boolean
|
|
105
108
|
className?: string
|
|
106
109
|
children?: ReactNode
|
|
107
110
|
}) {
|
|
108
111
|
return (
|
|
109
|
-
<TabsPrimitive.Content value={value} className={className}>
|
|
112
|
+
<TabsPrimitive.Content value={value} forceMount={forceMount || undefined} className={tabsContent({ className })}>
|
|
110
113
|
{children}
|
|
111
114
|
</TabsPrimitive.Content>
|
|
112
115
|
)
|
package/tailwind.css
ADDED
package/textarea/index.tsx
CHANGED
|
@@ -3,19 +3,19 @@ import type { TextareaHTMLAttributes } from 'react'
|
|
|
3
3
|
import { tv } from '../tv'
|
|
4
4
|
|
|
5
5
|
export const textarea = tv({
|
|
6
|
-
base: 'w-full rounded-r8 text-value text-
|
|
7
|
-
+ ' placeholder:text-
|
|
6
|
+
base: 'w-full rounded-r8 text-value text-fg'
|
|
7
|
+
+ ' placeholder:text-fg-placeholder'
|
|
8
8
|
+ ' invalid:ring-2 invalid:ring-line-danger'
|
|
9
|
-
+ ' read-only:text-
|
|
9
|
+
+ ' read-only:text-fg-muted'
|
|
10
10
|
+ ' resize-y'
|
|
11
11
|
+ ' transition-state'
|
|
12
12
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
|
|
13
|
-
+ ' disabled:bg-bg-neutral-disabled disabled:text-
|
|
13
|
+
+ ' disabled:bg-bg-neutral-disabled disabled:text-fg-disabled disabled:cursor-not-allowed',
|
|
14
14
|
|
|
15
15
|
variants: {
|
|
16
16
|
surface: {
|
|
17
|
-
bare: 'bg-transparent ring-1 ring-inset ring-line-strong read-only:bg-
|
|
18
|
-
well: 'bg-
|
|
17
|
+
bare: 'bg-transparent ring-1 ring-inset ring-line-strong read-only:bg-bg-well',
|
|
18
|
+
well: 'bg-bg-well',
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
21
|
sm: 'p-2',
|
package/toast/index.tsx
CHANGED
|
@@ -46,13 +46,13 @@ export function Toast({
|
|
|
46
46
|
toast: 'float rounded-r8'
|
|
47
47
|
+ ' flex w-full items-center gap-stack p-4',
|
|
48
48
|
content: 'min-w-0 flex-1',
|
|
49
|
-
title: 'text-label text-
|
|
50
|
-
description: 'text-caption text-
|
|
49
|
+
title: 'text-label text-fg',
|
|
50
|
+
description: 'text-caption text-fg-muted',
|
|
51
51
|
icon: 'shrink-0',
|
|
52
|
-
actionButton: 'text-label text-
|
|
53
|
-
+ ' bg-
|
|
52
|
+
actionButton: 'text-label text-fg shrink-0 rounded-r8 px-3 h-8'
|
|
53
|
+
+ ' bg-bg-well transition-state press press-shrink enabled:hover:bg-bg-neutral-solid/10'
|
|
54
54
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
|
|
55
|
-
+ ' disabled:text-
|
|
55
|
+
+ ' disabled:text-fg-disabled disabled:cursor-not-allowed',
|
|
56
56
|
success: 'text-fg-success',
|
|
57
57
|
error: 'text-fg-danger',
|
|
58
58
|
warning: 'text-fg-warning',
|
package/toggle/index.tsx
CHANGED
|
@@ -9,19 +9,19 @@ export const toggle = tv({
|
|
|
9
9
|
base: 'text-label rounded-full inline-flex h-8 items-center gap-tight px-3'
|
|
10
10
|
+ ' [&_svg]:size-4'
|
|
11
11
|
+ ' ring-1 ring-inset ring-line-strong transition-state press press-shrink'
|
|
12
|
-
+ ' text-
|
|
12
|
+
+ ' text-fg-muted'
|
|
13
13
|
+ ' enabled:hover:bg-bg-neutral-hover'
|
|
14
14
|
+ ' on:bg-bg-neutral-solid on:ring-line-neutral-solid on:enabled:text-fg-neutral-solid-contrast'
|
|
15
15
|
+ ' on:enabled:hover:bg-bg-neutral-solid-hover'
|
|
16
16
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
|
|
17
|
-
+ ' disabled:text-
|
|
17
|
+
+ ' disabled:text-fg-disabled disabled:ring-line disabled:cursor-not-allowed'
|
|
18
18
|
+ ' on:disabled:bg-bg-neutral-solid-checked-disabled on:disabled:ring-transparent on:disabled:text-fg-neutral-solid-contrast',
|
|
19
19
|
|
|
20
20
|
variants: {
|
|
21
21
|
surface: {
|
|
22
22
|
bare: '',
|
|
23
|
-
well: 'bg-
|
|
24
|
-
panel: 'bg-
|
|
23
|
+
well: 'bg-bg-well',
|
|
24
|
+
panel: 'bg-bg-panel',
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
|