@syscore/ui-library 1.1.12 → 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/icons/AchievementBadges.tsx +33 -0
- package/client/components/icons/ConceptIcons.tsx +169 -22
- package/client/components/icons/NavLogo.tsx +4 -4
- package/client/components/icons/ProviderBadges.tsx +28 -28
- package/client/components/icons/ProviderSeals.tsx +35 -35
- package/client/components/icons/StandardLogo.tsx +47 -0
- package/client/components/icons/UtilityChevronDown.tsx +1 -1
- package/client/components/icons/UtilityClearRegular.tsx +43 -0
- package/client/components/icons/UtilityCompare.tsx +71 -0
- package/client/components/icons/UtilityHome.tsx +26 -0
- package/client/components/icons/UtilityReset.tsx +7 -7
- package/client/components/icons/UtilitySave.tsx +35 -0
- package/client/components/icons/UtilityScopeLarge.tsx +86 -0
- package/client/components/icons/UtilityShow.tsx +41 -0
- package/client/components/icons/UtilityTarget.tsx +21 -0
- package/client/components/icons/UtilityTargetActive.tsx +34 -0
- package/client/components/icons/UtilityText.tsx +8 -8
- 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 +24 -11
- package/client/components/ui/button.tsx +40 -56
- 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 +22 -0
- 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 +34 -9
- package/client/components/ui/label.tsx +2 -4
- package/client/components/ui/menubar.tsx +19 -40
- package/client/components/ui/navigation-menu.tsx +10 -27
- package/client/components/ui/navigation.tsx +861 -0
- 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/{SearchField.tsx → search.tsx} +7 -10
- package/client/components/ui/select.tsx +19 -44
- 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 +43 -203
- package/client/components/ui/tag.tsx +68 -0
- 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 +20 -3
- package/client/components/ui/toggle.tsx +13 -13
- package/client/components/ui/tooltip.tsx +147 -10
- package/client/global.css +5421 -1049
- package/client/storybook.css +1164 -0
- package/client/ui/AspectRatio.stories.tsx +1 -1
- package/client/ui/Button.stories.tsx +5 -5
- package/client/ui/Card.stories.tsx +223 -2
- package/client/ui/CodeBadge.stories.tsx +76 -0
- package/client/ui/Dialog.stories.tsx +52 -5
- package/client/ui/Icons.stories.tsx +31 -31
- package/client/ui/Input.stories.tsx +125 -0
- package/client/ui/Label.stories.tsx +8 -11
- package/client/ui/Navigation.stories.tsx +1 -1
- package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
- package/client/ui/SearchField.stories.tsx +1 -1
- package/client/ui/{Select/Select.stories.tsx → Select.stories.tsx} +2 -2
- package/client/ui/{Switch/Switch.stories.tsx → Switch.stories.tsx} +3 -3
- package/client/ui/Tabs.stories.tsx +174 -10
- package/client/ui/Tag.stories.tsx +48 -1
- package/client/ui/{Textarea/Textarea.stories.tsx → Textarea.stories.tsx} +9 -10
- package/client/ui/Toggle.stories.tsx +3 -3
- package/client/ui/Tooltip.stories.tsx +28 -4
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.d.ts +4 -6
- package/dist/ui/index.es.js +1227 -2235
- package/dist/ui/ui-library.css +1 -0
- package/package.json +3 -3
- package/client/components/ui/Navigation.tsx +0 -958
- package/client/components/ui/StrategyTable.tsx +0 -303
- package/client/components/ui/Tag.tsx +0 -127
- package/client/ui/Input/Input.stories.tsx +0 -69
- package/client/ui/StrategyTable.stories.tsx +0 -138
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
- package/client/ui/WELLDashboard/index.tsx +0 -317
- /package/client/hooks/{UseTabs.tsx → use-tabs.tsx} +0 -0
|
@@ -11,23 +11,23 @@ export function UtilityText({ className }: { className?: string }) {
|
|
|
11
11
|
<path
|
|
12
12
|
d="M8.75 12.75H0.75"
|
|
13
13
|
stroke="currentColor"
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
strokeWidth="1.5"
|
|
15
|
+
strokeLinecap="round"
|
|
16
16
|
stroke-linejoin="round"
|
|
17
17
|
/>
|
|
18
18
|
<path
|
|
19
19
|
d="M10.75 0.75H0.75"
|
|
20
20
|
stroke="currentColor"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
strokeWidth="1.5"
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
strokeLinejoin="round"
|
|
24
24
|
/>
|
|
25
25
|
<path
|
|
26
26
|
d="M14.75 6.75H0.75"
|
|
27
27
|
stroke="currentColor"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
strokeWidth="1.5"
|
|
29
|
+
strokeLinecap="round"
|
|
30
|
+
strokeLinejoin="round"
|
|
31
31
|
/>
|
|
32
32
|
</svg>
|
|
33
33
|
);
|
|
@@ -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,7 +63,7 @@ const BreadcrumbPage = React.forwardRef<
|
|
|
66
63
|
role="link"
|
|
67
64
|
aria-disabled="true"
|
|
68
65
|
aria-current="page"
|
|
69
|
-
className={cn("
|
|
66
|
+
className={cn("breadcrumb-page body-small font-medium", className)}
|
|
70
67
|
{...props}
|
|
71
68
|
/>
|
|
72
69
|
));
|
|
@@ -80,10 +77,26 @@ const BreadcrumbSeparator = ({
|
|
|
80
77
|
<li
|
|
81
78
|
role="presentation"
|
|
82
79
|
aria-hidden="true"
|
|
83
|
-
className={cn("
|
|
80
|
+
className={cn("breadcrumb-separator", className)}
|
|
84
81
|
{...props}
|
|
85
82
|
>
|
|
86
|
-
{children ??
|
|
83
|
+
{children ?? (
|
|
84
|
+
<svg
|
|
85
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
86
|
+
width="5"
|
|
87
|
+
height="8"
|
|
88
|
+
viewBox="0 0 5 8"
|
|
89
|
+
fill="none"
|
|
90
|
+
>
|
|
91
|
+
<path
|
|
92
|
+
d="M0.75 6.75L3.75 3.75L0.75 0.75"
|
|
93
|
+
stroke="#CBCDD2"
|
|
94
|
+
strokeWidth="1.5"
|
|
95
|
+
strokeLinecap="round"
|
|
96
|
+
strokeLinejoin="round"
|
|
97
|
+
/>
|
|
98
|
+
</svg>
|
|
99
|
+
)}
|
|
87
100
|
</li>
|
|
88
101
|
);
|
|
89
102
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
@@ -95,10 +108,10 @@ const BreadcrumbEllipsis = ({
|
|
|
95
108
|
<span
|
|
96
109
|
role="presentation"
|
|
97
110
|
aria-hidden="true"
|
|
98
|
-
className={cn("
|
|
111
|
+
className={cn("breadcrumb-ellipsis", className)}
|
|
99
112
|
{...props}
|
|
100
113
|
>
|
|
101
|
-
<MoreHorizontal className="
|
|
114
|
+
<MoreHorizontal className="icon-4" />
|
|
102
115
|
<span className="sr-only">More</span>
|
|
103
116
|
</span>
|
|
104
117
|
);
|
|
@@ -3,85 +3,67 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
5
|
import { cn } from "@/lib/utils";
|
|
6
|
+
import { motion } from "motion/react";
|
|
6
7
|
|
|
7
8
|
const buttonVariants = cva(
|
|
8
|
-
"
|
|
9
|
+
"button",
|
|
9
10
|
{
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
// CTA variants
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"tertiary-light":
|
|
19
|
-
"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",
|
|
20
20
|
// Utility variants
|
|
21
|
-
"general-primary":
|
|
22
|
-
|
|
23
|
-
"general-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"bg-white border border-gray-200 text-gray-600 hover:bg-gray-50 focus-visible:ring-gray-200",
|
|
27
|
-
"tooltip-primary":
|
|
28
|
-
"bg-cyan-300 text-white hover:bg-cyan-400 focus-visible:ring-cyan-300",
|
|
29
|
-
"tooltip-secondary":
|
|
30
|
-
"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",
|
|
31
26
|
},
|
|
32
27
|
size: {
|
|
33
|
-
xlarge: "
|
|
34
|
-
large: "
|
|
35
|
-
utility: "
|
|
36
|
-
icon: "
|
|
28
|
+
xlarge: "button--xlarge",
|
|
29
|
+
large: "button--large",
|
|
30
|
+
utility: "button--utility",
|
|
31
|
+
icon: "button--icon",
|
|
37
32
|
},
|
|
38
33
|
},
|
|
39
|
-
compoundVariants: [
|
|
40
|
-
{
|
|
41
|
-
size: "xlarge",
|
|
42
|
-
className: "font-semibold",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
size: "large",
|
|
46
|
-
className: "font-semibold",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
size: "utility",
|
|
50
|
-
className: "font-semibold",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
size: "icon",
|
|
54
|
-
className: "p-0 bg-white border border-gray-100 ",
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
34
|
defaultVariants: {
|
|
58
|
-
variant: "
|
|
35
|
+
variant: "default",
|
|
59
36
|
size: "large",
|
|
60
37
|
},
|
|
61
|
-
}
|
|
38
|
+
}
|
|
62
39
|
);
|
|
63
40
|
|
|
64
41
|
export interface ButtonProps
|
|
65
|
-
extends
|
|
66
|
-
|
|
42
|
+
extends Omit<
|
|
43
|
+
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
44
|
+
"onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart"
|
|
45
|
+
>,
|
|
46
|
+
VariantProps<typeof buttonVariants> {
|
|
67
47
|
asChild?: boolean;
|
|
68
48
|
}
|
|
69
49
|
|
|
50
|
+
const sizeTextClasses: Record<string, string> = {
|
|
51
|
+
xlarge: "body-large",
|
|
52
|
+
large: "body-base",
|
|
53
|
+
utility: "body-small",
|
|
54
|
+
icon: "",
|
|
55
|
+
};
|
|
56
|
+
|
|
70
57
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
71
58
|
({ className, variant, size, children, style, ...props }, ref) => {
|
|
72
|
-
|
|
73
|
-
const bodyClass =
|
|
74
|
-
size === "xlarge"
|
|
75
|
-
? "body-large"
|
|
76
|
-
: size === "large"
|
|
77
|
-
? "body-base"
|
|
78
|
-
: size === "utility"
|
|
79
|
-
? "body-small"
|
|
80
|
-
: "";
|
|
59
|
+
const textClass = sizeTextClasses[size || "large"];
|
|
81
60
|
|
|
82
61
|
return (
|
|
83
62
|
<button
|
|
84
|
-
className={cn(
|
|
63
|
+
className={cn(
|
|
64
|
+
buttonVariants({ variant, size }),
|
|
65
|
+
className
|
|
66
|
+
)}
|
|
85
67
|
style={style}
|
|
86
68
|
ref={ref}
|
|
87
69
|
{...props}
|
|
@@ -89,11 +71,13 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
89
71
|
{size === "icon" ? (
|
|
90
72
|
children
|
|
91
73
|
) : (
|
|
92
|
-
<span className={cn("
|
|
74
|
+
<span className={cn("button-text", textClass)}>
|
|
75
|
+
{children}
|
|
76
|
+
</span>
|
|
93
77
|
)}
|
|
94
78
|
</button>
|
|
95
79
|
);
|
|
96
|
-
}
|
|
80
|
+
}
|
|
97
81
|
);
|
|
98
82
|
|
|
99
83
|
Button.displayName = "Button";
|
|
@@ -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 shadow-xs 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
|
);
|