@augmenting-integrations/ui 0.1.0 → 0.2.2
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/components/ui/avatar.d.ts +5 -5
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +5 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +5 -3
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +1 -3
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +3 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +9 -9
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +16 -20
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +11 -11
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +3 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +7 -7
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +7 -6
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/index.cjs +1688 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1561 -31
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/components/chrome/Logo.jsx +0 -19
- package/dist/components/chrome/Logo.jsx.map +0 -1
- package/dist/components/chrome/RoleSwitcher.jsx +0 -32
- package/dist/components/chrome/RoleSwitcher.jsx.map +0 -1
- package/dist/components/chrome/ThemeSwitcher.jsx +0 -43
- package/dist/components/chrome/ThemeSwitcher.jsx.map +0 -1
- package/dist/components/shells/AppShell.jsx +0 -67
- package/dist/components/shells/AppShell.jsx.map +0 -1
- package/dist/components/shells/PublicShell.jsx +0 -42
- package/dist/components/shells/PublicShell.jsx.map +0 -1
- package/dist/components/shells/StudioShell.jsx +0 -20
- package/dist/components/shells/StudioShell.jsx.map +0 -1
- package/dist/components/ui/avatar.jsx +0 -24
- package/dist/components/ui/avatar.jsx.map +0 -1
- package/dist/components/ui/badge.jsx +0 -34
- package/dist/components/ui/badge.jsx.map +0 -1
- package/dist/components/ui/button.jsx +0 -34
- package/dist/components/ui/button.jsx.map +0 -1
- package/dist/components/ui/card.jsx +0 -25
- package/dist/components/ui/card.jsx.map +0 -1
- package/dist/components/ui/checkbox.jsx +0 -13
- package/dist/components/ui/checkbox.jsx.map +0 -1
- package/dist/components/ui/dialog.jsx +0 -52
- package/dist/components/ui/dialog.jsx.map +0 -1
- package/dist/components/ui/dropdown-menu.jsx +0 -73
- package/dist/components/ui/dropdown-menu.jsx.map +0 -1
- package/dist/components/ui/input.jsx +0 -8
- package/dist/components/ui/input.jsx.map +0 -1
- package/dist/components/ui/label.jsx +0 -8
- package/dist/components/ui/label.jsx.map +0 -1
- package/dist/components/ui/select.jsx +0 -57
- package/dist/components/ui/select.jsx.map +0 -1
- package/dist/components/ui/separator.jsx +0 -8
- package/dist/components/ui/separator.jsx.map +0 -1
- package/dist/components/ui/sheet.jsx +0 -47
- package/dist/components/ui/sheet.jsx.map +0 -1
- package/dist/components/ui/table.jsx +0 -31
- package/dist/components/ui/table.jsx.map +0 -1
- package/dist/components/ui/tabs.jsx +0 -29
- package/dist/components/ui/tabs.jsx.map +0 -1
- package/dist/components/ui/textarea.jsx +0 -7
- package/dist/components/ui/textarea.jsx.map +0 -1
- package/dist/index.mjs +0 -1585
- package/dist/index.mjs.map +0 -1
- package/dist/lib/utils.js +0 -6
- package/dist/lib/utils.js.map +0 -1
- package/dist/providers/MockProvider.jsx +0 -59
- package/dist/providers/MockProvider.jsx.map +0 -1
- package/dist/providers/QueryProvider.jsx +0 -12
- package/dist/providers/QueryProvider.jsx.map +0 -1
- package/dist/providers/SessionProvider.jsx +0 -6
- package/dist/providers/SessionProvider.jsx.map +0 -1
- package/dist/providers/ThemeProvider.jsx +0 -44
- package/dist/providers/ThemeProvider.jsx.map +0 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1688 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
AppShell: () => AppShell,
|
|
34
|
+
Avatar: () => Avatar,
|
|
35
|
+
AvatarBadge: () => AvatarBadge,
|
|
36
|
+
AvatarFallback: () => AvatarFallback,
|
|
37
|
+
AvatarGroup: () => AvatarGroup,
|
|
38
|
+
AvatarGroupCount: () => AvatarGroupCount,
|
|
39
|
+
AvatarImage: () => AvatarImage,
|
|
40
|
+
Badge: () => Badge,
|
|
41
|
+
Button: () => Button,
|
|
42
|
+
Card: () => Card,
|
|
43
|
+
CardAction: () => CardAction,
|
|
44
|
+
CardContent: () => CardContent,
|
|
45
|
+
CardDescription: () => CardDescription,
|
|
46
|
+
CardFooter: () => CardFooter,
|
|
47
|
+
CardHeader: () => CardHeader,
|
|
48
|
+
CardTitle: () => CardTitle,
|
|
49
|
+
Checkbox: () => Checkbox,
|
|
50
|
+
Dialog: () => Dialog,
|
|
51
|
+
DialogClose: () => DialogClose,
|
|
52
|
+
DialogContent: () => DialogContent,
|
|
53
|
+
DialogDescription: () => DialogDescription,
|
|
54
|
+
DialogFooter: () => DialogFooter,
|
|
55
|
+
DialogHeader: () => DialogHeader,
|
|
56
|
+
DialogOverlay: () => DialogOverlay,
|
|
57
|
+
DialogPortal: () => DialogPortal,
|
|
58
|
+
DialogTitle: () => DialogTitle,
|
|
59
|
+
DialogTrigger: () => DialogTrigger,
|
|
60
|
+
DropdownMenu: () => DropdownMenu,
|
|
61
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
62
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
63
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
64
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
65
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
66
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
67
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
68
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
69
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
70
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
71
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
72
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
73
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
74
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
75
|
+
Input: () => Input,
|
|
76
|
+
Label: () => Label,
|
|
77
|
+
Logo: () => Logo,
|
|
78
|
+
MockProvider: () => MockProvider,
|
|
79
|
+
PublicShell: () => PublicShell,
|
|
80
|
+
QueryProvider: () => QueryProvider,
|
|
81
|
+
RoleSwitcher: () => RoleSwitcher,
|
|
82
|
+
Select: () => Select,
|
|
83
|
+
SelectContent: () => SelectContent,
|
|
84
|
+
SelectGroup: () => SelectGroup,
|
|
85
|
+
SelectItem: () => SelectItem,
|
|
86
|
+
SelectLabel: () => SelectLabel,
|
|
87
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
88
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
89
|
+
SelectSeparator: () => SelectSeparator,
|
|
90
|
+
SelectTrigger: () => SelectTrigger,
|
|
91
|
+
SelectValue: () => SelectValue,
|
|
92
|
+
Separator: () => Separator,
|
|
93
|
+
SessionProvider: () => SessionProvider,
|
|
94
|
+
Sheet: () => Sheet,
|
|
95
|
+
SheetClose: () => SheetClose,
|
|
96
|
+
SheetContent: () => SheetContent,
|
|
97
|
+
SheetDescription: () => SheetDescription,
|
|
98
|
+
SheetFooter: () => SheetFooter,
|
|
99
|
+
SheetHeader: () => SheetHeader,
|
|
100
|
+
SheetTitle: () => SheetTitle,
|
|
101
|
+
SheetTrigger: () => SheetTrigger,
|
|
102
|
+
StudioShell: () => StudioShell,
|
|
103
|
+
Table: () => Table,
|
|
104
|
+
TableBody: () => TableBody,
|
|
105
|
+
TableCaption: () => TableCaption,
|
|
106
|
+
TableCell: () => TableCell,
|
|
107
|
+
TableFooter: () => TableFooter,
|
|
108
|
+
TableHead: () => TableHead,
|
|
109
|
+
TableHeader: () => TableHeader,
|
|
110
|
+
TableRow: () => TableRow,
|
|
111
|
+
Tabs: () => Tabs,
|
|
112
|
+
TabsContent: () => TabsContent,
|
|
113
|
+
TabsList: () => TabsList,
|
|
114
|
+
TabsTrigger: () => TabsTrigger,
|
|
115
|
+
Textarea: () => Textarea,
|
|
116
|
+
ThemeProvider: () => ThemeProvider,
|
|
117
|
+
ThemeSwitcher: () => ThemeSwitcher,
|
|
118
|
+
badgeVariants: () => badgeVariants,
|
|
119
|
+
buttonVariants: () => buttonVariants,
|
|
120
|
+
cn: () => cn,
|
|
121
|
+
tabsListVariants: () => tabsListVariants,
|
|
122
|
+
useThemeName: () => useThemeName
|
|
123
|
+
});
|
|
124
|
+
module.exports = __toCommonJS(index_exports);
|
|
125
|
+
|
|
126
|
+
// src/components/ui/avatar.tsx
|
|
127
|
+
var React2 = __toESM(require("react"));
|
|
128
|
+
var import_radix_ui = require("radix-ui");
|
|
129
|
+
|
|
130
|
+
// src/lib/utils.ts
|
|
131
|
+
var import_clsx = require("clsx");
|
|
132
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
133
|
+
function cn(...inputs) {
|
|
134
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// src/components/ui/avatar.tsx
|
|
138
|
+
function Avatar({
|
|
139
|
+
className,
|
|
140
|
+
size = "default",
|
|
141
|
+
...props
|
|
142
|
+
}) {
|
|
143
|
+
return /* @__PURE__ */ React2.createElement(
|
|
144
|
+
import_radix_ui.Avatar.Root,
|
|
145
|
+
{
|
|
146
|
+
"data-slot": "avatar",
|
|
147
|
+
"data-size": size,
|
|
148
|
+
className: cn(
|
|
149
|
+
"group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
150
|
+
className
|
|
151
|
+
),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function AvatarImage({
|
|
157
|
+
className,
|
|
158
|
+
...props
|
|
159
|
+
}) {
|
|
160
|
+
return /* @__PURE__ */ React2.createElement(
|
|
161
|
+
import_radix_ui.Avatar.Image,
|
|
162
|
+
{
|
|
163
|
+
"data-slot": "avatar-image",
|
|
164
|
+
className: cn("aspect-square size-full", className),
|
|
165
|
+
...props
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
function AvatarFallback({
|
|
170
|
+
className,
|
|
171
|
+
...props
|
|
172
|
+
}) {
|
|
173
|
+
return /* @__PURE__ */ React2.createElement(
|
|
174
|
+
import_radix_ui.Avatar.Fallback,
|
|
175
|
+
{
|
|
176
|
+
"data-slot": "avatar-fallback",
|
|
177
|
+
className: cn(
|
|
178
|
+
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
179
|
+
className
|
|
180
|
+
),
|
|
181
|
+
...props
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
function AvatarBadge({ className, ...props }) {
|
|
186
|
+
return /* @__PURE__ */ React2.createElement(
|
|
187
|
+
"span",
|
|
188
|
+
{
|
|
189
|
+
"data-slot": "avatar-badge",
|
|
190
|
+
className: cn(
|
|
191
|
+
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none",
|
|
192
|
+
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
193
|
+
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
194
|
+
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
195
|
+
className
|
|
196
|
+
),
|
|
197
|
+
...props
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
function AvatarGroup({ className, ...props }) {
|
|
202
|
+
return /* @__PURE__ */ React2.createElement(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "avatar-group",
|
|
206
|
+
className: cn(
|
|
207
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
215
|
+
return /* @__PURE__ */ React2.createElement(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
"data-slot": "avatar-group-count",
|
|
219
|
+
className: cn(
|
|
220
|
+
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
221
|
+
className
|
|
222
|
+
),
|
|
223
|
+
...props
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// src/components/ui/badge.tsx
|
|
229
|
+
var React3 = __toESM(require("react"));
|
|
230
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
231
|
+
var import_radix_ui2 = require("radix-ui");
|
|
232
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
233
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
234
|
+
{
|
|
235
|
+
variants: {
|
|
236
|
+
variant: {
|
|
237
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
238
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
239
|
+
destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
240
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
241
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
242
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
defaultVariants: {
|
|
246
|
+
variant: "default"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
function Badge({
|
|
251
|
+
className,
|
|
252
|
+
variant = "default",
|
|
253
|
+
asChild = false,
|
|
254
|
+
...props
|
|
255
|
+
}) {
|
|
256
|
+
const Comp = asChild ? import_radix_ui2.Slot.Root : "span";
|
|
257
|
+
return /* @__PURE__ */ React3.createElement(
|
|
258
|
+
Comp,
|
|
259
|
+
{
|
|
260
|
+
"data-slot": "badge",
|
|
261
|
+
"data-variant": variant,
|
|
262
|
+
className: cn(badgeVariants({ variant }), className),
|
|
263
|
+
...props
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// src/components/ui/button.tsx
|
|
269
|
+
var React4 = __toESM(require("react"));
|
|
270
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
271
|
+
var import_radix_ui3 = require("radix-ui");
|
|
272
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
273
|
+
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
274
|
+
{
|
|
275
|
+
variants: {
|
|
276
|
+
variant: {
|
|
277
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
278
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
279
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
280
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
281
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
282
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
283
|
+
},
|
|
284
|
+
size: {
|
|
285
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
286
|
+
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
287
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
288
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
289
|
+
icon: "size-9",
|
|
290
|
+
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
291
|
+
"icon-sm": "size-8",
|
|
292
|
+
"icon-lg": "size-10"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
defaultVariants: {
|
|
296
|
+
variant: "default",
|
|
297
|
+
size: "default"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
function Button({
|
|
302
|
+
className,
|
|
303
|
+
variant = "default",
|
|
304
|
+
size = "default",
|
|
305
|
+
asChild = false,
|
|
306
|
+
...props
|
|
307
|
+
}) {
|
|
308
|
+
const Comp = asChild ? import_radix_ui3.Slot.Root : "button";
|
|
309
|
+
return /* @__PURE__ */ React4.createElement(
|
|
310
|
+
Comp,
|
|
311
|
+
{
|
|
312
|
+
"data-slot": "button",
|
|
313
|
+
"data-variant": variant,
|
|
314
|
+
"data-size": size,
|
|
315
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
316
|
+
...props
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// src/components/ui/card.tsx
|
|
322
|
+
var React5 = __toESM(require("react"));
|
|
323
|
+
function Card({ className, ...props }) {
|
|
324
|
+
return /* @__PURE__ */ React5.createElement(
|
|
325
|
+
"div",
|
|
326
|
+
{
|
|
327
|
+
"data-slot": "card",
|
|
328
|
+
className: cn(
|
|
329
|
+
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
|
|
330
|
+
className
|
|
331
|
+
),
|
|
332
|
+
...props
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
function CardHeader({ className, ...props }) {
|
|
337
|
+
return /* @__PURE__ */ React5.createElement(
|
|
338
|
+
"div",
|
|
339
|
+
{
|
|
340
|
+
"data-slot": "card-header",
|
|
341
|
+
className: cn(
|
|
342
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
343
|
+
className
|
|
344
|
+
),
|
|
345
|
+
...props
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
function CardTitle({ className, ...props }) {
|
|
350
|
+
return /* @__PURE__ */ React5.createElement(
|
|
351
|
+
"div",
|
|
352
|
+
{
|
|
353
|
+
"data-slot": "card-title",
|
|
354
|
+
className: cn("leading-none font-semibold", className),
|
|
355
|
+
...props
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
function CardDescription({ className, ...props }) {
|
|
360
|
+
return /* @__PURE__ */ React5.createElement(
|
|
361
|
+
"div",
|
|
362
|
+
{
|
|
363
|
+
"data-slot": "card-description",
|
|
364
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
365
|
+
...props
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
function CardAction({ className, ...props }) {
|
|
370
|
+
return /* @__PURE__ */ React5.createElement(
|
|
371
|
+
"div",
|
|
372
|
+
{
|
|
373
|
+
"data-slot": "card-action",
|
|
374
|
+
className: cn(
|
|
375
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
376
|
+
className
|
|
377
|
+
),
|
|
378
|
+
...props
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
function CardContent({ className, ...props }) {
|
|
383
|
+
return /* @__PURE__ */ React5.createElement("div", { "data-slot": "card-content", className: cn("px-6", className), ...props });
|
|
384
|
+
}
|
|
385
|
+
function CardFooter({ className, ...props }) {
|
|
386
|
+
return /* @__PURE__ */ React5.createElement(
|
|
387
|
+
"div",
|
|
388
|
+
{
|
|
389
|
+
"data-slot": "card-footer",
|
|
390
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
391
|
+
...props
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// src/components/ui/checkbox.tsx
|
|
397
|
+
var React6 = __toESM(require("react"));
|
|
398
|
+
var import_lucide_react = require("lucide-react");
|
|
399
|
+
var import_radix_ui4 = require("radix-ui");
|
|
400
|
+
function Checkbox({
|
|
401
|
+
className,
|
|
402
|
+
...props
|
|
403
|
+
}) {
|
|
404
|
+
return /* @__PURE__ */ React6.createElement(
|
|
405
|
+
import_radix_ui4.Checkbox.Root,
|
|
406
|
+
{
|
|
407
|
+
"data-slot": "checkbox",
|
|
408
|
+
className: cn(
|
|
409
|
+
"peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
|
|
410
|
+
className
|
|
411
|
+
),
|
|
412
|
+
...props
|
|
413
|
+
},
|
|
414
|
+
/* @__PURE__ */ React6.createElement(
|
|
415
|
+
import_radix_ui4.Checkbox.Indicator,
|
|
416
|
+
{
|
|
417
|
+
"data-slot": "checkbox-indicator",
|
|
418
|
+
className: "grid place-content-center text-current transition-none"
|
|
419
|
+
},
|
|
420
|
+
/* @__PURE__ */ React6.createElement(import_lucide_react.CheckIcon, { className: "size-3.5" })
|
|
421
|
+
)
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// src/components/ui/dialog.tsx
|
|
426
|
+
var React7 = __toESM(require("react"));
|
|
427
|
+
var import_lucide_react2 = require("lucide-react");
|
|
428
|
+
var import_radix_ui5 = require("radix-ui");
|
|
429
|
+
function Dialog({ ...props }) {
|
|
430
|
+
return /* @__PURE__ */ React7.createElement(import_radix_ui5.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
431
|
+
}
|
|
432
|
+
function DialogTrigger({
|
|
433
|
+
...props
|
|
434
|
+
}) {
|
|
435
|
+
return /* @__PURE__ */ React7.createElement(import_radix_ui5.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
436
|
+
}
|
|
437
|
+
function DialogPortal({ ...props }) {
|
|
438
|
+
return /* @__PURE__ */ React7.createElement(import_radix_ui5.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
439
|
+
}
|
|
440
|
+
function DialogClose({ ...props }) {
|
|
441
|
+
return /* @__PURE__ */ React7.createElement(import_radix_ui5.Dialog.Close, { "data-slot": "dialog-close", ...props });
|
|
442
|
+
}
|
|
443
|
+
function DialogOverlay({
|
|
444
|
+
className,
|
|
445
|
+
...props
|
|
446
|
+
}) {
|
|
447
|
+
return /* @__PURE__ */ React7.createElement(
|
|
448
|
+
import_radix_ui5.Dialog.Overlay,
|
|
449
|
+
{
|
|
450
|
+
"data-slot": "dialog-overlay",
|
|
451
|
+
className: cn(
|
|
452
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
453
|
+
className
|
|
454
|
+
),
|
|
455
|
+
...props
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
function DialogContent({
|
|
460
|
+
className,
|
|
461
|
+
children,
|
|
462
|
+
showCloseButton = true,
|
|
463
|
+
...props
|
|
464
|
+
}) {
|
|
465
|
+
return /* @__PURE__ */ React7.createElement(DialogPortal, { "data-slot": "dialog-portal" }, /* @__PURE__ */ React7.createElement(DialogOverlay, null), /* @__PURE__ */ React7.createElement(
|
|
466
|
+
import_radix_ui5.Dialog.Content,
|
|
467
|
+
{
|
|
468
|
+
"data-slot": "dialog-content",
|
|
469
|
+
className: cn(
|
|
470
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
|
|
471
|
+
className
|
|
472
|
+
),
|
|
473
|
+
...props
|
|
474
|
+
},
|
|
475
|
+
children,
|
|
476
|
+
showCloseButton && /* @__PURE__ */ React7.createElement(
|
|
477
|
+
import_radix_ui5.Dialog.Close,
|
|
478
|
+
{
|
|
479
|
+
"data-slot": "dialog-close",
|
|
480
|
+
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
481
|
+
},
|
|
482
|
+
/* @__PURE__ */ React7.createElement(import_lucide_react2.XIcon, null),
|
|
483
|
+
/* @__PURE__ */ React7.createElement("span", { className: "sr-only" }, "Close")
|
|
484
|
+
)
|
|
485
|
+
));
|
|
486
|
+
}
|
|
487
|
+
function DialogHeader({ className, ...props }) {
|
|
488
|
+
return /* @__PURE__ */ React7.createElement(
|
|
489
|
+
"div",
|
|
490
|
+
{
|
|
491
|
+
"data-slot": "dialog-header",
|
|
492
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
493
|
+
...props
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
function DialogFooter({
|
|
498
|
+
className,
|
|
499
|
+
showCloseButton = false,
|
|
500
|
+
children,
|
|
501
|
+
...props
|
|
502
|
+
}) {
|
|
503
|
+
return /* @__PURE__ */ React7.createElement(
|
|
504
|
+
"div",
|
|
505
|
+
{
|
|
506
|
+
"data-slot": "dialog-footer",
|
|
507
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
508
|
+
...props
|
|
509
|
+
},
|
|
510
|
+
children,
|
|
511
|
+
showCloseButton && /* @__PURE__ */ React7.createElement(import_radix_ui5.Dialog.Close, { asChild: true }, /* @__PURE__ */ React7.createElement(Button, { variant: "outline" }, "Close"))
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
function DialogTitle({
|
|
515
|
+
className,
|
|
516
|
+
...props
|
|
517
|
+
}) {
|
|
518
|
+
return /* @__PURE__ */ React7.createElement(
|
|
519
|
+
import_radix_ui5.Dialog.Title,
|
|
520
|
+
{
|
|
521
|
+
"data-slot": "dialog-title",
|
|
522
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
523
|
+
...props
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
function DialogDescription({
|
|
528
|
+
className,
|
|
529
|
+
...props
|
|
530
|
+
}) {
|
|
531
|
+
return /* @__PURE__ */ React7.createElement(
|
|
532
|
+
import_radix_ui5.Dialog.Description,
|
|
533
|
+
{
|
|
534
|
+
"data-slot": "dialog-description",
|
|
535
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
536
|
+
...props
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// src/components/ui/dropdown-menu.tsx
|
|
542
|
+
var React8 = __toESM(require("react"));
|
|
543
|
+
var import_lucide_react3 = require("lucide-react");
|
|
544
|
+
var import_radix_ui6 = require("radix-ui");
|
|
545
|
+
function DropdownMenu({
|
|
546
|
+
...props
|
|
547
|
+
}) {
|
|
548
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
549
|
+
}
|
|
550
|
+
function DropdownMenuPortal({
|
|
551
|
+
...props
|
|
552
|
+
}) {
|
|
553
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
554
|
+
}
|
|
555
|
+
function DropdownMenuTrigger({
|
|
556
|
+
...props
|
|
557
|
+
}) {
|
|
558
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
559
|
+
}
|
|
560
|
+
function DropdownMenuContent({
|
|
561
|
+
className,
|
|
562
|
+
sideOffset = 4,
|
|
563
|
+
...props
|
|
564
|
+
}) {
|
|
565
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.Portal, null, /* @__PURE__ */ React8.createElement(
|
|
566
|
+
import_radix_ui6.DropdownMenu.Content,
|
|
567
|
+
{
|
|
568
|
+
"data-slot": "dropdown-menu-content",
|
|
569
|
+
sideOffset,
|
|
570
|
+
className: cn(
|
|
571
|
+
"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
572
|
+
className
|
|
573
|
+
),
|
|
574
|
+
...props
|
|
575
|
+
}
|
|
576
|
+
));
|
|
577
|
+
}
|
|
578
|
+
function DropdownMenuGroup({
|
|
579
|
+
...props
|
|
580
|
+
}) {
|
|
581
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
582
|
+
}
|
|
583
|
+
function DropdownMenuItem({
|
|
584
|
+
className,
|
|
585
|
+
inset,
|
|
586
|
+
variant = "default",
|
|
587
|
+
...props
|
|
588
|
+
}) {
|
|
589
|
+
return /* @__PURE__ */ React8.createElement(
|
|
590
|
+
import_radix_ui6.DropdownMenu.Item,
|
|
591
|
+
{
|
|
592
|
+
"data-slot": "dropdown-menu-item",
|
|
593
|
+
"data-inset": inset,
|
|
594
|
+
"data-variant": variant,
|
|
595
|
+
className: cn(
|
|
596
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
597
|
+
className
|
|
598
|
+
),
|
|
599
|
+
...props
|
|
600
|
+
}
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
function DropdownMenuCheckboxItem({
|
|
604
|
+
className,
|
|
605
|
+
children,
|
|
606
|
+
checked,
|
|
607
|
+
...props
|
|
608
|
+
}) {
|
|
609
|
+
return /* @__PURE__ */ React8.createElement(
|
|
610
|
+
import_radix_ui6.DropdownMenu.CheckboxItem,
|
|
611
|
+
{
|
|
612
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
613
|
+
className: cn(
|
|
614
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
615
|
+
className
|
|
616
|
+
),
|
|
617
|
+
checked,
|
|
618
|
+
...props
|
|
619
|
+
},
|
|
620
|
+
/* @__PURE__ */ React8.createElement("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React8.createElement(import_lucide_react3.CheckIcon, { className: "size-4" }))),
|
|
621
|
+
children
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
function DropdownMenuRadioGroup({
|
|
625
|
+
...props
|
|
626
|
+
}) {
|
|
627
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
|
|
628
|
+
}
|
|
629
|
+
function DropdownMenuRadioItem({
|
|
630
|
+
className,
|
|
631
|
+
children,
|
|
632
|
+
...props
|
|
633
|
+
}) {
|
|
634
|
+
return /* @__PURE__ */ React8.createElement(
|
|
635
|
+
import_radix_ui6.DropdownMenu.RadioItem,
|
|
636
|
+
{
|
|
637
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
638
|
+
className: cn(
|
|
639
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
640
|
+
className
|
|
641
|
+
),
|
|
642
|
+
...props
|
|
643
|
+
},
|
|
644
|
+
/* @__PURE__ */ React8.createElement("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React8.createElement(import_lucide_react3.CircleIcon, { className: "size-2 fill-current" }))),
|
|
645
|
+
children
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
function DropdownMenuLabel({
|
|
649
|
+
className,
|
|
650
|
+
inset,
|
|
651
|
+
...props
|
|
652
|
+
}) {
|
|
653
|
+
return /* @__PURE__ */ React8.createElement(
|
|
654
|
+
import_radix_ui6.DropdownMenu.Label,
|
|
655
|
+
{
|
|
656
|
+
"data-slot": "dropdown-menu-label",
|
|
657
|
+
"data-inset": inset,
|
|
658
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
659
|
+
...props
|
|
660
|
+
}
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
function DropdownMenuSeparator({
|
|
664
|
+
className,
|
|
665
|
+
...props
|
|
666
|
+
}) {
|
|
667
|
+
return /* @__PURE__ */ React8.createElement(
|
|
668
|
+
import_radix_ui6.DropdownMenu.Separator,
|
|
669
|
+
{
|
|
670
|
+
"data-slot": "dropdown-menu-separator",
|
|
671
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
672
|
+
...props
|
|
673
|
+
}
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
677
|
+
return /* @__PURE__ */ React8.createElement(
|
|
678
|
+
"span",
|
|
679
|
+
{
|
|
680
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
681
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
682
|
+
...props
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
function DropdownMenuSub({
|
|
687
|
+
...props
|
|
688
|
+
}) {
|
|
689
|
+
return /* @__PURE__ */ React8.createElement(import_radix_ui6.DropdownMenu.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
690
|
+
}
|
|
691
|
+
function DropdownMenuSubTrigger({
|
|
692
|
+
className,
|
|
693
|
+
inset,
|
|
694
|
+
children,
|
|
695
|
+
...props
|
|
696
|
+
}) {
|
|
697
|
+
return /* @__PURE__ */ React8.createElement(
|
|
698
|
+
import_radix_ui6.DropdownMenu.SubTrigger,
|
|
699
|
+
{
|
|
700
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
701
|
+
"data-inset": inset,
|
|
702
|
+
className: cn(
|
|
703
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
704
|
+
className
|
|
705
|
+
),
|
|
706
|
+
...props
|
|
707
|
+
},
|
|
708
|
+
children,
|
|
709
|
+
/* @__PURE__ */ React8.createElement(import_lucide_react3.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
710
|
+
);
|
|
711
|
+
}
|
|
712
|
+
function DropdownMenuSubContent({
|
|
713
|
+
className,
|
|
714
|
+
...props
|
|
715
|
+
}) {
|
|
716
|
+
return /* @__PURE__ */ React8.createElement(
|
|
717
|
+
import_radix_ui6.DropdownMenu.SubContent,
|
|
718
|
+
{
|
|
719
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
720
|
+
className: cn(
|
|
721
|
+
"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
722
|
+
className
|
|
723
|
+
),
|
|
724
|
+
...props
|
|
725
|
+
}
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// src/components/ui/input.tsx
|
|
730
|
+
var React9 = __toESM(require("react"));
|
|
731
|
+
function Input({ className, type, ...props }) {
|
|
732
|
+
return /* @__PURE__ */ React9.createElement(
|
|
733
|
+
"input",
|
|
734
|
+
{
|
|
735
|
+
type,
|
|
736
|
+
"data-slot": "input",
|
|
737
|
+
className: cn(
|
|
738
|
+
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
739
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
740
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
741
|
+
className
|
|
742
|
+
),
|
|
743
|
+
...props
|
|
744
|
+
}
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// src/components/ui/label.tsx
|
|
749
|
+
var React10 = __toESM(require("react"));
|
|
750
|
+
var import_radix_ui7 = require("radix-ui");
|
|
751
|
+
function Label({
|
|
752
|
+
className,
|
|
753
|
+
...props
|
|
754
|
+
}) {
|
|
755
|
+
return /* @__PURE__ */ React10.createElement(
|
|
756
|
+
import_radix_ui7.Label.Root,
|
|
757
|
+
{
|
|
758
|
+
"data-slot": "label",
|
|
759
|
+
className: cn(
|
|
760
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
761
|
+
className
|
|
762
|
+
),
|
|
763
|
+
...props
|
|
764
|
+
}
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// src/components/ui/select.tsx
|
|
769
|
+
var React11 = __toESM(require("react"));
|
|
770
|
+
var import_lucide_react4 = require("lucide-react");
|
|
771
|
+
var import_radix_ui8 = require("radix-ui");
|
|
772
|
+
function Select({ ...props }) {
|
|
773
|
+
return /* @__PURE__ */ React11.createElement(import_radix_ui8.Select.Root, { "data-slot": "select", ...props });
|
|
774
|
+
}
|
|
775
|
+
function SelectGroup({ ...props }) {
|
|
776
|
+
return /* @__PURE__ */ React11.createElement(import_radix_ui8.Select.Group, { "data-slot": "select-group", ...props });
|
|
777
|
+
}
|
|
778
|
+
function SelectValue({ ...props }) {
|
|
779
|
+
return /* @__PURE__ */ React11.createElement(import_radix_ui8.Select.Value, { "data-slot": "select-value", ...props });
|
|
780
|
+
}
|
|
781
|
+
function SelectTrigger({
|
|
782
|
+
className,
|
|
783
|
+
size = "default",
|
|
784
|
+
children,
|
|
785
|
+
...props
|
|
786
|
+
}) {
|
|
787
|
+
return /* @__PURE__ */ React11.createElement(
|
|
788
|
+
import_radix_ui8.Select.Trigger,
|
|
789
|
+
{
|
|
790
|
+
"data-slot": "select-trigger",
|
|
791
|
+
"data-size": size,
|
|
792
|
+
className: cn(
|
|
793
|
+
"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
794
|
+
className
|
|
795
|
+
),
|
|
796
|
+
...props
|
|
797
|
+
},
|
|
798
|
+
children,
|
|
799
|
+
/* @__PURE__ */ React11.createElement(import_radix_ui8.Select.Icon, { asChild: true }, /* @__PURE__ */ React11.createElement(import_lucide_react4.ChevronDownIcon, { className: "size-4 opacity-50" }))
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
function SelectContent({
|
|
803
|
+
className,
|
|
804
|
+
children,
|
|
805
|
+
position = "item-aligned",
|
|
806
|
+
align = "center",
|
|
807
|
+
...props
|
|
808
|
+
}) {
|
|
809
|
+
return /* @__PURE__ */ React11.createElement(import_radix_ui8.Select.Portal, null, /* @__PURE__ */ React11.createElement(
|
|
810
|
+
import_radix_ui8.Select.Content,
|
|
811
|
+
{
|
|
812
|
+
"data-slot": "select-content",
|
|
813
|
+
className: cn(
|
|
814
|
+
"relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
815
|
+
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",
|
|
816
|
+
className
|
|
817
|
+
),
|
|
818
|
+
position,
|
|
819
|
+
align,
|
|
820
|
+
...props
|
|
821
|
+
},
|
|
822
|
+
/* @__PURE__ */ React11.createElement(SelectScrollUpButton, null),
|
|
823
|
+
/* @__PURE__ */ React11.createElement(
|
|
824
|
+
import_radix_ui8.Select.Viewport,
|
|
825
|
+
{
|
|
826
|
+
className: cn(
|
|
827
|
+
"p-1",
|
|
828
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
829
|
+
)
|
|
830
|
+
},
|
|
831
|
+
children
|
|
832
|
+
),
|
|
833
|
+
/* @__PURE__ */ React11.createElement(SelectScrollDownButton, null)
|
|
834
|
+
));
|
|
835
|
+
}
|
|
836
|
+
function SelectLabel({
|
|
837
|
+
className,
|
|
838
|
+
...props
|
|
839
|
+
}) {
|
|
840
|
+
return /* @__PURE__ */ React11.createElement(
|
|
841
|
+
import_radix_ui8.Select.Label,
|
|
842
|
+
{
|
|
843
|
+
"data-slot": "select-label",
|
|
844
|
+
className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
845
|
+
...props
|
|
846
|
+
}
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
function SelectItem({
|
|
850
|
+
className,
|
|
851
|
+
children,
|
|
852
|
+
...props
|
|
853
|
+
}) {
|
|
854
|
+
return /* @__PURE__ */ React11.createElement(
|
|
855
|
+
import_radix_ui8.Select.Item,
|
|
856
|
+
{
|
|
857
|
+
"data-slot": "select-item",
|
|
858
|
+
className: cn(
|
|
859
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
860
|
+
className
|
|
861
|
+
),
|
|
862
|
+
...props
|
|
863
|
+
},
|
|
864
|
+
/* @__PURE__ */ React11.createElement(
|
|
865
|
+
"span",
|
|
866
|
+
{
|
|
867
|
+
"data-slot": "select-item-indicator",
|
|
868
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center"
|
|
869
|
+
},
|
|
870
|
+
/* @__PURE__ */ React11.createElement(import_radix_ui8.Select.ItemIndicator, null, /* @__PURE__ */ React11.createElement(import_lucide_react4.CheckIcon, { className: "size-4" }))
|
|
871
|
+
),
|
|
872
|
+
/* @__PURE__ */ React11.createElement(import_radix_ui8.Select.ItemText, null, children)
|
|
873
|
+
);
|
|
874
|
+
}
|
|
875
|
+
function SelectSeparator({
|
|
876
|
+
className,
|
|
877
|
+
...props
|
|
878
|
+
}) {
|
|
879
|
+
return /* @__PURE__ */ React11.createElement(
|
|
880
|
+
import_radix_ui8.Select.Separator,
|
|
881
|
+
{
|
|
882
|
+
"data-slot": "select-separator",
|
|
883
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
884
|
+
...props
|
|
885
|
+
}
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
function SelectScrollUpButton({
|
|
889
|
+
className,
|
|
890
|
+
...props
|
|
891
|
+
}) {
|
|
892
|
+
return /* @__PURE__ */ React11.createElement(
|
|
893
|
+
import_radix_ui8.Select.ScrollUpButton,
|
|
894
|
+
{
|
|
895
|
+
"data-slot": "select-scroll-up-button",
|
|
896
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
897
|
+
...props
|
|
898
|
+
},
|
|
899
|
+
/* @__PURE__ */ React11.createElement(import_lucide_react4.ChevronUpIcon, { className: "size-4" })
|
|
900
|
+
);
|
|
901
|
+
}
|
|
902
|
+
function SelectScrollDownButton({
|
|
903
|
+
className,
|
|
904
|
+
...props
|
|
905
|
+
}) {
|
|
906
|
+
return /* @__PURE__ */ React11.createElement(
|
|
907
|
+
import_radix_ui8.Select.ScrollDownButton,
|
|
908
|
+
{
|
|
909
|
+
"data-slot": "select-scroll-down-button",
|
|
910
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
911
|
+
...props
|
|
912
|
+
},
|
|
913
|
+
/* @__PURE__ */ React11.createElement(import_lucide_react4.ChevronDownIcon, { className: "size-4" })
|
|
914
|
+
);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// src/components/ui/separator.tsx
|
|
918
|
+
var React12 = __toESM(require("react"));
|
|
919
|
+
var import_radix_ui9 = require("radix-ui");
|
|
920
|
+
function Separator({
|
|
921
|
+
className,
|
|
922
|
+
orientation = "horizontal",
|
|
923
|
+
decorative = true,
|
|
924
|
+
...props
|
|
925
|
+
}) {
|
|
926
|
+
return /* @__PURE__ */ React12.createElement(
|
|
927
|
+
import_radix_ui9.Separator.Root,
|
|
928
|
+
{
|
|
929
|
+
"data-slot": "separator",
|
|
930
|
+
decorative,
|
|
931
|
+
orientation,
|
|
932
|
+
className: cn(
|
|
933
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
934
|
+
className
|
|
935
|
+
),
|
|
936
|
+
...props
|
|
937
|
+
}
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// src/components/ui/sheet.tsx
|
|
942
|
+
var React13 = __toESM(require("react"));
|
|
943
|
+
var import_lucide_react5 = require("lucide-react");
|
|
944
|
+
var import_radix_ui10 = require("radix-ui");
|
|
945
|
+
function Sheet({ ...props }) {
|
|
946
|
+
return /* @__PURE__ */ React13.createElement(import_radix_ui10.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
947
|
+
}
|
|
948
|
+
function SheetTrigger({ ...props }) {
|
|
949
|
+
return /* @__PURE__ */ React13.createElement(import_radix_ui10.Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
950
|
+
}
|
|
951
|
+
function SheetClose({ ...props }) {
|
|
952
|
+
return /* @__PURE__ */ React13.createElement(import_radix_ui10.Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
953
|
+
}
|
|
954
|
+
function SheetPortal({ ...props }) {
|
|
955
|
+
return /* @__PURE__ */ React13.createElement(import_radix_ui10.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
956
|
+
}
|
|
957
|
+
function SheetOverlay({
|
|
958
|
+
className,
|
|
959
|
+
...props
|
|
960
|
+
}) {
|
|
961
|
+
return /* @__PURE__ */ React13.createElement(
|
|
962
|
+
import_radix_ui10.Dialog.Overlay,
|
|
963
|
+
{
|
|
964
|
+
"data-slot": "sheet-overlay",
|
|
965
|
+
className: cn(
|
|
966
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
967
|
+
className
|
|
968
|
+
),
|
|
969
|
+
...props
|
|
970
|
+
}
|
|
971
|
+
);
|
|
972
|
+
}
|
|
973
|
+
function SheetContent({
|
|
974
|
+
className,
|
|
975
|
+
children,
|
|
976
|
+
side = "right",
|
|
977
|
+
showCloseButton = true,
|
|
978
|
+
...props
|
|
979
|
+
}) {
|
|
980
|
+
return /* @__PURE__ */ React13.createElement(SheetPortal, null, /* @__PURE__ */ React13.createElement(SheetOverlay, null), /* @__PURE__ */ React13.createElement(
|
|
981
|
+
import_radix_ui10.Dialog.Content,
|
|
982
|
+
{
|
|
983
|
+
"data-slot": "sheet-content",
|
|
984
|
+
className: cn(
|
|
985
|
+
"fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",
|
|
986
|
+
side === "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",
|
|
987
|
+
side === "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",
|
|
988
|
+
side === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
989
|
+
side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
990
|
+
className
|
|
991
|
+
),
|
|
992
|
+
...props
|
|
993
|
+
},
|
|
994
|
+
children,
|
|
995
|
+
showCloseButton && /* @__PURE__ */ React13.createElement(import_radix_ui10.Dialog.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary" }, /* @__PURE__ */ React13.createElement(import_lucide_react5.XIcon, { className: "size-4" }), /* @__PURE__ */ React13.createElement("span", { className: "sr-only" }, "Close"))
|
|
996
|
+
));
|
|
997
|
+
}
|
|
998
|
+
function SheetHeader({ className, ...props }) {
|
|
999
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1000
|
+
"div",
|
|
1001
|
+
{
|
|
1002
|
+
"data-slot": "sheet-header",
|
|
1003
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
1004
|
+
...props
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
1008
|
+
function SheetFooter({ className, ...props }) {
|
|
1009
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1010
|
+
"div",
|
|
1011
|
+
{
|
|
1012
|
+
"data-slot": "sheet-footer",
|
|
1013
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1014
|
+
...props
|
|
1015
|
+
}
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1018
|
+
function SheetTitle({
|
|
1019
|
+
className,
|
|
1020
|
+
...props
|
|
1021
|
+
}) {
|
|
1022
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1023
|
+
import_radix_ui10.Dialog.Title,
|
|
1024
|
+
{
|
|
1025
|
+
"data-slot": "sheet-title",
|
|
1026
|
+
className: cn("font-semibold text-foreground", className),
|
|
1027
|
+
...props
|
|
1028
|
+
}
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
function SheetDescription({
|
|
1032
|
+
className,
|
|
1033
|
+
...props
|
|
1034
|
+
}) {
|
|
1035
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1036
|
+
import_radix_ui10.Dialog.Description,
|
|
1037
|
+
{
|
|
1038
|
+
"data-slot": "sheet-description",
|
|
1039
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1040
|
+
...props
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
// src/components/ui/table.tsx
|
|
1046
|
+
var React14 = __toESM(require("react"));
|
|
1047
|
+
function Table({ className, ...props }) {
|
|
1048
|
+
return /* @__PURE__ */ React14.createElement("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto" }, /* @__PURE__ */ React14.createElement(
|
|
1049
|
+
"table",
|
|
1050
|
+
{
|
|
1051
|
+
"data-slot": "table",
|
|
1052
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
1053
|
+
...props
|
|
1054
|
+
}
|
|
1055
|
+
));
|
|
1056
|
+
}
|
|
1057
|
+
function TableHeader({ className, ...props }) {
|
|
1058
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1059
|
+
"thead",
|
|
1060
|
+
{
|
|
1061
|
+
"data-slot": "table-header",
|
|
1062
|
+
className: cn("[&_tr]:border-b", className),
|
|
1063
|
+
...props
|
|
1064
|
+
}
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
function TableBody({ className, ...props }) {
|
|
1068
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1069
|
+
"tbody",
|
|
1070
|
+
{
|
|
1071
|
+
"data-slot": "table-body",
|
|
1072
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
1073
|
+
...props
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
}
|
|
1077
|
+
function TableFooter({ className, ...props }) {
|
|
1078
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1079
|
+
"tfoot",
|
|
1080
|
+
{
|
|
1081
|
+
"data-slot": "table-footer",
|
|
1082
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
1083
|
+
...props
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
function TableRow({ className, ...props }) {
|
|
1088
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1089
|
+
"tr",
|
|
1090
|
+
{
|
|
1091
|
+
"data-slot": "table-row",
|
|
1092
|
+
className: cn(
|
|
1093
|
+
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1094
|
+
className
|
|
1095
|
+
),
|
|
1096
|
+
...props
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
function TableHead({ className, ...props }) {
|
|
1101
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1102
|
+
"th",
|
|
1103
|
+
{
|
|
1104
|
+
"data-slot": "table-head",
|
|
1105
|
+
className: cn(
|
|
1106
|
+
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1107
|
+
className
|
|
1108
|
+
),
|
|
1109
|
+
...props
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
function TableCell({ className, ...props }) {
|
|
1114
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1115
|
+
"td",
|
|
1116
|
+
{
|
|
1117
|
+
"data-slot": "table-cell",
|
|
1118
|
+
className: cn(
|
|
1119
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1120
|
+
className
|
|
1121
|
+
),
|
|
1122
|
+
...props
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
function TableCaption({ className, ...props }) {
|
|
1127
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1128
|
+
"caption",
|
|
1129
|
+
{
|
|
1130
|
+
"data-slot": "table-caption",
|
|
1131
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1132
|
+
...props
|
|
1133
|
+
}
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
// src/components/ui/tabs.tsx
|
|
1138
|
+
var React15 = __toESM(require("react"));
|
|
1139
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
1140
|
+
var import_radix_ui11 = require("radix-ui");
|
|
1141
|
+
function Tabs({
|
|
1142
|
+
className,
|
|
1143
|
+
orientation = "horizontal",
|
|
1144
|
+
...props
|
|
1145
|
+
}) {
|
|
1146
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1147
|
+
import_radix_ui11.Tabs.Root,
|
|
1148
|
+
{
|
|
1149
|
+
"data-slot": "tabs",
|
|
1150
|
+
"data-orientation": orientation,
|
|
1151
|
+
orientation,
|
|
1152
|
+
className: cn(
|
|
1153
|
+
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
|
|
1154
|
+
className
|
|
1155
|
+
),
|
|
1156
|
+
...props
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
var tabsListVariants = (0, import_class_variance_authority3.cva)(
|
|
1161
|
+
"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",
|
|
1162
|
+
{
|
|
1163
|
+
variants: {
|
|
1164
|
+
variant: {
|
|
1165
|
+
default: "bg-muted",
|
|
1166
|
+
line: "gap-1 bg-transparent"
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1169
|
+
defaultVariants: {
|
|
1170
|
+
variant: "default"
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
function TabsList({
|
|
1175
|
+
className,
|
|
1176
|
+
variant = "default",
|
|
1177
|
+
...props
|
|
1178
|
+
}) {
|
|
1179
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1180
|
+
import_radix_ui11.Tabs.List,
|
|
1181
|
+
{
|
|
1182
|
+
"data-slot": "tabs-list",
|
|
1183
|
+
"data-variant": variant,
|
|
1184
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
1185
|
+
...props
|
|
1186
|
+
}
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
function TabsTrigger({
|
|
1190
|
+
className,
|
|
1191
|
+
...props
|
|
1192
|
+
}) {
|
|
1193
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1194
|
+
import_radix_ui11.Tabs.Trigger,
|
|
1195
|
+
{
|
|
1196
|
+
"data-slot": "tabs-trigger",
|
|
1197
|
+
className: cn(
|
|
1198
|
+
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1199
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
|
|
1200
|
+
"data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground",
|
|
1201
|
+
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
|
|
1202
|
+
className
|
|
1203
|
+
),
|
|
1204
|
+
...props
|
|
1205
|
+
}
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
function TabsContent({
|
|
1209
|
+
className,
|
|
1210
|
+
...props
|
|
1211
|
+
}) {
|
|
1212
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1213
|
+
import_radix_ui11.Tabs.Content,
|
|
1214
|
+
{
|
|
1215
|
+
"data-slot": "tabs-content",
|
|
1216
|
+
className: cn("flex-1 outline-none", className),
|
|
1217
|
+
...props
|
|
1218
|
+
}
|
|
1219
|
+
);
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
// src/components/ui/textarea.tsx
|
|
1223
|
+
var React16 = __toESM(require("react"));
|
|
1224
|
+
function Textarea({ className, ...props }) {
|
|
1225
|
+
return /* @__PURE__ */ React16.createElement(
|
|
1226
|
+
"textarea",
|
|
1227
|
+
{
|
|
1228
|
+
"data-slot": "textarea",
|
|
1229
|
+
className: cn(
|
|
1230
|
+
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
1231
|
+
className
|
|
1232
|
+
),
|
|
1233
|
+
...props
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
// src/components/chrome/Logo.tsx
|
|
1239
|
+
var import_brand = require("@augmenting-integrations/brand");
|
|
1240
|
+
function Logo({
|
|
1241
|
+
className,
|
|
1242
|
+
showWordmark = true
|
|
1243
|
+
}) {
|
|
1244
|
+
const brand = (0, import_brand.useBrand)();
|
|
1245
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("inline-flex items-center gap-2 text-primary", className) }, /* @__PURE__ */ React.createElement("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center text-current" }, /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 32 32", className: "h-full w-full", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("rect", { x: "2", y: "2", width: "28", height: "28", rx: "6", fill: "currentColor" }), /* @__PURE__ */ React.createElement(
|
|
1246
|
+
"path",
|
|
1247
|
+
{
|
|
1248
|
+
d: "M10 22V10h2.6l3.4 6.4L19.4 10H22v12h-2.4v-7.4l-2.8 5.2h-1.6L12.4 14.6V22H10z",
|
|
1249
|
+
fill: "var(--primary-foreground)"
|
|
1250
|
+
}
|
|
1251
|
+
))), showWordmark ? /* @__PURE__ */ React.createElement("span", { className: "text-base font-semibold tracking-tight text-foreground" }, brand.shortName) : null, /* @__PURE__ */ React.createElement("span", { className: "sr-only" }, brand.name));
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// src/components/chrome/ThemeSwitcher.tsx
|
|
1255
|
+
var React18 = __toESM(require("react"));
|
|
1256
|
+
var import_next_themes2 = require("next-themes");
|
|
1257
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1258
|
+
var import_themes2 = require("@augmenting-integrations/themes");
|
|
1259
|
+
|
|
1260
|
+
// src/providers/ThemeProvider.tsx
|
|
1261
|
+
var React17 = __toESM(require("react"));
|
|
1262
|
+
var import_next_themes = require("next-themes");
|
|
1263
|
+
var import_themes = require("@augmenting-integrations/themes");
|
|
1264
|
+
var ThemeNameContext = React17.createContext(null);
|
|
1265
|
+
function readCookie() {
|
|
1266
|
+
if (typeof document === "undefined") return null;
|
|
1267
|
+
const match = document.cookie.split("; ").find((row) => row.startsWith(`${import_themes.THEME_COOKIE_KEY}=`));
|
|
1268
|
+
if (!match) return null;
|
|
1269
|
+
const value = match.split("=")[1];
|
|
1270
|
+
return value && value.length > 0 ? value : null;
|
|
1271
|
+
}
|
|
1272
|
+
function writeCookie(value) {
|
|
1273
|
+
if (typeof document === "undefined") return;
|
|
1274
|
+
document.cookie = `${import_themes.THEME_COOKIE_KEY}=${value}; path=/; max-age=${60 * 60 * 24 * 365}; samesite=lax`;
|
|
1275
|
+
}
|
|
1276
|
+
function ThemeProvider({
|
|
1277
|
+
children,
|
|
1278
|
+
defaultTheme,
|
|
1279
|
+
defaultVariant
|
|
1280
|
+
}) {
|
|
1281
|
+
const [themeName, setThemeNameState] = React17.useState(
|
|
1282
|
+
() => readCookie() ?? defaultTheme
|
|
1283
|
+
);
|
|
1284
|
+
React17.useEffect(() => {
|
|
1285
|
+
document.documentElement.setAttribute("data-theme", themeName);
|
|
1286
|
+
}, [themeName]);
|
|
1287
|
+
const setThemeName = React17.useCallback((next) => {
|
|
1288
|
+
writeCookie(next);
|
|
1289
|
+
setThemeNameState(next);
|
|
1290
|
+
}, []);
|
|
1291
|
+
const value = React17.useMemo(
|
|
1292
|
+
() => ({ themeName, setThemeName }),
|
|
1293
|
+
[themeName, setThemeName]
|
|
1294
|
+
);
|
|
1295
|
+
return /* @__PURE__ */ React17.createElement(ThemeNameContext.Provider, { value }, /* @__PURE__ */ React17.createElement(
|
|
1296
|
+
import_next_themes.ThemeProvider,
|
|
1297
|
+
{
|
|
1298
|
+
attribute: "class",
|
|
1299
|
+
defaultTheme: defaultVariant,
|
|
1300
|
+
enableSystem: false,
|
|
1301
|
+
disableTransitionOnChange: true
|
|
1302
|
+
},
|
|
1303
|
+
children
|
|
1304
|
+
));
|
|
1305
|
+
}
|
|
1306
|
+
function useThemeName() {
|
|
1307
|
+
const ctx = React17.useContext(ThemeNameContext);
|
|
1308
|
+
if (!ctx) throw new Error("useThemeName must be used inside <ThemeProvider />");
|
|
1309
|
+
return ctx;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
// src/components/chrome/ThemeSwitcher.tsx
|
|
1313
|
+
function ThemeSwitcher({ className }) {
|
|
1314
|
+
const { themeName, setThemeName } = useThemeName();
|
|
1315
|
+
const { resolvedTheme, setTheme } = (0, import_next_themes2.useTheme)();
|
|
1316
|
+
const mounted = React18.useSyncExternalStore(
|
|
1317
|
+
() => () => {
|
|
1318
|
+
},
|
|
1319
|
+
() => true,
|
|
1320
|
+
() => false
|
|
1321
|
+
);
|
|
1322
|
+
if (!mounted) {
|
|
1323
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1324
|
+
"div",
|
|
1325
|
+
{
|
|
1326
|
+
className: cn(
|
|
1327
|
+
"h-9 w-[120px] rounded-md border border-border bg-background",
|
|
1328
|
+
className
|
|
1329
|
+
)
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
const isDark = resolvedTheme === "dark";
|
|
1334
|
+
const activeLabel = import_themes2.BASE_THEMES.find((t) => t.id === themeName)?.label ?? "Theme";
|
|
1335
|
+
return /* @__PURE__ */ React18.createElement("div", { className: cn("flex items-center gap-2", className) }, /* @__PURE__ */ React18.createElement(
|
|
1336
|
+
"button",
|
|
1337
|
+
{
|
|
1338
|
+
type: "button",
|
|
1339
|
+
onClick: () => setTheme(isDark ? "light" : "dark"),
|
|
1340
|
+
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
1341
|
+
className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-border bg-background text-foreground transition hover:bg-muted"
|
|
1342
|
+
},
|
|
1343
|
+
isDark ? /* @__PURE__ */ React18.createElement(import_lucide_react6.Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ React18.createElement(import_lucide_react6.Moon, { className: "h-4 w-4" })
|
|
1344
|
+
), /* @__PURE__ */ React18.createElement(DropdownMenu, null, /* @__PURE__ */ React18.createElement(
|
|
1345
|
+
DropdownMenuTrigger,
|
|
1346
|
+
{
|
|
1347
|
+
className: "inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm text-foreground transition hover:bg-muted",
|
|
1348
|
+
"aria-label": "Switch theme palette"
|
|
1349
|
+
},
|
|
1350
|
+
/* @__PURE__ */ React18.createElement(import_lucide_react6.Palette, { className: "h-4 w-4" }),
|
|
1351
|
+
/* @__PURE__ */ React18.createElement("span", { className: "font-medium" }, activeLabel)
|
|
1352
|
+
), /* @__PURE__ */ React18.createElement(DropdownMenuContent, { align: "end", sideOffset: 6, className: "w-72 p-1" }, import_themes2.BASE_THEMES.map((t) => /* @__PURE__ */ React18.createElement(
|
|
1353
|
+
DropdownMenuItem,
|
|
1354
|
+
{
|
|
1355
|
+
key: t.id,
|
|
1356
|
+
onClick: () => setThemeName(t.id),
|
|
1357
|
+
className: cn(
|
|
1358
|
+
"items-start gap-3 px-2 py-2",
|
|
1359
|
+
themeName === t.id && "bg-muted"
|
|
1360
|
+
)
|
|
1361
|
+
},
|
|
1362
|
+
/* @__PURE__ */ React18.createElement(
|
|
1363
|
+
"span",
|
|
1364
|
+
{
|
|
1365
|
+
"aria-hidden": true,
|
|
1366
|
+
className: "mt-0.5 inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-full ring-1 ring-border"
|
|
1367
|
+
},
|
|
1368
|
+
/* @__PURE__ */ React18.createElement("span", { className: "h-full w-1/2", style: { background: t.swatch.primary } }),
|
|
1369
|
+
/* @__PURE__ */ React18.createElement(
|
|
1370
|
+
"span",
|
|
1371
|
+
{
|
|
1372
|
+
className: "h-full w-1/2",
|
|
1373
|
+
style: { background: t.swatch.primaryDark }
|
|
1374
|
+
}
|
|
1375
|
+
)
|
|
1376
|
+
),
|
|
1377
|
+
/* @__PURE__ */ React18.createElement("span", { className: "flex flex-col" }, /* @__PURE__ */ React18.createElement("span", { className: "text-sm font-medium" }, t.label), /* @__PURE__ */ React18.createElement("span", { className: "text-xs text-muted-foreground" }, t.description))
|
|
1378
|
+
)))));
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
// src/components/chrome/RoleSwitcher.tsx
|
|
1382
|
+
var React19 = __toESM(require("react"));
|
|
1383
|
+
var import_react = require("next-auth/react");
|
|
1384
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1385
|
+
var ROLES = ["visitor", "sales", "agent", "admin"];
|
|
1386
|
+
function RoleSwitcher({ className }) {
|
|
1387
|
+
const { data: session, update } = (0, import_react.useSession)();
|
|
1388
|
+
const [open, setOpen] = React19.useState(false);
|
|
1389
|
+
const current = session?.user?.role ?? "visitor";
|
|
1390
|
+
return /* @__PURE__ */ React19.createElement("div", { className: cn("relative", className) }, /* @__PURE__ */ React19.createElement(
|
|
1391
|
+
"button",
|
|
1392
|
+
{
|
|
1393
|
+
type: "button",
|
|
1394
|
+
onClick: () => setOpen((o) => !o),
|
|
1395
|
+
"aria-haspopup": "menu",
|
|
1396
|
+
"aria-expanded": open,
|
|
1397
|
+
className: "inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm text-foreground transition hover:bg-muted"
|
|
1398
|
+
},
|
|
1399
|
+
/* @__PURE__ */ React19.createElement(import_lucide_react7.UserCog, { className: "h-4 w-4" }),
|
|
1400
|
+
/* @__PURE__ */ React19.createElement("span", { className: "font-medium capitalize" }, current)
|
|
1401
|
+
), open ? /* @__PURE__ */ React19.createElement(
|
|
1402
|
+
"div",
|
|
1403
|
+
{
|
|
1404
|
+
role: "menu",
|
|
1405
|
+
className: "absolute right-0 top-full z-50 mt-2 w-56 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
1406
|
+
onMouseLeave: () => setOpen(false)
|
|
1407
|
+
},
|
|
1408
|
+
/* @__PURE__ */ React19.createElement("div", { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground" }, "Switch role (dev)"),
|
|
1409
|
+
ROLES.map((r) => /* @__PURE__ */ React19.createElement(
|
|
1410
|
+
"button",
|
|
1411
|
+
{
|
|
1412
|
+
key: r,
|
|
1413
|
+
type: "button",
|
|
1414
|
+
role: "menuitem",
|
|
1415
|
+
onClick: async () => {
|
|
1416
|
+
await (0, import_react.signIn)("credentials", { role: r, redirect: false });
|
|
1417
|
+
await update();
|
|
1418
|
+
setOpen(false);
|
|
1419
|
+
},
|
|
1420
|
+
className: cn(
|
|
1421
|
+
"flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm capitalize transition hover:bg-muted",
|
|
1422
|
+
current === r && "bg-muted"
|
|
1423
|
+
)
|
|
1424
|
+
},
|
|
1425
|
+
/* @__PURE__ */ React19.createElement("span", null, r),
|
|
1426
|
+
current === r ? /* @__PURE__ */ React19.createElement("span", { className: "text-xs text-muted-foreground" }, "active") : null
|
|
1427
|
+
))
|
|
1428
|
+
) : null);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
// src/components/shells/PublicShell.tsx
|
|
1432
|
+
var React20 = __toESM(require("react"));
|
|
1433
|
+
var import_brand2 = require("@augmenting-integrations/brand");
|
|
1434
|
+
function PublicShell({
|
|
1435
|
+
children,
|
|
1436
|
+
navLinks,
|
|
1437
|
+
loginHref = "/login",
|
|
1438
|
+
footerLinks,
|
|
1439
|
+
Link
|
|
1440
|
+
}) {
|
|
1441
|
+
const brand = (0, import_brand2.useBrand)();
|
|
1442
|
+
return /* @__PURE__ */ React20.createElement("div", { className: "flex min-h-svh flex-col bg-background text-foreground" }, /* @__PURE__ */ React20.createElement("header", { className: "border-b border-border bg-background/80 backdrop-blur" }, /* @__PURE__ */ React20.createElement("div", { className: "mx-auto flex max-w-6xl items-center justify-between px-6 py-4" }, /* @__PURE__ */ React20.createElement(Link, { href: "/", "aria-label": "Home" }, /* @__PURE__ */ React20.createElement(Logo, null)), /* @__PURE__ */ React20.createElement("nav", { className: "flex items-center gap-6 text-sm" }, navLinks.map((link) => /* @__PURE__ */ React20.createElement(
|
|
1443
|
+
Link,
|
|
1444
|
+
{
|
|
1445
|
+
key: link.href,
|
|
1446
|
+
href: link.href,
|
|
1447
|
+
className: "text-muted-foreground transition hover:text-foreground"
|
|
1448
|
+
},
|
|
1449
|
+
link.label
|
|
1450
|
+
)), /* @__PURE__ */ React20.createElement(
|
|
1451
|
+
Link,
|
|
1452
|
+
{
|
|
1453
|
+
href: loginHref,
|
|
1454
|
+
className: "text-muted-foreground transition hover:text-foreground"
|
|
1455
|
+
},
|
|
1456
|
+
"Log in"
|
|
1457
|
+
), /* @__PURE__ */ React20.createElement(ThemeSwitcher, null)))), /* @__PURE__ */ React20.createElement("main", { className: "flex-1" }, children), /* @__PURE__ */ React20.createElement("footer", { className: "border-t border-border" }, /* @__PURE__ */ React20.createElement("div", { className: "mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-6 py-6 text-sm text-muted-foreground" }, /* @__PURE__ */ React20.createElement("span", null, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", brand.name), /* @__PURE__ */ React20.createElement("div", { className: "flex gap-4" }, (footerLinks ?? []).map((link) => /* @__PURE__ */ React20.createElement(Link, { key: link.href, href: link.href, className: "hover:text-foreground" }, link.label))))));
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
// src/components/shells/AppShell.tsx
|
|
1461
|
+
var React21 = __toESM(require("react"));
|
|
1462
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1463
|
+
function NavGroup({
|
|
1464
|
+
group,
|
|
1465
|
+
pathname,
|
|
1466
|
+
Link
|
|
1467
|
+
}) {
|
|
1468
|
+
if (group.items.length === 0) return null;
|
|
1469
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React21.createElement("p", { className: "px-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground" }, group.label), /* @__PURE__ */ React21.createElement("ul", { className: "space-y-0.5" }, group.items.map((item) => {
|
|
1470
|
+
const active = pathname === item.href || pathname.startsWith(`${item.href}/`);
|
|
1471
|
+
return /* @__PURE__ */ React21.createElement("li", { key: item.href }, /* @__PURE__ */ React21.createElement(
|
|
1472
|
+
Link,
|
|
1473
|
+
{
|
|
1474
|
+
href: item.href,
|
|
1475
|
+
className: cn(
|
|
1476
|
+
"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition",
|
|
1477
|
+
active ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent/60"
|
|
1478
|
+
)
|
|
1479
|
+
},
|
|
1480
|
+
/* @__PURE__ */ React21.createElement(item.icon, { className: "h-4 w-4 shrink-0" }),
|
|
1481
|
+
/* @__PURE__ */ React21.createElement("span", null, item.label)
|
|
1482
|
+
));
|
|
1483
|
+
})));
|
|
1484
|
+
}
|
|
1485
|
+
function AppShell({
|
|
1486
|
+
children,
|
|
1487
|
+
pathname,
|
|
1488
|
+
navGroups,
|
|
1489
|
+
Link,
|
|
1490
|
+
homeHref = "/",
|
|
1491
|
+
showRoleSwitcher = true
|
|
1492
|
+
}) {
|
|
1493
|
+
const [mobileOpen, setMobileOpen] = React21.useState(false);
|
|
1494
|
+
const sidebarContent = /* @__PURE__ */ React21.createElement("div", { className: "flex h-full flex-col gap-6 px-3 py-4" }, /* @__PURE__ */ React21.createElement(Link, { href: homeHref, className: "px-2", "aria-label": "Home" }, /* @__PURE__ */ React21.createElement(Logo, null)), navGroups.map((g) => /* @__PURE__ */ React21.createElement(NavGroup, { key: g.label, group: g, pathname, Link })));
|
|
1495
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "flex min-h-svh bg-background text-foreground" }, /* @__PURE__ */ React21.createElement("aside", { className: "hidden w-64 shrink-0 border-r border-sidebar-border bg-sidebar text-sidebar-foreground md:block" }, sidebarContent), mobileOpen ? /* @__PURE__ */ React21.createElement("div", { className: "fixed inset-0 z-50 flex md:hidden" }, /* @__PURE__ */ React21.createElement(
|
|
1496
|
+
"div",
|
|
1497
|
+
{
|
|
1498
|
+
className: "flex-1 bg-foreground/40 backdrop-blur-sm",
|
|
1499
|
+
onClick: () => setMobileOpen(false),
|
|
1500
|
+
"aria-hidden": true
|
|
1501
|
+
}
|
|
1502
|
+
), /* @__PURE__ */ React21.createElement("aside", { className: "relative w-72 border-l border-sidebar-border bg-sidebar text-sidebar-foreground" }, /* @__PURE__ */ React21.createElement(
|
|
1503
|
+
"button",
|
|
1504
|
+
{
|
|
1505
|
+
type: "button",
|
|
1506
|
+
onClick: () => setMobileOpen(false),
|
|
1507
|
+
"aria-label": "Close menu",
|
|
1508
|
+
className: "absolute right-2 top-2 inline-flex h-9 w-9 items-center justify-center rounded-md hover:bg-sidebar-accent"
|
|
1509
|
+
},
|
|
1510
|
+
/* @__PURE__ */ React21.createElement(import_lucide_react8.X, { className: "h-4 w-4" })
|
|
1511
|
+
), sidebarContent)) : null, /* @__PURE__ */ React21.createElement("div", { className: "flex min-w-0 flex-1 flex-col" }, /* @__PURE__ */ React21.createElement("header", { className: "flex h-14 items-center justify-between gap-3 border-b border-border bg-background/80 px-4 backdrop-blur md:px-6" }, /* @__PURE__ */ React21.createElement(
|
|
1512
|
+
"button",
|
|
1513
|
+
{
|
|
1514
|
+
type: "button",
|
|
1515
|
+
onClick: () => setMobileOpen(true),
|
|
1516
|
+
"aria-label": "Open menu",
|
|
1517
|
+
className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-border md:hidden"
|
|
1518
|
+
},
|
|
1519
|
+
/* @__PURE__ */ React21.createElement(import_lucide_react8.Menu, { className: "h-4 w-4" })
|
|
1520
|
+
), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3 md:ml-auto" }, showRoleSwitcher ? /* @__PURE__ */ React21.createElement(RoleSwitcher, null) : null, /* @__PURE__ */ React21.createElement(ThemeSwitcher, null))), /* @__PURE__ */ React21.createElement("main", { className: "min-w-0 flex-1 px-4 py-6 md:px-8 md:py-8" }, children)));
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
// src/components/shells/StudioShell.tsx
|
|
1524
|
+
var React22 = __toESM(require("react"));
|
|
1525
|
+
function StudioShell({
|
|
1526
|
+
title,
|
|
1527
|
+
description,
|
|
1528
|
+
actions,
|
|
1529
|
+
children,
|
|
1530
|
+
className
|
|
1531
|
+
}) {
|
|
1532
|
+
return /* @__PURE__ */ React22.createElement("section", { className: cn("space-y-6", className) }, /* @__PURE__ */ React22.createElement("header", { className: "flex flex-wrap items-start justify-between gap-3" }, /* @__PURE__ */ React22.createElement("div", null, /* @__PURE__ */ React22.createElement("h1", { className: "text-2xl font-semibold tracking-tight" }, title), description ? /* @__PURE__ */ React22.createElement("p", { className: "mt-1 max-w-2xl text-sm text-muted-foreground" }, description) : null), actions ? /* @__PURE__ */ React22.createElement("div", { className: "flex items-center gap-2" }, actions) : null), /* @__PURE__ */ React22.createElement("div", { className: "rounded-lg border border-border bg-card p-4 md:p-6" }, children));
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
// src/providers/SessionProvider.tsx
|
|
1536
|
+
var import_react2 = require("next-auth/react");
|
|
1537
|
+
function SessionProvider({
|
|
1538
|
+
children,
|
|
1539
|
+
session
|
|
1540
|
+
}) {
|
|
1541
|
+
return /* @__PURE__ */ React.createElement(import_react2.SessionProvider, { session }, children);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
// src/providers/QueryProvider.tsx
|
|
1545
|
+
var React23 = __toESM(require("react"));
|
|
1546
|
+
var import_react_query = require("@tanstack/react-query");
|
|
1547
|
+
function QueryProvider({ children }) {
|
|
1548
|
+
const [client] = React23.useState(
|
|
1549
|
+
() => new import_react_query.QueryClient({
|
|
1550
|
+
defaultOptions: {
|
|
1551
|
+
queries: { staleTime: 3e4, refetchOnWindowFocus: false }
|
|
1552
|
+
}
|
|
1553
|
+
})
|
|
1554
|
+
);
|
|
1555
|
+
return /* @__PURE__ */ React23.createElement(import_react_query.QueryClientProvider, { client }, children);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
// src/providers/MockProvider.tsx
|
|
1559
|
+
var React24 = __toESM(require("react"));
|
|
1560
|
+
function MockProvider({
|
|
1561
|
+
children,
|
|
1562
|
+
loadWorker,
|
|
1563
|
+
serviceWorkerUrl = "/mockServiceWorker.js"
|
|
1564
|
+
}) {
|
|
1565
|
+
const [ready, setReady] = React24.useState(() => process.env.NODE_ENV !== "development");
|
|
1566
|
+
const [error, setError] = React24.useState(null);
|
|
1567
|
+
React24.useEffect(() => {
|
|
1568
|
+
if (process.env.NODE_ENV !== "development") return;
|
|
1569
|
+
let cancelled = false;
|
|
1570
|
+
void (async () => {
|
|
1571
|
+
try {
|
|
1572
|
+
const worker = await loadWorker();
|
|
1573
|
+
await worker.start({
|
|
1574
|
+
onUnhandledRequest: "bypass",
|
|
1575
|
+
serviceWorker: { url: serviceWorkerUrl }
|
|
1576
|
+
});
|
|
1577
|
+
if (!cancelled) setReady(true);
|
|
1578
|
+
} catch (e) {
|
|
1579
|
+
console.error("[MockProvider] MSW failed to start:", e);
|
|
1580
|
+
if (!cancelled) {
|
|
1581
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
1582
|
+
setReady(true);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
})();
|
|
1586
|
+
return () => {
|
|
1587
|
+
cancelled = true;
|
|
1588
|
+
};
|
|
1589
|
+
}, [loadWorker, serviceWorkerUrl]);
|
|
1590
|
+
if (!ready) {
|
|
1591
|
+
return /* @__PURE__ */ React24.createElement("div", { className: "flex min-h-svh items-center justify-center bg-background text-muted-foreground" }, /* @__PURE__ */ React24.createElement("p", { className: "text-sm" }, "Initializing mocks\u2026"));
|
|
1592
|
+
}
|
|
1593
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, error ? /* @__PURE__ */ React24.createElement("div", { className: "border-b border-destructive/40 bg-destructive/10 px-4 py-2 text-xs text-destructive" }, "MSW failed to start (", error, "). Mock API calls will return real 404s.") : null, children);
|
|
1594
|
+
}
|
|
1595
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1596
|
+
0 && (module.exports = {
|
|
1597
|
+
AppShell,
|
|
1598
|
+
Avatar,
|
|
1599
|
+
AvatarBadge,
|
|
1600
|
+
AvatarFallback,
|
|
1601
|
+
AvatarGroup,
|
|
1602
|
+
AvatarGroupCount,
|
|
1603
|
+
AvatarImage,
|
|
1604
|
+
Badge,
|
|
1605
|
+
Button,
|
|
1606
|
+
Card,
|
|
1607
|
+
CardAction,
|
|
1608
|
+
CardContent,
|
|
1609
|
+
CardDescription,
|
|
1610
|
+
CardFooter,
|
|
1611
|
+
CardHeader,
|
|
1612
|
+
CardTitle,
|
|
1613
|
+
Checkbox,
|
|
1614
|
+
Dialog,
|
|
1615
|
+
DialogClose,
|
|
1616
|
+
DialogContent,
|
|
1617
|
+
DialogDescription,
|
|
1618
|
+
DialogFooter,
|
|
1619
|
+
DialogHeader,
|
|
1620
|
+
DialogOverlay,
|
|
1621
|
+
DialogPortal,
|
|
1622
|
+
DialogTitle,
|
|
1623
|
+
DialogTrigger,
|
|
1624
|
+
DropdownMenu,
|
|
1625
|
+
DropdownMenuCheckboxItem,
|
|
1626
|
+
DropdownMenuContent,
|
|
1627
|
+
DropdownMenuGroup,
|
|
1628
|
+
DropdownMenuItem,
|
|
1629
|
+
DropdownMenuLabel,
|
|
1630
|
+
DropdownMenuPortal,
|
|
1631
|
+
DropdownMenuRadioGroup,
|
|
1632
|
+
DropdownMenuRadioItem,
|
|
1633
|
+
DropdownMenuSeparator,
|
|
1634
|
+
DropdownMenuShortcut,
|
|
1635
|
+
DropdownMenuSub,
|
|
1636
|
+
DropdownMenuSubContent,
|
|
1637
|
+
DropdownMenuSubTrigger,
|
|
1638
|
+
DropdownMenuTrigger,
|
|
1639
|
+
Input,
|
|
1640
|
+
Label,
|
|
1641
|
+
Logo,
|
|
1642
|
+
MockProvider,
|
|
1643
|
+
PublicShell,
|
|
1644
|
+
QueryProvider,
|
|
1645
|
+
RoleSwitcher,
|
|
1646
|
+
Select,
|
|
1647
|
+
SelectContent,
|
|
1648
|
+
SelectGroup,
|
|
1649
|
+
SelectItem,
|
|
1650
|
+
SelectLabel,
|
|
1651
|
+
SelectScrollDownButton,
|
|
1652
|
+
SelectScrollUpButton,
|
|
1653
|
+
SelectSeparator,
|
|
1654
|
+
SelectTrigger,
|
|
1655
|
+
SelectValue,
|
|
1656
|
+
Separator,
|
|
1657
|
+
SessionProvider,
|
|
1658
|
+
Sheet,
|
|
1659
|
+
SheetClose,
|
|
1660
|
+
SheetContent,
|
|
1661
|
+
SheetDescription,
|
|
1662
|
+
SheetFooter,
|
|
1663
|
+
SheetHeader,
|
|
1664
|
+
SheetTitle,
|
|
1665
|
+
SheetTrigger,
|
|
1666
|
+
StudioShell,
|
|
1667
|
+
Table,
|
|
1668
|
+
TableBody,
|
|
1669
|
+
TableCaption,
|
|
1670
|
+
TableCell,
|
|
1671
|
+
TableFooter,
|
|
1672
|
+
TableHead,
|
|
1673
|
+
TableHeader,
|
|
1674
|
+
TableRow,
|
|
1675
|
+
Tabs,
|
|
1676
|
+
TabsContent,
|
|
1677
|
+
TabsList,
|
|
1678
|
+
TabsTrigger,
|
|
1679
|
+
Textarea,
|
|
1680
|
+
ThemeProvider,
|
|
1681
|
+
ThemeSwitcher,
|
|
1682
|
+
badgeVariants,
|
|
1683
|
+
buttonVariants,
|
|
1684
|
+
cn,
|
|
1685
|
+
tabsListVariants,
|
|
1686
|
+
useThemeName
|
|
1687
|
+
});
|
|
1688
|
+
//# sourceMappingURL=index.cjs.map
|