@dyrected/admin 2.0.1 → 2.4.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/CHANGELOG.md +29 -0
- package/package.json +4 -4
- package/scripts/prefix-tailwind-precision.py +98 -0
- package/scripts/prefix-tailwind.py +67 -0
- package/src/components/auth/auth-gate.tsx +4 -4
- package/src/components/error-boundary.tsx +4 -4
- package/src/components/forms/fields/block-builder.tsx +24 -24
- package/src/components/forms/fields/date-picker.tsx +7 -7
- package/src/components/forms/fields/json-editor.tsx +5 -5
- package/src/components/forms/fields/media-picker.tsx +39 -39
- package/src/components/forms/fields/multi-select.tsx +12 -12
- package/src/components/forms/fields/radio-field.tsx +8 -8
- package/src/components/forms/fields/relationship-picker.tsx +13 -13
- package/src/components/forms/fields/rich-text-editor.tsx +22 -22
- package/src/components/forms/fields/select-field.tsx +3 -3
- package/src/components/forms/form-engine.tsx +3 -3
- package/src/components/forms/form-field-renderer.tsx +37 -37
- package/src/components/layout/admin-shell.tsx +60 -60
- package/src/components/live-preview/LivePreviewPane.tsx +14 -14
- package/src/components/media/focal-point-picker.tsx +9 -9
- package/src/components/media/media-card.tsx +10 -10
- package/src/components/media/media-grid.tsx +3 -3
- package/src/components/media/media-library-dialog.tsx +105 -105
- package/src/components/ui/badge.tsx +5 -5
- package/src/components/ui/button.tsx +11 -11
- package/src/components/ui/calendar.tsx +36 -36
- package/src/components/ui/card.tsx +6 -6
- package/src/components/ui/checkbox.tsx +3 -3
- package/src/components/ui/command.tsx +12 -12
- package/src/components/ui/data-table.tsx +18 -18
- package/src/components/ui/dialog.tsx +9 -9
- package/src/components/ui/dropdown-menu.tsx +16 -16
- package/src/components/ui/form.tsx +4 -4
- package/src/components/ui/input.tsx +3 -3
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/page-header.tsx +6 -6
- package/src/components/ui/pagination.tsx +6 -6
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +2 -2
- package/src/components/ui/radio-group.tsx +4 -4
- package/src/components/ui/render-cell.tsx +16 -16
- package/src/components/ui/scroll-area.tsx +6 -6
- package/src/components/ui/select.tsx +14 -14
- package/src/components/ui/separator.tsx +2 -2
- package/src/components/ui/sheet.tsx +13 -13
- package/src/components/ui/sidebar.tsx +60 -60
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/sonner.tsx +1 -1
- package/src/components/ui/switch.tsx +2 -2
- package/src/components/ui/table.tsx +7 -7
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle.tsx +6 -6
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.css +27 -27
- package/src/index.tsx +4 -4
- package/src/lib/utils.ts +7 -3
- package/src/pages/auth/first-user-page.tsx +18 -18
- package/src/pages/auth/login-page.tsx +14 -14
- package/src/pages/collections/edit-page.tsx +37 -37
- package/src/pages/collections/list-page.tsx +23 -23
- package/src/pages/dashboard/dashboard.tsx +49 -49
- package/src/pages/globals/editor-page.tsx +13 -13
- package/src/pages/media/media-page.tsx +106 -106
- package/src/pages/setup/setup-prompt.tsx +48 -48
- package/tailwind.config.ts +1 -0
- package/vite.config.ts +0 -1
|
@@ -80,7 +80,7 @@ const FormItem = React.forwardRef<
|
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
82
|
<FormItemContext.Provider value={{ id }}>
|
|
83
|
-
<div ref={ref} className={cn("space-y-2", className)} {...props} />
|
|
83
|
+
<div ref={ref} className={cn("dy-space-y-2", className)} {...props} />
|
|
84
84
|
</FormItemContext.Provider>
|
|
85
85
|
)
|
|
86
86
|
})
|
|
@@ -95,7 +95,7 @@ const FormLabel = React.forwardRef<
|
|
|
95
95
|
return (
|
|
96
96
|
<Label
|
|
97
97
|
ref={ref}
|
|
98
|
-
className={cn(error && "text-destructive", className)}
|
|
98
|
+
className={cn(error && "dy-text-destructive", className)}
|
|
99
99
|
htmlFor={formItemId}
|
|
100
100
|
{...props}
|
|
101
101
|
/>
|
|
@@ -135,7 +135,7 @@ const FormDescription = React.forwardRef<
|
|
|
135
135
|
<p
|
|
136
136
|
ref={ref}
|
|
137
137
|
id={formDescriptionId}
|
|
138
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
138
|
+
className={cn("dy-text-sm dy-text-muted-foreground", className)}
|
|
139
139
|
{...props}
|
|
140
140
|
/>
|
|
141
141
|
)
|
|
@@ -157,7 +157,7 @@ const FormMessage = React.forwardRef<
|
|
|
157
157
|
<p
|
|
158
158
|
ref={ref}
|
|
159
159
|
id={formMessageId}
|
|
160
|
-
className={cn("text-sm font-medium text-destructive", className)}
|
|
160
|
+
className={cn("dy-text-sm dy-font-medium dy-text-destructive", className)}
|
|
161
161
|
{...props}
|
|
162
162
|
>
|
|
163
163
|
{body}
|
|
@@ -8,9 +8,9 @@ const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
|
8
8
|
<input
|
|
9
9
|
type={type}
|
|
10
10
|
className={cn(
|
|
11
|
-
"flex h-12 w-full rounded-xl border border-border/40 bg-white/50 px-4 py-2 text-base transition-all",
|
|
12
|
-
"placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:border-primary/30 focus-visible:bg-white focus-visible:shadow-md",
|
|
13
|
-
"disabled:cursor-not-allowed disabled:opacity-50 md:text-sm shadow-sm",
|
|
11
|
+
"dy-flex dy-h-12 dy-w-full dy-rounded-xl dy-border dy-border-border/40 dy-bg-white/50 dy-px-4 dy-py-2 dy-text-base dy-transition-all",
|
|
12
|
+
"placeholder:dy-text-muted-foreground/60 focus-visible:dy-outline-none focus-visible:dy-border-primary/30 focus-visible:dy-bg-white focus-visible:dy-shadow-md",
|
|
13
|
+
"disabled:dy-cursor-not-allowed disabled:dy-opacity-50 md:dy-text-sm dy-shadow-sm",
|
|
14
14
|
className
|
|
15
15
|
)}
|
|
16
16
|
ref={ref}
|
|
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
5
5
|
import { cn } from "../../lib/utils"
|
|
6
6
|
|
|
7
7
|
const labelVariants = cva(
|
|
8
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
8
|
+
"dy-text-sm dy-font-medium dy-leading-none dy-peer-disabled:dy-cursor-not-allowed dy-peer-disabled:dy-opacity-70"
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
const Label = React.forwardRef<
|
|
@@ -10,19 +10,19 @@ interface PageHeaderProps {
|
|
|
10
10
|
|
|
11
11
|
export function PageHeader({ title, description, icon: Icon, children }: PageHeaderProps) {
|
|
12
12
|
return (
|
|
13
|
-
<div className="flex items-end justify-between mb-8">
|
|
13
|
+
<div className="dy-flex dy-items-end dy-justify-between dy-mb-8">
|
|
14
14
|
<div>
|
|
15
|
-
<div className="flex items-center gap-3 mb-1">
|
|
16
|
-
{Icon && <Icon className="h-4 w-4 text-primary/60" />}
|
|
17
|
-
<h1 className="text-2xl font-bold tracking-tight text-foreground">{title}</h1>
|
|
15
|
+
<div className="dy-flex dy-items-center dy-gap-3 dy-mb-1">
|
|
16
|
+
{Icon && <Icon className="dy-h-4 dy-w-4 dy-text-primary/60" />}
|
|
17
|
+
<h1 className="dy-text-2xl dy-font-bold dy-tracking-tight dy-text-foreground">{title}</h1>
|
|
18
18
|
</div>
|
|
19
19
|
{description && (
|
|
20
|
-
<p className="text-[11px] text-muted-foreground/60 font-medium">
|
|
20
|
+
<p className="dy-text-[11px] dy-text-muted-foreground/60 dy-font-medium">
|
|
21
21
|
{description}
|
|
22
22
|
</p>
|
|
23
23
|
)}
|
|
24
24
|
</div>
|
|
25
|
-
<div className="flex items-center gap-3">
|
|
25
|
+
<div className="dy-flex dy-items-center dy-gap-3">
|
|
26
26
|
{children}
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -24,32 +24,32 @@ export function Pagination({
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<div className={`flex items-center justify-between px-4 py-4 border-t border-border/40 ${className}`}>
|
|
27
|
-
<p className="text-xs text-muted-foreground">
|
|
27
|
+
<p className="dy-text-xs dy-text-muted-foreground">
|
|
28
28
|
Showing page <strong>{page}</strong> of <strong>{totalPages}</strong>
|
|
29
29
|
{total != null && (
|
|
30
30
|
<> — {total} total entries</>
|
|
31
31
|
)}
|
|
32
32
|
</p>
|
|
33
|
-
<div className="flex items-center gap-2">
|
|
33
|
+
<div className="dy-flex dy-items-center dy-gap-2">
|
|
34
34
|
<Button
|
|
35
35
|
variant="outline"
|
|
36
36
|
size="sm"
|
|
37
|
-
className="h-8 w-8 p-0"
|
|
37
|
+
className="dy-h-8 dy-w-8 dy-p-0"
|
|
38
38
|
disabled={!hasPrevPage}
|
|
39
39
|
onClick={() => onPageChange(Math.max(1, page - 1))}
|
|
40
40
|
title="Previous page"
|
|
41
41
|
>
|
|
42
|
-
<ChevronLeft className="h-4 w-4" />
|
|
42
|
+
<ChevronLeft className="dy-h-4 dy-w-4" />
|
|
43
43
|
</Button>
|
|
44
44
|
<Button
|
|
45
45
|
variant="outline"
|
|
46
46
|
size="sm"
|
|
47
|
-
className="h-8 w-8 p-0"
|
|
47
|
+
className="dy-h-8 dy-w-8 dy-p-0"
|
|
48
48
|
disabled={!hasNextPage}
|
|
49
49
|
onClick={() => onPageChange(page + 1)}
|
|
50
50
|
title="Next page"
|
|
51
51
|
>
|
|
52
|
-
<ChevronRight className="h-4 w-4" />
|
|
52
|
+
<ChevronRight className="dy-h-4 dy-w-4" />
|
|
53
53
|
</Button>
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
@@ -17,7 +17,7 @@ const PopoverContent = React.forwardRef<
|
|
|
17
17
|
align={align}
|
|
18
18
|
sideOffset={sideOffset}
|
|
19
19
|
className={cn(
|
|
20
|
-
"z-[100] w-72 rounded-md border bg-white p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",
|
|
20
|
+
"dy-z-[100] dy-w-72 dy-rounded-md dy-border dy-bg-white dy-p-4 dy-text-popover-foreground dy-shadow-md dy-outline-none data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-popover-content-transform-origin]",
|
|
21
21
|
className
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|
|
@@ -10,13 +10,13 @@ const Progress = React.forwardRef<
|
|
|
10
10
|
<ProgressPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
12
|
className={cn(
|
|
13
|
-
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
|
13
|
+
"dy-relative dy-h-4 dy-w-full dy-overflow-hidden dy-rounded-full dy-bg-secondary",
|
|
14
14
|
className
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
17
17
|
>
|
|
18
18
|
<ProgressPrimitive.Indicator
|
|
19
|
-
className="h-full w-full flex-1 bg-primary transition-all"
|
|
19
|
+
className="dy-h-full dy-w-full dy-flex-1 dy-bg-primary dy-transition-all"
|
|
20
20
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
21
21
|
/>
|
|
22
22
|
</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("grid gap-2", className)}
|
|
13
|
+
className={cn("dy-grid dy-gap-2", className)}
|
|
14
14
|
{...props}
|
|
15
15
|
ref={ref}
|
|
16
16
|
/>
|
|
@@ -26,13 +26,13 @@ const RadioGroupItem = React.forwardRef<
|
|
|
26
26
|
<RadioGroupPrimitive.Item
|
|
27
27
|
ref={ref}
|
|
28
28
|
className={cn(
|
|
29
|
-
"aspect-square h-5 w-5 rounded-full border border-primary/20 bg-white/50 text-primary shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 transition-all hover:border-primary/40 data-[state=checked]:border-primary data-[state=checked]:bg-primary/5",
|
|
29
|
+
"dy-aspect-square dy-h-5 dy-w-5 dy-rounded-full dy-border dy-border-primary/20 dy-bg-white/50 dy-text-primary dy-shadow-sm focus:dy-outline-none focus-visible:dy-ring-2 focus-visible:dy-ring-ring disabled:dy-cursor-not-allowed disabled:dy-opacity-50 dy-transition-all hover:dy-border-primary/40 data-[state=checked]:dy-border-primary data-[state=checked]:dy-bg-primary/5",
|
|
30
30
|
className
|
|
31
31
|
)}
|
|
32
32
|
{...props}
|
|
33
33
|
>
|
|
34
|
-
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
35
|
-
<Circle className="h-2.5 w-2.5 fill-current text-primary" />
|
|
34
|
+
<RadioGroupPrimitive.Indicator className="dy-flex dy-items-center dy-justify-center">
|
|
35
|
+
<Circle className="dy-h-2.5 dy-w-2.5 dy-fill-current dy-text-primary" />
|
|
36
36
|
</RadioGroupPrimitive.Indicator>
|
|
37
37
|
</RadioGroupPrimitive.Item>
|
|
38
38
|
)
|
|
@@ -10,7 +10,7 @@ interface RenderCellProps {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
13
|
-
if (value === null || value === undefined) return <span className="text-muted-foreground">-</span>
|
|
13
|
+
if (value === null || value === undefined) return <span className="dy-text-muted-foreground">-</span>
|
|
14
14
|
|
|
15
15
|
// Handle Boolean
|
|
16
16
|
if (field.type === "boolean" || typeof value === "boolean") {
|
|
@@ -21,9 +21,9 @@ export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
|
21
21
|
if (field.type === "date") {
|
|
22
22
|
const date = new Date(value)
|
|
23
23
|
return (
|
|
24
|
-
<div className="flex items-center gap-1.5 text-muted-foreground">
|
|
25
|
-
<Calendar className="h-3 w-3" />
|
|
26
|
-
<span className="text-xs">{date.toLocaleDateString()}</span>
|
|
24
|
+
<div className="dy-flex dy-items-center dy-gap-1.5 dy-text-muted-foreground">
|
|
25
|
+
<Calendar className="dy-h-3 dy-w-3" />
|
|
26
|
+
<span className="dy-text-xs">{date.toLocaleDateString()}</span>
|
|
27
27
|
</div>
|
|
28
28
|
)
|
|
29
29
|
}
|
|
@@ -32,15 +32,15 @@ export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
|
32
32
|
const relationTo = field.relationTo || field.collection
|
|
33
33
|
if (field.type === "image" || (field.type === "relationship" && isUploadCollection(relationTo, schemas))) {
|
|
34
34
|
const media = value
|
|
35
|
-
if (!media) return <span className="text-muted-foreground">-</span>
|
|
35
|
+
if (!media) return <span className="dy-text-muted-foreground">-</span>
|
|
36
36
|
|
|
37
37
|
const url = getMediaUrl(value, client?.getBaseUrl() || "")
|
|
38
38
|
|
|
39
|
-
if (!url) return <span className="text-muted-foreground">-</span>
|
|
39
|
+
if (!url) return <span className="dy-text-muted-foreground">-</span>
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<div className="h-8 w-8 rounded overflow-hidden border bg-muted shadow-sm">
|
|
43
|
-
<img src={url} className="h-full w-full object-cover" alt="" />
|
|
42
|
+
<div className="dy-h-8 dy-w-8 dy-rounded dy-overflow-hidden dy-border dy-bg-muted dy-shadow-sm">
|
|
43
|
+
<img src={url} className="dy-h-full dy-w-full dy-object-cover" alt="" />
|
|
44
44
|
</div>
|
|
45
45
|
)
|
|
46
46
|
}
|
|
@@ -53,8 +53,8 @@ export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
|
53
53
|
const displayValue = value[displayField] || value.name || value.id || "Unknown"
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
|
-
<div className="flex items-center gap-2">
|
|
57
|
-
<Badge variant="outline" className="font-normal border-primary/20 bg-primary/5 text-primary">
|
|
56
|
+
<div className="dy-flex dy-items-center dy-gap-2">
|
|
57
|
+
<Badge variant="outline" className="dy-font-normal dy-border-primary/20 dy-bg-primary/5 dy-text-primary">
|
|
58
58
|
{String(displayValue)}
|
|
59
59
|
</Badge>
|
|
60
60
|
</div>
|
|
@@ -64,14 +64,14 @@ export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
|
64
64
|
// Handle Array of strings or IDs
|
|
65
65
|
if (Array.isArray(value)) {
|
|
66
66
|
return (
|
|
67
|
-
<div className="flex flex-wrap gap-1">
|
|
67
|
+
<div className="dy-flex dy-flex-wrap dy-gap-1">
|
|
68
68
|
{value.slice(0, 2).map((item, i) => (
|
|
69
|
-
<Badge key={i} variant="outline" className="text-[10px] px-1.5 h-5">
|
|
69
|
+
<Badge key={i} variant="outline" className="dy-text-[10px] dy-px-1.5 dy-h-5">
|
|
70
70
|
{typeof item === 'object' ? (item.title || item.name || item.id) : String(item)}
|
|
71
71
|
</Badge>
|
|
72
72
|
))}
|
|
73
73
|
{value.length > 2 && (
|
|
74
|
-
<span className="text-[10px] text-muted-foreground">+{value.length - 2} more</span>
|
|
74
|
+
<span className="dy-text-[10px] dy-text-muted-foreground">+{value.length - 2} more</span>
|
|
75
75
|
)}
|
|
76
76
|
</div>
|
|
77
77
|
)
|
|
@@ -85,7 +85,7 @@ export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
|
85
85
|
|
|
86
86
|
if (entries.length > 0) {
|
|
87
87
|
return (
|
|
88
|
-
<span className="text-[11px] text-muted-foreground font-medium leading-tight">
|
|
88
|
+
<span className="dy-text-[11px] dy-text-muted-foreground dy-font-medium dy-leading-tight">
|
|
89
89
|
{entries.map(([k, v]) => `${k}: ${String(v)}`).join(", ")}
|
|
90
90
|
{Object.keys(value).length > 3 ? "..." : ""}
|
|
91
91
|
</span>
|
|
@@ -93,14 +93,14 @@ export function RenderCell({ value, field, client, schemas }: RenderCellProps) {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<span className="text-[11px] text-muted-foreground font-mono bg-muted/30 px-1 rounded">
|
|
96
|
+
<span className="dy-text-[11px] dy-text-muted-foreground dy-font-mono dy-bg-muted/30 dy-px-1 dy-rounded">
|
|
97
97
|
{JSON.stringify(value).slice(0, 30)}
|
|
98
98
|
{JSON.stringify(value).length > 30 ? "..." : ""}
|
|
99
99
|
</span>
|
|
100
100
|
)
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
return <span className="text-sm font-medium">{typeof value === 'object' ? JSON.stringify(value).slice(0, 50) : String(value)}</span>
|
|
103
|
+
return <span className="dy-text-sm dy-font-medium">{typeof value === 'object' ? JSON.stringify(value).slice(0, 50) : String(value)}</span>
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
function isUploadCollection(slug: string | undefined, schemas: any) {
|
|
@@ -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("relative overflow-hidden", className)}
|
|
12
|
+
className={cn("dy-relative dy-overflow-hidden", className)}
|
|
13
13
|
{...props}
|
|
14
14
|
>
|
|
15
|
-
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
|
|
15
|
+
<ScrollAreaPrimitive.Viewport className="dy-h-full dy-w-full dy-rounded-[inherit]">
|
|
16
16
|
{children}
|
|
17
17
|
</ScrollAreaPrimitive.Viewport>
|
|
18
18
|
<ScrollBar />
|
|
@@ -29,16 +29,16 @@ const ScrollBar = React.forwardRef<
|
|
|
29
29
|
ref={ref}
|
|
30
30
|
orientation={orientation}
|
|
31
31
|
className={cn(
|
|
32
|
-
"flex touch-none select-none transition-colors",
|
|
32
|
+
"dy-flex dy-touch-none dy-select-none dy-transition-colors",
|
|
33
33
|
orientation === "vertical" &&
|
|
34
|
-
"h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
34
|
+
"dy-h-full dy-w-2.5 dy-border-l dy-border-l-transparent dy-p-[1px]",
|
|
35
35
|
orientation === "horizontal" &&
|
|
36
|
-
"h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
36
|
+
"dy-h-2.5 dy-flex-col dy-border-t dy-border-t-transparent dy-p-[1px]",
|
|
37
37
|
className
|
|
38
38
|
)}
|
|
39
39
|
{...props}
|
|
40
40
|
>
|
|
41
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
|
41
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="dy-relative dy-flex-1 dy-rounded-full dy-bg-border" />
|
|
42
42
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
43
43
|
))
|
|
44
44
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
|
|
@@ -19,14 +19,14 @@ const SelectTrigger = React.forwardRef<
|
|
|
19
19
|
<SelectPrimitive.Trigger
|
|
20
20
|
ref={ref}
|
|
21
21
|
className={cn(
|
|
22
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
22
|
+
"dy-flex dy-h-10 dy-w-full dy-items-center dy-justify-between dy-rounded-md dy-border dy-border-input dy-bg-background dy-px-3 dy-py-2 dy-text-sm dy-ring-offset-background data-[placeholder]:dy-text-muted-foreground focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-cursor-not-allowed disabled:dy-opacity-50 [&>span]:dy-line-clamp-1",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
|
26
26
|
>
|
|
27
27
|
{children}
|
|
28
28
|
<SelectPrimitive.Icon asChild>
|
|
29
|
-
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
29
|
+
<ChevronDown className="dy-h-4 dy-w-4 dy-opacity-50" />
|
|
30
30
|
</SelectPrimitive.Icon>
|
|
31
31
|
</SelectPrimitive.Trigger>
|
|
32
32
|
))
|
|
@@ -39,12 +39,12 @@ const SelectScrollUpButton = React.forwardRef<
|
|
|
39
39
|
<SelectPrimitive.ScrollUpButton
|
|
40
40
|
ref={ref}
|
|
41
41
|
className={cn(
|
|
42
|
-
"flex cursor-default items-center justify-center py-1",
|
|
42
|
+
"dy-flex dy-cursor-default dy-items-center dy-justify-center dy-py-1",
|
|
43
43
|
className
|
|
44
44
|
)}
|
|
45
45
|
{...props}
|
|
46
46
|
>
|
|
47
|
-
<ChevronUp className="h-4 w-4" />
|
|
47
|
+
<ChevronUp className="dy-h-4 dy-w-4" />
|
|
48
48
|
</SelectPrimitive.ScrollUpButton>
|
|
49
49
|
))
|
|
50
50
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
|
@@ -56,12 +56,12 @@ const SelectScrollDownButton = React.forwardRef<
|
|
|
56
56
|
<SelectPrimitive.ScrollDownButton
|
|
57
57
|
ref={ref}
|
|
58
58
|
className={cn(
|
|
59
|
-
"flex cursor-default items-center justify-center py-1",
|
|
59
|
+
"dy-flex dy-cursor-default dy-items-center dy-justify-center dy-py-1",
|
|
60
60
|
className
|
|
61
61
|
)}
|
|
62
62
|
{...props}
|
|
63
63
|
>
|
|
64
|
-
<ChevronDown className="h-4 w-4" />
|
|
64
|
+
<ChevronDown className="dy-h-4 dy-w-4" />
|
|
65
65
|
</SelectPrimitive.ScrollDownButton>
|
|
66
66
|
))
|
|
67
67
|
SelectScrollDownButton.displayName =
|
|
@@ -75,9 +75,9 @@ const SelectContent = React.forwardRef<
|
|
|
75
75
|
<SelectPrimitive.Content
|
|
76
76
|
ref={ref}
|
|
77
77
|
className={cn(
|
|
78
|
-
"relative z-[100] max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-white text-popover-foreground 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]:translate-x-1 data-[side=top]
|
|
78
|
+
"dy-relative dy-z-[100] dy-max-h-[--radix-select-content-available-height] dy-min-w-[8rem] dy-overflow-y-auto dy-overflow-x-hidden dy-rounded-md dy-border dy-bg-white dy-text-popover-foreground dy-shadow-md data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-translate-x-1 data-[side=top]:dy--translate-y-1 dy-origin-[--radix-select-content-transform-origin]",
|
|
79
79
|
position === "popper" &&
|
|
80
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]
|
|
80
|
+
"data-[side=bottom]:dy-translate-y-1 data-[side=left]:dy--translate-x-1 data-[side=right]:dy-translate-x-1 data-[side=top]:dy--translate-y-1",
|
|
81
81
|
className
|
|
82
82
|
)}
|
|
83
83
|
position={position}
|
|
@@ -86,7 +86,7 @@ const SelectContent = React.forwardRef<
|
|
|
86
86
|
<SelectScrollUpButton />
|
|
87
87
|
<SelectPrimitive.Viewport
|
|
88
88
|
className={cn(
|
|
89
|
-
"p-1",
|
|
89
|
+
"dy-p-1",
|
|
90
90
|
position === "popper" &&
|
|
91
91
|
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
92
92
|
)}
|
|
@@ -105,7 +105,7 @@ const SelectLabel = React.forwardRef<
|
|
|
105
105
|
>(({ className, ...props }, ref) => (
|
|
106
106
|
<SelectPrimitive.Label
|
|
107
107
|
ref={ref}
|
|
108
|
-
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
108
|
+
className={cn("dy-py-1.5 dy-pl-8 dy-pr-2 dy-text-sm dy-font-semibold", className)}
|
|
109
109
|
{...props}
|
|
110
110
|
/>
|
|
111
111
|
))
|
|
@@ -118,14 +118,14 @@ const SelectItem = React.forwardRef<
|
|
|
118
118
|
<SelectPrimitive.Item
|
|
119
119
|
ref={ref}
|
|
120
120
|
className={cn(
|
|
121
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
121
|
+
"dy-relative dy-flex dy-w-full dy-cursor-default dy-select-none dy-items-center dy-rounded-sm dy-py-1.5 dy-pl-8 dy-pr-2 dy-text-sm dy-outline-none focus:dy-bg-accent focus:dy-text-accent-foreground data-[disabled]:dy-pointer-events-none data-[disabled]:dy-opacity-50",
|
|
122
122
|
className
|
|
123
123
|
)}
|
|
124
124
|
{...props}
|
|
125
125
|
>
|
|
126
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
126
|
+
<span className="dy-absolute dy-left-2 dy-flex dy-h-3.5 dy-w-3.5 dy-items-center dy-justify-center">
|
|
127
127
|
<SelectPrimitive.ItemIndicator>
|
|
128
|
-
<Check className="h-4 w-4" />
|
|
128
|
+
<Check className="dy-h-4 dy-w-4" />
|
|
129
129
|
</SelectPrimitive.ItemIndicator>
|
|
130
130
|
</span>
|
|
131
131
|
|
|
@@ -140,7 +140,7 @@ const SelectSeparator = React.forwardRef<
|
|
|
140
140
|
>(({ className, ...props }, ref) => (
|
|
141
141
|
<SelectPrimitive.Separator
|
|
142
142
|
ref={ref}
|
|
143
|
-
className={cn("
|
|
143
|
+
className={cn("dy--mx-1 dy-my-1 dy-h-px dy-bg-muted", className)}
|
|
144
144
|
{...props}
|
|
145
145
|
/>
|
|
146
146
|
))
|
|
@@ -16,8 +16,8 @@ const Separator = React.forwardRef<
|
|
|
16
16
|
decorative={decorative}
|
|
17
17
|
orientation={orientation}
|
|
18
18
|
className={cn(
|
|
19
|
-
"shrink-0 bg-border",
|
|
20
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
19
|
+
"dy-shrink-0 dy-bg-border",
|
|
20
|
+
orientation === "horizontal" ? "dy-h-[1px] dy-w-full" : "dy-h-full dy-w-[1px]",
|
|
21
21
|
className
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|
|
@@ -21,7 +21,7 @@ const SheetOverlay = React.forwardRef<
|
|
|
21
21
|
>(({ className, ...props }, ref) => (
|
|
22
22
|
<SheetPrimitive.Overlay
|
|
23
23
|
className={cn(
|
|
24
|
-
"fixed inset-0 z-50 bg-black/40 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
24
|
+
"dy-fixed dy-inset-0 dy-z-50 dy-bg-black/40 dy-backdrop-blur-[2px] data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0",
|
|
25
25
|
className
|
|
26
26
|
)}
|
|
27
27
|
{...props}
|
|
@@ -31,16 +31,16 @@ const SheetOverlay = React.forwardRef<
|
|
|
31
31
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
|
|
32
32
|
|
|
33
33
|
const sheetVariants = cva(
|
|
34
|
-
"fixed z-50 gap-4 bg-white p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
34
|
+
"dy-fixed dy-z-50 dy-gap-4 dy-bg-white dy-p-6 dy-shadow-2xl dy-transition dy-ease-in-out data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-duration-300 data-[state=open]:dy-duration-500",
|
|
35
35
|
{
|
|
36
36
|
variants: {
|
|
37
37
|
side: {
|
|
38
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
38
|
+
top: "dy-inset-x-0 dy-top-0 dy-border-b data-[state=closed]:dy-slide-out-to-top data-[state=open]:dy-slide-in-from-top",
|
|
39
39
|
bottom:
|
|
40
|
-
"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
41
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
40
|
+
"dy-inset-x-0 dy-bottom-0 dy-border-t data-[state=closed]:dy-slide-out-to-bottom data-[state=open]:dy-slide-in-from-bottom",
|
|
41
|
+
left: "dy-inset-y-0 dy-left-0 dy-h-full dy-w-3/4 dy-border-r data-[state=closed]:dy-slide-out-to-left data-[state=open]:dy-slide-in-from-left sm:dy-max-w-sm",
|
|
42
42
|
right:
|
|
43
|
-
"inset-y-0 right-0 h-full w-3/4
|
|
43
|
+
"dy-inset-y-0 dy-right-0 dy-h-full dy-w-3/4 dy-border-l data-[state=closed]:dy-slide-out-to-right data-[state=open]:dy-slide-in-from-right sm:dy-max-w-sm",
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
defaultVariants: {
|
|
@@ -65,9 +65,9 @@ const SheetContent = React.forwardRef<
|
|
|
65
65
|
{...props}
|
|
66
66
|
>
|
|
67
67
|
{children}
|
|
68
|
-
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
69
|
-
<X className="h-4 w-4" />
|
|
70
|
-
<span className="sr-only">Close</span>
|
|
68
|
+
<SheetPrimitive.Close className="dy-absolute dy-right-4 dy-top-4 dy-rounded-sm dy-opacity-70 dy-ring-offset-background dy-transition-opacity hover:dy-opacity-100 focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-pointer-events-none data-[state=open]:dy-bg-secondary">
|
|
69
|
+
<X className="dy-h-4 dy-w-4" />
|
|
70
|
+
<span className="dy-sr-only">Close</span>
|
|
71
71
|
</SheetPrimitive.Close>
|
|
72
72
|
</SheetPrimitive.Content>
|
|
73
73
|
</SheetPortal>
|
|
@@ -80,7 +80,7 @@ const SheetHeader = ({
|
|
|
80
80
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
81
81
|
<div
|
|
82
82
|
className={cn(
|
|
83
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
83
|
+
"dy-flex dy-flex-col dy-space-y-2 dy-text-center sm:dy-text-left",
|
|
84
84
|
className
|
|
85
85
|
)}
|
|
86
86
|
{...props}
|
|
@@ -94,7 +94,7 @@ const SheetFooter = ({
|
|
|
94
94
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
95
95
|
<div
|
|
96
96
|
className={cn(
|
|
97
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
97
|
+
"dy-flex dy-flex-col-reverse sm:dy-flex-row sm:dy-justify-end sm:dy-space-x-2",
|
|
98
98
|
className
|
|
99
99
|
)}
|
|
100
100
|
{...props}
|
|
@@ -108,7 +108,7 @@ const SheetTitle = React.forwardRef<
|
|
|
108
108
|
>(({ className, ...props }, ref) => (
|
|
109
109
|
<SheetPrimitive.Title
|
|
110
110
|
ref={ref}
|
|
111
|
-
className={cn("text-lg font-semibold text-foreground", className)}
|
|
111
|
+
className={cn("dy-text-lg dy-font-semibold dy-text-foreground", className)}
|
|
112
112
|
{...props}
|
|
113
113
|
/>
|
|
114
114
|
))
|
|
@@ -120,7 +120,7 @@ const SheetDescription = React.forwardRef<
|
|
|
120
120
|
>(({ className, ...props }, ref) => (
|
|
121
121
|
<SheetPrimitive.Description
|
|
122
122
|
ref={ref}
|
|
123
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
123
|
+
className={cn("dy-text-sm dy-text-muted-foreground", className)}
|
|
124
124
|
{...props}
|
|
125
125
|
/>
|
|
126
126
|
))
|