@suphark/ui 0.19.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/package.json +14 -13
- package/scripts/audit.mjs +0 -0
- package/src/components/app-shell/app-shell.tsx +12 -0
- package/src/components/app-shell/index.ts +1 -0
- package/src/components/app-shell/mobile-tab-bar.tsx +104 -0
- package/src/components/shared/action-menu.tsx +157 -0
- package/src/components/shared/button/confirm-action-button.tsx +2 -0
- package/src/components/shared/filter-bar.tsx +108 -0
- package/src/components/shared/month-stepper.tsx +124 -0
- package/src/components/shared/row-actions.tsx +2 -0
- package/src/components/shared/segmented-control.tsx +73 -0
- package/src/components/shared/settings-layout.tsx +170 -0
- package/src/components/shared/setup-checklist.tsx +104 -0
- package/src/components/shared/simple-dialog.tsx +172 -0
- package/src/components/shared/simple-pagination.tsx +109 -0
- package/src/components/shared/simple-table.tsx +93 -0
- package/src/components/shared/simple-tabs.tsx +118 -0
- package/src/components/shared/simple-tooltip.tsx +87 -0
- package/src/components/shared/ui-text.tsx +28 -0
- package/src/components/ui/accordion.tsx +2 -2
- package/src/components/ui/alert-dialog.tsx +4 -4
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/attachment.tsx +9 -9
- package/src/components/ui/avatar.tsx +4 -4
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/breadcrumb.tsx +1 -1
- package/src/components/ui/bubble.tsx +123 -0
- package/src/components/ui/button-group.tsx +2 -2
- package/src/components/ui/button.tsx +6 -6
- package/src/components/ui/calendar.tsx +9 -9
- package/src/components/ui/card.tsx +3 -3
- package/src/components/ui/chart.tsx +2 -2
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +6 -6
- package/src/components/ui/command.tsx +4 -4
- package/src/components/ui/context-menu.tsx +7 -7
- package/src/components/ui/dialog.tsx +4 -4
- package/src/components/ui/direction.tsx +6 -0
- package/src/components/ui/drawer.tsx +10 -10
- package/src/components/ui/dropdown-menu.tsx +8 -8
- package/src/components/ui/empty.tsx +4 -4
- package/src/components/ui/field.tsx +8 -8
- package/src/components/ui/hover-card.tsx +1 -2
- package/src/components/ui/input-group.tsx +3 -3
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/item.tsx +4 -4
- package/src/components/ui/kbd.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/marker.tsx +67 -0
- package/src/components/ui/menubar.tsx +9 -9
- package/src/components/ui/message-scroller.tsx +129 -0
- package/src/components/ui/message.tsx +84 -0
- package/src/components/ui/native-select.tsx +1 -1
- package/src/components/ui/navigation-menu.tsx +6 -6
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +2 -3
- package/src/components/ui/questionnaire.tsx +314 -0
- package/src/components/ui/radio-group.tsx +1 -2
- package/src/components/ui/resizable.tsx +1 -1
- package/src/components/ui/select.tsx +4 -4
- package/src/components/ui/separator.tsx +0 -1
- package/src/components/ui/sheet.tsx +3 -3
- package/src/components/ui/sidebar.tsx +14 -14
- package/src/components/ui/switch.tsx +2 -3
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toast.tsx +221 -0
- package/src/components/ui/toggle-group.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +0 -1
- package/src/index.ts +41 -0
- package/src/lib/month.ts +60 -0
- package/src/styles.css +10 -0
|
@@ -15,7 +15,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
|
15
15
|
<ol
|
|
16
16
|
data-slot="breadcrumb-list"
|
|
17
17
|
className={cn(
|
|
18
|
-
"
|
|
18
|
+
"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { cn } from "@suphark/ui/lib/utils";
|
|
4
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
|
+
import type * as React from "react";
|
|
6
|
+
|
|
7
|
+
function BubbleGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
data-slot="bubble-group"
|
|
11
|
+
className={cn("flex min-w-0 flex-col gap-2", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const bubbleVariants = cva(
|
|
18
|
+
"group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
variant: {
|
|
22
|
+
default:
|
|
23
|
+
"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
24
|
+
secondary:
|
|
25
|
+
"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
26
|
+
muted:
|
|
27
|
+
"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
28
|
+
tinted:
|
|
29
|
+
"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
30
|
+
outline:
|
|
31
|
+
"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
32
|
+
ghost:
|
|
33
|
+
"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
34
|
+
destructive:
|
|
35
|
+
"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: "default",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
function Bubble({
|
|
45
|
+
variant = "default",
|
|
46
|
+
align = "start",
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<"div"> &
|
|
50
|
+
VariantProps<typeof bubbleVariants> & {
|
|
51
|
+
align?: "start" | "end";
|
|
52
|
+
}) {
|
|
53
|
+
return (
|
|
54
|
+
<div
|
|
55
|
+
data-slot="bubble"
|
|
56
|
+
data-variant={variant}
|
|
57
|
+
data-align={align}
|
|
58
|
+
className={cn(bubbleVariants({ variant }), className)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function BubbleContent({ className, render, ...props }: useRender.ComponentProps<"div">) {
|
|
65
|
+
return useRender({
|
|
66
|
+
defaultTagName: "div",
|
|
67
|
+
props: mergeProps<"div">(
|
|
68
|
+
{
|
|
69
|
+
className: cn(
|
|
70
|
+
"w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
|
|
71
|
+
className,
|
|
72
|
+
),
|
|
73
|
+
},
|
|
74
|
+
props,
|
|
75
|
+
),
|
|
76
|
+
render,
|
|
77
|
+
state: {
|
|
78
|
+
slot: "bubble-content",
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const bubbleReactionsVariants = cva(
|
|
84
|
+
"absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
|
|
85
|
+
{
|
|
86
|
+
variants: {
|
|
87
|
+
side: {
|
|
88
|
+
top: "top-0 -translate-y-3/4",
|
|
89
|
+
bottom: "bottom-0 translate-y-3/4",
|
|
90
|
+
},
|
|
91
|
+
align: {
|
|
92
|
+
start: "left-3",
|
|
93
|
+
end: "right-3",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
defaultVariants: {
|
|
97
|
+
side: "bottom",
|
|
98
|
+
align: "end",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
function BubbleReactions({
|
|
104
|
+
side = "bottom",
|
|
105
|
+
align = "end",
|
|
106
|
+
className,
|
|
107
|
+
...props
|
|
108
|
+
}: React.ComponentProps<"div"> & {
|
|
109
|
+
align?: "start" | "end";
|
|
110
|
+
side?: "top" | "bottom";
|
|
111
|
+
}) {
|
|
112
|
+
return (
|
|
113
|
+
<div
|
|
114
|
+
data-slot="bubble-reactions"
|
|
115
|
+
data-align={align}
|
|
116
|
+
data-side={side}
|
|
117
|
+
className={cn(bubbleReactionsVariants({ side, align }), className)}
|
|
118
|
+
{...props}
|
|
119
|
+
/>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -43,7 +43,7 @@ function ButtonGroupText({ className, render, ...props }: useRender.ComponentPro
|
|
|
43
43
|
props: mergeProps<"div">(
|
|
44
44
|
{
|
|
45
45
|
className: cn(
|
|
46
|
-
"flex items-center gap-2 rounded-lg border bg-muted px-2.5 font-medium
|
|
46
|
+
"flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
47
47
|
className,
|
|
48
48
|
),
|
|
49
49
|
},
|
|
@@ -66,7 +66,7 @@ function ButtonGroupSeparator({
|
|
|
66
66
|
data-slot="button-group-separator"
|
|
67
67
|
orientation={orientation}
|
|
68
68
|
className={cn(
|
|
69
|
-
"relative self-stretch bg-input data-horizontal:mx-px data-
|
|
69
|
+
"relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
|
|
70
70
|
className,
|
|
71
71
|
)}
|
|
72
72
|
{...props}
|
|
@@ -3,7 +3,7 @@ import { cn } from "@suphark/ui/lib/utils";
|
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
5
|
const buttonVariants = cva(
|
|
6
|
-
"group/button inline-flex shrink-0
|
|
6
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -15,20 +15,20 @@ const buttonVariants = cva(
|
|
|
15
15
|
ghost:
|
|
16
16
|
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
17
17
|
destructive:
|
|
18
|
-
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:
|
|
18
|
+
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
19
19
|
link: "text-primary underline-offset-4 hover:underline",
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
default:
|
|
23
23
|
"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
24
|
-
xs: "h-6 gap-1
|
|
25
|
-
sm: "h-7 gap-1
|
|
24
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
26
26
|
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
27
27
|
icon: "size-8",
|
|
28
28
|
"icon-xs":
|
|
29
|
-
"size-6
|
|
29
|
+
"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
30
30
|
"icon-sm":
|
|
31
|
-
"size-7
|
|
31
|
+
"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
32
32
|
"icon-lg": "size-9",
|
|
33
33
|
},
|
|
34
34
|
},
|
|
@@ -25,7 +25,7 @@ function Calendar({
|
|
|
25
25
|
<DayPicker
|
|
26
26
|
showOutsideDays={showOutsideDays}
|
|
27
27
|
className={cn(
|
|
28
|
-
"group/calendar bg-background in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent
|
|
28
|
+
"group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
29
29
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
30
30
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
31
31
|
className,
|
|
@@ -46,12 +46,12 @@ function Calendar({
|
|
|
46
46
|
),
|
|
47
47
|
button_previous: cn(
|
|
48
48
|
buttonVariants({ variant: buttonVariant }),
|
|
49
|
-
"size-(--cell-size) select-none
|
|
49
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
50
50
|
defaultClassNames.button_previous,
|
|
51
51
|
),
|
|
52
52
|
button_next: cn(
|
|
53
53
|
buttonVariants({ variant: buttonVariant }),
|
|
54
|
-
"size-(--cell-size) select-none
|
|
54
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
55
55
|
defaultClassNames.button_next,
|
|
56
56
|
),
|
|
57
57
|
month_caption: cn(
|
|
@@ -59,13 +59,13 @@ function Calendar({
|
|
|
59
59
|
defaultClassNames.month_caption,
|
|
60
60
|
),
|
|
61
61
|
dropdowns: cn(
|
|
62
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 font-medium
|
|
62
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
63
63
|
defaultClassNames.dropdowns,
|
|
64
64
|
),
|
|
65
65
|
dropdown_root: cn("relative rounded-(--cell-radius)", defaultClassNames.dropdown_root),
|
|
66
66
|
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
67
67
|
caption_label: cn(
|
|
68
|
-
"select-none
|
|
68
|
+
"font-medium select-none",
|
|
69
69
|
captionLayout === "label"
|
|
70
70
|
? "text-sm"
|
|
71
71
|
: "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
@@ -74,17 +74,17 @@ function Calendar({
|
|
|
74
74
|
month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
|
|
75
75
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
76
76
|
weekday: cn(
|
|
77
|
-
"flex-1
|
|
77
|
+
"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
78
78
|
defaultClassNames.weekday,
|
|
79
79
|
),
|
|
80
80
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
81
81
|
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
82
82
|
week_number: cn(
|
|
83
|
-
"
|
|
83
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
84
84
|
defaultClassNames.week_number,
|
|
85
85
|
),
|
|
86
86
|
day: cn(
|
|
87
|
-
"group/day relative aspect-square h-full w-full
|
|
87
|
+
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
88
88
|
props.showWeekNumber
|
|
89
89
|
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)"
|
|
90
90
|
: "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
@@ -172,7 +172,7 @@ function CalendarDayButton({
|
|
|
172
172
|
data-range-end={modifiers.range_end}
|
|
173
173
|
data-range-middle={modifiers.range_middle}
|
|
174
174
|
className={cn(
|
|
175
|
-
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 font-normal
|
|
175
|
+
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
176
176
|
defaultClassNames.day,
|
|
177
177
|
className,
|
|
178
178
|
)}
|
|
@@ -11,7 +11,7 @@ function Card({
|
|
|
11
11
|
data-slot="card"
|
|
12
12
|
data-size={size}
|
|
13
13
|
className={cn(
|
|
14
|
-
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-card-foreground
|
|
14
|
+
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
15
15
|
className,
|
|
16
16
|
)}
|
|
17
17
|
{...props}
|
|
@@ -37,7 +37,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
37
37
|
<div
|
|
38
38
|
data-slot="card-title"
|
|
39
39
|
className={cn(
|
|
40
|
-
"
|
|
40
|
+
"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
|
|
41
41
|
className,
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
@@ -49,7 +49,7 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
49
49
|
return (
|
|
50
50
|
<div
|
|
51
51
|
data-slot="card-description"
|
|
52
|
-
className={cn("text-muted-foreground
|
|
52
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
55
|
);
|
|
@@ -62,7 +62,7 @@ function ChartContainer({
|
|
|
62
62
|
data-slot="chart"
|
|
63
63
|
data-chart={chartId}
|
|
64
64
|
className={cn(
|
|
65
|
-
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector
|
|
65
|
+
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
66
66
|
className,
|
|
67
67
|
)}
|
|
68
68
|
{...props}
|
|
@@ -229,7 +229,7 @@ function ChartTooltipContent({
|
|
|
229
229
|
</span>
|
|
230
230
|
</div>
|
|
231
231
|
{item.value != null && (
|
|
232
|
-
<span className="font-
|
|
232
|
+
<span className="font-mono font-medium text-foreground tabular-nums">
|
|
233
233
|
{typeof item.value === "number"
|
|
234
234
|
? item.value.toLocaleString()
|
|
235
235
|
: String(item.value)}
|
|
@@ -9,7 +9,7 @@ function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
|
9
9
|
<CheckboxPrimitive.Root
|
|
10
10
|
data-slot="checkbox"
|
|
11
11
|
className={cn(
|
|
12
|
-
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input outline-none
|
|
12
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
13
13
|
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -103,7 +103,7 @@ function ComboboxContent({
|
|
|
103
103
|
data-slot="combobox-content"
|
|
104
104
|
data-chips={!!anchor}
|
|
105
105
|
className={cn(
|
|
106
|
-
"group/combobox-content
|
|
106
|
+
"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
107
107
|
className,
|
|
108
108
|
)}
|
|
109
109
|
{...props}
|
|
@@ -131,7 +131,7 @@ function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.
|
|
|
131
131
|
<ComboboxPrimitive.Item
|
|
132
132
|
data-slot="combobox-item"
|
|
133
133
|
className={cn(
|
|
134
|
-
"relative flex w-full cursor-default
|
|
134
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
135
135
|
className,
|
|
136
136
|
)}
|
|
137
137
|
{...props}
|
|
@@ -158,7 +158,7 @@ function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Pro
|
|
|
158
158
|
return (
|
|
159
159
|
<ComboboxPrimitive.GroupLabel
|
|
160
160
|
data-slot="combobox-label"
|
|
161
|
-
className={cn("px-2 py-1.5 text-muted-foreground
|
|
161
|
+
className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
|
|
162
162
|
{...props}
|
|
163
163
|
/>
|
|
164
164
|
);
|
|
@@ -173,7 +173,7 @@ function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
|
|
|
173
173
|
<ComboboxPrimitive.Empty
|
|
174
174
|
data-slot="combobox-empty"
|
|
175
175
|
className={cn(
|
|
176
|
-
"hidden w-full justify-center py-2 text-center text-muted-foreground
|
|
176
|
+
"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
|
|
177
177
|
className,
|
|
178
178
|
)}
|
|
179
179
|
{...props}
|
|
@@ -199,7 +199,7 @@ function ComboboxChips({
|
|
|
199
199
|
<ComboboxPrimitive.Chips
|
|
200
200
|
data-slot="combobox-chips"
|
|
201
201
|
className={cn(
|
|
202
|
-
"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-
|
|
202
|
+
"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
|
|
203
203
|
className,
|
|
204
204
|
)}
|
|
205
205
|
{...props}
|
|
@@ -219,7 +219,7 @@ function ComboboxChip({
|
|
|
219
219
|
<ComboboxPrimitive.Chip
|
|
220
220
|
data-slot="combobox-chip"
|
|
221
221
|
className={cn(
|
|
222
|
-
"flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1
|
|
222
|
+
"flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
|
|
223
223
|
className,
|
|
224
224
|
)}
|
|
225
225
|
{...props}
|
|
@@ -84,7 +84,7 @@ function CommandList({ className, ...props }: React.ComponentProps<typeof Comman
|
|
|
84
84
|
<CommandPrimitive.List
|
|
85
85
|
data-slot="command-list"
|
|
86
86
|
className={cn(
|
|
87
|
-
"no-scrollbar max-h-72 scroll-py-1 overflow-
|
|
87
|
+
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
88
88
|
className,
|
|
89
89
|
)}
|
|
90
90
|
{...props}
|
|
@@ -113,7 +113,7 @@ function CommandGroup({
|
|
|
113
113
|
<CommandPrimitive.Group
|
|
114
114
|
data-slot="command-group"
|
|
115
115
|
className={cn(
|
|
116
|
-
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:
|
|
116
|
+
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
117
117
|
className,
|
|
118
118
|
)}
|
|
119
119
|
{...props}
|
|
@@ -143,7 +143,7 @@ function CommandItem({
|
|
|
143
143
|
<CommandPrimitive.Item
|
|
144
144
|
data-slot="command-item"
|
|
145
145
|
className={cn(
|
|
146
|
-
"group/command-item relative flex cursor-default
|
|
146
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
147
147
|
className,
|
|
148
148
|
)}
|
|
149
149
|
{...props}
|
|
@@ -159,7 +159,7 @@ function CommandShortcut({ className, ...props }: React.ComponentProps<"span">)
|
|
|
159
159
|
<span
|
|
160
160
|
data-slot="command-shortcut"
|
|
161
161
|
className={cn(
|
|
162
|
-
"ml-auto text-
|
|
162
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
163
163
|
className,
|
|
164
164
|
)}
|
|
165
165
|
{...props}
|
|
@@ -44,7 +44,7 @@ function ContextMenuContent({
|
|
|
44
44
|
<ContextMenuPrimitive.Popup
|
|
45
45
|
data-slot="context-menu-content"
|
|
46
46
|
className={cn(
|
|
47
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:fade-in-0 data-open:zoom-in-95 data-closed:
|
|
47
|
+
"z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
48
48
|
className,
|
|
49
49
|
)}
|
|
50
50
|
{...props}
|
|
@@ -70,7 +70,7 @@ function ContextMenuLabel({
|
|
|
70
70
|
data-slot="context-menu-label"
|
|
71
71
|
data-inset={inset}
|
|
72
72
|
className={cn(
|
|
73
|
-
"px-1.5 py-1 font-medium text-muted-foreground
|
|
73
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
74
74
|
className,
|
|
75
75
|
)}
|
|
76
76
|
{...props}
|
|
@@ -93,7 +93,7 @@ function ContextMenuItem({
|
|
|
93
93
|
data-inset={inset}
|
|
94
94
|
data-variant={variant}
|
|
95
95
|
className={cn(
|
|
96
|
-
"group/context-menu-item relative flex cursor-default
|
|
96
|
+
"group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
97
97
|
className,
|
|
98
98
|
)}
|
|
99
99
|
{...props}
|
|
@@ -118,7 +118,7 @@ function ContextMenuSubTrigger({
|
|
|
118
118
|
data-slot="context-menu-sub-trigger"
|
|
119
119
|
data-inset={inset}
|
|
120
120
|
className={cn(
|
|
121
|
-
"flex cursor-default
|
|
121
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
122
122
|
className,
|
|
123
123
|
)}
|
|
124
124
|
{...props}
|
|
@@ -154,7 +154,7 @@ function ContextMenuCheckboxItem({
|
|
|
154
154
|
data-slot="context-menu-checkbox-item"
|
|
155
155
|
data-inset={inset}
|
|
156
156
|
className={cn(
|
|
157
|
-
"relative flex cursor-default
|
|
157
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
158
158
|
className,
|
|
159
159
|
)}
|
|
160
160
|
checked={checked}
|
|
@@ -187,7 +187,7 @@ function ContextMenuRadioItem({
|
|
|
187
187
|
data-slot="context-menu-radio-item"
|
|
188
188
|
data-inset={inset}
|
|
189
189
|
className={cn(
|
|
190
|
-
"relative flex cursor-default
|
|
190
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
191
191
|
className,
|
|
192
192
|
)}
|
|
193
193
|
{...props}
|
|
@@ -217,7 +217,7 @@ function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span
|
|
|
217
217
|
<span
|
|
218
218
|
data-slot="context-menu-shortcut"
|
|
219
219
|
className={cn(
|
|
220
|
-
"ml-auto text-
|
|
220
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
|
|
221
221
|
className,
|
|
222
222
|
)}
|
|
223
223
|
{...props}
|
|
@@ -27,7 +27,7 @@ function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props)
|
|
|
27
27
|
<DialogPrimitive.Backdrop
|
|
28
28
|
data-slot="dialog-overlay"
|
|
29
29
|
className={cn(
|
|
30
|
-
"
|
|
30
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
31
31
|
className,
|
|
32
32
|
)}
|
|
33
33
|
{...props}
|
|
@@ -49,7 +49,7 @@ function DialogContent({
|
|
|
49
49
|
<DialogPrimitive.Popup
|
|
50
50
|
data-slot="dialog-content"
|
|
51
51
|
className={cn(
|
|
52
|
-
"
|
|
52
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
53
53
|
className,
|
|
54
54
|
)}
|
|
55
55
|
{...props}
|
|
@@ -104,7 +104,7 @@ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
|
|
|
104
104
|
return (
|
|
105
105
|
<DialogPrimitive.Title
|
|
106
106
|
data-slot="dialog-title"
|
|
107
|
-
className={cn("
|
|
107
|
+
className={cn("text-base leading-none font-medium", className)}
|
|
108
108
|
{...props}
|
|
109
109
|
/>
|
|
110
110
|
);
|
|
@@ -115,7 +115,7 @@ function DialogDescription({ className, ...props }: DialogPrimitive.Description.
|
|
|
115
115
|
<DialogPrimitive.Description
|
|
116
116
|
data-slot="dialog-description"
|
|
117
117
|
className={cn(
|
|
118
|
-
"text-muted-foreground
|
|
118
|
+
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
119
119
|
className,
|
|
120
120
|
)}
|
|
121
121
|
{...props}
|
|
@@ -68,7 +68,7 @@ function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props)
|
|
|
68
68
|
<DrawerPrimitive.Backdrop
|
|
69
69
|
data-slot="drawer-overlay"
|
|
70
70
|
className={cn(
|
|
71
|
-
"fixed inset-0 z-50 min-h-dvh
|
|
71
|
+
"fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute",
|
|
72
72
|
className,
|
|
73
73
|
)}
|
|
74
74
|
{...props}
|
|
@@ -82,7 +82,7 @@ function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">)
|
|
|
82
82
|
data-slot="drawer-swipe-handle"
|
|
83
83
|
aria-hidden="true"
|
|
84
84
|
className={cn(
|
|
85
|
-
"relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200
|
|
85
|
+
"relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing",
|
|
86
86
|
className,
|
|
87
87
|
)}
|
|
88
88
|
{...props}
|
|
@@ -108,19 +108,19 @@ function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.
|
|
|
108
108
|
data-snap-points={hasSnapPoints ? "" : undefined}
|
|
109
109
|
className={cn(
|
|
110
110
|
// Base.
|
|
111
|
-
"group/drawer-popup
|
|
111
|
+
"group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b",
|
|
112
112
|
// Nested.
|
|
113
113
|
"data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
|
|
114
114
|
// Bleed.
|
|
115
|
-
"after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=
|
|
115
|
+
"after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
|
|
116
116
|
// Sizing.
|
|
117
|
-
"[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=
|
|
117
|
+
"[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
|
|
118
118
|
// Stack.
|
|
119
119
|
"[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]",
|
|
120
120
|
// Transitions.
|
|
121
|
-
"data-ending-style:transform-(--closed-transform) data-
|
|
121
|
+
"data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
|
|
122
122
|
// Axis: y.
|
|
123
|
-
"data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)
|
|
123
|
+
"data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
|
|
124
124
|
// Axis: x.
|
|
125
125
|
"data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row",
|
|
126
126
|
// Direction: down.
|
|
@@ -139,7 +139,7 @@ function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.
|
|
|
139
139
|
<DrawerPrimitive.Content
|
|
140
140
|
data-slot="drawer-content"
|
|
141
141
|
className={cn(
|
|
142
|
-
"flex min-h-0 flex-1
|
|
142
|
+
"flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none",
|
|
143
143
|
)}
|
|
144
144
|
>
|
|
145
145
|
{children}
|
|
@@ -177,7 +177,7 @@ function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props) {
|
|
|
177
177
|
return (
|
|
178
178
|
<DrawerPrimitive.Title
|
|
179
179
|
data-slot="drawer-title"
|
|
180
|
-
className={cn("font-medium text-
|
|
180
|
+
className={cn("text-base font-medium text-foreground", className)}
|
|
181
181
|
{...props}
|
|
182
182
|
/>
|
|
183
183
|
);
|
|
@@ -187,7 +187,7 @@ function DrawerDescription({ className, ...props }: DrawerPrimitive.Description.
|
|
|
187
187
|
return (
|
|
188
188
|
<DrawerPrimitive.Description
|
|
189
189
|
data-slot="drawer-description"
|
|
190
|
-
className={cn("text-balance text-muted-foreground
|
|
190
|
+
className={cn("text-sm text-balance text-muted-foreground", className)}
|
|
191
191
|
{...props}
|
|
192
192
|
/>
|
|
193
193
|
);
|