@devfellowship/components 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks.cjs +174 -0
- package/dist/hooks.d.cts +35 -0
- package/dist/hooks.d.ts +35 -0
- package/dist/hooks.js +140 -0
- package/dist/index.cjs +2392 -0
- package/dist/index.d.cts +400 -0
- package/dist/index.d.ts +400 -0
- package/dist/index.js +2219 -0
- package/dist/providers.cjs +168 -0
- package/dist/providers.d.cts +15 -0
- package/dist/providers.d.ts +15 -0
- package/dist/providers.js +148 -0
- package/dist/styles/tailwind.css +84 -0
- package/dist/styles/theme.css +185 -0
- package/dist/use-auth-DdapDv2H.d.cts +39 -0
- package/dist/use-auth-DdapDv2H.d.ts +39 -0
- package/dist/utils-Cbsgs0XP.d.cts +5 -0
- package/dist/utils-Cbsgs0XP.d.ts +5 -0
- package/dist/utils.cjs +108 -0
- package/dist/utils.d.cts +26 -0
- package/dist/utils.d.ts +26 -0
- package/dist/utils.js +74 -0
- package/package.json +113 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2219 @@
|
|
|
1
|
+
// src/components/accordion.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
4
|
+
import { ChevronDown } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
// src/lib/utils.ts
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { twMerge } from "tailwind-merge";
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/components/accordion.tsx
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var Accordion = AccordionPrimitive.Root;
|
|
16
|
+
var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ref, className: cn("border-b", className), ...props }));
|
|
17
|
+
AccordionItem.displayName = "AccordionItem";
|
|
18
|
+
var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
19
|
+
AccordionPrimitive.Trigger,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cn(
|
|
23
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
children,
|
|
29
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
) }));
|
|
33
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
34
|
+
var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
35
|
+
AccordionPrimitive.Content,
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
39
|
+
...props,
|
|
40
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
41
|
+
}
|
|
42
|
+
));
|
|
43
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
44
|
+
|
|
45
|
+
// src/components/alert.tsx
|
|
46
|
+
import * as React2 from "react";
|
|
47
|
+
import { cva } from "class-variance-authority";
|
|
48
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
49
|
+
var alertVariants = cva(
|
|
50
|
+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
51
|
+
{
|
|
52
|
+
variants: {
|
|
53
|
+
variant: {
|
|
54
|
+
default: "bg-background text-foreground",
|
|
55
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "default"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
var Alert = React2.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
64
|
+
Alert.displayName = "Alert";
|
|
65
|
+
var AlertTitle = React2.forwardRef(
|
|
66
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("h5", { ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })
|
|
67
|
+
);
|
|
68
|
+
AlertTitle.displayName = "AlertTitle";
|
|
69
|
+
var AlertDescription = React2.forwardRef(
|
|
70
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })
|
|
71
|
+
);
|
|
72
|
+
AlertDescription.displayName = "AlertDescription";
|
|
73
|
+
|
|
74
|
+
// src/components/avatar.tsx
|
|
75
|
+
import * as React3 from "react";
|
|
76
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
77
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
78
|
+
var Avatar = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
79
|
+
AvatarPrimitive.Root,
|
|
80
|
+
{
|
|
81
|
+
ref,
|
|
82
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
));
|
|
86
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
87
|
+
var AvatarImage = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(AvatarPrimitive.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props }));
|
|
88
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
89
|
+
var AvatarFallback = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
90
|
+
AvatarPrimitive.Fallback,
|
|
91
|
+
{
|
|
92
|
+
ref,
|
|
93
|
+
className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className),
|
|
94
|
+
...props
|
|
95
|
+
}
|
|
96
|
+
));
|
|
97
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
98
|
+
|
|
99
|
+
// src/components/badge.tsx
|
|
100
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
101
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
102
|
+
var badgeVariants = cva2(
|
|
103
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
104
|
+
{
|
|
105
|
+
variants: {
|
|
106
|
+
variant: {
|
|
107
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
108
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
109
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
110
|
+
outline: "text-foreground"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
defaultVariants: {
|
|
114
|
+
variant: "default"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
function Badge({ className, variant, ...props }) {
|
|
119
|
+
return /* @__PURE__ */ jsx4("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// src/components/breadcrumb.tsx
|
|
123
|
+
import * as React4 from "react";
|
|
124
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
125
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
126
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
127
|
+
var Breadcrumb = React4.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx5("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
128
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
129
|
+
var BreadcrumbList = React4.forwardRef(
|
|
130
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
131
|
+
"ol",
|
|
132
|
+
{
|
|
133
|
+
ref,
|
|
134
|
+
className: cn(
|
|
135
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
136
|
+
className
|
|
137
|
+
),
|
|
138
|
+
...props
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
);
|
|
142
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
143
|
+
var BreadcrumbItem = React4.forwardRef(
|
|
144
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx5("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
145
|
+
);
|
|
146
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
147
|
+
var BreadcrumbLink = React4.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
148
|
+
const Comp = asChild ? Slot : "a";
|
|
149
|
+
return /* @__PURE__ */ jsx5(Comp, { ref, className: cn("transition-colors hover:text-foreground", className), ...props });
|
|
150
|
+
});
|
|
151
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
152
|
+
var BreadcrumbPage = React4.forwardRef(
|
|
153
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
ref,
|
|
157
|
+
role: "link",
|
|
158
|
+
"aria-disabled": "true",
|
|
159
|
+
"aria-current": "page",
|
|
160
|
+
className: cn("font-normal text-foreground", className),
|
|
161
|
+
...props
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
);
|
|
165
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
166
|
+
var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx5("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? /* @__PURE__ */ jsx5(ChevronRight, {}) });
|
|
167
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
168
|
+
var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs2(
|
|
169
|
+
"span",
|
|
170
|
+
{
|
|
171
|
+
role: "presentation",
|
|
172
|
+
"aria-hidden": "true",
|
|
173
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
174
|
+
...props,
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ jsx5(MoreHorizontal, { className: "h-4 w-4" }),
|
|
177
|
+
/* @__PURE__ */ jsx5("span", { className: "sr-only", children: "More" })
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
182
|
+
|
|
183
|
+
// src/components/button.tsx
|
|
184
|
+
import * as React5 from "react";
|
|
185
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
186
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
187
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
188
|
+
var buttonVariants = cva3(
|
|
189
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
190
|
+
{
|
|
191
|
+
variants: {
|
|
192
|
+
variant: {
|
|
193
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
194
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
195
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
196
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
197
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
198
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
199
|
+
},
|
|
200
|
+
size: {
|
|
201
|
+
default: "h-10 px-4 py-2",
|
|
202
|
+
sm: "h-9 rounded-md px-3",
|
|
203
|
+
lg: "h-11 rounded-md px-8",
|
|
204
|
+
icon: "h-10 w-10"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
defaultVariants: {
|
|
208
|
+
variant: "default",
|
|
209
|
+
size: "default"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
var Button = React5.forwardRef(
|
|
214
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
215
|
+
const Comp = asChild ? Slot2 : "button";
|
|
216
|
+
return /* @__PURE__ */ jsx6(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
Button.displayName = "Button";
|
|
220
|
+
|
|
221
|
+
// src/components/card.tsx
|
|
222
|
+
import * as React6 from "react";
|
|
223
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
224
|
+
var Card = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props }));
|
|
225
|
+
Card.displayName = "Card";
|
|
226
|
+
var CardHeader = React6.forwardRef(
|
|
227
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
228
|
+
);
|
|
229
|
+
CardHeader.displayName = "CardHeader";
|
|
230
|
+
var CardTitle = React6.forwardRef(
|
|
231
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
|
|
232
|
+
);
|
|
233
|
+
CardTitle.displayName = "CardTitle";
|
|
234
|
+
var CardDescription = React6.forwardRef(
|
|
235
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
236
|
+
);
|
|
237
|
+
CardDescription.displayName = "CardDescription";
|
|
238
|
+
var CardContent = React6.forwardRef(
|
|
239
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
240
|
+
);
|
|
241
|
+
CardContent.displayName = "CardContent";
|
|
242
|
+
var CardFooter = React6.forwardRef(
|
|
243
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
244
|
+
);
|
|
245
|
+
CardFooter.displayName = "CardFooter";
|
|
246
|
+
|
|
247
|
+
// src/components/checkbox.tsx
|
|
248
|
+
import * as React7 from "react";
|
|
249
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
250
|
+
import { Check } from "lucide-react";
|
|
251
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
252
|
+
var Checkbox = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
253
|
+
CheckboxPrimitive.Root,
|
|
254
|
+
{
|
|
255
|
+
ref,
|
|
256
|
+
className: cn(
|
|
257
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
258
|
+
className
|
|
259
|
+
),
|
|
260
|
+
...props,
|
|
261
|
+
children: /* @__PURE__ */ jsx8(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsx8(Check, { className: "h-4 w-4" }) })
|
|
262
|
+
}
|
|
263
|
+
));
|
|
264
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
265
|
+
|
|
266
|
+
// src/components/dialog.tsx
|
|
267
|
+
import * as React8 from "react";
|
|
268
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
269
|
+
import { X } from "lucide-react";
|
|
270
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
271
|
+
var Dialog = DialogPrimitive.Root;
|
|
272
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
273
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
274
|
+
var DialogClose = DialogPrimitive.Close;
|
|
275
|
+
var DialogOverlay = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
276
|
+
DialogPrimitive.Overlay,
|
|
277
|
+
{
|
|
278
|
+
ref,
|
|
279
|
+
className: cn(
|
|
280
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
281
|
+
className
|
|
282
|
+
),
|
|
283
|
+
...props
|
|
284
|
+
}
|
|
285
|
+
));
|
|
286
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
287
|
+
var DialogContent = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(DialogPortal, { children: [
|
|
288
|
+
/* @__PURE__ */ jsx9(DialogOverlay, {}),
|
|
289
|
+
/* @__PURE__ */ jsxs3(
|
|
290
|
+
DialogPrimitive.Content,
|
|
291
|
+
{
|
|
292
|
+
ref,
|
|
293
|
+
className: cn(
|
|
294
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
295
|
+
className
|
|
296
|
+
),
|
|
297
|
+
...props,
|
|
298
|
+
children: [
|
|
299
|
+
children,
|
|
300
|
+
/* @__PURE__ */ jsxs3(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
301
|
+
/* @__PURE__ */ jsx9(X, { className: "h-4 w-4" }),
|
|
302
|
+
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: "Close" })
|
|
303
|
+
] })
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
] }));
|
|
308
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
309
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx9("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
310
|
+
DialogHeader.displayName = "DialogHeader";
|
|
311
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx9("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
312
|
+
DialogFooter.displayName = "DialogFooter";
|
|
313
|
+
var DialogTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
314
|
+
DialogPrimitive.Title,
|
|
315
|
+
{
|
|
316
|
+
ref,
|
|
317
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
318
|
+
...props
|
|
319
|
+
}
|
|
320
|
+
));
|
|
321
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
322
|
+
var DialogDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
323
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
324
|
+
|
|
325
|
+
// src/components/dropdown-menu.tsx
|
|
326
|
+
import * as React9 from "react";
|
|
327
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
328
|
+
import { Check as Check2, ChevronRight as ChevronRight2, Circle } from "lucide-react";
|
|
329
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
330
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
331
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
332
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
333
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
334
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
335
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
336
|
+
var DropdownMenuSubTrigger = React9.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
|
|
337
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
338
|
+
{
|
|
339
|
+
ref,
|
|
340
|
+
className: cn(
|
|
341
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",
|
|
342
|
+
inset && "pl-8",
|
|
343
|
+
className
|
|
344
|
+
),
|
|
345
|
+
...props,
|
|
346
|
+
children: [
|
|
347
|
+
children,
|
|
348
|
+
/* @__PURE__ */ jsx10(ChevronRight2, { className: "ml-auto h-4 w-4" })
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
));
|
|
352
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
353
|
+
var DropdownMenuSubContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
354
|
+
DropdownMenuPrimitive.SubContent,
|
|
355
|
+
{
|
|
356
|
+
ref,
|
|
357
|
+
className: cn(
|
|
358
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
|
|
359
|
+
className
|
|
360
|
+
),
|
|
361
|
+
...props
|
|
362
|
+
}
|
|
363
|
+
));
|
|
364
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
365
|
+
var DropdownMenuContent = React9.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx10(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx10(
|
|
366
|
+
DropdownMenuPrimitive.Content,
|
|
367
|
+
{
|
|
368
|
+
ref,
|
|
369
|
+
sideOffset,
|
|
370
|
+
className: cn(
|
|
371
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
372
|
+
className
|
|
373
|
+
),
|
|
374
|
+
...props
|
|
375
|
+
}
|
|
376
|
+
) }));
|
|
377
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
378
|
+
var DropdownMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
379
|
+
DropdownMenuPrimitive.Item,
|
|
380
|
+
{
|
|
381
|
+
ref,
|
|
382
|
+
className: cn(
|
|
383
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
384
|
+
inset && "pl-8",
|
|
385
|
+
className
|
|
386
|
+
),
|
|
387
|
+
...props
|
|
388
|
+
}
|
|
389
|
+
));
|
|
390
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
391
|
+
var DropdownMenuCheckboxItem = React9.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs4(
|
|
392
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
393
|
+
{
|
|
394
|
+
ref,
|
|
395
|
+
className: cn(
|
|
396
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
397
|
+
className
|
|
398
|
+
),
|
|
399
|
+
checked,
|
|
400
|
+
...props,
|
|
401
|
+
children: [
|
|
402
|
+
/* @__PURE__ */ jsx10("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx10(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx10(Check2, { className: "h-4 w-4" }) }) }),
|
|
403
|
+
children
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
));
|
|
407
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
408
|
+
var DropdownMenuRadioItem = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
|
|
409
|
+
DropdownMenuPrimitive.RadioItem,
|
|
410
|
+
{
|
|
411
|
+
ref,
|
|
412
|
+
className: cn(
|
|
413
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
414
|
+
className
|
|
415
|
+
),
|
|
416
|
+
...props,
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ jsx10("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx10(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx10(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
419
|
+
children
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
));
|
|
423
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
424
|
+
var DropdownMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
425
|
+
DropdownMenuPrimitive.Label,
|
|
426
|
+
{
|
|
427
|
+
ref,
|
|
428
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
429
|
+
...props
|
|
430
|
+
}
|
|
431
|
+
));
|
|
432
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
433
|
+
var DropdownMenuSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
434
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
435
|
+
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
436
|
+
return /* @__PURE__ */ jsx10("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
437
|
+
};
|
|
438
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
439
|
+
|
|
440
|
+
// src/components/form.tsx
|
|
441
|
+
import * as React11 from "react";
|
|
442
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
443
|
+
import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
|
444
|
+
|
|
445
|
+
// src/components/label.tsx
|
|
446
|
+
import * as React10 from "react";
|
|
447
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
448
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
449
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
450
|
+
var labelVariants = cva4("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
451
|
+
var Label2 = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
452
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
453
|
+
|
|
454
|
+
// src/components/form.tsx
|
|
455
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
456
|
+
var Form = FormProvider;
|
|
457
|
+
var FormFieldContext = React11.createContext({});
|
|
458
|
+
var FormField = ({
|
|
459
|
+
...props
|
|
460
|
+
}) => {
|
|
461
|
+
return /* @__PURE__ */ jsx12(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx12(Controller, { ...props }) });
|
|
462
|
+
};
|
|
463
|
+
var useFormField = () => {
|
|
464
|
+
const fieldContext = React11.useContext(FormFieldContext);
|
|
465
|
+
const itemContext = React11.useContext(FormItemContext);
|
|
466
|
+
const { getFieldState, formState } = useFormContext();
|
|
467
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
468
|
+
if (!fieldContext) {
|
|
469
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
470
|
+
}
|
|
471
|
+
const { id } = itemContext;
|
|
472
|
+
return {
|
|
473
|
+
id,
|
|
474
|
+
name: fieldContext.name,
|
|
475
|
+
formItemId: `${id}-form-item`,
|
|
476
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
477
|
+
formMessageId: `${id}-form-item-message`,
|
|
478
|
+
...fieldState
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
var FormItemContext = React11.createContext({});
|
|
482
|
+
var FormItem = React11.forwardRef(
|
|
483
|
+
({ className, ...props }, ref) => {
|
|
484
|
+
const id = React11.useId();
|
|
485
|
+
return /* @__PURE__ */ jsx12(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx12("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
486
|
+
}
|
|
487
|
+
);
|
|
488
|
+
FormItem.displayName = "FormItem";
|
|
489
|
+
var FormLabel = React11.forwardRef(({ className, ...props }, ref) => {
|
|
490
|
+
const { error, formItemId } = useFormField();
|
|
491
|
+
return /* @__PURE__ */ jsx12(Label2, { ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props });
|
|
492
|
+
});
|
|
493
|
+
FormLabel.displayName = "FormLabel";
|
|
494
|
+
var FormControl = React11.forwardRef(
|
|
495
|
+
({ ...props }, ref) => {
|
|
496
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
497
|
+
return /* @__PURE__ */ jsx12(
|
|
498
|
+
Slot3,
|
|
499
|
+
{
|
|
500
|
+
ref,
|
|
501
|
+
id: formItemId,
|
|
502
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
503
|
+
"aria-invalid": !!error,
|
|
504
|
+
...props
|
|
505
|
+
}
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
FormControl.displayName = "FormControl";
|
|
510
|
+
var FormDescription = React11.forwardRef(
|
|
511
|
+
({ className, ...props }, ref) => {
|
|
512
|
+
const { formDescriptionId } = useFormField();
|
|
513
|
+
return /* @__PURE__ */ jsx12("p", { ref, id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props });
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
FormDescription.displayName = "FormDescription";
|
|
517
|
+
var FormMessage = React11.forwardRef(
|
|
518
|
+
({ className, children, ...props }, ref) => {
|
|
519
|
+
const { error, formMessageId } = useFormField();
|
|
520
|
+
const body = error ? String(error?.message) : children;
|
|
521
|
+
if (!body) {
|
|
522
|
+
return null;
|
|
523
|
+
}
|
|
524
|
+
return /* @__PURE__ */ jsx12("p", { ref, id: formMessageId, className: cn("text-sm font-medium text-destructive", className), ...props, children: body });
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
FormMessage.displayName = "FormMessage";
|
|
528
|
+
|
|
529
|
+
// src/components/input.tsx
|
|
530
|
+
import * as React12 from "react";
|
|
531
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
532
|
+
var Input = React12.forwardRef(
|
|
533
|
+
({ className, type, ...props }, ref) => {
|
|
534
|
+
return /* @__PURE__ */ jsx13(
|
|
535
|
+
"input",
|
|
536
|
+
{
|
|
537
|
+
type,
|
|
538
|
+
className: cn(
|
|
539
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
540
|
+
className
|
|
541
|
+
),
|
|
542
|
+
ref,
|
|
543
|
+
...props
|
|
544
|
+
}
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
);
|
|
548
|
+
Input.displayName = "Input";
|
|
549
|
+
|
|
550
|
+
// src/components/popover.tsx
|
|
551
|
+
import * as React13 from "react";
|
|
552
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
553
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
554
|
+
var Popover = PopoverPrimitive.Root;
|
|
555
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
556
|
+
var PopoverContent = React13.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx14(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx14(
|
|
557
|
+
PopoverPrimitive.Content,
|
|
558
|
+
{
|
|
559
|
+
ref,
|
|
560
|
+
align,
|
|
561
|
+
sideOffset,
|
|
562
|
+
className: cn(
|
|
563
|
+
"z-50 w-72 rounded-md border bg-popover 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",
|
|
564
|
+
className
|
|
565
|
+
),
|
|
566
|
+
...props
|
|
567
|
+
}
|
|
568
|
+
) }));
|
|
569
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
570
|
+
|
|
571
|
+
// src/components/progress.tsx
|
|
572
|
+
import * as React14 from "react";
|
|
573
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
574
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
575
|
+
var Progress = React14.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
576
|
+
ProgressPrimitive.Root,
|
|
577
|
+
{
|
|
578
|
+
ref,
|
|
579
|
+
className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className),
|
|
580
|
+
...props,
|
|
581
|
+
children: /* @__PURE__ */ jsx15(
|
|
582
|
+
ProgressPrimitive.Indicator,
|
|
583
|
+
{
|
|
584
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
585
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
586
|
+
}
|
|
587
|
+
)
|
|
588
|
+
}
|
|
589
|
+
));
|
|
590
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
591
|
+
|
|
592
|
+
// src/components/radio-group.tsx
|
|
593
|
+
import * as React15 from "react";
|
|
594
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
595
|
+
import { Circle as Circle2 } from "lucide-react";
|
|
596
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
597
|
+
var RadioGroup2 = React15.forwardRef(({ className, ...props }, ref) => {
|
|
598
|
+
return /* @__PURE__ */ jsx16(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref });
|
|
599
|
+
});
|
|
600
|
+
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
601
|
+
var RadioGroupItem = React15.forwardRef(({ className, ...props }, ref) => {
|
|
602
|
+
return /* @__PURE__ */ jsx16(
|
|
603
|
+
RadioGroupPrimitive.Item,
|
|
604
|
+
{
|
|
605
|
+
ref,
|
|
606
|
+
className: cn(
|
|
607
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
608
|
+
className
|
|
609
|
+
),
|
|
610
|
+
...props,
|
|
611
|
+
children: /* @__PURE__ */ jsx16(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx16(Circle2, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
612
|
+
}
|
|
613
|
+
);
|
|
614
|
+
});
|
|
615
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
616
|
+
|
|
617
|
+
// src/components/scroll-area.tsx
|
|
618
|
+
import * as React16 from "react";
|
|
619
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
620
|
+
import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
621
|
+
var ScrollArea = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(ScrollAreaPrimitive.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
|
|
622
|
+
/* @__PURE__ */ jsx17(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
623
|
+
/* @__PURE__ */ jsx17(ScrollBar, {}),
|
|
624
|
+
/* @__PURE__ */ jsx17(ScrollAreaPrimitive.Corner, {})
|
|
625
|
+
] }));
|
|
626
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
627
|
+
var ScrollBar = React16.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
628
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
629
|
+
{
|
|
630
|
+
ref,
|
|
631
|
+
orientation,
|
|
632
|
+
className: cn(
|
|
633
|
+
"flex touch-none select-none transition-colors",
|
|
634
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
635
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
636
|
+
className
|
|
637
|
+
),
|
|
638
|
+
...props,
|
|
639
|
+
children: /* @__PURE__ */ jsx17(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
640
|
+
}
|
|
641
|
+
));
|
|
642
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
643
|
+
|
|
644
|
+
// src/components/select.tsx
|
|
645
|
+
import * as React17 from "react";
|
|
646
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
647
|
+
import { Check as Check3, ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
648
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
649
|
+
var Select = SelectPrimitive.Root;
|
|
650
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
651
|
+
var SelectValue = SelectPrimitive.Value;
|
|
652
|
+
var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
653
|
+
SelectPrimitive.Trigger,
|
|
654
|
+
{
|
|
655
|
+
ref,
|
|
656
|
+
className: cn(
|
|
657
|
+
"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 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",
|
|
658
|
+
className
|
|
659
|
+
),
|
|
660
|
+
...props,
|
|
661
|
+
children: [
|
|
662
|
+
children,
|
|
663
|
+
/* @__PURE__ */ jsx18(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx18(ChevronDown2, { className: "h-4 w-4 opacity-50" }) })
|
|
664
|
+
]
|
|
665
|
+
}
|
|
666
|
+
));
|
|
667
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
668
|
+
var SelectScrollUpButton = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
669
|
+
SelectPrimitive.ScrollUpButton,
|
|
670
|
+
{
|
|
671
|
+
ref,
|
|
672
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
673
|
+
...props,
|
|
674
|
+
children: /* @__PURE__ */ jsx18(ChevronUp, { className: "h-4 w-4" })
|
|
675
|
+
}
|
|
676
|
+
));
|
|
677
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
678
|
+
var SelectScrollDownButton = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
679
|
+
SelectPrimitive.ScrollDownButton,
|
|
680
|
+
{
|
|
681
|
+
ref,
|
|
682
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
683
|
+
...props,
|
|
684
|
+
children: /* @__PURE__ */ jsx18(ChevronDown2, { className: "h-4 w-4" })
|
|
685
|
+
}
|
|
686
|
+
));
|
|
687
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
688
|
+
var SelectContent = React17.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx18(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs6(
|
|
689
|
+
SelectPrimitive.Content,
|
|
690
|
+
{
|
|
691
|
+
ref,
|
|
692
|
+
className: cn(
|
|
693
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
694
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
695
|
+
className
|
|
696
|
+
),
|
|
697
|
+
position,
|
|
698
|
+
...props,
|
|
699
|
+
children: [
|
|
700
|
+
/* @__PURE__ */ jsx18(SelectScrollUpButton, {}),
|
|
701
|
+
/* @__PURE__ */ jsx18(
|
|
702
|
+
SelectPrimitive.Viewport,
|
|
703
|
+
{
|
|
704
|
+
className: cn(
|
|
705
|
+
"p-1",
|
|
706
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
707
|
+
),
|
|
708
|
+
children
|
|
709
|
+
}
|
|
710
|
+
),
|
|
711
|
+
/* @__PURE__ */ jsx18(SelectScrollDownButton, {})
|
|
712
|
+
]
|
|
713
|
+
}
|
|
714
|
+
) }));
|
|
715
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
716
|
+
var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(SelectPrimitive.Label, { ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props }));
|
|
717
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
718
|
+
var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
719
|
+
SelectPrimitive.Item,
|
|
720
|
+
{
|
|
721
|
+
ref,
|
|
722
|
+
className: cn(
|
|
723
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
724
|
+
className
|
|
725
|
+
),
|
|
726
|
+
...props,
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ jsx18("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx18(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx18(Check3, { className: "h-4 w-4" }) }) }),
|
|
729
|
+
/* @__PURE__ */ jsx18(SelectPrimitive.ItemText, { children })
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
));
|
|
733
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
734
|
+
var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
735
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
736
|
+
|
|
737
|
+
// src/components/separator.tsx
|
|
738
|
+
import * as React18 from "react";
|
|
739
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
740
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
741
|
+
var Separator3 = React18.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
742
|
+
SeparatorPrimitive.Root,
|
|
743
|
+
{
|
|
744
|
+
ref,
|
|
745
|
+
decorative,
|
|
746
|
+
orientation,
|
|
747
|
+
className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
|
|
748
|
+
...props
|
|
749
|
+
}
|
|
750
|
+
));
|
|
751
|
+
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
752
|
+
|
|
753
|
+
// src/components/sheet.tsx
|
|
754
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
755
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
756
|
+
import { X as X2 } from "lucide-react";
|
|
757
|
+
import * as React19 from "react";
|
|
758
|
+
import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
759
|
+
var Sheet = SheetPrimitive.Root;
|
|
760
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
761
|
+
var SheetClose = SheetPrimitive.Close;
|
|
762
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
763
|
+
var SheetOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
764
|
+
SheetPrimitive.Overlay,
|
|
765
|
+
{
|
|
766
|
+
className: cn(
|
|
767
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
768
|
+
className
|
|
769
|
+
),
|
|
770
|
+
...props,
|
|
771
|
+
ref
|
|
772
|
+
}
|
|
773
|
+
));
|
|
774
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
775
|
+
var sheetVariants = cva5(
|
|
776
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
777
|
+
{
|
|
778
|
+
variants: {
|
|
779
|
+
side: {
|
|
780
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
781
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
782
|
+
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",
|
|
783
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
defaultVariants: {
|
|
787
|
+
side: "right"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
);
|
|
791
|
+
var SheetContent = React19.forwardRef(
|
|
792
|
+
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(SheetPortal, { children: [
|
|
793
|
+
/* @__PURE__ */ jsx20(SheetOverlay, {}),
|
|
794
|
+
/* @__PURE__ */ jsxs7(SheetPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
795
|
+
children,
|
|
796
|
+
/* @__PURE__ */ jsxs7(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
797
|
+
/* @__PURE__ */ jsx20(X2, { className: "h-4 w-4" }),
|
|
798
|
+
/* @__PURE__ */ jsx20("span", { className: "sr-only", children: "Close" })
|
|
799
|
+
] })
|
|
800
|
+
] })
|
|
801
|
+
] })
|
|
802
|
+
);
|
|
803
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
804
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx20("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
805
|
+
SheetHeader.displayName = "SheetHeader";
|
|
806
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx20("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
807
|
+
SheetFooter.displayName = "SheetFooter";
|
|
808
|
+
var SheetTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(SheetPrimitive.Title, { ref, className: cn("text-lg font-semibold text-foreground", className), ...props }));
|
|
809
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
810
|
+
var SheetDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(SheetPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
811
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
812
|
+
|
|
813
|
+
// src/components/sidebar.tsx
|
|
814
|
+
import * as React22 from "react";
|
|
815
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
816
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
817
|
+
import { PanelLeft } from "lucide-react";
|
|
818
|
+
|
|
819
|
+
// src/hooks/use-mobile.ts
|
|
820
|
+
import * as React20 from "react";
|
|
821
|
+
var MOBILE_BREAKPOINT = 768;
|
|
822
|
+
function useIsMobile() {
|
|
823
|
+
const [isMobile, setIsMobile] = React20.useState(void 0);
|
|
824
|
+
React20.useEffect(() => {
|
|
825
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
826
|
+
const onChange = () => {
|
|
827
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
828
|
+
};
|
|
829
|
+
mql.addEventListener("change", onChange);
|
|
830
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
831
|
+
return () => mql.removeEventListener("change", onChange);
|
|
832
|
+
}, []);
|
|
833
|
+
return !!isMobile;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
// src/components/skeleton.tsx
|
|
837
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
838
|
+
function Skeleton({ className, ...props }) {
|
|
839
|
+
return /* @__PURE__ */ jsx21("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// src/components/tooltip.tsx
|
|
843
|
+
import * as React21 from "react";
|
|
844
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
845
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
846
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
847
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
848
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
849
|
+
var TooltipContent = React21.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
850
|
+
TooltipPrimitive.Content,
|
|
851
|
+
{
|
|
852
|
+
ref,
|
|
853
|
+
sideOffset,
|
|
854
|
+
className: cn(
|
|
855
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
856
|
+
className
|
|
857
|
+
),
|
|
858
|
+
...props
|
|
859
|
+
}
|
|
860
|
+
));
|
|
861
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
862
|
+
|
|
863
|
+
// src/components/sidebar.tsx
|
|
864
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
865
|
+
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
866
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
867
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
868
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
869
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
870
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
871
|
+
var SidebarContext = React22.createContext(null);
|
|
872
|
+
function useSidebar() {
|
|
873
|
+
const context = React22.useContext(SidebarContext);
|
|
874
|
+
if (!context) {
|
|
875
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
876
|
+
}
|
|
877
|
+
return context;
|
|
878
|
+
}
|
|
879
|
+
var SidebarProvider = React22.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
880
|
+
const isMobile = useIsMobile();
|
|
881
|
+
const [openMobile, setOpenMobile] = React22.useState(false);
|
|
882
|
+
const [_open, _setOpen] = React22.useState(defaultOpen);
|
|
883
|
+
const open = openProp ?? _open;
|
|
884
|
+
const setOpen = React22.useCallback(
|
|
885
|
+
(value) => {
|
|
886
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
887
|
+
if (setOpenProp) {
|
|
888
|
+
setOpenProp(openState);
|
|
889
|
+
} else {
|
|
890
|
+
_setOpen(openState);
|
|
891
|
+
}
|
|
892
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
893
|
+
},
|
|
894
|
+
[setOpenProp, open]
|
|
895
|
+
);
|
|
896
|
+
const toggleSidebar = React22.useCallback(() => {
|
|
897
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
898
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
899
|
+
React22.useEffect(() => {
|
|
900
|
+
const handleKeyDown = (event) => {
|
|
901
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
902
|
+
event.preventDefault();
|
|
903
|
+
toggleSidebar();
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
907
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
908
|
+
}, [toggleSidebar]);
|
|
909
|
+
const state = open ? "expanded" : "collapsed";
|
|
910
|
+
const contextValue = React22.useMemo(
|
|
911
|
+
() => ({
|
|
912
|
+
state,
|
|
913
|
+
open,
|
|
914
|
+
setOpen,
|
|
915
|
+
isMobile,
|
|
916
|
+
openMobile,
|
|
917
|
+
setOpenMobile,
|
|
918
|
+
toggleSidebar
|
|
919
|
+
}),
|
|
920
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
921
|
+
);
|
|
922
|
+
return /* @__PURE__ */ jsx23(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx23(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx23(
|
|
923
|
+
"div",
|
|
924
|
+
{
|
|
925
|
+
style: {
|
|
926
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
927
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
928
|
+
...style
|
|
929
|
+
},
|
|
930
|
+
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", className),
|
|
931
|
+
ref,
|
|
932
|
+
...props,
|
|
933
|
+
children
|
|
934
|
+
}
|
|
935
|
+
) }) });
|
|
936
|
+
});
|
|
937
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
938
|
+
var Sidebar = React22.forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
939
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
940
|
+
if (collapsible === "none") {
|
|
941
|
+
return /* @__PURE__ */ jsx23(
|
|
942
|
+
"div",
|
|
943
|
+
{
|
|
944
|
+
className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
945
|
+
ref,
|
|
946
|
+
...props,
|
|
947
|
+
children
|
|
948
|
+
}
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
if (isMobile) {
|
|
952
|
+
return /* @__PURE__ */ jsx23(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx23(
|
|
953
|
+
SheetContent,
|
|
954
|
+
{
|
|
955
|
+
"data-sidebar": "sidebar",
|
|
956
|
+
"data-mobile": "true",
|
|
957
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
958
|
+
style: {
|
|
959
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
960
|
+
},
|
|
961
|
+
side,
|
|
962
|
+
children: /* @__PURE__ */ jsx23("div", { className: "flex h-full w-full flex-col", children })
|
|
963
|
+
}
|
|
964
|
+
) });
|
|
965
|
+
}
|
|
966
|
+
return /* @__PURE__ */ jsxs8(
|
|
967
|
+
"div",
|
|
968
|
+
{
|
|
969
|
+
ref,
|
|
970
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
971
|
+
"data-state": state,
|
|
972
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
973
|
+
"data-variant": variant,
|
|
974
|
+
"data-side": side,
|
|
975
|
+
children: [
|
|
976
|
+
/* @__PURE__ */ jsx23(
|
|
977
|
+
"div",
|
|
978
|
+
{
|
|
979
|
+
className: cn(
|
|
980
|
+
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
981
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
982
|
+
"group-data-[side=right]:rotate-180",
|
|
983
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
984
|
+
)
|
|
985
|
+
}
|
|
986
|
+
),
|
|
987
|
+
/* @__PURE__ */ jsx23(
|
|
988
|
+
"div",
|
|
989
|
+
{
|
|
990
|
+
className: cn(
|
|
991
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
992
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
993
|
+
// Adjust the padding for floating and inset variants.
|
|
994
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
995
|
+
className
|
|
996
|
+
),
|
|
997
|
+
...props,
|
|
998
|
+
children: /* @__PURE__ */ jsx23(
|
|
999
|
+
"div",
|
|
1000
|
+
{
|
|
1001
|
+
"data-sidebar": "sidebar",
|
|
1002
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
1003
|
+
children
|
|
1004
|
+
}
|
|
1005
|
+
)
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
]
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1011
|
+
});
|
|
1012
|
+
Sidebar.displayName = "Sidebar";
|
|
1013
|
+
var SidebarTrigger = React22.forwardRef(
|
|
1014
|
+
({ className, onClick, ...props }, ref) => {
|
|
1015
|
+
const { toggleSidebar } = useSidebar();
|
|
1016
|
+
return /* @__PURE__ */ jsxs8(
|
|
1017
|
+
Button,
|
|
1018
|
+
{
|
|
1019
|
+
ref,
|
|
1020
|
+
"data-sidebar": "trigger",
|
|
1021
|
+
variant: "ghost",
|
|
1022
|
+
size: "icon",
|
|
1023
|
+
className: cn("h-7 w-7", className),
|
|
1024
|
+
onClick: (event) => {
|
|
1025
|
+
onClick?.(event);
|
|
1026
|
+
toggleSidebar();
|
|
1027
|
+
},
|
|
1028
|
+
...props,
|
|
1029
|
+
children: [
|
|
1030
|
+
/* @__PURE__ */ jsx23(PanelLeft, {}),
|
|
1031
|
+
/* @__PURE__ */ jsx23("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
);
|
|
1037
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
1038
|
+
var SidebarRail = React22.forwardRef(
|
|
1039
|
+
({ className, ...props }, ref) => {
|
|
1040
|
+
const { toggleSidebar } = useSidebar();
|
|
1041
|
+
return /* @__PURE__ */ jsx23(
|
|
1042
|
+
"button",
|
|
1043
|
+
{
|
|
1044
|
+
ref,
|
|
1045
|
+
"data-sidebar": "rail",
|
|
1046
|
+
"aria-label": "Toggle Sidebar",
|
|
1047
|
+
tabIndex: -1,
|
|
1048
|
+
onClick: toggleSidebar,
|
|
1049
|
+
title: "Toggle Sidebar",
|
|
1050
|
+
className: cn(
|
|
1051
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex",
|
|
1052
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
1053
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1054
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
1055
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1056
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1057
|
+
className
|
|
1058
|
+
),
|
|
1059
|
+
...props
|
|
1060
|
+
}
|
|
1061
|
+
);
|
|
1062
|
+
}
|
|
1063
|
+
);
|
|
1064
|
+
SidebarRail.displayName = "SidebarRail";
|
|
1065
|
+
var SidebarInset = React22.forwardRef(({ className, ...props }, ref) => {
|
|
1066
|
+
return /* @__PURE__ */ jsx23(
|
|
1067
|
+
"main",
|
|
1068
|
+
{
|
|
1069
|
+
ref,
|
|
1070
|
+
className: cn(
|
|
1071
|
+
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
1072
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
1073
|
+
className
|
|
1074
|
+
),
|
|
1075
|
+
...props
|
|
1076
|
+
}
|
|
1077
|
+
);
|
|
1078
|
+
});
|
|
1079
|
+
SidebarInset.displayName = "SidebarInset";
|
|
1080
|
+
var SidebarInput = React22.forwardRef(
|
|
1081
|
+
({ className, ...props }, ref) => {
|
|
1082
|
+
return /* @__PURE__ */ jsx23(
|
|
1083
|
+
Input,
|
|
1084
|
+
{
|
|
1085
|
+
ref,
|
|
1086
|
+
"data-sidebar": "input",
|
|
1087
|
+
className: cn(
|
|
1088
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
1089
|
+
className
|
|
1090
|
+
),
|
|
1091
|
+
...props
|
|
1092
|
+
}
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
SidebarInput.displayName = "SidebarInput";
|
|
1097
|
+
var SidebarHeader = React22.forwardRef(({ className, ...props }, ref) => {
|
|
1098
|
+
return /* @__PURE__ */ jsx23("div", { ref, "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
1099
|
+
});
|
|
1100
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
1101
|
+
var SidebarFooter = React22.forwardRef(({ className, ...props }, ref) => {
|
|
1102
|
+
return /* @__PURE__ */ jsx23("div", { ref, "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
1103
|
+
});
|
|
1104
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
1105
|
+
var SidebarSeparator = React22.forwardRef(
|
|
1106
|
+
({ className, ...props }, ref) => {
|
|
1107
|
+
return /* @__PURE__ */ jsx23(
|
|
1108
|
+
Separator3,
|
|
1109
|
+
{
|
|
1110
|
+
ref,
|
|
1111
|
+
"data-sidebar": "separator",
|
|
1112
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
1113
|
+
...props
|
|
1114
|
+
}
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
);
|
|
1118
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
1119
|
+
var SidebarContent = React22.forwardRef(({ className, ...props }, ref) => {
|
|
1120
|
+
return /* @__PURE__ */ jsx23(
|
|
1121
|
+
"div",
|
|
1122
|
+
{
|
|
1123
|
+
ref,
|
|
1124
|
+
"data-sidebar": "content",
|
|
1125
|
+
className: cn(
|
|
1126
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
1127
|
+
className
|
|
1128
|
+
),
|
|
1129
|
+
...props
|
|
1130
|
+
}
|
|
1131
|
+
);
|
|
1132
|
+
});
|
|
1133
|
+
SidebarContent.displayName = "SidebarContent";
|
|
1134
|
+
var SidebarGroup = React22.forwardRef(({ className, ...props }, ref) => {
|
|
1135
|
+
return /* @__PURE__ */ jsx23(
|
|
1136
|
+
"div",
|
|
1137
|
+
{
|
|
1138
|
+
ref,
|
|
1139
|
+
"data-sidebar": "group",
|
|
1140
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
1141
|
+
...props
|
|
1142
|
+
}
|
|
1143
|
+
);
|
|
1144
|
+
});
|
|
1145
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
1146
|
+
var SidebarGroupLabel = React22.forwardRef(
|
|
1147
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
1148
|
+
const Comp = asChild ? Slot4 : "div";
|
|
1149
|
+
return /* @__PURE__ */ jsx23(
|
|
1150
|
+
Comp,
|
|
1151
|
+
{
|
|
1152
|
+
ref,
|
|
1153
|
+
"data-sidebar": "group-label",
|
|
1154
|
+
className: cn(
|
|
1155
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1156
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
1157
|
+
className
|
|
1158
|
+
),
|
|
1159
|
+
...props
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
}
|
|
1163
|
+
);
|
|
1164
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
1165
|
+
var SidebarGroupAction = React22.forwardRef(
|
|
1166
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
1167
|
+
const Comp = asChild ? Slot4 : "button";
|
|
1168
|
+
return /* @__PURE__ */ jsx23(
|
|
1169
|
+
Comp,
|
|
1170
|
+
{
|
|
1171
|
+
ref,
|
|
1172
|
+
"data-sidebar": "group-action",
|
|
1173
|
+
className: cn(
|
|
1174
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1175
|
+
// Increases the hit area of the button on mobile.
|
|
1176
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
1177
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1178
|
+
className
|
|
1179
|
+
),
|
|
1180
|
+
...props
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
);
|
|
1185
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
1186
|
+
var SidebarGroupContent = React22.forwardRef(
|
|
1187
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23("div", { ref, "data-sidebar": "group-content", className: cn("w-full text-sm", className), ...props })
|
|
1188
|
+
);
|
|
1189
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
1190
|
+
var SidebarMenu = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23("ul", { ref, "data-sidebar": "menu", className: cn("flex w-full min-w-0 flex-col gap-1", className), ...props }));
|
|
1191
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
1192
|
+
var SidebarMenuItem = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23("li", { ref, "data-sidebar": "menu-item", className: cn("group/menu-item relative", className), ...props }));
|
|
1193
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
1194
|
+
var sidebarMenuButtonVariants = cva6(
|
|
1195
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1196
|
+
{
|
|
1197
|
+
variants: {
|
|
1198
|
+
variant: {
|
|
1199
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1200
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
1201
|
+
},
|
|
1202
|
+
size: {
|
|
1203
|
+
default: "h-8 text-sm",
|
|
1204
|
+
sm: "h-7 text-xs",
|
|
1205
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
defaultVariants: {
|
|
1209
|
+
variant: "default",
|
|
1210
|
+
size: "default"
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
);
|
|
1214
|
+
var SidebarMenuButton = React22.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
1215
|
+
const Comp = asChild ? Slot4 : "button";
|
|
1216
|
+
const { isMobile, state } = useSidebar();
|
|
1217
|
+
const button = /* @__PURE__ */ jsx23(
|
|
1218
|
+
Comp,
|
|
1219
|
+
{
|
|
1220
|
+
ref,
|
|
1221
|
+
"data-sidebar": "menu-button",
|
|
1222
|
+
"data-size": size,
|
|
1223
|
+
"data-active": isActive,
|
|
1224
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
1225
|
+
...props
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
if (!tooltip) {
|
|
1229
|
+
return button;
|
|
1230
|
+
}
|
|
1231
|
+
if (typeof tooltip === "string") {
|
|
1232
|
+
tooltip = {
|
|
1233
|
+
children: tooltip
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
return /* @__PURE__ */ jsxs8(Tooltip, { children: [
|
|
1237
|
+
/* @__PURE__ */ jsx23(TooltipTrigger, { asChild: true, children: button }),
|
|
1238
|
+
/* @__PURE__ */ jsx23(TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })
|
|
1239
|
+
] });
|
|
1240
|
+
});
|
|
1241
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1242
|
+
var SidebarMenuAction = React22.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
1243
|
+
const Comp = asChild ? Slot4 : "button";
|
|
1244
|
+
return /* @__PURE__ */ jsx23(
|
|
1245
|
+
Comp,
|
|
1246
|
+
{
|
|
1247
|
+
ref,
|
|
1248
|
+
"data-sidebar": "menu-action",
|
|
1249
|
+
className: cn(
|
|
1250
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1251
|
+
// Increases the hit area of the button on mobile.
|
|
1252
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
1253
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
1254
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
1255
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
1256
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1257
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
1258
|
+
className
|
|
1259
|
+
),
|
|
1260
|
+
...props
|
|
1261
|
+
}
|
|
1262
|
+
);
|
|
1263
|
+
});
|
|
1264
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
1265
|
+
var SidebarMenuBadge = React22.forwardRef(
|
|
1266
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1267
|
+
"div",
|
|
1268
|
+
{
|
|
1269
|
+
ref,
|
|
1270
|
+
"data-sidebar": "menu-badge",
|
|
1271
|
+
className: cn(
|
|
1272
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
1273
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
1274
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
1275
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
1276
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
1277
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1278
|
+
className
|
|
1279
|
+
),
|
|
1280
|
+
...props
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
);
|
|
1284
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
1285
|
+
var SidebarMenuSkeleton = React22.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
1286
|
+
const width = React22.useMemo(() => {
|
|
1287
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1288
|
+
}, []);
|
|
1289
|
+
return /* @__PURE__ */ jsxs8(
|
|
1290
|
+
"div",
|
|
1291
|
+
{
|
|
1292
|
+
ref,
|
|
1293
|
+
"data-sidebar": "menu-skeleton",
|
|
1294
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
1295
|
+
...props,
|
|
1296
|
+
children: [
|
|
1297
|
+
showIcon && /* @__PURE__ */ jsx23(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
1298
|
+
/* @__PURE__ */ jsx23(
|
|
1299
|
+
Skeleton,
|
|
1300
|
+
{
|
|
1301
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
1302
|
+
"data-sidebar": "menu-skeleton-text",
|
|
1303
|
+
style: {
|
|
1304
|
+
"--skeleton-width": width
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
)
|
|
1308
|
+
]
|
|
1309
|
+
}
|
|
1310
|
+
);
|
|
1311
|
+
});
|
|
1312
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
1313
|
+
var SidebarMenuSub = React22.forwardRef(
|
|
1314
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1315
|
+
"ul",
|
|
1316
|
+
{
|
|
1317
|
+
ref,
|
|
1318
|
+
"data-sidebar": "menu-sub",
|
|
1319
|
+
className: cn(
|
|
1320
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
1321
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1322
|
+
className
|
|
1323
|
+
),
|
|
1324
|
+
...props
|
|
1325
|
+
}
|
|
1326
|
+
)
|
|
1327
|
+
);
|
|
1328
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
1329
|
+
var SidebarMenuSubItem = React22.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx23("li", { ref, ...props }));
|
|
1330
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
1331
|
+
var SidebarMenuSubButton = React22.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
1332
|
+
const Comp = asChild ? Slot4 : "a";
|
|
1333
|
+
return /* @__PURE__ */ jsx23(
|
|
1334
|
+
Comp,
|
|
1335
|
+
{
|
|
1336
|
+
ref,
|
|
1337
|
+
"data-sidebar": "menu-sub-button",
|
|
1338
|
+
"data-size": size,
|
|
1339
|
+
"data-active": isActive,
|
|
1340
|
+
className: cn(
|
|
1341
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
1342
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
1343
|
+
size === "sm" && "text-xs",
|
|
1344
|
+
size === "md" && "text-sm",
|
|
1345
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1346
|
+
className
|
|
1347
|
+
),
|
|
1348
|
+
...props
|
|
1349
|
+
}
|
|
1350
|
+
);
|
|
1351
|
+
});
|
|
1352
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1353
|
+
|
|
1354
|
+
// src/components/switch.tsx
|
|
1355
|
+
import * as React23 from "react";
|
|
1356
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
1357
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1358
|
+
var Switch = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1359
|
+
SwitchPrimitives.Root,
|
|
1360
|
+
{
|
|
1361
|
+
className: cn(
|
|
1362
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
1363
|
+
className
|
|
1364
|
+
),
|
|
1365
|
+
...props,
|
|
1366
|
+
ref,
|
|
1367
|
+
children: /* @__PURE__ */ jsx24(
|
|
1368
|
+
SwitchPrimitives.Thumb,
|
|
1369
|
+
{
|
|
1370
|
+
className: cn(
|
|
1371
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
1372
|
+
)
|
|
1373
|
+
}
|
|
1374
|
+
)
|
|
1375
|
+
}
|
|
1376
|
+
));
|
|
1377
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
1378
|
+
|
|
1379
|
+
// src/components/table.tsx
|
|
1380
|
+
import * as React24 from "react";
|
|
1381
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1382
|
+
var Table = React24.forwardRef(
|
|
1383
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx25("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
1384
|
+
);
|
|
1385
|
+
Table.displayName = "Table";
|
|
1386
|
+
var TableHeader = React24.forwardRef(
|
|
1387
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
1388
|
+
);
|
|
1389
|
+
TableHeader.displayName = "TableHeader";
|
|
1390
|
+
var TableBody = React24.forwardRef(
|
|
1391
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
1392
|
+
);
|
|
1393
|
+
TableBody.displayName = "TableBody";
|
|
1394
|
+
var TableFooter = React24.forwardRef(
|
|
1395
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
|
|
1396
|
+
);
|
|
1397
|
+
TableFooter.displayName = "TableFooter";
|
|
1398
|
+
var TableRow = React24.forwardRef(
|
|
1399
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1400
|
+
"tr",
|
|
1401
|
+
{
|
|
1402
|
+
ref,
|
|
1403
|
+
className: cn("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50", className),
|
|
1404
|
+
...props
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
);
|
|
1408
|
+
TableRow.displayName = "TableRow";
|
|
1409
|
+
var TableHead = React24.forwardRef(
|
|
1410
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1411
|
+
"th",
|
|
1412
|
+
{
|
|
1413
|
+
ref,
|
|
1414
|
+
className: cn(
|
|
1415
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
1416
|
+
className
|
|
1417
|
+
),
|
|
1418
|
+
...props
|
|
1419
|
+
}
|
|
1420
|
+
)
|
|
1421
|
+
);
|
|
1422
|
+
TableHead.displayName = "TableHead";
|
|
1423
|
+
var TableCell = React24.forwardRef(
|
|
1424
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
|
|
1425
|
+
);
|
|
1426
|
+
TableCell.displayName = "TableCell";
|
|
1427
|
+
var TableCaption = React24.forwardRef(
|
|
1428
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
|
|
1429
|
+
);
|
|
1430
|
+
TableCaption.displayName = "TableCaption";
|
|
1431
|
+
|
|
1432
|
+
// src/components/tabs.tsx
|
|
1433
|
+
import * as React25 from "react";
|
|
1434
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
1435
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1436
|
+
var Tabs = TabsPrimitive.Root;
|
|
1437
|
+
var TabsList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1438
|
+
TabsPrimitive.List,
|
|
1439
|
+
{
|
|
1440
|
+
ref,
|
|
1441
|
+
className: cn(
|
|
1442
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
1443
|
+
className
|
|
1444
|
+
),
|
|
1445
|
+
...props
|
|
1446
|
+
}
|
|
1447
|
+
));
|
|
1448
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
1449
|
+
var TabsTrigger = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1450
|
+
TabsPrimitive.Trigger,
|
|
1451
|
+
{
|
|
1452
|
+
ref,
|
|
1453
|
+
className: cn(
|
|
1454
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
1455
|
+
className
|
|
1456
|
+
),
|
|
1457
|
+
...props
|
|
1458
|
+
}
|
|
1459
|
+
));
|
|
1460
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
1461
|
+
var TabsContent = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1462
|
+
TabsPrimitive.Content,
|
|
1463
|
+
{
|
|
1464
|
+
ref,
|
|
1465
|
+
className: cn(
|
|
1466
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1467
|
+
className
|
|
1468
|
+
),
|
|
1469
|
+
...props
|
|
1470
|
+
}
|
|
1471
|
+
));
|
|
1472
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
1473
|
+
|
|
1474
|
+
// src/components/textarea.tsx
|
|
1475
|
+
import * as React26 from "react";
|
|
1476
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1477
|
+
var Textarea = React26.forwardRef(({ className, ...props }, ref) => {
|
|
1478
|
+
return /* @__PURE__ */ jsx27(
|
|
1479
|
+
"textarea",
|
|
1480
|
+
{
|
|
1481
|
+
className: cn(
|
|
1482
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1483
|
+
className
|
|
1484
|
+
),
|
|
1485
|
+
ref,
|
|
1486
|
+
...props
|
|
1487
|
+
}
|
|
1488
|
+
);
|
|
1489
|
+
});
|
|
1490
|
+
Textarea.displayName = "Textarea";
|
|
1491
|
+
|
|
1492
|
+
// src/hooks/use-auth.tsx
|
|
1493
|
+
import {
|
|
1494
|
+
createContext as createContext3,
|
|
1495
|
+
useContext as useContext3,
|
|
1496
|
+
useState as useState3,
|
|
1497
|
+
useEffect as useEffect3,
|
|
1498
|
+
useCallback as useCallback2,
|
|
1499
|
+
useMemo as useMemo2,
|
|
1500
|
+
useRef
|
|
1501
|
+
} from "react";
|
|
1502
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1503
|
+
var AuthContext = createContext3(void 0);
|
|
1504
|
+
var AuthProvider = ({
|
|
1505
|
+
children,
|
|
1506
|
+
supabase,
|
|
1507
|
+
profilesTable = "profiles"
|
|
1508
|
+
}) => {
|
|
1509
|
+
const [user, setUser] = useState3(null);
|
|
1510
|
+
const [session, setSession] = useState3(null);
|
|
1511
|
+
const [profile, setProfile] = useState3(null);
|
|
1512
|
+
const [profileLoading, setProfileLoading] = useState3(false);
|
|
1513
|
+
const [authLoading, setAuthLoading] = useState3(true);
|
|
1514
|
+
const userRef = useRef(null);
|
|
1515
|
+
const isLoading = authLoading || profileLoading;
|
|
1516
|
+
useEffect3(() => {
|
|
1517
|
+
userRef.current = user;
|
|
1518
|
+
}, [user]);
|
|
1519
|
+
const fetchProfile = useCallback2(
|
|
1520
|
+
async (userId) => {
|
|
1521
|
+
try {
|
|
1522
|
+
const { data, error } = await supabase.from(profilesTable).select("*").eq("id", userId).single();
|
|
1523
|
+
if (error) throw error;
|
|
1524
|
+
setProfile(data);
|
|
1525
|
+
} catch {
|
|
1526
|
+
setProfile(null);
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
[supabase, profilesTable]
|
|
1530
|
+
);
|
|
1531
|
+
const refreshProfile = useCallback2(async () => {
|
|
1532
|
+
if (userRef.current) {
|
|
1533
|
+
await fetchProfile(userRef.current.id);
|
|
1534
|
+
}
|
|
1535
|
+
}, [fetchProfile]);
|
|
1536
|
+
useEffect3(() => {
|
|
1537
|
+
supabase.auth.getSession().then(({ data: { session: s } }) => {
|
|
1538
|
+
setSession(s);
|
|
1539
|
+
setUser(s?.user ?? null);
|
|
1540
|
+
setAuthLoading(false);
|
|
1541
|
+
});
|
|
1542
|
+
const { data: { subscription } } = supabase.auth.onAuthStateChange(
|
|
1543
|
+
(_event, s) => {
|
|
1544
|
+
setSession(s);
|
|
1545
|
+
setUser(s?.user ?? null);
|
|
1546
|
+
}
|
|
1547
|
+
);
|
|
1548
|
+
return () => subscription.unsubscribe();
|
|
1549
|
+
}, [supabase]);
|
|
1550
|
+
useEffect3(() => {
|
|
1551
|
+
if (user) {
|
|
1552
|
+
setProfileLoading(true);
|
|
1553
|
+
fetchProfile(user.id).finally(() => setProfileLoading(false));
|
|
1554
|
+
} else {
|
|
1555
|
+
setProfile(null);
|
|
1556
|
+
}
|
|
1557
|
+
}, [user?.id, fetchProfile]);
|
|
1558
|
+
const login = useCallback2(
|
|
1559
|
+
async (email, password) => {
|
|
1560
|
+
const { error } = await supabase.auth.signInWithPassword({ email, password });
|
|
1561
|
+
return { error };
|
|
1562
|
+
},
|
|
1563
|
+
[supabase]
|
|
1564
|
+
);
|
|
1565
|
+
const signup = useCallback2(
|
|
1566
|
+
async (email, password) => {
|
|
1567
|
+
const { error } = await supabase.auth.signUp({ email, password });
|
|
1568
|
+
return { error };
|
|
1569
|
+
},
|
|
1570
|
+
[supabase]
|
|
1571
|
+
);
|
|
1572
|
+
const logout = useCallback2(async () => {
|
|
1573
|
+
await supabase.auth.signOut();
|
|
1574
|
+
}, [supabase]);
|
|
1575
|
+
const value = useMemo2(
|
|
1576
|
+
() => ({
|
|
1577
|
+
user,
|
|
1578
|
+
session,
|
|
1579
|
+
profile,
|
|
1580
|
+
isLoading,
|
|
1581
|
+
login,
|
|
1582
|
+
signup,
|
|
1583
|
+
logout,
|
|
1584
|
+
refreshProfile
|
|
1585
|
+
}),
|
|
1586
|
+
[user, session, profile, isLoading, login, signup, logout, refreshProfile]
|
|
1587
|
+
);
|
|
1588
|
+
return /* @__PURE__ */ jsx28(AuthContext.Provider, { value, children });
|
|
1589
|
+
};
|
|
1590
|
+
var useAuth = () => {
|
|
1591
|
+
const ctx = useContext3(AuthContext);
|
|
1592
|
+
if (!ctx) throw new Error("useAuth must be used within an AuthProvider");
|
|
1593
|
+
return ctx;
|
|
1594
|
+
};
|
|
1595
|
+
var useSession = () => {
|
|
1596
|
+
const { session } = useAuth();
|
|
1597
|
+
return session;
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
// src/components/protected-route.tsx
|
|
1601
|
+
import { Fragment, jsx as jsx29 } from "react/jsx-runtime";
|
|
1602
|
+
var ProtectedRoute = ({
|
|
1603
|
+
children,
|
|
1604
|
+
onUnauthenticated,
|
|
1605
|
+
loadingFallback = null
|
|
1606
|
+
}) => {
|
|
1607
|
+
const { user, isLoading } = useAuth();
|
|
1608
|
+
if (isLoading) return /* @__PURE__ */ jsx29(Fragment, { children: loadingFallback });
|
|
1609
|
+
if (!user) return /* @__PURE__ */ jsx29(Fragment, { children: onUnauthenticated?.() ?? null });
|
|
1610
|
+
return /* @__PURE__ */ jsx29(Fragment, { children });
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
// src/components/organisms/LoginPage.tsx
|
|
1614
|
+
import { useState as useState4 } from "react";
|
|
1615
|
+
import { Fragment as Fragment2, jsx as jsx30, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1616
|
+
var DEFAULT_LOGO = "https://devfellowship.s3.sa-east-1.amazonaws.com/media/1755889468274-DevFelloShip%2B1%2BSi%CC%81mbolo.png";
|
|
1617
|
+
function LoginPage({
|
|
1618
|
+
logo,
|
|
1619
|
+
title = "welcome, fellow!",
|
|
1620
|
+
redirectUrl = "/",
|
|
1621
|
+
onSuccess,
|
|
1622
|
+
onError,
|
|
1623
|
+
defaultMode = "login",
|
|
1624
|
+
termsUrl = "https://devfellowship.com/en/terms",
|
|
1625
|
+
className
|
|
1626
|
+
}) {
|
|
1627
|
+
const [mode, setMode] = useState4(defaultMode);
|
|
1628
|
+
const [email, setEmail] = useState4("");
|
|
1629
|
+
const [password, setPassword] = useState4("");
|
|
1630
|
+
const [acceptedTerms, setAcceptedTerms] = useState4(false);
|
|
1631
|
+
const [isSubmitting, setIsSubmitting] = useState4(false);
|
|
1632
|
+
const { login, signup } = useAuth();
|
|
1633
|
+
const handleSubmit = async (e) => {
|
|
1634
|
+
e.preventDefault();
|
|
1635
|
+
if (!email || !password) return;
|
|
1636
|
+
setIsSubmitting(true);
|
|
1637
|
+
try {
|
|
1638
|
+
if (mode === "login") {
|
|
1639
|
+
const { error } = await login(email, password);
|
|
1640
|
+
if (error) throw error;
|
|
1641
|
+
} else {
|
|
1642
|
+
const { error } = await signup(email, password);
|
|
1643
|
+
if (error) throw error;
|
|
1644
|
+
}
|
|
1645
|
+
onSuccess?.(redirectUrl);
|
|
1646
|
+
} catch (err) {
|
|
1647
|
+
onError?.(err instanceof Error ? err : new Error(String(err)));
|
|
1648
|
+
} finally {
|
|
1649
|
+
setIsSubmitting(false);
|
|
1650
|
+
}
|
|
1651
|
+
};
|
|
1652
|
+
const logoEl = logo === void 0 ? /* @__PURE__ */ jsx30("img", { src: DEFAULT_LOGO, alt: "DevFellowship Logo", className: "w-16 h-16" }) : typeof logo === "string" ? /* @__PURE__ */ jsx30("img", { src: logo, alt: "App Logo", className: "w-16 h-16 object-contain" }) : logo;
|
|
1653
|
+
return /* @__PURE__ */ jsx30(
|
|
1654
|
+
"div",
|
|
1655
|
+
{
|
|
1656
|
+
className: [
|
|
1657
|
+
"min-h-screen flex flex-col items-center justify-center px-4",
|
|
1658
|
+
className
|
|
1659
|
+
].filter(Boolean).join(" "),
|
|
1660
|
+
children: /* @__PURE__ */ jsx30("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsxs9("div", { className: "bg-card rounded-xl p-8 shadow-xl border border-border text-center", children: [
|
|
1661
|
+
/* @__PURE__ */ jsx30("div", { className: "mx-auto w-20 h-20 flex items-center justify-center mb-0", children: logoEl }),
|
|
1662
|
+
/* @__PURE__ */ jsx30("h2", { className: "text-2xl font-bold text-foreground mb-6 mt-4", children: title }),
|
|
1663
|
+
/* @__PURE__ */ jsx30("div", { className: "w-full max-w-sm mx-auto space-y-5", children: /* @__PURE__ */ jsxs9("form", { onSubmit: handleSubmit, children: [
|
|
1664
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-4", children: [
|
|
1665
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-2 text-left", children: [
|
|
1666
|
+
/* @__PURE__ */ jsx30(Label2, { htmlFor: "lp-email", className: "text-sm font-medium text-foreground/90", children: "Email" }),
|
|
1667
|
+
/* @__PURE__ */ jsx30(
|
|
1668
|
+
Input,
|
|
1669
|
+
{
|
|
1670
|
+
id: "lp-email",
|
|
1671
|
+
type: "email",
|
|
1672
|
+
value: email,
|
|
1673
|
+
onChange: (e) => setEmail(e.target.value),
|
|
1674
|
+
placeholder: "your@email.com",
|
|
1675
|
+
className: "h-11 bg-secondary border-secondary text-foreground",
|
|
1676
|
+
required: true
|
|
1677
|
+
}
|
|
1678
|
+
)
|
|
1679
|
+
] }),
|
|
1680
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-2 text-left", children: [
|
|
1681
|
+
/* @__PURE__ */ jsx30(Label2, { htmlFor: "lp-password", className: "text-sm font-medium text-foreground/90", children: "Password" }),
|
|
1682
|
+
/* @__PURE__ */ jsx30(
|
|
1683
|
+
Input,
|
|
1684
|
+
{
|
|
1685
|
+
id: "lp-password",
|
|
1686
|
+
type: "password",
|
|
1687
|
+
value: password,
|
|
1688
|
+
onChange: (e) => setPassword(e.target.value),
|
|
1689
|
+
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
1690
|
+
className: "h-11 bg-secondary border-secondary text-foreground",
|
|
1691
|
+
required: true
|
|
1692
|
+
}
|
|
1693
|
+
)
|
|
1694
|
+
] }),
|
|
1695
|
+
mode === "signup" && /* @__PURE__ */ jsxs9("div", { className: "flex items-start gap-2 text-left", children: [
|
|
1696
|
+
/* @__PURE__ */ jsx30(
|
|
1697
|
+
Checkbox,
|
|
1698
|
+
{
|
|
1699
|
+
id: "lp-terms",
|
|
1700
|
+
checked: acceptedTerms,
|
|
1701
|
+
onCheckedChange: (checked) => setAcceptedTerms(checked),
|
|
1702
|
+
className: "mt-1"
|
|
1703
|
+
}
|
|
1704
|
+
),
|
|
1705
|
+
/* @__PURE__ */ jsxs9(
|
|
1706
|
+
"label",
|
|
1707
|
+
{
|
|
1708
|
+
htmlFor: "lp-terms",
|
|
1709
|
+
className: "text-sm text-foreground/80 cursor-pointer leading-relaxed",
|
|
1710
|
+
children: [
|
|
1711
|
+
"I agree to the",
|
|
1712
|
+
" ",
|
|
1713
|
+
/* @__PURE__ */ jsx30(
|
|
1714
|
+
"a",
|
|
1715
|
+
{
|
|
1716
|
+
href: termsUrl,
|
|
1717
|
+
target: "_blank",
|
|
1718
|
+
rel: "noopener noreferrer",
|
|
1719
|
+
className: "text-[var(--brand-accent,#F39325)] underline-offset-4 hover:underline",
|
|
1720
|
+
children: "Terms and Conditions"
|
|
1721
|
+
}
|
|
1722
|
+
),
|
|
1723
|
+
"."
|
|
1724
|
+
]
|
|
1725
|
+
}
|
|
1726
|
+
)
|
|
1727
|
+
] })
|
|
1728
|
+
] }),
|
|
1729
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-4 mt-6", children: [
|
|
1730
|
+
/* @__PURE__ */ jsx30(
|
|
1731
|
+
Button,
|
|
1732
|
+
{
|
|
1733
|
+
type: "submit",
|
|
1734
|
+
className: "w-full h-11 bg-[var(--brand-accent,#F39325)] hover:bg-[var(--brand-accent,#F39325)]/90 text-primary-foreground transition-colors duration-200",
|
|
1735
|
+
disabled: isSubmitting || mode === "signup" && !acceptedTerms,
|
|
1736
|
+
children: isSubmitting ? /* @__PURE__ */ jsx30("div", { className: "h-5 w-5 border-2 border-primary-foreground/20 border-t-primary-foreground rounded-full animate-spin mx-auto" }) : mode === "login" ? "Sign In" : "Create Account"
|
|
1737
|
+
}
|
|
1738
|
+
),
|
|
1739
|
+
/* @__PURE__ */ jsx30("p", { className: "text-center text-sm text-muted-foreground", children: mode === "login" ? /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
1740
|
+
"Don't have an account?",
|
|
1741
|
+
" ",
|
|
1742
|
+
/* @__PURE__ */ jsx30(
|
|
1743
|
+
"button",
|
|
1744
|
+
{
|
|
1745
|
+
type: "button",
|
|
1746
|
+
onClick: () => setMode("signup"),
|
|
1747
|
+
className: "text-[var(--brand-accent,#F39325)] underline-offset-4 hover:underline",
|
|
1748
|
+
children: "Sign up"
|
|
1749
|
+
}
|
|
1750
|
+
)
|
|
1751
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
1752
|
+
"Already have an account?",
|
|
1753
|
+
" ",
|
|
1754
|
+
/* @__PURE__ */ jsx30(
|
|
1755
|
+
"button",
|
|
1756
|
+
{
|
|
1757
|
+
type: "button",
|
|
1758
|
+
onClick: () => setMode("login"),
|
|
1759
|
+
className: "text-[var(--brand-accent,#F39325)] underline-offset-4 hover:underline",
|
|
1760
|
+
children: "Sign in"
|
|
1761
|
+
}
|
|
1762
|
+
)
|
|
1763
|
+
] }) })
|
|
1764
|
+
] })
|
|
1765
|
+
] }) })
|
|
1766
|
+
] }) })
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
// src/components/organisms/AppSidebar.tsx
|
|
1772
|
+
import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1773
|
+
var DEFAULT_LOGO2 = "https://devfellowship.s3.sa-east-1.amazonaws.com/media/1755889468274-DevFelloShip%2B1%2BSi%CC%81mbolo.png";
|
|
1774
|
+
function getInitials(name) {
|
|
1775
|
+
return name.split(" ").map((n) => n[0]).slice(0, 2).join("").toUpperCase();
|
|
1776
|
+
}
|
|
1777
|
+
function SidebarInner({
|
|
1778
|
+
navGroups,
|
|
1779
|
+
userInfo,
|
|
1780
|
+
logo,
|
|
1781
|
+
appName = "DevFellowship",
|
|
1782
|
+
appLabel,
|
|
1783
|
+
onNavigate,
|
|
1784
|
+
activeUrl,
|
|
1785
|
+
footer,
|
|
1786
|
+
copyright = `Dev Fellowship \xA9 ${(/* @__PURE__ */ new Date()).getFullYear()}`
|
|
1787
|
+
}) {
|
|
1788
|
+
const { state } = useSidebar();
|
|
1789
|
+
const isCollapsed = state === "collapsed";
|
|
1790
|
+
const logoEl = logo === void 0 ? /* @__PURE__ */ jsx31("img", { src: DEFAULT_LOGO2, alt: "Logo", className: "w-6 h-6 object-contain" }) : typeof logo === "string" ? /* @__PURE__ */ jsx31("img", { src: logo, alt: "Logo", className: "w-6 h-6 object-contain" }) : logo;
|
|
1791
|
+
return /* @__PURE__ */ jsxs10(Sidebar, { collapsible: "icon", children: [
|
|
1792
|
+
/* @__PURE__ */ jsx31(SidebarHeader, { className: "border-b border-sidebar-border", children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 px-2 py-3", children: [
|
|
1793
|
+
/* @__PURE__ */ jsx31("div", { className: "flex h-8 w-8 items-center justify-center rounded-lg bg-[var(--brand-accent,#F39325)] shrink-0", children: logoEl }),
|
|
1794
|
+
!isCollapsed && /* @__PURE__ */ jsxs10("div", { className: "flex flex-col overflow-hidden", children: [
|
|
1795
|
+
/* @__PURE__ */ jsx31("span", { className: "text-sm font-semibold truncate", children: appName }),
|
|
1796
|
+
appLabel && /* @__PURE__ */ jsx31("span", { className: "text-xs text-muted-foreground truncate", children: appLabel })
|
|
1797
|
+
] })
|
|
1798
|
+
] }) }),
|
|
1799
|
+
/* @__PURE__ */ jsx31(SidebarContent, { children: navGroups.map((group, gi) => /* @__PURE__ */ jsxs10(SidebarGroup, { children: [
|
|
1800
|
+
group.label && /* @__PURE__ */ jsx31(SidebarGroupLabel, { children: group.label }),
|
|
1801
|
+
/* @__PURE__ */ jsx31(SidebarGroupContent, { children: /* @__PURE__ */ jsx31(SidebarMenu, { children: group.items.map((item) => {
|
|
1802
|
+
const isActive = activeUrl ? item.exact ? activeUrl === item.url : activeUrl.startsWith(item.url) : false;
|
|
1803
|
+
return /* @__PURE__ */ jsx31(SidebarMenuItem, { children: /* @__PURE__ */ jsx31(
|
|
1804
|
+
SidebarMenuButton,
|
|
1805
|
+
{
|
|
1806
|
+
asChild: true,
|
|
1807
|
+
isActive,
|
|
1808
|
+
tooltip: isCollapsed ? item.title : void 0,
|
|
1809
|
+
children: /* @__PURE__ */ jsxs10(
|
|
1810
|
+
"button",
|
|
1811
|
+
{
|
|
1812
|
+
type: "button",
|
|
1813
|
+
onClick: () => onNavigate?.(item.url),
|
|
1814
|
+
className: "flex items-center gap-2 w-full",
|
|
1815
|
+
children: [
|
|
1816
|
+
item.icon && /* @__PURE__ */ jsx31(item.icon, { className: "h-4 w-4 shrink-0" }),
|
|
1817
|
+
/* @__PURE__ */ jsx31("span", { className: "truncate", children: item.title })
|
|
1818
|
+
]
|
|
1819
|
+
}
|
|
1820
|
+
)
|
|
1821
|
+
}
|
|
1822
|
+
) }, item.title);
|
|
1823
|
+
}) }) })
|
|
1824
|
+
] }, gi)) }),
|
|
1825
|
+
/* @__PURE__ */ jsx31(SidebarFooter, { className: "border-t border-sidebar-border", children: footer ? footer : userInfo ? /* @__PURE__ */ jsxs10("div", { className: "px-2 py-3 flex items-center gap-2", children: [
|
|
1826
|
+
/* @__PURE__ */ jsxs10(Avatar, { className: "h-7 w-7 shrink-0", children: [
|
|
1827
|
+
userInfo.avatarUrl && /* @__PURE__ */ jsx31(AvatarImage, { src: userInfo.avatarUrl, alt: userInfo.name }),
|
|
1828
|
+
/* @__PURE__ */ jsx31(AvatarFallback, { className: "text-xs", children: getInitials(userInfo.name) })
|
|
1829
|
+
] }),
|
|
1830
|
+
!isCollapsed && /* @__PURE__ */ jsxs10("div", { className: "flex flex-col overflow-hidden", children: [
|
|
1831
|
+
/* @__PURE__ */ jsx31("span", { className: "text-xs font-medium truncate", children: userInfo.name }),
|
|
1832
|
+
userInfo.email && /* @__PURE__ */ jsx31("span", { className: "text-xs text-muted-foreground truncate", children: userInfo.email })
|
|
1833
|
+
] })
|
|
1834
|
+
] }) : !isCollapsed && /* @__PURE__ */ jsx31("div", { className: "px-2 py-3", children: /* @__PURE__ */ jsx31("p", { className: "text-xs text-muted-foreground", children: copyright }) }) })
|
|
1835
|
+
] });
|
|
1836
|
+
}
|
|
1837
|
+
function AppSidebar({
|
|
1838
|
+
defaultOpen = true,
|
|
1839
|
+
children,
|
|
1840
|
+
...props
|
|
1841
|
+
}) {
|
|
1842
|
+
return /* @__PURE__ */ jsx31(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ jsxs10("div", { className: "flex min-h-screen w-full", children: [
|
|
1843
|
+
/* @__PURE__ */ jsx31(SidebarInner, { ...props }),
|
|
1844
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
1845
|
+
/* @__PURE__ */ jsx31("div", { className: "p-2", children: /* @__PURE__ */ jsx31(SidebarTrigger, {}) }),
|
|
1846
|
+
children
|
|
1847
|
+
] })
|
|
1848
|
+
] }) });
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
// src/components/organisms/AppNavbar.tsx
|
|
1852
|
+
import React29 from "react";
|
|
1853
|
+
import { Sun, Moon, ChevronDown as ChevronDown3, LogOut, User, Settings } from "lucide-react";
|
|
1854
|
+
import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1855
|
+
function getInitials2(name) {
|
|
1856
|
+
return name.split(" ").map((n) => n[0]).slice(0, 2).join("").toUpperCase();
|
|
1857
|
+
}
|
|
1858
|
+
function AppNavbar({
|
|
1859
|
+
breadcrumbs = [],
|
|
1860
|
+
userInfo,
|
|
1861
|
+
theme = "light",
|
|
1862
|
+
onThemeToggle,
|
|
1863
|
+
onProfileClick,
|
|
1864
|
+
onSettingsClick,
|
|
1865
|
+
onSignOut,
|
|
1866
|
+
actions,
|
|
1867
|
+
className
|
|
1868
|
+
}) {
|
|
1869
|
+
const isDark = theme === "dark";
|
|
1870
|
+
return /* @__PURE__ */ jsxs11(
|
|
1871
|
+
"header",
|
|
1872
|
+
{
|
|
1873
|
+
className: [
|
|
1874
|
+
"h-14 flex items-center justify-between px-4 border-b border-border bg-background shrink-0",
|
|
1875
|
+
className
|
|
1876
|
+
].filter(Boolean).join(" "),
|
|
1877
|
+
children: [
|
|
1878
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
1879
|
+
breadcrumbs.length > 0 && /* @__PURE__ */ jsx32(Breadcrumb, { children: /* @__PURE__ */ jsx32(BreadcrumbList, { children: breadcrumbs.map((crumb, idx) => {
|
|
1880
|
+
const isLast = idx === breadcrumbs.length - 1;
|
|
1881
|
+
return /* @__PURE__ */ jsxs11(React29.Fragment, { children: [
|
|
1882
|
+
/* @__PURE__ */ jsx32(BreadcrumbItem, { children: isLast ? /* @__PURE__ */ jsx32(BreadcrumbPage, { children: crumb.label }) : /* @__PURE__ */ jsx32(
|
|
1883
|
+
BreadcrumbLink,
|
|
1884
|
+
{
|
|
1885
|
+
href: crumb.href ?? "#",
|
|
1886
|
+
className: "hover:text-foreground transition-colors",
|
|
1887
|
+
children: crumb.label
|
|
1888
|
+
}
|
|
1889
|
+
) }),
|
|
1890
|
+
!isLast && /* @__PURE__ */ jsx32(BreadcrumbSeparator, {})
|
|
1891
|
+
] }, idx);
|
|
1892
|
+
}) }) }),
|
|
1893
|
+
actions && /* @__PURE__ */ jsx32("div", { className: "flex items-center gap-2 ml-2", children: actions })
|
|
1894
|
+
] }),
|
|
1895
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
1896
|
+
/* @__PURE__ */ jsx32(
|
|
1897
|
+
Button,
|
|
1898
|
+
{
|
|
1899
|
+
variant: "ghost",
|
|
1900
|
+
size: "icon",
|
|
1901
|
+
onClick: onThemeToggle,
|
|
1902
|
+
"aria-label": "Toggle theme",
|
|
1903
|
+
className: "h-8 w-8",
|
|
1904
|
+
children: isDark ? /* @__PURE__ */ jsx32(Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx32(Moon, { className: "h-4 w-4" })
|
|
1905
|
+
}
|
|
1906
|
+
),
|
|
1907
|
+
userInfo && /* @__PURE__ */ jsxs11(DropdownMenu, { children: [
|
|
1908
|
+
/* @__PURE__ */ jsx32(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs11(Button, { variant: "ghost", className: "flex items-center gap-2 h-8 px-2", children: [
|
|
1909
|
+
/* @__PURE__ */ jsxs11(Avatar, { className: "h-7 w-7", children: [
|
|
1910
|
+
userInfo.avatarUrl && /* @__PURE__ */ jsx32(AvatarImage, { src: userInfo.avatarUrl, alt: userInfo.name }),
|
|
1911
|
+
/* @__PURE__ */ jsx32(AvatarFallback, { className: "text-xs", children: getInitials2(userInfo.name) })
|
|
1912
|
+
] }),
|
|
1913
|
+
/* @__PURE__ */ jsx32("span", { className: "text-sm font-medium hidden sm:inline-block max-w-[120px] truncate", children: userInfo.name }),
|
|
1914
|
+
/* @__PURE__ */ jsx32(ChevronDown3, { className: "h-3 w-3 text-muted-foreground" })
|
|
1915
|
+
] }) }),
|
|
1916
|
+
/* @__PURE__ */ jsxs11(DropdownMenuContent, { align: "end", className: "w-48", children: [
|
|
1917
|
+
/* @__PURE__ */ jsx32(DropdownMenuLabel, { className: "font-normal", children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col space-y-1", children: [
|
|
1918
|
+
/* @__PURE__ */ jsx32("p", { className: "text-sm font-medium", children: userInfo.name }),
|
|
1919
|
+
userInfo.email && /* @__PURE__ */ jsx32("p", { className: "text-xs text-muted-foreground truncate", children: userInfo.email })
|
|
1920
|
+
] }) }),
|
|
1921
|
+
/* @__PURE__ */ jsx32(DropdownMenuSeparator, {}),
|
|
1922
|
+
onProfileClick && /* @__PURE__ */ jsxs11(DropdownMenuItem, { onClick: onProfileClick, children: [
|
|
1923
|
+
/* @__PURE__ */ jsx32(User, { className: "mr-2 h-4 w-4" }),
|
|
1924
|
+
"Profile"
|
|
1925
|
+
] }),
|
|
1926
|
+
onSettingsClick && /* @__PURE__ */ jsxs11(DropdownMenuItem, { onClick: onSettingsClick, children: [
|
|
1927
|
+
/* @__PURE__ */ jsx32(Settings, { className: "mr-2 h-4 w-4" }),
|
|
1928
|
+
"Settings"
|
|
1929
|
+
] }),
|
|
1930
|
+
(onProfileClick || onSettingsClick) && onSignOut && /* @__PURE__ */ jsx32(DropdownMenuSeparator, {}),
|
|
1931
|
+
onSignOut && /* @__PURE__ */ jsxs11(DropdownMenuItem, { onClick: onSignOut, className: "text-destructive focus:text-destructive", children: [
|
|
1932
|
+
/* @__PURE__ */ jsx32(LogOut, { className: "mr-2 h-4 w-4" }),
|
|
1933
|
+
"Sign out"
|
|
1934
|
+
] })
|
|
1935
|
+
] })
|
|
1936
|
+
] })
|
|
1937
|
+
] })
|
|
1938
|
+
]
|
|
1939
|
+
}
|
|
1940
|
+
);
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
// src/hooks/use-toast.ts
|
|
1944
|
+
import * as React30 from "react";
|
|
1945
|
+
var TOAST_LIMIT = 1;
|
|
1946
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
1947
|
+
var actionTypes = {
|
|
1948
|
+
ADD_TOAST: "ADD_TOAST",
|
|
1949
|
+
UPDATE_TOAST: "UPDATE_TOAST",
|
|
1950
|
+
DISMISS_TOAST: "DISMISS_TOAST",
|
|
1951
|
+
REMOVE_TOAST: "REMOVE_TOAST"
|
|
1952
|
+
};
|
|
1953
|
+
var count = 0;
|
|
1954
|
+
function genId() {
|
|
1955
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
1956
|
+
return count.toString();
|
|
1957
|
+
}
|
|
1958
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
1959
|
+
var addToRemoveQueue = (toastId) => {
|
|
1960
|
+
if (toastTimeouts.has(toastId)) return;
|
|
1961
|
+
const timeout = setTimeout(() => {
|
|
1962
|
+
toastTimeouts.delete(toastId);
|
|
1963
|
+
dispatch({ type: actionTypes.REMOVE_TOAST, toastId });
|
|
1964
|
+
}, TOAST_REMOVE_DELAY);
|
|
1965
|
+
toastTimeouts.set(toastId, timeout);
|
|
1966
|
+
};
|
|
1967
|
+
var reducer = (state, action) => {
|
|
1968
|
+
switch (action.type) {
|
|
1969
|
+
case actionTypes.ADD_TOAST:
|
|
1970
|
+
return {
|
|
1971
|
+
...state,
|
|
1972
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
1973
|
+
};
|
|
1974
|
+
case actionTypes.UPDATE_TOAST:
|
|
1975
|
+
return {
|
|
1976
|
+
...state,
|
|
1977
|
+
toasts: state.toasts.map(
|
|
1978
|
+
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
|
1979
|
+
)
|
|
1980
|
+
};
|
|
1981
|
+
case actionTypes.DISMISS_TOAST: {
|
|
1982
|
+
const { toastId } = action;
|
|
1983
|
+
if (toastId) {
|
|
1984
|
+
addToRemoveQueue(toastId);
|
|
1985
|
+
} else {
|
|
1986
|
+
state.toasts.forEach((t) => addToRemoveQueue(t.id));
|
|
1987
|
+
}
|
|
1988
|
+
return {
|
|
1989
|
+
...state,
|
|
1990
|
+
toasts: state.toasts.map(
|
|
1991
|
+
(t) => t.id === toastId || toastId === void 0 ? { ...t, open: false } : t
|
|
1992
|
+
)
|
|
1993
|
+
};
|
|
1994
|
+
}
|
|
1995
|
+
case actionTypes.REMOVE_TOAST:
|
|
1996
|
+
if (action.toastId === void 0) return { ...state, toasts: [] };
|
|
1997
|
+
return {
|
|
1998
|
+
...state,
|
|
1999
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
2000
|
+
};
|
|
2001
|
+
}
|
|
2002
|
+
};
|
|
2003
|
+
var listeners = [];
|
|
2004
|
+
var memoryState = { toasts: [] };
|
|
2005
|
+
function dispatch(action) {
|
|
2006
|
+
memoryState = reducer(memoryState, action);
|
|
2007
|
+
listeners.forEach((listener) => listener(memoryState));
|
|
2008
|
+
}
|
|
2009
|
+
function toast(props) {
|
|
2010
|
+
const id = genId();
|
|
2011
|
+
const update = (p) => dispatch({ type: actionTypes.UPDATE_TOAST, toast: { ...p, id } });
|
|
2012
|
+
const dismiss = () => dispatch({ type: actionTypes.DISMISS_TOAST, toastId: id });
|
|
2013
|
+
dispatch({
|
|
2014
|
+
type: actionTypes.ADD_TOAST,
|
|
2015
|
+
toast: { ...props, id, open: true, onOpenChange: (open) => {
|
|
2016
|
+
if (!open) dismiss();
|
|
2017
|
+
} }
|
|
2018
|
+
});
|
|
2019
|
+
return { id, dismiss, update };
|
|
2020
|
+
}
|
|
2021
|
+
function useToast() {
|
|
2022
|
+
const [state, setState] = React30.useState(memoryState);
|
|
2023
|
+
React30.useEffect(() => {
|
|
2024
|
+
listeners.push(setState);
|
|
2025
|
+
return () => {
|
|
2026
|
+
const idx = listeners.indexOf(setState);
|
|
2027
|
+
if (idx > -1) listeners.splice(idx, 1);
|
|
2028
|
+
};
|
|
2029
|
+
}, []);
|
|
2030
|
+
return {
|
|
2031
|
+
...state,
|
|
2032
|
+
toast,
|
|
2033
|
+
dismiss: (toastId) => dispatch({ type: actionTypes.DISMISS_TOAST, toastId })
|
|
2034
|
+
};
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
// src/providers/feature-flag-provider.tsx
|
|
2038
|
+
import {
|
|
2039
|
+
createContext as createContext4,
|
|
2040
|
+
useContext as useContext4,
|
|
2041
|
+
useMemo as useMemo3
|
|
2042
|
+
} from "react";
|
|
2043
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2044
|
+
var FeatureFlagContext = createContext4({
|
|
2045
|
+
flags: {},
|
|
2046
|
+
isEnabled: () => false
|
|
2047
|
+
});
|
|
2048
|
+
var FeatureFlagProvider = ({
|
|
2049
|
+
children,
|
|
2050
|
+
flags
|
|
2051
|
+
}) => {
|
|
2052
|
+
const value = useMemo3(
|
|
2053
|
+
() => ({
|
|
2054
|
+
flags,
|
|
2055
|
+
isEnabled: (flag) => Boolean(flags[flag])
|
|
2056
|
+
}),
|
|
2057
|
+
[flags]
|
|
2058
|
+
);
|
|
2059
|
+
return /* @__PURE__ */ jsx33(FeatureFlagContext.Provider, { value, children });
|
|
2060
|
+
};
|
|
2061
|
+
var useFeatureFlag = (flag) => {
|
|
2062
|
+
const { isEnabled } = useContext4(FeatureFlagContext);
|
|
2063
|
+
return isEnabled(flag);
|
|
2064
|
+
};
|
|
2065
|
+
var useFeatureFlags = () => {
|
|
2066
|
+
const { flags } = useContext4(FeatureFlagContext);
|
|
2067
|
+
return flags;
|
|
2068
|
+
};
|
|
2069
|
+
export {
|
|
2070
|
+
Accordion,
|
|
2071
|
+
AccordionContent,
|
|
2072
|
+
AccordionItem,
|
|
2073
|
+
AccordionTrigger,
|
|
2074
|
+
Alert,
|
|
2075
|
+
AlertDescription,
|
|
2076
|
+
AlertTitle,
|
|
2077
|
+
AppNavbar,
|
|
2078
|
+
AppSidebar,
|
|
2079
|
+
AuthProvider,
|
|
2080
|
+
Avatar,
|
|
2081
|
+
AvatarFallback,
|
|
2082
|
+
AvatarImage,
|
|
2083
|
+
Badge,
|
|
2084
|
+
Breadcrumb,
|
|
2085
|
+
BreadcrumbEllipsis,
|
|
2086
|
+
BreadcrumbItem,
|
|
2087
|
+
BreadcrumbLink,
|
|
2088
|
+
BreadcrumbList,
|
|
2089
|
+
BreadcrumbPage,
|
|
2090
|
+
BreadcrumbSeparator,
|
|
2091
|
+
Button,
|
|
2092
|
+
Card,
|
|
2093
|
+
CardContent,
|
|
2094
|
+
CardDescription,
|
|
2095
|
+
CardFooter,
|
|
2096
|
+
CardHeader,
|
|
2097
|
+
CardTitle,
|
|
2098
|
+
Checkbox,
|
|
2099
|
+
Dialog,
|
|
2100
|
+
DialogClose,
|
|
2101
|
+
DialogContent,
|
|
2102
|
+
DialogDescription,
|
|
2103
|
+
DialogFooter,
|
|
2104
|
+
DialogHeader,
|
|
2105
|
+
DialogOverlay,
|
|
2106
|
+
DialogPortal,
|
|
2107
|
+
DialogTitle,
|
|
2108
|
+
DialogTrigger,
|
|
2109
|
+
DropdownMenu,
|
|
2110
|
+
DropdownMenuCheckboxItem,
|
|
2111
|
+
DropdownMenuContent,
|
|
2112
|
+
DropdownMenuGroup,
|
|
2113
|
+
DropdownMenuItem,
|
|
2114
|
+
DropdownMenuLabel,
|
|
2115
|
+
DropdownMenuPortal,
|
|
2116
|
+
DropdownMenuRadioGroup,
|
|
2117
|
+
DropdownMenuRadioItem,
|
|
2118
|
+
DropdownMenuSeparator,
|
|
2119
|
+
DropdownMenuShortcut,
|
|
2120
|
+
DropdownMenuSub,
|
|
2121
|
+
DropdownMenuSubContent,
|
|
2122
|
+
DropdownMenuSubTrigger,
|
|
2123
|
+
DropdownMenuTrigger,
|
|
2124
|
+
FeatureFlagProvider,
|
|
2125
|
+
Form,
|
|
2126
|
+
FormControl,
|
|
2127
|
+
FormDescription,
|
|
2128
|
+
FormField,
|
|
2129
|
+
FormItem,
|
|
2130
|
+
FormLabel,
|
|
2131
|
+
FormMessage,
|
|
2132
|
+
Input,
|
|
2133
|
+
Label2 as Label,
|
|
2134
|
+
LoginPage,
|
|
2135
|
+
Popover,
|
|
2136
|
+
PopoverContent,
|
|
2137
|
+
PopoverTrigger,
|
|
2138
|
+
Progress,
|
|
2139
|
+
ProtectedRoute,
|
|
2140
|
+
RadioGroup2 as RadioGroup,
|
|
2141
|
+
RadioGroupItem,
|
|
2142
|
+
ScrollArea,
|
|
2143
|
+
ScrollBar,
|
|
2144
|
+
Select,
|
|
2145
|
+
SelectContent,
|
|
2146
|
+
SelectGroup,
|
|
2147
|
+
SelectItem,
|
|
2148
|
+
SelectLabel,
|
|
2149
|
+
SelectScrollDownButton,
|
|
2150
|
+
SelectScrollUpButton,
|
|
2151
|
+
SelectSeparator,
|
|
2152
|
+
SelectTrigger,
|
|
2153
|
+
SelectValue,
|
|
2154
|
+
Separator3 as Separator,
|
|
2155
|
+
Sheet,
|
|
2156
|
+
SheetClose,
|
|
2157
|
+
SheetContent,
|
|
2158
|
+
SheetDescription,
|
|
2159
|
+
SheetFooter,
|
|
2160
|
+
SheetHeader,
|
|
2161
|
+
SheetOverlay,
|
|
2162
|
+
SheetPortal,
|
|
2163
|
+
SheetTitle,
|
|
2164
|
+
SheetTrigger,
|
|
2165
|
+
Sidebar,
|
|
2166
|
+
SidebarContent,
|
|
2167
|
+
SidebarFooter,
|
|
2168
|
+
SidebarGroup,
|
|
2169
|
+
SidebarGroupAction,
|
|
2170
|
+
SidebarGroupContent,
|
|
2171
|
+
SidebarGroupLabel,
|
|
2172
|
+
SidebarHeader,
|
|
2173
|
+
SidebarInput,
|
|
2174
|
+
SidebarInset,
|
|
2175
|
+
SidebarMenu,
|
|
2176
|
+
SidebarMenuAction,
|
|
2177
|
+
SidebarMenuBadge,
|
|
2178
|
+
SidebarMenuButton,
|
|
2179
|
+
SidebarMenuItem,
|
|
2180
|
+
SidebarMenuSkeleton,
|
|
2181
|
+
SidebarMenuSub,
|
|
2182
|
+
SidebarMenuSubButton,
|
|
2183
|
+
SidebarMenuSubItem,
|
|
2184
|
+
SidebarProvider,
|
|
2185
|
+
SidebarRail,
|
|
2186
|
+
SidebarSeparator,
|
|
2187
|
+
SidebarTrigger,
|
|
2188
|
+
Skeleton,
|
|
2189
|
+
Switch,
|
|
2190
|
+
Table,
|
|
2191
|
+
TableBody,
|
|
2192
|
+
TableCaption,
|
|
2193
|
+
TableCell,
|
|
2194
|
+
TableFooter,
|
|
2195
|
+
TableHead,
|
|
2196
|
+
TableHeader,
|
|
2197
|
+
TableRow,
|
|
2198
|
+
Tabs,
|
|
2199
|
+
TabsContent,
|
|
2200
|
+
TabsList,
|
|
2201
|
+
TabsTrigger,
|
|
2202
|
+
Textarea,
|
|
2203
|
+
Tooltip,
|
|
2204
|
+
TooltipContent,
|
|
2205
|
+
TooltipProvider,
|
|
2206
|
+
TooltipTrigger,
|
|
2207
|
+
badgeVariants,
|
|
2208
|
+
buttonVariants,
|
|
2209
|
+
cn,
|
|
2210
|
+
toast,
|
|
2211
|
+
useAuth,
|
|
2212
|
+
useFeatureFlag,
|
|
2213
|
+
useFeatureFlags,
|
|
2214
|
+
useFormField,
|
|
2215
|
+
useIsMobile,
|
|
2216
|
+
useSession,
|
|
2217
|
+
useSidebar,
|
|
2218
|
+
useToast
|
|
2219
|
+
};
|