@syscore/ui-library 1.1.13 → 1.2.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/client/components/ui/accordion.tsx +6 -9
- package/client/components/ui/alert-dialog.tsx +6 -19
- package/client/components/ui/alert.tsx +5 -6
- package/client/components/ui/avatar.tsx +3 -9
- package/client/components/ui/badge.tsx +5 -8
- package/client/components/ui/breadcrumb.tsx +7 -16
- package/client/components/ui/button.tsx +17 -45
- package/client/components/ui/calendar.tsx +24 -28
- package/client/components/ui/card.tsx +6 -9
- package/client/components/ui/carousel.tsx +14 -14
- package/client/components/ui/chart.tsx +25 -28
- package/client/components/ui/checkbox.tsx +3 -8
- package/client/components/ui/code-badge.tsx +1 -4
- package/client/components/ui/command.tsx +12 -48
- package/client/components/ui/context-menu.tsx +17 -32
- package/client/components/ui/dialog.tsx +9 -18
- package/client/components/ui/drawer.tsx +7 -13
- package/client/components/ui/dropdown-menu.tsx +17 -29
- package/client/components/ui/form.tsx +4 -4
- package/client/components/ui/hover-card.tsx +1 -4
- package/client/components/ui/input-otp.tsx +7 -10
- package/client/components/ui/input.tsx +4 -23
- package/client/components/ui/label.tsx +1 -3
- package/client/components/ui/menubar.tsx +19 -40
- package/client/components/ui/navigation-menu.tsx +10 -27
- package/client/components/ui/navigation.tsx +193 -331
- package/client/components/ui/pagination.tsx +8 -8
- package/client/components/ui/popover.tsx +1 -4
- package/client/components/ui/progress.tsx +2 -5
- package/client/components/ui/radio-group.tsx +4 -7
- package/client/components/ui/resizable.tsx +4 -10
- package/client/components/ui/scroll-area.tsx +5 -8
- package/client/components/ui/search.tsx +7 -10
- package/client/components/ui/select.tsx +11 -36
- package/client/components/ui/separator.tsx +2 -2
- package/client/components/ui/sheet.tsx +12 -23
- package/client/components/ui/sidebar.tsx +55 -82
- package/client/components/ui/skeleton.tsx +1 -1
- package/client/components/ui/slider.tsx +4 -7
- package/client/components/ui/sonner.tsx +5 -8
- package/client/components/ui/switch.tsx +2 -9
- package/client/components/ui/table.tsx +9 -18
- package/client/components/ui/tabs.tsx +19 -28
- package/client/components/ui/tag.tsx +6 -66
- package/client/components/ui/textarea.tsx +1 -4
- package/client/components/ui/toast.tsx +9 -19
- package/client/components/ui/toaster.tsx +1 -1
- package/client/components/ui/toggle-group.tsx +4 -4
- package/client/components/ui/toggle.tsx +13 -13
- package/client/components/ui/tooltip.tsx +12 -15
- package/client/global.css +5419 -1054
- package/client/storybook.css +1164 -0
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.es.js +976 -1926
- package/dist/ui/ui-library.css +1 -0
- package/package.json +2 -2
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
- package/client/ui/WELLDashboard/index.tsx +0 -317
|
@@ -12,7 +12,7 @@ const AccordionItem = React.forwardRef<
|
|
|
12
12
|
>(({ className, ...props }, ref) => (
|
|
13
13
|
<AccordionPrimitive.Item
|
|
14
14
|
ref={ref}
|
|
15
|
-
className={cn("
|
|
15
|
+
className={cn("accordion-item", className)}
|
|
16
16
|
{...props}
|
|
17
17
|
/>
|
|
18
18
|
));
|
|
@@ -22,17 +22,14 @@ const AccordionTrigger = React.forwardRef<
|
|
|
22
22
|
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
23
23
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
24
24
|
>(({ className, children, ...props }, ref) => (
|
|
25
|
-
<AccordionPrimitive.Header className="
|
|
25
|
+
<AccordionPrimitive.Header className="accordion-header">
|
|
26
26
|
<AccordionPrimitive.Trigger
|
|
27
27
|
ref={ref}
|
|
28
|
-
className={cn(
|
|
29
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all [&[data-state=open]>svg]:rotate-180",
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
28
|
+
className={cn("accordion-trigger", className)}
|
|
32
29
|
{...props}
|
|
33
30
|
>
|
|
34
31
|
{children}
|
|
35
|
-
<ChevronDown className="
|
|
32
|
+
<ChevronDown className="accordion-chevron" />
|
|
36
33
|
</AccordionPrimitive.Trigger>
|
|
37
34
|
</AccordionPrimitive.Header>
|
|
38
35
|
));
|
|
@@ -44,10 +41,10 @@ const AccordionContent = React.forwardRef<
|
|
|
44
41
|
>(({ className, children, ...props }, ref) => (
|
|
45
42
|
<AccordionPrimitive.Content
|
|
46
43
|
ref={ref}
|
|
47
|
-
className="
|
|
44
|
+
className="accordion-content"
|
|
48
45
|
{...props}
|
|
49
46
|
>
|
|
50
|
-
<div className={cn("
|
|
47
|
+
<div className={cn("accordion-content-inner", className)}>{children}</div>
|
|
51
48
|
</AccordionPrimitive.Content>
|
|
52
49
|
));
|
|
53
50
|
|
|
@@ -15,10 +15,7 @@ const AlertDialogOverlay = React.forwardRef<
|
|
|
15
15
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
16
16
|
>(({ className, ...props }, ref) => (
|
|
17
17
|
<AlertDialogPrimitive.Overlay
|
|
18
|
-
className={cn(
|
|
19
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
18
|
+
className={cn("alert-dialog-overlay", className)}
|
|
22
19
|
{...props}
|
|
23
20
|
ref={ref}
|
|
24
21
|
/>
|
|
@@ -33,10 +30,7 @@ const AlertDialogContent = React.forwardRef<
|
|
|
33
30
|
<AlertDialogOverlay />
|
|
34
31
|
<AlertDialogPrimitive.Content
|
|
35
32
|
ref={ref}
|
|
36
|
-
className={cn(
|
|
37
|
-
"fixed left-[50%] top-[50%] z-50 border-green grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
33
|
+
className={cn("alert-dialog-content", className)}
|
|
40
34
|
{...props}
|
|
41
35
|
/>
|
|
42
36
|
</AlertDialogPortal>
|
|
@@ -48,10 +42,7 @@ const AlertDialogHeader = ({
|
|
|
48
42
|
...props
|
|
49
43
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
50
44
|
<div
|
|
51
|
-
className={cn(
|
|
52
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
53
|
-
className,
|
|
54
|
-
)}
|
|
45
|
+
className={cn("alert-dialog-header", className)}
|
|
55
46
|
{...props}
|
|
56
47
|
/>
|
|
57
48
|
);
|
|
@@ -62,10 +53,7 @@ const AlertDialogFooter = ({
|
|
|
62
53
|
...props
|
|
63
54
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
64
55
|
<div
|
|
65
|
-
className={cn(
|
|
66
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
67
|
-
className,
|
|
68
|
-
)}
|
|
56
|
+
className={cn("alert-dialog-footer", className)}
|
|
69
57
|
{...props}
|
|
70
58
|
/>
|
|
71
59
|
);
|
|
@@ -77,7 +65,7 @@ const AlertDialogTitle = React.forwardRef<
|
|
|
77
65
|
>(({ className, ...props }, ref) => (
|
|
78
66
|
<AlertDialogPrimitive.Title
|
|
79
67
|
ref={ref}
|
|
80
|
-
className={cn("
|
|
68
|
+
className={cn("alert-dialog-title", className)}
|
|
81
69
|
{...props}
|
|
82
70
|
/>
|
|
83
71
|
));
|
|
@@ -89,7 +77,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
89
77
|
>(({ className, ...props }, ref) => (
|
|
90
78
|
<AlertDialogPrimitive.Description
|
|
91
79
|
ref={ref}
|
|
92
|
-
className={cn("
|
|
80
|
+
className={cn("alert-dialog-description", className)}
|
|
93
81
|
{...props}
|
|
94
82
|
/>
|
|
95
83
|
));
|
|
@@ -116,7 +104,6 @@ const AlertDialogCancel = React.forwardRef<
|
|
|
116
104
|
ref={ref}
|
|
117
105
|
className={cn(
|
|
118
106
|
buttonVariants({ variant: "general-secondary" }),
|
|
119
|
-
"mt-2 sm:mt-0",
|
|
120
107
|
className,
|
|
121
108
|
)}
|
|
122
109
|
{...props}
|
|
@@ -4,13 +4,12 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva(
|
|
7
|
-
"
|
|
7
|
+
"alert",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "
|
|
12
|
-
destructive:
|
|
13
|
-
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
11
|
+
default: "alert--default",
|
|
12
|
+
destructive: "alert--destructive",
|
|
14
13
|
},
|
|
15
14
|
},
|
|
16
15
|
defaultVariants: {
|
|
@@ -38,7 +37,7 @@ const AlertTitle = React.forwardRef<
|
|
|
38
37
|
>(({ className, ...props }, ref) => (
|
|
39
38
|
<h5
|
|
40
39
|
ref={ref}
|
|
41
|
-
className={cn("
|
|
40
|
+
className={cn("alert-title", className)}
|
|
42
41
|
{...props}
|
|
43
42
|
/>
|
|
44
43
|
));
|
|
@@ -50,7 +49,7 @@ const AlertDescription = React.forwardRef<
|
|
|
50
49
|
>(({ className, ...props }, ref) => (
|
|
51
50
|
<div
|
|
52
51
|
ref={ref}
|
|
53
|
-
className={cn("
|
|
52
|
+
className={cn("alert-description", className)}
|
|
54
53
|
{...props}
|
|
55
54
|
/>
|
|
56
55
|
));
|
|
@@ -9,10 +9,7 @@ const Avatar = React.forwardRef<
|
|
|
9
9
|
>(({ className, ...props }, ref) => (
|
|
10
10
|
<AvatarPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
|
-
className={cn(
|
|
13
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
12
|
+
className={cn("avatar", className)}
|
|
16
13
|
{...props}
|
|
17
14
|
/>
|
|
18
15
|
));
|
|
@@ -24,7 +21,7 @@ const AvatarImage = React.forwardRef<
|
|
|
24
21
|
>(({ className, ...props }, ref) => (
|
|
25
22
|
<AvatarPrimitive.Image
|
|
26
23
|
ref={ref}
|
|
27
|
-
className={cn("
|
|
24
|
+
className={cn("avatar-image", className)}
|
|
28
25
|
{...props}
|
|
29
26
|
/>
|
|
30
27
|
));
|
|
@@ -36,10 +33,7 @@ const AvatarFallback = React.forwardRef<
|
|
|
36
33
|
>(({ className, ...props }, ref) => (
|
|
37
34
|
<AvatarPrimitive.Fallback
|
|
38
35
|
ref={ref}
|
|
39
|
-
className={cn(
|
|
40
|
-
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
41
|
-
className,
|
|
42
|
-
)}
|
|
36
|
+
className={cn("avatar-fallback", className)}
|
|
43
37
|
{...props}
|
|
44
38
|
/>
|
|
45
39
|
));
|
|
@@ -4,17 +4,14 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
6
|
const badgeVariants = cva(
|
|
7
|
-
"
|
|
7
|
+
"badge",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
destructive:
|
|
16
|
-
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
17
|
-
outline: "text-foreground",
|
|
11
|
+
default: "badge--default",
|
|
12
|
+
secondary: "badge--secondary",
|
|
13
|
+
destructive: "badge--destructive",
|
|
14
|
+
outline: "badge--outline",
|
|
18
15
|
},
|
|
19
16
|
},
|
|
20
17
|
defaultVariants: {
|
|
@@ -18,10 +18,7 @@ const BreadcrumbList = React.forwardRef<
|
|
|
18
18
|
>(({ className, ...props }, ref) => (
|
|
19
19
|
<ol
|
|
20
20
|
ref={ref}
|
|
21
|
-
className={cn(
|
|
22
|
-
"flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground sm:gap-2.5",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
21
|
+
className={cn("breadcrumb-list", className)}
|
|
25
22
|
{...props}
|
|
26
23
|
/>
|
|
27
24
|
));
|
|
@@ -33,7 +30,7 @@ const BreadcrumbItem = React.forwardRef<
|
|
|
33
30
|
>(({ className, ...props }, ref) => (
|
|
34
31
|
<li
|
|
35
32
|
ref={ref}
|
|
36
|
-
className={cn("
|
|
33
|
+
className={cn("breadcrumb-item", className)}
|
|
37
34
|
{...props}
|
|
38
35
|
/>
|
|
39
36
|
));
|
|
@@ -50,7 +47,7 @@ const BreadcrumbLink = React.forwardRef<
|
|
|
50
47
|
return (
|
|
51
48
|
<Comp
|
|
52
49
|
ref={ref}
|
|
53
|
-
className={cn("
|
|
50
|
+
className={cn("breadcrumb-link", className)}
|
|
54
51
|
{...props}
|
|
55
52
|
/>
|
|
56
53
|
);
|
|
@@ -66,10 +63,7 @@ const BreadcrumbPage = React.forwardRef<
|
|
|
66
63
|
role="link"
|
|
67
64
|
aria-disabled="true"
|
|
68
65
|
aria-current="page"
|
|
69
|
-
className={cn(
|
|
70
|
-
"body-small font-medium text-gray-600 text-center whitespace-nowrap",
|
|
71
|
-
className
|
|
72
|
-
)}
|
|
66
|
+
className={cn("breadcrumb-page body-small font-medium", className)}
|
|
73
67
|
{...props}
|
|
74
68
|
/>
|
|
75
69
|
));
|
|
@@ -83,10 +77,7 @@ const BreadcrumbSeparator = ({
|
|
|
83
77
|
<li
|
|
84
78
|
role="presentation"
|
|
85
79
|
aria-hidden="true"
|
|
86
|
-
className={cn(
|
|
87
|
-
"size-4 flex items-center justify-center shrink-0",
|
|
88
|
-
className
|
|
89
|
-
)}
|
|
80
|
+
className={cn("breadcrumb-separator", className)}
|
|
90
81
|
{...props}
|
|
91
82
|
>
|
|
92
83
|
{children ?? (
|
|
@@ -117,10 +108,10 @@ const BreadcrumbEllipsis = ({
|
|
|
117
108
|
<span
|
|
118
109
|
role="presentation"
|
|
119
110
|
aria-hidden="true"
|
|
120
|
-
className={cn("
|
|
111
|
+
className={cn("breadcrumb-ellipsis", className)}
|
|
121
112
|
{...props}
|
|
122
113
|
>
|
|
123
|
-
<MoreHorizontal className="
|
|
114
|
+
<MoreHorizontal className="icon-4" />
|
|
124
115
|
<span className="sr-only">More</span>
|
|
125
116
|
</span>
|
|
126
117
|
);
|
|
@@ -6,58 +6,31 @@ import { cn } from "@/lib/utils";
|
|
|
6
6
|
import { motion } from "motion/react";
|
|
7
7
|
|
|
8
8
|
const buttonVariants = cva(
|
|
9
|
-
"
|
|
9
|
+
"button",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
13
|
// CTA variants
|
|
14
|
-
clear: "
|
|
15
|
-
default: "
|
|
16
|
-
"primary-gradient": "
|
|
17
|
-
"primary-dark":
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"bg-white border border-gray-200 text-cyan-800 hover:bg-gray-50 focus-visible:ring-gray-200",
|
|
21
|
-
"tertiary-light":
|
|
22
|
-
"bg-blue-50 border border-blue-200 text-blue-600 hover:bg-blue-100 focus-visible:ring-blue-200",
|
|
14
|
+
clear: "button--clear",
|
|
15
|
+
default: "button--default",
|
|
16
|
+
"primary-gradient": "button--primary-gradient",
|
|
17
|
+
"primary-dark": "button--primary-dark",
|
|
18
|
+
"secondary-light": "button--secondary-light",
|
|
19
|
+
"tertiary-light": "button--tertiary-light",
|
|
23
20
|
// Utility variants
|
|
24
|
-
"general-primary":
|
|
25
|
-
|
|
26
|
-
"general-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"bg-white border border-gray-200 text-gray-600 hover:bg-gray-50 focus-visible:ring-gray-200",
|
|
30
|
-
"tooltip-primary":
|
|
31
|
-
"bg-cyan-300 text-white hover:bg-cyan-400 focus-visible:ring-cyan-300",
|
|
32
|
-
"tooltip-secondary":
|
|
33
|
-
"bg-gray-500 text-white hover:bg-gray-600 focus-visible:ring-gray-500",
|
|
21
|
+
"general-primary": "button--general-primary",
|
|
22
|
+
"general-secondary": "button--general-secondary",
|
|
23
|
+
"general-tertiary": "button--general-tertiary",
|
|
24
|
+
"tooltip-primary": "button--tooltip-primary",
|
|
25
|
+
"tooltip-secondary": "button--tooltip-secondary",
|
|
34
26
|
},
|
|
35
27
|
size: {
|
|
36
|
-
xlarge: "
|
|
37
|
-
large: "
|
|
38
|
-
utility: "
|
|
39
|
-
icon: "
|
|
28
|
+
xlarge: "button--xlarge",
|
|
29
|
+
large: "button--large",
|
|
30
|
+
utility: "button--utility",
|
|
31
|
+
icon: "button--icon",
|
|
40
32
|
},
|
|
41
33
|
},
|
|
42
|
-
compoundVariants: [
|
|
43
|
-
{
|
|
44
|
-
size: "xlarge",
|
|
45
|
-
className: "font-semibold",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
size: "large",
|
|
49
|
-
className: "font-semibold",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
size: "utility",
|
|
53
|
-
className: "font-semibold",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
size: "icon",
|
|
57
|
-
className:
|
|
58
|
-
"p-0 bg-white border border-gray-100 hover:border-gray-200 hover:scale-[1.02] transition-all duration-200",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
34
|
defaultVariants: {
|
|
62
35
|
variant: "default",
|
|
63
36
|
size: "large",
|
|
@@ -89,7 +62,6 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
89
62
|
<button
|
|
90
63
|
className={cn(
|
|
91
64
|
buttonVariants({ variant, size }),
|
|
92
|
-
"cursor-pointer",
|
|
93
65
|
className
|
|
94
66
|
)}
|
|
95
67
|
style={style}
|
|
@@ -99,7 +71,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
99
71
|
{size === "icon" ? (
|
|
100
72
|
children
|
|
101
73
|
) : (
|
|
102
|
-
<span className={cn("
|
|
74
|
+
<span className={cn("button-text", textClass)}>
|
|
103
75
|
{children}
|
|
104
76
|
</span>
|
|
105
77
|
)}
|
|
@@ -16,47 +16,43 @@ function Calendar({
|
|
|
16
16
|
return (
|
|
17
17
|
<DayPicker
|
|
18
18
|
showOutsideDays={showOutsideDays}
|
|
19
|
-
className={cn("
|
|
19
|
+
className={cn("calendar", className)}
|
|
20
20
|
classNames={{
|
|
21
|
-
months: "
|
|
22
|
-
month: "
|
|
23
|
-
caption: "
|
|
24
|
-
caption_label: "
|
|
25
|
-
nav: "
|
|
21
|
+
months: "calendar-months",
|
|
22
|
+
month: "calendar-month",
|
|
23
|
+
caption: "calendar-caption",
|
|
24
|
+
caption_label: "calendar-caption-label",
|
|
25
|
+
nav: "calendar-nav",
|
|
26
26
|
nav_button: cn(
|
|
27
27
|
buttonVariants({ variant: "general-secondary" }),
|
|
28
|
-
"
|
|
28
|
+
"calendar-nav-button",
|
|
29
29
|
),
|
|
30
|
-
nav_button_previous: "
|
|
31
|
-
nav_button_next: "
|
|
32
|
-
table: "
|
|
33
|
-
head_row: "
|
|
34
|
-
head_cell:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
30
|
+
nav_button_previous: "calendar-nav-button-previous",
|
|
31
|
+
nav_button_next: "calendar-nav-button-next",
|
|
32
|
+
table: "calendar-table",
|
|
33
|
+
head_row: "calendar-head-row",
|
|
34
|
+
head_cell: "calendar-head-cell",
|
|
35
|
+
row: "calendar-row",
|
|
36
|
+
cell: "calendar-cell",
|
|
38
37
|
day: cn(
|
|
39
38
|
buttonVariants({ variant: "general-tertiary" }),
|
|
40
|
-
"
|
|
39
|
+
"calendar-day",
|
|
41
40
|
),
|
|
42
|
-
day_range_end: "day-range-end",
|
|
43
|
-
day_selected:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
day_range_middle:
|
|
50
|
-
"aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
51
|
-
day_hidden: "invisible",
|
|
41
|
+
day_range_end: "calendar-day-range-end",
|
|
42
|
+
day_selected: "calendar-day-selected",
|
|
43
|
+
day_today: "calendar-day-today",
|
|
44
|
+
day_outside: "calendar-day-outside",
|
|
45
|
+
day_disabled: "calendar-day-disabled",
|
|
46
|
+
day_range_middle: "calendar-day-range-middle",
|
|
47
|
+
day_hidden: "calendar-day-hidden",
|
|
52
48
|
...classNames,
|
|
53
49
|
}}
|
|
54
50
|
components={{
|
|
55
51
|
Chevron: (props) => {
|
|
56
52
|
if (props.orientation === "left") {
|
|
57
|
-
return <ChevronLeft className="
|
|
53
|
+
return <ChevronLeft className="icon-4" />;
|
|
58
54
|
}
|
|
59
|
-
return <ChevronRight className="
|
|
55
|
+
return <ChevronRight className="icon-4" />;
|
|
60
56
|
},
|
|
61
57
|
}}
|
|
62
58
|
{...props}
|
|
@@ -8,10 +8,7 @@ const Card = React.forwardRef<
|
|
|
8
8
|
>(({ className, ...props }, ref) => (
|
|
9
9
|
<div
|
|
10
10
|
ref={ref}
|
|
11
|
-
className={cn(
|
|
12
|
-
"rounded-lg border border-gray-100 bg-cyan-50 p-6 space-y-6",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
11
|
+
className={cn("card", className)}
|
|
15
12
|
{...props}
|
|
16
13
|
/>
|
|
17
14
|
));
|
|
@@ -21,7 +18,7 @@ const CardHeader = React.forwardRef<
|
|
|
21
18
|
HTMLDivElement,
|
|
22
19
|
React.HTMLAttributes<HTMLDivElement>
|
|
23
20
|
>(({ className, ...props }, ref) => (
|
|
24
|
-
<div ref={ref} className={cn("
|
|
21
|
+
<div ref={ref} className={cn("card-header", className)} {...props} />
|
|
25
22
|
));
|
|
26
23
|
CardHeader.displayName = "CardHeader";
|
|
27
24
|
|
|
@@ -31,7 +28,7 @@ const CardTitle = React.forwardRef<
|
|
|
31
28
|
>(({ className, ...props }, ref) => (
|
|
32
29
|
<h3
|
|
33
30
|
ref={ref}
|
|
34
|
-
className={cn("heading-xxsmall
|
|
31
|
+
className={cn("card-title heading-xxsmall", className)}
|
|
35
32
|
{...props}
|
|
36
33
|
/>
|
|
37
34
|
));
|
|
@@ -43,7 +40,7 @@ const CardDescription = React.forwardRef<
|
|
|
43
40
|
>(({ className, ...props }, ref) => (
|
|
44
41
|
<p
|
|
45
42
|
ref={ref}
|
|
46
|
-
className={cn("body-base
|
|
43
|
+
className={cn("card-description body-base", className)}
|
|
47
44
|
{...props}
|
|
48
45
|
/>
|
|
49
46
|
));
|
|
@@ -55,7 +52,7 @@ const CardContent = React.forwardRef<
|
|
|
55
52
|
>(({ className, ...props }, ref) => (
|
|
56
53
|
<div
|
|
57
54
|
ref={ref}
|
|
58
|
-
className={cn("body-base
|
|
55
|
+
className={cn("card-content body-base", className)}
|
|
59
56
|
{...props}
|
|
60
57
|
/>
|
|
61
58
|
));
|
|
@@ -67,7 +64,7 @@ const CardFooter = React.forwardRef<
|
|
|
67
64
|
>(({ className, ...props }, ref) => (
|
|
68
65
|
<div
|
|
69
66
|
ref={ref}
|
|
70
|
-
className={cn("
|
|
67
|
+
className={cn("card-footer body-base", className)}
|
|
71
68
|
{...props}
|
|
72
69
|
/>
|
|
73
70
|
));
|
|
@@ -135,7 +135,7 @@ const Carousel = React.forwardRef<
|
|
|
135
135
|
<div
|
|
136
136
|
ref={ref}
|
|
137
137
|
onKeyDownCapture={handleKeyDown}
|
|
138
|
-
className={cn("
|
|
138
|
+
className={cn("carousel", className)}
|
|
139
139
|
role="region"
|
|
140
140
|
aria-roledescription="carousel"
|
|
141
141
|
{...props}
|
|
@@ -155,12 +155,12 @@ const CarouselContent = React.forwardRef<
|
|
|
155
155
|
const { carouselRef, orientation } = useCarousel();
|
|
156
156
|
|
|
157
157
|
return (
|
|
158
|
-
<div ref={carouselRef} className="
|
|
158
|
+
<div ref={carouselRef} className="carousel-viewport">
|
|
159
159
|
<div
|
|
160
160
|
ref={ref}
|
|
161
161
|
className={cn(
|
|
162
|
-
"
|
|
163
|
-
orientation === "horizontal" ? "-
|
|
162
|
+
"carousel-content",
|
|
163
|
+
orientation === "horizontal" ? "carousel-content--horizontal" : "carousel-content--vertical",
|
|
164
164
|
className,
|
|
165
165
|
)}
|
|
166
166
|
{...props}
|
|
@@ -182,8 +182,8 @@ const CarouselItem = React.forwardRef<
|
|
|
182
182
|
role="group"
|
|
183
183
|
aria-roledescription="slide"
|
|
184
184
|
className={cn(
|
|
185
|
-
"
|
|
186
|
-
orientation === "horizontal" ? "
|
|
185
|
+
"carousel-item",
|
|
186
|
+
orientation === "horizontal" ? "carousel-item--horizontal" : "carousel-item--vertical",
|
|
187
187
|
className,
|
|
188
188
|
)}
|
|
189
189
|
{...props}
|
|
@@ -208,17 +208,17 @@ const CarouselPrevious = React.forwardRef<
|
|
|
208
208
|
variant={variant}
|
|
209
209
|
size={size}
|
|
210
210
|
className={cn(
|
|
211
|
-
"
|
|
211
|
+
"carousel-button carousel-button--previous",
|
|
212
212
|
orientation === "horizontal"
|
|
213
|
-
? "-
|
|
214
|
-
: "-
|
|
213
|
+
? "carousel-button--horizontal"
|
|
214
|
+
: "carousel-button--vertical",
|
|
215
215
|
className,
|
|
216
216
|
)}
|
|
217
217
|
disabled={!canScrollPrev}
|
|
218
218
|
onClick={scrollPrev}
|
|
219
219
|
{...props}
|
|
220
220
|
>
|
|
221
|
-
<ArrowLeft className="
|
|
221
|
+
<ArrowLeft className="icon-4" />
|
|
222
222
|
<span className="sr-only">Previous slide</span>
|
|
223
223
|
</Button>
|
|
224
224
|
);
|
|
@@ -242,17 +242,17 @@ const CarouselNext = React.forwardRef<
|
|
|
242
242
|
variant={variant}
|
|
243
243
|
size={size}
|
|
244
244
|
className={cn(
|
|
245
|
-
"
|
|
245
|
+
"carousel-button carousel-button--next",
|
|
246
246
|
orientation === "horizontal"
|
|
247
|
-
? "-
|
|
248
|
-
: "-
|
|
247
|
+
? "carousel-button--horizontal"
|
|
248
|
+
: "carousel-button--vertical",
|
|
249
249
|
className,
|
|
250
250
|
)}
|
|
251
251
|
disabled={!canScrollNext}
|
|
252
252
|
onClick={scrollNext}
|
|
253
253
|
{...props}
|
|
254
254
|
>
|
|
255
|
-
<ArrowRight className="
|
|
255
|
+
<ArrowRight className="icon-4" />
|
|
256
256
|
<span className="sr-only">Next slide</span>
|
|
257
257
|
</Button>
|
|
258
258
|
);
|