@offlinemediainc/offline-ui 0.1.0

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