create-croissant 0.1.39 → 0.1.41
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 +5 -5
- package/package.json +7 -10
- package/template/.oxlintignore +11 -0
- package/template/README.md +6 -6
- package/template/apps/desktop/README.md +1 -1
- package/template/apps/desktop/electron-builder.yml +6 -6
- package/template/apps/desktop/electron.vite.config.ts +8 -8
- package/template/apps/desktop/package.json +4 -13
- package/template/apps/desktop/src/main/index.ts +32 -32
- package/template/apps/desktop/src/preload/index.d.ts +3 -3
- package/template/apps/desktop/src/preload/index.ts +8 -8
- package/template/apps/desktop/src/renderer/src/App.tsx +5 -5
- package/template/apps/desktop/src/renderer/src/assets/base.css +4 -4
- package/template/apps/desktop/src/renderer/src/assets/main.css +3 -3
- package/template/apps/desktop/src/renderer/src/components/Versions.tsx +4 -4
- package/template/apps/desktop/src/renderer/src/main.tsx +7 -7
- package/template/apps/desktop/tsconfig.json +1 -4
- package/template/apps/desktop/tsconfig.node.json +1 -1
- package/template/apps/desktop/tsconfig.web.json +4 -11
- package/template/apps/mobile/app/(tabs)/_layout.tsx +11 -10
- package/template/apps/mobile/app/(tabs)/explore.tsx +29 -27
- package/template/apps/mobile/app/(tabs)/index.tsx +25 -24
- package/template/apps/mobile/app/_layout.tsx +8 -8
- package/template/apps/mobile/app/modal.tsx +6 -6
- package/template/apps/mobile/components/external-link.tsx +5 -5
- package/template/apps/mobile/components/haptic-tab.tsx +4 -4
- package/template/apps/mobile/components/hello-wave.tsx +5 -4
- package/template/apps/mobile/components/parallax-scroll-view.tsx +15 -13
- package/template/apps/mobile/components/themed-text.tsx +14 -14
- package/template/apps/mobile/components/themed-view.tsx +3 -3
- package/template/apps/mobile/components/ui/collapsible.tsx +14 -13
- package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +4 -4
- package/template/apps/mobile/components/ui/icon-symbol.tsx +9 -9
- package/template/apps/mobile/constants/theme.ts +19 -19
- package/template/apps/mobile/hooks/use-color-scheme.ts +1 -1
- package/template/apps/mobile/hooks/use-color-scheme.web.ts +3 -3
- package/template/apps/mobile/hooks/use-theme-color.ts +4 -4
- package/template/apps/mobile/package.json +3 -6
- package/template/apps/mobile/scripts/reset-project.js +2 -2
- package/template/apps/mobile/tsconfig.json +2 -9
- package/template/apps/platform/drizzle.config.ts +5 -5
- package/template/apps/platform/package.json +2 -6
- package/template/apps/platform/src/components/app-sidebar.tsx +60 -69
- package/template/apps/platform/src/components/login-form.tsx +32 -39
- package/template/apps/platform/src/components/search-form.tsx +5 -13
- package/template/apps/platform/src/components/signup-form.tsx +39 -49
- package/template/apps/platform/src/components/version-switcher.tsx +11 -21
- package/template/apps/platform/src/lib/auth-utils.ts +12 -14
- package/template/apps/platform/src/lib/orpc.ts +17 -17
- package/template/apps/platform/src/routeTree.gen.ts +264 -267
- package/template/apps/platform/src/router.tsx +5 -5
- package/template/apps/platform/src/routes/__root.tsx +13 -15
- package/template/apps/platform/src/routes/_auth/account.tsx +61 -50
- package/template/apps/platform/src/routes/_auth/dashboard.tsx +17 -17
- package/template/apps/platform/src/routes/_auth/examples/client-orpc-auth.tsx +13 -13
- package/template/apps/platform/src/routes/_auth/examples/ssr-orpc-auth.tsx +17 -17
- package/template/apps/platform/src/routes/_auth.tsx +5 -5
- package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +108 -88
- package/template/apps/platform/src/routes/_public/examples/isr.tsx +14 -14
- package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +92 -75
- package/template/apps/platform/src/routes/_public/index.tsx +22 -19
- package/template/apps/platform/src/routes/_public/login.tsx +4 -4
- package/template/apps/platform/src/routes/_public/signup.tsx +6 -5
- package/template/apps/platform/src/routes/_public.tsx +5 -5
- package/template/apps/platform/src/routes/api/auth/$.ts +13 -13
- package/template/apps/platform/src/routes/api/rpc.$.ts +13 -13
- package/template/apps/platform/tsconfig.json +1 -1
- package/template/apps/platform/vite.config.ts +8 -8
- package/template/docker-compose.yml +1 -1
- package/template/package.json +24 -22
- package/template/packages/auth/package.json +8 -12
- package/template/packages/auth/src/lib/auth.ts +1 -1
- package/template/packages/auth/tsconfig.json +1 -1
- package/template/packages/db/package.json +6 -10
- package/template/packages/db/src/index.ts +4 -4
- package/template/packages/db/src/schema.ts +2 -2
- package/template/packages/db/tsconfig.json +1 -1
- package/template/packages/orpc/package.json +6 -10
- package/template/packages/orpc/src/lib/planets.ts +39 -43
- package/template/packages/orpc/src/lib/router.ts +15 -15
- package/template/packages/orpc/tsconfig.json +1 -1
- package/template/packages/ui/package.json +8 -12
- package/template/packages/ui/src/components/accordion.tsx +20 -22
- package/template/packages/ui/src/components/alert-dialog.tsx +31 -56
- package/template/packages/ui/src/components/alert.tsx +15 -23
- package/template/packages/ui/src/components/aspect-ratio.tsx +3 -3
- package/template/packages/ui/src/components/avatar.tsx +19 -35
- package/template/packages/ui/src/components/badge.tsx +13 -17
- package/template/packages/ui/src/components/breadcrumb.tsx +22 -44
- package/template/packages/ui/src/components/button-group.tsx +16 -25
- package/template/packages/ui/src/components/button.tsx +8 -9
- package/template/packages/ui/src/components/calendar.tsx +43 -82
- package/template/packages/ui/src/components/card.tsx +15 -26
- package/template/packages/ui/src/components/carousel.tsx +70 -78
- package/template/packages/ui/src/components/chart.tsx +84 -117
- package/template/packages/ui/src/components/checkbox.tsx +8 -9
- package/template/packages/ui/src/components/collapsible.tsx +5 -9
- package/template/packages/ui/src/components/combobox.tsx +44 -68
- package/template/packages/ui/src/components/command.tsx +32 -47
- package/template/packages/ui/src/components/context-menu.tsx +45 -71
- package/template/packages/ui/src/components/dialog.tsx +29 -51
- package/template/packages/ui/src/components/direction.tsx +1 -4
- package/template/packages/ui/src/components/drawer.tsx +24 -38
- package/template/packages/ui/src/components/dropdown-menu.tsx +45 -55
- package/template/packages/ui/src/components/empty.tsx +16 -27
- package/template/packages/ui/src/components/field.tsx +49 -63
- package/template/packages/ui/src/components/hover-card.tsx +9 -14
- package/template/packages/ui/src/components/input-group.tsx +40 -52
- package/template/packages/ui/src/components/input-otp.tsx +17 -18
- package/template/packages/ui/src/components/input.tsx +6 -6
- package/template/packages/ui/src/components/item.tsx +31 -44
- package/template/packages/ui/src/components/kbd.tsx +5 -5
- package/template/packages/ui/src/components/label.tsx +6 -6
- package/template/packages/ui/src/components/menubar.tsx +51 -64
- package/template/packages/ui/src/components/mode-toggle.tsx +9 -15
- package/template/packages/ui/src/components/native-select.tsx +18 -24
- package/template/packages/ui/src/components/navigation-menu.tsx +28 -35
- package/template/packages/ui/src/components/pagination.tsx +19 -31
- package/template/packages/ui/src/components/popover.tsx +13 -26
- package/template/packages/ui/src/components/progress.tsx +13 -30
- package/template/packages/ui/src/components/radio-group.tsx +7 -7
- package/template/packages/ui/src/components/resizable.tsx +12 -20
- package/template/packages/ui/src/components/scroll-area.tsx +8 -12
- package/template/packages/ui/src/components/select.tsx +31 -42
- package/template/packages/ui/src/components/separator.tsx +6 -10
- package/template/packages/ui/src/components/sheet.tsx +25 -38
- package/template/packages/ui/src/components/sidebar.tsx +137 -170
- package/template/packages/ui/src/components/skeleton.tsx +3 -3
- package/template/packages/ui/src/components/slider.tsx +5 -5
- package/template/packages/ui/src/components/sonner.tsx +20 -24
- package/template/packages/ui/src/components/spinner.tsx +10 -5
- package/template/packages/ui/src/components/switch.tsx +6 -6
- package/template/packages/ui/src/components/table.tsx +18 -45
- package/template/packages/ui/src/components/tabs.tsx +14 -22
- package/template/packages/ui/src/components/textarea.tsx +5 -5
- package/template/packages/ui/src/components/theme-provider.tsx +43 -48
- package/template/packages/ui/src/components/toggle-group.tsx +18 -20
- package/template/packages/ui/src/components/toggle.tsx +9 -10
- package/template/packages/ui/src/components/tooltip.tsx +10 -22
- package/template/packages/ui/src/hooks/use-mobile.ts +11 -11
- package/template/packages/ui/src/lib/utils.ts +4 -4
- package/template/packages/ui/src/styles/globals.css +106 -106
- package/template/packages/ui/tsconfig.json +1 -1
- package/template/turbo.json +15 -6
- package/template/.prettierignore +0 -10
- package/template/apps/desktop/.prettierignore +0 -6
- package/template/apps/desktop/eslint.config.ts +0 -11
- package/template/apps/desktop/prettier.config.ts +0 -3
- package/template/apps/mobile/eslint.config.js +0 -10
- package/template/apps/platform/eslint.config.ts +0 -11
- package/template/apps/platform/prettier.config.ts +0 -3
- package/template/packages/auth/eslint.config.ts +0 -3
- package/template/packages/auth/prettier.config.ts +0 -3
- package/template/packages/config-eslint/index.ts +0 -24
- package/template/packages/config-eslint/package.json +0 -11
- package/template/packages/config-prettier/index.ts +0 -14
- package/template/packages/config-prettier/package.json +0 -7
- package/template/packages/db/eslint.config.ts +0 -3
- package/template/packages/db/prettier.config.ts +0 -3
- package/template/packages/orpc/eslint.config.ts +0 -3
- package/template/packages/orpc/prettier.config.ts +0 -3
- package/template/packages/ui/eslint.config.ts +0 -3
- package/template/packages/ui/prettier.config.ts +0 -3
- package/template/prettier.config.ts +0 -15
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
3
|
|
|
4
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
4
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
5
5
|
|
|
6
6
|
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
7
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props}
|
|
7
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
11
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props}
|
|
11
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function PopoverContent({
|
|
@@ -19,10 +19,7 @@ function PopoverContent({
|
|
|
19
19
|
sideOffset = 4,
|
|
20
20
|
...props
|
|
21
21
|
}: PopoverPrimitive.Popup.Props &
|
|
22
|
-
Pick<
|
|
23
|
-
PopoverPrimitive.Positioner.Props,
|
|
24
|
-
"align" | "alignOffset" | "side" | "sideOffset"
|
|
25
|
-
>) {
|
|
22
|
+
Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
|
|
26
23
|
return (
|
|
27
24
|
<PopoverPrimitive.Portal>
|
|
28
25
|
<PopoverPrimitive.Positioner
|
|
@@ -36,13 +33,13 @@ function PopoverContent({
|
|
|
36
33
|
data-slot="popover-content"
|
|
37
34
|
className={cn(
|
|
38
35
|
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
39
|
-
className
|
|
36
|
+
className,
|
|
40
37
|
)}
|
|
41
38
|
{...props}
|
|
42
39
|
/>
|
|
43
40
|
</PopoverPrimitive.Positioner>
|
|
44
41
|
</PopoverPrimitive.Portal>
|
|
45
|
-
)
|
|
42
|
+
);
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -52,7 +49,7 @@ function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
52
49
|
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
53
50
|
{...props}
|
|
54
51
|
/>
|
|
55
|
-
)
|
|
52
|
+
);
|
|
56
53
|
}
|
|
57
54
|
|
|
58
55
|
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
@@ -62,27 +59,17 @@ function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
|
62
59
|
className={cn("font-medium", className)}
|
|
63
60
|
{...props}
|
|
64
61
|
/>
|
|
65
|
-
)
|
|
62
|
+
);
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
function PopoverDescription({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: PopoverPrimitive.Description.Props) {
|
|
65
|
+
function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {
|
|
72
66
|
return (
|
|
73
67
|
<PopoverPrimitive.Description
|
|
74
68
|
data-slot="popover-description"
|
|
75
69
|
className={cn("text-muted-foreground", className)}
|
|
76
70
|
{...props}
|
|
77
71
|
/>
|
|
78
|
-
)
|
|
72
|
+
);
|
|
79
73
|
}
|
|
80
74
|
|
|
81
|
-
export {
|
|
82
|
-
Popover,
|
|
83
|
-
PopoverContent,
|
|
84
|
-
PopoverDescription,
|
|
85
|
-
PopoverHeader,
|
|
86
|
-
PopoverTitle,
|
|
87
|
-
PopoverTrigger,
|
|
88
|
-
}
|
|
75
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
3
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
5
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
6
6
|
|
|
7
|
-
function Progress({
|
|
8
|
-
className,
|
|
9
|
-
children,
|
|
10
|
-
value,
|
|
11
|
-
...props
|
|
12
|
-
}: ProgressPrimitive.Root.Props) {
|
|
7
|
+
function Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props) {
|
|
13
8
|
return (
|
|
14
9
|
<ProgressPrimitive.Root
|
|
15
10
|
value={value}
|
|
@@ -22,7 +17,7 @@ function Progress({
|
|
|
22
17
|
<ProgressIndicator />
|
|
23
18
|
</ProgressTrack>
|
|
24
19
|
</ProgressPrimitive.Root>
|
|
25
|
-
)
|
|
20
|
+
);
|
|
26
21
|
}
|
|
27
22
|
|
|
28
23
|
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
@@ -30,25 +25,22 @@ function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
|
30
25
|
<ProgressPrimitive.Track
|
|
31
26
|
className={cn(
|
|
32
27
|
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
33
|
-
className
|
|
28
|
+
className,
|
|
34
29
|
)}
|
|
35
30
|
data-slot="progress-track"
|
|
36
31
|
{...props}
|
|
37
32
|
/>
|
|
38
|
-
)
|
|
33
|
+
);
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
function ProgressIndicator({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}: ProgressPrimitive.Indicator.Props) {
|
|
36
|
+
function ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props) {
|
|
45
37
|
return (
|
|
46
38
|
<ProgressPrimitive.Indicator
|
|
47
39
|
data-slot="progress-indicator"
|
|
48
40
|
className={cn("h-full bg-primary transition-all", className)}
|
|
49
41
|
{...props}
|
|
50
42
|
/>
|
|
51
|
-
)
|
|
43
|
+
);
|
|
52
44
|
}
|
|
53
45
|
|
|
54
46
|
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
@@ -58,26 +50,17 @@ function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
|
58
50
|
data-slot="progress-label"
|
|
59
51
|
{...props}
|
|
60
52
|
/>
|
|
61
|
-
)
|
|
53
|
+
);
|
|
62
54
|
}
|
|
63
55
|
|
|
64
56
|
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
65
57
|
return (
|
|
66
58
|
<ProgressPrimitive.Value
|
|
67
|
-
className={cn(
|
|
68
|
-
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
59
|
+
className={cn("ml-auto text-sm text-muted-foreground tabular-nums", className)}
|
|
71
60
|
data-slot="progress-value"
|
|
72
61
|
{...props}
|
|
73
62
|
/>
|
|
74
|
-
)
|
|
63
|
+
);
|
|
75
64
|
}
|
|
76
65
|
|
|
77
|
-
export {
|
|
78
|
-
Progress,
|
|
79
|
-
ProgressTrack,
|
|
80
|
-
ProgressIndicator,
|
|
81
|
-
ProgressLabel,
|
|
82
|
-
ProgressValue,
|
|
83
|
-
}
|
|
66
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Radio as RadioPrimitive } from "@base-ui/react/radio"
|
|
2
|
-
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"
|
|
1
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
3
3
|
|
|
4
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
4
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
5
5
|
|
|
6
6
|
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
7
7
|
return (
|
|
@@ -10,7 +10,7 @@ function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
|
10
10
|
className={cn("grid w-full gap-2", className)}
|
|
11
11
|
{...props}
|
|
12
12
|
/>
|
|
13
|
-
)
|
|
13
|
+
);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
@@ -19,7 +19,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
19
19
|
data-slot="radio-group-item"
|
|
20
20
|
className={cn(
|
|
21
21
|
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
22
|
-
className
|
|
22
|
+
className,
|
|
23
23
|
)}
|
|
24
24
|
{...props}
|
|
25
25
|
>
|
|
@@ -30,7 +30,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
30
30
|
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
|
|
31
31
|
</RadioPrimitive.Indicator>
|
|
32
32
|
</RadioPrimitive.Root>
|
|
33
|
-
)
|
|
33
|
+
);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export { RadioGroup, RadioGroupItem }
|
|
36
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as ResizablePrimitive from "react-resizable-panels"
|
|
3
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
5
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
6
6
|
|
|
7
|
-
function ResizablePanelGroup({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: ResizablePrimitive.GroupProps) {
|
|
7
|
+
function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {
|
|
11
8
|
return (
|
|
12
9
|
<ResizablePrimitive.Group
|
|
13
10
|
data-slot="resizable-panel-group"
|
|
14
|
-
className={cn(
|
|
15
|
-
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
11
|
+
className={cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)}
|
|
18
12
|
{...props}
|
|
19
13
|
/>
|
|
20
|
-
)
|
|
14
|
+
);
|
|
21
15
|
}
|
|
22
16
|
|
|
23
17
|
function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
|
|
24
|
-
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props}
|
|
18
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
|
|
25
19
|
}
|
|
26
20
|
|
|
27
21
|
function ResizableHandle({
|
|
@@ -29,22 +23,20 @@ function ResizableHandle({
|
|
|
29
23
|
className,
|
|
30
24
|
...props
|
|
31
25
|
}: ResizablePrimitive.SeparatorProps & {
|
|
32
|
-
withHandle?: boolean
|
|
26
|
+
withHandle?: boolean;
|
|
33
27
|
}) {
|
|
34
28
|
return (
|
|
35
29
|
<ResizablePrimitive.Separator
|
|
36
30
|
data-slot="resizable-handle"
|
|
37
31
|
className={cn(
|
|
38
32
|
"relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
39
|
-
className
|
|
33
|
+
className,
|
|
40
34
|
)}
|
|
41
35
|
{...props}
|
|
42
36
|
>
|
|
43
|
-
{withHandle &&
|
|
44
|
-
<div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />
|
|
45
|
-
)}
|
|
37
|
+
{withHandle && <div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />}
|
|
46
38
|
</ResizablePrimitive.Separator>
|
|
47
|
-
)
|
|
39
|
+
);
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
|
|
42
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
3
3
|
|
|
4
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
4
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
5
5
|
|
|
6
|
-
function ScrollArea({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
...props
|
|
10
|
-
}: ScrollAreaPrimitive.Root.Props) {
|
|
6
|
+
function ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props) {
|
|
11
7
|
return (
|
|
12
8
|
<ScrollAreaPrimitive.Root
|
|
13
9
|
data-slot="scroll-area"
|
|
@@ -23,7 +19,7 @@ function ScrollArea({
|
|
|
23
19
|
<ScrollBar />
|
|
24
20
|
<ScrollAreaPrimitive.Corner />
|
|
25
21
|
</ScrollAreaPrimitive.Root>
|
|
26
|
-
)
|
|
22
|
+
);
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
function ScrollBar({
|
|
@@ -38,7 +34,7 @@ function ScrollBar({
|
|
|
38
34
|
orientation={orientation}
|
|
39
35
|
className={cn(
|
|
40
36
|
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
41
|
-
className
|
|
37
|
+
className,
|
|
42
38
|
)}
|
|
43
39
|
{...props}
|
|
44
40
|
>
|
|
@@ -47,7 +43,7 @@ function ScrollBar({
|
|
|
47
43
|
className="relative flex-1 rounded-full bg-border"
|
|
48
44
|
/>
|
|
49
45
|
</ScrollAreaPrimitive.Scrollbar>
|
|
50
|
-
)
|
|
46
|
+
);
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
export { ScrollArea, ScrollBar }
|
|
49
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Select as SelectPrimitive } from "@base-ui/react/select"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
5
5
|
|
|
6
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
7
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
6
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
7
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
8
8
|
|
|
9
|
-
const Select = SelectPrimitive.Root
|
|
9
|
+
const Select = SelectPrimitive.Root;
|
|
10
10
|
|
|
11
11
|
function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
12
12
|
return (
|
|
@@ -15,7 +15,7 @@ function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
|
15
15
|
className={cn("scroll-my-1 p-1", className)}
|
|
16
16
|
{...props}
|
|
17
17
|
/>
|
|
18
|
-
)
|
|
18
|
+
);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
@@ -25,7 +25,7 @@ function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
|
25
25
|
className={cn("flex flex-1 text-left", className)}
|
|
26
26
|
{...props}
|
|
27
27
|
/>
|
|
28
|
-
)
|
|
28
|
+
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function SelectTrigger({
|
|
@@ -34,7 +34,7 @@ function SelectTrigger({
|
|
|
34
34
|
children,
|
|
35
35
|
...props
|
|
36
36
|
}: SelectPrimitive.Trigger.Props & {
|
|
37
|
-
size?: "sm" | "default"
|
|
37
|
+
size?: "sm" | "default";
|
|
38
38
|
}) {
|
|
39
39
|
return (
|
|
40
40
|
<SelectPrimitive.Trigger
|
|
@@ -42,18 +42,16 @@ function SelectTrigger({
|
|
|
42
42
|
data-size={size}
|
|
43
43
|
className={cn(
|
|
44
44
|
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
45
|
-
className
|
|
45
|
+
className,
|
|
46
46
|
)}
|
|
47
47
|
{...props}
|
|
48
48
|
>
|
|
49
49
|
{children}
|
|
50
50
|
<SelectPrimitive.Icon
|
|
51
|
-
render={
|
|
52
|
-
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
53
|
-
}
|
|
51
|
+
render={<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />}
|
|
54
52
|
/>
|
|
55
53
|
</SelectPrimitive.Trigger>
|
|
56
|
-
)
|
|
54
|
+
);
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
function SelectContent({
|
|
@@ -83,7 +81,10 @@ function SelectContent({
|
|
|
83
81
|
<SelectPrimitive.Popup
|
|
84
82
|
data-slot="select-content"
|
|
85
83
|
data-align-trigger={alignItemWithTrigger}
|
|
86
|
-
className={cn(
|
|
84
|
+
className={cn(
|
|
85
|
+
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
86
|
+
className,
|
|
87
|
+
)}
|
|
87
88
|
{...props}
|
|
88
89
|
>
|
|
89
90
|
<SelectScrollUpButton />
|
|
@@ -92,33 +93,26 @@ function SelectContent({
|
|
|
92
93
|
</SelectPrimitive.Popup>
|
|
93
94
|
</SelectPrimitive.Positioner>
|
|
94
95
|
</SelectPrimitive.Portal>
|
|
95
|
-
)
|
|
96
|
+
);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
function SelectLabel({
|
|
99
|
-
className,
|
|
100
|
-
...props
|
|
101
|
-
}: SelectPrimitive.GroupLabel.Props) {
|
|
99
|
+
function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {
|
|
102
100
|
return (
|
|
103
101
|
<SelectPrimitive.GroupLabel
|
|
104
102
|
data-slot="select-label"
|
|
105
103
|
className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
|
|
106
104
|
{...props}
|
|
107
105
|
/>
|
|
108
|
-
)
|
|
106
|
+
);
|
|
109
107
|
}
|
|
110
108
|
|
|
111
|
-
function SelectItem({
|
|
112
|
-
className,
|
|
113
|
-
children,
|
|
114
|
-
...props
|
|
115
|
-
}: SelectPrimitive.Item.Props) {
|
|
109
|
+
function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) {
|
|
116
110
|
return (
|
|
117
111
|
<SelectPrimitive.Item
|
|
118
112
|
data-slot="select-item"
|
|
119
113
|
className={cn(
|
|
120
114
|
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
121
|
-
className
|
|
115
|
+
className,
|
|
122
116
|
)}
|
|
123
117
|
{...props}
|
|
124
118
|
>
|
|
@@ -133,20 +127,17 @@ function SelectItem({
|
|
|
133
127
|
<CheckIcon className="pointer-events-none" />
|
|
134
128
|
</SelectPrimitive.ItemIndicator>
|
|
135
129
|
</SelectPrimitive.Item>
|
|
136
|
-
)
|
|
130
|
+
);
|
|
137
131
|
}
|
|
138
132
|
|
|
139
|
-
function SelectSeparator({
|
|
140
|
-
className,
|
|
141
|
-
...props
|
|
142
|
-
}: SelectPrimitive.Separator.Props) {
|
|
133
|
+
function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {
|
|
143
134
|
return (
|
|
144
135
|
<SelectPrimitive.Separator
|
|
145
136
|
data-slot="select-separator"
|
|
146
137
|
className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
|
|
147
138
|
{...props}
|
|
148
139
|
/>
|
|
149
|
-
)
|
|
140
|
+
);
|
|
150
141
|
}
|
|
151
142
|
|
|
152
143
|
function SelectScrollUpButton({
|
|
@@ -158,14 +149,13 @@ function SelectScrollUpButton({
|
|
|
158
149
|
data-slot="select-scroll-up-button"
|
|
159
150
|
className={cn(
|
|
160
151
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
161
|
-
className
|
|
152
|
+
className,
|
|
162
153
|
)}
|
|
163
154
|
{...props}
|
|
164
155
|
>
|
|
165
|
-
<ChevronUpIcon
|
|
166
|
-
/>
|
|
156
|
+
<ChevronUpIcon />
|
|
167
157
|
</SelectPrimitive.ScrollUpArrow>
|
|
168
|
-
)
|
|
158
|
+
);
|
|
169
159
|
}
|
|
170
160
|
|
|
171
161
|
function SelectScrollDownButton({
|
|
@@ -177,14 +167,13 @@ function SelectScrollDownButton({
|
|
|
177
167
|
data-slot="select-scroll-down-button"
|
|
178
168
|
className={cn(
|
|
179
169
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
180
|
-
className
|
|
170
|
+
className,
|
|
181
171
|
)}
|
|
182
172
|
{...props}
|
|
183
173
|
>
|
|
184
|
-
<ChevronDownIcon
|
|
185
|
-
/>
|
|
174
|
+
<ChevronDownIcon />
|
|
186
175
|
</SelectPrimitive.ScrollDownArrow>
|
|
187
|
-
)
|
|
176
|
+
);
|
|
188
177
|
}
|
|
189
178
|
|
|
190
179
|
export {
|
|
@@ -198,4 +187,4 @@ export {
|
|
|
198
187
|
SelectSeparator,
|
|
199
188
|
SelectTrigger,
|
|
200
189
|
SelectValue,
|
|
201
|
-
}
|
|
190
|
+
};
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
|
|
1
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
2
2
|
|
|
3
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
3
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
4
4
|
|
|
5
|
-
function Separator({
|
|
6
|
-
className,
|
|
7
|
-
orientation = "horizontal",
|
|
8
|
-
...props
|
|
9
|
-
}: SeparatorPrimitive.Props) {
|
|
5
|
+
function Separator({ className, orientation = "horizontal", ...props }: SeparatorPrimitive.Props) {
|
|
10
6
|
return (
|
|
11
7
|
<SeparatorPrimitive
|
|
12
8
|
data-slot="separator"
|
|
13
9
|
orientation={orientation}
|
|
14
10
|
className={cn(
|
|
15
11
|
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
16
|
-
className
|
|
12
|
+
className,
|
|
17
13
|
)}
|
|
18
14
|
{...props}
|
|
19
15
|
/>
|
|
20
|
-
)
|
|
16
|
+
);
|
|
21
17
|
}
|
|
22
18
|
|
|
23
|
-
export { Separator }
|
|
19
|
+
export { Separator };
|