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,8 +1,7 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
4
|
-
import type {VariantProps} from "class-variance-authority";
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
4
|
+
import type { VariantProps } from "class-variance-authority";
|
|
6
5
|
|
|
7
6
|
const alertVariants = cva(
|
|
8
7
|
"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
@@ -17,8 +16,8 @@ const alertVariants = cva(
|
|
|
17
16
|
defaultVariants: {
|
|
18
17
|
variant: "default",
|
|
19
18
|
},
|
|
20
|
-
}
|
|
21
|
-
)
|
|
19
|
+
},
|
|
20
|
+
);
|
|
22
21
|
|
|
23
22
|
function Alert({
|
|
24
23
|
className,
|
|
@@ -32,7 +31,7 @@ function Alert({
|
|
|
32
31
|
className={cn(alertVariants({ variant }), className)}
|
|
33
32
|
{...props}
|
|
34
33
|
/>
|
|
35
|
-
)
|
|
34
|
+
);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -41,37 +40,30 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
41
40
|
data-slot="alert-title"
|
|
42
41
|
className={cn(
|
|
43
42
|
"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
|
|
44
|
-
className
|
|
43
|
+
className,
|
|
45
44
|
)}
|
|
46
45
|
{...props}
|
|
47
46
|
/>
|
|
48
|
-
)
|
|
47
|
+
);
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
function AlertDescription({
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<"div">) {
|
|
50
|
+
function AlertDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
55
51
|
return (
|
|
56
52
|
<div
|
|
57
53
|
data-slot="alert-description"
|
|
58
54
|
className={cn(
|
|
59
55
|
"text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
60
|
-
className
|
|
56
|
+
className,
|
|
61
57
|
)}
|
|
62
58
|
{...props}
|
|
63
59
|
/>
|
|
64
|
-
)
|
|
60
|
+
);
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
68
64
|
return (
|
|
69
|
-
<div
|
|
70
|
-
|
|
71
|
-
className={cn("absolute top-2 right-2", className)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
)
|
|
65
|
+
<div data-slot="alert-action" className={cn("absolute top-2 right-2", className)} {...props} />
|
|
66
|
+
);
|
|
75
67
|
}
|
|
76
68
|
|
|
77
|
-
export { Alert, AlertTitle, AlertDescription, AlertAction }
|
|
69
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
1
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
2
2
|
|
|
3
3
|
function AspectRatio({
|
|
4
4
|
ratio,
|
|
@@ -16,7 +16,7 @@ function AspectRatio({
|
|
|
16
16
|
className={cn("relative aspect-(--ratio)", className)}
|
|
17
17
|
{...props}
|
|
18
18
|
/>
|
|
19
|
-
)
|
|
19
|
+
);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export { AspectRatio }
|
|
22
|
+
export { AspectRatio };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
3
3
|
|
|
4
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
4
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
5
5
|
|
|
6
6
|
function Avatar({
|
|
7
7
|
className,
|
|
8
8
|
size = "default",
|
|
9
9
|
...props
|
|
10
10
|
}: AvatarPrimitive.Root.Props & {
|
|
11
|
-
size?: "default" | "sm" | "lg"
|
|
11
|
+
size?: "default" | "sm" | "lg";
|
|
12
12
|
}) {
|
|
13
13
|
return (
|
|
14
14
|
<AvatarPrimitive.Root
|
|
@@ -16,40 +16,34 @@ function Avatar({
|
|
|
16
16
|
data-size={size}
|
|
17
17
|
className={cn(
|
|
18
18
|
"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
19
|
-
className
|
|
19
|
+
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
22
22
|
/>
|
|
23
|
-
)
|
|
23
|
+
);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
|
|
27
27
|
return (
|
|
28
28
|
<AvatarPrimitive.Image
|
|
29
29
|
data-slot="avatar-image"
|
|
30
|
-
className={cn(
|
|
31
|
-
"aspect-square size-full rounded-full object-cover",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
30
|
+
className={cn("aspect-square size-full rounded-full object-cover", className)}
|
|
34
31
|
{...props}
|
|
35
32
|
/>
|
|
36
|
-
)
|
|
33
|
+
);
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
function AvatarFallback({
|
|
40
|
-
className,
|
|
41
|
-
...props
|
|
42
|
-
}: AvatarPrimitive.Fallback.Props) {
|
|
36
|
+
function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props) {
|
|
43
37
|
return (
|
|
44
38
|
<AvatarPrimitive.Fallback
|
|
45
39
|
data-slot="avatar-fallback"
|
|
46
40
|
className={cn(
|
|
47
41
|
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
48
|
-
className
|
|
42
|
+
className,
|
|
49
43
|
)}
|
|
50
44
|
{...props}
|
|
51
45
|
/>
|
|
52
|
-
)
|
|
46
|
+
);
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
|
|
@@ -61,11 +55,11 @@ function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
|
|
|
61
55
|
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
62
56
|
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
63
57
|
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
64
|
-
className
|
|
58
|
+
className,
|
|
65
59
|
)}
|
|
66
60
|
{...props}
|
|
67
61
|
/>
|
|
68
|
-
)
|
|
62
|
+
);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -74,34 +68,24 @@ function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
74
68
|
data-slot="avatar-group"
|
|
75
69
|
className={cn(
|
|
76
70
|
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
77
|
-
className
|
|
71
|
+
className,
|
|
78
72
|
)}
|
|
79
73
|
{...props}
|
|
80
74
|
/>
|
|
81
|
-
)
|
|
75
|
+
);
|
|
82
76
|
}
|
|
83
77
|
|
|
84
|
-
function AvatarGroupCount({
|
|
85
|
-
className,
|
|
86
|
-
...props
|
|
87
|
-
}: React.ComponentProps<"div">) {
|
|
78
|
+
function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">) {
|
|
88
79
|
return (
|
|
89
80
|
<div
|
|
90
81
|
data-slot="avatar-group-count"
|
|
91
82
|
className={cn(
|
|
92
83
|
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
93
|
-
className
|
|
84
|
+
className,
|
|
94
85
|
)}
|
|
95
86
|
{...props}
|
|
96
87
|
/>
|
|
97
|
-
)
|
|
88
|
+
);
|
|
98
89
|
}
|
|
99
90
|
|
|
100
|
-
export {
|
|
101
|
-
Avatar,
|
|
102
|
-
AvatarImage,
|
|
103
|
-
AvatarFallback,
|
|
104
|
-
AvatarGroup,
|
|
105
|
-
AvatarGroupCount,
|
|
106
|
-
AvatarBadge,
|
|
107
|
-
}
|
|
91
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { mergeProps } from "@base-ui/react/merge-props"
|
|
2
|
-
import { useRender } from "@base-ui/react/use-render"
|
|
3
|
-
import {
|
|
4
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
5
|
-
import type {VariantProps} from "class-variance-authority";
|
|
6
|
-
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
5
|
+
import type { VariantProps } from "class-variance-authority";
|
|
7
6
|
|
|
8
7
|
const badgeVariants = cva(
|
|
9
8
|
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
@@ -11,22 +10,19 @@ const badgeVariants = cva(
|
|
|
11
10
|
variants: {
|
|
12
11
|
variant: {
|
|
13
12
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
14
|
-
secondary:
|
|
15
|
-
"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
16
14
|
destructive:
|
|
17
15
|
"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
18
|
-
outline:
|
|
19
|
-
|
|
20
|
-
ghost:
|
|
21
|
-
"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
16
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
17
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
22
18
|
link: "text-primary underline-offset-4 hover:underline",
|
|
23
19
|
},
|
|
24
20
|
},
|
|
25
21
|
defaultVariants: {
|
|
26
22
|
variant: "default",
|
|
27
23
|
},
|
|
28
|
-
}
|
|
29
|
-
)
|
|
24
|
+
},
|
|
25
|
+
);
|
|
30
26
|
|
|
31
27
|
function Badge({
|
|
32
28
|
className,
|
|
@@ -40,14 +36,14 @@ function Badge({
|
|
|
40
36
|
{
|
|
41
37
|
className: cn(badgeVariants({ variant }), className),
|
|
42
38
|
},
|
|
43
|
-
props
|
|
39
|
+
props,
|
|
44
40
|
),
|
|
45
41
|
render,
|
|
46
42
|
state: {
|
|
47
43
|
slot: "badge",
|
|
48
44
|
variant,
|
|
49
45
|
},
|
|
50
|
-
})
|
|
46
|
+
});
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
export { Badge, badgeVariants }
|
|
49
|
+
export { Badge, badgeVariants };
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { mergeProps } from "@base-ui/react/merge-props"
|
|
3
|
-
import { useRender } from "@base-ui/react/use-render"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
|
|
5
|
-
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
6
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
5
|
+
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
6
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
7
7
|
|
|
8
8
|
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
9
9
|
return (
|
|
10
|
-
<nav
|
|
11
|
-
|
|
12
|
-
data-slot="breadcrumb"
|
|
13
|
-
className={cn(className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
)
|
|
10
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />
|
|
11
|
+
);
|
|
17
12
|
}
|
|
18
13
|
|
|
19
14
|
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
@@ -22,11 +17,11 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
|
22
17
|
data-slot="breadcrumb-list"
|
|
23
18
|
className={cn(
|
|
24
19
|
"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",
|
|
25
|
-
className
|
|
20
|
+
className,
|
|
26
21
|
)}
|
|
27
22
|
{...props}
|
|
28
23
|
/>
|
|
29
|
-
)
|
|
24
|
+
);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
@@ -36,27 +31,23 @@ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
|
36
31
|
className={cn("inline-flex items-center gap-1", className)}
|
|
37
32
|
{...props}
|
|
38
33
|
/>
|
|
39
|
-
)
|
|
34
|
+
);
|
|
40
35
|
}
|
|
41
36
|
|
|
42
|
-
function BreadcrumbLink({
|
|
43
|
-
className,
|
|
44
|
-
render,
|
|
45
|
-
...props
|
|
46
|
-
}: useRender.ComponentProps<"a">) {
|
|
37
|
+
function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">) {
|
|
47
38
|
return useRender({
|
|
48
39
|
defaultTagName: "a",
|
|
49
40
|
props: mergeProps<"a">(
|
|
50
41
|
{
|
|
51
42
|
className: cn("transition-colors hover:text-foreground", className),
|
|
52
43
|
},
|
|
53
|
-
props
|
|
44
|
+
props,
|
|
54
45
|
),
|
|
55
46
|
render,
|
|
56
47
|
state: {
|
|
57
48
|
slot: "breadcrumb-link",
|
|
58
49
|
},
|
|
59
|
-
})
|
|
50
|
+
});
|
|
60
51
|
}
|
|
61
52
|
|
|
62
53
|
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
@@ -69,14 +60,10 @@ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
|
69
60
|
className={cn("font-normal text-foreground", className)}
|
|
70
61
|
{...props}
|
|
71
62
|
/>
|
|
72
|
-
)
|
|
63
|
+
);
|
|
73
64
|
}
|
|
74
65
|
|
|
75
|
-
function BreadcrumbSeparator({
|
|
76
|
-
children,
|
|
77
|
-
className,
|
|
78
|
-
...props
|
|
79
|
-
}: React.ComponentProps<"li">) {
|
|
66
|
+
function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">) {
|
|
80
67
|
return (
|
|
81
68
|
<li
|
|
82
69
|
data-slot="breadcrumb-separator"
|
|
@@ -85,33 +72,24 @@ function BreadcrumbSeparator({
|
|
|
85
72
|
className={cn("[&>svg]:size-3.5", className)}
|
|
86
73
|
{...props}
|
|
87
74
|
>
|
|
88
|
-
{children ??
|
|
89
|
-
<ChevronRightIcon />
|
|
90
|
-
)}
|
|
75
|
+
{children ?? <ChevronRightIcon />}
|
|
91
76
|
</li>
|
|
92
|
-
)
|
|
77
|
+
);
|
|
93
78
|
}
|
|
94
79
|
|
|
95
|
-
function BreadcrumbEllipsis({
|
|
96
|
-
className,
|
|
97
|
-
...props
|
|
98
|
-
}: React.ComponentProps<"span">) {
|
|
80
|
+
function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">) {
|
|
99
81
|
return (
|
|
100
82
|
<span
|
|
101
83
|
data-slot="breadcrumb-ellipsis"
|
|
102
84
|
role="presentation"
|
|
103
85
|
aria-hidden="true"
|
|
104
|
-
className={cn(
|
|
105
|
-
"flex size-5 items-center justify-center [&>svg]:size-4",
|
|
106
|
-
className
|
|
107
|
-
)}
|
|
86
|
+
className={cn("flex size-5 items-center justify-center [&>svg]:size-4", className)}
|
|
108
87
|
{...props}
|
|
109
88
|
>
|
|
110
|
-
<MoreHorizontalIcon
|
|
111
|
-
/>
|
|
89
|
+
<MoreHorizontalIcon />
|
|
112
90
|
<span className="sr-only">More</span>
|
|
113
91
|
</span>
|
|
114
|
-
)
|
|
92
|
+
);
|
|
115
93
|
}
|
|
116
94
|
|
|
117
95
|
export {
|
|
@@ -122,4 +100,4 @@ export {
|
|
|
122
100
|
BreadcrumbPage,
|
|
123
101
|
BreadcrumbSeparator,
|
|
124
102
|
BreadcrumbEllipsis,
|
|
125
|
-
}
|
|
103
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { mergeProps } from "@base-ui/react/merge-props"
|
|
2
|
-
import { useRender } from "@base-ui/react/use-render"
|
|
3
|
-
import {
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
6
|
-
import { Separator } from "@workspace/ui/components/separator"
|
|
7
|
-
import type {VariantProps} from "class-variance-authority";
|
|
5
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
6
|
+
import { Separator } from "@workspace/ui/components/separator";
|
|
7
|
+
import type { VariantProps } from "class-variance-authority";
|
|
8
8
|
|
|
9
9
|
const buttonGroupVariants = cva(
|
|
10
10
|
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
@@ -20,8 +20,8 @@ const buttonGroupVariants = cva(
|
|
|
20
20
|
defaultVariants: {
|
|
21
21
|
orientation: "horizontal",
|
|
22
22
|
},
|
|
23
|
-
}
|
|
24
|
-
)
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
25
|
|
|
26
26
|
function ButtonGroup({
|
|
27
27
|
className,
|
|
@@ -36,30 +36,26 @@ function ButtonGroup({
|
|
|
36
36
|
className={cn(buttonGroupVariants({ orientation }), className)}
|
|
37
37
|
{...props}
|
|
38
38
|
/>
|
|
39
|
-
)
|
|
39
|
+
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function ButtonGroupText({
|
|
43
|
-
className,
|
|
44
|
-
render,
|
|
45
|
-
...props
|
|
46
|
-
}: useRender.ComponentProps<"div">) {
|
|
42
|
+
function ButtonGroupText({ className, render, ...props }: useRender.ComponentProps<"div">) {
|
|
47
43
|
return useRender({
|
|
48
44
|
defaultTagName: "div",
|
|
49
45
|
props: mergeProps<"div">(
|
|
50
46
|
{
|
|
51
47
|
className: cn(
|
|
52
48
|
"flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
53
|
-
className
|
|
49
|
+
className,
|
|
54
50
|
),
|
|
55
51
|
},
|
|
56
|
-
props
|
|
52
|
+
props,
|
|
57
53
|
),
|
|
58
54
|
render,
|
|
59
55
|
state: {
|
|
60
56
|
slot: "button-group-text",
|
|
61
57
|
},
|
|
62
|
-
})
|
|
58
|
+
});
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
function ButtonGroupSeparator({
|
|
@@ -73,16 +69,11 @@ function ButtonGroupSeparator({
|
|
|
73
69
|
orientation={orientation}
|
|
74
70
|
className={cn(
|
|
75
71
|
"relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
|
|
76
|
-
className
|
|
72
|
+
className,
|
|
77
73
|
)}
|
|
78
74
|
{...props}
|
|
79
75
|
/>
|
|
80
|
-
)
|
|
76
|
+
);
|
|
81
77
|
}
|
|
82
78
|
|
|
83
|
-
export {
|
|
84
|
-
ButtonGroup,
|
|
85
|
-
ButtonGroupSeparator,
|
|
86
|
-
ButtonGroupText,
|
|
87
|
-
buttonGroupVariants,
|
|
88
|
-
}
|
|
79
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button"
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from "@workspace/ui/lib/utils"
|
|
4
|
-
import type {VariantProps} from "class-variance-authority";
|
|
5
|
-
|
|
1
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@workspace/ui/lib/utils";
|
|
4
|
+
import type { VariantProps } from "class-variance-authority";
|
|
6
5
|
|
|
7
6
|
const buttonVariants = cva(
|
|
8
7
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 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",
|
|
@@ -38,8 +37,8 @@ const buttonVariants = cva(
|
|
|
38
37
|
variant: "default",
|
|
39
38
|
size: "default",
|
|
40
39
|
},
|
|
41
|
-
}
|
|
42
|
-
)
|
|
40
|
+
},
|
|
41
|
+
);
|
|
43
42
|
|
|
44
43
|
function Button({
|
|
45
44
|
className,
|
|
@@ -53,7 +52,7 @@ function Button({
|
|
|
53
52
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
54
53
|
{...props}
|
|
55
54
|
/>
|
|
56
|
-
)
|
|
55
|
+
);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
export { Button, buttonVariants }
|
|
58
|
+
export { Button, buttonVariants };
|