@authdog/react-elements 0.0.39 → 0.0.42
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/.eslintrc.js +1 -1
- package/.storybook/main.ts +21 -0
- package/.storybook/preview.ts +17 -0
- package/.storybook/vitest.setup.ts +7 -0
- package/.turbo/turbo-build.log +45 -42
- package/CHANGELOG.md +18 -0
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert.mjs.map +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar.mjs.map +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge.mjs.map +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card.mjs.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu.mjs +1 -1
- package/dist/components/ui/dropdown-menu.mjs.map +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input.mjs.map +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label.mjs.map +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator.mjs.map +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sheet.mjs.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +218 -8
- package/package.json +25 -14
- package/src/components/core/client-only.tsx +10 -15
- package/src/components/core/navbar.tsx +81 -50
- package/src/components/core/placeholder-alert.tsx +7 -9
- package/src/components/core/user-dropdown.tsx +117 -57
- package/src/components/core/user-profile.tsx +180 -86
- package/src/components/flow/login.tsx +42 -29
- package/src/components/flow/totp-validator.tsx +94 -73
- package/src/components/icons.tsx +15 -21
- package/src/components/ui/alert.tsx +11 -11
- package/src/components/ui/avatar.tsx +10 -10
- package/src/components/ui/badge.tsx +9 -9
- package/src/components/ui/card.tsx +13 -13
- package/src/components/ui/dropdown-menu.tsx +214 -211
- package/src/components/ui/input.tsx +5 -5
- package/src/components/ui/label.tsx +7 -7
- package/src/components/ui/separator.tsx +7 -7
- package/src/components/ui/sheet.tsx +21 -21
- package/src/index.ts +6 -6
- package/src/stories/core/Navbar.stories.tsx +45 -0
- package/src/stories/core/PlaceholderAlert.stories.tsx +23 -0
- package/src/stories/core/UserDropdown.stories.tsx +56 -0
- package/src/stories/core/UserProfile.stories.tsx +47 -0
- package/src/stories/flow/LoginForm.stories.tsx +20 -0
- package/src/stories/flow/TotpValidator.stories.tsx +23 -0
- package/src/stories/showcase/Landing.stories.tsx +376 -0
- package/src/stories/ui/Button.stories.tsx +45 -0
- package/tsup.config.ts +6 -9
- package/vitest.config.ts +39 -0
- package/vitest.shims.d.ts +1 -0
- package/wrangler.prod.toml +4 -0
- package/ladle.config.mjs +0 -21
- package/src/main.tsx +0 -11
- package/src/preview.tsx +0 -11
- package/src/stories/Button._stories.tsx +0 -24
- package/src/stories/LoginForm.stories.tsx +0 -29
- package/src/stories/Navbar._stories.tsx +0 -28
- package/src/stories/PlaceholderAlert._stories.tsx +0 -13
- package/src/stories/TotpValidator.stories.tsx +0 -14
- package/src/stories/UserDropdown.stories.tsx +0 -36
- package/src/stories/UserProfile.stories.tsx +0 -46
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
|
-
import type { ComponentType } from "react"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
6
|
+
import type { ComponentType } from "react";
|
|
7
7
|
|
|
8
|
-
import { cn } from "../../lib/utils"
|
|
8
|
+
import { cn } from "../../lib/utils";
|
|
9
9
|
|
|
10
|
-
const CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement
|
|
11
|
-
const CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement
|
|
12
|
-
const ChevronRightIcon = ChevronRight as ComponentType<
|
|
10
|
+
const CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
11
|
+
const CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
12
|
+
const ChevronRightIcon = ChevronRight as ComponentType<
|
|
13
|
+
React.SVGProps<SVGSVGElement>
|
|
14
|
+
>;
|
|
13
15
|
|
|
14
16
|
function DropdownMenu({
|
|
15
17
|
...props
|
|
16
18
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
17
|
-
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props}
|
|
19
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
function DropdownMenuPortal({
|
|
@@ -22,226 +24,227 @@ function DropdownMenuPortal({
|
|
|
22
24
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
23
25
|
return (
|
|
24
26
|
<DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
25
|
-
)
|
|
27
|
+
);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
function DropdownMenuContent({
|
|
40
|
-
className,
|
|
41
|
-
sideOffset = 4,
|
|
42
|
-
...props
|
|
43
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
44
|
-
return (
|
|
45
|
-
<DropdownMenuPrimitive.Portal>
|
|
46
|
-
<DropdownMenuPrimitive.Content
|
|
47
|
-
data-slot="dropdown-menu-content"
|
|
48
|
-
sideOffset={sideOffset}
|
|
49
|
-
className={cn(
|
|
50
|
-
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
</DropdownMenuPrimitive.Portal>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
30
|
+
const DropdownMenuTrigger = React.forwardRef<
|
|
31
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,
|
|
32
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>
|
|
33
|
+
>(({ ...props }, ref) => (
|
|
34
|
+
<DropdownMenuPrimitive.Trigger
|
|
35
|
+
ref={ref}
|
|
36
|
+
data-slot="dropdown-menu-trigger"
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
));
|
|
40
|
+
DropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
|
|
58
41
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
className,
|
|
69
|
-
inset,
|
|
70
|
-
variant = "default",
|
|
71
|
-
...props
|
|
72
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
73
|
-
inset?: boolean
|
|
74
|
-
variant?: "default" | "destructive"
|
|
75
|
-
}) {
|
|
76
|
-
return (
|
|
77
|
-
<DropdownMenuPrimitive.Item
|
|
78
|
-
data-slot="dropdown-menu-item"
|
|
79
|
-
data-inset={inset}
|
|
80
|
-
data-variant={variant}
|
|
42
|
+
const DropdownMenuContent = React.forwardRef<
|
|
43
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
44
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
45
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
46
|
+
<DropdownMenuPrimitive.Portal>
|
|
47
|
+
<DropdownMenuPrimitive.Content
|
|
48
|
+
ref={ref}
|
|
49
|
+
data-slot="dropdown-menu-content"
|
|
50
|
+
sideOffset={sideOffset}
|
|
81
51
|
className={cn(
|
|
82
|
-
"
|
|
83
|
-
className
|
|
52
|
+
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
53
|
+
className,
|
|
84
54
|
)}
|
|
85
55
|
{...props}
|
|
86
56
|
/>
|
|
87
|
-
|
|
88
|
-
|
|
57
|
+
</DropdownMenuPrimitive.Portal>
|
|
58
|
+
));
|
|
59
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
89
60
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
className
|
|
102
|
-
)}
|
|
103
|
-
checked={checked}
|
|
104
|
-
{...props}
|
|
105
|
-
>
|
|
106
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
107
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
108
|
-
<CheckIcon className="size-4" />
|
|
109
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
110
|
-
</span>
|
|
111
|
-
{children}
|
|
112
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
113
|
-
)
|
|
114
|
-
}
|
|
61
|
+
const DropdownMenuGroup = React.forwardRef<
|
|
62
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Group>,
|
|
63
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>
|
|
64
|
+
>(({ ...props }, ref) => (
|
|
65
|
+
<DropdownMenuPrimitive.Group
|
|
66
|
+
ref={ref}
|
|
67
|
+
data-slot="dropdown-menu-group"
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
));
|
|
71
|
+
DropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;
|
|
115
72
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
73
|
+
const DropdownMenuItem = React.forwardRef<
|
|
74
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
75
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
76
|
+
inset?: boolean;
|
|
77
|
+
variant?: "default" | "destructive";
|
|
78
|
+
}
|
|
79
|
+
>(({ className, inset, variant = "default", ...props }, ref) => (
|
|
80
|
+
<DropdownMenuPrimitive.Item
|
|
81
|
+
ref={ref}
|
|
82
|
+
data-slot="dropdown-menu-item"
|
|
83
|
+
data-inset={inset}
|
|
84
|
+
data-variant={variant}
|
|
85
|
+
className={cn(
|
|
86
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
87
|
+
className,
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
91
|
+
));
|
|
92
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
126
93
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
94
|
+
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
95
|
+
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
96
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
97
|
+
>(({ className, children, checked, ...props }, ref) => (
|
|
98
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
99
|
+
ref={ref}
|
|
100
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
101
|
+
className={cn(
|
|
102
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
103
|
+
className,
|
|
104
|
+
)}
|
|
105
|
+
checked={checked}
|
|
106
|
+
{...props}
|
|
107
|
+
>
|
|
108
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
109
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
110
|
+
<CheckIcon className="size-4" />
|
|
111
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
112
|
+
</span>
|
|
113
|
+
{children}
|
|
114
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
115
|
+
));
|
|
116
|
+
DropdownMenuCheckboxItem.displayName =
|
|
117
|
+
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
150
118
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
164
|
-
className
|
|
165
|
-
)}
|
|
166
|
-
{...props}
|
|
167
|
-
/>
|
|
168
|
-
)
|
|
169
|
-
}
|
|
119
|
+
const DropdownMenuRadioGroup = React.forwardRef<
|
|
120
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,
|
|
121
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>
|
|
122
|
+
>(({ ...props }, ref) => (
|
|
123
|
+
<DropdownMenuPrimitive.RadioGroup
|
|
124
|
+
ref={ref}
|
|
125
|
+
data-slot="dropdown-menu-radio-group"
|
|
126
|
+
{...props}
|
|
127
|
+
/>
|
|
128
|
+
));
|
|
129
|
+
DropdownMenuRadioGroup.displayName =
|
|
130
|
+
DropdownMenuPrimitive.RadioGroup.displayName;
|
|
170
131
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
132
|
+
const DropdownMenuRadioItem = React.forwardRef<
|
|
133
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
134
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
135
|
+
>(({ className, children, ...props }, ref) => (
|
|
136
|
+
<DropdownMenuPrimitive.RadioItem
|
|
137
|
+
ref={ref}
|
|
138
|
+
data-slot="dropdown-menu-radio-item"
|
|
139
|
+
className={cn(
|
|
140
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
141
|
+
className,
|
|
142
|
+
)}
|
|
143
|
+
{...props}
|
|
144
|
+
>
|
|
145
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
146
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
147
|
+
<CircleIcon className="size-2 fill-current" />
|
|
148
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
149
|
+
</span>
|
|
150
|
+
{children}
|
|
151
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
152
|
+
));
|
|
153
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
183
154
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
155
|
+
const DropdownMenuLabel = React.forwardRef<
|
|
156
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
157
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
158
|
+
inset?: boolean;
|
|
159
|
+
}
|
|
160
|
+
>(({ className, inset, ...props }, ref) => (
|
|
161
|
+
<DropdownMenuPrimitive.Label
|
|
162
|
+
ref={ref}
|
|
163
|
+
data-slot="dropdown-menu-label"
|
|
164
|
+
data-inset={inset}
|
|
165
|
+
className={cn(
|
|
166
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
167
|
+
className,
|
|
168
|
+
)}
|
|
169
|
+
{...props}
|
|
170
|
+
/>
|
|
171
|
+
));
|
|
172
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
173
|
+
|
|
174
|
+
const DropdownMenuSeparator = React.forwardRef<
|
|
175
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
176
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
177
|
+
>(({ className, ...props }, ref) => (
|
|
178
|
+
<DropdownMenuPrimitive.Separator
|
|
179
|
+
ref={ref}
|
|
180
|
+
data-slot="dropdown-menu-separator"
|
|
181
|
+
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
182
|
+
{...props}
|
|
183
|
+
/>
|
|
184
|
+
));
|
|
185
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
186
|
+
|
|
187
|
+
const DropdownMenuShortcut = React.forwardRef<
|
|
188
|
+
HTMLSpanElement,
|
|
189
|
+
React.ComponentPropsWithoutRef<"span">
|
|
190
|
+
>(({ className, ...props }, ref) => (
|
|
191
|
+
<span
|
|
192
|
+
ref={ref}
|
|
193
|
+
data-slot="dropdown-menu-shortcut"
|
|
194
|
+
className={cn(
|
|
195
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
196
|
+
className,
|
|
197
|
+
)}
|
|
198
|
+
{...props}
|
|
199
|
+
/>
|
|
200
|
+
));
|
|
201
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
199
202
|
|
|
200
203
|
function DropdownMenuSub({
|
|
201
204
|
...props
|
|
202
205
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
203
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props}
|
|
206
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
204
207
|
}
|
|
205
208
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
data-
|
|
218
|
-
className
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
209
|
+
const DropdownMenuSubTrigger = React.forwardRef<
|
|
210
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
211
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
212
|
+
inset?: boolean;
|
|
213
|
+
}
|
|
214
|
+
>(({ className, inset, children, ...props }, ref) => (
|
|
215
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
216
|
+
ref={ref}
|
|
217
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
218
|
+
data-inset={inset}
|
|
219
|
+
className={cn(
|
|
220
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
221
|
+
className,
|
|
222
|
+
)}
|
|
223
|
+
{...props}
|
|
224
|
+
>
|
|
225
|
+
{children}
|
|
226
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
227
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
228
|
+
));
|
|
229
|
+
DropdownMenuSubTrigger.displayName =
|
|
230
|
+
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
229
231
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
232
|
+
const DropdownMenuSubContent = React.forwardRef<
|
|
233
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
234
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
235
|
+
>(({ className, ...props }, ref) => (
|
|
236
|
+
<DropdownMenuPrimitive.SubContent
|
|
237
|
+
ref={ref}
|
|
238
|
+
data-slot="dropdown-menu-sub-content"
|
|
239
|
+
className={cn(
|
|
240
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
241
|
+
className,
|
|
242
|
+
)}
|
|
243
|
+
{...props}
|
|
244
|
+
/>
|
|
245
|
+
));
|
|
246
|
+
DropdownMenuSubContent.displayName =
|
|
247
|
+
DropdownMenuPrimitive.SubContent.displayName;
|
|
245
248
|
|
|
246
249
|
export {
|
|
247
250
|
DropdownMenu,
|
|
@@ -259,4 +262,4 @@ export {
|
|
|
259
262
|
DropdownMenuSub,
|
|
260
263
|
DropdownMenuSubTrigger,
|
|
261
264
|
DropdownMenuSubContent,
|
|
262
|
-
}
|
|
265
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react"
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
4
|
|
|
5
5
|
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
6
|
return (
|
|
@@ -11,11 +11,11 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
11
11
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
12
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
13
13
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
|
-
className
|
|
14
|
+
className,
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
17
17
|
/>
|
|
18
|
-
)
|
|
18
|
+
);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export { Input }
|
|
21
|
+
export { Input };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
7
|
|
|
8
8
|
function Label({
|
|
9
9
|
className,
|
|
@@ -14,11 +14,11 @@ function Label({
|
|
|
14
14
|
data-slot="label"
|
|
15
15
|
className={cn(
|
|
16
16
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
17
|
-
className
|
|
17
|
+
className,
|
|
18
18
|
)}
|
|
19
19
|
{...props}
|
|
20
20
|
/>
|
|
21
|
-
)
|
|
21
|
+
);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export { Label }
|
|
24
|
+
export { Label };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
7
|
|
|
8
8
|
function Separator({
|
|
9
9
|
className,
|
|
@@ -18,11 +18,11 @@ function Separator({
|
|
|
18
18
|
orientation={orientation}
|
|
19
19
|
className={cn(
|
|
20
20
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
21
|
-
className
|
|
21
|
+
className,
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|
|
24
24
|
/>
|
|
25
|
-
)
|
|
25
|
+
);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export { Separator }
|
|
28
|
+
export { Separator };
|