@webdevarif/dashui 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,1642 @@
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
+ AppShell: () => AppShell,
35
+ Badge: () => Badge,
36
+ Button: () => Button,
37
+ Card: () => Card,
38
+ CardContent: () => CardContent,
39
+ CardDescription: () => CardDescription,
40
+ CardFooter: () => CardFooter,
41
+ CardHeader: () => CardHeader,
42
+ CardTitle: () => CardTitle,
43
+ Checkbox: () => Checkbox,
44
+ ConfirmDialog: () => ConfirmDialog,
45
+ DataTable: () => DataTable,
46
+ Dialog: () => Dialog,
47
+ DialogClose: () => DialogClose,
48
+ DialogContent: () => DialogContent,
49
+ DialogDescription: () => DialogDescription,
50
+ DialogFooter: () => DialogFooter,
51
+ DialogHeader: () => DialogHeader,
52
+ DialogOverlay: () => DialogOverlay,
53
+ DialogPortal: () => DialogPortal,
54
+ DialogTitle: () => DialogTitle,
55
+ DialogTrigger: () => DialogTrigger,
56
+ DropdownMenu: () => DropdownMenu,
57
+ DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
58
+ DropdownMenuContent: () => DropdownMenuContent,
59
+ DropdownMenuGroup: () => DropdownMenuGroup,
60
+ DropdownMenuItem: () => DropdownMenuItem,
61
+ DropdownMenuLabel: () => DropdownMenuLabel,
62
+ DropdownMenuPortal: () => DropdownMenuPortal,
63
+ DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
64
+ DropdownMenuRadioItem: () => DropdownMenuRadioItem,
65
+ DropdownMenuSeparator: () => DropdownMenuSeparator,
66
+ DropdownMenuShortcut: () => DropdownMenuShortcut,
67
+ DropdownMenuSub: () => DropdownMenuSub,
68
+ DropdownMenuSubContent: () => DropdownMenuSubContent,
69
+ DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
70
+ DropdownMenuTrigger: () => DropdownMenuTrigger,
71
+ EmptyState: () => EmptyState,
72
+ FormField: () => FormField,
73
+ FormLayout: () => FormLayout,
74
+ FormSection: () => FormSection,
75
+ Input: () => Input,
76
+ Label: () => Label2,
77
+ LoadingSpinner: () => LoadingSpinner,
78
+ Page: () => Page,
79
+ PageSection: () => PageSection,
80
+ Pagination: () => Pagination,
81
+ Popover: () => Popover,
82
+ PopoverContent: () => PopoverContent,
83
+ PopoverTrigger: () => PopoverTrigger,
84
+ Select: () => Select,
85
+ SelectContent: () => SelectContent,
86
+ SelectGroup: () => SelectGroup,
87
+ SelectItem: () => SelectItem,
88
+ SelectLabel: () => SelectLabel,
89
+ SelectScrollDownButton: () => SelectScrollDownButton,
90
+ SelectScrollUpButton: () => SelectScrollUpButton,
91
+ SelectSeparator: () => SelectSeparator,
92
+ SelectTrigger: () => SelectTrigger,
93
+ SelectValue: () => SelectValue,
94
+ Separator: () => Separator3,
95
+ Sidebar: () => Sidebar,
96
+ Skeleton: () => Skeleton,
97
+ Stats: () => Stats,
98
+ Switch: () => Switch,
99
+ Tabs: () => Tabs,
100
+ TabsContent: () => TabsContent,
101
+ TabsList: () => TabsList,
102
+ TabsTrigger: () => TabsTrigger,
103
+ Textarea: () => Textarea,
104
+ Tooltip: () => Tooltip,
105
+ TooltipContent: () => TooltipContent,
106
+ TooltipProvider: () => TooltipProvider,
107
+ TooltipTrigger: () => TooltipTrigger,
108
+ TopBar: () => TopBar,
109
+ badgeVariants: () => badgeVariants,
110
+ buttonVariants: () => buttonVariants,
111
+ cn: () => cn,
112
+ useDisclosure: () => useDisclosure,
113
+ usePagination: () => usePagination
114
+ });
115
+ module.exports = __toCommonJS(index_exports);
116
+
117
+ // src/components/primitives/button.tsx
118
+ var React = __toESM(require("react"));
119
+ var import_react_slot = require("@radix-ui/react-slot");
120
+ var import_class_variance_authority = require("class-variance-authority");
121
+
122
+ // src/lib/utils.ts
123
+ var import_clsx = require("clsx");
124
+ var import_tailwind_merge = require("tailwind-merge");
125
+ function cn(...inputs) {
126
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
127
+ }
128
+
129
+ // src/components/primitives/button.tsx
130
+ var import_jsx_runtime = require("react/jsx-runtime");
131
+ var buttonVariants = (0, import_class_variance_authority.cva)(
132
+ "inline-flex items-center justify-center 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",
133
+ {
134
+ variants: {
135
+ variant: {
136
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
137
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
138
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
139
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
140
+ ghost: "hover:bg-accent hover:text-accent-foreground",
141
+ link: "text-primary underline-offset-4 hover:underline"
142
+ },
143
+ size: {
144
+ default: "h-10 px-4 py-2",
145
+ sm: "h-9 rounded-md px-3",
146
+ lg: "h-11 rounded-md px-8",
147
+ icon: "h-10 w-10"
148
+ }
149
+ },
150
+ defaultVariants: {
151
+ variant: "default",
152
+ size: "default"
153
+ }
154
+ }
155
+ );
156
+ var Button = React.forwardRef(
157
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
158
+ const Comp = asChild ? import_react_slot.Slot : "button";
159
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
160
+ Comp,
161
+ {
162
+ className: cn(buttonVariants({ variant, size, className })),
163
+ ref,
164
+ ...props
165
+ }
166
+ );
167
+ }
168
+ );
169
+ Button.displayName = "Button";
170
+
171
+ // src/components/primitives/badge.tsx
172
+ var import_class_variance_authority2 = require("class-variance-authority");
173
+ var import_jsx_runtime2 = require("react/jsx-runtime");
174
+ var badgeVariants = (0, import_class_variance_authority2.cva)(
175
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
176
+ {
177
+ variants: {
178
+ variant: {
179
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
180
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
181
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
182
+ outline: "text-foreground",
183
+ success: "border-transparent bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100",
184
+ warning: "border-transparent bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100"
185
+ }
186
+ },
187
+ defaultVariants: {
188
+ variant: "default"
189
+ }
190
+ }
191
+ );
192
+ function Badge({ className, variant, ...props }) {
193
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
194
+ }
195
+
196
+ // src/components/primitives/card.tsx
197
+ var React2 = __toESM(require("react"));
198
+ var import_jsx_runtime3 = require("react/jsx-runtime");
199
+ var Card = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
200
+ "div",
201
+ {
202
+ ref,
203
+ className: cn(
204
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
205
+ className
206
+ ),
207
+ ...props
208
+ }
209
+ ));
210
+ Card.displayName = "Card";
211
+ var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
212
+ "div",
213
+ {
214
+ ref,
215
+ className: cn("flex flex-col space-y-1.5 p-6", className),
216
+ ...props
217
+ }
218
+ ));
219
+ CardHeader.displayName = "CardHeader";
220
+ var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
221
+ "h3",
222
+ {
223
+ ref,
224
+ className: cn(
225
+ "text-2xl font-semibold leading-none tracking-tight",
226
+ className
227
+ ),
228
+ ...props
229
+ }
230
+ ));
231
+ CardTitle.displayName = "CardTitle";
232
+ var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
233
+ "p",
234
+ {
235
+ ref,
236
+ className: cn("text-sm text-muted-foreground", className),
237
+ ...props
238
+ }
239
+ ));
240
+ CardDescription.displayName = "CardDescription";
241
+ var CardContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props }));
242
+ CardContent.displayName = "CardContent";
243
+ var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
244
+ "div",
245
+ {
246
+ ref,
247
+ className: cn("flex items-center p-6 pt-0", className),
248
+ ...props
249
+ }
250
+ ));
251
+ CardFooter.displayName = "CardFooter";
252
+
253
+ // src/components/primitives/checkbox.tsx
254
+ var React3 = __toESM(require("react"));
255
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
256
+ var import_lucide_react = require("lucide-react");
257
+ var import_jsx_runtime4 = require("react/jsx-runtime");
258
+ var Checkbox = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
259
+ CheckboxPrimitive.Root,
260
+ {
261
+ ref,
262
+ className: cn(
263
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
264
+ className
265
+ ),
266
+ ...props,
267
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
268
+ CheckboxPrimitive.Indicator,
269
+ {
270
+ className: cn("flex items-center justify-center text-current"),
271
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Check, { className: "h-4 w-4" })
272
+ }
273
+ )
274
+ }
275
+ ));
276
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
277
+
278
+ // src/components/primitives/dialog.tsx
279
+ var React4 = __toESM(require("react"));
280
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
281
+ var import_lucide_react2 = require("lucide-react");
282
+ var import_jsx_runtime5 = require("react/jsx-runtime");
283
+ var Dialog = DialogPrimitive.Root;
284
+ var DialogTrigger = DialogPrimitive.Trigger;
285
+ var DialogClose = DialogPrimitive.Close;
286
+ var DialogPortal = DialogPrimitive.Portal;
287
+ var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
288
+ DialogPrimitive.Overlay,
289
+ {
290
+ ref,
291
+ className: cn(
292
+ "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",
293
+ className
294
+ ),
295
+ ...props
296
+ }
297
+ ));
298
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
299
+ var DialogContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DialogPortal, { children: [
300
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DialogOverlay, {}),
301
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
302
+ DialogPrimitive.Content,
303
+ {
304
+ ref,
305
+ className: cn(
306
+ "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",
307
+ className
308
+ ),
309
+ ...props,
310
+ children: [
311
+ children,
312
+ /* @__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: [
313
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.X, { className: "h-4 w-4" }),
314
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "sr-only", children: "Close" })
315
+ ] })
316
+ ]
317
+ }
318
+ )
319
+ ] }));
320
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
321
+ var DialogHeader = ({
322
+ className,
323
+ ...props
324
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
325
+ "div",
326
+ {
327
+ className: cn(
328
+ "flex flex-col space-y-1.5 text-center sm:text-left",
329
+ className
330
+ ),
331
+ ...props
332
+ }
333
+ );
334
+ DialogHeader.displayName = "DialogHeader";
335
+ var DialogFooter = ({
336
+ className,
337
+ ...props
338
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
339
+ "div",
340
+ {
341
+ className: cn(
342
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
343
+ className
344
+ ),
345
+ ...props
346
+ }
347
+ );
348
+ DialogFooter.displayName = "DialogFooter";
349
+ var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
350
+ DialogPrimitive.Title,
351
+ {
352
+ ref,
353
+ className: cn(
354
+ "text-lg font-semibold leading-none tracking-tight",
355
+ className
356
+ ),
357
+ ...props
358
+ }
359
+ ));
360
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
361
+ var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
362
+ DialogPrimitive.Description,
363
+ {
364
+ ref,
365
+ className: cn("text-sm text-muted-foreground", className),
366
+ ...props
367
+ }
368
+ ));
369
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
370
+
371
+ // src/components/primitives/dropdown-menu.tsx
372
+ var React5 = __toESM(require("react"));
373
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
374
+ var import_lucide_react3 = require("lucide-react");
375
+ var import_jsx_runtime6 = require("react/jsx-runtime");
376
+ var DropdownMenu = DropdownMenuPrimitive.Root;
377
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
378
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
379
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
380
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
381
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
382
+ var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
383
+ DropdownMenuPrimitive.SubTrigger,
384
+ {
385
+ ref,
386
+ className: cn(
387
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
388
+ inset && "pl-8",
389
+ className
390
+ ),
391
+ ...props,
392
+ children: [
393
+ children,
394
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.ChevronRight, { className: "ml-auto h-4 w-4" })
395
+ ]
396
+ }
397
+ ));
398
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
399
+ var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
400
+ DropdownMenuPrimitive.SubContent,
401
+ {
402
+ ref,
403
+ className: cn(
404
+ "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",
405
+ className
406
+ ),
407
+ ...props
408
+ }
409
+ ));
410
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
411
+ var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
412
+ DropdownMenuPrimitive.Content,
413
+ {
414
+ ref,
415
+ sideOffset,
416
+ className: cn(
417
+ "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",
418
+ className
419
+ ),
420
+ ...props
421
+ }
422
+ ) }));
423
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
424
+ var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
425
+ DropdownMenuPrimitive.Item,
426
+ {
427
+ ref,
428
+ className: cn(
429
+ "relative flex cursor-default select-none items-center 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",
430
+ inset && "pl-8",
431
+ className
432
+ ),
433
+ ...props
434
+ }
435
+ ));
436
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
437
+ var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
438
+ DropdownMenuPrimitive.CheckboxItem,
439
+ {
440
+ ref,
441
+ className: cn(
442
+ "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",
443
+ className
444
+ ),
445
+ checked,
446
+ ...props,
447
+ children: [
448
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Check, { className: "h-4 w-4" }) }) }),
449
+ children
450
+ ]
451
+ }
452
+ ));
453
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
454
+ var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
455
+ DropdownMenuPrimitive.RadioItem,
456
+ {
457
+ ref,
458
+ className: cn(
459
+ "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",
460
+ className
461
+ ),
462
+ ...props,
463
+ children: [
464
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Circle, { className: "h-2 w-2 fill-current" }) }) }),
465
+ children
466
+ ]
467
+ }
468
+ ));
469
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
470
+ var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
471
+ DropdownMenuPrimitive.Label,
472
+ {
473
+ ref,
474
+ className: cn(
475
+ "px-2 py-1.5 text-sm font-semibold",
476
+ inset && "pl-8",
477
+ className
478
+ ),
479
+ ...props
480
+ }
481
+ ));
482
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
483
+ var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
484
+ DropdownMenuPrimitive.Separator,
485
+ {
486
+ ref,
487
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
488
+ ...props
489
+ }
490
+ ));
491
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
492
+ var DropdownMenuShortcut = ({
493
+ className,
494
+ ...props
495
+ }) => {
496
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
497
+ "span",
498
+ {
499
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className),
500
+ ...props
501
+ }
502
+ );
503
+ };
504
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
505
+
506
+ // src/components/primitives/input.tsx
507
+ var React6 = __toESM(require("react"));
508
+ var import_jsx_runtime7 = require("react/jsx-runtime");
509
+ var Input = React6.forwardRef(
510
+ ({ className, type, error, ...props }, ref) => {
511
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
512
+ "input",
513
+ {
514
+ type,
515
+ className: cn(
516
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",
517
+ error && "border-destructive focus-visible:ring-destructive",
518
+ className
519
+ ),
520
+ ref,
521
+ ...props
522
+ }
523
+ );
524
+ }
525
+ );
526
+ Input.displayName = "Input";
527
+
528
+ // src/components/primitives/label.tsx
529
+ var React7 = __toESM(require("react"));
530
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
531
+ var import_class_variance_authority3 = require("class-variance-authority");
532
+ var import_jsx_runtime8 = require("react/jsx-runtime");
533
+ var labelVariants = (0, import_class_variance_authority3.cva)(
534
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
535
+ );
536
+ var Label2 = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
537
+ LabelPrimitive.Root,
538
+ {
539
+ ref,
540
+ className: cn(labelVariants(), className),
541
+ ...props
542
+ }
543
+ ));
544
+ Label2.displayName = LabelPrimitive.Root.displayName;
545
+
546
+ // src/components/primitives/popover.tsx
547
+ var React8 = __toESM(require("react"));
548
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
549
+ var import_jsx_runtime9 = require("react/jsx-runtime");
550
+ var Popover = PopoverPrimitive.Root;
551
+ var PopoverTrigger = PopoverPrimitive.Trigger;
552
+ var PopoverContent = React8.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
553
+ PopoverPrimitive.Content,
554
+ {
555
+ ref,
556
+ align,
557
+ sideOffset,
558
+ className: cn(
559
+ "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",
560
+ className
561
+ ),
562
+ ...props
563
+ }
564
+ ) }));
565
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
566
+
567
+ // src/components/primitives/select.tsx
568
+ var React9 = __toESM(require("react"));
569
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
570
+ var import_lucide_react4 = require("lucide-react");
571
+ var import_jsx_runtime10 = require("react/jsx-runtime");
572
+ var Select = SelectPrimitive.Root;
573
+ var SelectGroup = SelectPrimitive.Group;
574
+ var SelectValue = SelectPrimitive.Value;
575
+ var SelectTrigger = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
576
+ SelectPrimitive.Trigger,
577
+ {
578
+ ref,
579
+ className: cn(
580
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
581
+ className
582
+ ),
583
+ ...props,
584
+ children: [
585
+ children,
586
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
587
+ ]
588
+ }
589
+ ));
590
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
591
+ var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
592
+ SelectPrimitive.ScrollUpButton,
593
+ {
594
+ ref,
595
+ className: cn(
596
+ "flex cursor-default items-center justify-center py-1",
597
+ className
598
+ ),
599
+ ...props,
600
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" })
601
+ }
602
+ ));
603
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
604
+ var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
605
+ SelectPrimitive.ScrollDownButton,
606
+ {
607
+ ref,
608
+ className: cn(
609
+ "flex cursor-default items-center justify-center py-1",
610
+ className
611
+ ),
612
+ ...props,
613
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" })
614
+ }
615
+ ));
616
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
617
+ var SelectContent = React9.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
618
+ SelectPrimitive.Content,
619
+ {
620
+ ref,
621
+ className: cn(
622
+ "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",
623
+ 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",
624
+ className
625
+ ),
626
+ position,
627
+ ...props,
628
+ children: [
629
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectScrollUpButton, {}),
630
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
631
+ SelectPrimitive.Viewport,
632
+ {
633
+ className: cn(
634
+ "p-1",
635
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
636
+ ),
637
+ children
638
+ }
639
+ ),
640
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectScrollDownButton, {})
641
+ ]
642
+ }
643
+ ) }));
644
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
645
+ var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
646
+ SelectPrimitive.Label,
647
+ {
648
+ ref,
649
+ className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
650
+ ...props
651
+ }
652
+ ));
653
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
654
+ var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
655
+ SelectPrimitive.Item,
656
+ {
657
+ ref,
658
+ className: cn(
659
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
660
+ className
661
+ ),
662
+ ...props,
663
+ children: [
664
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) }) }),
665
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.ItemText, { children })
666
+ ]
667
+ }
668
+ ));
669
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
670
+ var SelectSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
671
+ SelectPrimitive.Separator,
672
+ {
673
+ ref,
674
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
675
+ ...props
676
+ }
677
+ ));
678
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
679
+
680
+ // src/components/primitives/separator.tsx
681
+ var React10 = __toESM(require("react"));
682
+ var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
683
+ var import_jsx_runtime11 = require("react/jsx-runtime");
684
+ var Separator3 = React10.forwardRef(
685
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
686
+ SeparatorPrimitive.Root,
687
+ {
688
+ ref,
689
+ decorative,
690
+ orientation,
691
+ className: cn(
692
+ "shrink-0 bg-border",
693
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
694
+ className
695
+ ),
696
+ ...props
697
+ }
698
+ )
699
+ );
700
+ Separator3.displayName = SeparatorPrimitive.Root.displayName;
701
+
702
+ // src/components/primitives/skeleton.tsx
703
+ var import_jsx_runtime12 = require("react/jsx-runtime");
704
+ function Skeleton({
705
+ className,
706
+ ...props
707
+ }) {
708
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
709
+ "div",
710
+ {
711
+ className: cn("animate-pulse rounded-md bg-muted", className),
712
+ ...props
713
+ }
714
+ );
715
+ }
716
+
717
+ // src/components/primitives/switch.tsx
718
+ var React11 = __toESM(require("react"));
719
+ var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
720
+ var import_jsx_runtime13 = require("react/jsx-runtime");
721
+ var Switch = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
722
+ SwitchPrimitives.Root,
723
+ {
724
+ className: cn(
725
+ "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
726
+ className
727
+ ),
728
+ ...props,
729
+ ref,
730
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
731
+ SwitchPrimitives.Thumb,
732
+ {
733
+ className: cn(
734
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
735
+ )
736
+ }
737
+ )
738
+ }
739
+ ));
740
+ Switch.displayName = SwitchPrimitives.Root.displayName;
741
+
742
+ // src/components/primitives/tabs.tsx
743
+ var React12 = __toESM(require("react"));
744
+ var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
745
+ var import_jsx_runtime14 = require("react/jsx-runtime");
746
+ var Tabs = TabsPrimitive.Root;
747
+ var TabsList = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
748
+ TabsPrimitive.List,
749
+ {
750
+ ref,
751
+ className: cn(
752
+ "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
753
+ className
754
+ ),
755
+ ...props
756
+ }
757
+ ));
758
+ TabsList.displayName = TabsPrimitive.List.displayName;
759
+ var TabsTrigger = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
760
+ TabsPrimitive.Trigger,
761
+ {
762
+ ref,
763
+ className: cn(
764
+ "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",
765
+ className
766
+ ),
767
+ ...props
768
+ }
769
+ ));
770
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
771
+ var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
772
+ TabsPrimitive.Content,
773
+ {
774
+ ref,
775
+ className: cn(
776
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
777
+ className
778
+ ),
779
+ ...props
780
+ }
781
+ ));
782
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
783
+
784
+ // src/components/primitives/textarea.tsx
785
+ var React13 = __toESM(require("react"));
786
+ var import_jsx_runtime15 = require("react/jsx-runtime");
787
+ var Textarea = React13.forwardRef(
788
+ ({ className, error, ...props }, ref) => {
789
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
790
+ "textarea",
791
+ {
792
+ className: cn(
793
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
794
+ error && "border-destructive focus-visible:ring-destructive",
795
+ className
796
+ ),
797
+ ref,
798
+ ...props
799
+ }
800
+ );
801
+ }
802
+ );
803
+ Textarea.displayName = "Textarea";
804
+
805
+ // src/components/primitives/tooltip.tsx
806
+ var React14 = __toESM(require("react"));
807
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
808
+ var import_jsx_runtime16 = require("react/jsx-runtime");
809
+ var TooltipProvider = TooltipPrimitive.Provider;
810
+ var Tooltip = TooltipPrimitive.Root;
811
+ var TooltipTrigger = TooltipPrimitive.Trigger;
812
+ var TooltipContent = React14.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
813
+ TooltipPrimitive.Content,
814
+ {
815
+ ref,
816
+ sideOffset,
817
+ className: cn(
818
+ "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",
819
+ className
820
+ ),
821
+ ...props
822
+ }
823
+ ));
824
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
825
+
826
+ // src/components/layout/app-shell.tsx
827
+ var import_jsx_runtime17 = require("react/jsx-runtime");
828
+ function AppShell({ sidebar, children, collapsed }) {
829
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex h-screen overflow-hidden bg-background", children: [
830
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
831
+ "aside",
832
+ {
833
+ className: cn(
834
+ "hidden border-r bg-card transition-all duration-300 md:block",
835
+ collapsed ? "w-[var(--sidebar-collapsed-width)]" : "w-[var(--sidebar-width)]"
836
+ ),
837
+ children: sidebar
838
+ }
839
+ ),
840
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("main", { className: "flex flex-1 flex-col overflow-hidden", children })
841
+ ] });
842
+ }
843
+
844
+ // src/components/layout/sidebar.tsx
845
+ var React15 = __toESM(require("react"));
846
+ var import_lucide_react5 = require("lucide-react");
847
+ var import_jsx_runtime18 = require("react/jsx-runtime");
848
+ function SidebarItemComponent({
849
+ item,
850
+ collapsed,
851
+ depth = 0
852
+ }) {
853
+ const [open, setOpen] = React15.useState(
854
+ item.active || item.children?.some((c) => c.active) || false
855
+ );
856
+ const Icon2 = item.icon;
857
+ const hasChildren = item.children && item.children.length > 0;
858
+ if (hasChildren) {
859
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
860
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
861
+ "button",
862
+ {
863
+ onClick: () => setOpen(!open),
864
+ className: cn(
865
+ "flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
866
+ item.active && "bg-accent text-accent-foreground",
867
+ depth > 0 && "pl-9"
868
+ ),
869
+ children: [
870
+ Icon2 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon2, { className: "h-4 w-4 shrink-0" }),
871
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
872
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex-1 text-left", children: item.label }),
873
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
874
+ import_lucide_react5.ChevronDown,
875
+ {
876
+ className: cn(
877
+ "h-4 w-4 shrink-0 transition-transform",
878
+ open && "rotate-180"
879
+ )
880
+ }
881
+ )
882
+ ] })
883
+ ]
884
+ }
885
+ ),
886
+ open && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mt-1 space-y-1", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
887
+ SidebarItemComponent,
888
+ {
889
+ item: child,
890
+ collapsed,
891
+ depth: depth + 1
892
+ },
893
+ child.href
894
+ )) })
895
+ ] });
896
+ }
897
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
898
+ "a",
899
+ {
900
+ href: item.href,
901
+ className: cn(
902
+ "flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
903
+ item.active && "bg-accent text-accent-foreground",
904
+ depth > 0 && "pl-9"
905
+ ),
906
+ children: [
907
+ Icon2 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon2, { className: "h-4 w-4 shrink-0" }),
908
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
909
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex-1", children: item.label }),
910
+ item.badge !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ml-auto rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: item.badge })
911
+ ] })
912
+ ]
913
+ }
914
+ );
915
+ }
916
+ function Sidebar({
917
+ logo,
918
+ items,
919
+ footer,
920
+ collapsed,
921
+ onCollapse
922
+ }) {
923
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex h-full flex-col", children: [
924
+ logo && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex h-14 items-center border-b px-4", children: logo }),
925
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("nav", { className: "flex-1 space-y-1 overflow-y-auto p-3", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
926
+ SidebarItemComponent,
927
+ {
928
+ item,
929
+ collapsed
930
+ },
931
+ item.href
932
+ )) }),
933
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "border-t p-3", children: [
934
+ footer,
935
+ onCollapse && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
936
+ "button",
937
+ {
938
+ onClick: () => onCollapse(!collapsed),
939
+ className: "flex w-full items-center justify-center rounded-md p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
940
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react5.ChevronsRight, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react5.ChevronsLeft, { className: "h-4 w-4" })
941
+ }
942
+ )
943
+ ] })
944
+ ] });
945
+ }
946
+
947
+ // src/components/layout/top-bar.tsx
948
+ var import_lucide_react6 = require("lucide-react");
949
+ var import_jsx_runtime19 = require("react/jsx-runtime");
950
+ function TopBar({
951
+ storeName,
952
+ user,
953
+ onMenuToggle,
954
+ actions,
955
+ className
956
+ }) {
957
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
958
+ "header",
959
+ {
960
+ className: cn(
961
+ "flex h-14 items-center gap-4 border-b bg-card px-4 lg:px-6",
962
+ className
963
+ ),
964
+ children: [
965
+ onMenuToggle && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
966
+ "button",
967
+ {
968
+ onClick: onMenuToggle,
969
+ className: "rounded-md p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
970
+ children: [
971
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Menu, { className: "h-5 w-5" }),
972
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: "Toggle menu" })
973
+ ]
974
+ }
975
+ ),
976
+ storeName && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "font-semibold text-foreground", children: storeName }),
977
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-1 items-center justify-end gap-4", children: [
978
+ actions,
979
+ user && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-3", children: [
980
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "hidden text-right text-sm md:block", children: [
981
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "font-medium", children: user.name }),
982
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-muted-foreground text-xs", children: user.email })
983
+ ] }),
984
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground", children: user.avatar ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
985
+ "img",
986
+ {
987
+ src: user.avatar,
988
+ alt: user.name,
989
+ className: "h-full w-full rounded-full object-cover"
990
+ }
991
+ ) : user.name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) })
992
+ ] })
993
+ ] })
994
+ ]
995
+ }
996
+ );
997
+ }
998
+
999
+ // src/components/layout/page.tsx
1000
+ var React16 = __toESM(require("react"));
1001
+ var import_lucide_react7 = require("lucide-react");
1002
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1003
+ function Page({
1004
+ title,
1005
+ subtitle,
1006
+ actions,
1007
+ breadcrumbs,
1008
+ children,
1009
+ fullWidth
1010
+ }) {
1011
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1012
+ "div",
1013
+ {
1014
+ className: cn(
1015
+ "mx-auto space-y-6 p-6",
1016
+ !fullWidth && "max-w-6xl"
1017
+ ),
1018
+ children: [
1019
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { className: "flex items-center space-x-1 text-sm text-muted-foreground", children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(React16.Fragment, { children: [
1020
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react7.ChevronRight, { className: "h-4 w-4" }),
1021
+ crumb.href ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1022
+ "a",
1023
+ {
1024
+ href: crumb.href,
1025
+ className: "hover:text-foreground transition-colors",
1026
+ children: crumb.label
1027
+ }
1028
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-foreground", children: crumb.label })
1029
+ ] }, index)) }),
1030
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center justify-between", children: [
1031
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
1032
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "text-2xl font-bold tracking-tight", children: title }),
1033
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-muted-foreground mt-1", children: subtitle })
1034
+ ] }),
1035
+ actions && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-2", children: actions })
1036
+ ] }),
1037
+ children
1038
+ ]
1039
+ }
1040
+ ) });
1041
+ }
1042
+
1043
+ // src/components/layout/page-section.tsx
1044
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1045
+ function PageSection({
1046
+ title,
1047
+ description,
1048
+ children,
1049
+ actions,
1050
+ className
1051
+ }) {
1052
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1053
+ "div",
1054
+ {
1055
+ className: cn(
1056
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
1057
+ className
1058
+ ),
1059
+ children: [
1060
+ (title || description || actions) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-start justify-between border-b p-6", children: [
1061
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
1062
+ title && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { className: "text-lg font-semibold", children: title }),
1063
+ description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
1064
+ ] }),
1065
+ actions && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center gap-2", children: actions })
1066
+ ] }),
1067
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "p-6", children })
1068
+ ]
1069
+ }
1070
+ );
1071
+ }
1072
+
1073
+ // src/components/data/data-table.tsx
1074
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1075
+ function DataTable({
1076
+ columns,
1077
+ data,
1078
+ loading,
1079
+ pagination,
1080
+ selection,
1081
+ onRowClick,
1082
+ emptyState,
1083
+ actions
1084
+ }) {
1085
+ const idKey = selection?.idKey ?? "id";
1086
+ const allSelected = selection && data.length > 0 && data.every((row) => selection.selected.includes(String(row[idKey])));
1087
+ const someSelected = selection && data.some((row) => selection.selected.includes(String(row[idKey]))) && !allSelected;
1088
+ function toggleAll() {
1089
+ if (!selection) return;
1090
+ if (allSelected) {
1091
+ selection.onSelect([]);
1092
+ } else {
1093
+ selection.onSelect(data.map((row) => String(row[idKey])));
1094
+ }
1095
+ }
1096
+ function toggleRow(row) {
1097
+ if (!selection) return;
1098
+ const id = String(row[idKey]);
1099
+ if (selection.selected.includes(id)) {
1100
+ selection.onSelect(selection.selected.filter((s) => s !== id));
1101
+ } else {
1102
+ selection.onSelect([...selection.selected, id]);
1103
+ }
1104
+ }
1105
+ const totalPages = pagination ? Math.ceil(pagination.total / pagination.pageSize) : 1;
1106
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-4", children: [
1107
+ selection && selection.selected.length > 0 && actions && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2 rounded-md border bg-muted/50 p-2", children: [
1108
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
1109
+ selection.selected.length,
1110
+ " selected"
1111
+ ] }),
1112
+ actions
1113
+ ] }),
1114
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("table", { className: "w-full text-sm", children: [
1115
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("tr", { className: "border-b bg-muted/50", children: [
1116
+ selection && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "w-12 px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1117
+ Checkbox,
1118
+ {
1119
+ checked: allSelected,
1120
+ ref: (el) => {
1121
+ if (el) {
1122
+ el.indeterminate = someSelected ?? false;
1123
+ }
1124
+ },
1125
+ onCheckedChange: toggleAll
1126
+ }
1127
+ ) }),
1128
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1129
+ "th",
1130
+ {
1131
+ className: "px-4 py-3 text-left font-medium text-muted-foreground",
1132
+ style: col.width ? { width: col.width } : void 0,
1133
+ children: col.header
1134
+ },
1135
+ String(col.key)
1136
+ ))
1137
+ ] }) }),
1138
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { children: loading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("tr", { className: "border-b", children: [
1139
+ selection && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Skeleton, { className: "h-4 w-4" }) }),
1140
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Skeleton, { className: "h-4 w-24" }) }, String(col.key)))
1141
+ ] }, i)) : data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1142
+ "td",
1143
+ {
1144
+ colSpan: columns.length + (selection ? 1 : 0),
1145
+ className: "py-12 text-center",
1146
+ children: emptyState || /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-muted-foreground", children: "No data found" })
1147
+ }
1148
+ ) }) : data.map((row, idx) => {
1149
+ const rowId = String(row[idKey] ?? idx);
1150
+ const isSelected = selection?.selected.includes(rowId);
1151
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1152
+ "tr",
1153
+ {
1154
+ className: cn(
1155
+ "border-b transition-colors hover:bg-muted/50",
1156
+ isSelected && "bg-muted/50",
1157
+ onRowClick && "cursor-pointer"
1158
+ ),
1159
+ onClick: () => onRowClick?.(row),
1160
+ children: [
1161
+ selection && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1162
+ "td",
1163
+ {
1164
+ className: "px-4 py-3",
1165
+ onClick: (e) => e.stopPropagation(),
1166
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1167
+ Checkbox,
1168
+ {
1169
+ checked: isSelected,
1170
+ onCheckedChange: () => toggleRow(row)
1171
+ }
1172
+ )
1173
+ }
1174
+ ),
1175
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "px-4 py-3", children: col.cell ? col.cell(row) : String(row[col.key] ?? "") }, String(col.key)))
1176
+ ]
1177
+ },
1178
+ rowId
1179
+ );
1180
+ }) })
1181
+ ] }) }) }),
1182
+ pagination && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between px-2", children: [
1183
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "text-sm text-muted-foreground", children: [
1184
+ "Page ",
1185
+ pagination.page,
1186
+ " of ",
1187
+ totalPages,
1188
+ " (",
1189
+ pagination.total,
1190
+ " total)"
1191
+ ] }),
1192
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
1193
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1194
+ "button",
1195
+ {
1196
+ className: "rounded-md border px-3 py-1.5 text-sm disabled:opacity-50",
1197
+ disabled: pagination.page <= 1,
1198
+ onClick: () => pagination.onPageChange(pagination.page - 1),
1199
+ children: "Previous"
1200
+ }
1201
+ ),
1202
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1203
+ "button",
1204
+ {
1205
+ className: "rounded-md border px-3 py-1.5 text-sm disabled:opacity-50",
1206
+ disabled: pagination.page >= totalPages,
1207
+ onClick: () => pagination.onPageChange(pagination.page + 1),
1208
+ children: "Next"
1209
+ }
1210
+ )
1211
+ ] })
1212
+ ] })
1213
+ ] });
1214
+ }
1215
+
1216
+ // src/components/data/empty-state.tsx
1217
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1218
+ function EmptyState({
1219
+ icon: Icon2,
1220
+ title,
1221
+ description,
1222
+ action,
1223
+ className
1224
+ }) {
1225
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1226
+ "div",
1227
+ {
1228
+ className: cn(
1229
+ "flex flex-col items-center justify-center py-12 text-center",
1230
+ className
1231
+ ),
1232
+ children: [
1233
+ Icon2 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mb-4 rounded-full bg-muted p-3", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { className: "h-6 w-6 text-muted-foreground" }) }),
1234
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h3", { className: "text-lg font-semibold", children: title }),
1235
+ description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: description }),
1236
+ action && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mt-4", children: action })
1237
+ ]
1238
+ }
1239
+ );
1240
+ }
1241
+
1242
+ // src/components/data/pagination.tsx
1243
+ var React17 = __toESM(require("react"));
1244
+ var import_lucide_react8 = require("lucide-react");
1245
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1246
+ function Pagination({
1247
+ page,
1248
+ totalPages,
1249
+ onPageChange,
1250
+ className
1251
+ }) {
1252
+ const pages = React17.useMemo(() => {
1253
+ const items = [];
1254
+ if (totalPages <= 7) {
1255
+ for (let i = 1; i <= totalPages; i++) items.push(i);
1256
+ } else {
1257
+ items.push(1);
1258
+ if (page > 3) items.push("ellipsis");
1259
+ const start = Math.max(2, page - 1);
1260
+ const end = Math.min(totalPages - 1, page + 1);
1261
+ for (let i = start; i <= end; i++) items.push(i);
1262
+ if (page < totalPages - 2) items.push("ellipsis");
1263
+ items.push(totalPages);
1264
+ }
1265
+ return items;
1266
+ }, [page, totalPages]);
1267
+ if (totalPages <= 1) return null;
1268
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("nav", { className: cn("flex items-center gap-1", className), children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1270
+ "button",
1271
+ {
1272
+ className: "inline-flex h-9 w-9 items-center justify-center rounded-md border text-sm disabled:opacity-50",
1273
+ disabled: page <= 1,
1274
+ onClick: () => onPageChange(page - 1),
1275
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.ChevronLeft, { className: "h-4 w-4" })
1276
+ }
1277
+ ),
1278
+ pages.map(
1279
+ (p, i) => p === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "px-2 text-muted-foreground", children: "..." }, `e-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1280
+ "button",
1281
+ {
1282
+ className: cn(
1283
+ "inline-flex h-9 w-9 items-center justify-center rounded-md border text-sm",
1284
+ p === page && "bg-primary text-primary-foreground"
1285
+ ),
1286
+ onClick: () => onPageChange(p),
1287
+ children: p
1288
+ },
1289
+ p
1290
+ )
1291
+ ),
1292
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1293
+ "button",
1294
+ {
1295
+ className: "inline-flex h-9 w-9 items-center justify-center rounded-md border text-sm disabled:opacity-50",
1296
+ disabled: page >= totalPages,
1297
+ onClick: () => onPageChange(page + 1),
1298
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.ChevronRight, { className: "h-4 w-4" })
1299
+ }
1300
+ )
1301
+ ] });
1302
+ }
1303
+
1304
+ // src/components/data/stats.tsx
1305
+ var import_lucide_react9 = require("lucide-react");
1306
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1307
+ function Stats({ stats, columns = 4, className }) {
1308
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1309
+ "div",
1310
+ {
1311
+ className: cn(
1312
+ "grid gap-4",
1313
+ columns === 2 && "grid-cols-1 sm:grid-cols-2",
1314
+ columns === 3 && "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
1315
+ columns === 4 && "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
1316
+ className
1317
+ ),
1318
+ children: stats.map((stat, index) => {
1319
+ const Icon2 = stat.icon;
1320
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1321
+ "div",
1322
+ {
1323
+ className: "rounded-lg border bg-card p-6 text-card-foreground shadow-sm",
1324
+ children: [
1325
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center justify-between", children: [
1326
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-muted-foreground", children: stat.label }),
1327
+ Icon2 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon2, { className: "h-4 w-4 text-muted-foreground" })
1328
+ ] }),
1329
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mt-2 flex items-baseline gap-2", children: [
1330
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-2xl font-bold", children: stat.value }),
1331
+ stat.change && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1332
+ "span",
1333
+ {
1334
+ className: cn(
1335
+ "inline-flex items-center text-xs font-medium",
1336
+ stat.change.type === "increase" ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"
1337
+ ),
1338
+ children: [
1339
+ stat.change.type === "increase" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react9.ArrowUp, { className: "mr-0.5 h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react9.ArrowDown, { className: "mr-0.5 h-3 w-3" }),
1340
+ stat.change.value,
1341
+ "%"
1342
+ ]
1343
+ }
1344
+ )
1345
+ ] })
1346
+ ]
1347
+ },
1348
+ index
1349
+ );
1350
+ })
1351
+ }
1352
+ );
1353
+ }
1354
+
1355
+ // src/components/form/form-field.tsx
1356
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1357
+ function FormField({
1358
+ label,
1359
+ error,
1360
+ hint,
1361
+ required,
1362
+ children,
1363
+ className
1364
+ }) {
1365
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("space-y-2", className), children: [
1366
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Label2, { children: [
1367
+ label,
1368
+ required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ml-1 text-destructive", children: "*" })
1369
+ ] }),
1370
+ children,
1371
+ hint && !error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-muted-foreground", children: hint }),
1372
+ error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-destructive", children: error })
1373
+ ] });
1374
+ }
1375
+
1376
+ // src/components/form/form-layout.tsx
1377
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1378
+ function FormLayout({
1379
+ title,
1380
+ description,
1381
+ children,
1382
+ actions,
1383
+ className
1384
+ }) {
1385
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1386
+ "div",
1387
+ {
1388
+ className: cn(
1389
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
1390
+ className
1391
+ ),
1392
+ children: [
1393
+ (title || description) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "border-b p-6", children: [
1394
+ title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className: "text-lg font-semibold", children: title }),
1395
+ description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
1396
+ ] }),
1397
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-6 p-6", children }),
1398
+ actions && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-end gap-2 border-t px-6 py-4", children: actions })
1399
+ ]
1400
+ }
1401
+ );
1402
+ }
1403
+
1404
+ // src/components/form/form-section.tsx
1405
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1406
+ function FormSection({
1407
+ title,
1408
+ description,
1409
+ children,
1410
+ className
1411
+ }) {
1412
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("space-y-4", className), children: [
1413
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
1414
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h4", { className: "text-sm font-medium", children: title }),
1415
+ description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
1416
+ ] }),
1417
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-4", children })
1418
+ ] });
1419
+ }
1420
+
1421
+ // src/components/feedback/alert.tsx
1422
+ var import_lucide_react10 = require("lucide-react");
1423
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1424
+ var variantConfig = {
1425
+ info: {
1426
+ icon: import_lucide_react10.Info,
1427
+ classes: "border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100"
1428
+ },
1429
+ success: {
1430
+ icon: import_lucide_react10.CheckCircle2,
1431
+ classes: "border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100"
1432
+ },
1433
+ warning: {
1434
+ icon: import_lucide_react10.AlertTriangle,
1435
+ classes: "border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-800 dark:bg-yellow-950 dark:text-yellow-100"
1436
+ },
1437
+ error: {
1438
+ icon: import_lucide_react10.AlertCircle,
1439
+ classes: "border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100"
1440
+ }
1441
+ };
1442
+ function Alert({
1443
+ variant = "info",
1444
+ title,
1445
+ children,
1446
+ dismissible,
1447
+ onDismiss,
1448
+ className
1449
+ }) {
1450
+ const config = variantConfig[variant];
1451
+ const Icon2 = config.icon;
1452
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1453
+ "div",
1454
+ {
1455
+ className: cn(
1456
+ "relative flex gap-3 rounded-lg border p-4",
1457
+ config.classes,
1458
+ className
1459
+ ),
1460
+ role: "alert",
1461
+ children: [
1462
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon2, { className: "mt-0.5 h-5 w-5 shrink-0" }),
1463
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex-1", children: [
1464
+ title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "font-medium", children: title }),
1465
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("text-sm", title && "mt-1"), children })
1466
+ ] }),
1467
+ dismissible && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1468
+ "button",
1469
+ {
1470
+ onClick: onDismiss,
1471
+ className: "absolute right-3 top-3 rounded-md p-1 opacity-70 hover:opacity-100",
1472
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react10.X, { className: "h-4 w-4" })
1473
+ }
1474
+ )
1475
+ ]
1476
+ }
1477
+ );
1478
+ }
1479
+
1480
+ // src/components/feedback/loading-spinner.tsx
1481
+ var import_lucide_react11 = require("lucide-react");
1482
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1483
+ var sizeMap = {
1484
+ sm: "h-4 w-4",
1485
+ md: "h-6 w-6",
1486
+ lg: "h-8 w-8"
1487
+ };
1488
+ function LoadingSpinner({ size = "md", className }) {
1489
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1490
+ import_lucide_react11.Loader2,
1491
+ {
1492
+ className: cn("animate-spin text-muted-foreground", sizeMap[size], className)
1493
+ }
1494
+ );
1495
+ }
1496
+
1497
+ // src/components/feedback/confirm-dialog.tsx
1498
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1499
+ function ConfirmDialog({
1500
+ open,
1501
+ onOpenChange,
1502
+ title,
1503
+ description,
1504
+ confirmLabel = "Confirm",
1505
+ cancelLabel = "Cancel",
1506
+ onConfirm,
1507
+ loading,
1508
+ variant = "default"
1509
+ }) {
1510
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DialogContent, { children: [
1511
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DialogHeader, { children: [
1512
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DialogTitle, { children: title }),
1513
+ description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DialogDescription, { children: description })
1514
+ ] }),
1515
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DialogFooter, { children: [
1516
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1517
+ Button,
1518
+ {
1519
+ variant: "outline",
1520
+ onClick: () => onOpenChange(false),
1521
+ disabled: loading,
1522
+ children: cancelLabel
1523
+ }
1524
+ ),
1525
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1526
+ Button,
1527
+ {
1528
+ variant: variant === "destructive" ? "destructive" : "default",
1529
+ onClick: onConfirm,
1530
+ disabled: loading,
1531
+ children: [
1532
+ loading && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LoadingSpinner, { size: "sm", className: "mr-2" }),
1533
+ confirmLabel
1534
+ ]
1535
+ }
1536
+ )
1537
+ ] })
1538
+ ] }) });
1539
+ }
1540
+
1541
+ // src/hooks/index.ts
1542
+ var import_react = require("react");
1543
+ function useDisclosure(initial = false) {
1544
+ const [isOpen, setIsOpen] = (0, import_react.useState)(initial);
1545
+ return {
1546
+ isOpen,
1547
+ open: () => setIsOpen(true),
1548
+ close: () => setIsOpen(false),
1549
+ toggle: () => setIsOpen((prev) => !prev),
1550
+ onOpenChange: setIsOpen
1551
+ };
1552
+ }
1553
+ function usePagination(total, pageSize = 20) {
1554
+ const [page, setPage] = (0, import_react.useState)(1);
1555
+ const totalPages = Math.ceil(total / pageSize);
1556
+ return { page, setPage, pageSize, total, totalPages };
1557
+ }
1558
+ // Annotate the CommonJS export names for ESM import in node:
1559
+ 0 && (module.exports = {
1560
+ Alert,
1561
+ AppShell,
1562
+ Badge,
1563
+ Button,
1564
+ Card,
1565
+ CardContent,
1566
+ CardDescription,
1567
+ CardFooter,
1568
+ CardHeader,
1569
+ CardTitle,
1570
+ Checkbox,
1571
+ ConfirmDialog,
1572
+ DataTable,
1573
+ Dialog,
1574
+ DialogClose,
1575
+ DialogContent,
1576
+ DialogDescription,
1577
+ DialogFooter,
1578
+ DialogHeader,
1579
+ DialogOverlay,
1580
+ DialogPortal,
1581
+ DialogTitle,
1582
+ DialogTrigger,
1583
+ DropdownMenu,
1584
+ DropdownMenuCheckboxItem,
1585
+ DropdownMenuContent,
1586
+ DropdownMenuGroup,
1587
+ DropdownMenuItem,
1588
+ DropdownMenuLabel,
1589
+ DropdownMenuPortal,
1590
+ DropdownMenuRadioGroup,
1591
+ DropdownMenuRadioItem,
1592
+ DropdownMenuSeparator,
1593
+ DropdownMenuShortcut,
1594
+ DropdownMenuSub,
1595
+ DropdownMenuSubContent,
1596
+ DropdownMenuSubTrigger,
1597
+ DropdownMenuTrigger,
1598
+ EmptyState,
1599
+ FormField,
1600
+ FormLayout,
1601
+ FormSection,
1602
+ Input,
1603
+ Label,
1604
+ LoadingSpinner,
1605
+ Page,
1606
+ PageSection,
1607
+ Pagination,
1608
+ Popover,
1609
+ PopoverContent,
1610
+ PopoverTrigger,
1611
+ Select,
1612
+ SelectContent,
1613
+ SelectGroup,
1614
+ SelectItem,
1615
+ SelectLabel,
1616
+ SelectScrollDownButton,
1617
+ SelectScrollUpButton,
1618
+ SelectSeparator,
1619
+ SelectTrigger,
1620
+ SelectValue,
1621
+ Separator,
1622
+ Sidebar,
1623
+ Skeleton,
1624
+ Stats,
1625
+ Switch,
1626
+ Tabs,
1627
+ TabsContent,
1628
+ TabsList,
1629
+ TabsTrigger,
1630
+ Textarea,
1631
+ Tooltip,
1632
+ TooltipContent,
1633
+ TooltipProvider,
1634
+ TooltipTrigger,
1635
+ TopBar,
1636
+ badgeVariants,
1637
+ buttonVariants,
1638
+ cn,
1639
+ useDisclosure,
1640
+ usePagination
1641
+ });
1642
+ //# sourceMappingURL=index.js.map