@algorithm-shift/design-system 1.2.39 → 1.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +79 -9
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +23 -26
- package/dist/index.d.ts +23 -26
- package/dist/index.js +635 -528
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +632 -525
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -31,7 +31,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
BarChart: () => BarChart_default,
|
|
34
|
+
Breadcrumb: () => Breadcrumb_default,
|
|
34
35
|
Button: () => Button_default,
|
|
36
|
+
ButtonGroup: () => SplitButton,
|
|
35
37
|
Checkbox: () => Checkbox_default,
|
|
36
38
|
Container: () => Container_default,
|
|
37
39
|
DatePicker: () => DatePicker,
|
|
@@ -44,17 +46,14 @@ __export(index_exports, {
|
|
|
44
46
|
Form: () => Wrapper_default,
|
|
45
47
|
GridLayout: () => Grid_default,
|
|
46
48
|
Image: () => Image_default,
|
|
47
|
-
Logo: () => Logo_default,
|
|
48
49
|
Modal: () => Modal_default,
|
|
49
50
|
MultiCheckbox: () => MultiCheckbox_default,
|
|
50
51
|
Navbar: () => Navbar,
|
|
51
|
-
Notification: () => Notification_default,
|
|
52
52
|
NumberInput: () => NumberInput_default,
|
|
53
53
|
Pagination: () => Pagination_default,
|
|
54
54
|
Password: () => PasswordInput_default,
|
|
55
55
|
Phone: () => PhoneInput_default,
|
|
56
56
|
PieChart: () => PieChart_default,
|
|
57
|
-
Profile: () => Profile_default,
|
|
58
57
|
RadioGroup: () => RadioInput_default,
|
|
59
58
|
RichText: () => RichText,
|
|
60
59
|
Search: () => SearchInput_default,
|
|
@@ -71,6 +70,7 @@ __export(index_exports, {
|
|
|
71
70
|
Typography: () => Typography_default,
|
|
72
71
|
URL: () => UrlInput_default,
|
|
73
72
|
cn: () => cn,
|
|
73
|
+
getInitials: () => getInitials,
|
|
74
74
|
showSonnerToast: () => showSonnerToast,
|
|
75
75
|
stateReducer: () => stateReducer,
|
|
76
76
|
useAppState: () => useAppState
|
|
@@ -150,6 +150,16 @@ var import_tailwind_merge = require("tailwind-merge");
|
|
|
150
150
|
function cn(...inputs) {
|
|
151
151
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
152
152
|
}
|
|
153
|
+
function getInitials(name) {
|
|
154
|
+
const words = name.split(" ");
|
|
155
|
+
if (words.length === 0) {
|
|
156
|
+
return "";
|
|
157
|
+
}
|
|
158
|
+
if (words.length === 1) {
|
|
159
|
+
return words[0].charAt(0);
|
|
160
|
+
}
|
|
161
|
+
return words[0].charAt(0) + words[1].charAt(0);
|
|
162
|
+
}
|
|
153
163
|
|
|
154
164
|
// src/components/ui/button.tsx
|
|
155
165
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -281,71 +291,6 @@ var Typography = ({
|
|
|
281
291
|
};
|
|
282
292
|
var Typography_default = Typography;
|
|
283
293
|
|
|
284
|
-
// src/components/Inputs/TextInput/TextInput.tsx
|
|
285
|
-
var React2 = __toESM(require("react"));
|
|
286
|
-
|
|
287
|
-
// src/components/ui/input.tsx
|
|
288
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
289
|
-
function Input({ className, type, ...props }) {
|
|
290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
291
|
-
"input",
|
|
292
|
-
{
|
|
293
|
-
type,
|
|
294
|
-
"data-slot": "input",
|
|
295
|
-
className: cn(
|
|
296
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
297
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
298
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
299
|
-
className
|
|
300
|
-
),
|
|
301
|
-
...props
|
|
302
|
-
}
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// src/components/Inputs/TextInput/TextInput.tsx
|
|
307
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
308
|
-
var TextInput = ({ className, style, ...props }) => {
|
|
309
|
-
const placeholder = props.placeholder || "Placeholder text";
|
|
310
|
-
const isEditable = props.isEditable ?? true;
|
|
311
|
-
const isDisabled = props.isDisabled ?? false;
|
|
312
|
-
const isReadonly = props.isReadonly ?? false;
|
|
313
|
-
const isAutocomplete = props.isAutocomplete ?? false;
|
|
314
|
-
const [error, setError] = React2.useState(null);
|
|
315
|
-
React2.useEffect(() => {
|
|
316
|
-
if (!props.validateOnMount) return;
|
|
317
|
-
setError(props.errorMessage || null);
|
|
318
|
-
}, [props.errorMessage, props.validateOnMount]);
|
|
319
|
-
const handleChange = (e) => {
|
|
320
|
-
props.onChange?.(e);
|
|
321
|
-
};
|
|
322
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
323
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
324
|
-
Input,
|
|
325
|
-
{
|
|
326
|
-
type: "text",
|
|
327
|
-
name: props.name,
|
|
328
|
-
className: cn(className, error ? "border-red-500" : ""),
|
|
329
|
-
style: {
|
|
330
|
-
...style,
|
|
331
|
-
borderColor: error ? "#f87171" : style?.borderColor
|
|
332
|
-
},
|
|
333
|
-
value: props.value,
|
|
334
|
-
autoComplete: isAutocomplete ? "on" : "off",
|
|
335
|
-
placeholder,
|
|
336
|
-
onChange: handleChange,
|
|
337
|
-
disabled: isDisabled || !isEditable,
|
|
338
|
-
readOnly: isReadonly
|
|
339
|
-
}
|
|
340
|
-
),
|
|
341
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
342
|
-
] });
|
|
343
|
-
};
|
|
344
|
-
var TextInput_default = TextInput;
|
|
345
|
-
|
|
346
|
-
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
347
|
-
var React3 = __toESM(require("react"));
|
|
348
|
-
|
|
349
294
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
350
295
|
var import_react3 = require("react");
|
|
351
296
|
|
|
@@ -543,9 +488,261 @@ var __iconNode14 = [
|
|
|
543
488
|
];
|
|
544
489
|
var Search = createLucideIcon("search", __iconNode14);
|
|
545
490
|
|
|
491
|
+
// src/components/Basic/Breadcrumb/Breadcrumb.tsx
|
|
492
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
493
|
+
var Breadcrumb = ({ list = [], className, style, LinkComponent }) => {
|
|
494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
495
|
+
"nav",
|
|
496
|
+
{
|
|
497
|
+
"aria-label": "breadcrumb",
|
|
498
|
+
className: cn("flex items-center text-sm text-muted-foreground", className),
|
|
499
|
+
style,
|
|
500
|
+
children: list.map((item, index) => {
|
|
501
|
+
const isLast = index === list.length - 1;
|
|
502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center", children: [
|
|
503
|
+
item.url && !isLast && LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
504
|
+
LinkComponent,
|
|
505
|
+
{
|
|
506
|
+
href: item.url,
|
|
507
|
+
className: "hover:text-foreground transition-colors",
|
|
508
|
+
children: item.header
|
|
509
|
+
}
|
|
510
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-foreground font-medium", children: item.header }),
|
|
511
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ChevronRight, { className: "mx-2 h-4 w-4 text-muted-foreground" })
|
|
512
|
+
] }, item.id);
|
|
513
|
+
})
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
};
|
|
517
|
+
var Breadcrumb_default = Breadcrumb;
|
|
518
|
+
|
|
519
|
+
// src/components/ui/dropdown-menu.tsx
|
|
520
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
521
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
522
|
+
function DropdownMenu({
|
|
523
|
+
...props
|
|
524
|
+
}) {
|
|
525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
526
|
+
}
|
|
527
|
+
function DropdownMenuTrigger({
|
|
528
|
+
...props
|
|
529
|
+
}) {
|
|
530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
531
|
+
DropdownMenuPrimitive.Trigger,
|
|
532
|
+
{
|
|
533
|
+
"data-slot": "dropdown-menu-trigger",
|
|
534
|
+
...props
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
function DropdownMenuContent({
|
|
539
|
+
className,
|
|
540
|
+
sideOffset = 4,
|
|
541
|
+
...props
|
|
542
|
+
}) {
|
|
543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
544
|
+
DropdownMenuPrimitive.Content,
|
|
545
|
+
{
|
|
546
|
+
"data-slot": "dropdown-menu-content",
|
|
547
|
+
sideOffset,
|
|
548
|
+
className: cn(
|
|
549
|
+
"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",
|
|
550
|
+
className
|
|
551
|
+
),
|
|
552
|
+
...props
|
|
553
|
+
}
|
|
554
|
+
) });
|
|
555
|
+
}
|
|
556
|
+
function DropdownMenuItem({
|
|
557
|
+
className,
|
|
558
|
+
inset,
|
|
559
|
+
variant = "default",
|
|
560
|
+
...props
|
|
561
|
+
}) {
|
|
562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
563
|
+
DropdownMenuPrimitive.Item,
|
|
564
|
+
{
|
|
565
|
+
"data-slot": "dropdown-menu-item",
|
|
566
|
+
"data-inset": inset,
|
|
567
|
+
"data-variant": variant,
|
|
568
|
+
className: cn(
|
|
569
|
+
"focus:bg-accent focus:text-accent-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",
|
|
570
|
+
className
|
|
571
|
+
),
|
|
572
|
+
...props
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
function DropdownMenuLabel({
|
|
577
|
+
className,
|
|
578
|
+
inset,
|
|
579
|
+
...props
|
|
580
|
+
}) {
|
|
581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
582
|
+
DropdownMenuPrimitive.Label,
|
|
583
|
+
{
|
|
584
|
+
"data-slot": "dropdown-menu-label",
|
|
585
|
+
"data-inset": inset,
|
|
586
|
+
className: cn(
|
|
587
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
588
|
+
className
|
|
589
|
+
),
|
|
590
|
+
...props
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
function DropdownMenuSeparator({
|
|
595
|
+
className,
|
|
596
|
+
...props
|
|
597
|
+
}) {
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
599
|
+
DropdownMenuPrimitive.Separator,
|
|
600
|
+
{
|
|
601
|
+
"data-slot": "dropdown-menu-separator",
|
|
602
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
603
|
+
...props
|
|
604
|
+
}
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
function DropdownMenuSub({
|
|
608
|
+
...props
|
|
609
|
+
}) {
|
|
610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
611
|
+
}
|
|
612
|
+
function DropdownMenuSubTrigger({
|
|
613
|
+
className,
|
|
614
|
+
inset,
|
|
615
|
+
children,
|
|
616
|
+
...props
|
|
617
|
+
}) {
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
619
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
620
|
+
{
|
|
621
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
622
|
+
"data-inset": inset,
|
|
623
|
+
className: cn(
|
|
624
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
625
|
+
className
|
|
626
|
+
),
|
|
627
|
+
...props,
|
|
628
|
+
children: [
|
|
629
|
+
children,
|
|
630
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronRight, { className: "ml-auto size-4" })
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
function DropdownMenuSubContent({
|
|
636
|
+
className,
|
|
637
|
+
...props
|
|
638
|
+
}) {
|
|
639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
640
|
+
DropdownMenuPrimitive.SubContent,
|
|
641
|
+
{
|
|
642
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
643
|
+
className: cn(
|
|
644
|
+
"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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
645
|
+
className
|
|
646
|
+
),
|
|
647
|
+
...props
|
|
648
|
+
}
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
// src/components/Basic/ButtonGroup/ButtonGroup.tsx
|
|
653
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
654
|
+
function SplitButton({ style, textContent, className, list = [], LinkComponent }) {
|
|
655
|
+
const bgColor = style?.backgroundColor || "";
|
|
656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "inline-flex rounded-md overflow-hidden border border-teal-200 bg-teal-700 items-center focus:ring-0", style: { backgroundColor: bgColor }, children: [
|
|
657
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
658
|
+
Button,
|
|
659
|
+
{
|
|
660
|
+
className: `rounded-none border-r px-4 py-2 text-whit focus:ring-0 ${className || ""}`,
|
|
661
|
+
style: { backgroundColor: bgColor },
|
|
662
|
+
children: textContent || "Button"
|
|
663
|
+
}
|
|
664
|
+
),
|
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DropdownMenu, { children: [
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
667
|
+
Button,
|
|
668
|
+
{
|
|
669
|
+
className: "rounded-none bg-teal-700 px-4 py-2 text-white ring-0 shadow-none hover:bg-teal-600 focus:ring-0",
|
|
670
|
+
"aria-label": "Open Dropdown",
|
|
671
|
+
style: { backgroundColor: bgColor },
|
|
672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronDown, { className: "w-4 h-4" })
|
|
673
|
+
}
|
|
674
|
+
) }),
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuContent, { align: "end", className: "bg-white min-w-[120px]", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuItem, { className: "text-black", children: LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LinkComponent, { href: item.url || "#", children: item.header }) : item.header }, item.id)) })
|
|
676
|
+
] })
|
|
677
|
+
] });
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// src/components/Inputs/TextInput/TextInput.tsx
|
|
681
|
+
var React2 = __toESM(require("react"));
|
|
682
|
+
|
|
683
|
+
// src/components/ui/input.tsx
|
|
684
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
685
|
+
function Input({ className, type, ...props }) {
|
|
686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
687
|
+
"input",
|
|
688
|
+
{
|
|
689
|
+
type,
|
|
690
|
+
"data-slot": "input",
|
|
691
|
+
className: cn(
|
|
692
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
693
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
694
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
695
|
+
className
|
|
696
|
+
),
|
|
697
|
+
...props
|
|
698
|
+
}
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// src/components/Inputs/TextInput/TextInput.tsx
|
|
703
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
704
|
+
var TextInput = ({ className, style, ...props }) => {
|
|
705
|
+
const placeholder = props.placeholder || "Placeholder text";
|
|
706
|
+
const isEditable = props.isEditable ?? true;
|
|
707
|
+
const isDisabled = props.isDisabled ?? false;
|
|
708
|
+
const isReadonly = props.isReadonly ?? false;
|
|
709
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
710
|
+
const [error, setError] = React2.useState(null);
|
|
711
|
+
React2.useEffect(() => {
|
|
712
|
+
if (!props.validateOnMount) return;
|
|
713
|
+
setError(props.errorMessage || null);
|
|
714
|
+
}, [props.errorMessage, props.validateOnMount]);
|
|
715
|
+
const handleChange = (e) => {
|
|
716
|
+
props.onChange?.(e);
|
|
717
|
+
};
|
|
718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
719
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
720
|
+
Input,
|
|
721
|
+
{
|
|
722
|
+
type: "text",
|
|
723
|
+
name: props.name,
|
|
724
|
+
className: cn(className, error ? "border-red-500" : ""),
|
|
725
|
+
style: {
|
|
726
|
+
...style,
|
|
727
|
+
borderColor: error ? "#f87171" : style?.borderColor
|
|
728
|
+
},
|
|
729
|
+
value: props.value,
|
|
730
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
731
|
+
placeholder,
|
|
732
|
+
onChange: handleChange,
|
|
733
|
+
disabled: isDisabled || !isEditable,
|
|
734
|
+
readOnly: isReadonly
|
|
735
|
+
}
|
|
736
|
+
),
|
|
737
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
738
|
+
] });
|
|
739
|
+
};
|
|
740
|
+
var TextInput_default = TextInput;
|
|
741
|
+
|
|
546
742
|
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
743
|
+
var React3 = __toESM(require("react"));
|
|
547
744
|
var import_react4 = require("react");
|
|
548
|
-
var
|
|
745
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
549
746
|
var NumberInput = ({ className, style, ...props }) => {
|
|
550
747
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
551
748
|
const isEditable = props.isEditable ?? true;
|
|
@@ -560,10 +757,10 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
560
757
|
const handleChange = (e) => {
|
|
561
758
|
props.onChange?.(e);
|
|
562
759
|
};
|
|
563
|
-
return /* @__PURE__ */ (0,
|
|
564
|
-
/* @__PURE__ */ (0,
|
|
565
|
-
/* @__PURE__ */ (0,
|
|
566
|
-
/* @__PURE__ */ (0,
|
|
760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
762
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Calculator, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
763
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
567
764
|
Input,
|
|
568
765
|
{
|
|
569
766
|
type: "number",
|
|
@@ -583,14 +780,14 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
583
780
|
}
|
|
584
781
|
)
|
|
585
782
|
] }),
|
|
586
|
-
error && /* @__PURE__ */ (0,
|
|
783
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
587
784
|
] });
|
|
588
785
|
};
|
|
589
786
|
var NumberInput_default = NumberInput;
|
|
590
787
|
|
|
591
788
|
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
592
789
|
var React4 = __toESM(require("react"));
|
|
593
|
-
var
|
|
790
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
594
791
|
var EmailInput = ({ className, style, ...props }) => {
|
|
595
792
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
596
793
|
const isEditable = props.isEditable ?? true;
|
|
@@ -605,10 +802,10 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
605
802
|
const handleChange = (e) => {
|
|
606
803
|
props.onChange?.(e);
|
|
607
804
|
};
|
|
608
|
-
return /* @__PURE__ */ (0,
|
|
609
|
-
/* @__PURE__ */ (0,
|
|
610
|
-
/* @__PURE__ */ (0,
|
|
611
|
-
/* @__PURE__ */ (0,
|
|
805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
612
809
|
Input,
|
|
613
810
|
{
|
|
614
811
|
type: "email",
|
|
@@ -627,14 +824,14 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
627
824
|
}
|
|
628
825
|
)
|
|
629
826
|
] }),
|
|
630
|
-
error && /* @__PURE__ */ (0,
|
|
827
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
631
828
|
] });
|
|
632
829
|
};
|
|
633
830
|
var EmailInput_default = EmailInput;
|
|
634
831
|
|
|
635
832
|
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
636
833
|
var React5 = __toESM(require("react"));
|
|
637
|
-
var
|
|
834
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
638
835
|
var PasswordInput = ({ className, style, ...props }) => {
|
|
639
836
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
640
837
|
const isEditable = props.isEditable ?? true;
|
|
@@ -649,10 +846,10 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
649
846
|
const handleChange = (e) => {
|
|
650
847
|
props.onChange?.(e);
|
|
651
848
|
};
|
|
652
|
-
return /* @__PURE__ */ (0,
|
|
653
|
-
/* @__PURE__ */ (0,
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
655
|
-
/* @__PURE__ */ (0,
|
|
849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
656
853
|
Input,
|
|
657
854
|
{
|
|
658
855
|
type: "password",
|
|
@@ -672,7 +869,7 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
672
869
|
}
|
|
673
870
|
)
|
|
674
871
|
] }),
|
|
675
|
-
error && /* @__PURE__ */ (0,
|
|
872
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
676
873
|
] });
|
|
677
874
|
};
|
|
678
875
|
var PasswordInput_default = PasswordInput;
|
|
@@ -681,9 +878,9 @@ var PasswordInput_default = PasswordInput;
|
|
|
681
878
|
var React6 = __toESM(require("react"));
|
|
682
879
|
|
|
683
880
|
// src/components/ui/textarea.tsx
|
|
684
|
-
var
|
|
881
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
685
882
|
function Textarea({ className, ...props }) {
|
|
686
|
-
return /* @__PURE__ */ (0,
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
687
884
|
"textarea",
|
|
688
885
|
{
|
|
689
886
|
"data-slot": "textarea",
|
|
@@ -697,7 +894,7 @@ function Textarea({ className, ...props }) {
|
|
|
697
894
|
}
|
|
698
895
|
|
|
699
896
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
700
|
-
var
|
|
897
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
701
898
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
702
899
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
703
900
|
const isEditable = props.isEditable ?? true;
|
|
@@ -712,8 +909,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
712
909
|
const handleChange = (e) => {
|
|
713
910
|
props.onChange?.(e);
|
|
714
911
|
};
|
|
715
|
-
return /* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
913
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
717
914
|
Textarea,
|
|
718
915
|
{
|
|
719
916
|
id: "textarea-field",
|
|
@@ -731,14 +928,14 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
731
928
|
readOnly: isReadonly
|
|
732
929
|
}
|
|
733
930
|
),
|
|
734
|
-
error && /* @__PURE__ */ (0,
|
|
931
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
735
932
|
] });
|
|
736
933
|
};
|
|
737
934
|
var Textarea_default = Textarea2;
|
|
738
935
|
|
|
739
936
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
740
937
|
var React7 = __toESM(require("react"));
|
|
741
|
-
var
|
|
938
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
742
939
|
var UrlInput = ({ className, style, ...props }) => {
|
|
743
940
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
744
941
|
const isEditable = props.isEditable ?? true;
|
|
@@ -753,10 +950,10 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
753
950
|
const handleChange = (e) => {
|
|
754
951
|
props.onChange?.(e);
|
|
755
952
|
};
|
|
756
|
-
return /* @__PURE__ */ (0,
|
|
757
|
-
/* @__PURE__ */ (0,
|
|
758
|
-
/* @__PURE__ */ (0,
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
760
957
|
Input,
|
|
761
958
|
{
|
|
762
959
|
id: "url-field",
|
|
@@ -776,7 +973,7 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
776
973
|
}
|
|
777
974
|
)
|
|
778
975
|
] }),
|
|
779
|
-
error && /* @__PURE__ */ (0,
|
|
976
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
780
977
|
] });
|
|
781
978
|
};
|
|
782
979
|
var UrlInput_default = UrlInput;
|
|
@@ -786,12 +983,12 @@ var import_react5 = require("react");
|
|
|
786
983
|
|
|
787
984
|
// src/components/ui/checkbox.tsx
|
|
788
985
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
789
|
-
var
|
|
986
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
790
987
|
function Checkbox({
|
|
791
988
|
className,
|
|
792
989
|
...props
|
|
793
990
|
}) {
|
|
794
|
-
return /* @__PURE__ */ (0,
|
|
991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
795
992
|
CheckboxPrimitive.Root,
|
|
796
993
|
{
|
|
797
994
|
"data-slot": "checkbox",
|
|
@@ -800,12 +997,12 @@ function Checkbox({
|
|
|
800
997
|
className
|
|
801
998
|
),
|
|
802
999
|
...props,
|
|
803
|
-
children: /* @__PURE__ */ (0,
|
|
1000
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
804
1001
|
CheckboxPrimitive.Indicator,
|
|
805
1002
|
{
|
|
806
1003
|
"data-slot": "checkbox-indicator",
|
|
807
1004
|
className: "flex items-center justify-center text-current transition-none",
|
|
808
|
-
children: /* @__PURE__ */ (0,
|
|
1005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Check, { className: "size-3.5" })
|
|
809
1006
|
}
|
|
810
1007
|
)
|
|
811
1008
|
}
|
|
@@ -814,12 +1011,12 @@ function Checkbox({
|
|
|
814
1011
|
|
|
815
1012
|
// src/components/ui/label.tsx
|
|
816
1013
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
817
|
-
var
|
|
818
|
-
function
|
|
1014
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1015
|
+
function Label2({
|
|
819
1016
|
className,
|
|
820
1017
|
...props
|
|
821
1018
|
}) {
|
|
822
|
-
return /* @__PURE__ */ (0,
|
|
1019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
823
1020
|
LabelPrimitive.Root,
|
|
824
1021
|
{
|
|
825
1022
|
"data-slot": "label",
|
|
@@ -833,7 +1030,7 @@ function Label({
|
|
|
833
1030
|
}
|
|
834
1031
|
|
|
835
1032
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
836
|
-
var
|
|
1033
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
837
1034
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
838
1035
|
const isEditable = props.isEditable ?? true;
|
|
839
1036
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -846,9 +1043,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
846
1043
|
const handleChange = (value) => {
|
|
847
1044
|
props.onChange?.(value);
|
|
848
1045
|
};
|
|
849
|
-
return /* @__PURE__ */ (0,
|
|
850
|
-
/* @__PURE__ */ (0,
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
1046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
1048
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
852
1049
|
Checkbox,
|
|
853
1050
|
{
|
|
854
1051
|
id: props.name || "checkbox",
|
|
@@ -857,9 +1054,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
|
|
|
857
1054
|
disabled: !isEditable || isDisabled
|
|
858
1055
|
}
|
|
859
1056
|
),
|
|
860
|
-
/* @__PURE__ */ (0,
|
|
1057
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Label2, { htmlFor: props.name || "checkbox", children: text })
|
|
861
1058
|
] }) }),
|
|
862
|
-
error && /* @__PURE__ */ (0,
|
|
1059
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
863
1060
|
] });
|
|
864
1061
|
};
|
|
865
1062
|
var Checkbox_default = CheckboxInput;
|
|
@@ -869,12 +1066,12 @@ var import_react6 = require("react");
|
|
|
869
1066
|
|
|
870
1067
|
// src/components/ui/radio-group.tsx
|
|
871
1068
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
872
|
-
var
|
|
873
|
-
function
|
|
1069
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1070
|
+
function RadioGroup2({
|
|
874
1071
|
className,
|
|
875
1072
|
...props
|
|
876
1073
|
}) {
|
|
877
|
-
return /* @__PURE__ */ (0,
|
|
1074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
878
1075
|
RadioGroupPrimitive.Root,
|
|
879
1076
|
{
|
|
880
1077
|
"data-slot": "radio-group",
|
|
@@ -887,7 +1084,7 @@ function RadioGroupItem({
|
|
|
887
1084
|
className,
|
|
888
1085
|
...props
|
|
889
1086
|
}) {
|
|
890
|
-
return /* @__PURE__ */ (0,
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
891
1088
|
RadioGroupPrimitive.Item,
|
|
892
1089
|
{
|
|
893
1090
|
"data-slot": "radio-group-item",
|
|
@@ -896,12 +1093,12 @@ function RadioGroupItem({
|
|
|
896
1093
|
className
|
|
897
1094
|
),
|
|
898
1095
|
...props,
|
|
899
|
-
children: /* @__PURE__ */ (0,
|
|
1096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
900
1097
|
RadioGroupPrimitive.Indicator,
|
|
901
1098
|
{
|
|
902
1099
|
"data-slot": "radio-group-indicator",
|
|
903
1100
|
className: "relative flex items-center justify-center",
|
|
904
|
-
children: /* @__PURE__ */ (0,
|
|
1101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
905
1102
|
}
|
|
906
1103
|
)
|
|
907
1104
|
}
|
|
@@ -909,7 +1106,7 @@ function RadioGroupItem({
|
|
|
909
1106
|
}
|
|
910
1107
|
|
|
911
1108
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
912
|
-
var
|
|
1109
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
913
1110
|
var RadioInput = ({
|
|
914
1111
|
className,
|
|
915
1112
|
style,
|
|
@@ -933,29 +1130,29 @@ var RadioInput = ({
|
|
|
933
1130
|
onChange?.(value);
|
|
934
1131
|
};
|
|
935
1132
|
const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
|
|
936
|
-
return /* @__PURE__ */ (0,
|
|
937
|
-
/* @__PURE__ */ (0,
|
|
938
|
-
|
|
1133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1135
|
+
RadioGroup2,
|
|
939
1136
|
{
|
|
940
1137
|
defaultValue: resolvedDefaultValue,
|
|
941
1138
|
onValueChange: handleChange,
|
|
942
1139
|
children: [
|
|
943
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
944
|
-
options.map((item) => /* @__PURE__ */ (0,
|
|
945
|
-
/* @__PURE__ */ (0,
|
|
946
|
-
/* @__PURE__ */ (0,
|
|
1140
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-sm text-gray-500", children: "No options available" }),
|
|
1141
|
+
options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
|
|
947
1144
|
] }, item.value))
|
|
948
1145
|
]
|
|
949
1146
|
}
|
|
950
1147
|
) }),
|
|
951
|
-
error && /* @__PURE__ */ (0,
|
|
1148
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
952
1149
|
] });
|
|
953
1150
|
};
|
|
954
1151
|
var RadioInput_default = RadioInput;
|
|
955
1152
|
|
|
956
1153
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
957
1154
|
var import_react7 = require("react");
|
|
958
|
-
var
|
|
1155
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
959
1156
|
var MultiCheckbox = ({
|
|
960
1157
|
className,
|
|
961
1158
|
style,
|
|
@@ -982,15 +1179,15 @@ var MultiCheckbox = ({
|
|
|
982
1179
|
},
|
|
983
1180
|
[onChange]
|
|
984
1181
|
);
|
|
985
|
-
return /* @__PURE__ */ (0,
|
|
1182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
986
1183
|
"div",
|
|
987
1184
|
{
|
|
988
1185
|
className: cn("flex flex-col gap-3", className),
|
|
989
1186
|
style,
|
|
990
1187
|
children: [
|
|
991
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
992
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
993
|
-
/* @__PURE__ */ (0,
|
|
1188
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm text-gray-500", children: "No options available." }),
|
|
1189
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
994
1191
|
Checkbox,
|
|
995
1192
|
{
|
|
996
1193
|
id: opt.value,
|
|
@@ -999,7 +1196,7 @@ var MultiCheckbox = ({
|
|
|
999
1196
|
disabled: !isEditable || isDisabled
|
|
1000
1197
|
}
|
|
1001
1198
|
),
|
|
1002
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Label2, { htmlFor: opt.value, children: opt.label })
|
|
1003
1200
|
] }, opt.value))
|
|
1004
1201
|
]
|
|
1005
1202
|
}
|
|
@@ -1013,7 +1210,7 @@ var import_react9 = require("react");
|
|
|
1013
1210
|
// src/components/Global/TinyMceEditor.tsx
|
|
1014
1211
|
var import_react8 = require("react");
|
|
1015
1212
|
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
1016
|
-
var
|
|
1213
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1017
1214
|
function MyEditor({
|
|
1018
1215
|
value,
|
|
1019
1216
|
onChange,
|
|
@@ -1038,7 +1235,7 @@ function MyEditor({
|
|
|
1038
1235
|
}
|
|
1039
1236
|
return toolbar;
|
|
1040
1237
|
}, [isDefault]);
|
|
1041
|
-
return /* @__PURE__ */ (0,
|
|
1238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1042
1239
|
import_tinymce_react.Editor,
|
|
1043
1240
|
{
|
|
1044
1241
|
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
@@ -1082,14 +1279,14 @@ function MyEditor({
|
|
|
1082
1279
|
}
|
|
1083
1280
|
|
|
1084
1281
|
// src/components/Inputs/RichText/RichText.tsx
|
|
1085
|
-
var
|
|
1282
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1086
1283
|
function RichText({ className, style, ...props }) {
|
|
1087
1284
|
const [error, setError] = (0, import_react9.useState)(null);
|
|
1088
1285
|
(0, import_react9.useEffect)(() => {
|
|
1089
1286
|
if (!props.validateOnMount) return;
|
|
1090
1287
|
setError(props.errorMessage || null);
|
|
1091
1288
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1092
|
-
return /* @__PURE__ */ (0,
|
|
1289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1093
1290
|
"div",
|
|
1094
1291
|
{
|
|
1095
1292
|
className: cn(className, error ? "border-red-500" : ""),
|
|
@@ -1098,8 +1295,8 @@ function RichText({ className, style, ...props }) {
|
|
|
1098
1295
|
borderColor: error ? "#f87171" : style?.borderColor
|
|
1099
1296
|
},
|
|
1100
1297
|
children: [
|
|
1101
|
-
/* @__PURE__ */ (0,
|
|
1102
|
-
error && /* @__PURE__ */ (0,
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MyEditor, { onChange: (content) => props.onChange?.(content), value: props.value, isDefault: true }),
|
|
1299
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1103
1300
|
]
|
|
1104
1301
|
}
|
|
1105
1302
|
);
|
|
@@ -1110,16 +1307,16 @@ var React8 = __toESM(require("react"));
|
|
|
1110
1307
|
|
|
1111
1308
|
// src/components/ui/select.tsx
|
|
1112
1309
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
1113
|
-
var
|
|
1310
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1114
1311
|
function Select({
|
|
1115
1312
|
...props
|
|
1116
1313
|
}) {
|
|
1117
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1118
1315
|
}
|
|
1119
1316
|
function SelectValue({
|
|
1120
1317
|
...props
|
|
1121
1318
|
}) {
|
|
1122
|
-
return /* @__PURE__ */ (0,
|
|
1319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1123
1320
|
}
|
|
1124
1321
|
function SelectTrigger({
|
|
1125
1322
|
className,
|
|
@@ -1127,7 +1324,7 @@ function SelectTrigger({
|
|
|
1127
1324
|
children,
|
|
1128
1325
|
...props
|
|
1129
1326
|
}) {
|
|
1130
|
-
return /* @__PURE__ */ (0,
|
|
1327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1131
1328
|
SelectPrimitive.Trigger,
|
|
1132
1329
|
{
|
|
1133
1330
|
"data-slot": "select-trigger",
|
|
@@ -1139,7 +1336,7 @@ function SelectTrigger({
|
|
|
1139
1336
|
...props,
|
|
1140
1337
|
children: [
|
|
1141
1338
|
children,
|
|
1142
|
-
/* @__PURE__ */ (0,
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
1143
1340
|
]
|
|
1144
1341
|
}
|
|
1145
1342
|
);
|
|
@@ -1150,7 +1347,7 @@ function SelectContent({
|
|
|
1150
1347
|
position = "popper",
|
|
1151
1348
|
...props
|
|
1152
1349
|
}) {
|
|
1153
|
-
return /* @__PURE__ */ (0,
|
|
1350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1154
1351
|
SelectPrimitive.Content,
|
|
1155
1352
|
{
|
|
1156
1353
|
"data-slot": "select-content",
|
|
@@ -1162,8 +1359,8 @@ function SelectContent({
|
|
|
1162
1359
|
position,
|
|
1163
1360
|
...props,
|
|
1164
1361
|
children: [
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1166
|
-
/* @__PURE__ */ (0,
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectScrollUpButton, {}),
|
|
1363
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1167
1364
|
SelectPrimitive.Viewport,
|
|
1168
1365
|
{
|
|
1169
1366
|
className: cn(
|
|
@@ -1173,7 +1370,7 @@ function SelectContent({
|
|
|
1173
1370
|
children
|
|
1174
1371
|
}
|
|
1175
1372
|
),
|
|
1176
|
-
/* @__PURE__ */ (0,
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectScrollDownButton, {})
|
|
1177
1374
|
]
|
|
1178
1375
|
}
|
|
1179
1376
|
) });
|
|
@@ -1183,7 +1380,7 @@ function SelectItem({
|
|
|
1183
1380
|
children,
|
|
1184
1381
|
...props
|
|
1185
1382
|
}) {
|
|
1186
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1187
1384
|
SelectPrimitive.Item,
|
|
1188
1385
|
{
|
|
1189
1386
|
"data-slot": "select-item",
|
|
@@ -1193,8 +1390,8 @@ function SelectItem({
|
|
|
1193
1390
|
),
|
|
1194
1391
|
...props,
|
|
1195
1392
|
children: [
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1197
|
-
/* @__PURE__ */ (0,
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Check, { className: "size-4" }) }) }),
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.ItemText, { children })
|
|
1198
1395
|
]
|
|
1199
1396
|
}
|
|
1200
1397
|
);
|
|
@@ -1203,7 +1400,7 @@ function SelectScrollUpButton({
|
|
|
1203
1400
|
className,
|
|
1204
1401
|
...props
|
|
1205
1402
|
}) {
|
|
1206
|
-
return /* @__PURE__ */ (0,
|
|
1403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1207
1404
|
SelectPrimitive.ScrollUpButton,
|
|
1208
1405
|
{
|
|
1209
1406
|
"data-slot": "select-scroll-up-button",
|
|
@@ -1212,7 +1409,7 @@ function SelectScrollUpButton({
|
|
|
1212
1409
|
className
|
|
1213
1410
|
),
|
|
1214
1411
|
...props,
|
|
1215
|
-
children: /* @__PURE__ */ (0,
|
|
1412
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronUp, { className: "size-4" })
|
|
1216
1413
|
}
|
|
1217
1414
|
);
|
|
1218
1415
|
}
|
|
@@ -1220,7 +1417,7 @@ function SelectScrollDownButton({
|
|
|
1220
1417
|
className,
|
|
1221
1418
|
...props
|
|
1222
1419
|
}) {
|
|
1223
|
-
return /* @__PURE__ */ (0,
|
|
1420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1224
1421
|
SelectPrimitive.ScrollDownButton,
|
|
1225
1422
|
{
|
|
1226
1423
|
"data-slot": "select-scroll-down-button",
|
|
@@ -1229,13 +1426,13 @@ function SelectScrollDownButton({
|
|
|
1229
1426
|
className
|
|
1230
1427
|
),
|
|
1231
1428
|
...props,
|
|
1232
|
-
children: /* @__PURE__ */ (0,
|
|
1429
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronDown, { className: "size-4" })
|
|
1233
1430
|
}
|
|
1234
1431
|
);
|
|
1235
1432
|
}
|
|
1236
1433
|
|
|
1237
1434
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
1238
|
-
var
|
|
1435
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1239
1436
|
var Dropdown = ({ className, style, ...props }) => {
|
|
1240
1437
|
const list = props.data || [];
|
|
1241
1438
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
@@ -1256,9 +1453,9 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
1256
1453
|
value: item[dataKey],
|
|
1257
1454
|
label: item[dataLabel]
|
|
1258
1455
|
}));
|
|
1259
|
-
return /* @__PURE__ */ (0,
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
1457
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Select, { name: props.name, value: props.value, onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
1458
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1262
1459
|
SelectTrigger,
|
|
1263
1460
|
{
|
|
1264
1461
|
id: props.name || "select-field",
|
|
@@ -1268,12 +1465,12 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
1268
1465
|
borderColor: error ? "#f87171" : style?.borderColor
|
|
1269
1466
|
},
|
|
1270
1467
|
"aria-readonly": isReadonly,
|
|
1271
|
-
children: /* @__PURE__ */ (0,
|
|
1468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectValue, { placeholder })
|
|
1272
1469
|
}
|
|
1273
1470
|
),
|
|
1274
|
-
/* @__PURE__ */ (0,
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectContent, { children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1275
1472
|
] }),
|
|
1276
|
-
error && /* @__PURE__ */ (0,
|
|
1473
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1277
1474
|
] });
|
|
1278
1475
|
};
|
|
1279
1476
|
var Dropdown_default = Dropdown;
|
|
@@ -1283,12 +1480,12 @@ var import_react10 = require("react");
|
|
|
1283
1480
|
|
|
1284
1481
|
// src/components/ui/switch.tsx
|
|
1285
1482
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
1286
|
-
var
|
|
1483
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1287
1484
|
function Switch({
|
|
1288
1485
|
className,
|
|
1289
1486
|
...props
|
|
1290
1487
|
}) {
|
|
1291
|
-
return /* @__PURE__ */ (0,
|
|
1488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1292
1489
|
SwitchPrimitive.Root,
|
|
1293
1490
|
{
|
|
1294
1491
|
"data-slot": "switch",
|
|
@@ -1297,7 +1494,7 @@ function Switch({
|
|
|
1297
1494
|
className
|
|
1298
1495
|
),
|
|
1299
1496
|
...props,
|
|
1300
|
-
children: /* @__PURE__ */ (0,
|
|
1497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1301
1498
|
SwitchPrimitive.Thumb,
|
|
1302
1499
|
{
|
|
1303
1500
|
"data-slot": "switch-thumb",
|
|
@@ -1311,7 +1508,7 @@ function Switch({
|
|
|
1311
1508
|
}
|
|
1312
1509
|
|
|
1313
1510
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
1314
|
-
var
|
|
1511
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1315
1512
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
1316
1513
|
const isEditable = props.isEditable ?? true;
|
|
1317
1514
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -1323,9 +1520,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
|
|
|
1323
1520
|
const handleChange = (value) => {
|
|
1324
1521
|
props.onChange?.(value);
|
|
1325
1522
|
};
|
|
1326
|
-
return /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
1524
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
1525
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1329
1526
|
Switch,
|
|
1330
1527
|
{
|
|
1331
1528
|
id: props.name || "switch",
|
|
@@ -1334,9 +1531,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
|
|
|
1334
1531
|
disabled: isDisabled || !isEditable
|
|
1335
1532
|
}
|
|
1336
1533
|
),
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1534
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Label2, { htmlFor: props.name || "switch", children: props.text })
|
|
1338
1535
|
] }) }),
|
|
1339
|
-
error && /* @__PURE__ */ (0,
|
|
1536
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1340
1537
|
] });
|
|
1341
1538
|
};
|
|
1342
1539
|
var SwitchToggle_default = SwitchToggle;
|
|
@@ -1345,7 +1542,7 @@ var SwitchToggle_default = SwitchToggle;
|
|
|
1345
1542
|
var React9 = __toESM(require("react"));
|
|
1346
1543
|
var import_react_international_phone = require("react-international-phone");
|
|
1347
1544
|
var import_style = require("react-international-phone/style.css");
|
|
1348
|
-
var
|
|
1545
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1349
1546
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
1350
1547
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
1351
1548
|
const isEditable = props.isEditable ?? true;
|
|
@@ -1358,8 +1555,8 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
1358
1555
|
const handleChange = (val) => {
|
|
1359
1556
|
props.onChange?.(val);
|
|
1360
1557
|
};
|
|
1361
|
-
return /* @__PURE__ */ (0,
|
|
1362
|
-
/* @__PURE__ */ (0,
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1363
1560
|
import_react_international_phone.PhoneInput,
|
|
1364
1561
|
{
|
|
1365
1562
|
defaultCountry: "in",
|
|
@@ -1378,14 +1575,14 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
1378
1575
|
disabled: isDisabled || !isEditable
|
|
1379
1576
|
}
|
|
1380
1577
|
),
|
|
1381
|
-
error && /* @__PURE__ */ (0,
|
|
1578
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1382
1579
|
] });
|
|
1383
1580
|
};
|
|
1384
1581
|
var PhoneInput_default = PhoneInput;
|
|
1385
1582
|
|
|
1386
1583
|
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
1387
1584
|
var React10 = __toESM(require("react"));
|
|
1388
|
-
var
|
|
1585
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1389
1586
|
var SearchInput = ({ className, style, ...props }) => {
|
|
1390
1587
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1391
1588
|
const isEditable = props.isEditable ?? true;
|
|
@@ -1400,10 +1597,10 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
1400
1597
|
const handleChange = (e) => {
|
|
1401
1598
|
props.onChange?.(e);
|
|
1402
1599
|
};
|
|
1403
|
-
return /* @__PURE__ */ (0,
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1406
|
-
/* @__PURE__ */ (0,
|
|
1600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
1602
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1407
1604
|
Input,
|
|
1408
1605
|
{
|
|
1409
1606
|
type: "text",
|
|
@@ -1423,14 +1620,14 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
1423
1620
|
}
|
|
1424
1621
|
)
|
|
1425
1622
|
] }),
|
|
1426
|
-
error && /* @__PURE__ */ (0,
|
|
1623
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1427
1624
|
] });
|
|
1428
1625
|
};
|
|
1429
1626
|
var SearchInput_default = SearchInput;
|
|
1430
1627
|
|
|
1431
1628
|
// src/components/Inputs/FileInput/FileInput.tsx
|
|
1432
1629
|
var import_react11 = require("react");
|
|
1433
|
-
var
|
|
1630
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1434
1631
|
var FileInput = ({ className, style, ...props }) => {
|
|
1435
1632
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1436
1633
|
const [error, setError] = (0, import_react11.useState)(null);
|
|
@@ -1438,8 +1635,8 @@ var FileInput = ({ className, style, ...props }) => {
|
|
|
1438
1635
|
if (!props.validateOnMount) return;
|
|
1439
1636
|
setError(props.errorMessage || null);
|
|
1440
1637
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1441
|
-
return /* @__PURE__ */ (0,
|
|
1442
|
-
/* @__PURE__ */ (0,
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
|
|
1639
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1443
1640
|
Input,
|
|
1444
1641
|
{
|
|
1445
1642
|
type: "file",
|
|
@@ -1458,14 +1655,14 @@ var FileInput = ({ className, style, ...props }) => {
|
|
|
1458
1655
|
}
|
|
1459
1656
|
}
|
|
1460
1657
|
),
|
|
1461
|
-
error && /* @__PURE__ */ (0,
|
|
1658
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1462
1659
|
] });
|
|
1463
1660
|
};
|
|
1464
1661
|
var FileInput_default = FileInput;
|
|
1465
1662
|
|
|
1466
1663
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
1467
1664
|
var import_react12 = __toESM(require("react"));
|
|
1468
|
-
var
|
|
1665
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1469
1666
|
function DatePicker({ className, style, ...props }) {
|
|
1470
1667
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1471
1668
|
const minimumDate = props.minimumDate ?? "none";
|
|
@@ -1498,10 +1695,10 @@ function DatePicker({ className, style, ...props }) {
|
|
|
1498
1695
|
const handleChange = (e) => {
|
|
1499
1696
|
props.onChange?.(e);
|
|
1500
1697
|
};
|
|
1501
|
-
return /* @__PURE__ */ (0,
|
|
1502
|
-
/* @__PURE__ */ (0,
|
|
1503
|
-
/* @__PURE__ */ (0,
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1505
1702
|
Input,
|
|
1506
1703
|
{
|
|
1507
1704
|
type: "date",
|
|
@@ -1527,7 +1724,7 @@ function DatePicker({ className, style, ...props }) {
|
|
|
1527
1724
|
}
|
|
1528
1725
|
)
|
|
1529
1726
|
] }),
|
|
1530
|
-
error && /* @__PURE__ */ (0,
|
|
1727
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1531
1728
|
] });
|
|
1532
1729
|
}
|
|
1533
1730
|
|
|
@@ -1538,7 +1735,7 @@ var import_date_fns = require("date-fns");
|
|
|
1538
1735
|
// src/components/ui/calendar.tsx
|
|
1539
1736
|
var React12 = __toESM(require("react"));
|
|
1540
1737
|
var import_react_day_picker = require("react-day-picker");
|
|
1541
|
-
var
|
|
1738
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1542
1739
|
function Calendar2({
|
|
1543
1740
|
className,
|
|
1544
1741
|
classNames,
|
|
@@ -1550,7 +1747,7 @@ function Calendar2({
|
|
|
1550
1747
|
...props
|
|
1551
1748
|
}) {
|
|
1552
1749
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1553
|
-
return /* @__PURE__ */ (0,
|
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1554
1751
|
import_react_day_picker.DayPicker,
|
|
1555
1752
|
{
|
|
1556
1753
|
showOutsideDays,
|
|
@@ -1649,7 +1846,7 @@ function Calendar2({
|
|
|
1649
1846
|
},
|
|
1650
1847
|
components: {
|
|
1651
1848
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
1652
|
-
return /* @__PURE__ */ (0,
|
|
1849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1653
1850
|
"div",
|
|
1654
1851
|
{
|
|
1655
1852
|
"data-slot": "calendar",
|
|
@@ -1661,10 +1858,10 @@ function Calendar2({
|
|
|
1661
1858
|
},
|
|
1662
1859
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
1663
1860
|
if (orientation === "left") {
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
1665
1862
|
}
|
|
1666
1863
|
if (orientation === "right") {
|
|
1667
|
-
return /* @__PURE__ */ (0,
|
|
1864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1668
1865
|
ChevronRight,
|
|
1669
1866
|
{
|
|
1670
1867
|
className: cn("size-4", className2),
|
|
@@ -1672,11 +1869,11 @@ function Calendar2({
|
|
|
1672
1869
|
}
|
|
1673
1870
|
);
|
|
1674
1871
|
}
|
|
1675
|
-
return /* @__PURE__ */ (0,
|
|
1872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
1676
1873
|
},
|
|
1677
1874
|
DayButton: CalendarDayButton,
|
|
1678
1875
|
WeekNumber: ({ children, ...props2 }) => {
|
|
1679
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
1680
1877
|
},
|
|
1681
1878
|
...components
|
|
1682
1879
|
},
|
|
@@ -1695,7 +1892,7 @@ function CalendarDayButton({
|
|
|
1695
1892
|
React12.useEffect(() => {
|
|
1696
1893
|
if (modifiers.focused) ref.current?.focus();
|
|
1697
1894
|
}, [modifiers.focused]);
|
|
1698
|
-
return /* @__PURE__ */ (0,
|
|
1895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1699
1896
|
Button,
|
|
1700
1897
|
{
|
|
1701
1898
|
ref,
|
|
@@ -1718,16 +1915,16 @@ function CalendarDayButton({
|
|
|
1718
1915
|
|
|
1719
1916
|
// src/components/ui/popover.tsx
|
|
1720
1917
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
1721
|
-
var
|
|
1918
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1722
1919
|
function Popover({
|
|
1723
1920
|
...props
|
|
1724
1921
|
}) {
|
|
1725
|
-
return /* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1726
1923
|
}
|
|
1727
1924
|
function PopoverTrigger({
|
|
1728
1925
|
...props
|
|
1729
1926
|
}) {
|
|
1730
|
-
return /* @__PURE__ */ (0,
|
|
1927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1731
1928
|
}
|
|
1732
1929
|
function PopoverContent({
|
|
1733
1930
|
className,
|
|
@@ -1735,7 +1932,7 @@ function PopoverContent({
|
|
|
1735
1932
|
sideOffset = 4,
|
|
1736
1933
|
...props
|
|
1737
1934
|
}) {
|
|
1738
|
-
return /* @__PURE__ */ (0,
|
|
1935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1739
1936
|
PopoverPrimitive.Content,
|
|
1740
1937
|
{
|
|
1741
1938
|
"data-slot": "popover-content",
|
|
@@ -1751,7 +1948,7 @@ function PopoverContent({
|
|
|
1751
1948
|
}
|
|
1752
1949
|
|
|
1753
1950
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1754
|
-
var
|
|
1951
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1755
1952
|
var DateRange = ({ className, style, ...props }) => {
|
|
1756
1953
|
const [error, setError] = React13.useState(null);
|
|
1757
1954
|
const isDateRange = (val) => !!val && val.from instanceof Date;
|
|
@@ -1771,9 +1968,9 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
1771
1968
|
props.onChange?.(value);
|
|
1772
1969
|
}
|
|
1773
1970
|
};
|
|
1774
|
-
return /* @__PURE__ */ (0,
|
|
1775
|
-
/* @__PURE__ */ (0,
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Popover, { children: [
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1777
1974
|
Button,
|
|
1778
1975
|
{
|
|
1779
1976
|
id: "date",
|
|
@@ -1782,15 +1979,15 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
1782
1979
|
"w-[300px] justify-start text-left font-normal text-[11px]",
|
|
1783
1980
|
!date && "text-muted-foreground"
|
|
1784
1981
|
),
|
|
1785
|
-
children: date?.from ? date.to ? /* @__PURE__ */ (0,
|
|
1982
|
+
children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
1786
1983
|
(0, import_date_fns.format)(date.from, "LLL dd, y"),
|
|
1787
1984
|
" -",
|
|
1788
1985
|
" ",
|
|
1789
1986
|
(0, import_date_fns.format)(date.to, "LLL dd, y")
|
|
1790
|
-
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0,
|
|
1987
|
+
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: "Pick a date range" })
|
|
1791
1988
|
}
|
|
1792
1989
|
) }),
|
|
1793
|
-
/* @__PURE__ */ (0,
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1794
1991
|
Calendar2,
|
|
1795
1992
|
{
|
|
1796
1993
|
mode: "range",
|
|
@@ -1801,14 +1998,14 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
1801
1998
|
}
|
|
1802
1999
|
) })
|
|
1803
2000
|
] }) }),
|
|
1804
|
-
error && /* @__PURE__ */ (0,
|
|
2001
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1805
2002
|
] });
|
|
1806
2003
|
};
|
|
1807
2004
|
var DateRange_default = DateRange;
|
|
1808
2005
|
|
|
1809
2006
|
// src/components/Inputs/TextInputGroup/TextInputGroup.tsx
|
|
1810
2007
|
var React14 = __toESM(require("react"));
|
|
1811
|
-
var
|
|
2008
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1812
2009
|
var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
1813
2010
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1814
2011
|
const isEditable = props.isEditable ?? true;
|
|
@@ -1823,8 +2020,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
1823
2020
|
const handleChange = (e) => {
|
|
1824
2021
|
props.onChange?.(e);
|
|
1825
2022
|
};
|
|
1826
|
-
return /* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
2023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
2024
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1828
2025
|
"div",
|
|
1829
2026
|
{
|
|
1830
2027
|
className: cn(
|
|
@@ -1834,8 +2031,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
1834
2031
|
error ? "border-red-500" : ""
|
|
1835
2032
|
),
|
|
1836
2033
|
children: [
|
|
1837
|
-
prepend && /* @__PURE__ */ (0,
|
|
1838
|
-
/* @__PURE__ */ (0,
|
|
2034
|
+
prepend && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1839
2036
|
Input,
|
|
1840
2037
|
{
|
|
1841
2038
|
id: props.name || "prepend-input",
|
|
@@ -1857,11 +2054,11 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
1857
2054
|
readOnly: isReadonly
|
|
1858
2055
|
}
|
|
1859
2056
|
),
|
|
1860
|
-
append && /* @__PURE__ */ (0,
|
|
2057
|
+
append && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
|
|
1861
2058
|
]
|
|
1862
2059
|
}
|
|
1863
2060
|
),
|
|
1864
|
-
error && /* @__PURE__ */ (0,
|
|
2061
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1865
2062
|
] });
|
|
1866
2063
|
};
|
|
1867
2064
|
var TextInputGroup_default = TextInputGroup;
|
|
@@ -1870,14 +2067,14 @@ var TextInputGroup_default = TextInputGroup;
|
|
|
1870
2067
|
var import_react_table = require("@tanstack/react-table");
|
|
1871
2068
|
|
|
1872
2069
|
// src/components/ui/table.tsx
|
|
1873
|
-
var
|
|
2070
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1874
2071
|
function Table({ className, ...props }) {
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
2072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1876
2073
|
"div",
|
|
1877
2074
|
{
|
|
1878
2075
|
"data-slot": "table-container",
|
|
1879
2076
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
1880
|
-
children: /* @__PURE__ */ (0,
|
|
2077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1881
2078
|
"table",
|
|
1882
2079
|
{
|
|
1883
2080
|
"data-slot": "table",
|
|
@@ -1889,7 +2086,7 @@ function Table({ className, ...props }) {
|
|
|
1889
2086
|
);
|
|
1890
2087
|
}
|
|
1891
2088
|
function TableHeader({ className, ...props }) {
|
|
1892
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1893
2090
|
"thead",
|
|
1894
2091
|
{
|
|
1895
2092
|
"data-slot": "table-header",
|
|
@@ -1902,7 +2099,7 @@ function TableHeader({ className, ...props }) {
|
|
|
1902
2099
|
);
|
|
1903
2100
|
}
|
|
1904
2101
|
function TableBody({ className, ...props }) {
|
|
1905
|
-
return /* @__PURE__ */ (0,
|
|
2102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1906
2103
|
"tbody",
|
|
1907
2104
|
{
|
|
1908
2105
|
"data-slot": "table-body",
|
|
@@ -1915,7 +2112,7 @@ function TableBody({ className, ...props }) {
|
|
|
1915
2112
|
);
|
|
1916
2113
|
}
|
|
1917
2114
|
function TableRow({ className, ...props }) {
|
|
1918
|
-
return /* @__PURE__ */ (0,
|
|
2115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1919
2116
|
"tr",
|
|
1920
2117
|
{
|
|
1921
2118
|
"data-slot": "table-row",
|
|
@@ -1928,7 +2125,7 @@ function TableRow({ className, ...props }) {
|
|
|
1928
2125
|
);
|
|
1929
2126
|
}
|
|
1930
2127
|
function TableHead({ className, ...props }) {
|
|
1931
|
-
return /* @__PURE__ */ (0,
|
|
2128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1932
2129
|
"th",
|
|
1933
2130
|
{
|
|
1934
2131
|
"data-slot": "table-head",
|
|
@@ -1941,7 +2138,7 @@ function TableHead({ className, ...props }) {
|
|
|
1941
2138
|
);
|
|
1942
2139
|
}
|
|
1943
2140
|
function TableCell({ className, ...props }) {
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
2141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1945
2142
|
"td",
|
|
1946
2143
|
{
|
|
1947
2144
|
"data-slot": "table-cell",
|
|
@@ -1955,7 +2152,7 @@ function TableCell({ className, ...props }) {
|
|
|
1955
2152
|
}
|
|
1956
2153
|
|
|
1957
2154
|
// src/components/ui/data-table.tsx
|
|
1958
|
-
var
|
|
2155
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1959
2156
|
function DataTable({
|
|
1960
2157
|
columns,
|
|
1961
2158
|
rowActions,
|
|
@@ -1980,14 +2177,14 @@ function DataTable({
|
|
|
1980
2177
|
onCellClick(rowData, columnId);
|
|
1981
2178
|
}
|
|
1982
2179
|
};
|
|
1983
|
-
return /* @__PURE__ */ (0,
|
|
1984
|
-
/* @__PURE__ */ (0,
|
|
1985
|
-
return /* @__PURE__ */ (0,
|
|
2180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Table, { children: [
|
|
2181
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
|
|
2182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
1986
2183
|
header.column.columnDef.header,
|
|
1987
2184
|
header.getContext()
|
|
1988
2185
|
) }, header.id);
|
|
1989
2186
|
}) }, headerGroup.id)) }),
|
|
1990
|
-
/* @__PURE__ */ (0,
|
|
2187
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
1991
2188
|
TableRow,
|
|
1992
2189
|
{
|
|
1993
2190
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -1997,7 +2194,7 @@ function DataTable({
|
|
|
1997
2194
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
1998
2195
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
1999
2196
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
2000
|
-
return /* @__PURE__ */ (0,
|
|
2197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2001
2198
|
TableCell,
|
|
2002
2199
|
{
|
|
2003
2200
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -2012,18 +2209,18 @@ function DataTable({
|
|
|
2012
2209
|
cell.id
|
|
2013
2210
|
);
|
|
2014
2211
|
}),
|
|
2015
|
-
rowActions.length > 0 && /* @__PURE__ */ (0,
|
|
2212
|
+
rowActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute top-0 right-0 bg-white py-3 min-w-[100px] z-50 shadow-md flex items-center justify-center gap-3 p-2 opacity-0 group-hover:opacity-100 duration-300 h-full", children: rowActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
2016
2213
|
]
|
|
2017
2214
|
},
|
|
2018
2215
|
row.id
|
|
2019
|
-
)) : /* @__PURE__ */ (0,
|
|
2216
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
2020
2217
|
] }) });
|
|
2021
2218
|
}
|
|
2022
2219
|
|
|
2023
2220
|
// src/components/ui/pagination.tsx
|
|
2024
|
-
var
|
|
2221
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2025
2222
|
function Pagination({ className, ...props }) {
|
|
2026
|
-
return /* @__PURE__ */ (0,
|
|
2223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2027
2224
|
"nav",
|
|
2028
2225
|
{
|
|
2029
2226
|
role: "navigation",
|
|
@@ -2038,7 +2235,7 @@ function PaginationContent({
|
|
|
2038
2235
|
className,
|
|
2039
2236
|
...props
|
|
2040
2237
|
}) {
|
|
2041
|
-
return /* @__PURE__ */ (0,
|
|
2238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2042
2239
|
"ul",
|
|
2043
2240
|
{
|
|
2044
2241
|
"data-slot": "pagination-content",
|
|
@@ -2048,7 +2245,7 @@ function PaginationContent({
|
|
|
2048
2245
|
);
|
|
2049
2246
|
}
|
|
2050
2247
|
function PaginationItem({ ...props }) {
|
|
2051
|
-
return /* @__PURE__ */ (0,
|
|
2248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
2052
2249
|
}
|
|
2053
2250
|
function PaginationLink({
|
|
2054
2251
|
className,
|
|
@@ -2056,7 +2253,7 @@ function PaginationLink({
|
|
|
2056
2253
|
size = "icon",
|
|
2057
2254
|
...props
|
|
2058
2255
|
}) {
|
|
2059
|
-
return /* @__PURE__ */ (0,
|
|
2256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2060
2257
|
"a",
|
|
2061
2258
|
{
|
|
2062
2259
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -2077,7 +2274,7 @@ function PaginationPrevious({
|
|
|
2077
2274
|
className,
|
|
2078
2275
|
...props
|
|
2079
2276
|
}) {
|
|
2080
|
-
return /* @__PURE__ */ (0,
|
|
2277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2081
2278
|
PaginationLink,
|
|
2082
2279
|
{
|
|
2083
2280
|
"aria-label": "Go to previous page",
|
|
@@ -2085,8 +2282,8 @@ function PaginationPrevious({
|
|
|
2085
2282
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
2086
2283
|
...props,
|
|
2087
2284
|
children: [
|
|
2088
|
-
/* @__PURE__ */ (0,
|
|
2089
|
-
/* @__PURE__ */ (0,
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChevronLeft, {}),
|
|
2286
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
2090
2287
|
]
|
|
2091
2288
|
}
|
|
2092
2289
|
);
|
|
@@ -2095,7 +2292,7 @@ function PaginationNext({
|
|
|
2095
2292
|
className,
|
|
2096
2293
|
...props
|
|
2097
2294
|
}) {
|
|
2098
|
-
return /* @__PURE__ */ (0,
|
|
2295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2099
2296
|
PaginationLink,
|
|
2100
2297
|
{
|
|
2101
2298
|
"aria-label": "Go to next page",
|
|
@@ -2103,8 +2300,8 @@ function PaginationNext({
|
|
|
2103
2300
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
2104
2301
|
...props,
|
|
2105
2302
|
children: [
|
|
2106
|
-
/* @__PURE__ */ (0,
|
|
2107
|
-
/* @__PURE__ */ (0,
|
|
2303
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChevronRight, {})
|
|
2108
2305
|
]
|
|
2109
2306
|
}
|
|
2110
2307
|
);
|
|
@@ -2113,7 +2310,7 @@ function PaginationEllipsis({
|
|
|
2113
2310
|
className,
|
|
2114
2311
|
...props
|
|
2115
2312
|
}) {
|
|
2116
|
-
return /* @__PURE__ */ (0,
|
|
2313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2117
2314
|
"span",
|
|
2118
2315
|
{
|
|
2119
2316
|
"aria-hidden": true,
|
|
@@ -2121,15 +2318,15 @@ function PaginationEllipsis({
|
|
|
2121
2318
|
className: cn("flex size-9 items-center justify-center", className),
|
|
2122
2319
|
...props,
|
|
2123
2320
|
children: [
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2125
|
-
/* @__PURE__ */ (0,
|
|
2321
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Ellipsis, { className: "size-4" }),
|
|
2322
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
2126
2323
|
]
|
|
2127
2324
|
}
|
|
2128
2325
|
);
|
|
2129
2326
|
}
|
|
2130
2327
|
|
|
2131
2328
|
// src/components/DataDisplay/Pagination/Pagination.tsx
|
|
2132
|
-
var
|
|
2329
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2133
2330
|
var CustomPagination = ({
|
|
2134
2331
|
totalPages,
|
|
2135
2332
|
currentPage,
|
|
@@ -2171,15 +2368,15 @@ var CustomPagination = ({
|
|
|
2171
2368
|
}
|
|
2172
2369
|
};
|
|
2173
2370
|
const pageNumbers = getPageNumbers();
|
|
2174
|
-
return /* @__PURE__ */ (0,
|
|
2175
|
-
/* @__PURE__ */ (0,
|
|
2371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(PaginationContent, { children: [
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2176
2373
|
PaginationPrevious,
|
|
2177
2374
|
{
|
|
2178
2375
|
onClick: () => handlePageChange(currentPage - 1),
|
|
2179
2376
|
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
2180
2377
|
}
|
|
2181
2378
|
) }),
|
|
2182
|
-
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0,
|
|
2379
|
+
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2183
2380
|
PaginationLink,
|
|
2184
2381
|
{
|
|
2185
2382
|
onClick: () => handlePageChange(pageNumber),
|
|
@@ -2188,7 +2385,7 @@ var CustomPagination = ({
|
|
|
2188
2385
|
children: pageNumber
|
|
2189
2386
|
}
|
|
2190
2387
|
) }, index)),
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2192
2389
|
PaginationNext,
|
|
2193
2390
|
{
|
|
2194
2391
|
onClick: () => handlePageChange(currentPage + 1),
|
|
@@ -2201,7 +2398,7 @@ var Pagination_default = CustomPagination;
|
|
|
2201
2398
|
|
|
2202
2399
|
// src/components/DataDisplay/Table/Table.tsx
|
|
2203
2400
|
var import_react13 = require("react");
|
|
2204
|
-
var
|
|
2401
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2205
2402
|
var Table2 = ({
|
|
2206
2403
|
columns,
|
|
2207
2404
|
data,
|
|
@@ -2224,8 +2421,8 @@ var Table2 = ({
|
|
|
2224
2421
|
onPageChange?.(page);
|
|
2225
2422
|
};
|
|
2226
2423
|
const paginatedData = enablePagination ? rawData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage) : rawData;
|
|
2227
|
-
return /* @__PURE__ */ (0,
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
2424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: `${className} space-y-3`, style, children: [
|
|
2425
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2229
2426
|
DataTable,
|
|
2230
2427
|
{
|
|
2231
2428
|
...props,
|
|
@@ -2235,7 +2432,7 @@ var Table2 = ({
|
|
|
2235
2432
|
loading
|
|
2236
2433
|
}
|
|
2237
2434
|
),
|
|
2238
|
-
enablePagination && /* @__PURE__ */ (0,
|
|
2435
|
+
enablePagination && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2239
2436
|
Pagination_default,
|
|
2240
2437
|
{
|
|
2241
2438
|
totalPages: Math.ceil(rawData.length / itemsPerPage),
|
|
@@ -2247,137 +2444,37 @@ var Table2 = ({
|
|
|
2247
2444
|
};
|
|
2248
2445
|
var Table_default = Table2;
|
|
2249
2446
|
|
|
2250
|
-
// src/components/ui/dropdown-menu.tsx
|
|
2251
|
-
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2252
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2253
|
-
function DropdownMenu({
|
|
2254
|
-
...props
|
|
2255
|
-
}) {
|
|
2256
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
2257
|
-
}
|
|
2258
|
-
function DropdownMenuTrigger({
|
|
2259
|
-
...props
|
|
2260
|
-
}) {
|
|
2261
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2262
|
-
DropdownMenuPrimitive.Trigger,
|
|
2263
|
-
{
|
|
2264
|
-
"data-slot": "dropdown-menu-trigger",
|
|
2265
|
-
...props
|
|
2266
|
-
}
|
|
2267
|
-
);
|
|
2268
|
-
}
|
|
2269
|
-
function DropdownMenuContent({
|
|
2270
|
-
className,
|
|
2271
|
-
sideOffset = 4,
|
|
2272
|
-
...props
|
|
2273
|
-
}) {
|
|
2274
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2275
|
-
DropdownMenuPrimitive.Content,
|
|
2276
|
-
{
|
|
2277
|
-
"data-slot": "dropdown-menu-content",
|
|
2278
|
-
sideOffset,
|
|
2279
|
-
className: cn(
|
|
2280
|
-
"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",
|
|
2281
|
-
className
|
|
2282
|
-
),
|
|
2283
|
-
...props
|
|
2284
|
-
}
|
|
2285
|
-
) });
|
|
2286
|
-
}
|
|
2287
|
-
function DropdownMenuItem({
|
|
2288
|
-
className,
|
|
2289
|
-
inset,
|
|
2290
|
-
variant = "default",
|
|
2291
|
-
...props
|
|
2292
|
-
}) {
|
|
2293
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2294
|
-
DropdownMenuPrimitive.Item,
|
|
2295
|
-
{
|
|
2296
|
-
"data-slot": "dropdown-menu-item",
|
|
2297
|
-
"data-inset": inset,
|
|
2298
|
-
"data-variant": variant,
|
|
2299
|
-
className: cn(
|
|
2300
|
-
"focus:bg-accent focus:text-accent-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",
|
|
2301
|
-
className
|
|
2302
|
-
),
|
|
2303
|
-
...props
|
|
2304
|
-
}
|
|
2305
|
-
);
|
|
2306
|
-
}
|
|
2307
|
-
function DropdownMenuLabel({
|
|
2308
|
-
className,
|
|
2309
|
-
inset,
|
|
2310
|
-
...props
|
|
2311
|
-
}) {
|
|
2312
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2313
|
-
DropdownMenuPrimitive.Label,
|
|
2314
|
-
{
|
|
2315
|
-
"data-slot": "dropdown-menu-label",
|
|
2316
|
-
"data-inset": inset,
|
|
2317
|
-
className: cn(
|
|
2318
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
2319
|
-
className
|
|
2320
|
-
),
|
|
2321
|
-
...props
|
|
2322
|
-
}
|
|
2323
|
-
);
|
|
2324
|
-
}
|
|
2325
|
-
function DropdownMenuSeparator({
|
|
2326
|
-
className,
|
|
2327
|
-
...props
|
|
2328
|
-
}) {
|
|
2329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2330
|
-
DropdownMenuPrimitive.Separator,
|
|
2331
|
-
{
|
|
2332
|
-
"data-slot": "dropdown-menu-separator",
|
|
2333
|
-
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
2334
|
-
...props
|
|
2335
|
-
}
|
|
2336
|
-
);
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
2447
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
2340
|
-
var
|
|
2341
|
-
var Tabs = ({ tabs,
|
|
2448
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2449
|
+
var Tabs = ({ className, style, tabs, verticalMenu, LinkComponent, pathname, canvasMode }) => {
|
|
2342
2450
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
2343
|
-
const baseClasses = "text-[12px] text-
|
|
2451
|
+
const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
|
|
2344
2452
|
const activeClasses = "bg-white/10 text-white";
|
|
2345
2453
|
const hoverClasses = "hover:bg-white/5";
|
|
2346
2454
|
const isActive = (path) => {
|
|
2347
2455
|
if (!path) return false;
|
|
2348
2456
|
return pathname === path || path !== "/" && pathname?.startsWith(path);
|
|
2349
2457
|
};
|
|
2350
|
-
|
|
2351
|
-
const finalClasses = [
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2360
|
-
DropdownMenuTrigger,
|
|
2361
|
-
{
|
|
2362
|
-
className: `${finalClasses} inline-flex items-center gap-1`,
|
|
2363
|
-
children: [
|
|
2364
|
-
tab.header,
|
|
2365
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
2366
|
-
]
|
|
2367
|
-
}
|
|
2368
|
-
),
|
|
2369
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2458
|
+
const renderDesktopTab = (tab, index) => {
|
|
2459
|
+
const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
|
|
2460
|
+
if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
|
|
2461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenu, { children: [
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
|
|
2463
|
+
tab.header,
|
|
2464
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
2465
|
+
] }),
|
|
2466
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2370
2467
|
DropdownMenuContent,
|
|
2371
2468
|
{
|
|
2372
2469
|
align: "start",
|
|
2373
2470
|
sideOffset: 6,
|
|
2374
2471
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
2375
|
-
children: tab.children.map((item) => /* @__PURE__ */ (0,
|
|
2472
|
+
children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2376
2473
|
DropdownMenuItem,
|
|
2377
2474
|
{
|
|
2378
2475
|
asChild: true,
|
|
2379
2476
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
2380
|
-
children: LinkComponent ? /* @__PURE__ */ (0,
|
|
2477
|
+
children: LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LinkComponent, { href: item.url || "#", children: item.header }) : item.header
|
|
2381
2478
|
},
|
|
2382
2479
|
item.id
|
|
2383
2480
|
))
|
|
@@ -2385,19 +2482,66 @@ var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
|
2385
2482
|
)
|
|
2386
2483
|
] }, index);
|
|
2387
2484
|
}
|
|
2388
|
-
return tab.url && LinkComponent ? /* @__PURE__ */ (0,
|
|
2389
|
-
}
|
|
2485
|
+
return tab.url && LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LinkComponent, { href: tab.url, className: finalClasses, style: tab.style, children: tab.header }, index) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
2486
|
+
};
|
|
2487
|
+
const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenu, { children: [
|
|
2488
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
|
|
2489
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Menu, { className: "h-4 w-4" }),
|
|
2490
|
+
"Menu"
|
|
2491
|
+
] }),
|
|
2492
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2493
|
+
DropdownMenuContent,
|
|
2494
|
+
{
|
|
2495
|
+
align: "start",
|
|
2496
|
+
sideOffset: 6,
|
|
2497
|
+
className: "z-50 w-56 rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
2498
|
+
children: rawTabs.map((tab, i) => {
|
|
2499
|
+
const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
2500
|
+
if (hasChildren) {
|
|
2501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenuSub, { children: [
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2504
|
+
DropdownMenuItem,
|
|
2505
|
+
{
|
|
2506
|
+
asChild: true,
|
|
2507
|
+
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
|
|
2508
|
+
children: LinkComponent && item.url ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LinkComponent, { href: item.url || "#", children: item.header }) : item.header
|
|
2509
|
+
},
|
|
2510
|
+
item.id
|
|
2511
|
+
)) })
|
|
2512
|
+
] }, i);
|
|
2513
|
+
}
|
|
2514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2515
|
+
DropdownMenuItem,
|
|
2516
|
+
{
|
|
2517
|
+
asChild: true,
|
|
2518
|
+
className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
|
|
2519
|
+
children: LinkComponent && tab.url ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LinkComponent, { href: tab.url || "#", children: tab.header }) : tab.header
|
|
2520
|
+
},
|
|
2521
|
+
i
|
|
2522
|
+
);
|
|
2523
|
+
})
|
|
2524
|
+
}
|
|
2525
|
+
)
|
|
2526
|
+
] });
|
|
2527
|
+
const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
|
|
2528
|
+
const forceDesktop = canvasMode === "desktop";
|
|
2529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className, style, children: [
|
|
2530
|
+
forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
|
|
2531
|
+
forceMobile && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { children: renderMobileMenu() }),
|
|
2532
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "md:hidden", children: renderMobileMenu() })
|
|
2533
|
+
] });
|
|
2390
2534
|
};
|
|
2391
2535
|
var Tabs_default = Tabs;
|
|
2392
2536
|
|
|
2393
2537
|
// src/components/Navigation/Stages/Stages.tsx
|
|
2394
2538
|
var import_react14 = __toESM(require("react"));
|
|
2395
|
-
var
|
|
2539
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2396
2540
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
2397
|
-
return /* @__PURE__ */ (0,
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
2399
|
-
/* @__PURE__ */ (0,
|
|
2400
|
-
/* @__PURE__ */ (0,
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react14.default.Fragment, { children: [
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2401
2545
|
"button",
|
|
2402
2546
|
{
|
|
2403
2547
|
className: `
|
|
@@ -2405,89 +2549,34 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
|
2405
2549
|
children: stage.header
|
|
2406
2550
|
}
|
|
2407
2551
|
),
|
|
2408
|
-
index < stages.length - 1 && /* @__PURE__ */ (0,
|
|
2552
|
+
index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
2409
2553
|
] }, stage.id)) }),
|
|
2410
|
-
isShowBtn && /* @__PURE__ */ (0,
|
|
2554
|
+
isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
|
|
2411
2555
|
] }) });
|
|
2412
2556
|
};
|
|
2413
2557
|
var Stages_default = StagesComponent;
|
|
2414
2558
|
|
|
2415
2559
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
2416
|
-
var
|
|
2560
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2417
2561
|
var Spacer = ({ className, style }) => {
|
|
2418
|
-
return /* @__PURE__ */ (0,
|
|
2562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: `${className}`, style });
|
|
2419
2563
|
};
|
|
2420
2564
|
var Spacer_default = Spacer;
|
|
2421
2565
|
|
|
2422
2566
|
// src/components/Navigation/Profile/Profile.tsx
|
|
2423
|
-
var
|
|
2424
|
-
var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
2425
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
|
|
2426
|
-
showName && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
|
|
2427
|
-
profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2428
|
-
"img",
|
|
2429
|
-
{
|
|
2430
|
-
src: "https://builder.development.algorithmshift.ai/images/toolset/profile.svg",
|
|
2431
|
-
alt: "auto",
|
|
2432
|
-
width: 24,
|
|
2433
|
-
height: 24
|
|
2434
|
-
}
|
|
2435
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "w-6 h-6 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "A" })
|
|
2436
|
-
] }) });
|
|
2437
|
-
};
|
|
2438
|
-
var Profile_default = Profile;
|
|
2567
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2439
2568
|
|
|
2440
2569
|
// src/components/Navigation/Notification/Notification.tsx
|
|
2441
|
-
var
|
|
2442
|
-
var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhenZero }) => {
|
|
2443
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
|
|
2444
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2445
|
-
"img",
|
|
2446
|
-
{
|
|
2447
|
-
src: "https://builder.development.algorithmshift.ai/images/toolset/notification.svg",
|
|
2448
|
-
alt: "auto",
|
|
2449
|
-
width: 18,
|
|
2450
|
-
height: 18
|
|
2451
|
-
}
|
|
2452
|
-
),
|
|
2453
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-[10px] text-[#fff] bg-[#FF4A4A] w-[20px] h-[20px] rounded-full absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 leading-[20px]", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-[#FF4A4A] w-[10px] h-[10px] rounded-full absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 leading-[20px]" })
|
|
2454
|
-
] }) });
|
|
2455
|
-
};
|
|
2456
|
-
var Notification_default = Notification;
|
|
2457
|
-
|
|
2458
|
-
// src/assets/logo_placeholder.png
|
|
2459
|
-
var logo_placeholder_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAGPCAYAAAC552DlAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nO3d6X+V5Z0/8G8WEhIgSBKWkLCECFIJAoILdRRU3NsBtXVrq+PymmkfzuN5MP0L5pmvdtpqX3aqti5V61jrVm2p24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THY21BboqKiuKqq66Ku+++e1AcBH9VY2Nj3HfffTFq1KhCt3JS9fX1gyrcMK8AzuAABlBTU1PcfPPNA3IdcH8NHTo0lixZEvX19fH8888PyKm1xcXFccstt8Q555yT97FyUVpaGt///vfjiSeeiIMHDxa6nROyts4cI0aMiP/8z/8sdBvJqqioiFtuuSUmT55c6FaOq7q6Ou6666546KGHYs+ePYVu55jKy8vj+9///pe3ki408wpw1OCInIHT3syZM+P2229P4gD0qy644IK47bbbBuRD7JIlSwZNuPGF0tLSuPHGGwfdt4FfZW1BbkaMGBH33HPPoD4I/sLIkSPjRz/60aDbtPML119/fYwcObLQbUSEeQX4KgEHkHdz5syJG2+8MW93Acm3adOmxR133JHX/hcuXBgzZ87MW/3+KC8vj+uvv77QbRyTtQW5qaqqinvvvXdQh5XfNGrUqPje9743YHdAytWkSZPivPPOK3QbEWFeAb5JwAHk1bnnnhvf+c53kv8g09jYGDfffHNeXkdjY2NcdtllmdfN0mDc08LagtxUVFTEnXfeOWjOOOiLxsbGuOKKKwrdxpdKSkriuuuuK3QbEWFeAY5FwAHkTV1dXSxevHjQbMDWX9/61rfiqquuyrRmZWVlLFmyxMFtH1lbkJvi4uK49dZbo6amptCtnLJvf/vbUVdXV+g2IuLo2Qdjx44tdBvmFeA4To9PhsCgU15eHt/73veirKys0K1kav78+XHuuedmVu/qq6+OqqqqzOqdCawtyN1VV10VkyZNKnQb/VJcXBzf/e53BcFfYV4Bjs3OZkBeXHvttVFdXV3oNvLihhtuiM8++yza29v7VaehoWHQXMedEmsLcjNp0qS46KKLMq3Z29sbGzZsiE8//TS2bdsWu3btis7OzoiIGD58eIwfPz6amppi2rRpmYaQdXV1MWfOnHj33Xczq5kq8wpwfAIOIHONjY0xe/bsQreRN5WVlXHdddfFk08+2a8611xzjW+u+sjagtyUlJRk/u346tWr49VXX43W1tZj/ry9vT0+//zzWLFiRVRWVsaCBQti3rx5mV1K9k//9E/x3nvvndG3VjavACfmEhUgU0VFRXHDDTcUuo28a25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AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5/w8RG1j/1Z36RAAAAABJRU5ErkJggg==";
|
|
2570
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2460
2571
|
|
|
2461
2572
|
// src/components/Navigation/Logo/Logo.tsx
|
|
2462
|
-
var
|
|
2463
|
-
var Logo = ({
|
|
2464
|
-
className,
|
|
2465
|
-
style,
|
|
2466
|
-
imageUrl,
|
|
2467
|
-
altText = "Preview"
|
|
2468
|
-
}) => {
|
|
2469
|
-
if (!imageUrl) {
|
|
2470
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2471
|
-
"div",
|
|
2472
|
-
{
|
|
2473
|
-
className: cn(
|
|
2474
|
-
className,
|
|
2475
|
-
"p-0"
|
|
2476
|
-
),
|
|
2477
|
-
style,
|
|
2478
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("img", { src: logo_placeholder_default, alt: altText, className: "opacity-50", width: 150, height: 80 })
|
|
2479
|
-
}
|
|
2480
|
-
);
|
|
2481
|
-
}
|
|
2482
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("img", { src: imageUrl, alt: altText, className, style });
|
|
2483
|
-
};
|
|
2484
|
-
var Logo_default = Logo;
|
|
2573
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2485
2574
|
|
|
2486
2575
|
// src/components/ui/avatar.tsx
|
|
2487
2576
|
var React16 = __toESM(require("react"));
|
|
2488
2577
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
|
|
2489
|
-
var
|
|
2490
|
-
var Avatar = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2578
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2579
|
+
var Avatar = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2491
2580
|
AvatarPrimitive.Root,
|
|
2492
2581
|
{
|
|
2493
2582
|
ref,
|
|
@@ -2499,7 +2588,7 @@ var Avatar = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
2499
2588
|
}
|
|
2500
2589
|
));
|
|
2501
2590
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
2502
|
-
var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2591
|
+
var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2503
2592
|
AvatarPrimitive.Image,
|
|
2504
2593
|
{
|
|
2505
2594
|
ref,
|
|
@@ -2508,7 +2597,7 @@ var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2508
2597
|
}
|
|
2509
2598
|
));
|
|
2510
2599
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
2511
|
-
var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2600
|
+
var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2512
2601
|
AvatarPrimitive.Fallback,
|
|
2513
2602
|
{
|
|
2514
2603
|
ref,
|
|
@@ -2522,7 +2611,7 @@ var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2522
2611
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
2523
2612
|
|
|
2524
2613
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
2525
|
-
var
|
|
2614
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2526
2615
|
function Navbar({
|
|
2527
2616
|
style,
|
|
2528
2617
|
badgeType,
|
|
@@ -2534,64 +2623,82 @@ function Navbar({
|
|
|
2534
2623
|
altText = "Logo",
|
|
2535
2624
|
canvasMode = "desktop",
|
|
2536
2625
|
LinkComponent,
|
|
2537
|
-
ImageComponent
|
|
2626
|
+
ImageComponent,
|
|
2627
|
+
list = [],
|
|
2628
|
+
userName = "Guest User"
|
|
2538
2629
|
}) {
|
|
2539
2630
|
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
2540
|
-
return /* @__PURE__ */ (0,
|
|
2541
|
-
LinkComponent && ImageComponent ? /* @__PURE__ */ (0,
|
|
2542
|
-
/* @__PURE__ */ (0,
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-2", children: [
|
|
2632
|
+
LinkComponent && ImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LinkComponent, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ImageComponent, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }),
|
|
2633
|
+
!isMobileView && LinkComponent && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2634
|
+
LinkComponent,
|
|
2635
|
+
{
|
|
2636
|
+
href: item.url || "#",
|
|
2637
|
+
className: "text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",
|
|
2638
|
+
children: item.header
|
|
2639
|
+
},
|
|
2640
|
+
item.id
|
|
2641
|
+
)) }),
|
|
2642
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
2643
|
+
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
2645
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
2646
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2547
2647
|
Button,
|
|
2548
2648
|
{
|
|
2549
2649
|
variant: "ghost",
|
|
2550
2650
|
size: "icon",
|
|
2551
2651
|
className: "border border-gray-400",
|
|
2552
|
-
children: /* @__PURE__ */ (0,
|
|
2652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Search, { className: "h-5 w-5 text-gray-400" })
|
|
2553
2653
|
}
|
|
2554
2654
|
),
|
|
2555
|
-
/* @__PURE__ */ (0,
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2557
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
|
|
2656
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F]" }) }),
|
|
2657
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
2558
2658
|
] }),
|
|
2559
|
-
/* @__PURE__ */ (0,
|
|
2560
|
-
/* @__PURE__ */ (0,
|
|
2561
|
-
!isMobileView && showName && /* @__PURE__ */ (0,
|
|
2562
|
-
!isMobileView ? /* @__PURE__ */ (0,
|
|
2563
|
-
/* @__PURE__ */ (0,
|
|
2659
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
2661
|
+
!isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h4", { className: "text-[#000000] text-[13px] font-[500] mb-0", children: userName }),
|
|
2662
|
+
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2564
2664
|
AvatarImage,
|
|
2565
2665
|
{
|
|
2566
2666
|
src: "/images/appbuilder/toolset/profile.svg",
|
|
2567
|
-
alt: "
|
|
2667
|
+
alt: "Profile"
|
|
2568
2668
|
}
|
|
2569
|
-
) : /* @__PURE__ */ (0,
|
|
2570
|
-
/* @__PURE__ */ (0,
|
|
2669
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2571
2671
|
Button,
|
|
2572
2672
|
{
|
|
2573
2673
|
variant: "ghost",
|
|
2574
2674
|
size: "icon",
|
|
2575
2675
|
className: "text-gray-900 md:hidden",
|
|
2576
|
-
children: /* @__PURE__ */ (0,
|
|
2676
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Menu, { className: "h-6 w-6" })
|
|
2577
2677
|
}
|
|
2578
2678
|
)
|
|
2579
|
-
] }) : /* @__PURE__ */ (0,
|
|
2679
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2580
2680
|
Button,
|
|
2581
2681
|
{
|
|
2582
2682
|
variant: "ghost",
|
|
2583
2683
|
size: "icon",
|
|
2584
2684
|
className: "text-gray-900",
|
|
2585
|
-
children: /* @__PURE__ */ (0,
|
|
2685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Menu, { className: "h-6 w-6" })
|
|
2586
2686
|
}
|
|
2587
2687
|
)
|
|
2588
2688
|
] }) }),
|
|
2589
|
-
/* @__PURE__ */ (0,
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2592
|
-
/* @__PURE__ */ (0,
|
|
2593
|
-
|
|
2594
|
-
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white", children: [
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuLabel, { className: "text-black", children: "My Account" }),
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuSeparator, {}),
|
|
2692
|
+
LinkComponent && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2693
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LinkComponent, { href: "/profile", children: "Profile" }) }),
|
|
2694
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LinkComponent, { href: "/settings", children: "Settings" }) }),
|
|
2695
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LinkComponent, { href: "/logout", children: "Logout" }) }),
|
|
2696
|
+
list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-full bg-[#656565] opacity-30 h-[1px] my-2" }),
|
|
2698
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuLabel, { className: "text-black", children: "Main Menu" }),
|
|
2699
|
+
list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LinkComponent, { href: item.url || "#", children: item.header }) }, item.id))
|
|
2700
|
+
] })
|
|
2701
|
+
] })
|
|
2595
2702
|
] })
|
|
2596
2703
|
] })
|
|
2597
2704
|
] })
|
|
@@ -2600,28 +2707,28 @@ function Navbar({
|
|
|
2600
2707
|
|
|
2601
2708
|
// src/components/Chart/BarChart.tsx
|
|
2602
2709
|
var import_recharts = require("recharts");
|
|
2603
|
-
var
|
|
2710
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2604
2711
|
var ChartComponent = ({ className, style, ...props }) => {
|
|
2605
2712
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
2606
2713
|
const chartType = props.chartType || "bar";
|
|
2607
2714
|
const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
|
|
2608
|
-
return /* @__PURE__ */ (0,
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2610
|
-
/* @__PURE__ */ (0,
|
|
2611
|
-
/* @__PURE__ */ (0,
|
|
2612
|
-
/* @__PURE__ */ (0,
|
|
2613
|
-
/* @__PURE__ */ (0,
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2615
|
-
] }) : /* @__PURE__ */ (0,
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: `${className} h-[400px]`, style, children: data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_recharts.BarChart, { data, children: [
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
2717
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.XAxis, { dataKey: "name" }),
|
|
2718
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.YAxis, {}),
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.Tooltip, {}),
|
|
2720
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
2721
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.Bar, { dataKey: "value", fill: "#00695C" })
|
|
2722
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_recharts.AreaChart, { data, children: [
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
2619
2726
|
] }) }),
|
|
2620
|
-
/* @__PURE__ */ (0,
|
|
2621
|
-
/* @__PURE__ */ (0,
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2623
|
-
/* @__PURE__ */ (0,
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.XAxis, { dataKey: "name" }),
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.YAxis, {}),
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts.Tooltip, {}),
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2625
2732
|
import_recharts.Area,
|
|
2626
2733
|
{
|
|
2627
2734
|
type: "monotone",
|
|
@@ -2637,7 +2744,7 @@ var BarChart_default = ChartComponent;
|
|
|
2637
2744
|
|
|
2638
2745
|
// src/components/Chart/PieChart.tsx
|
|
2639
2746
|
var import_recharts2 = require("recharts");
|
|
2640
|
-
var
|
|
2747
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2641
2748
|
var DonutChart = ({ className, style, ...props }) => {
|
|
2642
2749
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
2643
2750
|
const total = data.reduce((sum, d) => sum + d.value, 0);
|
|
@@ -2648,7 +2755,7 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2648
2755
|
const renderLabel = ({ value, x, y }) => {
|
|
2649
2756
|
if (value == null) return null;
|
|
2650
2757
|
const percentage = (Number(value) / total * 100).toFixed(0);
|
|
2651
|
-
return /* @__PURE__ */ (0,
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2652
2759
|
"text",
|
|
2653
2760
|
{
|
|
2654
2761
|
x,
|
|
@@ -2670,33 +2777,33 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2670
2777
|
const wrapperClass = canvasMode ? forceDesktop ? "flex-row" : "flex-col" : "flex-col md:flex-row";
|
|
2671
2778
|
const renderLegends = () => {
|
|
2672
2779
|
if (!showLegends) return null;
|
|
2673
|
-
return /* @__PURE__ */ (0,
|
|
2780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2674
2781
|
"div",
|
|
2675
2782
|
{
|
|
2676
2783
|
className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
|
|
2677
2784
|
children: [
|
|
2678
|
-
/* @__PURE__ */ (0,
|
|
2785
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2679
2786
|
"span",
|
|
2680
2787
|
{
|
|
2681
2788
|
className: "inline-block w-[16px] h-[16px] rounded",
|
|
2682
2789
|
style: { backgroundColor: d.color }
|
|
2683
2790
|
}
|
|
2684
2791
|
),
|
|
2685
|
-
/* @__PURE__ */ (0,
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
|
|
2686
2793
|
]
|
|
2687
2794
|
},
|
|
2688
2795
|
d.name
|
|
2689
2796
|
)) });
|
|
2690
2797
|
};
|
|
2691
|
-
return /* @__PURE__ */ (0,
|
|
2798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2692
2799
|
"div",
|
|
2693
2800
|
{
|
|
2694
2801
|
className: `relative flex items-center ${wrapperClass} ${className}`,
|
|
2695
2802
|
style,
|
|
2696
2803
|
children: [
|
|
2697
|
-
/* @__PURE__ */ (0,
|
|
2698
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
2699
|
-
/* @__PURE__ */ (0,
|
|
2804
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
|
|
2805
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_recharts2.PieChart, { children: [
|
|
2806
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2700
2807
|
import_recharts2.Pie,
|
|
2701
2808
|
{
|
|
2702
2809
|
data,
|
|
@@ -2708,8 +2815,8 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2708
2815
|
labelLine: false,
|
|
2709
2816
|
isAnimationActive: false,
|
|
2710
2817
|
children: [
|
|
2711
|
-
data.map((entry, index) => /* @__PURE__ */ (0,
|
|
2712
|
-
/* @__PURE__ */ (0,
|
|
2818
|
+
data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
|
|
2819
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2713
2820
|
import_recharts2.LabelList,
|
|
2714
2821
|
{
|
|
2715
2822
|
dataKey: "value",
|
|
@@ -2720,14 +2827,14 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2720
2827
|
]
|
|
2721
2828
|
}
|
|
2722
2829
|
),
|
|
2723
|
-
/* @__PURE__ */ (0,
|
|
2830
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_recharts2.Tooltip, { formatter: (value, name) => [`${value}k`, name] })
|
|
2724
2831
|
] }) }),
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-2xl md:text-4xl font-bold text-[#000]", children: [
|
|
2726
2833
|
total,
|
|
2727
2834
|
"k"
|
|
2728
2835
|
] })
|
|
2729
2836
|
] }),
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `flex ${forceDesktop ? "flex-col ml-auto space-y-3" : "flex-wrap justify-center gap-2 mt-4"}
|
|
2731
2838
|
w-full md:w-auto`, children: renderLegends() })
|
|
2732
2839
|
]
|
|
2733
2840
|
}
|
|
@@ -2736,10 +2843,10 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2736
2843
|
var PieChart_default = DonutChart;
|
|
2737
2844
|
|
|
2738
2845
|
// src/components/Blocks/EmailComposer.tsx
|
|
2739
|
-
var
|
|
2846
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2740
2847
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
2741
|
-
return /* @__PURE__ */ (0,
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2743
2850
|
"input",
|
|
2744
2851
|
{
|
|
2745
2852
|
type: "email",
|
|
@@ -2748,8 +2855,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2748
2855
|
required: true
|
|
2749
2856
|
}
|
|
2750
2857
|
) }),
|
|
2751
|
-
/* @__PURE__ */ (0,
|
|
2752
|
-
/* @__PURE__ */ (0,
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2753
2860
|
"input",
|
|
2754
2861
|
{
|
|
2755
2862
|
type: "email",
|
|
@@ -2760,7 +2867,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2760
2867
|
required: true
|
|
2761
2868
|
}
|
|
2762
2869
|
),
|
|
2763
|
-
!showCc && /* @__PURE__ */ (0,
|
|
2870
|
+
!showCc && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2764
2871
|
"button",
|
|
2765
2872
|
{
|
|
2766
2873
|
onClick: () => setShowCc?.(true),
|
|
@@ -2768,7 +2875,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2768
2875
|
children: "Cc"
|
|
2769
2876
|
}
|
|
2770
2877
|
),
|
|
2771
|
-
!showBcc && /* @__PURE__ */ (0,
|
|
2878
|
+
!showBcc && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2772
2879
|
"button",
|
|
2773
2880
|
{
|
|
2774
2881
|
onClick: () => setShowBcc?.(true),
|
|
@@ -2777,7 +2884,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2777
2884
|
}
|
|
2778
2885
|
)
|
|
2779
2886
|
] }) }),
|
|
2780
|
-
showCc && /* @__PURE__ */ (0,
|
|
2887
|
+
showCc && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2781
2888
|
"input",
|
|
2782
2889
|
{
|
|
2783
2890
|
type: "text",
|
|
@@ -2787,7 +2894,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2787
2894
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
2788
2895
|
}
|
|
2789
2896
|
) }),
|
|
2790
|
-
showBcc && /* @__PURE__ */ (0,
|
|
2897
|
+
showBcc && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2791
2898
|
"input",
|
|
2792
2899
|
{
|
|
2793
2900
|
type: "text",
|
|
@@ -2797,7 +2904,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2797
2904
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
2798
2905
|
}
|
|
2799
2906
|
) }),
|
|
2800
|
-
/* @__PURE__ */ (0,
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2801
2908
|
"input",
|
|
2802
2909
|
{
|
|
2803
2910
|
type: "text",
|
|
@@ -2807,11 +2914,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2807
2914
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
2808
2915
|
}
|
|
2809
2916
|
) }),
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
2811
|
-
/* @__PURE__ */ (0,
|
|
2812
|
-
/* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MyEditor, { value: body, onChange: setBody }) }),
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
2919
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
2920
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
2921
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
2815
2922
|
] })
|
|
2816
2923
|
] }) });
|
|
2817
2924
|
}
|
|
@@ -2867,11 +2974,11 @@ function stateReducer(state, action) {
|
|
|
2867
2974
|
}
|
|
2868
2975
|
|
|
2869
2976
|
// src/components/StateManagment/StateContext.tsx
|
|
2870
|
-
var
|
|
2977
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2871
2978
|
var StateContext = (0, import_react15.createContext)(null);
|
|
2872
2979
|
function StateProvider({ children }) {
|
|
2873
2980
|
const [state, dispatch] = (0, import_react15.useReducer)(stateReducer, {});
|
|
2874
|
-
return /* @__PURE__ */ (0,
|
|
2981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StateContext.Provider, { value: { state, dispatch }, children });
|
|
2875
2982
|
}
|
|
2876
2983
|
function useAppState() {
|
|
2877
2984
|
return (0, import_react15.useContext)(StateContext);
|
|
@@ -2882,7 +2989,7 @@ var import_react16 = __toESM(require("react"));
|
|
|
2882
2989
|
var import_zod = require("@hookform/resolvers/zod");
|
|
2883
2990
|
var import_react_hook_form = require("react-hook-form");
|
|
2884
2991
|
var import_zod2 = require("zod");
|
|
2885
|
-
var
|
|
2992
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2886
2993
|
function generateZodSchema(data) {
|
|
2887
2994
|
const fields = data.reduce((acc, f) => {
|
|
2888
2995
|
const name = f.name || "unnamed";
|
|
@@ -2978,7 +3085,7 @@ var FormWrapper = ({
|
|
|
2978
3085
|
reset();
|
|
2979
3086
|
if (onReset) onReset();
|
|
2980
3087
|
};
|
|
2981
|
-
return /* @__PURE__ */ (0,
|
|
3088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2982
3089
|
"form",
|
|
2983
3090
|
{
|
|
2984
3091
|
onSubmit: handleSubmit(formSubmit),
|
|
@@ -2986,13 +3093,13 @@ var FormWrapper = ({
|
|
|
2986
3093
|
className: cn(
|
|
2987
3094
|
"space-y-4 min-h-[100px] h-auto flex justify-between flex-col"
|
|
2988
3095
|
),
|
|
2989
|
-
children: /* @__PURE__ */ (0,
|
|
3096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-h-[50px]", children: import_react16.default.Children.map(children, (child) => {
|
|
2990
3097
|
const processChild = (child2) => {
|
|
2991
3098
|
if (import_react16.default.isValidElement(child2)) {
|
|
2992
3099
|
const node = child2.props?.node;
|
|
2993
3100
|
if (node?.category === "Form Controls") {
|
|
2994
3101
|
const name = node.properties?.name || "unnamed";
|
|
2995
|
-
return /* @__PURE__ */ (0,
|
|
3102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2996
3103
|
import_react_hook_form.Controller,
|
|
2997
3104
|
{
|
|
2998
3105
|
name,
|
|
@@ -3032,7 +3139,9 @@ var Wrapper_default = FormWrapper;
|
|
|
3032
3139
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3033
3140
|
0 && (module.exports = {
|
|
3034
3141
|
BarChart,
|
|
3142
|
+
Breadcrumb,
|
|
3035
3143
|
Button,
|
|
3144
|
+
ButtonGroup,
|
|
3036
3145
|
Checkbox,
|
|
3037
3146
|
Container,
|
|
3038
3147
|
DatePicker,
|
|
@@ -3045,17 +3154,14 @@ var Wrapper_default = FormWrapper;
|
|
|
3045
3154
|
Form,
|
|
3046
3155
|
GridLayout,
|
|
3047
3156
|
Image,
|
|
3048
|
-
Logo,
|
|
3049
3157
|
Modal,
|
|
3050
3158
|
MultiCheckbox,
|
|
3051
3159
|
Navbar,
|
|
3052
|
-
Notification,
|
|
3053
3160
|
NumberInput,
|
|
3054
3161
|
Pagination,
|
|
3055
3162
|
Password,
|
|
3056
3163
|
Phone,
|
|
3057
3164
|
PieChart,
|
|
3058
|
-
Profile,
|
|
3059
3165
|
RadioGroup,
|
|
3060
3166
|
RichText,
|
|
3061
3167
|
Search,
|
|
@@ -3072,6 +3178,7 @@ var Wrapper_default = FormWrapper;
|
|
|
3072
3178
|
Typography,
|
|
3073
3179
|
URL,
|
|
3074
3180
|
cn,
|
|
3181
|
+
getInitials,
|
|
3075
3182
|
showSonnerToast,
|
|
3076
3183
|
stateReducer,
|
|
3077
3184
|
useAppState
|