@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
|
@@ -8,7 +8,7 @@ const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
|
8
8
|
<nav
|
|
9
9
|
role="navigation"
|
|
10
10
|
aria-label="pagination"
|
|
11
|
-
className={cn("
|
|
11
|
+
className={cn("pagination", className)}
|
|
12
12
|
{...props}
|
|
13
13
|
/>
|
|
14
14
|
);
|
|
@@ -20,7 +20,7 @@ const PaginationContent = React.forwardRef<
|
|
|
20
20
|
>(({ className, ...props }, ref) => (
|
|
21
21
|
<ul
|
|
22
22
|
ref={ref}
|
|
23
|
-
className={cn("
|
|
23
|
+
className={cn("pagination-content", className)}
|
|
24
24
|
{...props}
|
|
25
25
|
/>
|
|
26
26
|
));
|
|
@@ -66,10 +66,10 @@ const PaginationPrevious = ({
|
|
|
66
66
|
<PaginationLink
|
|
67
67
|
aria-label="Go to previous page"
|
|
68
68
|
size="utility"
|
|
69
|
-
className={cn("
|
|
69
|
+
className={cn("pagination-previous", className)}
|
|
70
70
|
{...props}
|
|
71
71
|
>
|
|
72
|
-
<ChevronLeft className="
|
|
72
|
+
<ChevronLeft className="icon-4" />
|
|
73
73
|
<span>Previous</span>
|
|
74
74
|
</PaginationLink>
|
|
75
75
|
);
|
|
@@ -82,11 +82,11 @@ const PaginationNext = ({
|
|
|
82
82
|
<PaginationLink
|
|
83
83
|
aria-label="Go to next page"
|
|
84
84
|
size="utility"
|
|
85
|
-
className={cn("
|
|
85
|
+
className={cn("pagination-next", className)}
|
|
86
86
|
{...props}
|
|
87
87
|
>
|
|
88
88
|
<span>Next</span>
|
|
89
|
-
<ChevronRight className="
|
|
89
|
+
<ChevronRight className="icon-4" />
|
|
90
90
|
</PaginationLink>
|
|
91
91
|
);
|
|
92
92
|
PaginationNext.displayName = "PaginationNext";
|
|
@@ -97,10 +97,10 @@ const PaginationEllipsis = ({
|
|
|
97
97
|
}: React.ComponentProps<"span">) => (
|
|
98
98
|
<span
|
|
99
99
|
aria-hidden
|
|
100
|
-
className={cn("
|
|
100
|
+
className={cn("pagination-ellipsis", className)}
|
|
101
101
|
{...props}
|
|
102
102
|
>
|
|
103
|
-
<MoreHorizontal className="
|
|
103
|
+
<MoreHorizontal className="icon-4" />
|
|
104
104
|
<span className="sr-only">More pages</span>
|
|
105
105
|
</span>
|
|
106
106
|
);
|
|
@@ -16,10 +16,7 @@ const PopoverContent = React.forwardRef<
|
|
|
16
16
|
ref={ref}
|
|
17
17
|
align={align}
|
|
18
18
|
sideOffset={sideOffset}
|
|
19
|
-
className={cn(
|
|
20
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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-[side=bottom]:slide-in-from-top-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",
|
|
21
|
-
className,
|
|
22
|
-
)}
|
|
19
|
+
className={cn("popover-content", className)}
|
|
23
20
|
{...props}
|
|
24
21
|
/>
|
|
25
22
|
</PopoverPrimitive.Portal>
|
|
@@ -9,14 +9,11 @@ const Progress = React.forwardRef<
|
|
|
9
9
|
>(({ className, value, ...props }, ref) => (
|
|
10
10
|
<ProgressPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
|
-
className={cn(
|
|
13
|
-
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
12
|
+
className={cn("progress", className)}
|
|
16
13
|
{...props}
|
|
17
14
|
>
|
|
18
15
|
<ProgressPrimitive.Indicator
|
|
19
|
-
className="
|
|
16
|
+
className="progress-indicator"
|
|
20
17
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
21
18
|
/>
|
|
22
19
|
</ProgressPrimitive.Root>
|
|
@@ -10,7 +10,7 @@ const RadioGroup = React.forwardRef<
|
|
|
10
10
|
>(({ className, ...props }, ref) => {
|
|
11
11
|
return (
|
|
12
12
|
<RadioGroupPrimitive.Root
|
|
13
|
-
className={cn("
|
|
13
|
+
className={cn("radio-group", className)}
|
|
14
14
|
{...props}
|
|
15
15
|
ref={ref}
|
|
16
16
|
/>
|
|
@@ -25,14 +25,11 @@ const RadioGroupItem = React.forwardRef<
|
|
|
25
25
|
return (
|
|
26
26
|
<RadioGroupPrimitive.Item
|
|
27
27
|
ref={ref}
|
|
28
|
-
className={cn(
|
|
29
|
-
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
28
|
+
className={cn("radio-group-item", className)}
|
|
32
29
|
{...props}
|
|
33
30
|
>
|
|
34
|
-
<RadioGroupPrimitive.Indicator className="
|
|
35
|
-
<Circle className="
|
|
31
|
+
<RadioGroupPrimitive.Indicator className="radio-group-indicator">
|
|
32
|
+
<Circle className="icon-2-5 fill-current text-current" />
|
|
36
33
|
</RadioGroupPrimitive.Indicator>
|
|
37
34
|
</RadioGroupPrimitive.Item>
|
|
38
35
|
);
|
|
@@ -8,10 +8,7 @@ const ResizablePanelGroup = ({
|
|
|
8
8
|
...props
|
|
9
9
|
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
|
|
10
10
|
<ResizablePrimitive.PanelGroup
|
|
11
|
-
className={cn(
|
|
12
|
-
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
13
|
-
className,
|
|
14
|
-
)}
|
|
11
|
+
className={cn("resizable-panel-group", className)}
|
|
15
12
|
{...props}
|
|
16
13
|
/>
|
|
17
14
|
);
|
|
@@ -26,15 +23,12 @@ const ResizableHandle = ({
|
|
|
26
23
|
withHandle?: boolean;
|
|
27
24
|
}) => (
|
|
28
25
|
<ResizablePrimitive.PanelResizeHandle
|
|
29
|
-
className={cn(
|
|
30
|
-
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
31
|
-
className,
|
|
32
|
-
)}
|
|
26
|
+
className={cn("resizable-handle", className)}
|
|
33
27
|
{...props}
|
|
34
28
|
>
|
|
35
29
|
{withHandle && (
|
|
36
|
-
<div className="
|
|
37
|
-
<GripVertical className="
|
|
30
|
+
<div className="resizable-handle-grip">
|
|
31
|
+
<GripVertical className="icon-2-5" />
|
|
38
32
|
</div>
|
|
39
33
|
)}
|
|
40
34
|
</ResizablePrimitive.PanelResizeHandle>
|
|
@@ -9,10 +9,10 @@ const ScrollArea = React.forwardRef<
|
|
|
9
9
|
>(({ className, children, ...props }, ref) => (
|
|
10
10
|
<ScrollAreaPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
|
-
className={cn("
|
|
12
|
+
className={cn("scroll-area", className)}
|
|
13
13
|
{...props}
|
|
14
14
|
>
|
|
15
|
-
<ScrollAreaPrimitive.Viewport className="
|
|
15
|
+
<ScrollAreaPrimitive.Viewport className="scroll-area-viewport">
|
|
16
16
|
{children}
|
|
17
17
|
</ScrollAreaPrimitive.Viewport>
|
|
18
18
|
<ScrollBar />
|
|
@@ -29,16 +29,13 @@ const ScrollBar = React.forwardRef<
|
|
|
29
29
|
ref={ref}
|
|
30
30
|
orientation={orientation}
|
|
31
31
|
className={cn(
|
|
32
|
-
"
|
|
33
|
-
orientation === "vertical"
|
|
34
|
-
"h-full w-2.5 border-l border-l-transparent p-px",
|
|
35
|
-
orientation === "horizontal" &&
|
|
36
|
-
"h-2.5 flex-col border-t border-t-transparent p-px",
|
|
32
|
+
"scroll-bar",
|
|
33
|
+
orientation === "vertical" ? "scroll-bar--vertical" : "scroll-bar--horizontal",
|
|
37
34
|
className,
|
|
38
35
|
)}
|
|
39
36
|
{...props}
|
|
40
37
|
>
|
|
41
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="
|
|
38
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="scroll-bar-thumb" />
|
|
42
39
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
43
40
|
));
|
|
44
41
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
@@ -102,22 +102,19 @@ export const SearchField = ({
|
|
|
102
102
|
placeholder={placeholder}
|
|
103
103
|
disabled={disabled}
|
|
104
104
|
className={cn(
|
|
105
|
-
"
|
|
106
|
-
isOpen && "
|
|
105
|
+
"search-field-input--focused",
|
|
106
|
+
isOpen && "search-field-input--open",
|
|
107
107
|
)}
|
|
108
108
|
/>
|
|
109
109
|
</div>
|
|
110
110
|
<div className="relative">
|
|
111
111
|
<div
|
|
112
|
-
className={cn(
|
|
113
|
-
"animate-in fade-in-0 absolute top-0 z-10 w-full rounded-xl bg-white outline-none",
|
|
114
|
-
isOpen ? "block" : "hidden",
|
|
115
|
-
)}
|
|
112
|
+
className={cn("search-field-dropdown", isOpen ? "block" : "hidden")}
|
|
116
113
|
>
|
|
117
|
-
<CommandList className="
|
|
114
|
+
<CommandList className="search-field-list">
|
|
118
115
|
{/* {isLoading ? (
|
|
119
116
|
<Skeleton>
|
|
120
|
-
<div className="
|
|
117
|
+
<div className="search-field-skeleton">
|
|
121
118
|
</div>
|
|
122
119
|
</Skeleton>
|
|
123
120
|
) : null} */}
|
|
@@ -136,7 +133,7 @@ export const SearchField = ({
|
|
|
136
133
|
}}
|
|
137
134
|
onSelect={() => handleSelectOption(option)}
|
|
138
135
|
>
|
|
139
|
-
{isSelected ? <Check className="
|
|
136
|
+
{isSelected ? <Check className="icon-4" /> : null}
|
|
140
137
|
{option.label}
|
|
141
138
|
</CommandItem>
|
|
142
139
|
);
|
|
@@ -145,7 +142,7 @@ export const SearchField = ({
|
|
|
145
142
|
) : null}
|
|
146
143
|
|
|
147
144
|
{!isLoading ? (
|
|
148
|
-
<CommandEmpty className="
|
|
145
|
+
<CommandEmpty className="search-field-empty">
|
|
149
146
|
{emptyMessage}
|
|
150
147
|
</CommandEmpty>
|
|
151
148
|
) : null}
|
|
@@ -16,18 +16,15 @@ const SelectTrigger = React.forwardRef<
|
|
|
16
16
|
>(({ className, children, ...props }, ref) => (
|
|
17
17
|
<SelectPrimitive.Trigger
|
|
18
18
|
ref={ref}
|
|
19
|
-
className={cn(
|
|
20
|
-
"group flex h-12 w-full rounded-[6px] border border-gray-200 bg-white p-4 text-gray-800 ring-offset-background placeholder:font-normal placeholder:text-gray-500 focus:outline-none focus:ring-0 data-[state=open]:border-cyan-300 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
21
|
-
className,
|
|
22
|
-
)}
|
|
19
|
+
className={cn("select-trigger", className)}
|
|
23
20
|
{...props}
|
|
24
21
|
>
|
|
25
|
-
<div className="
|
|
26
|
-
<span className="
|
|
22
|
+
<div className="select-trigger-inner">
|
|
23
|
+
<span className="select-trigger-text font-mazzard body-base">
|
|
27
24
|
{children}
|
|
28
25
|
</span>
|
|
29
26
|
<SelectPrimitive.Icon asChild>
|
|
30
|
-
<UtilityChevronDown className="
|
|
27
|
+
<UtilityChevronDown className="select-icon" />
|
|
31
28
|
</SelectPrimitive.Icon>
|
|
32
29
|
</div>
|
|
33
30
|
</SelectPrimitive.Trigger>
|
|
@@ -40,10 +37,7 @@ const SelectScrollUpButton = React.forwardRef<
|
|
|
40
37
|
>(({ className, ...props }, ref) => (
|
|
41
38
|
<SelectPrimitive.ScrollUpButton
|
|
42
39
|
ref={ref}
|
|
43
|
-
className={cn(
|
|
44
|
-
"flex cursor-default items-center justify-center py-1",
|
|
45
|
-
className,
|
|
46
|
-
)}
|
|
40
|
+
className={cn("select-scroll-button", className)}
|
|
47
41
|
{...props}
|
|
48
42
|
>
|
|
49
43
|
<UtilityChevronDown />
|
|
@@ -57,10 +51,7 @@ const SelectScrollDownButton = React.forwardRef<
|
|
|
57
51
|
>(({ className, ...props }, ref) => (
|
|
58
52
|
<SelectPrimitive.ScrollDownButton
|
|
59
53
|
ref={ref}
|
|
60
|
-
className={cn(
|
|
61
|
-
"flex cursor-default items-center justify-center py-1",
|
|
62
|
-
className,
|
|
63
|
-
)}
|
|
54
|
+
className={cn("select-scroll-button", className)}
|
|
64
55
|
{...props}
|
|
65
56
|
>
|
|
66
57
|
<UtilityChevronDown />
|
|
@@ -76,22 +67,12 @@ const SelectContent = React.forwardRef<
|
|
|
76
67
|
<SelectPrimitive.Portal>
|
|
77
68
|
<SelectPrimitive.Content
|
|
78
69
|
ref={ref}
|
|
79
|
-
className={cn(
|
|
80
|
-
"relative z-50 max-h-96 min-w-32 overflow-hidden border-cyan-300 bg-gray-700 text-gray-200 shadow-md 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-[side=bottom]:slide-in-from-top-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-[side=bottom]:-mt-1 data-[side=bottom]:rounded-t-none data-[side=bottom]:rounded-b-[6px] data-[side=top]:border-b-0 data-[side=top]:rounded-t-[6px] data-[side=top]:rounded-b-none data-[side=top]:-mb-1 data-[side=top]:border-t data-[side=bottom]:border-b",
|
|
81
|
-
|
|
82
|
-
className,
|
|
83
|
-
)}
|
|
70
|
+
className={cn("select-content", className)}
|
|
84
71
|
position={position}
|
|
85
72
|
{...props}
|
|
86
73
|
>
|
|
87
74
|
<SelectScrollUpButton />
|
|
88
|
-
<SelectPrimitive.Viewport
|
|
89
|
-
className={cn(
|
|
90
|
-
"",
|
|
91
|
-
position === "popper" &&
|
|
92
|
-
"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)",
|
|
93
|
-
)}
|
|
94
|
-
>
|
|
75
|
+
<SelectPrimitive.Viewport className="select-viewport">
|
|
95
76
|
{children}
|
|
96
77
|
</SelectPrimitive.Viewport>
|
|
97
78
|
<SelectScrollDownButton />
|
|
@@ -106,10 +87,7 @@ const SelectLabel = React.forwardRef<
|
|
|
106
87
|
>(({ className, ...props }, ref) => (
|
|
107
88
|
<SelectPrimitive.Label
|
|
108
89
|
ref={ref}
|
|
109
|
-
className={cn(
|
|
110
|
-
"py-1.5 pl-8 pr-2 text-sm font-semibold font-mazzard",
|
|
111
|
-
className,
|
|
112
|
-
)}
|
|
90
|
+
className={cn("select-label font-mazzard", className)}
|
|
113
91
|
{...props}
|
|
114
92
|
/>
|
|
115
93
|
));
|
|
@@ -121,10 +99,7 @@ const SelectItem = React.forwardRef<
|
|
|
121
99
|
>(({ className, children, ...props }, ref) => (
|
|
122
100
|
<SelectPrimitive.Item
|
|
123
101
|
ref={ref}
|
|
124
|
-
className={cn(
|
|
125
|
-
"relative flex h-12 w-full cursor-default select-none items-center border-x border-cyan-300 px-4 outline-none focus:bg-[rgba(0,0,0,0.2)] data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
126
|
-
className,
|
|
127
|
-
)}
|
|
102
|
+
className={cn("select-item", className)}
|
|
128
103
|
{...props}
|
|
129
104
|
>
|
|
130
105
|
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
@@ -138,7 +113,7 @@ const SelectSeparator = React.forwardRef<
|
|
|
138
113
|
>(({ className, ...props }, ref) => (
|
|
139
114
|
<SelectPrimitive.Separator
|
|
140
115
|
ref={ref}
|
|
141
|
-
className={cn("-
|
|
116
|
+
className={cn("select-separator", className)}
|
|
142
117
|
{...props}
|
|
143
118
|
/>
|
|
144
119
|
));
|
|
@@ -16,8 +16,8 @@ const Separator = React.forwardRef<
|
|
|
16
16
|
decorative={decorative}
|
|
17
17
|
orientation={orientation}
|
|
18
18
|
className={cn(
|
|
19
|
-
"
|
|
20
|
-
orientation === "horizontal" ? "
|
|
19
|
+
"separator",
|
|
20
|
+
orientation === "horizontal" ? "separator--horizontal" : "separator--vertical",
|
|
21
21
|
className,
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|
|
@@ -18,10 +18,7 @@ const SheetOverlay = React.forwardRef<
|
|
|
18
18
|
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
|
|
19
19
|
>(({ className, ...props }, ref) => (
|
|
20
20
|
<SheetPrimitive.Overlay
|
|
21
|
-
className={cn(
|
|
22
|
-
"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",
|
|
23
|
-
className,
|
|
24
|
-
)}
|
|
21
|
+
className={cn("sheet-overlay", className)}
|
|
25
22
|
{...props}
|
|
26
23
|
ref={ref}
|
|
27
24
|
/>
|
|
@@ -29,16 +26,14 @@ const SheetOverlay = React.forwardRef<
|
|
|
29
26
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
30
27
|
|
|
31
28
|
const sheetVariants = cva(
|
|
32
|
-
"
|
|
29
|
+
"sheet-content",
|
|
33
30
|
{
|
|
34
31
|
variants: {
|
|
35
32
|
side: {
|
|
36
|
-
top: "
|
|
37
|
-
bottom:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
right:
|
|
41
|
-
"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
33
|
+
top: "sheet-content--top",
|
|
34
|
+
bottom: "sheet-content--bottom",
|
|
35
|
+
left: "sheet-content--left",
|
|
36
|
+
right: "sheet-content--right",
|
|
42
37
|
},
|
|
43
38
|
},
|
|
44
39
|
defaultVariants: {
|
|
@@ -63,8 +58,8 @@ const SheetContent = React.forwardRef<
|
|
|
63
58
|
{...props}
|
|
64
59
|
>
|
|
65
60
|
{children}
|
|
66
|
-
<SheetPrimitive.Close className="
|
|
67
|
-
<X className="
|
|
61
|
+
<SheetPrimitive.Close className="sheet-close">
|
|
62
|
+
<X className="icon-4" />
|
|
68
63
|
<span className="sr-only">Close</span>
|
|
69
64
|
</SheetPrimitive.Close>
|
|
70
65
|
</SheetPrimitive.Content>
|
|
@@ -77,10 +72,7 @@ const SheetHeader = ({
|
|
|
77
72
|
...props
|
|
78
73
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
79
74
|
<div
|
|
80
|
-
className={cn(
|
|
81
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
82
|
-
className,
|
|
83
|
-
)}
|
|
75
|
+
className={cn("sheet-header", className)}
|
|
84
76
|
{...props}
|
|
85
77
|
/>
|
|
86
78
|
);
|
|
@@ -91,10 +83,7 @@ const SheetFooter = ({
|
|
|
91
83
|
...props
|
|
92
84
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
93
85
|
<div
|
|
94
|
-
className={cn(
|
|
95
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
96
|
-
className,
|
|
97
|
-
)}
|
|
86
|
+
className={cn("sheet-footer", className)}
|
|
98
87
|
{...props}
|
|
99
88
|
/>
|
|
100
89
|
);
|
|
@@ -106,7 +95,7 @@ const SheetTitle = React.forwardRef<
|
|
|
106
95
|
>(({ className, ...props }, ref) => (
|
|
107
96
|
<SheetPrimitive.Title
|
|
108
97
|
ref={ref}
|
|
109
|
-
className={cn("
|
|
98
|
+
className={cn("sheet-title", className)}
|
|
110
99
|
{...props}
|
|
111
100
|
/>
|
|
112
101
|
));
|
|
@@ -118,7 +107,7 @@ const SheetDescription = React.forwardRef<
|
|
|
118
107
|
>(({ className, ...props }, ref) => (
|
|
119
108
|
<SheetPrimitive.Description
|
|
120
109
|
ref={ref}
|
|
121
|
-
className={cn("
|
|
110
|
+
className={cn("sheet-description", className)}
|
|
122
111
|
{...props}
|
|
123
112
|
/>
|
|
124
113
|
));
|