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