ikoncomponents 1.0.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/README.md +36 -0
- package/dist/index.d.mts +165 -0
- package/dist/index.d.ts +165 -0
- package/dist/index.js +2020 -0
- package/dist/index.mjs +1980 -0
- package/package.json +66 -0
- package/styles.css +190 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1980 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/shadcn/ui/dropdown-menu.tsx
|
|
34
|
+
import * as React2 from "react";
|
|
35
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
36
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
37
|
+
|
|
38
|
+
// lib/utils.ts
|
|
39
|
+
import { clsx } from "clsx";
|
|
40
|
+
import { twMerge } from "tailwind-merge";
|
|
41
|
+
function cn(...inputs) {
|
|
42
|
+
return twMerge(clsx(inputs));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/shadcn/ui/dropdown-menu.tsx
|
|
46
|
+
function DropdownMenu(_a) {
|
|
47
|
+
var props = __objRest(_a, []);
|
|
48
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuPrimitive.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
|
|
49
|
+
}
|
|
50
|
+
function DropdownMenuTrigger(_a) {
|
|
51
|
+
var props = __objRest(_a, []);
|
|
52
|
+
return /* @__PURE__ */ React2.createElement(
|
|
53
|
+
DropdownMenuPrimitive.Trigger,
|
|
54
|
+
__spreadValues({
|
|
55
|
+
"data-slot": "dropdown-menu-trigger"
|
|
56
|
+
}, props)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function DropdownMenuContent(_a) {
|
|
60
|
+
var _b = _a, {
|
|
61
|
+
className,
|
|
62
|
+
sideOffset = 4
|
|
63
|
+
} = _b, props = __objRest(_b, [
|
|
64
|
+
"className",
|
|
65
|
+
"sideOffset"
|
|
66
|
+
]);
|
|
67
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(
|
|
68
|
+
DropdownMenuPrimitive.Content,
|
|
69
|
+
__spreadValues({
|
|
70
|
+
"data-slot": "dropdown-menu-content",
|
|
71
|
+
sideOffset,
|
|
72
|
+
className: cn(
|
|
73
|
+
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
74
|
+
"bg-[var(--background)]",
|
|
75
|
+
className
|
|
76
|
+
)
|
|
77
|
+
}, props)
|
|
78
|
+
));
|
|
79
|
+
}
|
|
80
|
+
function DropdownMenuItem(_a) {
|
|
81
|
+
var _b = _a, {
|
|
82
|
+
className,
|
|
83
|
+
inset,
|
|
84
|
+
variant = "default"
|
|
85
|
+
} = _b, props = __objRest(_b, [
|
|
86
|
+
"className",
|
|
87
|
+
"inset",
|
|
88
|
+
"variant"
|
|
89
|
+
]);
|
|
90
|
+
return /* @__PURE__ */ React2.createElement(
|
|
91
|
+
DropdownMenuPrimitive.Item,
|
|
92
|
+
__spreadValues({
|
|
93
|
+
"data-slot": "dropdown-menu-item",
|
|
94
|
+
"data-inset": inset,
|
|
95
|
+
"data-variant": variant,
|
|
96
|
+
className: cn(
|
|
97
|
+
"focus:bg-[var(--input)] dark:focus:bg-[var(--card)] keross:focus:bg-[var(--secondary)] focus:text-accent-foreground keross:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
98
|
+
className
|
|
99
|
+
)
|
|
100
|
+
}, props)
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// src/components/action-menu/index.tsx
|
|
105
|
+
import { MoreHorizontal } from "lucide-react";
|
|
106
|
+
|
|
107
|
+
// src/components/buttons/index.tsx
|
|
108
|
+
import React5 from "react";
|
|
109
|
+
|
|
110
|
+
// src/shadcn/ui/button.tsx
|
|
111
|
+
import * as React3 from "react";
|
|
112
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
113
|
+
import { cva } from "class-variance-authority";
|
|
114
|
+
var buttonVariants = cva(
|
|
115
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
116
|
+
{
|
|
117
|
+
variants: {
|
|
118
|
+
variant: {
|
|
119
|
+
default: "bg-[var(--calender-foreground)] text-[var(--btn-default)] shadow-xs hover:bg-[var(--calender-foreground)]/60 keross:hover:bg-[#1F3ABA99]",
|
|
120
|
+
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
121
|
+
outline: "border! border-2! bg-btn-outlined shadow-xs hover:bg-accent hover:text-foreground ",
|
|
122
|
+
secondary: "bg-[var(--btn-secondary)] text-secondary-foreground shadow-xs hover:bg-[var(--btn-secondary)]/20 border border-input",
|
|
123
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
124
|
+
dashed: "border border-dashed bg-background shadow-sm hover:bg-accent hover:text-accent-foreground ",
|
|
125
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
126
|
+
},
|
|
127
|
+
size: {
|
|
128
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
129
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
130
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
131
|
+
icon: "size-9",
|
|
132
|
+
smIcon: "h-8 w-8",
|
|
133
|
+
circular: "size-10 rounded-full p-0",
|
|
134
|
+
lgIcon: "size-10"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
defaultVariants: {
|
|
138
|
+
variant: "default",
|
|
139
|
+
size: "default"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
function Button(_a) {
|
|
144
|
+
var _b = _a, {
|
|
145
|
+
className,
|
|
146
|
+
variant,
|
|
147
|
+
size,
|
|
148
|
+
asChild = false
|
|
149
|
+
} = _b, props = __objRest(_b, [
|
|
150
|
+
"className",
|
|
151
|
+
"variant",
|
|
152
|
+
"size",
|
|
153
|
+
"asChild"
|
|
154
|
+
]);
|
|
155
|
+
const Comp = asChild ? Slot : "button";
|
|
156
|
+
return /* @__PURE__ */ React3.createElement(
|
|
157
|
+
Comp,
|
|
158
|
+
__spreadValues({
|
|
159
|
+
"data-slot": "button",
|
|
160
|
+
className: cn(buttonVariants({ variant, size, className }))
|
|
161
|
+
}, props)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// src/shadcn/ui/tooltip.tsx
|
|
166
|
+
import * as React4 from "react";
|
|
167
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
168
|
+
function TooltipProvider(_a) {
|
|
169
|
+
var _b = _a, {
|
|
170
|
+
delayDuration = 0
|
|
171
|
+
} = _b, props = __objRest(_b, [
|
|
172
|
+
"delayDuration"
|
|
173
|
+
]);
|
|
174
|
+
return /* @__PURE__ */ React4.createElement(
|
|
175
|
+
TooltipPrimitive.Provider,
|
|
176
|
+
__spreadValues({
|
|
177
|
+
"data-slot": "tooltip-provider",
|
|
178
|
+
delayDuration
|
|
179
|
+
}, props)
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
function Tooltip(_a) {
|
|
183
|
+
var props = __objRest(_a, []);
|
|
184
|
+
return /* @__PURE__ */ React4.createElement(TooltipProvider, null, /* @__PURE__ */ React4.createElement(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)));
|
|
185
|
+
}
|
|
186
|
+
function TooltipTrigger(_a) {
|
|
187
|
+
var props = __objRest(_a, []);
|
|
188
|
+
return /* @__PURE__ */ React4.createElement(
|
|
189
|
+
TooltipPrimitive.Trigger,
|
|
190
|
+
__spreadValues({
|
|
191
|
+
"data-slot": "tooltip-trigger",
|
|
192
|
+
className: cn(
|
|
193
|
+
"inline-flex w-[80px] whitespace-nowrap rounded-md border-0 border-input py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
|
194
|
+
)
|
|
195
|
+
}, props)
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function TooltipContent(_a) {
|
|
199
|
+
var _b = _a, {
|
|
200
|
+
className,
|
|
201
|
+
sideOffset = 0,
|
|
202
|
+
children
|
|
203
|
+
} = _b, props = __objRest(_b, [
|
|
204
|
+
"className",
|
|
205
|
+
"sideOffset",
|
|
206
|
+
"children"
|
|
207
|
+
]);
|
|
208
|
+
return /* @__PURE__ */ React4.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React4.createElement(
|
|
209
|
+
TooltipPrimitive.Content,
|
|
210
|
+
__spreadValues({
|
|
211
|
+
"data-slot": "tooltip-content",
|
|
212
|
+
sideOffset,
|
|
213
|
+
className: cn(
|
|
214
|
+
"bg-[var(--secondary)] dark:bg-[var(--input-background-custom)] text-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
215
|
+
className
|
|
216
|
+
)
|
|
217
|
+
}, props),
|
|
218
|
+
children,
|
|
219
|
+
/* @__PURE__ */ React4.createElement(TooltipPrimitive.Arrow, { className: "bg-[var(--secondary)] dark:bg-[var(--input-background-custom)] fill-[var(--secondary)] dark:fill-[var(--input-background-custom)] z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
220
|
+
));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// src/components/tooltip/index.tsx
|
|
224
|
+
function Tooltip2({ tooltipContent, children }) {
|
|
225
|
+
return /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, children), /* @__PURE__ */ React.createElement(TooltipContent, null, tooltipContent)));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// src/components/buttons/index.tsx
|
|
229
|
+
function TextButton(_a) {
|
|
230
|
+
var _b = _a, { children, variant, asChild = false, size } = _b, props = __objRest(_b, ["children", "variant", "asChild", "size"]);
|
|
231
|
+
return /* @__PURE__ */ React5.createElement(Button, __spreadProps(__spreadValues({ variant, size }, props), { asChild }), children);
|
|
232
|
+
}
|
|
233
|
+
function TextButtonWithTooltip(_a) {
|
|
234
|
+
var _b = _a, { children, variant, asChild = false, size, tooltipContent } = _b, props = __objRest(_b, ["children", "variant", "asChild", "size", "tooltipContent"]);
|
|
235
|
+
return /* @__PURE__ */ React5.createElement(Tooltip2, { tooltipContent }, /* @__PURE__ */ React5.createElement(TextButton, __spreadProps(__spreadValues({ variant, size }, props), { asChild }), children));
|
|
236
|
+
}
|
|
237
|
+
function IconTextButton(_a) {
|
|
238
|
+
var _b = _a, { children, variant, asChild = false, size } = _b, props = __objRest(_b, ["children", "variant", "asChild", "size"]);
|
|
239
|
+
return /* @__PURE__ */ React5.createElement(Button, __spreadProps(__spreadValues({ variant: variant || "outline", size: size || "sm" }, props), { asChild }), children);
|
|
240
|
+
}
|
|
241
|
+
function IconTextButtonWithTooltip(_a) {
|
|
242
|
+
var _b = _a, { children, variant, size, asChild = false, tooltipContent } = _b, props = __objRest(_b, ["children", "variant", "size", "asChild", "tooltipContent"]);
|
|
243
|
+
return /* @__PURE__ */ React5.createElement(Tooltip2, { tooltipContent }, /* @__PURE__ */ React5.createElement(IconTextButton, __spreadProps(__spreadValues({ variant, size }, props), { asChild }), children));
|
|
244
|
+
}
|
|
245
|
+
function IconButton(_a) {
|
|
246
|
+
var _b = _a, { children, variant, size, asChild = false } = _b, props = __objRest(_b, ["children", "variant", "size", "asChild"]);
|
|
247
|
+
return /* @__PURE__ */ React5.createElement(Button, __spreadProps(__spreadValues({ variant: variant || "outline", size: size || "icon" }, props), { asChild }), children);
|
|
248
|
+
}
|
|
249
|
+
function IconButtonWithTooltip(_a) {
|
|
250
|
+
var _b = _a, { children, tooltipContent, asChild = false, variant, size } = _b, props = __objRest(_b, ["children", "tooltipContent", "asChild", "variant", "size"]);
|
|
251
|
+
return /* @__PURE__ */ React5.createElement(Tooltip2, { tooltipContent }, /* @__PURE__ */ React5.createElement(IconButton, __spreadProps(__spreadValues({ variant, size }, props), { asChild }), children));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// src/shadcn/ui/alert-dialog.tsx
|
|
255
|
+
import * as React6 from "react";
|
|
256
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
257
|
+
var AlertDialog = (props) => /* @__PURE__ */ React6.createElement(AlertDialogPrimitive.Root, __spreadValues({ "data-slot": "alert-dialog" }, props));
|
|
258
|
+
AlertDialog.displayName = "AlertDialog";
|
|
259
|
+
var AlertDialogTrigger = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(
|
|
260
|
+
AlertDialogPrimitive.Trigger,
|
|
261
|
+
__spreadValues({
|
|
262
|
+
"data-slot": "alert-dialog-trigger",
|
|
263
|
+
ref
|
|
264
|
+
}, props)
|
|
265
|
+
));
|
|
266
|
+
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
267
|
+
var AlertDialogPortal = (props) => /* @__PURE__ */ React6.createElement(AlertDialogPrimitive.Portal, __spreadValues({ "data-slot": "alert-dialog-portal" }, props));
|
|
268
|
+
AlertDialogPortal.displayName = "AlertDialogPortal";
|
|
269
|
+
var AlertDialogOverlay = React6.forwardRef((_a, ref) => {
|
|
270
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
271
|
+
return /* @__PURE__ */ React6.createElement(
|
|
272
|
+
AlertDialogPrimitive.Overlay,
|
|
273
|
+
__spreadValues({
|
|
274
|
+
ref,
|
|
275
|
+
"data-slot": "alert-dialog-overlay",
|
|
276
|
+
className: cn(
|
|
277
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
278
|
+
className
|
|
279
|
+
)
|
|
280
|
+
}, props)
|
|
281
|
+
);
|
|
282
|
+
});
|
|
283
|
+
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
284
|
+
var AlertDialogContent = React6.forwardRef((_a, ref) => {
|
|
285
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
286
|
+
return /* @__PURE__ */ React6.createElement(AlertDialogPortal, null, /* @__PURE__ */ React6.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React6.createElement(
|
|
287
|
+
AlertDialogPrimitive.Content,
|
|
288
|
+
__spreadValues({
|
|
289
|
+
ref,
|
|
290
|
+
"data-slot": "alert-dialog-content",
|
|
291
|
+
className: cn(
|
|
292
|
+
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
293
|
+
className
|
|
294
|
+
)
|
|
295
|
+
}, props)
|
|
296
|
+
));
|
|
297
|
+
});
|
|
298
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
299
|
+
var AlertDialogHeader = React6.forwardRef((_a, ref) => {
|
|
300
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
301
|
+
return /* @__PURE__ */ React6.createElement(
|
|
302
|
+
"div",
|
|
303
|
+
__spreadValues({
|
|
304
|
+
ref,
|
|
305
|
+
"data-slot": "alert-dialog-header",
|
|
306
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className)
|
|
307
|
+
}, props)
|
|
308
|
+
);
|
|
309
|
+
});
|
|
310
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
311
|
+
var AlertDialogFooter = React6.forwardRef((_a, ref) => {
|
|
312
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
313
|
+
return /* @__PURE__ */ React6.createElement(
|
|
314
|
+
"div",
|
|
315
|
+
__spreadValues({
|
|
316
|
+
ref,
|
|
317
|
+
"data-slot": "alert-dialog-footer",
|
|
318
|
+
className: cn(
|
|
319
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
320
|
+
className
|
|
321
|
+
)
|
|
322
|
+
}, props)
|
|
323
|
+
);
|
|
324
|
+
});
|
|
325
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
326
|
+
var AlertDialogTitle = React6.forwardRef((_a, ref) => {
|
|
327
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
328
|
+
return /* @__PURE__ */ React6.createElement(
|
|
329
|
+
AlertDialogPrimitive.Title,
|
|
330
|
+
__spreadValues({
|
|
331
|
+
ref,
|
|
332
|
+
"data-slot": "alert-dialog-title",
|
|
333
|
+
className: cn("text-lg font-semibold bg-background", className)
|
|
334
|
+
}, props)
|
|
335
|
+
);
|
|
336
|
+
});
|
|
337
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
338
|
+
var AlertDialogDescription = React6.forwardRef((_a, ref) => {
|
|
339
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
340
|
+
return /* @__PURE__ */ React6.createElement(
|
|
341
|
+
AlertDialogPrimitive.Description,
|
|
342
|
+
__spreadValues({
|
|
343
|
+
ref,
|
|
344
|
+
"data-slot": "alert-dialog-description",
|
|
345
|
+
className: cn("text-muted-foreground text-sm bg-background", className)
|
|
346
|
+
}, props)
|
|
347
|
+
);
|
|
348
|
+
});
|
|
349
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
350
|
+
var AlertDialogAction = React6.forwardRef((_a, ref) => {
|
|
351
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
352
|
+
return /* @__PURE__ */ React6.createElement(
|
|
353
|
+
AlertDialogPrimitive.Action,
|
|
354
|
+
__spreadValues({
|
|
355
|
+
ref,
|
|
356
|
+
className: cn(buttonVariants(), className)
|
|
357
|
+
}, props)
|
|
358
|
+
);
|
|
359
|
+
});
|
|
360
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
361
|
+
var AlertDialogCancel = React6.forwardRef((_a, ref) => {
|
|
362
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
363
|
+
return /* @__PURE__ */ React6.createElement(
|
|
364
|
+
AlertDialogPrimitive.Cancel,
|
|
365
|
+
__spreadValues({
|
|
366
|
+
ref,
|
|
367
|
+
className: cn(
|
|
368
|
+
buttonVariants({ variant: "outline" }),
|
|
369
|
+
"bg-background",
|
|
370
|
+
className
|
|
371
|
+
)
|
|
372
|
+
}, props)
|
|
373
|
+
);
|
|
374
|
+
});
|
|
375
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
376
|
+
|
|
377
|
+
// src/components/app-breadcrumb/index.tsx
|
|
378
|
+
import Link from "next/link";
|
|
379
|
+
import { Fragment, useEffect as useEffect2, useMemo, useState as useState3 } from "react";
|
|
380
|
+
import { redirect } from "next/navigation";
|
|
381
|
+
|
|
382
|
+
// src/components/app-breadcrumb/BreadcrumbProvider.tsx
|
|
383
|
+
import { createContext, useContext, useState } from "react";
|
|
384
|
+
var BreadcrumbContext = createContext(void 0);
|
|
385
|
+
function useBreadcrumb() {
|
|
386
|
+
const context = useContext(BreadcrumbContext);
|
|
387
|
+
if (!context) {
|
|
388
|
+
throw new Error("useBreadcrumb must be used within a BreadcrumbProvider");
|
|
389
|
+
}
|
|
390
|
+
return context;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// src/shadcn/ui/breadcrumb.tsx
|
|
394
|
+
import * as React7 from "react";
|
|
395
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
396
|
+
import { ChevronRight, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
397
|
+
|
|
398
|
+
// src/shadcn/ui/drawer.tsx
|
|
399
|
+
import * as React8 from "react";
|
|
400
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
401
|
+
|
|
402
|
+
// src/shadcn/hooks/use-mobile.ts
|
|
403
|
+
import * as React9 from "react";
|
|
404
|
+
|
|
405
|
+
// src/components/app-breadcrumb/index.tsx
|
|
406
|
+
function RenderAppBreadcrumb({
|
|
407
|
+
breadcrumb
|
|
408
|
+
}) {
|
|
409
|
+
const { addBreadcrumb } = useBreadcrumb();
|
|
410
|
+
useEffect2(() => {
|
|
411
|
+
addBreadcrumb(breadcrumb);
|
|
412
|
+
}, [breadcrumb]);
|
|
413
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// src/components/combobox-input/index.tsx
|
|
417
|
+
import React13, { useState as useState4 } from "react";
|
|
418
|
+
|
|
419
|
+
// src/shadcn/ui/popover.tsx
|
|
420
|
+
import * as React10 from "react";
|
|
421
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
422
|
+
function Popover(_a) {
|
|
423
|
+
var props = __objRest(_a, []);
|
|
424
|
+
return /* @__PURE__ */ React10.createElement(PopoverPrimitive.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
425
|
+
}
|
|
426
|
+
function PopoverTrigger(_a) {
|
|
427
|
+
var props = __objRest(_a, []);
|
|
428
|
+
return /* @__PURE__ */ React10.createElement(PopoverPrimitive.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
|
|
429
|
+
}
|
|
430
|
+
function PopoverContent(_a) {
|
|
431
|
+
var _b = _a, {
|
|
432
|
+
className,
|
|
433
|
+
align = "center",
|
|
434
|
+
sideOffset = 4
|
|
435
|
+
} = _b, props = __objRest(_b, [
|
|
436
|
+
"className",
|
|
437
|
+
"align",
|
|
438
|
+
"sideOffset"
|
|
439
|
+
]);
|
|
440
|
+
return /* @__PURE__ */ React10.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React10.createElement(
|
|
441
|
+
PopoverPrimitive.Content,
|
|
442
|
+
__spreadValues({
|
|
443
|
+
"data-slot": "popover-content",
|
|
444
|
+
align,
|
|
445
|
+
sideOffset,
|
|
446
|
+
className: cn(
|
|
447
|
+
"bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
448
|
+
className
|
|
449
|
+
)
|
|
450
|
+
}, props)
|
|
451
|
+
));
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// src/components/combobox-input/index.tsx
|
|
455
|
+
import { Check, ChevronsUpDown } from "lucide-react";
|
|
456
|
+
|
|
457
|
+
// src/shadcn/ui/command.tsx
|
|
458
|
+
import * as React12 from "react";
|
|
459
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
460
|
+
import { SearchIcon } from "lucide-react";
|
|
461
|
+
|
|
462
|
+
// src/shadcn/ui/dialog.tsx
|
|
463
|
+
import * as React11 from "react";
|
|
464
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
465
|
+
import { XIcon } from "lucide-react";
|
|
466
|
+
|
|
467
|
+
// src/shadcn/ui/command.tsx
|
|
468
|
+
function Command(_a) {
|
|
469
|
+
var _b = _a, {
|
|
470
|
+
className
|
|
471
|
+
} = _b, props = __objRest(_b, [
|
|
472
|
+
"className"
|
|
473
|
+
]);
|
|
474
|
+
return /* @__PURE__ */ React12.createElement(
|
|
475
|
+
CommandPrimitive,
|
|
476
|
+
__spreadValues({
|
|
477
|
+
"data-slot": "command",
|
|
478
|
+
className: cn(
|
|
479
|
+
"bg-card text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
480
|
+
className
|
|
481
|
+
)
|
|
482
|
+
}, props)
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
function CommandInput(_a) {
|
|
486
|
+
var _b = _a, {
|
|
487
|
+
className
|
|
488
|
+
} = _b, props = __objRest(_b, [
|
|
489
|
+
"className"
|
|
490
|
+
]);
|
|
491
|
+
return /* @__PURE__ */ React12.createElement(
|
|
492
|
+
"div",
|
|
493
|
+
{
|
|
494
|
+
"data-slot": "command-input-wrapper",
|
|
495
|
+
className: "flex h-9 items-center gap-2 border-b px-3"
|
|
496
|
+
},
|
|
497
|
+
/* @__PURE__ */ React12.createElement(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
498
|
+
/* @__PURE__ */ React12.createElement(
|
|
499
|
+
CommandPrimitive.Input,
|
|
500
|
+
__spreadValues({
|
|
501
|
+
"data-slot": "command-input",
|
|
502
|
+
className: cn(
|
|
503
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
504
|
+
className
|
|
505
|
+
)
|
|
506
|
+
}, props)
|
|
507
|
+
)
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
function CommandList(_a) {
|
|
511
|
+
var _b = _a, {
|
|
512
|
+
className
|
|
513
|
+
} = _b, props = __objRest(_b, [
|
|
514
|
+
"className"
|
|
515
|
+
]);
|
|
516
|
+
return /* @__PURE__ */ React12.createElement(
|
|
517
|
+
CommandPrimitive.List,
|
|
518
|
+
__spreadValues({
|
|
519
|
+
"data-slot": "command-list",
|
|
520
|
+
className: cn(
|
|
521
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
522
|
+
className
|
|
523
|
+
)
|
|
524
|
+
}, props)
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
function CommandEmpty(_a) {
|
|
528
|
+
var props = __objRest(_a, []);
|
|
529
|
+
return /* @__PURE__ */ React12.createElement(
|
|
530
|
+
CommandPrimitive.Empty,
|
|
531
|
+
__spreadValues({
|
|
532
|
+
"data-slot": "command-empty",
|
|
533
|
+
className: "py-6 text-center text-sm"
|
|
534
|
+
}, props)
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
function CommandItem(_a) {
|
|
538
|
+
var _b = _a, {
|
|
539
|
+
className
|
|
540
|
+
} = _b, props = __objRest(_b, [
|
|
541
|
+
"className"
|
|
542
|
+
]);
|
|
543
|
+
return /* @__PURE__ */ React12.createElement(
|
|
544
|
+
CommandPrimitive.Item,
|
|
545
|
+
__spreadValues({
|
|
546
|
+
"data-slot": "command-item",
|
|
547
|
+
className: cn(
|
|
548
|
+
"data-[selected=true]:bg-[var(--input)] data-[selected=true]:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
549
|
+
className
|
|
550
|
+
)
|
|
551
|
+
}, props)
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// src/components/e-chart/index.tsx
|
|
556
|
+
import { forwardRef as forwardRef2, useEffect as useEffect4, useImperativeHandle, useRef } from "react";
|
|
557
|
+
import { getInstanceByDom, init } from "echarts";
|
|
558
|
+
function validateOption(option) {
|
|
559
|
+
if (option === void 0 || option === null || typeof option !== "object") {
|
|
560
|
+
option = {};
|
|
561
|
+
}
|
|
562
|
+
const validatedOption = __spreadValues({}, option);
|
|
563
|
+
if (validatedOption.toolbox === void 0 || validatedOption.toolbox === null || typeof validatedOption.toolbox !== "object") {
|
|
564
|
+
validatedOption.toolbox = {};
|
|
565
|
+
}
|
|
566
|
+
if (validatedOption.toolbox.feature === void 0 || validatedOption.toolbox.feature === null || typeof validatedOption.toolbox.feature !== "object") {
|
|
567
|
+
validatedOption.toolbox.feature = {};
|
|
568
|
+
}
|
|
569
|
+
return validatedOption;
|
|
570
|
+
}
|
|
571
|
+
var EChart = forwardRef2(({
|
|
572
|
+
parentDivProps = {},
|
|
573
|
+
option = {},
|
|
574
|
+
style = {},
|
|
575
|
+
settings = {},
|
|
576
|
+
loading = true,
|
|
577
|
+
theme,
|
|
578
|
+
isConfigurable = false,
|
|
579
|
+
resizeKey,
|
|
580
|
+
onClick = () => {
|
|
581
|
+
},
|
|
582
|
+
onConfigure = () => {
|
|
583
|
+
}
|
|
584
|
+
}, ref) => {
|
|
585
|
+
const chartRef = useRef(null);
|
|
586
|
+
const chartInstanceRef = useRef(null);
|
|
587
|
+
const validatedOption = validateOption(option);
|
|
588
|
+
if (isConfigurable) {
|
|
589
|
+
validatedOption.toolbox.feature = __spreadProps(__spreadValues({}, validatedOption.toolbox.feature), {
|
|
590
|
+
myConfigureChartTool: {
|
|
591
|
+
show: true,
|
|
592
|
+
title: "Configure Chart",
|
|
593
|
+
icon: "image://data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXNldHRpbmdzLTIiPjxwYXRoIGQ9Ik0yMCA3aC05Ii8+PHBhdGggZD0iTTE0IDE3SDUiLz48Y2lyY2xlIGN4PSIxNyIgY3k9IjE3IiByPSIzIi8+PGNpcmNsZSBjeD0iNyIgY3k9IjciIHI9IjMiLz48L3N2Zz4=",
|
|
594
|
+
onclick: () => onConfigure == null ? void 0 : onConfigure()
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
useImperativeHandle(ref, () => {
|
|
599
|
+
return {
|
|
600
|
+
getChartObject: () => {
|
|
601
|
+
return chartRef.current ? getInstanceByDom(chartRef.current) : null;
|
|
602
|
+
},
|
|
603
|
+
setOption: (validatedOption2, settings2) => {
|
|
604
|
+
if (!chartRef.current) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
608
|
+
chart == null ? void 0 : chart.setOption(validatedOption2, settings2);
|
|
609
|
+
},
|
|
610
|
+
resize: (secondResizeDelay = 0) => {
|
|
611
|
+
if (!chartRef.current) {
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
615
|
+
chart == null ? void 0 : chart.resize();
|
|
616
|
+
if (secondResizeDelay) {
|
|
617
|
+
setTimeout(() => chart == null ? void 0 : chart.resize(), secondResizeDelay);
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
loadingVisible: (visibility) => {
|
|
621
|
+
if (!chartRef.current) {
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
625
|
+
visibility ? chart == null ? void 0 : chart.showLoading() : chart == null ? void 0 : chart.hideLoading();
|
|
626
|
+
},
|
|
627
|
+
dispose: () => {
|
|
628
|
+
if (!chartRef.current) {
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
632
|
+
chart == null ? void 0 : chart.dispose();
|
|
633
|
+
},
|
|
634
|
+
on: (eventName, callback) => {
|
|
635
|
+
if (!chartRef.current) {
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
639
|
+
chart == null ? void 0 : chart.on(eventName, callback);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
});
|
|
643
|
+
useEffect4(() => {
|
|
644
|
+
if (chartRef.current) {
|
|
645
|
+
chartInstanceRef.current = init(chartRef.current, theme);
|
|
646
|
+
}
|
|
647
|
+
const resizeCallback = () => {
|
|
648
|
+
var _a, _b;
|
|
649
|
+
return (_b = (_a = chartInstanceRef.current) == null ? void 0 : _a.resize) == null ? void 0 : _b.call(_a);
|
|
650
|
+
};
|
|
651
|
+
window.addEventListener("resize", resizeCallback);
|
|
652
|
+
return () => {
|
|
653
|
+
if (chartInstanceRef.current) {
|
|
654
|
+
chartInstanceRef.current.dispose();
|
|
655
|
+
chartInstanceRef.current = null;
|
|
656
|
+
}
|
|
657
|
+
window.removeEventListener("resize", resizeCallback);
|
|
658
|
+
};
|
|
659
|
+
}, [theme]);
|
|
660
|
+
useEffect4(() => {
|
|
661
|
+
if (chartInstanceRef.current) {
|
|
662
|
+
chartInstanceRef.current.setOption(validatedOption, settings);
|
|
663
|
+
}
|
|
664
|
+
if (chartInstanceRef.current) {
|
|
665
|
+
chartInstanceRef.current.on("click", onClick);
|
|
666
|
+
}
|
|
667
|
+
}, [option, settings, theme]);
|
|
668
|
+
useEffect4(() => {
|
|
669
|
+
if (chartInstanceRef.current) {
|
|
670
|
+
chartInstanceRef.current.resize();
|
|
671
|
+
}
|
|
672
|
+
}, [resizeKey]);
|
|
673
|
+
useEffect4(() => {
|
|
674
|
+
if (chartInstanceRef.current) {
|
|
675
|
+
setTimeout(() => {
|
|
676
|
+
var _a;
|
|
677
|
+
(_a = chartInstanceRef.current) == null ? void 0 : _a.resize();
|
|
678
|
+
}, 500);
|
|
679
|
+
}
|
|
680
|
+
}, []);
|
|
681
|
+
return /* @__PURE__ */ React.createElement(
|
|
682
|
+
"div",
|
|
683
|
+
__spreadProps(__spreadValues({
|
|
684
|
+
ref: chartRef
|
|
685
|
+
}, parentDivProps), {
|
|
686
|
+
style: __spreadValues({ width: "100%", height: "100%" }, style)
|
|
687
|
+
})
|
|
688
|
+
);
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
// src/components/file-input/index.tsx
|
|
692
|
+
import React15, { useRef as useRef2 } from "react";
|
|
693
|
+
import { Upload } from "lucide-react";
|
|
694
|
+
|
|
695
|
+
// src/shadcn/ui/input.tsx
|
|
696
|
+
import * as React14 from "react";
|
|
697
|
+
|
|
698
|
+
// src/shadcn/ui/form.tsx
|
|
699
|
+
import * as React17 from "react";
|
|
700
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
701
|
+
import {
|
|
702
|
+
Controller,
|
|
703
|
+
FormProvider,
|
|
704
|
+
useFormContext,
|
|
705
|
+
useFormState
|
|
706
|
+
} from "react-hook-form";
|
|
707
|
+
|
|
708
|
+
// src/shadcn/ui/label.tsx
|
|
709
|
+
import * as React16 from "react";
|
|
710
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
711
|
+
|
|
712
|
+
// src/shadcn/ui/form.tsx
|
|
713
|
+
var FormFieldContext = React17.createContext(
|
|
714
|
+
{}
|
|
715
|
+
);
|
|
716
|
+
var FormItemContext = React17.createContext(
|
|
717
|
+
{}
|
|
718
|
+
);
|
|
719
|
+
|
|
720
|
+
// src/components/form-fields/combobox-input/index.tsx
|
|
721
|
+
import React18 from "react";
|
|
722
|
+
|
|
723
|
+
// src/shadcn/lib/utils.ts
|
|
724
|
+
import { clsx as clsx2 } from "clsx";
|
|
725
|
+
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
726
|
+
function cn2(...inputs) {
|
|
727
|
+
return twMerge2(clsx2(inputs));
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
// src/components/form-fields/combobox-input/index.tsx
|
|
731
|
+
import { Check as Check2, ChevronsUpDown as ChevronsUpDown2 } from "lucide-react";
|
|
732
|
+
|
|
733
|
+
// src/components/form-fields/combobox-input-value/index.tsx
|
|
734
|
+
import React19 from "react";
|
|
735
|
+
import { useController } from "react-hook-form";
|
|
736
|
+
import { Check as Check3, ChevronsUpDown as ChevronsUpDown3 } from "lucide-react";
|
|
737
|
+
|
|
738
|
+
// src/components/form-fields/date-input/index.tsx
|
|
739
|
+
import React21 from "react";
|
|
740
|
+
import { format } from "date-fns";
|
|
741
|
+
import { CalendarIcon } from "lucide-react";
|
|
742
|
+
|
|
743
|
+
// src/shadcn/ui/calendar.tsx
|
|
744
|
+
import * as React20 from "react";
|
|
745
|
+
import {
|
|
746
|
+
ChevronDownIcon,
|
|
747
|
+
ChevronLeftIcon,
|
|
748
|
+
ChevronRightIcon as ChevronRightIcon2
|
|
749
|
+
} from "lucide-react";
|
|
750
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
751
|
+
|
|
752
|
+
// src/components/form-fields/file-input/index.tsx
|
|
753
|
+
import React22 from "react";
|
|
754
|
+
|
|
755
|
+
// src/components/form-fields/input/index.tsx
|
|
756
|
+
import React23 from "react";
|
|
757
|
+
|
|
758
|
+
// src/components/form-fields/multi-combobox-input/index.tsx
|
|
759
|
+
import React25, { useState as useState5, useEffect as useEffect6, useRef as useRef4, useCallback } from "react";
|
|
760
|
+
import { ChevronsUpDown as ChevronsUpDown4, X } from "lucide-react";
|
|
761
|
+
|
|
762
|
+
// src/shadcn/ui/checkbox.tsx
|
|
763
|
+
import * as React24 from "react";
|
|
764
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
765
|
+
import { CheckIcon as CheckIcon2 } from "lucide-react";
|
|
766
|
+
|
|
767
|
+
// src/components/form-fields/otp-input/index.tsx
|
|
768
|
+
import React27 from "react";
|
|
769
|
+
|
|
770
|
+
// src/shadcn/ui/input-otp.tsx
|
|
771
|
+
import * as React26 from "react";
|
|
772
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
773
|
+
import { Minus } from "lucide-react";
|
|
774
|
+
var InputOTP = React26.forwardRef((_a, ref) => {
|
|
775
|
+
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
776
|
+
return /* @__PURE__ */ React26.createElement(
|
|
777
|
+
OTPInput,
|
|
778
|
+
__spreadValues({
|
|
779
|
+
ref,
|
|
780
|
+
containerClassName: cn2(
|
|
781
|
+
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
782
|
+
containerClassName
|
|
783
|
+
),
|
|
784
|
+
className: cn2("disabled:cursor-not-allowed", className)
|
|
785
|
+
}, props)
|
|
786
|
+
);
|
|
787
|
+
});
|
|
788
|
+
InputOTP.displayName = "InputOTP";
|
|
789
|
+
var InputOTPGroup = React26.forwardRef((_a, ref) => {
|
|
790
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
791
|
+
return /* @__PURE__ */ React26.createElement("div", __spreadValues({ ref, className: cn2("flex items-center", className) }, props));
|
|
792
|
+
});
|
|
793
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
794
|
+
var InputOTPSlot = React26.forwardRef((_a, ref) => {
|
|
795
|
+
var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
|
|
796
|
+
const inputOTPContext = React26.useContext(OTPInputContext);
|
|
797
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
798
|
+
return /* @__PURE__ */ React26.createElement(
|
|
799
|
+
"div",
|
|
800
|
+
__spreadValues({
|
|
801
|
+
ref,
|
|
802
|
+
className: cn2(
|
|
803
|
+
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
804
|
+
isActive && "z-10 ring-1 ring-ring",
|
|
805
|
+
className
|
|
806
|
+
)
|
|
807
|
+
}, props),
|
|
808
|
+
char,
|
|
809
|
+
hasFakeCaret && /* @__PURE__ */ React26.createElement("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React26.createElement("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }))
|
|
810
|
+
);
|
|
811
|
+
});
|
|
812
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
813
|
+
var InputOTPSeparator = React26.forwardRef((_a, ref) => {
|
|
814
|
+
var props = __objRest(_a, []);
|
|
815
|
+
return /* @__PURE__ */ React26.createElement("div", __spreadValues({ ref, role: "separator" }, props), /* @__PURE__ */ React26.createElement(Minus, null));
|
|
816
|
+
});
|
|
817
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
818
|
+
|
|
819
|
+
// src/components/form-fields/phone-input/index.tsx
|
|
820
|
+
import React28 from "react";
|
|
821
|
+
|
|
822
|
+
// src/components/form-fields/textarea/index.tsx
|
|
823
|
+
import React30 from "react";
|
|
824
|
+
|
|
825
|
+
// src/shadcn/ui/textarea.tsx
|
|
826
|
+
import * as React29 from "react";
|
|
827
|
+
|
|
828
|
+
// src/components/glowing-effect/index.tsx
|
|
829
|
+
import { memo, useCallback as useCallback2, useEffect as useEffect7, useRef as useRef5 } from "react";
|
|
830
|
+
import { animate } from "framer-motion";
|
|
831
|
+
var GlowingEffect = memo(
|
|
832
|
+
({
|
|
833
|
+
blur = 0,
|
|
834
|
+
inactiveZone = 0.7,
|
|
835
|
+
proximity = 0,
|
|
836
|
+
spread = 20,
|
|
837
|
+
variant = "default",
|
|
838
|
+
glow = false,
|
|
839
|
+
className,
|
|
840
|
+
movementDuration = 2,
|
|
841
|
+
borderWidth = 1,
|
|
842
|
+
disabled = true
|
|
843
|
+
}) => {
|
|
844
|
+
const containerRef = useRef5(null);
|
|
845
|
+
const lastPosition = useRef5({ x: 0, y: 0 });
|
|
846
|
+
const animationFrameRef = useRef5(0);
|
|
847
|
+
const handleMove = useCallback2(
|
|
848
|
+
(e) => {
|
|
849
|
+
if (!containerRef.current) return;
|
|
850
|
+
if (animationFrameRef.current) {
|
|
851
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
852
|
+
}
|
|
853
|
+
animationFrameRef.current = requestAnimationFrame(() => {
|
|
854
|
+
var _a, _b;
|
|
855
|
+
const element = containerRef.current;
|
|
856
|
+
if (!element) return;
|
|
857
|
+
const { left, top, width, height } = element.getBoundingClientRect();
|
|
858
|
+
const mouseX = (_a = e == null ? void 0 : e.x) != null ? _a : lastPosition.current.x;
|
|
859
|
+
const mouseY = (_b = e == null ? void 0 : e.y) != null ? _b : lastPosition.current.y;
|
|
860
|
+
if (e) {
|
|
861
|
+
lastPosition.current = { x: mouseX, y: mouseY };
|
|
862
|
+
}
|
|
863
|
+
const center = [left + width * 0.5, top + height * 0.5];
|
|
864
|
+
const distanceFromCenter = Math.hypot(
|
|
865
|
+
mouseX - center[0],
|
|
866
|
+
mouseY - center[1]
|
|
867
|
+
);
|
|
868
|
+
const inactiveRadius = 0.5 * Math.min(width, height) * inactiveZone;
|
|
869
|
+
if (distanceFromCenter < inactiveRadius) {
|
|
870
|
+
element.style.setProperty("--active", "0");
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
const isActive = mouseX > left - proximity && mouseX < left + width + proximity && mouseY > top - proximity && mouseY < top + height + proximity;
|
|
874
|
+
element.style.setProperty("--active", isActive ? "1" : "0");
|
|
875
|
+
if (!isActive) return;
|
|
876
|
+
const currentAngle = parseFloat(element.style.getPropertyValue("--start")) || 0;
|
|
877
|
+
let targetAngle = 180 * Math.atan2(mouseY - center[1], mouseX - center[0]) / Math.PI + 90;
|
|
878
|
+
const angleDiff = (targetAngle - currentAngle + 180) % 360 - 180;
|
|
879
|
+
const newAngle = currentAngle + angleDiff;
|
|
880
|
+
animate(currentAngle, newAngle, {
|
|
881
|
+
duration: movementDuration,
|
|
882
|
+
ease: [0.16, 1, 0.3, 1],
|
|
883
|
+
onUpdate: (value) => {
|
|
884
|
+
element.style.setProperty("--start", String(value));
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
});
|
|
888
|
+
},
|
|
889
|
+
[inactiveZone, proximity, movementDuration]
|
|
890
|
+
);
|
|
891
|
+
useEffect7(() => {
|
|
892
|
+
if (disabled) return;
|
|
893
|
+
const handleScroll = () => handleMove();
|
|
894
|
+
const handlePointerMove = (e) => handleMove(e);
|
|
895
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
896
|
+
document.body.addEventListener("pointermove", handlePointerMove, {
|
|
897
|
+
passive: true
|
|
898
|
+
});
|
|
899
|
+
return () => {
|
|
900
|
+
if (animationFrameRef.current) {
|
|
901
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
902
|
+
}
|
|
903
|
+
window.removeEventListener("scroll", handleScroll);
|
|
904
|
+
document.body.removeEventListener("pointermove", handlePointerMove);
|
|
905
|
+
};
|
|
906
|
+
}, [handleMove, disabled]);
|
|
907
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
908
|
+
"div",
|
|
909
|
+
{
|
|
910
|
+
className: cn(
|
|
911
|
+
"pointer-events-none absolute -inset-px hidden rounded-[inherit] border opacity-0 transition-opacity",
|
|
912
|
+
glow && "opacity-100",
|
|
913
|
+
variant === "white" && "border-white",
|
|
914
|
+
disabled && "!block"
|
|
915
|
+
)
|
|
916
|
+
}
|
|
917
|
+
), /* @__PURE__ */ React.createElement(
|
|
918
|
+
"div",
|
|
919
|
+
{
|
|
920
|
+
ref: containerRef,
|
|
921
|
+
style: {
|
|
922
|
+
"--blur": `${blur}px`,
|
|
923
|
+
"--spread": spread,
|
|
924
|
+
"--start": "0",
|
|
925
|
+
"--active": "0",
|
|
926
|
+
"--glowingeffect-border-width": `${borderWidth}px`,
|
|
927
|
+
"--repeating-conic-gradient-times": "5",
|
|
928
|
+
"--gradient": variant === "white" ? `repeating-conic-gradient(from 236.84deg at 50% 50%,var(--black),var(--black) calc(25% / var(--repeating-conic-gradient-times)))` : `linear-gradient(54.29deg, #00A5E9 22.93%, #A020F0 32.97%, #55C8FF 52.28%, #A020F0 73.13%, #071182 88.57%)`
|
|
929
|
+
},
|
|
930
|
+
className: cn(
|
|
931
|
+
"pointer-events-none absolute inset-0 rounded-[inherit] opacity-100 transition-opacity",
|
|
932
|
+
glow && "opacity-100",
|
|
933
|
+
blur > 0 && "blur-[var(--blur)] ",
|
|
934
|
+
className,
|
|
935
|
+
disabled && "!hidden"
|
|
936
|
+
)
|
|
937
|
+
},
|
|
938
|
+
/* @__PURE__ */ React.createElement(
|
|
939
|
+
"div",
|
|
940
|
+
{
|
|
941
|
+
className: cn(
|
|
942
|
+
"glow",
|
|
943
|
+
"rounded-[inherit]",
|
|
944
|
+
'after:content-[""] after:rounded-[inherit] after:absolute after:inset-[calc(-1*var(--glowingeffect-border-width))]',
|
|
945
|
+
"after:[border:var(--glowingeffect-border-width)_solid_transparent]",
|
|
946
|
+
"after:[background:var(--gradient)] after:[background-attachment:fixed]",
|
|
947
|
+
"after:opacity-[var(--active)] after:transition-opacity after:duration-300",
|
|
948
|
+
"after:[mask-clip:padding-box,border-box]",
|
|
949
|
+
"after:[mask-composite:intersect]",
|
|
950
|
+
"after:[mask-image:linear-gradient(#0000,#0000),conic-gradient(from_calc((var(--start)-var(--spread))*1deg),#00000000_0deg,#fff,#00000000_calc(var(--spread)*2deg))]"
|
|
951
|
+
)
|
|
952
|
+
}
|
|
953
|
+
)
|
|
954
|
+
));
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
GlowingEffect.displayName = "GlowingEffect";
|
|
958
|
+
|
|
959
|
+
// src/components/icon/index.tsx
|
|
960
|
+
import { DynamicIcon } from "lucide-react/dynamic";
|
|
961
|
+
|
|
962
|
+
// src/components/loading-spinner/index.tsx
|
|
963
|
+
var LoadingSpinner = (_a) => {
|
|
964
|
+
var _b = _a, {
|
|
965
|
+
size = 48,
|
|
966
|
+
className,
|
|
967
|
+
visible = true
|
|
968
|
+
} = _b, props = __objRest(_b, [
|
|
969
|
+
"size",
|
|
970
|
+
"className",
|
|
971
|
+
"visible"
|
|
972
|
+
]);
|
|
973
|
+
if (!visible) return null;
|
|
974
|
+
return /* @__PURE__ */ React.createElement("div", { className: "h-full w-full" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 flex justify-center items-center z-50" }, /* @__PURE__ */ React.createElement(
|
|
975
|
+
"svg",
|
|
976
|
+
__spreadProps(__spreadValues({
|
|
977
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
978
|
+
width: size,
|
|
979
|
+
height: size
|
|
980
|
+
}, props), {
|
|
981
|
+
viewBox: "0 0 24 24",
|
|
982
|
+
fill: "none",
|
|
983
|
+
stroke: "currentColor",
|
|
984
|
+
strokeWidth: "2",
|
|
985
|
+
strokeLinecap: "round",
|
|
986
|
+
strokeLinejoin: "round",
|
|
987
|
+
className: cn("animate-spin", className)
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ React.createElement("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
990
|
+
)));
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
// src/components/multi-combobox/index.tsx
|
|
994
|
+
import React31, { useEffect as useEffect8, useState as useState6, useRef as useRef6, useCallback as useCallback3 } from "react";
|
|
995
|
+
import { ChevronsUpDown as ChevronsUpDown5, X as X2 } from "lucide-react";
|
|
996
|
+
|
|
997
|
+
// src/components/no-data/index.tsx
|
|
998
|
+
import { CircleAlert } from "lucide-react";
|
|
999
|
+
|
|
1000
|
+
// src/shadcn/ui/progress.tsx
|
|
1001
|
+
import * as React32 from "react";
|
|
1002
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1003
|
+
function Progress(_a) {
|
|
1004
|
+
var _b = _a, {
|
|
1005
|
+
className,
|
|
1006
|
+
value = 0,
|
|
1007
|
+
indicatorColor = "var(--progress-foreground)"
|
|
1008
|
+
} = _b, props = __objRest(_b, [
|
|
1009
|
+
"className",
|
|
1010
|
+
"value",
|
|
1011
|
+
"indicatorColor"
|
|
1012
|
+
]);
|
|
1013
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1014
|
+
ProgressPrimitive.Root,
|
|
1015
|
+
__spreadValues({
|
|
1016
|
+
"data-slot": "progress",
|
|
1017
|
+
className: cn(
|
|
1018
|
+
"bg-[var(--progress-background)] relative h-2 w-full overflow-hidden rounded-full",
|
|
1019
|
+
className
|
|
1020
|
+
)
|
|
1021
|
+
}, props),
|
|
1022
|
+
/* @__PURE__ */ React32.createElement(
|
|
1023
|
+
ProgressPrimitive.Indicator,
|
|
1024
|
+
{
|
|
1025
|
+
"data-slot": "progress-indicator",
|
|
1026
|
+
className: "h-full w-full flex-1 transition-all",
|
|
1027
|
+
style: {
|
|
1028
|
+
transform: `translateX(-${100 - value}%)`,
|
|
1029
|
+
backgroundColor: indicatorColor
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
)
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
// src/components/password-strength-meter/index.tsx
|
|
1037
|
+
import React33 from "react";
|
|
1038
|
+
import zxcvbn from "zxcvbn";
|
|
1039
|
+
|
|
1040
|
+
// src/components/phone-input/index.tsx
|
|
1041
|
+
import { ChevronsUpDown as ChevronsUpDown6 } from "lucide-react";
|
|
1042
|
+
import { useState as useState8 } from "react";
|
|
1043
|
+
import { countries } from "countries-list";
|
|
1044
|
+
import * as Flags from "country-flag-icons/react/3x2";
|
|
1045
|
+
|
|
1046
|
+
// src/shadcn/ui/card.tsx
|
|
1047
|
+
import * as React34 from "react";
|
|
1048
|
+
|
|
1049
|
+
// src/shadcn/ui/select.tsx
|
|
1050
|
+
import * as React35 from "react";
|
|
1051
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1052
|
+
import { CheckIcon as CheckIcon3, ChevronDownIcon as ChevronDownIcon2, ChevronUpIcon } from "lucide-react";
|
|
1053
|
+
|
|
1054
|
+
// src/shadcn/ui/table.tsx
|
|
1055
|
+
import * as React36 from "react";
|
|
1056
|
+
|
|
1057
|
+
// src/components/resource-spreadsheet/index.tsx
|
|
1058
|
+
import { ChevronDown, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
1059
|
+
import React37 from "react";
|
|
1060
|
+
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
1061
|
+
|
|
1062
|
+
// src/components/search-input/index.tsx
|
|
1063
|
+
import { cx } from "class-variance-authority";
|
|
1064
|
+
import { Search } from "lucide-react";
|
|
1065
|
+
|
|
1066
|
+
// src/shadcn/ui/sheet.tsx
|
|
1067
|
+
import * as React38 from "react";
|
|
1068
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
1069
|
+
import { XIcon as XIcon2 } from "lucide-react";
|
|
1070
|
+
function Sheet(_a) {
|
|
1071
|
+
var props = __objRest(_a, []);
|
|
1072
|
+
return /* @__PURE__ */ React38.createElement(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
1073
|
+
}
|
|
1074
|
+
function SheetTrigger(_a) {
|
|
1075
|
+
var props = __objRest(_a, []);
|
|
1076
|
+
return /* @__PURE__ */ React38.createElement(SheetPrimitive.Trigger, __spreadValues({ "data-slot": "sheet-trigger" }, props));
|
|
1077
|
+
}
|
|
1078
|
+
function SheetPortal(_a) {
|
|
1079
|
+
var props = __objRest(_a, []);
|
|
1080
|
+
return /* @__PURE__ */ React38.createElement(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
1081
|
+
}
|
|
1082
|
+
function SheetOverlay(_a) {
|
|
1083
|
+
var _b = _a, {
|
|
1084
|
+
className
|
|
1085
|
+
} = _b, props = __objRest(_b, [
|
|
1086
|
+
"className"
|
|
1087
|
+
]);
|
|
1088
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1089
|
+
SheetPrimitive.Overlay,
|
|
1090
|
+
__spreadValues({
|
|
1091
|
+
"data-slot": "sheet-overlay",
|
|
1092
|
+
className: cn(
|
|
1093
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1094
|
+
className
|
|
1095
|
+
)
|
|
1096
|
+
}, props)
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
function SheetContent(_a) {
|
|
1100
|
+
var _b = _a, {
|
|
1101
|
+
className,
|
|
1102
|
+
children,
|
|
1103
|
+
side = "right"
|
|
1104
|
+
} = _b, props = __objRest(_b, [
|
|
1105
|
+
"className",
|
|
1106
|
+
"children",
|
|
1107
|
+
"side"
|
|
1108
|
+
]);
|
|
1109
|
+
return /* @__PURE__ */ React38.createElement(SheetPortal, null, /* @__PURE__ */ React38.createElement(SheetOverlay, null), /* @__PURE__ */ React38.createElement(
|
|
1110
|
+
SheetPrimitive.Content,
|
|
1111
|
+
__spreadValues({
|
|
1112
|
+
"data-slot": "sheet-content",
|
|
1113
|
+
className: cn(
|
|
1114
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1115
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
1116
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
1117
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
1118
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
1119
|
+
className
|
|
1120
|
+
)
|
|
1121
|
+
}, props),
|
|
1122
|
+
children,
|
|
1123
|
+
/* @__PURE__ */ React38.createElement(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none" }, /* @__PURE__ */ React38.createElement(XIcon2, { className: "size-4" }), /* @__PURE__ */ React38.createElement("span", { className: "sr-only" }, "Close"))
|
|
1124
|
+
));
|
|
1125
|
+
}
|
|
1126
|
+
function SheetHeader(_a) {
|
|
1127
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1128
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1129
|
+
"div",
|
|
1130
|
+
__spreadValues({
|
|
1131
|
+
"data-slot": "sheet-header",
|
|
1132
|
+
className: cn("flex flex-col gap-1.5 p-4", className)
|
|
1133
|
+
}, props)
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
function SheetTitle(_a) {
|
|
1137
|
+
var _b = _a, {
|
|
1138
|
+
className
|
|
1139
|
+
} = _b, props = __objRest(_b, [
|
|
1140
|
+
"className"
|
|
1141
|
+
]);
|
|
1142
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1143
|
+
SheetPrimitive.Title,
|
|
1144
|
+
__spreadValues({
|
|
1145
|
+
"data-slot": "sheet-title",
|
|
1146
|
+
className: cn("text-foreground font-semibold", className)
|
|
1147
|
+
}, props)
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1150
|
+
function SheetDescription(_a) {
|
|
1151
|
+
var _b = _a, {
|
|
1152
|
+
className
|
|
1153
|
+
} = _b, props = __objRest(_b, [
|
|
1154
|
+
"className"
|
|
1155
|
+
]);
|
|
1156
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1157
|
+
SheetPrimitive.Description,
|
|
1158
|
+
__spreadValues({
|
|
1159
|
+
"data-slot": "sheet-description",
|
|
1160
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
1161
|
+
}, props)
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
// src/components/sheet/index.tsx
|
|
1166
|
+
function SheetComponent({
|
|
1167
|
+
buttonText,
|
|
1168
|
+
buttonIcon,
|
|
1169
|
+
buttonStyle,
|
|
1170
|
+
sheetContent,
|
|
1171
|
+
sheetDescription,
|
|
1172
|
+
sheetTitle,
|
|
1173
|
+
closeButton
|
|
1174
|
+
}) {
|
|
1175
|
+
return /* @__PURE__ */ React.createElement(Sheet, null, /* @__PURE__ */ React.createElement(SheetTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(Button, { variant: "outline", className: buttonStyle, size: "smIcon" }, buttonText, buttonIcon)), /* @__PURE__ */ React.createElement(SheetContent, { className: "p-4" }, /* @__PURE__ */ React.createElement(SheetTitle, null, sheetTitle), sheetContent));
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
// src/components/simple-widget/index.tsx
|
|
1179
|
+
import { icons, LoaderCircle } from "lucide-react";
|
|
1180
|
+
|
|
1181
|
+
// src/shadcn/ui/skeleton.tsx
|
|
1182
|
+
import * as React39 from "react";
|
|
1183
|
+
function Skeleton(_a) {
|
|
1184
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1185
|
+
return /* @__PURE__ */ React39.createElement(
|
|
1186
|
+
"div",
|
|
1187
|
+
__spreadValues({
|
|
1188
|
+
"data-slot": "skeleton",
|
|
1189
|
+
className: cn("animate-pulse rounded-md", className),
|
|
1190
|
+
style: { backgroundColor: "var(--keross-skeleton-bg)" }
|
|
1191
|
+
}, props)
|
|
1192
|
+
);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
// src/components/skeleton-loader/skeleton-widget.tsx
|
|
1196
|
+
function SkeletonWidget({ count }) {
|
|
1197
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-row gap-3 w-full" }, count > 0 && Array.from({ length: count }).map((_, index) => /* @__PURE__ */ React.createElement(Skeleton, { key: "widget_" + index, className: "w-1/" + count + " flex flex-col md:flex-row gap-2 h-20" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-1 flex-row justify-between border rounded-md p-2 bg-card-new" }))));
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// src/components/tabs/index.tsx
|
|
1201
|
+
import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
1202
|
+
|
|
1203
|
+
// src/shadcn/ui/tabs.tsx
|
|
1204
|
+
import * as React40 from "react";
|
|
1205
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
1206
|
+
|
|
1207
|
+
// src/components/tabs/index.tsx
|
|
1208
|
+
import { EllipsisVertical } from "lucide-react";
|
|
1209
|
+
|
|
1210
|
+
// src/components/title-progress/index.tsx
|
|
1211
|
+
import * as React41 from "react";
|
|
1212
|
+
function TitleProgress({ title, value, valueText, isPercent = true, className, titleClassName, valueClassName, progressClassName }) {
|
|
1213
|
+
let finalValue = value.toFixed(2);
|
|
1214
|
+
const parts = finalValue.split(".");
|
|
1215
|
+
if (parts[1] === "00") {
|
|
1216
|
+
finalValue = parts[0];
|
|
1217
|
+
}
|
|
1218
|
+
return /* @__PURE__ */ React41.createElement("div", { className: "w-full " + (className != null ? className : "") }, /* @__PURE__ */ React41.createElement("div", { className: "flex items-center justify-between gap-4" }, /* @__PURE__ */ React41.createElement("div", { className: "text-muted-foreground text-sm " + (titleClassName != null ? titleClassName : "") }, title), /* @__PURE__ */ React41.createElement("div", { className: "text-sm " + (valueClassName != null ? valueClassName : "") }, valueText != null ? valueText : `${finalValue}${isPercent ? "%" : ""}`)), /* @__PURE__ */ React41.createElement(
|
|
1219
|
+
Progress,
|
|
1220
|
+
{
|
|
1221
|
+
value,
|
|
1222
|
+
className: "w-full mt-2 " + (progressClassName != null ? progressClassName : "")
|
|
1223
|
+
}
|
|
1224
|
+
));
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
// src/components/twolevel-dropdown/index.tsx
|
|
1228
|
+
import * as React42 from "react";
|
|
1229
|
+
import { ChevronsUpDown as ChevronsUpDown7 } from "lucide-react";
|
|
1230
|
+
function FrameworkItemDropdown({
|
|
1231
|
+
processedData,
|
|
1232
|
+
value,
|
|
1233
|
+
onChange,
|
|
1234
|
+
placeholder = "Select items...",
|
|
1235
|
+
searchPlaceholder = "Search...",
|
|
1236
|
+
className
|
|
1237
|
+
}) {
|
|
1238
|
+
const [open, setOpen] = React42.useState(false);
|
|
1239
|
+
const [searchQuery, setSearchQuery] = React42.useState("");
|
|
1240
|
+
const { flatTree, itemMap } = processedData;
|
|
1241
|
+
const selectionState = React42.useMemo(() => {
|
|
1242
|
+
const state = /* @__PURE__ */ new Map();
|
|
1243
|
+
const selectedSet = new Set(value);
|
|
1244
|
+
[...flatTree].reverse().forEach((item) => {
|
|
1245
|
+
const nodeInfo = itemMap[item.id];
|
|
1246
|
+
if (!nodeInfo || !item.treatAsParent || nodeInfo.childrenIds.length === 0) {
|
|
1247
|
+
if (selectedSet.has(item.id)) {
|
|
1248
|
+
state.set(item.id, "checked");
|
|
1249
|
+
}
|
|
1250
|
+
} else {
|
|
1251
|
+
const childStates = nodeInfo.childrenIds.map(
|
|
1252
|
+
(childId) => state.get(childId)
|
|
1253
|
+
);
|
|
1254
|
+
const checkedCount = childStates.filter((s) => s === "checked").length;
|
|
1255
|
+
const indeterminateCount = childStates.filter(
|
|
1256
|
+
(s) => s === "indeterminate"
|
|
1257
|
+
).length;
|
|
1258
|
+
if (checkedCount === nodeInfo.childrenIds.length) {
|
|
1259
|
+
state.set(item.id, "checked");
|
|
1260
|
+
} else if (checkedCount > 0 || indeterminateCount > 0) {
|
|
1261
|
+
state.set(item.id, "indeterminate");
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
});
|
|
1265
|
+
return state;
|
|
1266
|
+
}, [value, flatTree, itemMap]);
|
|
1267
|
+
const handleSelect = (item) => {
|
|
1268
|
+
var _a, _b, _c;
|
|
1269
|
+
const newSelectedIds = new Set(value);
|
|
1270
|
+
const currentState = selectionState.get(item.id);
|
|
1271
|
+
const shouldBeChecked = !(currentState === "checked" || currentState === "indeterminate");
|
|
1272
|
+
const descendants = /* @__PURE__ */ new Set();
|
|
1273
|
+
const queue = [...((_a = itemMap[item.id]) == null ? void 0 : _a.childrenIds) || []];
|
|
1274
|
+
while (queue.length > 0) {
|
|
1275
|
+
const currentId = queue.shift();
|
|
1276
|
+
descendants.add(currentId);
|
|
1277
|
+
const children = ((_b = itemMap[currentId]) == null ? void 0 : _b.childrenIds) || [];
|
|
1278
|
+
children.forEach((childId) => queue.push(childId));
|
|
1279
|
+
}
|
|
1280
|
+
if (shouldBeChecked) {
|
|
1281
|
+
newSelectedIds.add(item.id);
|
|
1282
|
+
descendants.forEach((id) => newSelectedIds.add(id));
|
|
1283
|
+
} else {
|
|
1284
|
+
newSelectedIds.delete(item.id);
|
|
1285
|
+
descendants.forEach((id) => newSelectedIds.delete(id));
|
|
1286
|
+
}
|
|
1287
|
+
let parentId = (_c = itemMap[item.id]) == null ? void 0 : _c.parentId;
|
|
1288
|
+
while (parentId) {
|
|
1289
|
+
const parentInfo = itemMap[parentId];
|
|
1290
|
+
if (parentInfo && parentInfo.childrenIds.length > 0) {
|
|
1291
|
+
const areAllChildrenSelected = parentInfo.childrenIds.every(
|
|
1292
|
+
(childId) => newSelectedIds.has(childId)
|
|
1293
|
+
);
|
|
1294
|
+
if (areAllChildrenSelected) {
|
|
1295
|
+
newSelectedIds.add(parentId);
|
|
1296
|
+
} else {
|
|
1297
|
+
newSelectedIds.delete(parentId);
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
parentId = parentInfo == null ? void 0 : parentInfo.parentId;
|
|
1301
|
+
}
|
|
1302
|
+
onChange(Array.from(newSelectedIds));
|
|
1303
|
+
};
|
|
1304
|
+
const filteredItems = React42.useMemo(() => {
|
|
1305
|
+
if (!searchQuery) return flatTree.slice();
|
|
1306
|
+
const lowercasedQuery = searchQuery.toLowerCase();
|
|
1307
|
+
const matchedIds = /* @__PURE__ */ new Set();
|
|
1308
|
+
flatTree.forEach((item) => {
|
|
1309
|
+
const matches = item.title.toLowerCase().includes(lowercasedQuery) || item.description.toLowerCase().includes(lowercasedQuery) || item.index.toLowerCase().includes(lowercasedQuery);
|
|
1310
|
+
if (matches) {
|
|
1311
|
+
matchedIds.add(item.id);
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
const expandedIds = new Set(matchedIds);
|
|
1315
|
+
const addAncestors = (id) => {
|
|
1316
|
+
var _a;
|
|
1317
|
+
let current = id;
|
|
1318
|
+
while (current) {
|
|
1319
|
+
const parentId = (_a = itemMap[current]) == null ? void 0 : _a.parentId;
|
|
1320
|
+
if (parentId && !expandedIds.has(parentId)) {
|
|
1321
|
+
expandedIds.add(parentId);
|
|
1322
|
+
current = parentId;
|
|
1323
|
+
} else {
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
const addDescendants = (id) => {
|
|
1329
|
+
var _a;
|
|
1330
|
+
const children = ((_a = itemMap[id]) == null ? void 0 : _a.childrenIds) || [];
|
|
1331
|
+
for (const childId of children) {
|
|
1332
|
+
if (!expandedIds.has(childId)) {
|
|
1333
|
+
expandedIds.add(childId);
|
|
1334
|
+
addDescendants(childId);
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
matchedIds.forEach((id) => {
|
|
1339
|
+
addAncestors(id);
|
|
1340
|
+
addDescendants(id);
|
|
1341
|
+
});
|
|
1342
|
+
return flatTree.filter((node) => expandedIds.has(node.id));
|
|
1343
|
+
}, [searchQuery, flatTree, itemMap]);
|
|
1344
|
+
const getSelectedLabel = () => {
|
|
1345
|
+
const leafNodeIds = value.filter((id) => {
|
|
1346
|
+
const nodeInfo = itemMap[id];
|
|
1347
|
+
return !nodeInfo || nodeInfo.childrenIds.length === 0;
|
|
1348
|
+
});
|
|
1349
|
+
if (leafNodeIds.length === 0) {
|
|
1350
|
+
return /* @__PURE__ */ React42.createElement("span", { className: "text-muted-foreground" }, placeholder);
|
|
1351
|
+
}
|
|
1352
|
+
if (leafNodeIds.length === 1) {
|
|
1353
|
+
const item = flatTree.find((i) => i.id === leafNodeIds[0]);
|
|
1354
|
+
return item ? item.index : placeholder;
|
|
1355
|
+
}
|
|
1356
|
+
return `${leafNodeIds.length} items selected`;
|
|
1357
|
+
};
|
|
1358
|
+
return /* @__PURE__ */ React42.createElement(Popover, { open, onOpenChange: setOpen }, /* @__PURE__ */ React42.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React42.createElement(
|
|
1359
|
+
Button,
|
|
1360
|
+
{
|
|
1361
|
+
variant: "outline",
|
|
1362
|
+
role: "combobox",
|
|
1363
|
+
"aria-expanded": open,
|
|
1364
|
+
className: cn(
|
|
1365
|
+
"w-full justify-between transition-all duration-150 ease-in-out border hover:border-primary hover:shadow-sm bg-secondary cursor-pointer",
|
|
1366
|
+
className
|
|
1367
|
+
)
|
|
1368
|
+
},
|
|
1369
|
+
/* @__PURE__ */ React42.createElement("span", { className: "truncate" }, getSelectedLabel()),
|
|
1370
|
+
/* @__PURE__ */ React42.createElement(
|
|
1371
|
+
ChevronsUpDown7,
|
|
1372
|
+
{
|
|
1373
|
+
className: cn(
|
|
1374
|
+
"ml-2 h-4 w-4 shrink-0 transition-transform duration-200",
|
|
1375
|
+
open && "rotate-180"
|
|
1376
|
+
)
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
)), /* @__PURE__ */ React42.createElement(PopoverContent, { className: "w-[--radix-popover-trigger-width] p-0 max-h-[400px] overflow-y-auto" }, /* @__PURE__ */ React42.createElement(Command, null, /* @__PURE__ */ React42.createElement(
|
|
1380
|
+
CommandInput,
|
|
1381
|
+
{
|
|
1382
|
+
placeholder: searchPlaceholder,
|
|
1383
|
+
value: searchQuery,
|
|
1384
|
+
onValueChange: setSearchQuery
|
|
1385
|
+
}
|
|
1386
|
+
), /* @__PURE__ */ React42.createElement(CommandList, { className: "transition-all duration-200 ease-in-out" }, /* @__PURE__ */ React42.createElement(CommandEmpty, null, "No results found."), filteredItems.map((item) => /* @__PURE__ */ React42.createElement(
|
|
1387
|
+
CommandItem,
|
|
1388
|
+
{
|
|
1389
|
+
key: item.id,
|
|
1390
|
+
value: `${item.index} ${item.title} ${item.description}`,
|
|
1391
|
+
onSelect: () => handleSelect(item),
|
|
1392
|
+
className: "flex items-start cursor-pointer gap-2",
|
|
1393
|
+
style: { paddingLeft: `${item.level * 1.5 + 0.75}rem` }
|
|
1394
|
+
},
|
|
1395
|
+
/* @__PURE__ */ React42.createElement(
|
|
1396
|
+
"input",
|
|
1397
|
+
{
|
|
1398
|
+
type: "checkbox",
|
|
1399
|
+
className: "mt-1 h-4 w-4 accent-primary border rounded",
|
|
1400
|
+
checked: selectionState.get(item.id) === "checked",
|
|
1401
|
+
ref: (el) => {
|
|
1402
|
+
if (el) {
|
|
1403
|
+
el.indeterminate = selectionState.get(item.id) === "indeterminate";
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
readOnly: true
|
|
1407
|
+
}
|
|
1408
|
+
),
|
|
1409
|
+
/* @__PURE__ */ React42.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React42.createElement("div", { className: "flex items-center space-x-2" }, /* @__PURE__ */ React42.createElement("span", { className: "text-xs font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded" }, item.index), /* @__PURE__ */ React42.createElement("span", { className: "font-medium" }, item.title)), /* @__PURE__ */ React42.createElement("p", { className: "text-sm text-muted-foreground" }, item.description))
|
|
1410
|
+
))))));
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
// src/components/app-sidebar.tsx
|
|
1414
|
+
import * as React45 from "react";
|
|
1415
|
+
import { Bot, Eye, Settings, SquarePenIcon, UserRoundCog } from "lucide-react";
|
|
1416
|
+
|
|
1417
|
+
// src/components/nav-main.tsx
|
|
1418
|
+
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
1419
|
+
|
|
1420
|
+
// src/shadcn/ui/sidebar.tsx
|
|
1421
|
+
import * as React44 from "react";
|
|
1422
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
1423
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
1424
|
+
import { PanelLeftIcon } from "lucide-react";
|
|
1425
|
+
|
|
1426
|
+
// src/shadcn/ui/separator.tsx
|
|
1427
|
+
import * as React43 from "react";
|
|
1428
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1429
|
+
|
|
1430
|
+
// src/shadcn/ui/sidebar.tsx
|
|
1431
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1432
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1433
|
+
var SidebarContext = React44.createContext(null);
|
|
1434
|
+
function useSidebar() {
|
|
1435
|
+
const context = React44.useContext(SidebarContext);
|
|
1436
|
+
if (!context) {
|
|
1437
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1438
|
+
}
|
|
1439
|
+
return context;
|
|
1440
|
+
}
|
|
1441
|
+
function Sidebar(_a) {
|
|
1442
|
+
var _b = _a, {
|
|
1443
|
+
side = "left",
|
|
1444
|
+
variant = "sidebar",
|
|
1445
|
+
collapsible = "offcanvas",
|
|
1446
|
+
className,
|
|
1447
|
+
children
|
|
1448
|
+
} = _b, props = __objRest(_b, [
|
|
1449
|
+
"side",
|
|
1450
|
+
"variant",
|
|
1451
|
+
"collapsible",
|
|
1452
|
+
"className",
|
|
1453
|
+
"children"
|
|
1454
|
+
]);
|
|
1455
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1456
|
+
if (collapsible === "none") {
|
|
1457
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1458
|
+
"div",
|
|
1459
|
+
__spreadValues({
|
|
1460
|
+
"data-slot": "sidebar",
|
|
1461
|
+
className: cn(
|
|
1462
|
+
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
1463
|
+
className
|
|
1464
|
+
)
|
|
1465
|
+
}, props),
|
|
1466
|
+
children
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
if (isMobile) {
|
|
1470
|
+
return /* @__PURE__ */ React44.createElement(Sheet, __spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), /* @__PURE__ */ React44.createElement(
|
|
1471
|
+
SheetContent,
|
|
1472
|
+
{
|
|
1473
|
+
"data-sidebar": "sidebar",
|
|
1474
|
+
"data-slot": "sidebar",
|
|
1475
|
+
"data-mobile": "true",
|
|
1476
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
1477
|
+
style: {
|
|
1478
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1479
|
+
},
|
|
1480
|
+
side
|
|
1481
|
+
},
|
|
1482
|
+
/* @__PURE__ */ React44.createElement(SheetHeader, { className: "sr-only" }, /* @__PURE__ */ React44.createElement(SheetTitle, null, "Sidebar"), /* @__PURE__ */ React44.createElement(SheetDescription, null, "Displays the mobile sidebar.")),
|
|
1483
|
+
/* @__PURE__ */ React44.createElement("div", { className: "flex h-full w-full flex-col" }, children)
|
|
1484
|
+
));
|
|
1485
|
+
}
|
|
1486
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1487
|
+
"div",
|
|
1488
|
+
{
|
|
1489
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
1490
|
+
"data-state": state,
|
|
1491
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1492
|
+
"data-variant": variant,
|
|
1493
|
+
"data-side": side,
|
|
1494
|
+
"data-slot": "sidebar"
|
|
1495
|
+
},
|
|
1496
|
+
/* @__PURE__ */ React44.createElement(
|
|
1497
|
+
"div",
|
|
1498
|
+
{
|
|
1499
|
+
"data-slot": "sidebar-gap",
|
|
1500
|
+
className: cn(
|
|
1501
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
1502
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
1503
|
+
"group-data-[side=right]:rotate-180",
|
|
1504
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
1505
|
+
)
|
|
1506
|
+
}
|
|
1507
|
+
),
|
|
1508
|
+
/* @__PURE__ */ React44.createElement(
|
|
1509
|
+
"div",
|
|
1510
|
+
__spreadValues({
|
|
1511
|
+
"data-slot": "sidebar-container",
|
|
1512
|
+
className: cn(
|
|
1513
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
1514
|
+
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)]",
|
|
1515
|
+
// Adjust the padding for floating and inset variants.
|
|
1516
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
1517
|
+
className
|
|
1518
|
+
)
|
|
1519
|
+
}, props),
|
|
1520
|
+
/* @__PURE__ */ React44.createElement(
|
|
1521
|
+
"div",
|
|
1522
|
+
{
|
|
1523
|
+
"data-sidebar": "sidebar",
|
|
1524
|
+
"data-slot": "sidebar-inner",
|
|
1525
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
|
1526
|
+
},
|
|
1527
|
+
children
|
|
1528
|
+
)
|
|
1529
|
+
)
|
|
1530
|
+
);
|
|
1531
|
+
}
|
|
1532
|
+
function SidebarRail(_a) {
|
|
1533
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1534
|
+
const { toggleSidebar } = useSidebar();
|
|
1535
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1536
|
+
"button",
|
|
1537
|
+
__spreadValues({
|
|
1538
|
+
"data-sidebar": "rail",
|
|
1539
|
+
"data-slot": "sidebar-rail",
|
|
1540
|
+
"aria-label": "Toggle Sidebar",
|
|
1541
|
+
tabIndex: -1,
|
|
1542
|
+
onClick: toggleSidebar,
|
|
1543
|
+
title: "Toggle Sidebar",
|
|
1544
|
+
className: cn(
|
|
1545
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
1546
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
1547
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1548
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
1549
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1550
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1551
|
+
className
|
|
1552
|
+
)
|
|
1553
|
+
}, props)
|
|
1554
|
+
);
|
|
1555
|
+
}
|
|
1556
|
+
function SidebarHeader(_a) {
|
|
1557
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1558
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1559
|
+
"div",
|
|
1560
|
+
__spreadValues({
|
|
1561
|
+
"data-slot": "sidebar-header",
|
|
1562
|
+
"data-sidebar": "header",
|
|
1563
|
+
className: cn("flex flex-col gap-2 p-2", className)
|
|
1564
|
+
}, props)
|
|
1565
|
+
);
|
|
1566
|
+
}
|
|
1567
|
+
function SidebarFooter(_a) {
|
|
1568
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1569
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1570
|
+
"div",
|
|
1571
|
+
__spreadValues({
|
|
1572
|
+
"data-slot": "sidebar-footer",
|
|
1573
|
+
"data-sidebar": "footer",
|
|
1574
|
+
className: cn("flex flex-col gap-2 p-2", className)
|
|
1575
|
+
}, props)
|
|
1576
|
+
);
|
|
1577
|
+
}
|
|
1578
|
+
function SidebarContent(_a) {
|
|
1579
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1580
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1581
|
+
"div",
|
|
1582
|
+
__spreadValues({
|
|
1583
|
+
"data-slot": "sidebar-content",
|
|
1584
|
+
"data-sidebar": "content",
|
|
1585
|
+
className: cn(
|
|
1586
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
1587
|
+
className
|
|
1588
|
+
)
|
|
1589
|
+
}, props)
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
function SidebarGroup(_a) {
|
|
1593
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1594
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1595
|
+
"div",
|
|
1596
|
+
__spreadValues({
|
|
1597
|
+
"data-slot": "sidebar-group",
|
|
1598
|
+
"data-sidebar": "group",
|
|
1599
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className)
|
|
1600
|
+
}, props)
|
|
1601
|
+
);
|
|
1602
|
+
}
|
|
1603
|
+
function SidebarMenu(_a) {
|
|
1604
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1605
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1606
|
+
"ul",
|
|
1607
|
+
__spreadValues({
|
|
1608
|
+
"data-slot": "sidebar-menu",
|
|
1609
|
+
"data-sidebar": "menu",
|
|
1610
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className)
|
|
1611
|
+
}, props)
|
|
1612
|
+
);
|
|
1613
|
+
}
|
|
1614
|
+
function SidebarMenuItem(_a) {
|
|
1615
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1616
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1617
|
+
"li",
|
|
1618
|
+
__spreadValues({
|
|
1619
|
+
"data-slot": "sidebar-menu-item",
|
|
1620
|
+
"data-sidebar": "menu-item",
|
|
1621
|
+
className: cn("group/menu-item relative", className)
|
|
1622
|
+
}, props)
|
|
1623
|
+
);
|
|
1624
|
+
}
|
|
1625
|
+
var sidebarMenuButtonVariants = cva2(
|
|
1626
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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",
|
|
1627
|
+
{
|
|
1628
|
+
variants: {
|
|
1629
|
+
variant: {
|
|
1630
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1631
|
+
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))]"
|
|
1632
|
+
},
|
|
1633
|
+
size: {
|
|
1634
|
+
default: "h-8 text-sm",
|
|
1635
|
+
sm: "h-7 text-xs",
|
|
1636
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
defaultVariants: {
|
|
1640
|
+
variant: "default",
|
|
1641
|
+
size: "default"
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1645
|
+
function SidebarMenuButton(_a) {
|
|
1646
|
+
var _b = _a, {
|
|
1647
|
+
asChild = false,
|
|
1648
|
+
isActive = false,
|
|
1649
|
+
variant = "default",
|
|
1650
|
+
size = "default",
|
|
1651
|
+
tooltip,
|
|
1652
|
+
className
|
|
1653
|
+
} = _b, props = __objRest(_b, [
|
|
1654
|
+
"asChild",
|
|
1655
|
+
"isActive",
|
|
1656
|
+
"variant",
|
|
1657
|
+
"size",
|
|
1658
|
+
"tooltip",
|
|
1659
|
+
"className"
|
|
1660
|
+
]);
|
|
1661
|
+
const Comp = asChild ? Slot4 : "button";
|
|
1662
|
+
const { isMobile, state } = useSidebar();
|
|
1663
|
+
const button = /* @__PURE__ */ React44.createElement(
|
|
1664
|
+
Comp,
|
|
1665
|
+
__spreadValues({
|
|
1666
|
+
"data-slot": "sidebar-menu-button",
|
|
1667
|
+
"data-sidebar": "menu-button",
|
|
1668
|
+
"data-size": size,
|
|
1669
|
+
"data-active": isActive,
|
|
1670
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className)
|
|
1671
|
+
}, props)
|
|
1672
|
+
);
|
|
1673
|
+
if (!tooltip) {
|
|
1674
|
+
return button;
|
|
1675
|
+
}
|
|
1676
|
+
if (typeof tooltip === "string") {
|
|
1677
|
+
tooltip = {
|
|
1678
|
+
children: tooltip
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
return /* @__PURE__ */ React44.createElement(Tooltip, null, /* @__PURE__ */ React44.createElement(TooltipTrigger, { asChild: true }, button), /* @__PURE__ */ React44.createElement(
|
|
1682
|
+
TooltipContent,
|
|
1683
|
+
__spreadValues({
|
|
1684
|
+
side: "right",
|
|
1685
|
+
align: "center",
|
|
1686
|
+
hidden: state !== "collapsed" || isMobile
|
|
1687
|
+
}, tooltip)
|
|
1688
|
+
));
|
|
1689
|
+
}
|
|
1690
|
+
function SidebarMenuSub(_a) {
|
|
1691
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1692
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1693
|
+
"ul",
|
|
1694
|
+
__spreadValues({
|
|
1695
|
+
"data-slot": "sidebar-menu-sub",
|
|
1696
|
+
"data-sidebar": "menu-sub",
|
|
1697
|
+
className: cn(
|
|
1698
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
1699
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1700
|
+
className
|
|
1701
|
+
)
|
|
1702
|
+
}, props)
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
function SidebarMenuSubItem(_a) {
|
|
1706
|
+
var _b = _a, {
|
|
1707
|
+
className
|
|
1708
|
+
} = _b, props = __objRest(_b, [
|
|
1709
|
+
"className"
|
|
1710
|
+
]);
|
|
1711
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1712
|
+
"li",
|
|
1713
|
+
__spreadValues({
|
|
1714
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
1715
|
+
"data-sidebar": "menu-sub-item",
|
|
1716
|
+
className: cn("group/menu-sub-item relative", className)
|
|
1717
|
+
}, props)
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
function SidebarMenuSubButton(_a) {
|
|
1721
|
+
var _b = _a, {
|
|
1722
|
+
asChild = false,
|
|
1723
|
+
size = "md",
|
|
1724
|
+
isActive = false,
|
|
1725
|
+
className
|
|
1726
|
+
} = _b, props = __objRest(_b, [
|
|
1727
|
+
"asChild",
|
|
1728
|
+
"size",
|
|
1729
|
+
"isActive",
|
|
1730
|
+
"className"
|
|
1731
|
+
]);
|
|
1732
|
+
const Comp = asChild ? Slot4 : "a";
|
|
1733
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1734
|
+
Comp,
|
|
1735
|
+
__spreadValues({
|
|
1736
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
1737
|
+
"data-sidebar": "menu-sub-button",
|
|
1738
|
+
"data-size": size,
|
|
1739
|
+
"data-active": isActive,
|
|
1740
|
+
className: cn(
|
|
1741
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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",
|
|
1742
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
1743
|
+
size === "sm" && "text-xs",
|
|
1744
|
+
size === "md" && "text-sm",
|
|
1745
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1746
|
+
className
|
|
1747
|
+
)
|
|
1748
|
+
}, props)
|
|
1749
|
+
);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
// src/shadcn/ui/collapsible.tsx
|
|
1753
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1754
|
+
function Collapsible(_a) {
|
|
1755
|
+
var props = __objRest(_a, []);
|
|
1756
|
+
return /* @__PURE__ */ React.createElement(CollapsiblePrimitive.Root, __spreadValues({ "data-slot": "collapsible" }, props));
|
|
1757
|
+
}
|
|
1758
|
+
function CollapsibleTrigger2(_a) {
|
|
1759
|
+
var props = __objRest(_a, []);
|
|
1760
|
+
return /* @__PURE__ */ React.createElement(
|
|
1761
|
+
CollapsiblePrimitive.CollapsibleTrigger,
|
|
1762
|
+
__spreadValues({
|
|
1763
|
+
"data-slot": "collapsible-trigger"
|
|
1764
|
+
}, props)
|
|
1765
|
+
);
|
|
1766
|
+
}
|
|
1767
|
+
function CollapsibleContent2(_a) {
|
|
1768
|
+
var props = __objRest(_a, []);
|
|
1769
|
+
return /* @__PURE__ */ React.createElement(
|
|
1770
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
1771
|
+
__spreadValues({
|
|
1772
|
+
"data-slot": "collapsible-content"
|
|
1773
|
+
}, props)
|
|
1774
|
+
);
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
// src/components/nav-main.tsx
|
|
1778
|
+
function NavMain({
|
|
1779
|
+
items
|
|
1780
|
+
}) {
|
|
1781
|
+
return /* @__PURE__ */ React.createElement(SidebarGroup, null, /* @__PURE__ */ React.createElement(SidebarMenu, null, items.map(
|
|
1782
|
+
(item) => {
|
|
1783
|
+
var _a;
|
|
1784
|
+
return ((_a = item.items) == null ? void 0 : _a.length) ? (
|
|
1785
|
+
// Render items with submenus using Collapsible
|
|
1786
|
+
/* @__PURE__ */ React.createElement(
|
|
1787
|
+
Collapsible,
|
|
1788
|
+
{
|
|
1789
|
+
key: item.title,
|
|
1790
|
+
asChild: true,
|
|
1791
|
+
defaultOpen: item.isActive,
|
|
1792
|
+
className: "group/collapsible"
|
|
1793
|
+
},
|
|
1794
|
+
/* @__PURE__ */ React.createElement(SidebarMenuItem, null, /* @__PURE__ */ React.createElement(CollapsibleTrigger2, { asChild: true }, /* @__PURE__ */ React.createElement(SidebarMenuButton, { tooltip: item.title }, item.icon && /* @__PURE__ */ React.createElement(item.icon, null), /* @__PURE__ */ React.createElement("span", null, item.title), /* @__PURE__ */ React.createElement(ChevronRight3, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" }))), /* @__PURE__ */ React.createElement(CollapsibleContent2, null, /* @__PURE__ */ React.createElement(SidebarMenuSub, null, item.items.map((subItem) => /* @__PURE__ */ React.createElement(SidebarMenuSubItem, { key: subItem.title }, /* @__PURE__ */ React.createElement(SidebarMenuSubButton, { asChild: true }, /* @__PURE__ */ React.createElement("a", { href: subItem.url }, /* @__PURE__ */ React.createElement("span", null, subItem.title))))))))
|
|
1795
|
+
)
|
|
1796
|
+
) : (
|
|
1797
|
+
// Render items without submenu
|
|
1798
|
+
/* @__PURE__ */ React.createElement(SidebarMenuItem, { key: item.title }, /* @__PURE__ */ React.createElement(SidebarMenuButton, { asChild: true, tooltip: item.title }, /* @__PURE__ */ React.createElement(
|
|
1799
|
+
"a",
|
|
1800
|
+
{
|
|
1801
|
+
href: item.url,
|
|
1802
|
+
className: "flex items-center gap-2 w-full"
|
|
1803
|
+
},
|
|
1804
|
+
item.icon && /* @__PURE__ */ React.createElement(item.icon, null),
|
|
1805
|
+
/* @__PURE__ */ React.createElement("span", null, item.title)
|
|
1806
|
+
)))
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
)));
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
// src/components/app-sidebar.tsx
|
|
1813
|
+
var data = {
|
|
1814
|
+
user: {
|
|
1815
|
+
name: "CRM Manager",
|
|
1816
|
+
email: "crm@manager.com",
|
|
1817
|
+
avatar: "/avatars/shadcn.jpg"
|
|
1818
|
+
},
|
|
1819
|
+
navMain: [
|
|
1820
|
+
{
|
|
1821
|
+
title: "Leads",
|
|
1822
|
+
url: "/leads",
|
|
1823
|
+
icon: Bot,
|
|
1824
|
+
default: true
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
title: "Deals",
|
|
1828
|
+
url: "/deals",
|
|
1829
|
+
icon: SquarePenIcon,
|
|
1830
|
+
isActive: true
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
title: "Accounts",
|
|
1834
|
+
url: "#",
|
|
1835
|
+
icon: UserRoundCog,
|
|
1836
|
+
isActive: true,
|
|
1837
|
+
items: [
|
|
1838
|
+
{
|
|
1839
|
+
title: "Details",
|
|
1840
|
+
url: "/account/details"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
title: "License",
|
|
1844
|
+
url: "/account/license"
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
title: "Summary",
|
|
1848
|
+
url: "/account/summary"
|
|
1849
|
+
}
|
|
1850
|
+
]
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
title: "Configuration",
|
|
1854
|
+
url: "#",
|
|
1855
|
+
icon: Settings,
|
|
1856
|
+
isActive: true,
|
|
1857
|
+
items: [
|
|
1858
|
+
{
|
|
1859
|
+
title: "Employee Details",
|
|
1860
|
+
url: "/configuration/employee-data"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
title: "Office Details",
|
|
1864
|
+
url: "/configuration/office-details"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
title: "FX Rate",
|
|
1868
|
+
url: "/configuration/fx-rate"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
title: "Company Data",
|
|
1872
|
+
url: "/configuration/company-data"
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
title: "Dynamic Products",
|
|
1876
|
+
url: "/configuration/dynamic-products"
|
|
1877
|
+
}
|
|
1878
|
+
]
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
title: "Summary",
|
|
1882
|
+
url: "/summary",
|
|
1883
|
+
icon: Eye,
|
|
1884
|
+
isActive: true
|
|
1885
|
+
}
|
|
1886
|
+
]
|
|
1887
|
+
};
|
|
1888
|
+
function AppSidebar(_a) {
|
|
1889
|
+
var props = __objRest(_a, []);
|
|
1890
|
+
return /* @__PURE__ */ React45.createElement(Sidebar, __spreadValues({ collapsible: "icon" }, props), /* @__PURE__ */ React45.createElement(SidebarHeader, { className: "p-3 h-12 border-b" }, "Sales CRM"), /* @__PURE__ */ React45.createElement(SidebarContent, null, /* @__PURE__ */ React45.createElement(NavMain, { items: data.navMain })), /* @__PURE__ */ React45.createElement(SidebarFooter, null), /* @__PURE__ */ React45.createElement(SidebarRail, null));
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
// src/components/theme-switcher.tsx
|
|
1894
|
+
import { useTheme } from "next-themes";
|
|
1895
|
+
import { useEffect as useEffect11, useState as useState12, useCallback as useCallback5 } from "react";
|
|
1896
|
+
import { Laptop, Moon, Sun, Check as Check5, Waves } from "lucide-react";
|
|
1897
|
+
function ThemeSwitcher() {
|
|
1898
|
+
const { setTheme, theme, resolvedTheme } = useTheme();
|
|
1899
|
+
const [mounted, setMounted] = useState12(false);
|
|
1900
|
+
useEffect11(() => {
|
|
1901
|
+
setMounted(true);
|
|
1902
|
+
}, []);
|
|
1903
|
+
const activeTheme = theme === "system" ? resolvedTheme : theme;
|
|
1904
|
+
const setThemeSafe = useCallback5(
|
|
1905
|
+
(value) => {
|
|
1906
|
+
setTheme(value);
|
|
1907
|
+
if (value === "light" || value === "dark") {
|
|
1908
|
+
document.documentElement.classList.remove("blue-dark");
|
|
1909
|
+
}
|
|
1910
|
+
if (value === "blue-dark") {
|
|
1911
|
+
document.documentElement.classList.add("blue-dark");
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
[setTheme]
|
|
1915
|
+
);
|
|
1916
|
+
if (!mounted) return null;
|
|
1917
|
+
const triggerIcon = (() => {
|
|
1918
|
+
if (activeTheme === "blue-dark") return /* @__PURE__ */ React.createElement(Waves, { className: "h-5 w-5" });
|
|
1919
|
+
if (activeTheme === "dark") return /* @__PURE__ */ React.createElement(Moon, { className: "h-5 w-5" });
|
|
1920
|
+
if (activeTheme === "light") return /* @__PURE__ */ React.createElement(Sun, { className: "h-5 w-5" });
|
|
1921
|
+
return /* @__PURE__ */ React.createElement(Laptop, { className: "h-5 w-5" });
|
|
1922
|
+
})();
|
|
1923
|
+
const isActive = (value) => activeTheme === value;
|
|
1924
|
+
return /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
1925
|
+
Button,
|
|
1926
|
+
{
|
|
1927
|
+
variant: "outline",
|
|
1928
|
+
size: "icon",
|
|
1929
|
+
"aria-label": "Change theme",
|
|
1930
|
+
title: `Theme: ${theme === "system" ? `system (${resolvedTheme})` : theme}`
|
|
1931
|
+
},
|
|
1932
|
+
triggerIcon
|
|
1933
|
+
)), /* @__PURE__ */ React.createElement(DropdownMenuContent, { align: "end", sideOffset: 8 }, /* @__PURE__ */ React.createElement(
|
|
1934
|
+
DropdownMenuItem,
|
|
1935
|
+
{
|
|
1936
|
+
onClick: () => setThemeSafe("light"),
|
|
1937
|
+
className: "flex items-center justify-between gap-2"
|
|
1938
|
+
},
|
|
1939
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React.createElement(Sun, { className: "mr-2 h-4 w-4" }), " Light"),
|
|
1940
|
+
isActive("light") && /* @__PURE__ */ React.createElement(Check5, { className: "h-4 w-4" })
|
|
1941
|
+
), /* @__PURE__ */ React.createElement(
|
|
1942
|
+
DropdownMenuItem,
|
|
1943
|
+
{
|
|
1944
|
+
onClick: () => setThemeSafe("dark"),
|
|
1945
|
+
className: "flex items-center justify-between gap-2"
|
|
1946
|
+
},
|
|
1947
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React.createElement(Moon, { className: "mr-2 h-4 w-4" }), " Dark"),
|
|
1948
|
+
isActive("dark") && /* @__PURE__ */ React.createElement(Check5, { className: "h-4 w-4" })
|
|
1949
|
+
), /* @__PURE__ */ React.createElement(
|
|
1950
|
+
DropdownMenuItem,
|
|
1951
|
+
{
|
|
1952
|
+
onClick: () => setThemeSafe("blue-dark"),
|
|
1953
|
+
className: "flex items-center justify-between gap-2"
|
|
1954
|
+
},
|
|
1955
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React.createElement(Waves, { className: "mr-2 h-4 w-4" }), " Blue Dark"),
|
|
1956
|
+
isActive("blue-dark") && /* @__PURE__ */ React.createElement(Check5, { className: "h-4 w-4" })
|
|
1957
|
+
)));
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
// src/components/header.tsx
|
|
1961
|
+
import { LayoutGrid, Play } from "lucide-react";
|
|
1962
|
+
export {
|
|
1963
|
+
AppSidebar,
|
|
1964
|
+
FrameworkItemDropdown,
|
|
1965
|
+
GlowingEffect,
|
|
1966
|
+
IconButton,
|
|
1967
|
+
IconButtonWithTooltip,
|
|
1968
|
+
IconTextButton,
|
|
1969
|
+
IconTextButtonWithTooltip,
|
|
1970
|
+
LoadingSpinner,
|
|
1971
|
+
NavMain,
|
|
1972
|
+
RenderAppBreadcrumb,
|
|
1973
|
+
SheetComponent,
|
|
1974
|
+
SkeletonWidget,
|
|
1975
|
+
TextButton,
|
|
1976
|
+
TextButtonWithTooltip,
|
|
1977
|
+
ThemeSwitcher,
|
|
1978
|
+
TitleProgress,
|
|
1979
|
+
Tooltip2 as Tooltip
|
|
1980
|
+
};
|