@c-rex/ui 0.0.1
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/README.md +1 -0
- package/dist/index.d.mts +267 -0
- package/dist/index.d.ts +267 -0
- package/dist/index.js +1747 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1615 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1747 @@
|
|
|
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
|
+
Alert: () => Alert,
|
|
34
|
+
AlertDescription: () => AlertDescription,
|
|
35
|
+
AlertTitle: () => AlertTitle,
|
|
36
|
+
Breadcrumb: () => Breadcrumb,
|
|
37
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
38
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
39
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
40
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
41
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
42
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
43
|
+
Button: () => Button,
|
|
44
|
+
Command: () => Command,
|
|
45
|
+
CommandDialog: () => CommandDialog,
|
|
46
|
+
CommandEmpty: () => CommandEmpty,
|
|
47
|
+
CommandGroup: () => CommandGroup,
|
|
48
|
+
CommandInput: () => CommandInput,
|
|
49
|
+
CommandItem: () => CommandItem,
|
|
50
|
+
CommandList: () => CommandList,
|
|
51
|
+
CommandSeparator: () => CommandSeparator,
|
|
52
|
+
CommandShortcut: () => CommandShortcut,
|
|
53
|
+
Dialog: () => Dialog,
|
|
54
|
+
DialogClose: () => DialogClose,
|
|
55
|
+
DialogContent: () => DialogContent,
|
|
56
|
+
DialogDescription: () => DialogDescription,
|
|
57
|
+
DialogFooter: () => DialogFooter,
|
|
58
|
+
DialogHeader: () => DialogHeader,
|
|
59
|
+
DialogOverlay: () => DialogOverlay,
|
|
60
|
+
DialogPortal: () => DialogPortal,
|
|
61
|
+
DialogTitle: () => DialogTitle,
|
|
62
|
+
DialogTrigger: () => DialogTrigger,
|
|
63
|
+
Input: () => Input,
|
|
64
|
+
Popover: () => Popover,
|
|
65
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
66
|
+
PopoverContent: () => PopoverContent,
|
|
67
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
68
|
+
Select: () => Select,
|
|
69
|
+
SelectContent: () => SelectContent,
|
|
70
|
+
SelectGroup: () => SelectGroup,
|
|
71
|
+
SelectItem: () => SelectItem,
|
|
72
|
+
SelectLabel: () => SelectLabel,
|
|
73
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
74
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
75
|
+
SelectSeparator: () => SelectSeparator,
|
|
76
|
+
SelectTrigger: () => SelectTrigger,
|
|
77
|
+
SelectValue: () => SelectValue,
|
|
78
|
+
Separator: () => Separator2,
|
|
79
|
+
Sheet: () => Sheet,
|
|
80
|
+
SheetClose: () => SheetClose,
|
|
81
|
+
SheetContent: () => SheetContent,
|
|
82
|
+
SheetDescription: () => SheetDescription,
|
|
83
|
+
SheetFooter: () => SheetFooter,
|
|
84
|
+
SheetHeader: () => SheetHeader,
|
|
85
|
+
SheetOverlay: () => SheetOverlay,
|
|
86
|
+
SheetPortal: () => SheetPortal,
|
|
87
|
+
SheetTitle: () => SheetTitle,
|
|
88
|
+
SheetTrigger: () => SheetTrigger,
|
|
89
|
+
Sidebar: () => Sidebar,
|
|
90
|
+
SidebarContent: () => SidebarContent,
|
|
91
|
+
SidebarFooter: () => SidebarFooter,
|
|
92
|
+
SidebarGroup: () => SidebarGroup,
|
|
93
|
+
SidebarGroupAction: () => SidebarGroupAction,
|
|
94
|
+
SidebarGroupContent: () => SidebarGroupContent,
|
|
95
|
+
SidebarGroupLabel: () => SidebarGroupLabel,
|
|
96
|
+
SidebarHeader: () => SidebarHeader,
|
|
97
|
+
SidebarInput: () => SidebarInput,
|
|
98
|
+
SidebarInset: () => SidebarInset,
|
|
99
|
+
SidebarMenu: () => SidebarMenu,
|
|
100
|
+
SidebarMenuAction: () => SidebarMenuAction,
|
|
101
|
+
SidebarMenuBadge: () => SidebarMenuBadge,
|
|
102
|
+
SidebarMenuButton: () => SidebarMenuButton,
|
|
103
|
+
SidebarMenuItem: () => SidebarMenuItem,
|
|
104
|
+
SidebarMenuSkeleton: () => SidebarMenuSkeleton,
|
|
105
|
+
SidebarMenuSub: () => SidebarMenuSub,
|
|
106
|
+
SidebarMenuSubButton: () => SidebarMenuSubButton,
|
|
107
|
+
SidebarMenuSubItem: () => SidebarMenuSubItem,
|
|
108
|
+
SidebarProvider: () => SidebarProvider,
|
|
109
|
+
SidebarRail: () => SidebarRail,
|
|
110
|
+
SidebarSeparator: () => SidebarSeparator,
|
|
111
|
+
SidebarTrigger: () => SidebarTrigger,
|
|
112
|
+
Skeleton: () => Skeleton,
|
|
113
|
+
Table: () => Table,
|
|
114
|
+
TableBody: () => TableBody,
|
|
115
|
+
TableCaption: () => TableCaption,
|
|
116
|
+
TableCell: () => TableCell,
|
|
117
|
+
TableFooter: () => TableFooter,
|
|
118
|
+
TableHead: () => TableHead,
|
|
119
|
+
TableHeader: () => TableHeader,
|
|
120
|
+
TableRow: () => TableRow,
|
|
121
|
+
Tooltip: () => Tooltip,
|
|
122
|
+
TooltipContent: () => TooltipContent,
|
|
123
|
+
TooltipProvider: () => TooltipProvider,
|
|
124
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
125
|
+
buttonVariants: () => buttonVariants,
|
|
126
|
+
cn: () => cn,
|
|
127
|
+
useIsMobile: () => useIsMobile,
|
|
128
|
+
useSidebar: () => useSidebar
|
|
129
|
+
});
|
|
130
|
+
module.exports = __toCommonJS(index_exports);
|
|
131
|
+
|
|
132
|
+
// src/alert.tsx
|
|
133
|
+
var React = __toESM(require("react"));
|
|
134
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
135
|
+
|
|
136
|
+
// src/lib/utils.ts
|
|
137
|
+
var import_clsx = require("clsx");
|
|
138
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
139
|
+
function cn(...inputs) {
|
|
140
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// src/alert.tsx
|
|
144
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
145
|
+
var alertVariants = (0, import_class_variance_authority.cva)(
|
|
146
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
147
|
+
{
|
|
148
|
+
variants: {
|
|
149
|
+
variant: {
|
|
150
|
+
default: "bg-background text-foreground",
|
|
151
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
defaultVariants: {
|
|
155
|
+
variant: "default"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
var Alert = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
ref,
|
|
163
|
+
role: "alert",
|
|
164
|
+
className: cn(alertVariants({ variant }), className),
|
|
165
|
+
...props
|
|
166
|
+
}
|
|
167
|
+
));
|
|
168
|
+
Alert.displayName = "Alert";
|
|
169
|
+
var AlertTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
170
|
+
"h5",
|
|
171
|
+
{
|
|
172
|
+
ref,
|
|
173
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
174
|
+
...props
|
|
175
|
+
}
|
|
176
|
+
));
|
|
177
|
+
AlertTitle.displayName = "AlertTitle";
|
|
178
|
+
var AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
ref,
|
|
182
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
183
|
+
...props
|
|
184
|
+
}
|
|
185
|
+
));
|
|
186
|
+
AlertDescription.displayName = "AlertDescription";
|
|
187
|
+
|
|
188
|
+
// src/breadcrumb.tsx
|
|
189
|
+
var React4 = __toESM(require("react"));
|
|
190
|
+
|
|
191
|
+
// ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
192
|
+
var React3 = __toESM(require("react"), 1);
|
|
193
|
+
|
|
194
|
+
// ../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
195
|
+
var React2 = __toESM(require("react"), 1);
|
|
196
|
+
function setRef(ref, value) {
|
|
197
|
+
if (typeof ref === "function") {
|
|
198
|
+
return ref(value);
|
|
199
|
+
} else if (ref !== null && ref !== void 0) {
|
|
200
|
+
ref.current = value;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function composeRefs(...refs) {
|
|
204
|
+
return (node) => {
|
|
205
|
+
let hasCleanup = false;
|
|
206
|
+
const cleanups = refs.map((ref) => {
|
|
207
|
+
const cleanup = setRef(ref, node);
|
|
208
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
209
|
+
hasCleanup = true;
|
|
210
|
+
}
|
|
211
|
+
return cleanup;
|
|
212
|
+
});
|
|
213
|
+
if (hasCleanup) {
|
|
214
|
+
return () => {
|
|
215
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
216
|
+
const cleanup = cleanups[i];
|
|
217
|
+
if (typeof cleanup == "function") {
|
|
218
|
+
cleanup();
|
|
219
|
+
} else {
|
|
220
|
+
setRef(refs[i], null);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
229
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
230
|
+
// @__NO_SIDE_EFFECTS__
|
|
231
|
+
function createSlot(ownerName) {
|
|
232
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
233
|
+
const Slot2 = React3.forwardRef((props, forwardedRef) => {
|
|
234
|
+
const { children, ...slotProps } = props;
|
|
235
|
+
const childrenArray = React3.Children.toArray(children);
|
|
236
|
+
const slottable = childrenArray.find(isSlottable);
|
|
237
|
+
if (slottable) {
|
|
238
|
+
const newElement = slottable.props.children;
|
|
239
|
+
const newChildren = childrenArray.map((child) => {
|
|
240
|
+
if (child === slottable) {
|
|
241
|
+
if (React3.Children.count(newElement) > 1) return React3.Children.only(null);
|
|
242
|
+
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
|
243
|
+
} else {
|
|
244
|
+
return child;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
248
|
+
}
|
|
249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
250
|
+
});
|
|
251
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
252
|
+
return Slot2;
|
|
253
|
+
}
|
|
254
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
255
|
+
// @__NO_SIDE_EFFECTS__
|
|
256
|
+
function createSlotClone(ownerName) {
|
|
257
|
+
const SlotClone = React3.forwardRef((props, forwardedRef) => {
|
|
258
|
+
const { children, ...slotProps } = props;
|
|
259
|
+
if (React3.isValidElement(children)) {
|
|
260
|
+
const childrenRef = getElementRef(children);
|
|
261
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
262
|
+
if (children.type !== React3.Fragment) {
|
|
263
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
264
|
+
}
|
|
265
|
+
return React3.cloneElement(children, props2);
|
|
266
|
+
}
|
|
267
|
+
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
|
268
|
+
});
|
|
269
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
270
|
+
return SlotClone;
|
|
271
|
+
}
|
|
272
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
273
|
+
function isSlottable(child) {
|
|
274
|
+
return React3.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
275
|
+
}
|
|
276
|
+
function mergeProps(slotProps, childProps) {
|
|
277
|
+
const overrideProps = { ...childProps };
|
|
278
|
+
for (const propName in childProps) {
|
|
279
|
+
const slotPropValue = slotProps[propName];
|
|
280
|
+
const childPropValue = childProps[propName];
|
|
281
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
282
|
+
if (isHandler) {
|
|
283
|
+
if (slotPropValue && childPropValue) {
|
|
284
|
+
overrideProps[propName] = (...args) => {
|
|
285
|
+
childPropValue(...args);
|
|
286
|
+
slotPropValue(...args);
|
|
287
|
+
};
|
|
288
|
+
} else if (slotPropValue) {
|
|
289
|
+
overrideProps[propName] = slotPropValue;
|
|
290
|
+
}
|
|
291
|
+
} else if (propName === "style") {
|
|
292
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
293
|
+
} else if (propName === "className") {
|
|
294
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return { ...slotProps, ...overrideProps };
|
|
298
|
+
}
|
|
299
|
+
function getElementRef(element) {
|
|
300
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
301
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
302
|
+
if (mayWarn) {
|
|
303
|
+
return element.ref;
|
|
304
|
+
}
|
|
305
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
306
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
307
|
+
if (mayWarn) {
|
|
308
|
+
return element.props.ref;
|
|
309
|
+
}
|
|
310
|
+
return element.props.ref || element.ref;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// src/breadcrumb.tsx
|
|
314
|
+
var import_lucide_react = require("lucide-react");
|
|
315
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
316
|
+
var Breadcrumb = React4.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
317
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
318
|
+
var BreadcrumbList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
319
|
+
"ol",
|
|
320
|
+
{
|
|
321
|
+
ref,
|
|
322
|
+
className: cn(
|
|
323
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
324
|
+
className
|
|
325
|
+
),
|
|
326
|
+
...props
|
|
327
|
+
}
|
|
328
|
+
));
|
|
329
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
330
|
+
var BreadcrumbItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
331
|
+
"li",
|
|
332
|
+
{
|
|
333
|
+
ref,
|
|
334
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
335
|
+
...props
|
|
336
|
+
}
|
|
337
|
+
));
|
|
338
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
339
|
+
var BreadcrumbLink = React4.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
340
|
+
const Comp = asChild ? Slot : "a";
|
|
341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
342
|
+
Comp,
|
|
343
|
+
{
|
|
344
|
+
ref,
|
|
345
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
346
|
+
...props
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
});
|
|
350
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
351
|
+
var BreadcrumbPage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
352
|
+
"span",
|
|
353
|
+
{
|
|
354
|
+
ref,
|
|
355
|
+
role: "link",
|
|
356
|
+
"aria-disabled": "true",
|
|
357
|
+
"aria-current": "page",
|
|
358
|
+
className: cn("font-normal text-foreground", className),
|
|
359
|
+
...props
|
|
360
|
+
}
|
|
361
|
+
));
|
|
362
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
363
|
+
var BreadcrumbSeparator = ({
|
|
364
|
+
children,
|
|
365
|
+
className,
|
|
366
|
+
...props
|
|
367
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
368
|
+
"li",
|
|
369
|
+
{
|
|
370
|
+
role: "presentation",
|
|
371
|
+
"aria-hidden": "true",
|
|
372
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
|
|
373
|
+
...props,
|
|
374
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronRight, {})
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
378
|
+
var BreadcrumbEllipsis = ({
|
|
379
|
+
className,
|
|
380
|
+
...props
|
|
381
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
382
|
+
"span",
|
|
383
|
+
{
|
|
384
|
+
role: "presentation",
|
|
385
|
+
"aria-hidden": "true",
|
|
386
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
387
|
+
...props,
|
|
388
|
+
children: [
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.MoreHorizontal, { className: "h-4 w-4" }),
|
|
390
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sr-only", children: "More" })
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
395
|
+
|
|
396
|
+
// src/button.tsx
|
|
397
|
+
var React5 = __toESM(require("react"));
|
|
398
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
399
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
400
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
401
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
402
|
+
{
|
|
403
|
+
variants: {
|
|
404
|
+
variant: {
|
|
405
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
406
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
407
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
408
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
409
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
410
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
411
|
+
},
|
|
412
|
+
size: {
|
|
413
|
+
default: "h-9 px-4 py-2",
|
|
414
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
415
|
+
lg: "h-10 rounded-md px-8",
|
|
416
|
+
icon: "h-9 w-9"
|
|
417
|
+
},
|
|
418
|
+
rounded: {
|
|
419
|
+
default: "rounded-md",
|
|
420
|
+
sm: "rounded-sm",
|
|
421
|
+
lg: "rounded-lg",
|
|
422
|
+
xl: "rounded-xl",
|
|
423
|
+
"2xl": "rounded-2xl",
|
|
424
|
+
full: "rounded-full"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
defaultVariants: {
|
|
428
|
+
variant: "default",
|
|
429
|
+
size: "default",
|
|
430
|
+
rounded: "default"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
var Button = React5.forwardRef(
|
|
435
|
+
({ className, variant, size, rounded, asChild = false, ...props }, ref) => {
|
|
436
|
+
const Comp = asChild ? Slot : "button";
|
|
437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
438
|
+
Comp,
|
|
439
|
+
{
|
|
440
|
+
className: cn(buttonVariants({ variant, size, rounded, className })),
|
|
441
|
+
ref,
|
|
442
|
+
...props
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
Button.displayName = "Button";
|
|
448
|
+
|
|
449
|
+
// src/command.tsx
|
|
450
|
+
var React7 = __toESM(require("react"));
|
|
451
|
+
var import_cmdk = require("cmdk");
|
|
452
|
+
var import_lucide_react3 = require("lucide-react");
|
|
453
|
+
|
|
454
|
+
// src/dialog.tsx
|
|
455
|
+
var React6 = __toESM(require("react"));
|
|
456
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
457
|
+
var import_lucide_react2 = require("lucide-react");
|
|
458
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
459
|
+
var Dialog = DialogPrimitive.Root;
|
|
460
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
461
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
462
|
+
var DialogClose = DialogPrimitive.Close;
|
|
463
|
+
var DialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
464
|
+
DialogPrimitive.Overlay,
|
|
465
|
+
{
|
|
466
|
+
ref,
|
|
467
|
+
className: cn(
|
|
468
|
+
"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",
|
|
469
|
+
className
|
|
470
|
+
),
|
|
471
|
+
...props
|
|
472
|
+
}
|
|
473
|
+
));
|
|
474
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
475
|
+
var DialogContent = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DialogPortal, { children: [
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DialogOverlay, {}),
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
478
|
+
DialogPrimitive.Content,
|
|
479
|
+
{
|
|
480
|
+
ref,
|
|
481
|
+
className: cn(
|
|
482
|
+
"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",
|
|
483
|
+
className
|
|
484
|
+
),
|
|
485
|
+
...props,
|
|
486
|
+
children: [
|
|
487
|
+
children,
|
|
488
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.X, { className: "h-4 w-4" }),
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "sr-only", children: "Close" })
|
|
491
|
+
] })
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
)
|
|
495
|
+
] }));
|
|
496
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
497
|
+
var DialogHeader = ({
|
|
498
|
+
className,
|
|
499
|
+
...props
|
|
500
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
501
|
+
"div",
|
|
502
|
+
{
|
|
503
|
+
className: cn(
|
|
504
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
505
|
+
className
|
|
506
|
+
),
|
|
507
|
+
...props
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
DialogHeader.displayName = "DialogHeader";
|
|
511
|
+
var DialogFooter = ({
|
|
512
|
+
className,
|
|
513
|
+
...props
|
|
514
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
515
|
+
"div",
|
|
516
|
+
{
|
|
517
|
+
className: cn(
|
|
518
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
519
|
+
className
|
|
520
|
+
),
|
|
521
|
+
...props
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
DialogFooter.displayName = "DialogFooter";
|
|
525
|
+
var DialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
526
|
+
DialogPrimitive.Title,
|
|
527
|
+
{
|
|
528
|
+
ref,
|
|
529
|
+
className: cn(
|
|
530
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
531
|
+
className
|
|
532
|
+
),
|
|
533
|
+
...props
|
|
534
|
+
}
|
|
535
|
+
));
|
|
536
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
537
|
+
var DialogDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
538
|
+
DialogPrimitive.Description,
|
|
539
|
+
{
|
|
540
|
+
ref,
|
|
541
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
542
|
+
...props
|
|
543
|
+
}
|
|
544
|
+
));
|
|
545
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
546
|
+
|
|
547
|
+
// src/command.tsx
|
|
548
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
549
|
+
var Command = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
550
|
+
import_cmdk.Command,
|
|
551
|
+
{
|
|
552
|
+
ref,
|
|
553
|
+
className: cn(
|
|
554
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
555
|
+
className
|
|
556
|
+
),
|
|
557
|
+
...props
|
|
558
|
+
}
|
|
559
|
+
));
|
|
560
|
+
Command.displayName = import_cmdk.Command.displayName;
|
|
561
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Dialog, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
563
|
+
};
|
|
564
|
+
var CommandInput = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
566
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
567
|
+
import_cmdk.Command.Input,
|
|
568
|
+
{
|
|
569
|
+
ref,
|
|
570
|
+
className: cn(
|
|
571
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
572
|
+
className
|
|
573
|
+
),
|
|
574
|
+
...props
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
] }));
|
|
578
|
+
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
579
|
+
var CommandList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
580
|
+
import_cmdk.Command.List,
|
|
581
|
+
{
|
|
582
|
+
ref,
|
|
583
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
584
|
+
...props
|
|
585
|
+
}
|
|
586
|
+
));
|
|
587
|
+
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
588
|
+
var CommandEmpty = React7.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
589
|
+
import_cmdk.Command.Empty,
|
|
590
|
+
{
|
|
591
|
+
ref,
|
|
592
|
+
className: "py-6 text-center text-sm",
|
|
593
|
+
...props
|
|
594
|
+
}
|
|
595
|
+
));
|
|
596
|
+
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
597
|
+
var CommandGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
598
|
+
import_cmdk.Command.Group,
|
|
599
|
+
{
|
|
600
|
+
ref,
|
|
601
|
+
className: cn(
|
|
602
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
603
|
+
className
|
|
604
|
+
),
|
|
605
|
+
...props
|
|
606
|
+
}
|
|
607
|
+
));
|
|
608
|
+
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
609
|
+
var CommandSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
610
|
+
import_cmdk.Command.Separator,
|
|
611
|
+
{
|
|
612
|
+
ref,
|
|
613
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
614
|
+
...props
|
|
615
|
+
}
|
|
616
|
+
));
|
|
617
|
+
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
618
|
+
var CommandItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
619
|
+
import_cmdk.Command.Item,
|
|
620
|
+
{
|
|
621
|
+
ref,
|
|
622
|
+
className: cn(
|
|
623
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
624
|
+
className
|
|
625
|
+
),
|
|
626
|
+
...props
|
|
627
|
+
}
|
|
628
|
+
));
|
|
629
|
+
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
630
|
+
var CommandShortcut = ({
|
|
631
|
+
className,
|
|
632
|
+
...props
|
|
633
|
+
}) => {
|
|
634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
635
|
+
"span",
|
|
636
|
+
{
|
|
637
|
+
className: cn(
|
|
638
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
639
|
+
className
|
|
640
|
+
),
|
|
641
|
+
...props
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
};
|
|
645
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
646
|
+
|
|
647
|
+
// src/hooks/use-mobile.tsx
|
|
648
|
+
var import_react = require("react");
|
|
649
|
+
var MOBILE_BREAKPOINT = 768;
|
|
650
|
+
function useIsMobile() {
|
|
651
|
+
const [isMobile, setIsMobile] = (0, import_react.useState)(void 0);
|
|
652
|
+
(0, import_react.useEffect)(() => {
|
|
653
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
654
|
+
const onChange = () => {
|
|
655
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
656
|
+
};
|
|
657
|
+
mql.addEventListener("change", onChange);
|
|
658
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
659
|
+
return () => mql.removeEventListener("change", onChange);
|
|
660
|
+
}, []);
|
|
661
|
+
return !!isMobile;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// src/input.tsx
|
|
665
|
+
var React8 = __toESM(require("react"));
|
|
666
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
667
|
+
var Input = React8.forwardRef(
|
|
668
|
+
({ className, type, ...props }, ref) => {
|
|
669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
670
|
+
"input",
|
|
671
|
+
{
|
|
672
|
+
type,
|
|
673
|
+
className: cn(
|
|
674
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors 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-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
675
|
+
className
|
|
676
|
+
),
|
|
677
|
+
ref,
|
|
678
|
+
...props
|
|
679
|
+
}
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
);
|
|
683
|
+
Input.displayName = "Input";
|
|
684
|
+
|
|
685
|
+
// src/popover.tsx
|
|
686
|
+
var React9 = __toESM(require("react"));
|
|
687
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
688
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
689
|
+
var Popover = PopoverPrimitive.Root;
|
|
690
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
691
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
692
|
+
var PopoverContent = React9.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
693
|
+
PopoverPrimitive.Content,
|
|
694
|
+
{
|
|
695
|
+
ref,
|
|
696
|
+
align,
|
|
697
|
+
sideOffset,
|
|
698
|
+
className: cn(
|
|
699
|
+
"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",
|
|
700
|
+
className
|
|
701
|
+
),
|
|
702
|
+
...props
|
|
703
|
+
}
|
|
704
|
+
) }));
|
|
705
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
706
|
+
|
|
707
|
+
// src/select.tsx
|
|
708
|
+
var React10 = __toESM(require("react"));
|
|
709
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
710
|
+
var import_lucide_react4 = require("lucide-react");
|
|
711
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
712
|
+
var Select = SelectPrimitive.Root;
|
|
713
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
714
|
+
var SelectValue = SelectPrimitive.Value;
|
|
715
|
+
var SelectTrigger = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
716
|
+
SelectPrimitive.Trigger,
|
|
717
|
+
{
|
|
718
|
+
ref,
|
|
719
|
+
className: cn(
|
|
720
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
721
|
+
className
|
|
722
|
+
),
|
|
723
|
+
...props,
|
|
724
|
+
children: [
|
|
725
|
+
children,
|
|
726
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
));
|
|
730
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
731
|
+
var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
732
|
+
SelectPrimitive.ScrollUpButton,
|
|
733
|
+
{
|
|
734
|
+
ref,
|
|
735
|
+
className: cn(
|
|
736
|
+
"flex cursor-default items-center justify-center py-1",
|
|
737
|
+
className
|
|
738
|
+
),
|
|
739
|
+
...props,
|
|
740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" })
|
|
741
|
+
}
|
|
742
|
+
));
|
|
743
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
744
|
+
var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
745
|
+
SelectPrimitive.ScrollDownButton,
|
|
746
|
+
{
|
|
747
|
+
ref,
|
|
748
|
+
className: cn(
|
|
749
|
+
"flex cursor-default items-center justify-center py-1",
|
|
750
|
+
className
|
|
751
|
+
),
|
|
752
|
+
...props,
|
|
753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" })
|
|
754
|
+
}
|
|
755
|
+
));
|
|
756
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
757
|
+
var SelectContent = React10.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
758
|
+
SelectPrimitive.Content,
|
|
759
|
+
{
|
|
760
|
+
ref,
|
|
761
|
+
className: cn(
|
|
762
|
+
"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",
|
|
763
|
+
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",
|
|
764
|
+
className
|
|
765
|
+
),
|
|
766
|
+
position,
|
|
767
|
+
...props,
|
|
768
|
+
children: [
|
|
769
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectScrollUpButton, {}),
|
|
770
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
771
|
+
SelectPrimitive.Viewport,
|
|
772
|
+
{
|
|
773
|
+
className: cn(
|
|
774
|
+
"p-1",
|
|
775
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
776
|
+
),
|
|
777
|
+
children
|
|
778
|
+
}
|
|
779
|
+
),
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectScrollDownButton, {})
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
) }));
|
|
784
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
785
|
+
var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
786
|
+
SelectPrimitive.Label,
|
|
787
|
+
{
|
|
788
|
+
ref,
|
|
789
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
790
|
+
...props
|
|
791
|
+
}
|
|
792
|
+
));
|
|
793
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
794
|
+
var SelectItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
795
|
+
SelectPrimitive.Item,
|
|
796
|
+
{
|
|
797
|
+
ref,
|
|
798
|
+
className: cn(
|
|
799
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
800
|
+
className
|
|
801
|
+
),
|
|
802
|
+
...props,
|
|
803
|
+
children: [
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) }) }),
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.ItemText, { children })
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
));
|
|
809
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
810
|
+
var SelectSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
811
|
+
SelectPrimitive.Separator,
|
|
812
|
+
{
|
|
813
|
+
ref,
|
|
814
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
815
|
+
...props
|
|
816
|
+
}
|
|
817
|
+
));
|
|
818
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
819
|
+
|
|
820
|
+
// src/separator.tsx
|
|
821
|
+
var React11 = __toESM(require("react"));
|
|
822
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
|
|
823
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
824
|
+
var Separator2 = React11.forwardRef(
|
|
825
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
826
|
+
SeparatorPrimitive.Root,
|
|
827
|
+
{
|
|
828
|
+
ref,
|
|
829
|
+
decorative,
|
|
830
|
+
orientation,
|
|
831
|
+
className: cn(
|
|
832
|
+
"shrink-0 bg-border",
|
|
833
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
834
|
+
className
|
|
835
|
+
),
|
|
836
|
+
...props
|
|
837
|
+
}
|
|
838
|
+
)
|
|
839
|
+
);
|
|
840
|
+
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
841
|
+
|
|
842
|
+
// src/sheet.tsx
|
|
843
|
+
var React12 = __toESM(require("react"));
|
|
844
|
+
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
845
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
846
|
+
var import_lucide_react5 = require("lucide-react");
|
|
847
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
848
|
+
var Sheet = SheetPrimitive.Root;
|
|
849
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
850
|
+
var SheetClose = SheetPrimitive.Close;
|
|
851
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
852
|
+
var SheetOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
853
|
+
SheetPrimitive.Overlay,
|
|
854
|
+
{
|
|
855
|
+
className: cn(
|
|
856
|
+
"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",
|
|
857
|
+
className
|
|
858
|
+
),
|
|
859
|
+
...props,
|
|
860
|
+
ref
|
|
861
|
+
}
|
|
862
|
+
));
|
|
863
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
864
|
+
var sheetVariants = (0, import_class_variance_authority3.cva)(
|
|
865
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
866
|
+
{
|
|
867
|
+
variants: {
|
|
868
|
+
side: {
|
|
869
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
870
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
871
|
+
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",
|
|
872
|
+
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"
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
defaultVariants: {
|
|
876
|
+
side: "right"
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
);
|
|
880
|
+
var SheetContent = React12.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SheetPortal, { children: [
|
|
881
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SheetOverlay, {}),
|
|
882
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
883
|
+
SheetPrimitive.Content,
|
|
884
|
+
{
|
|
885
|
+
ref,
|
|
886
|
+
className: cn(sheetVariants({ side }), className),
|
|
887
|
+
...props,
|
|
888
|
+
children: [
|
|
889
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
890
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.X, { className: "h-4 w-4" }),
|
|
891
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Close" })
|
|
892
|
+
] }),
|
|
893
|
+
children
|
|
894
|
+
]
|
|
895
|
+
}
|
|
896
|
+
)
|
|
897
|
+
] }));
|
|
898
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
899
|
+
var SheetHeader = ({
|
|
900
|
+
className,
|
|
901
|
+
...props
|
|
902
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
903
|
+
"div",
|
|
904
|
+
{
|
|
905
|
+
className: cn(
|
|
906
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
907
|
+
className
|
|
908
|
+
),
|
|
909
|
+
...props
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
SheetHeader.displayName = "SheetHeader";
|
|
913
|
+
var SheetFooter = ({
|
|
914
|
+
className,
|
|
915
|
+
...props
|
|
916
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
917
|
+
"div",
|
|
918
|
+
{
|
|
919
|
+
className: cn(
|
|
920
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
921
|
+
className
|
|
922
|
+
),
|
|
923
|
+
...props
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
SheetFooter.displayName = "SheetFooter";
|
|
927
|
+
var SheetTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
928
|
+
SheetPrimitive.Title,
|
|
929
|
+
{
|
|
930
|
+
ref,
|
|
931
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
932
|
+
...props
|
|
933
|
+
}
|
|
934
|
+
));
|
|
935
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
936
|
+
var SheetDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
937
|
+
SheetPrimitive.Description,
|
|
938
|
+
{
|
|
939
|
+
ref,
|
|
940
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
941
|
+
...props
|
|
942
|
+
}
|
|
943
|
+
));
|
|
944
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
945
|
+
|
|
946
|
+
// src/sidebar.tsx
|
|
947
|
+
var React14 = __toESM(require("react"));
|
|
948
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
949
|
+
var import_lucide_react6 = require("lucide-react");
|
|
950
|
+
|
|
951
|
+
// src/skeleton.tsx
|
|
952
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
953
|
+
function Skeleton({
|
|
954
|
+
className,
|
|
955
|
+
...props
|
|
956
|
+
}) {
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
958
|
+
"div",
|
|
959
|
+
{
|
|
960
|
+
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
961
|
+
...props
|
|
962
|
+
}
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
// src/tooltip.tsx
|
|
967
|
+
var React13 = __toESM(require("react"));
|
|
968
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
969
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
970
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
971
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
972
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
973
|
+
var TooltipContent = React13.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
974
|
+
TooltipPrimitive.Content,
|
|
975
|
+
{
|
|
976
|
+
ref,
|
|
977
|
+
sideOffset,
|
|
978
|
+
className: cn(
|
|
979
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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",
|
|
980
|
+
className
|
|
981
|
+
),
|
|
982
|
+
...props
|
|
983
|
+
}
|
|
984
|
+
) }));
|
|
985
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
986
|
+
|
|
987
|
+
// src/sidebar.tsx
|
|
988
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
989
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
990
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
991
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
992
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
993
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
994
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
995
|
+
var SidebarContext = React14.createContext(null);
|
|
996
|
+
function useSidebar() {
|
|
997
|
+
const context = React14.useContext(SidebarContext);
|
|
998
|
+
if (!context) {
|
|
999
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1000
|
+
}
|
|
1001
|
+
return context;
|
|
1002
|
+
}
|
|
1003
|
+
var SidebarProvider = React14.forwardRef(
|
|
1004
|
+
({
|
|
1005
|
+
defaultOpen = true,
|
|
1006
|
+
open: openProp,
|
|
1007
|
+
onOpenChange: setOpenProp,
|
|
1008
|
+
className,
|
|
1009
|
+
style,
|
|
1010
|
+
children,
|
|
1011
|
+
...props
|
|
1012
|
+
}, ref) => {
|
|
1013
|
+
const isMobile = useIsMobile();
|
|
1014
|
+
const [openMobile, setOpenMobile] = React14.useState(false);
|
|
1015
|
+
const [_open, _setOpen] = React14.useState(defaultOpen);
|
|
1016
|
+
const open = openProp ?? _open;
|
|
1017
|
+
const setOpen = React14.useCallback(
|
|
1018
|
+
(value) => {
|
|
1019
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
1020
|
+
if (setOpenProp) {
|
|
1021
|
+
setOpenProp(openState);
|
|
1022
|
+
} else {
|
|
1023
|
+
_setOpen(openState);
|
|
1024
|
+
}
|
|
1025
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
1026
|
+
},
|
|
1027
|
+
[setOpenProp, open]
|
|
1028
|
+
);
|
|
1029
|
+
const toggleSidebar = React14.useCallback(() => {
|
|
1030
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1031
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
1032
|
+
React14.useEffect(() => {
|
|
1033
|
+
const handleKeyDown = (event) => {
|
|
1034
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1035
|
+
event.preventDefault();
|
|
1036
|
+
toggleSidebar();
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
1040
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1041
|
+
}, [toggleSidebar]);
|
|
1042
|
+
const state = open ? "expanded" : "collapsed";
|
|
1043
|
+
const contextValue = React14.useMemo(
|
|
1044
|
+
() => ({
|
|
1045
|
+
state,
|
|
1046
|
+
open,
|
|
1047
|
+
setOpen,
|
|
1048
|
+
isMobile,
|
|
1049
|
+
openMobile,
|
|
1050
|
+
setOpenMobile,
|
|
1051
|
+
toggleSidebar
|
|
1052
|
+
}),
|
|
1053
|
+
[
|
|
1054
|
+
state,
|
|
1055
|
+
open,
|
|
1056
|
+
setOpen,
|
|
1057
|
+
isMobile,
|
|
1058
|
+
openMobile,
|
|
1059
|
+
setOpenMobile,
|
|
1060
|
+
toggleSidebar
|
|
1061
|
+
]
|
|
1062
|
+
);
|
|
1063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1064
|
+
"div",
|
|
1065
|
+
{
|
|
1066
|
+
style: {
|
|
1067
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
1068
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
1069
|
+
...style
|
|
1070
|
+
},
|
|
1071
|
+
className: cn(
|
|
1072
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
1073
|
+
className
|
|
1074
|
+
),
|
|
1075
|
+
ref,
|
|
1076
|
+
...props,
|
|
1077
|
+
children
|
|
1078
|
+
}
|
|
1079
|
+
) }) });
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
1083
|
+
var Sidebar = React14.forwardRef(
|
|
1084
|
+
({
|
|
1085
|
+
side = "left",
|
|
1086
|
+
variant = "sidebar",
|
|
1087
|
+
collapsible = "offcanvas",
|
|
1088
|
+
className,
|
|
1089
|
+
children,
|
|
1090
|
+
...props
|
|
1091
|
+
}, ref) => {
|
|
1092
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1093
|
+
if (collapsible === "none") {
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1095
|
+
"div",
|
|
1096
|
+
{
|
|
1097
|
+
className: cn(
|
|
1098
|
+
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
1099
|
+
className
|
|
1100
|
+
),
|
|
1101
|
+
ref,
|
|
1102
|
+
...props,
|
|
1103
|
+
children
|
|
1104
|
+
}
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
if (isMobile) {
|
|
1108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1109
|
+
SheetContent,
|
|
1110
|
+
{
|
|
1111
|
+
"data-sidebar": "sidebar",
|
|
1112
|
+
"data-mobile": "true",
|
|
1113
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
1114
|
+
style: {
|
|
1115
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1116
|
+
},
|
|
1117
|
+
side,
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1122
|
+
] }),
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
1124
|
+
]
|
|
1125
|
+
}
|
|
1126
|
+
) });
|
|
1127
|
+
}
|
|
1128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1129
|
+
"div",
|
|
1130
|
+
{
|
|
1131
|
+
ref,
|
|
1132
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
1133
|
+
"data-state": state,
|
|
1134
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1135
|
+
"data-variant": variant,
|
|
1136
|
+
"data-side": side,
|
|
1137
|
+
children: [
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1139
|
+
"div",
|
|
1140
|
+
{
|
|
1141
|
+
className: cn(
|
|
1142
|
+
"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
1143
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
1144
|
+
"group-data-[side=right]:rotate-180",
|
|
1145
|
+
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]"
|
|
1146
|
+
)
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1150
|
+
"div",
|
|
1151
|
+
{
|
|
1152
|
+
className: cn(
|
|
1153
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
1154
|
+
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)]",
|
|
1155
|
+
// Adjust the padding for floating and inset variants.
|
|
1156
|
+
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",
|
|
1157
|
+
className
|
|
1158
|
+
),
|
|
1159
|
+
...props,
|
|
1160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1161
|
+
"div",
|
|
1162
|
+
{
|
|
1163
|
+
"data-sidebar": "sidebar",
|
|
1164
|
+
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",
|
|
1165
|
+
children
|
|
1166
|
+
}
|
|
1167
|
+
)
|
|
1168
|
+
}
|
|
1169
|
+
)
|
|
1170
|
+
]
|
|
1171
|
+
}
|
|
1172
|
+
);
|
|
1173
|
+
}
|
|
1174
|
+
);
|
|
1175
|
+
Sidebar.displayName = "Sidebar";
|
|
1176
|
+
var SidebarTrigger = React14.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
1177
|
+
const { toggleSidebar } = useSidebar();
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1179
|
+
Button,
|
|
1180
|
+
{
|
|
1181
|
+
ref,
|
|
1182
|
+
"data-sidebar": "trigger",
|
|
1183
|
+
variant: "ghost",
|
|
1184
|
+
size: "icon",
|
|
1185
|
+
className: cn("h-7 w-7", className),
|
|
1186
|
+
onClick: (event) => {
|
|
1187
|
+
onClick?.(event);
|
|
1188
|
+
toggleSidebar();
|
|
1189
|
+
},
|
|
1190
|
+
...props,
|
|
1191
|
+
children: [
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.PanelLeft, {}),
|
|
1193
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
);
|
|
1197
|
+
});
|
|
1198
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
1199
|
+
var SidebarRail = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1200
|
+
const { toggleSidebar } = useSidebar();
|
|
1201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1202
|
+
"button",
|
|
1203
|
+
{
|
|
1204
|
+
ref,
|
|
1205
|
+
"data-sidebar": "rail",
|
|
1206
|
+
"aria-label": "Toggle Sidebar",
|
|
1207
|
+
tabIndex: -1,
|
|
1208
|
+
onClick: toggleSidebar,
|
|
1209
|
+
title: "Toggle Sidebar",
|
|
1210
|
+
className: cn(
|
|
1211
|
+
"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] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
1212
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
1213
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1214
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
1215
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1216
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1217
|
+
className
|
|
1218
|
+
),
|
|
1219
|
+
...props
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
});
|
|
1223
|
+
SidebarRail.displayName = "SidebarRail";
|
|
1224
|
+
var SidebarInset = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1226
|
+
"main",
|
|
1227
|
+
{
|
|
1228
|
+
ref,
|
|
1229
|
+
className: cn(
|
|
1230
|
+
"relative flex w-full flex-1 flex-col bg-background",
|
|
1231
|
+
"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",
|
|
1232
|
+
className
|
|
1233
|
+
),
|
|
1234
|
+
...props
|
|
1235
|
+
}
|
|
1236
|
+
);
|
|
1237
|
+
});
|
|
1238
|
+
SidebarInset.displayName = "SidebarInset";
|
|
1239
|
+
var SidebarInput = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1241
|
+
Input,
|
|
1242
|
+
{
|
|
1243
|
+
ref,
|
|
1244
|
+
"data-sidebar": "input",
|
|
1245
|
+
className: cn(
|
|
1246
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
1247
|
+
className
|
|
1248
|
+
),
|
|
1249
|
+
...props
|
|
1250
|
+
}
|
|
1251
|
+
);
|
|
1252
|
+
});
|
|
1253
|
+
SidebarInput.displayName = "SidebarInput";
|
|
1254
|
+
var SidebarHeader = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1256
|
+
"div",
|
|
1257
|
+
{
|
|
1258
|
+
ref,
|
|
1259
|
+
"data-sidebar": "header",
|
|
1260
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
1261
|
+
...props
|
|
1262
|
+
}
|
|
1263
|
+
);
|
|
1264
|
+
});
|
|
1265
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
1266
|
+
var SidebarFooter = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1268
|
+
"div",
|
|
1269
|
+
{
|
|
1270
|
+
ref,
|
|
1271
|
+
"data-sidebar": "footer",
|
|
1272
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
1273
|
+
...props
|
|
1274
|
+
}
|
|
1275
|
+
);
|
|
1276
|
+
});
|
|
1277
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
1278
|
+
var SidebarSeparator = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1280
|
+
Separator2,
|
|
1281
|
+
{
|
|
1282
|
+
ref,
|
|
1283
|
+
"data-sidebar": "separator",
|
|
1284
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
1285
|
+
...props
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
});
|
|
1289
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
1290
|
+
var SidebarContent = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1292
|
+
"div",
|
|
1293
|
+
{
|
|
1294
|
+
ref,
|
|
1295
|
+
"data-sidebar": "content",
|
|
1296
|
+
className: cn(
|
|
1297
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
1298
|
+
className
|
|
1299
|
+
),
|
|
1300
|
+
...props
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
});
|
|
1304
|
+
SidebarContent.displayName = "SidebarContent";
|
|
1305
|
+
var SidebarGroup = React14.forwardRef(({ className, ...props }, ref) => {
|
|
1306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1307
|
+
"div",
|
|
1308
|
+
{
|
|
1309
|
+
ref,
|
|
1310
|
+
"data-sidebar": "group",
|
|
1311
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
1312
|
+
...props
|
|
1313
|
+
}
|
|
1314
|
+
);
|
|
1315
|
+
});
|
|
1316
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
1317
|
+
var SidebarGroupLabel = React14.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1318
|
+
const Comp = asChild ? Slot : "div";
|
|
1319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1320
|
+
Comp,
|
|
1321
|
+
{
|
|
1322
|
+
ref,
|
|
1323
|
+
"data-sidebar": "group-label",
|
|
1324
|
+
className: cn(
|
|
1325
|
+
"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,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1326
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
1327
|
+
className
|
|
1328
|
+
),
|
|
1329
|
+
...props
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
});
|
|
1333
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
1334
|
+
var SidebarGroupAction = React14.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1335
|
+
const Comp = asChild ? Slot : "button";
|
|
1336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1337
|
+
Comp,
|
|
1338
|
+
{
|
|
1339
|
+
ref,
|
|
1340
|
+
"data-sidebar": "group-action",
|
|
1341
|
+
className: cn(
|
|
1342
|
+
"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",
|
|
1343
|
+
// Increases the hit area of the button on mobile.
|
|
1344
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
1345
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1346
|
+
className
|
|
1347
|
+
),
|
|
1348
|
+
...props
|
|
1349
|
+
}
|
|
1350
|
+
);
|
|
1351
|
+
});
|
|
1352
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
1353
|
+
var SidebarGroupContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1354
|
+
"div",
|
|
1355
|
+
{
|
|
1356
|
+
ref,
|
|
1357
|
+
"data-sidebar": "group-content",
|
|
1358
|
+
className: cn("w-full text-sm", className),
|
|
1359
|
+
...props
|
|
1360
|
+
}
|
|
1361
|
+
));
|
|
1362
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
1363
|
+
var SidebarMenu = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1364
|
+
"ul",
|
|
1365
|
+
{
|
|
1366
|
+
ref,
|
|
1367
|
+
"data-sidebar": "menu",
|
|
1368
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
1369
|
+
...props
|
|
1370
|
+
}
|
|
1371
|
+
));
|
|
1372
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
1373
|
+
var SidebarMenuItem = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1374
|
+
"li",
|
|
1375
|
+
{
|
|
1376
|
+
ref,
|
|
1377
|
+
"data-sidebar": "menu-item",
|
|
1378
|
+
className: cn("group/menu-item relative", className),
|
|
1379
|
+
...props
|
|
1380
|
+
}
|
|
1381
|
+
));
|
|
1382
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
1383
|
+
var sidebarMenuButtonVariants = (0, import_class_variance_authority4.cva)(
|
|
1384
|
+
"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]: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",
|
|
1385
|
+
{
|
|
1386
|
+
variants: {
|
|
1387
|
+
variant: {
|
|
1388
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1389
|
+
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))]"
|
|
1390
|
+
},
|
|
1391
|
+
size: {
|
|
1392
|
+
default: "text-sm",
|
|
1393
|
+
sm: "text-xs",
|
|
1394
|
+
lg: "text-sm group-data-[collapsible=icon]:!p-0"
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1397
|
+
defaultVariants: {
|
|
1398
|
+
variant: "default",
|
|
1399
|
+
size: "default"
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
var SidebarMenuButton = React14.forwardRef(
|
|
1404
|
+
({
|
|
1405
|
+
asChild = false,
|
|
1406
|
+
isActive = false,
|
|
1407
|
+
variant = "default",
|
|
1408
|
+
size = "default",
|
|
1409
|
+
tooltip,
|
|
1410
|
+
className,
|
|
1411
|
+
...props
|
|
1412
|
+
}, ref) => {
|
|
1413
|
+
const Comp = asChild ? Slot : "button";
|
|
1414
|
+
const { isMobile, state } = useSidebar();
|
|
1415
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1416
|
+
Comp,
|
|
1417
|
+
{
|
|
1418
|
+
ref,
|
|
1419
|
+
"data-sidebar": "menu-button",
|
|
1420
|
+
"data-size": size,
|
|
1421
|
+
"data-active": isActive,
|
|
1422
|
+
className: cn(
|
|
1423
|
+
isActive && "font-bold",
|
|
1424
|
+
sidebarMenuButtonVariants({ variant, size }),
|
|
1425
|
+
className
|
|
1426
|
+
),
|
|
1427
|
+
...props
|
|
1428
|
+
}
|
|
1429
|
+
);
|
|
1430
|
+
if (!tooltip) {
|
|
1431
|
+
return button;
|
|
1432
|
+
}
|
|
1433
|
+
if (typeof tooltip === "string") {
|
|
1434
|
+
tooltip = {
|
|
1435
|
+
children: tooltip
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Tooltip, { children: [
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
1440
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1441
|
+
TooltipContent,
|
|
1442
|
+
{
|
|
1443
|
+
side: "right",
|
|
1444
|
+
align: "center",
|
|
1445
|
+
hidden: state !== "collapsed" || isMobile,
|
|
1446
|
+
...tooltip
|
|
1447
|
+
}
|
|
1448
|
+
)
|
|
1449
|
+
] });
|
|
1450
|
+
}
|
|
1451
|
+
);
|
|
1452
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1453
|
+
var SidebarMenuAction = React14.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
1454
|
+
const Comp = asChild ? Slot : "button";
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1456
|
+
Comp,
|
|
1457
|
+
{
|
|
1458
|
+
ref,
|
|
1459
|
+
"data-sidebar": "menu-action",
|
|
1460
|
+
className: cn(
|
|
1461
|
+
"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 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1462
|
+
// Increases the hit area of the button on mobile.
|
|
1463
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
1464
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
1465
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
1466
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
1467
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1468
|
+
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",
|
|
1469
|
+
className
|
|
1470
|
+
),
|
|
1471
|
+
...props
|
|
1472
|
+
}
|
|
1473
|
+
);
|
|
1474
|
+
});
|
|
1475
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
1476
|
+
var SidebarMenuBadge = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1477
|
+
"div",
|
|
1478
|
+
{
|
|
1479
|
+
ref,
|
|
1480
|
+
"data-sidebar": "menu-badge",
|
|
1481
|
+
className: cn(
|
|
1482
|
+
"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",
|
|
1483
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
1484
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
1485
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
1486
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
1487
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1488
|
+
className
|
|
1489
|
+
),
|
|
1490
|
+
...props
|
|
1491
|
+
}
|
|
1492
|
+
));
|
|
1493
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
1494
|
+
var SidebarMenuSkeleton = React14.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
1495
|
+
const width = React14.useMemo(() => {
|
|
1496
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1497
|
+
}, []);
|
|
1498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1499
|
+
"div",
|
|
1500
|
+
{
|
|
1501
|
+
ref,
|
|
1502
|
+
"data-sidebar": "menu-skeleton",
|
|
1503
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
1504
|
+
...props,
|
|
1505
|
+
children: [
|
|
1506
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1507
|
+
Skeleton,
|
|
1508
|
+
{
|
|
1509
|
+
className: "size-4 rounded-md",
|
|
1510
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
1511
|
+
}
|
|
1512
|
+
),
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1514
|
+
Skeleton,
|
|
1515
|
+
{
|
|
1516
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
1517
|
+
"data-sidebar": "menu-skeleton-text",
|
|
1518
|
+
style: {
|
|
1519
|
+
"--skeleton-width": width
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
)
|
|
1523
|
+
]
|
|
1524
|
+
}
|
|
1525
|
+
);
|
|
1526
|
+
});
|
|
1527
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
1528
|
+
var SidebarMenuSub = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1529
|
+
"ul",
|
|
1530
|
+
{
|
|
1531
|
+
ref,
|
|
1532
|
+
"data-sidebar": "menu-sub",
|
|
1533
|
+
className: cn(
|
|
1534
|
+
"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",
|
|
1535
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1536
|
+
className
|
|
1537
|
+
),
|
|
1538
|
+
...props
|
|
1539
|
+
}
|
|
1540
|
+
));
|
|
1541
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
1542
|
+
var SidebarMenuSubItem = React14.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { ref, ...props }));
|
|
1543
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
1544
|
+
var SidebarMenuSubButton = React14.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
1545
|
+
const Comp = asChild ? Slot : "a";
|
|
1546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1547
|
+
Comp,
|
|
1548
|
+
{
|
|
1549
|
+
ref,
|
|
1550
|
+
"data-sidebar": "menu-sub-button",
|
|
1551
|
+
"data-size": size,
|
|
1552
|
+
"data-active": isActive,
|
|
1553
|
+
className: cn(
|
|
1554
|
+
"flex min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md p-2 text-sidebar-foreground outline-none ring-sidebar-ring 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
1555
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
1556
|
+
size === "sm" && "text-xs",
|
|
1557
|
+
size === "md" && "text-sm",
|
|
1558
|
+
isActive && "font-bold",
|
|
1559
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1560
|
+
className
|
|
1561
|
+
),
|
|
1562
|
+
...props
|
|
1563
|
+
}
|
|
1564
|
+
);
|
|
1565
|
+
});
|
|
1566
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1567
|
+
|
|
1568
|
+
// src/table.tsx
|
|
1569
|
+
var React15 = __toESM(require("react"));
|
|
1570
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1571
|
+
var Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1572
|
+
"table",
|
|
1573
|
+
{
|
|
1574
|
+
ref,
|
|
1575
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
1576
|
+
...props
|
|
1577
|
+
}
|
|
1578
|
+
) }));
|
|
1579
|
+
Table.displayName = "Table";
|
|
1580
|
+
var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
1581
|
+
TableHeader.displayName = "TableHeader";
|
|
1582
|
+
var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1583
|
+
"tbody",
|
|
1584
|
+
{
|
|
1585
|
+
ref,
|
|
1586
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
1587
|
+
...props
|
|
1588
|
+
}
|
|
1589
|
+
));
|
|
1590
|
+
TableBody.displayName = "TableBody";
|
|
1591
|
+
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1592
|
+
"tfoot",
|
|
1593
|
+
{
|
|
1594
|
+
ref,
|
|
1595
|
+
className: cn(
|
|
1596
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1597
|
+
className
|
|
1598
|
+
),
|
|
1599
|
+
...props
|
|
1600
|
+
}
|
|
1601
|
+
));
|
|
1602
|
+
TableFooter.displayName = "TableFooter";
|
|
1603
|
+
var TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1604
|
+
"tr",
|
|
1605
|
+
{
|
|
1606
|
+
ref,
|
|
1607
|
+
className: cn(
|
|
1608
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1609
|
+
className
|
|
1610
|
+
),
|
|
1611
|
+
...props
|
|
1612
|
+
}
|
|
1613
|
+
));
|
|
1614
|
+
TableRow.displayName = "TableRow";
|
|
1615
|
+
var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1616
|
+
"th",
|
|
1617
|
+
{
|
|
1618
|
+
ref,
|
|
1619
|
+
className: cn(
|
|
1620
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1621
|
+
className
|
|
1622
|
+
),
|
|
1623
|
+
...props
|
|
1624
|
+
}
|
|
1625
|
+
));
|
|
1626
|
+
TableHead.displayName = "TableHead";
|
|
1627
|
+
var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1628
|
+
"td",
|
|
1629
|
+
{
|
|
1630
|
+
ref,
|
|
1631
|
+
className: cn(
|
|
1632
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1633
|
+
className
|
|
1634
|
+
),
|
|
1635
|
+
...props
|
|
1636
|
+
}
|
|
1637
|
+
));
|
|
1638
|
+
TableCell.displayName = "TableCell";
|
|
1639
|
+
var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1640
|
+
"caption",
|
|
1641
|
+
{
|
|
1642
|
+
ref,
|
|
1643
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1644
|
+
...props
|
|
1645
|
+
}
|
|
1646
|
+
));
|
|
1647
|
+
TableCaption.displayName = "TableCaption";
|
|
1648
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1649
|
+
0 && (module.exports = {
|
|
1650
|
+
Alert,
|
|
1651
|
+
AlertDescription,
|
|
1652
|
+
AlertTitle,
|
|
1653
|
+
Breadcrumb,
|
|
1654
|
+
BreadcrumbEllipsis,
|
|
1655
|
+
BreadcrumbItem,
|
|
1656
|
+
BreadcrumbLink,
|
|
1657
|
+
BreadcrumbList,
|
|
1658
|
+
BreadcrumbPage,
|
|
1659
|
+
BreadcrumbSeparator,
|
|
1660
|
+
Button,
|
|
1661
|
+
Command,
|
|
1662
|
+
CommandDialog,
|
|
1663
|
+
CommandEmpty,
|
|
1664
|
+
CommandGroup,
|
|
1665
|
+
CommandInput,
|
|
1666
|
+
CommandItem,
|
|
1667
|
+
CommandList,
|
|
1668
|
+
CommandSeparator,
|
|
1669
|
+
CommandShortcut,
|
|
1670
|
+
Dialog,
|
|
1671
|
+
DialogClose,
|
|
1672
|
+
DialogContent,
|
|
1673
|
+
DialogDescription,
|
|
1674
|
+
DialogFooter,
|
|
1675
|
+
DialogHeader,
|
|
1676
|
+
DialogOverlay,
|
|
1677
|
+
DialogPortal,
|
|
1678
|
+
DialogTitle,
|
|
1679
|
+
DialogTrigger,
|
|
1680
|
+
Input,
|
|
1681
|
+
Popover,
|
|
1682
|
+
PopoverAnchor,
|
|
1683
|
+
PopoverContent,
|
|
1684
|
+
PopoverTrigger,
|
|
1685
|
+
Select,
|
|
1686
|
+
SelectContent,
|
|
1687
|
+
SelectGroup,
|
|
1688
|
+
SelectItem,
|
|
1689
|
+
SelectLabel,
|
|
1690
|
+
SelectScrollDownButton,
|
|
1691
|
+
SelectScrollUpButton,
|
|
1692
|
+
SelectSeparator,
|
|
1693
|
+
SelectTrigger,
|
|
1694
|
+
SelectValue,
|
|
1695
|
+
Separator,
|
|
1696
|
+
Sheet,
|
|
1697
|
+
SheetClose,
|
|
1698
|
+
SheetContent,
|
|
1699
|
+
SheetDescription,
|
|
1700
|
+
SheetFooter,
|
|
1701
|
+
SheetHeader,
|
|
1702
|
+
SheetOverlay,
|
|
1703
|
+
SheetPortal,
|
|
1704
|
+
SheetTitle,
|
|
1705
|
+
SheetTrigger,
|
|
1706
|
+
Sidebar,
|
|
1707
|
+
SidebarContent,
|
|
1708
|
+
SidebarFooter,
|
|
1709
|
+
SidebarGroup,
|
|
1710
|
+
SidebarGroupAction,
|
|
1711
|
+
SidebarGroupContent,
|
|
1712
|
+
SidebarGroupLabel,
|
|
1713
|
+
SidebarHeader,
|
|
1714
|
+
SidebarInput,
|
|
1715
|
+
SidebarInset,
|
|
1716
|
+
SidebarMenu,
|
|
1717
|
+
SidebarMenuAction,
|
|
1718
|
+
SidebarMenuBadge,
|
|
1719
|
+
SidebarMenuButton,
|
|
1720
|
+
SidebarMenuItem,
|
|
1721
|
+
SidebarMenuSkeleton,
|
|
1722
|
+
SidebarMenuSub,
|
|
1723
|
+
SidebarMenuSubButton,
|
|
1724
|
+
SidebarMenuSubItem,
|
|
1725
|
+
SidebarProvider,
|
|
1726
|
+
SidebarRail,
|
|
1727
|
+
SidebarSeparator,
|
|
1728
|
+
SidebarTrigger,
|
|
1729
|
+
Skeleton,
|
|
1730
|
+
Table,
|
|
1731
|
+
TableBody,
|
|
1732
|
+
TableCaption,
|
|
1733
|
+
TableCell,
|
|
1734
|
+
TableFooter,
|
|
1735
|
+
TableHead,
|
|
1736
|
+
TableHeader,
|
|
1737
|
+
TableRow,
|
|
1738
|
+
Tooltip,
|
|
1739
|
+
TooltipContent,
|
|
1740
|
+
TooltipProvider,
|
|
1741
|
+
TooltipTrigger,
|
|
1742
|
+
buttonVariants,
|
|
1743
|
+
cn,
|
|
1744
|
+
useIsMobile,
|
|
1745
|
+
useSidebar
|
|
1746
|
+
});
|
|
1747
|
+
//# sourceMappingURL=index.js.map
|