create-strayl-web-app 1.0.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/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -0
- package/template/README.md +290 -0
- package/template/components.json +24 -0
- package/template/package.json +56 -0
- package/template/public/favicon.ico +0 -0
- package/template/public/google-logo.svg +6 -0
- package/template/public/logo-dark.ico +0 -0
- package/template/public/logo-dark.webp +0 -0
- package/template/public/logo-light.ico +0 -0
- package/template/public/logo-light.webp +0 -0
- package/template/public/manifest.json +16 -0
- package/template/public/robots.txt +3 -0
- package/template/src/components/Header.tsx +76 -0
- package/template/src/components/language-switcher.tsx +38 -0
- package/template/src/components/theme-provider.tsx +14 -0
- package/template/src/components/themed-logo.tsx +44 -0
- package/template/src/components/ui/accordion.tsx +69 -0
- package/template/src/components/ui/alert-dialog.tsx +169 -0
- package/template/src/components/ui/alert.tsx +80 -0
- package/template/src/components/ui/autocomplete.tsx +301 -0
- package/template/src/components/ui/avatar.tsx +46 -0
- package/template/src/components/ui/badge.tsx +60 -0
- package/template/src/components/ui/breadcrumb.tsx +112 -0
- package/template/src/components/ui/button.tsx +73 -0
- package/template/src/components/ui/card.tsx +244 -0
- package/template/src/components/ui/checkbox-group.tsx +16 -0
- package/template/src/components/ui/checkbox.tsx +60 -0
- package/template/src/components/ui/collapsible.tsx +45 -0
- package/template/src/components/ui/combobox.tsx +415 -0
- package/template/src/components/ui/command.tsx +264 -0
- package/template/src/components/ui/dialog.tsx +196 -0
- package/template/src/components/ui/empty.tsx +127 -0
- package/template/src/components/ui/field.tsx +74 -0
- package/template/src/components/ui/fieldset.tsx +29 -0
- package/template/src/components/ui/form.tsx +17 -0
- package/template/src/components/ui/frame.tsx +82 -0
- package/template/src/components/ui/group.tsx +97 -0
- package/template/src/components/ui/input-group.tsx +101 -0
- package/template/src/components/ui/input.tsx +66 -0
- package/template/src/components/ui/kbd.tsx +28 -0
- package/template/src/components/ui/label.tsx +28 -0
- package/template/src/components/ui/menu.tsx +310 -0
- package/template/src/components/ui/meter.tsx +67 -0
- package/template/src/components/ui/number-field.tsx +160 -0
- package/template/src/components/ui/pagination.tsx +136 -0
- package/template/src/components/ui/popover.tsx +104 -0
- package/template/src/components/ui/preview-card.tsx +55 -0
- package/template/src/components/ui/progress.tsx +81 -0
- package/template/src/components/ui/radio-group.tsx +36 -0
- package/template/src/components/ui/scroll-area.tsx +64 -0
- package/template/src/components/ui/select.tsx +180 -0
- package/template/src/components/ui/separator.tsx +23 -0
- package/template/src/components/ui/sheet.tsx +203 -0
- package/template/src/components/ui/sidebar.tsx +743 -0
- package/template/src/components/ui/skeleton.tsx +16 -0
- package/template/src/components/ui/slider.tsx +74 -0
- package/template/src/components/ui/spinner.tsx +18 -0
- package/template/src/components/ui/switch.tsx +27 -0
- package/template/src/components/ui/table.tsx +126 -0
- package/template/src/components/ui/tabs.tsx +87 -0
- package/template/src/components/ui/textarea.tsx +51 -0
- package/template/src/components/ui/toast.tsx +269 -0
- package/template/src/components/ui/toggle-group.tsx +102 -0
- package/template/src/components/ui/toggle.tsx +45 -0
- package/template/src/components/ui/toolbar.tsx +83 -0
- package/template/src/components/ui/tooltip.tsx +65 -0
- package/template/src/hooks/use-mobile.ts +21 -0
- package/template/src/lib/i18n.ts +70 -0
- package/template/src/lib/utils.ts +6 -0
- package/template/src/routeTree.gen.ts +68 -0
- package/template/src/router.tsx +17 -0
- package/template/src/routes/__root.tsx +62 -0
- package/template/src/routes/index.tsx +71 -0
- package/template/src/styles.css +121 -0
- package/template/tsconfig.json +28 -0
- package/template/vite.config.ts +30 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
4
|
+
import {
|
|
5
|
+
ChevronDownIcon,
|
|
6
|
+
ChevronsUpDownIcon,
|
|
7
|
+
ChevronUpIcon,
|
|
8
|
+
} from "lucide-react";
|
|
9
|
+
|
|
10
|
+
import { cn } from "@/lib/utils";
|
|
11
|
+
|
|
12
|
+
const Select = SelectPrimitive.Root;
|
|
13
|
+
|
|
14
|
+
function SelectTrigger({
|
|
15
|
+
className,
|
|
16
|
+
size = "default",
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}: SelectPrimitive.Trigger.Props & {
|
|
20
|
+
size?: "sm" | "default" | "lg";
|
|
21
|
+
}) {
|
|
22
|
+
return (
|
|
23
|
+
<SelectPrimitive.Trigger
|
|
24
|
+
className={cn(
|
|
25
|
+
"relative inline-flex min-h-9 w-full min-w-36 select-none items-center justify-center gap-2 rounded-lg border border-input bg-background not-dark:bg-clip-padding px-[calc(--spacing(3)-1px)] text-left text-base text-foreground shadow-xs/5 outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none",
|
|
26
|
+
size === "sm" &&
|
|
27
|
+
"min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7",
|
|
28
|
+
size === "lg" && "min-h-10 sm:min-h-9",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
data-slot="select-trigger"
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
<SelectPrimitive.Icon data-slot="select-icon">
|
|
36
|
+
<ChevronsUpDownIcon className="-me-1 size-4.5 opacity-80 sm:size-4" />
|
|
37
|
+
</SelectPrimitive.Icon>
|
|
38
|
+
</SelectPrimitive.Trigger>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
43
|
+
return (
|
|
44
|
+
<SelectPrimitive.Value
|
|
45
|
+
className={cn(
|
|
46
|
+
"flex-1 truncate data-placeholder:text-muted-foreground",
|
|
47
|
+
className,
|
|
48
|
+
)}
|
|
49
|
+
data-slot="select-value"
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function SelectPopup({
|
|
56
|
+
className,
|
|
57
|
+
children,
|
|
58
|
+
sideOffset = 4,
|
|
59
|
+
alignItemWithTrigger = true,
|
|
60
|
+
...props
|
|
61
|
+
}: SelectPrimitive.Popup.Props & {
|
|
62
|
+
sideOffset?: SelectPrimitive.Positioner.Props["sideOffset"];
|
|
63
|
+
alignItemWithTrigger?: SelectPrimitive.Positioner.Props["alignItemWithTrigger"];
|
|
64
|
+
}) {
|
|
65
|
+
return (
|
|
66
|
+
<SelectPrimitive.Portal>
|
|
67
|
+
<SelectPrimitive.Positioner
|
|
68
|
+
alignItemWithTrigger={alignItemWithTrigger}
|
|
69
|
+
className="z-50 select-none"
|
|
70
|
+
data-slot="select-positioner"
|
|
71
|
+
sideOffset={sideOffset}
|
|
72
|
+
>
|
|
73
|
+
<SelectPrimitive.Popup
|
|
74
|
+
className="origin-(--transform-origin) text-foreground"
|
|
75
|
+
data-slot="select-popup"
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
<SelectPrimitive.ScrollUpArrow
|
|
79
|
+
className="top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover"
|
|
80
|
+
data-slot="select-scroll-up-arrow"
|
|
81
|
+
>
|
|
82
|
+
<ChevronUpIcon className="relative size-4.5 sm:size-4" />
|
|
83
|
+
</SelectPrimitive.ScrollUpArrow>
|
|
84
|
+
<div className="relative h-full rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]">
|
|
85
|
+
<SelectPrimitive.List
|
|
86
|
+
className={cn(
|
|
87
|
+
"max-h-(--available-height) min-w-(--anchor-width) overflow-y-auto p-1",
|
|
88
|
+
className,
|
|
89
|
+
)}
|
|
90
|
+
data-slot="select-list"
|
|
91
|
+
>
|
|
92
|
+
{children}
|
|
93
|
+
</SelectPrimitive.List>
|
|
94
|
+
</div>
|
|
95
|
+
<SelectPrimitive.ScrollDownArrow
|
|
96
|
+
className="bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover"
|
|
97
|
+
data-slot="select-scroll-down-arrow"
|
|
98
|
+
>
|
|
99
|
+
<ChevronDownIcon className="relative size-4.5 sm:size-4" />
|
|
100
|
+
</SelectPrimitive.ScrollDownArrow>
|
|
101
|
+
</SelectPrimitive.Popup>
|
|
102
|
+
</SelectPrimitive.Positioner>
|
|
103
|
+
</SelectPrimitive.Portal>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function SelectItem({
|
|
108
|
+
className,
|
|
109
|
+
children,
|
|
110
|
+
...props
|
|
111
|
+
}: SelectPrimitive.Item.Props) {
|
|
112
|
+
return (
|
|
113
|
+
<SelectPrimitive.Item
|
|
114
|
+
className={cn(
|
|
115
|
+
"grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
116
|
+
className,
|
|
117
|
+
)}
|
|
118
|
+
data-slot="select-item"
|
|
119
|
+
{...props}
|
|
120
|
+
>
|
|
121
|
+
<SelectPrimitive.ItemIndicator className="col-start-1">
|
|
122
|
+
<svg
|
|
123
|
+
fill="none"
|
|
124
|
+
height="24"
|
|
125
|
+
stroke="currentColor"
|
|
126
|
+
strokeLinecap="round"
|
|
127
|
+
strokeLinejoin="round"
|
|
128
|
+
strokeWidth="2"
|
|
129
|
+
viewBox="0 0 24 24"
|
|
130
|
+
width="24"
|
|
131
|
+
xmlns="http://www.w3.org/1500/svg"
|
|
132
|
+
>
|
|
133
|
+
<path d="M5.252 12.7 10.2 18.63 18.748 5.37" />
|
|
134
|
+
</svg>
|
|
135
|
+
</SelectPrimitive.ItemIndicator>
|
|
136
|
+
<SelectPrimitive.ItemText className="col-start-2 min-w-0">
|
|
137
|
+
{children}
|
|
138
|
+
</SelectPrimitive.ItemText>
|
|
139
|
+
</SelectPrimitive.Item>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function SelectSeparator({
|
|
144
|
+
className,
|
|
145
|
+
...props
|
|
146
|
+
}: SelectPrimitive.Separator.Props) {
|
|
147
|
+
return (
|
|
148
|
+
<SelectPrimitive.Separator
|
|
149
|
+
className={cn("mx-2 my-1 h-px bg-border", className)}
|
|
150
|
+
data-slot="select-separator"
|
|
151
|
+
{...props}
|
|
152
|
+
/>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function SelectGroup(props: SelectPrimitive.Group.Props) {
|
|
157
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function SelectGroupLabel(props: SelectPrimitive.GroupLabel.Props) {
|
|
161
|
+
return (
|
|
162
|
+
<SelectPrimitive.GroupLabel
|
|
163
|
+
className="px-2 py-1.5 font-medium text-muted-foreground text-xs"
|
|
164
|
+
data-slot="select-group-label"
|
|
165
|
+
{...props}
|
|
166
|
+
/>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export {
|
|
171
|
+
Select,
|
|
172
|
+
SelectTrigger,
|
|
173
|
+
SelectValue,
|
|
174
|
+
SelectPopup,
|
|
175
|
+
SelectPopup as SelectContent,
|
|
176
|
+
SelectItem,
|
|
177
|
+
SelectSeparator,
|
|
178
|
+
SelectGroup,
|
|
179
|
+
SelectGroupLabel,
|
|
180
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
function Separator({
|
|
6
|
+
className,
|
|
7
|
+
orientation = "horizontal",
|
|
8
|
+
...props
|
|
9
|
+
}: SeparatorPrimitive.Props) {
|
|
10
|
+
return (
|
|
11
|
+
<SeparatorPrimitive
|
|
12
|
+
className={cn(
|
|
13
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
data-slot="separator"
|
|
17
|
+
orientation={orientation}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Separator };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
|
+
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
8
|
+
|
|
9
|
+
const Sheet = SheetPrimitive.Root;
|
|
10
|
+
|
|
11
|
+
const SheetPortal = SheetPrimitive.Portal;
|
|
12
|
+
|
|
13
|
+
function SheetTrigger(props: SheetPrimitive.Trigger.Props) {
|
|
14
|
+
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function SheetClose(props: SheetPrimitive.Close.Props) {
|
|
18
|
+
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function SheetBackdrop({ className, ...props }: SheetPrimitive.Backdrop.Props) {
|
|
22
|
+
return (
|
|
23
|
+
<SheetPrimitive.Backdrop
|
|
24
|
+
className={cn(
|
|
25
|
+
"fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
data-slot="sheet-backdrop"
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function SheetViewport({
|
|
35
|
+
className,
|
|
36
|
+
side,
|
|
37
|
+
variant = "default",
|
|
38
|
+
...props
|
|
39
|
+
}: SheetPrimitive.Viewport.Props & {
|
|
40
|
+
side?: "right" | "left" | "top" | "bottom";
|
|
41
|
+
variant?: "default" | "inset";
|
|
42
|
+
}) {
|
|
43
|
+
return (
|
|
44
|
+
<SheetPrimitive.Viewport
|
|
45
|
+
className={cn(
|
|
46
|
+
"fixed inset-0 z-50 grid",
|
|
47
|
+
side === "bottom" && "grid grid-rows-[1fr_auto] pt-12",
|
|
48
|
+
side === "top" && "grid grid-rows-[auto_1fr] pb-12",
|
|
49
|
+
side === "left" && "flex justify-start",
|
|
50
|
+
side === "right" && "flex justify-end",
|
|
51
|
+
variant === "inset" && "sm:p-4",
|
|
52
|
+
)}
|
|
53
|
+
data-slot="sheet-viewport"
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function SheetPopup({
|
|
60
|
+
className,
|
|
61
|
+
children,
|
|
62
|
+
showCloseButton = true,
|
|
63
|
+
side = "right",
|
|
64
|
+
variant = "default",
|
|
65
|
+
...props
|
|
66
|
+
}: SheetPrimitive.Popup.Props & {
|
|
67
|
+
showCloseButton?: boolean;
|
|
68
|
+
side?: "right" | "left" | "top" | "bottom";
|
|
69
|
+
variant?: "default" | "inset";
|
|
70
|
+
}) {
|
|
71
|
+
return (
|
|
72
|
+
<SheetPortal>
|
|
73
|
+
<SheetBackdrop />
|
|
74
|
+
<SheetViewport side={side} variant={variant}>
|
|
75
|
+
<SheetPrimitive.Popup
|
|
76
|
+
className={cn(
|
|
77
|
+
"relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 transition-[opacity,translate] duration-200 ease-in-out will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/6%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:before:hidden dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
78
|
+
side === "bottom" &&
|
|
79
|
+
"row-start-2 border-t data-ending-style:translate-y-8 data-starting-style:translate-y-8",
|
|
80
|
+
side === "top" &&
|
|
81
|
+
"data-ending-style:-translate-y-8 data-starting-style:-translate-y-8 border-b",
|
|
82
|
+
side === "left" &&
|
|
83
|
+
"data-ending-style:-translate-x-8 data-starting-style:-translate-x-8 w-[calc(100%-(--spacing(12)))] max-w-md border-e",
|
|
84
|
+
side === "right" &&
|
|
85
|
+
"col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s data-ending-style:translate-x-8 data-starting-style:translate-x-8",
|
|
86
|
+
variant === "inset" &&
|
|
87
|
+
"before:hidden sm:rounded-2xl sm:border sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=sheet-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]",
|
|
88
|
+
className,
|
|
89
|
+
)}
|
|
90
|
+
data-slot="sheet-popup"
|
|
91
|
+
{...props}
|
|
92
|
+
>
|
|
93
|
+
{children}
|
|
94
|
+
{showCloseButton && (
|
|
95
|
+
<SheetPrimitive.Close
|
|
96
|
+
aria-label="Close"
|
|
97
|
+
className="absolute end-2 top-2"
|
|
98
|
+
render={<Button size="icon" variant="ghost" />}
|
|
99
|
+
>
|
|
100
|
+
<XIcon />
|
|
101
|
+
</SheetPrimitive.Close>
|
|
102
|
+
)}
|
|
103
|
+
</SheetPrimitive.Popup>
|
|
104
|
+
</SheetViewport>
|
|
105
|
+
</SheetPortal>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
110
|
+
return (
|
|
111
|
+
<div
|
|
112
|
+
className={cn(
|
|
113
|
+
"flex flex-col gap-2 p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pb-3 max-sm:pb-4",
|
|
114
|
+
className,
|
|
115
|
+
)}
|
|
116
|
+
data-slot="sheet-header"
|
|
117
|
+
{...props}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function SheetFooter({
|
|
123
|
+
className,
|
|
124
|
+
variant = "default",
|
|
125
|
+
...props
|
|
126
|
+
}: React.ComponentProps<"div"> & {
|
|
127
|
+
variant?: "default" | "bare";
|
|
128
|
+
}) {
|
|
129
|
+
return (
|
|
130
|
+
<div
|
|
131
|
+
className={cn(
|
|
132
|
+
"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end",
|
|
133
|
+
variant === "default" && "border-t bg-muted/72 py-4",
|
|
134
|
+
variant === "bare" &&
|
|
135
|
+
"in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pt-3 pt-4 pb-6",
|
|
136
|
+
className,
|
|
137
|
+
)}
|
|
138
|
+
data-slot="sheet-footer"
|
|
139
|
+
{...props}
|
|
140
|
+
/>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
|
|
145
|
+
return (
|
|
146
|
+
<SheetPrimitive.Title
|
|
147
|
+
className={cn(
|
|
148
|
+
"font-heading font-semibold text-xl leading-none",
|
|
149
|
+
className,
|
|
150
|
+
)}
|
|
151
|
+
data-slot="sheet-title"
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function SheetDescription({
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}: SheetPrimitive.Description.Props) {
|
|
161
|
+
return (
|
|
162
|
+
<SheetPrimitive.Description
|
|
163
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
164
|
+
data-slot="sheet-description"
|
|
165
|
+
{...props}
|
|
166
|
+
/>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function SheetPanel({
|
|
171
|
+
className,
|
|
172
|
+
scrollFade = true,
|
|
173
|
+
...props
|
|
174
|
+
}: React.ComponentProps<"div"> & { scrollFade?: boolean }) {
|
|
175
|
+
return (
|
|
176
|
+
<ScrollArea scrollFade={scrollFade}>
|
|
177
|
+
<div
|
|
178
|
+
className={cn(
|
|
179
|
+
"p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-header])]:pt-1 in-[[data-slot=sheet-popup]:has([data-slot=sheet-footer]:not(.border-t))]:pb-1",
|
|
180
|
+
className,
|
|
181
|
+
)}
|
|
182
|
+
data-slot="sheet-panel"
|
|
183
|
+
{...props}
|
|
184
|
+
/>
|
|
185
|
+
</ScrollArea>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export {
|
|
190
|
+
Sheet,
|
|
191
|
+
SheetTrigger,
|
|
192
|
+
SheetPortal,
|
|
193
|
+
SheetClose,
|
|
194
|
+
SheetBackdrop,
|
|
195
|
+
SheetBackdrop as SheetOverlay,
|
|
196
|
+
SheetPopup,
|
|
197
|
+
SheetPopup as SheetContent,
|
|
198
|
+
SheetHeader,
|
|
199
|
+
SheetFooter,
|
|
200
|
+
SheetTitle,
|
|
201
|
+
SheetDescription,
|
|
202
|
+
SheetPanel,
|
|
203
|
+
};
|