@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/accordion/AGENTS.md
CHANGED
package/accordion/index.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { ChevronDown } from 'lucide-react'
|
|
4
3
|
import { Accordion as AccordionPrimitive } from 'radix-ui'
|
|
5
4
|
import type { ReactNode } from 'react'
|
|
6
5
|
|
|
@@ -17,7 +16,7 @@ export interface AccordionProps {
|
|
|
17
16
|
children?: ReactNode
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
const accordion = tv({ base: 'frame rounded-
|
|
19
|
+
const accordion = tv({ base: 'frame rounded-r12 overflow-hidden divide-y divide-line' })
|
|
21
20
|
|
|
22
21
|
export function Accordion({ value, defaultValue, onValueChange, multiple, className, children }: AccordionProps) {
|
|
23
22
|
const shared = {
|
|
@@ -61,10 +60,10 @@ export function AccordionItem({ value, disabled, className, children }: {
|
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
const accordionTrigger = tv({
|
|
64
|
-
base: 'text-label text-
|
|
63
|
+
base: 'text-label text-fg flex h-11 w-full items-center'
|
|
65
64
|
+ ' gap-stack border-b border-transparent px-4 transition-state'
|
|
66
65
|
+ ' press open:border-line enabled:hover:bg-bg-neutral-hover'
|
|
67
|
-
+ ' disabled:text-
|
|
66
|
+
+ ' disabled:text-fg-disabled disabled:cursor-not-allowed'
|
|
68
67
|
+ ' focus-visible:outline-2 focus-visible:-outline-offset-2'
|
|
69
68
|
+ ' focus-visible:outline-line-focus-ring',
|
|
70
69
|
})
|
|
@@ -77,16 +76,19 @@ export function AccordionTrigger({ className, children }: { className?: string,
|
|
|
77
76
|
>
|
|
78
77
|
<span className="flex min-w-0 grow items-center gap-tight">{children}</span>
|
|
79
78
|
|
|
80
|
-
<
|
|
81
|
-
|
|
79
|
+
<svg
|
|
80
|
+
viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"
|
|
81
|
+
className="text-fg-subtle size-4 shrink-0 transition-transform open:rotate-180
|
|
82
82
|
motion-reduce:transition-none"
|
|
83
|
-
|
|
83
|
+
>
|
|
84
|
+
<path d="m6 9 6 6 6-6" />
|
|
85
|
+
</svg>
|
|
84
86
|
</AccordionPrimitive.Trigger>
|
|
85
87
|
</AccordionPrimitive.Header>
|
|
86
88
|
)
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
const accordionContent = tv({ base: 'bg-
|
|
91
|
+
const accordionContent = tv({ base: 'bg-bg-well text-caption text-fg-muted px-4 py-3' })
|
|
90
92
|
|
|
91
93
|
export function AccordionContent({ className, children }: { className?: string, children?: ReactNode }) {
|
|
92
94
|
return (
|
package/alert-dialog/index.tsx
CHANGED
|
@@ -26,7 +26,7 @@ export function AlertDialogTrigger({ children }: { children: ReactNode }) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const alertDialogContent = tv({
|
|
29
|
-
base: 'sheet text-
|
|
29
|
+
base: 'sheet text-fg z-overlay fixed left-1/2 top-1/2'
|
|
30
30
|
+ ' w-full max-w-112 -translate-x-1/2 -translate-y-1/2'
|
|
31
31
|
+ ' rounded-r20 p-6 flex flex-col gap-stack overflow-y-auto'
|
|
32
32
|
+ ' open:animate-fade-in closed:animate-fade-out'
|
|
@@ -36,7 +36,7 @@ const alertDialogContent = tv({
|
|
|
36
36
|
export function AlertDialogContent({ className, children, ...rest }: ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
37
37
|
return (
|
|
38
38
|
<AlertDialogPrimitive.Portal>
|
|
39
|
-
<AlertDialogPrimitive.Overlay className="bg-
|
|
39
|
+
<AlertDialogPrimitive.Overlay className="bg-bg-overlay z-overlay fixed inset-0 open:animate-fade-in closed:animate-fade-out" />
|
|
40
40
|
|
|
41
41
|
<AlertDialogPrimitive.Content
|
|
42
42
|
{...rest}
|
|
@@ -54,7 +54,7 @@ export function AlertDialogTitle({ className, ...rest }: ComponentProps<typeof A
|
|
|
54
54
|
return <AlertDialogPrimitive.Title {...rest} className={alertDialogTitle({ className })} />
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
const alertDialogDescription = tv({ base: 'text-prose text-
|
|
57
|
+
const alertDialogDescription = tv({ base: 'text-prose text-fg-muted' })
|
|
58
58
|
|
|
59
59
|
export function AlertDialogDescription({ className, ...rest }: ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
60
60
|
return (
|
package/badge/index.tsx
CHANGED
|
@@ -8,7 +8,7 @@ export const badge = tv({
|
|
|
8
8
|
|
|
9
9
|
variants: {
|
|
10
10
|
color: {
|
|
11
|
-
neutral: 'bg-
|
|
11
|
+
neutral: 'bg-bg-well text-fg-muted',
|
|
12
12
|
brand: 'bg-bg-brand-weak text-fg-brand-contrast',
|
|
13
13
|
info: 'bg-bg-info-weak text-fg-info-contrast',
|
|
14
14
|
success: 'bg-bg-success-weak text-fg-success-contrast',
|
|
@@ -16,7 +16,7 @@ export const badge = tv({
|
|
|
16
16
|
danger: 'bg-bg-danger-weak text-fg-danger-contrast',
|
|
17
17
|
},
|
|
18
18
|
shape: {
|
|
19
|
-
square: 'rounded-
|
|
19
|
+
square: 'rounded-r4',
|
|
20
20
|
pill: 'rounded-full',
|
|
21
21
|
},
|
|
22
22
|
},
|
package/button/index.tsx
CHANGED
|
@@ -7,7 +7,7 @@ export const button = tv({
|
|
|
7
7
|
+ ' rounded-r8 text-label'
|
|
8
8
|
+ ' transition-state press press-shrink'
|
|
9
9
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-focus-ring'
|
|
10
|
-
+ ' disabled:text-
|
|
10
|
+
+ ' disabled:text-fg-disabled disabled:cursor-not-allowed',
|
|
11
11
|
|
|
12
12
|
variants: {
|
|
13
13
|
color: { brand: '', neutral: '', danger: '' },
|
|
@@ -46,13 +46,13 @@ export const button = tv({
|
|
|
46
46
|
+ ' enabled:hover:bg-bg-neutral-solid-hover'
|
|
47
47
|
+ ' disabled:bg-bg-neutral-solid/20' },
|
|
48
48
|
{ color: 'neutral', emphasis: 'weak',
|
|
49
|
-
class: 'bg-
|
|
49
|
+
class: 'bg-bg-well text-fg'
|
|
50
50
|
+ ' enabled:hover:bg-bg-neutral-solid/10' },
|
|
51
51
|
{ color: 'neutral', emphasis: 'outline',
|
|
52
|
-
class: 'text-
|
|
52
|
+
class: 'text-fg ring-1 ring-inset ring-line-strong disabled:ring-line'
|
|
53
53
|
+ ' enabled:hover:bg-bg-neutral-hover' },
|
|
54
54
|
{ color: 'neutral', emphasis: 'ghost',
|
|
55
|
-
class: 'text-
|
|
55
|
+
class: 'text-fg enabled:hover:bg-bg-neutral-hover' },
|
|
56
56
|
|
|
57
57
|
{ color: 'danger', emphasis: 'solid',
|
|
58
58
|
class: 'bg-bg-danger-solid text-white'
|
package/callout/AGENTS.md
CHANGED
package/callout/index.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { CircleCheck, CircleX, Info, TriangleAlert } from 'lucide-react'
|
|
2
1
|
import type { ReactNode } from 'react'
|
|
3
2
|
|
|
4
3
|
import { tv } from '../tv'
|
|
5
4
|
|
|
6
5
|
export const callout = tv({
|
|
7
6
|
slots: {
|
|
8
|
-
root: 'flex gap-stack rounded-
|
|
7
|
+
root: 'flex gap-stack rounded-r12 border p-4 text-prose',
|
|
9
8
|
icon: 'flex shrink-0 mt-0.5 [&_svg]:size-5',
|
|
10
9
|
title: 'font-bold',
|
|
11
10
|
body: 'flex min-w-0 flex-1 flex-col gap-tight',
|
|
@@ -37,10 +36,33 @@ export const callout = tv({
|
|
|
37
36
|
})
|
|
38
37
|
|
|
39
38
|
const ICONS = {
|
|
40
|
-
info:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
info: (
|
|
40
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
41
|
+
<circle cx="12" cy="12" r="10" />
|
|
42
|
+
<path d="M12 16v-4" />
|
|
43
|
+
<path d="M12 8h.01" />
|
|
44
|
+
</svg>
|
|
45
|
+
),
|
|
46
|
+
success: (
|
|
47
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
48
|
+
<circle cx="12" cy="12" r="10" />
|
|
49
|
+
<path d="m16 9-5.5 5.5L8 12" />
|
|
50
|
+
</svg>
|
|
51
|
+
),
|
|
52
|
+
warning: (
|
|
53
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
54
|
+
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
|
|
55
|
+
<path d="M12 9v4" />
|
|
56
|
+
<path d="M12 17h.01" />
|
|
57
|
+
</svg>
|
|
58
|
+
),
|
|
59
|
+
danger: (
|
|
60
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
61
|
+
<circle cx="12" cy="12" r="10" />
|
|
62
|
+
<path d="m15 9-6 6" />
|
|
63
|
+
<path d="m9 9 6 6" />
|
|
64
|
+
</svg>
|
|
65
|
+
),
|
|
44
66
|
} as const
|
|
45
67
|
|
|
46
68
|
export interface CalloutProps {
|
|
@@ -53,12 +75,11 @@ export interface CalloutProps {
|
|
|
53
75
|
|
|
54
76
|
export function Callout({ color, icon, title, className, children }: CalloutProps) {
|
|
55
77
|
const ui = callout({ color })
|
|
56
|
-
const Fallback = ICONS[color ?? 'info']
|
|
57
78
|
|
|
58
79
|
return (
|
|
59
80
|
<div className={ui.root({ className })} role="alert">
|
|
60
81
|
<span className={ui.icon()}>
|
|
61
|
-
{icon ??
|
|
82
|
+
{icon ?? ICONS[color ?? 'info']}
|
|
62
83
|
</span>
|
|
63
84
|
<div className={ui.body()}>
|
|
64
85
|
{title && <span className={ui.title()}>{title}</span>}
|
package/checkbox/AGENTS.md
CHANGED
package/checkbox/index.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { Check, Minus } from 'lucide-react'
|
|
4
3
|
import { Checkbox as CheckboxPrimitive } from 'radix-ui'
|
|
5
4
|
import {
|
|
6
5
|
createContext,
|
|
@@ -15,7 +14,7 @@ import {
|
|
|
15
14
|
import { tv } from '../tv'
|
|
16
15
|
|
|
17
16
|
export const checkbox = tv({
|
|
18
|
-
base: 'size-5 shrink-0 rounded-
|
|
17
|
+
base: 'size-5 shrink-0 rounded-r4 inline-flex items-center justify-center'
|
|
19
18
|
+ ' bg-transparent ring-1 ring-inset ring-line-strong'
|
|
20
19
|
+ ' transition-state press press-shrink'
|
|
21
20
|
+ ' checked:ring-2'
|
|
@@ -146,7 +145,9 @@ export function Checkbox({
|
|
|
146
145
|
className={checkbox({ color, className })}
|
|
147
146
|
>
|
|
148
147
|
<CheckboxPrimitive.Indicator className="text-fg-neutral-solid-contrast flex">
|
|
149
|
-
|
|
148
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
149
|
+
{indeterminate ? <path d="M5 12h14" /> : <path d="M20 6 9 17l-5-5" />}
|
|
150
|
+
</svg>
|
|
150
151
|
</CheckboxPrimitive.Indicator>
|
|
151
152
|
</CheckboxPrimitive.Root>
|
|
152
153
|
)
|
package/combobox/AGENTS.md
CHANGED
package/combobox/index.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { Check, ChevronDown, X } from 'lucide-react'
|
|
4
3
|
import { Popover as PopoverPrimitive } from 'radix-ui'
|
|
5
4
|
import {
|
|
6
5
|
createContext,
|
|
@@ -164,7 +163,7 @@ export const comboboxAnchor = tv({
|
|
|
164
163
|
variants: {
|
|
165
164
|
surface: {
|
|
166
165
|
bare: 'ring-1 ring-inset ring-line-strong',
|
|
167
|
-
well: 'bg-
|
|
166
|
+
well: 'bg-bg-well',
|
|
168
167
|
},
|
|
169
168
|
size: { sm: 'h-8', md: 'h-9', lg: 'h-10 [&_input]:text-t16' },
|
|
170
169
|
},
|
|
@@ -193,9 +192,9 @@ export interface ComboboxInputProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
193
192
|
}
|
|
194
193
|
|
|
195
194
|
const comboboxInput = tv({
|
|
196
|
-
base: 'text-value text-
|
|
195
|
+
base: 'text-value text-fg placeholder:text-fg-placeholder'
|
|
197
196
|
+ ' w-full min-w-0 bg-transparent outline-none'
|
|
198
|
-
+ ' disabled:text-
|
|
197
|
+
+ ' disabled:text-fg-disabled disabled:cursor-not-allowed',
|
|
199
198
|
})
|
|
200
199
|
|
|
201
200
|
export function ComboboxInput({ value, onValueChange, className, ...rest }: ComboboxInputProps) {
|
|
@@ -250,8 +249,8 @@ export function ComboboxInput({ value, onValueChange, className, ...rest }: Comb
|
|
|
250
249
|
}
|
|
251
250
|
|
|
252
251
|
const comboboxTrigger = tv({
|
|
253
|
-
base: 'text-
|
|
254
|
-
+ ' transition-state press-shrink hover:text-
|
|
252
|
+
base: 'text-fg-subtle grid size-5 shrink-0 place-items-center rounded-r8'
|
|
253
|
+
+ ' transition-state press-shrink hover:text-fg'
|
|
255
254
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2'
|
|
256
255
|
+ ' focus-visible:outline-line-focus-ring',
|
|
257
256
|
})
|
|
@@ -273,16 +272,16 @@ export function ComboboxTrigger({ label = '목록 열기', disabled, className }
|
|
|
273
272
|
onClick={() => ctx.setOpen(!ctx.open)}
|
|
274
273
|
className={comboboxTrigger({ className })}
|
|
275
274
|
>
|
|
276
|
-
<
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4 transition-transform open:rotate-180 motion-reduce:transition-none">
|
|
276
|
+
<path d="m6 9 6 6 6-6" />
|
|
277
|
+
</svg>
|
|
279
278
|
</button>
|
|
280
279
|
)
|
|
281
280
|
}
|
|
282
281
|
|
|
283
282
|
const comboboxCancel = tv({
|
|
284
|
-
base: 'text-
|
|
285
|
-
+ ' transition-state press-shrink hover:text-
|
|
283
|
+
base: 'text-fg-subtle grid size-5 shrink-0 place-items-center rounded-full'
|
|
284
|
+
+ ' transition-state press-shrink hover:text-fg'
|
|
286
285
|
+ ' focus-visible:outline-2 focus-visible:outline-offset-2'
|
|
287
286
|
+ ' focus-visible:outline-line-focus-ring',
|
|
288
287
|
})
|
|
@@ -298,7 +297,10 @@ export function ComboboxCancel({ label = '지우기', className }: { label?: str
|
|
|
298
297
|
onClick={() => ctx.setSearch('')}
|
|
299
298
|
className={comboboxCancel({ className })}
|
|
300
299
|
>
|
|
301
|
-
<
|
|
300
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
301
|
+
<path d="M18 6 6 18" />
|
|
302
|
+
<path d="m6 6 12 12" />
|
|
303
|
+
</svg>
|
|
302
304
|
</button>
|
|
303
305
|
)
|
|
304
306
|
}
|
|
@@ -307,7 +309,7 @@ export type ComboboxContentProps =
|
|
|
307
309
|
Omit<ComponentProps<typeof PopoverPrimitive.Content>, 'align' | 'sideOffset' | 'onOpenAutoFocus'>
|
|
308
310
|
|
|
309
311
|
const comboboxContent = tv({
|
|
310
|
-
base: 'float text-
|
|
312
|
+
base: 'float text-fg rounded-r12 z-overlay'
|
|
311
313
|
+ ' w-(--radix-popover-trigger-width)'
|
|
312
314
|
+ ' open:animate-enter closed:animate-exit',
|
|
313
315
|
})
|
|
@@ -365,7 +367,7 @@ const comboboxItem = tv({
|
|
|
365
367
|
base: 'flex min-h-9 cursor-default items-center justify-between gap-stack'
|
|
366
368
|
+ ' shrink-0 rounded-r8 px-2 py-1 transition-state'
|
|
367
369
|
+ ' data-highlighted:bg-bg-neutral-hover data-highlighted:outline-none'
|
|
368
|
-
+ ' data-disabled:text-
|
|
370
|
+
+ ' data-disabled:text-fg-disabled data-disabled:pointer-events-none',
|
|
369
371
|
})
|
|
370
372
|
|
|
371
373
|
export function ComboboxItem({ value, textValue, disabled = false, className, children }: ComboboxItemProps) {
|
|
@@ -393,15 +395,17 @@ export function ComboboxItem({ value, textValue, disabled = false, className, ch
|
|
|
393
395
|
</span>
|
|
394
396
|
|
|
395
397
|
{ctx.value === value && (
|
|
396
|
-
<span className="text-
|
|
397
|
-
<
|
|
398
|
+
<span className="text-fg-muted flex shrink-0">
|
|
399
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="size-4">
|
|
400
|
+
<path d="M20 6 9 17l-5-5" />
|
|
401
|
+
</svg>
|
|
398
402
|
</span>
|
|
399
403
|
)}
|
|
400
404
|
</div>
|
|
401
405
|
)
|
|
402
406
|
}
|
|
403
407
|
|
|
404
|
-
const comboboxItemText = tv({ base: 'text-label text-
|
|
408
|
+
const comboboxItemText = tv({ base: 'text-label text-fg' })
|
|
405
409
|
|
|
406
410
|
export function ComboboxItemText({ className, children }: { className?: string, children?: ReactNode }) {
|
|
407
411
|
return (
|
|
@@ -411,7 +415,7 @@ export function ComboboxItemText({ className, children }: { className?: string,
|
|
|
411
415
|
)
|
|
412
416
|
}
|
|
413
417
|
|
|
414
|
-
const comboboxItemDescription = tv({ base: 'text-caption text-
|
|
418
|
+
const comboboxItemDescription = tv({ base: 'text-caption text-fg-subtle' })
|
|
415
419
|
|
|
416
420
|
export function ComboboxItemDescription({ className, children }: { className?: string, children?: ReactNode }) {
|
|
417
421
|
return (
|
|
@@ -431,7 +435,7 @@ export function ComboboxGroup({ label, className, children }: {
|
|
|
431
435
|
return (
|
|
432
436
|
<div role="group" className={comboboxGroup({ className })}>
|
|
433
437
|
{label && (
|
|
434
|
-
<span className="text-caption text-
|
|
438
|
+
<span className="text-caption text-fg-subtle px-2 pb-1 pt-2">
|
|
435
439
|
{label}
|
|
436
440
|
</span>
|
|
437
441
|
)}
|
|
@@ -440,7 +444,7 @@ export function ComboboxGroup({ label, className, children }: {
|
|
|
440
444
|
)
|
|
441
445
|
}
|
|
442
446
|
|
|
443
|
-
const comboboxEmpty = tv({ base: 'text-caption text-
|
|
447
|
+
const comboboxEmpty = tv({ base: 'text-caption text-fg-subtle px-2 py-3 text-center' })
|
|
444
448
|
|
|
445
449
|
export function ComboboxEmpty({ className, children }: { className?: string, children?: ReactNode }) {
|
|
446
450
|
const ctx = useCombobox()
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { Search } from 'lucide-react'
|
|
4
3
|
import { useState } from 'react'
|
|
5
4
|
|
|
6
5
|
import {
|
|
@@ -78,7 +77,10 @@ export function CommandPalette({
|
|
|
78
77
|
|
|
79
78
|
<Combobox open onValueChange={pick}>
|
|
80
79
|
<div className="border-line flex h-14 items-center gap-stack border-b px-4">
|
|
81
|
-
<
|
|
80
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-fg-subtle size-5 shrink-0">
|
|
81
|
+
<path d="m21 21-4.34-4.34" />
|
|
82
|
+
<circle cx="11" cy="11" r="8" />
|
|
83
|
+
</svg>
|
|
82
84
|
<ComboboxInput
|
|
83
85
|
value={search}
|
|
84
86
|
onValueChange={setSearch}
|
package/dialog/index.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import type { ComponentProps, ReactNode } from 'react'
|
|
|
6
6
|
import { tv } from '../tv'
|
|
7
7
|
|
|
8
8
|
export const dialog = tv({
|
|
9
|
-
base: 'sheet text-
|
|
9
|
+
base: 'sheet text-fg z-overlay fixed flex flex-col gap-stack overflow-y-auto'
|
|
10
10
|
+ ' open:animate-fade-in closed:animate-fade-out focus-visible:outline-none',
|
|
11
11
|
|
|
12
12
|
variants: {
|
|
@@ -52,7 +52,7 @@ export interface DialogContentProps extends ComponentProps<typeof DialogPrimitiv
|
|
|
52
52
|
export function DialogContent({ size, className, children, ...rest }: DialogContentProps) {
|
|
53
53
|
return (
|
|
54
54
|
<DialogPrimitive.Portal>
|
|
55
|
-
<DialogPrimitive.Overlay className="bg-
|
|
55
|
+
<DialogPrimitive.Overlay className="bg-bg-overlay z-overlay fixed inset-0 open:animate-fade-in closed:animate-fade-out" />
|
|
56
56
|
|
|
57
57
|
<DialogPrimitive.Content {...rest} className={dialog({ size, className })}>
|
|
58
58
|
{children}
|
|
@@ -67,7 +67,7 @@ export function DialogTitle({ className, ...rest }: ComponentProps<typeof Dialog
|
|
|
67
67
|
return <DialogPrimitive.Title {...rest} className={dialogTitle({ className })} />
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const dialogDescription = tv({ base: 'text-prose text-
|
|
70
|
+
const dialogDescription = tv({ base: 'text-prose text-fg-muted' })
|
|
71
71
|
|
|
72
72
|
export function DialogDescription({ className, ...rest }: ComponentProps<typeof DialogPrimitive.Description>) {
|
|
73
73
|
return (
|