@algorithm-shift/design-system 1.2.73 → 1.2.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -51,6 +51,7 @@ __export(src_exports, {
51
51
  Image: () => Image_default,
52
52
  Modal: () => Modal,
53
53
  MultiCheckbox: () => MultiCheckbox_default,
54
+ MultiSelect: () => MultiSelect_default,
54
55
  Navbar: () => Navbar,
55
56
  NumberInput: () => NumberInput_default,
56
57
  Pagination: () => Pagination_default,
@@ -28363,21 +28364,334 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28363
28364
  };
28364
28365
  var TextInputGroup_default = TextInputGroup;
28365
28366
 
28366
- // src/components/ui/data-table.tsx
28367
+ // src/components/Inputs/Multiselect/MultiSelect.tsx
28367
28368
  var React7 = __toESM(require("react"));
28369
+
28370
+ // src/components/ui/command.tsx
28371
+ var import_cmdk = require("cmdk");
28372
+
28373
+ // src/components/ui/dialog.tsx
28374
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
28375
+ var import_jsx_runtime46 = require("react/jsx-runtime");
28376
+ function Dialog({
28377
+ ...props
28378
+ }) {
28379
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
28380
+ }
28381
+ function DialogPortal({
28382
+ ...props
28383
+ }) {
28384
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
28385
+ }
28386
+ function DialogOverlay({
28387
+ className,
28388
+ ...props
28389
+ }) {
28390
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28391
+ DialogPrimitive.Overlay,
28392
+ {
28393
+ "data-slot": "dialog-overlay",
28394
+ className: cn(
28395
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[60] bg-black/50",
28396
+ className
28397
+ ),
28398
+ ...props
28399
+ }
28400
+ );
28401
+ }
28402
+ function DialogContent({
28403
+ className,
28404
+ children,
28405
+ showCloseButton = true,
28406
+ ...props
28407
+ }) {
28408
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
28409
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DialogOverlay, {}),
28410
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28411
+ DialogPrimitive.Content,
28412
+ {
28413
+ "data-slot": "dialog-content",
28414
+ className: cn(
28415
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
28416
+ className
28417
+ ),
28418
+ ...props,
28419
+ children: [
28420
+ children,
28421
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28422
+ DialogPrimitive.Close,
28423
+ {
28424
+ "data-slot": "dialog-close",
28425
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
28426
+ children: [
28427
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(X, {}),
28428
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: "Close" })
28429
+ ]
28430
+ }
28431
+ )
28432
+ ]
28433
+ }
28434
+ )
28435
+ ] });
28436
+ }
28437
+ function DialogHeader({ className, ...props }) {
28438
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28439
+ "div",
28440
+ {
28441
+ "data-slot": "dialog-header",
28442
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
28443
+ ...props
28444
+ }
28445
+ );
28446
+ }
28447
+ function DialogFooter({ className, ...props }) {
28448
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28449
+ "div",
28450
+ {
28451
+ "data-slot": "dialog-footer",
28452
+ className: cn(
28453
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
28454
+ className
28455
+ ),
28456
+ ...props
28457
+ }
28458
+ );
28459
+ }
28460
+ function DialogTitle({
28461
+ className,
28462
+ ...props
28463
+ }) {
28464
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28465
+ DialogPrimitive.Title,
28466
+ {
28467
+ "data-slot": "dialog-title",
28468
+ className: cn("text-lg leading-none font-semibold", className),
28469
+ ...props
28470
+ }
28471
+ );
28472
+ }
28473
+ function DialogDescription({
28474
+ className,
28475
+ ...props
28476
+ }) {
28477
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28478
+ DialogPrimitive.Description,
28479
+ {
28480
+ "data-slot": "dialog-description",
28481
+ className: cn("text-muted-foreground text-sm", className),
28482
+ ...props
28483
+ }
28484
+ );
28485
+ }
28486
+
28487
+ // src/components/ui/command.tsx
28488
+ var import_jsx_runtime47 = require("react/jsx-runtime");
28489
+ function Command2({
28490
+ className,
28491
+ ...props
28492
+ }) {
28493
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28494
+ import_cmdk.Command,
28495
+ {
28496
+ "data-slot": "command",
28497
+ className: cn(
28498
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
28499
+ className
28500
+ ),
28501
+ ...props
28502
+ }
28503
+ );
28504
+ }
28505
+ function CommandInput({
28506
+ className,
28507
+ ...props
28508
+ }) {
28509
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28510
+ "div",
28511
+ {
28512
+ "data-slot": "command-input-wrapper",
28513
+ className: "flex h-9 items-center gap-2 border-b px-3",
28514
+ children: [
28515
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Search, { className: "size-4 shrink-0 opacity-50" }),
28516
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28517
+ import_cmdk.Command.Input,
28518
+ {
28519
+ "data-slot": "command-input",
28520
+ className: cn(
28521
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
28522
+ className
28523
+ ),
28524
+ ...props
28525
+ }
28526
+ )
28527
+ ]
28528
+ }
28529
+ );
28530
+ }
28531
+ function CommandList({
28532
+ className,
28533
+ ...props
28534
+ }) {
28535
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28536
+ import_cmdk.Command.List,
28537
+ {
28538
+ "data-slot": "command-list",
28539
+ className: cn(
28540
+ "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
28541
+ className
28542
+ ),
28543
+ ...props
28544
+ }
28545
+ );
28546
+ }
28547
+ function CommandEmpty({
28548
+ ...props
28549
+ }) {
28550
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28551
+ import_cmdk.Command.Empty,
28552
+ {
28553
+ "data-slot": "command-empty",
28554
+ className: "py-6 text-center text-sm",
28555
+ ...props
28556
+ }
28557
+ );
28558
+ }
28559
+ function CommandGroup({
28560
+ className,
28561
+ ...props
28562
+ }) {
28563
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28564
+ import_cmdk.Command.Group,
28565
+ {
28566
+ "data-slot": "command-group",
28567
+ className: cn(
28568
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
28569
+ className
28570
+ ),
28571
+ ...props
28572
+ }
28573
+ );
28574
+ }
28575
+ function CommandItem({
28576
+ className,
28577
+ ...props
28578
+ }) {
28579
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28580
+ import_cmdk.Command.Item,
28581
+ {
28582
+ "data-slot": "command-item",
28583
+ className: cn(
28584
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
28585
+ className
28586
+ ),
28587
+ ...props
28588
+ }
28589
+ );
28590
+ }
28591
+
28592
+ // src/components/Inputs/Multiselect/MultiSelect.tsx
28593
+ var import_jsx_runtime48 = require("react/jsx-runtime");
28594
+ var MultiSelect = ({
28595
+ value = [],
28596
+ onChange,
28597
+ data = [],
28598
+ placeholder = "Select...",
28599
+ disabled,
28600
+ searchable = true,
28601
+ className = "",
28602
+ ...props
28603
+ }) => {
28604
+ const [open, setOpen] = React7.useState(false);
28605
+ React7.useEffect(() => {
28606
+ if (value) {
28607
+ onChange(value);
28608
+ }
28609
+ }, []);
28610
+ const toggleOption = (val) => {
28611
+ onChange(
28612
+ value?.includes(val) ? value.filter((v) => v !== val) : [...value || [], val]
28613
+ );
28614
+ };
28615
+ const selectedLabels = React7.useMemo(
28616
+ () => data.filter((opt) => value.includes(opt.value)).map((opt) => opt.label),
28617
+ [data, value]
28618
+ );
28619
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
28620
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
28621
+ Button,
28622
+ {
28623
+ variant: "outline",
28624
+ role: "combobox",
28625
+ className: `w-full justify-between ${className} ${props.errorMessage ? "border-red-500" : ""}`,
28626
+ disabled,
28627
+ type: "button",
28628
+ children: [
28629
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "truncate", children: selectedLabels.length > 0 ? selectedLabels.join(", ") : placeholder }),
28630
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
28631
+ ]
28632
+ }
28633
+ ) }),
28634
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
28635
+ PopoverContent,
28636
+ {
28637
+ align: "start",
28638
+ className: "w-[var(--radix-popover-trigger-width)] p-0",
28639
+ onOpenAutoFocus: (e) => e.preventDefault(),
28640
+ onInteractOutside: (e) => {
28641
+ if (e.target.closest(".keep-open")) e.preventDefault();
28642
+ },
28643
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Command2, { shouldFilter: searchable, children: [
28644
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CommandInput, { placeholder: "Search..." }),
28645
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(CommandList, { children: [
28646
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CommandEmpty, { children: "No options found." }),
28647
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CommandGroup, { children: data.map((opt) => {
28648
+ const isSelected = value.includes(opt.value);
28649
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
28650
+ "div",
28651
+ {
28652
+ className: "keep-open",
28653
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
28654
+ CommandItem,
28655
+ {
28656
+ onMouseDown: (e) => {
28657
+ e.preventDefault();
28658
+ toggleOption(opt.value);
28659
+ },
28660
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
28661
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Checkbox, { checked: isSelected }),
28662
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: opt.label })
28663
+ ] })
28664
+ },
28665
+ opt.value
28666
+ )
28667
+ },
28668
+ opt.value
28669
+ );
28670
+ }) })
28671
+ ] })
28672
+ ] })
28673
+ }
28674
+ ),
28675
+ props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
28676
+ ] });
28677
+ };
28678
+ var MultiSelect_default = MultiSelect;
28679
+
28680
+ // src/components/ui/data-table.tsx
28681
+ var React8 = __toESM(require("react"));
28368
28682
  var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
28369
28683
  var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
28370
28684
  var import_react_table = require("@tanstack/react-table");
28371
28685
 
28372
28686
  // src/components/ui/table.tsx
28373
- var import_jsx_runtime46 = require("react/jsx-runtime");
28687
+ var import_jsx_runtime49 = require("react/jsx-runtime");
28374
28688
  function Table3({ className, ...props }) {
28375
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28689
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28376
28690
  "div",
28377
28691
  {
28378
28692
  "data-slot": "table-container",
28379
28693
  className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
28380
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28694
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28381
28695
  "table",
28382
28696
  {
28383
28697
  "data-slot": "table",
@@ -28389,7 +28703,7 @@ function Table3({ className, ...props }) {
28389
28703
  );
28390
28704
  }
28391
28705
  function TableHeader({ className, ...props }) {
28392
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28706
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28393
28707
  "thead",
28394
28708
  {
28395
28709
  "data-slot": "table-header",
@@ -28402,7 +28716,7 @@ function TableHeader({ className, ...props }) {
28402
28716
  );
28403
28717
  }
28404
28718
  function TableBody({ className, ...props }) {
28405
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28719
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28406
28720
  "tbody",
28407
28721
  {
28408
28722
  "data-slot": "table-body",
@@ -28415,7 +28729,7 @@ function TableBody({ className, ...props }) {
28415
28729
  );
28416
28730
  }
28417
28731
  function TableRow({ className, ...props }) {
28418
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28732
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28419
28733
  "tr",
28420
28734
  {
28421
28735
  "data-slot": "table-row",
@@ -28428,7 +28742,7 @@ function TableRow({ className, ...props }) {
28428
28742
  );
28429
28743
  }
28430
28744
  function TableHead({ className, ...props }) {
28431
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28745
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28432
28746
  "th",
28433
28747
  {
28434
28748
  "data-slot": "table-head",
@@ -28441,7 +28755,7 @@ function TableHead({ className, ...props }) {
28441
28755
  );
28442
28756
  }
28443
28757
  function TableCell({ className, ...props }) {
28444
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28758
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
28445
28759
  "td",
28446
28760
  {
28447
28761
  "data-slot": "table-cell",
@@ -28455,7 +28769,7 @@ function TableCell({ className, ...props }) {
28455
28769
  }
28456
28770
 
28457
28771
  // src/components/ui/data-table.tsx
28458
- var import_jsx_runtime47 = require("react/jsx-runtime");
28772
+ var import_jsx_runtime50 = require("react/jsx-runtime");
28459
28773
  function DataTable({
28460
28774
  columns,
28461
28775
  data,
@@ -28472,10 +28786,10 @@ function DataTable({
28472
28786
  globalSearch,
28473
28787
  onCellClick
28474
28788
  }) {
28475
- const [columnFilters, setColumnFilters] = React7.useState([]);
28476
- const [columnVisibility, setColumnVisibility] = React7.useState({});
28477
- const [manualSort, setManualSort] = React7.useState(null);
28478
- const [searchTerm, setSearchTerm] = React7.useState("");
28789
+ const [columnFilters, setColumnFilters] = React8.useState([]);
28790
+ const [columnVisibility, setColumnVisibility] = React8.useState({});
28791
+ const [manualSort, setManualSort] = React8.useState(null);
28792
+ const [searchTerm, setSearchTerm] = React8.useState("");
28479
28793
  const table = (0, import_react_table.useReactTable)({
28480
28794
  data,
28481
28795
  columns,
@@ -28523,11 +28837,11 @@ function DataTable({
28523
28837
  }
28524
28838
  return [];
28525
28839
  };
28526
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "overflow-hidden rounded-md w-full", children: [
28527
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
28528
- globalSearch && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
28529
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative w-full", children: [
28530
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28840
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "overflow-hidden rounded-md w-full", children: [
28841
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
28842
+ globalSearch && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
28843
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "relative w-full", children: [
28844
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28531
28845
  "input",
28532
28846
  {
28533
28847
  type: "text",
@@ -28542,9 +28856,9 @@ function DataTable({
28542
28856
  className: "border border-gray-300 rounded-md text-sm px-3 py-2 pl-8 w-full focus:outline-none focus:ring-1 focus:ring-[#12715B]"
28543
28857
  }
28544
28858
  ),
28545
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
28859
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
28546
28860
  ] }),
28547
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28861
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28548
28862
  Button,
28549
28863
  {
28550
28864
  size: "sm",
@@ -28554,8 +28868,8 @@ function DataTable({
28554
28868
  }
28555
28869
  )
28556
28870
  ] }),
28557
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { children: [
28558
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28871
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Popover, { children: [
28872
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28559
28873
  Button,
28560
28874
  {
28561
28875
  variant: "outline",
@@ -28564,10 +28878,10 @@ function DataTable({
28564
28878
  children: "Manage Columns"
28565
28879
  }
28566
28880
  ) }),
28567
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
28568
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
28569
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
28570
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28881
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
28882
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
28883
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
28884
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28571
28885
  "input",
28572
28886
  {
28573
28887
  type: "checkbox",
@@ -28586,8 +28900,8 @@ function DataTable({
28586
28900
  ),
28587
28901
  "Toggle All"
28588
28902
  ] }),
28589
- table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
28590
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28903
+ table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
28904
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28591
28905
  "input",
28592
28906
  {
28593
28907
  type: "checkbox",
@@ -28600,13 +28914,13 @@ function DataTable({
28600
28914
  ] })
28601
28915
  ] })
28602
28916
  ] }),
28603
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Table3, { children: [
28604
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: hg.headers.map((header) => {
28917
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Table3, { children: [
28918
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableRow, { children: hg.headers.map((header) => {
28605
28919
  const canSort = header.column.getCanSort();
28606
28920
  const canFilter = header.column.getCanFilter();
28607
28921
  const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
28608
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableHead, { className: "relative select-none", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between", children: [
28609
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28922
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableHead, { className: "relative select-none", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between", children: [
28923
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
28610
28924
  "span",
28611
28925
  {
28612
28926
  className: `flex items-center gap-1 ${canSort ? "cursor-pointer" : ""}`,
@@ -28618,32 +28932,32 @@ function DataTable({
28618
28932
  },
28619
28933
  children: [
28620
28934
  (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
28621
- canSort && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
28622
- sortDir === "asc" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowUp, { size: 14, className: "text-gray-500" }),
28623
- sortDir === "desc" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowDown, { size: 14, className: "text-gray-500" }),
28624
- !sortDir && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowUpDown, { size: 14, className: "text-gray-400" })
28935
+ canSort && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
28936
+ sortDir === "asc" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArrowUp, { size: 14, className: "text-gray-500" }),
28937
+ sortDir === "desc" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArrowDown, { size: 14, className: "text-gray-500" }),
28938
+ !sortDir && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArrowUpDown, { size: 14, className: "text-gray-400" })
28625
28939
  ] })
28626
28940
  ]
28627
28941
  }
28628
28942
  ),
28629
- canFilter && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { children: [
28630
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28943
+ canFilter && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Popover, { children: [
28944
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28631
28945
  "span",
28632
28946
  {
28633
28947
  role: "presentation",
28634
28948
  className: "pl-5 cursor-pointer",
28635
28949
  onClick: (e) => e.stopPropagation(),
28636
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_fontawesome3.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faEllipsisH, className: "w-5 h-5 text-gray-500" })
28950
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_fontawesome3.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faEllipsisH, className: "w-5 h-5 text-gray-500" })
28637
28951
  }
28638
28952
  ) }),
28639
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28953
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28640
28954
  PopoverContent,
28641
28955
  {
28642
28956
  align: "center",
28643
28957
  sideOffset: 14,
28644
28958
  className: "w-50 p-3 z-[200] border-gray-300",
28645
28959
  avoidCollisions: true,
28646
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28960
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
28647
28961
  "form",
28648
28962
  {
28649
28963
  onSubmit: (e) => {
@@ -28656,8 +28970,8 @@ function DataTable({
28656
28970
  },
28657
28971
  className: "space-y-2",
28658
28972
  children: [
28659
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
28660
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28973
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
28974
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28661
28975
  "input",
28662
28976
  {
28663
28977
  name: "filter",
@@ -28667,7 +28981,7 @@ function DataTable({
28667
28981
  autoComplete: "off"
28668
28982
  }
28669
28983
  ),
28670
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "justify-end flex", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28984
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "justify-end flex", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28671
28985
  Button,
28672
28986
  {
28673
28987
  type: "submit",
@@ -28683,10 +28997,10 @@ function DataTable({
28683
28997
  ] })
28684
28998
  ] }) }, header.id);
28685
28999
  }) }, hg.id)) }),
28686
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => {
29000
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => {
28687
29001
  const meta = cell.column.columnDef.meta || {};
28688
29002
  const isClickable = meta?.isClickable;
28689
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29003
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28690
29004
  TableCell,
28691
29005
  {
28692
29006
  className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100 underline" : ""}`,
@@ -28700,17 +29014,17 @@ function DataTable({
28700
29014
  },
28701
29015
  cell.id
28702
29016
  );
28703
- }) }, row.id)) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) })
29017
+ }) }, row.id)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) })
28704
29018
  ] }),
28705
- pagination && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
28706
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
29019
+ pagination && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
29020
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
28707
29021
  "Page ",
28708
29022
  table.getState().pagination.pageIndex + 1,
28709
29023
  " of ",
28710
29024
  table.getPageCount()
28711
29025
  ] }),
28712
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
28713
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29026
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2", children: [
29027
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28714
29028
  "button",
28715
29029
  {
28716
29030
  onClick: () => table.previousPage(),
@@ -28723,7 +29037,7 @@ function DataTable({
28723
29037
  table.getState().pagination.pageIndex + 1,
28724
29038
  table.getPageCount(),
28725
29039
  5
28726
- ).map((pageNum, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29040
+ ).map((pageNum, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28727
29041
  "button",
28728
29042
  {
28729
29043
  disabled: pageNum === "...",
@@ -28733,7 +29047,7 @@ function DataTable({
28733
29047
  },
28734
29048
  index
28735
29049
  )),
28736
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29050
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
28737
29051
  "button",
28738
29052
  {
28739
29053
  onClick: () => table.nextPage(),
@@ -28748,7 +29062,7 @@ function DataTable({
28748
29062
  }
28749
29063
 
28750
29064
  // src/components/DataDisplay/Table/Table.tsx
28751
- var import_jsx_runtime48 = require("react/jsx-runtime");
29065
+ var import_jsx_runtime51 = require("react/jsx-runtime");
28752
29066
  var Table4 = ({
28753
29067
  columns,
28754
29068
  data,
@@ -28771,7 +29085,7 @@ var Table4 = ({
28771
29085
  const rawColumns = Array.isArray(columns) ? columns : [];
28772
29086
  const rawData = Array.isArray(data) ? data : [];
28773
29087
  const isControlled = typeof page === "number";
28774
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
29088
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
28775
29089
  DataTable,
28776
29090
  {
28777
29091
  ...props,
@@ -28790,16 +29104,19 @@ var Table4 = ({
28790
29104
  onSortChange: (col, dir) => onSortChange?.({ sort_by: col, sort_order: dir }),
28791
29105
  onFilterChange: (filters) => onFilterChange?.({ columnKey: filters.columnKey, columnTerm: filters.columnTerm }),
28792
29106
  onGlobalSearch: (term) => onGlobalSearch?.({ searchTerm: term }),
28793
- globalSearch
29107
+ globalSearch,
29108
+ onCellClick: (cell) => {
29109
+ props.onCellClick?.({ id: cell.id, column: cell });
29110
+ }
28794
29111
  }
28795
29112
  ) });
28796
29113
  };
28797
29114
  var Table_default = Table4;
28798
29115
 
28799
29116
  // src/components/ui/pagination.tsx
28800
- var import_jsx_runtime49 = require("react/jsx-runtime");
29117
+ var import_jsx_runtime52 = require("react/jsx-runtime");
28801
29118
  function Pagination({ className, ...props }) {
28802
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
29119
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
28803
29120
  "nav",
28804
29121
  {
28805
29122
  role: "navigation",
@@ -28814,7 +29131,7 @@ function PaginationContent({
28814
29131
  className,
28815
29132
  ...props
28816
29133
  }) {
28817
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
29134
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
28818
29135
  "ul",
28819
29136
  {
28820
29137
  "data-slot": "pagination-content",
@@ -28824,7 +29141,7 @@ function PaginationContent({
28824
29141
  );
28825
29142
  }
28826
29143
  function PaginationItem({ ...props }) {
28827
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("li", { "data-slot": "pagination-item", ...props });
29144
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { "data-slot": "pagination-item", ...props });
28828
29145
  }
28829
29146
  function PaginationLink({
28830
29147
  className,
@@ -28832,7 +29149,7 @@ function PaginationLink({
28832
29149
  size = "icon",
28833
29150
  ...props
28834
29151
  }) {
28835
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
29152
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
28836
29153
  "a",
28837
29154
  {
28838
29155
  "aria-current": isActive ? "page" : void 0,
@@ -28853,7 +29170,7 @@ function PaginationPrevious({
28853
29170
  className,
28854
29171
  ...props
28855
29172
  }) {
28856
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
29173
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
28857
29174
  PaginationLink,
28858
29175
  {
28859
29176
  "aria-label": "Go to previous page",
@@ -28861,8 +29178,8 @@ function PaginationPrevious({
28861
29178
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
28862
29179
  ...props,
28863
29180
  children: [
28864
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChevronLeft, {}),
28865
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "hidden sm:block", children: "Previous" })
29181
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronLeft, {}),
29182
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hidden sm:block", children: "Previous" })
28866
29183
  ]
28867
29184
  }
28868
29185
  );
@@ -28871,7 +29188,7 @@ function PaginationNext({
28871
29188
  className,
28872
29189
  ...props
28873
29190
  }) {
28874
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
29191
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
28875
29192
  PaginationLink,
28876
29193
  {
28877
29194
  "aria-label": "Go to next page",
@@ -28879,8 +29196,8 @@ function PaginationNext({
28879
29196
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
28880
29197
  ...props,
28881
29198
  children: [
28882
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "hidden sm:block", children: "Next" }),
28883
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChevronRight, {})
29199
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hidden sm:block", children: "Next" }),
29200
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronRight, {})
28884
29201
  ]
28885
29202
  }
28886
29203
  );
@@ -28889,7 +29206,7 @@ function PaginationEllipsis({
28889
29206
  className,
28890
29207
  ...props
28891
29208
  }) {
28892
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
29209
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
28893
29210
  "span",
28894
29211
  {
28895
29212
  "aria-hidden": true,
@@ -28897,15 +29214,15 @@ function PaginationEllipsis({
28897
29214
  className: cn("flex size-9 items-center justify-center", className),
28898
29215
  ...props,
28899
29216
  children: [
28900
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Ellipsis, { className: "size-4" }),
28901
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "sr-only", children: "More pages" })
29217
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Ellipsis, { className: "size-4" }),
29218
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: "More pages" })
28902
29219
  ]
28903
29220
  }
28904
29221
  );
28905
29222
  }
28906
29223
 
28907
29224
  // src/components/DataDisplay/Pagination/Pagination.tsx
28908
- var import_jsx_runtime50 = require("react/jsx-runtime");
29225
+ var import_jsx_runtime53 = require("react/jsx-runtime");
28909
29226
  var CustomPagination = ({
28910
29227
  totalPages,
28911
29228
  currentPage,
@@ -28951,10 +29268,10 @@ var CustomPagination = ({
28951
29268
  }
28952
29269
  };
28953
29270
  const pageNumbers = getPageNumbers();
28954
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
28955
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2", children: [
28956
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
28957
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
29271
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
29272
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2", children: [
29273
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
29274
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
28958
29275
  Select,
28959
29276
  {
28960
29277
  defaultValue: String(perPage),
@@ -28962,26 +29279,26 @@ var CustomPagination = ({
28962
29279
  onPageChange({ page: 1, itemsPerPage: Number(value) });
28963
29280
  },
28964
29281
  children: [
28965
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectValue, { placeholder: "Select" }) }),
28966
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(SelectContent, { children: [
28967
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectItem, { value: "5", children: "5" }),
28968
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectItem, { value: "10", children: "10" }),
28969
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectItem, { value: "20", children: "20" }),
28970
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectItem, { value: "50", children: "50" })
29282
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectValue, { placeholder: "Select" }) }),
29283
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(SelectContent, { children: [
29284
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: "5", children: "5" }),
29285
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: "10", children: "10" }),
29286
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: "20", children: "20" }),
29287
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: "50", children: "50" })
28971
29288
  ] })
28972
29289
  ]
28973
29290
  }
28974
29291
  )
28975
29292
  ] }),
28976
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Pagination, { className: "justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(PaginationContent, { children: [
28977
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
29293
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Pagination, { className: "justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(PaginationContent, { children: [
29294
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
28978
29295
  PaginationPrevious,
28979
29296
  {
28980
29297
  onClick: () => handlePageChange(currentPage - 1),
28981
29298
  className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
28982
29299
  }
28983
29300
  ) }),
28984
- pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
29301
+ pageNumbers.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
28985
29302
  PaginationLink,
28986
29303
  {
28987
29304
  onClick: () => handlePageChange(pageNumber),
@@ -28990,7 +29307,7 @@ var CustomPagination = ({
28990
29307
  children: pageNumber
28991
29308
  }
28992
29309
  ) }, index)),
28993
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
29310
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
28994
29311
  PaginationNext,
28995
29312
  {
28996
29313
  onClick: () => handlePageChange(currentPage + 1),
@@ -29005,124 +29322,8 @@ var Pagination_default = CustomPagination;
29005
29322
  // src/components/Navigation/Tabs/Tabs.tsx
29006
29323
  var import_link5 = __toESM(require("next/link"));
29007
29324
  var import_navigation3 = require("next/navigation");
29008
-
29009
- // src/components/ui/dialog.tsx
29010
- var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
29011
- var import_jsx_runtime51 = require("react/jsx-runtime");
29012
- function Dialog({
29013
- ...props
29014
- }) {
29015
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
29016
- }
29017
- function DialogPortal({
29018
- ...props
29019
- }) {
29020
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
29021
- }
29022
- function DialogOverlay({
29023
- className,
29024
- ...props
29025
- }) {
29026
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29027
- DialogPrimitive.Overlay,
29028
- {
29029
- "data-slot": "dialog-overlay",
29030
- className: cn(
29031
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[60] bg-black/50",
29032
- className
29033
- ),
29034
- ...props
29035
- }
29036
- );
29037
- }
29038
- function DialogContent({
29039
- className,
29040
- children,
29041
- showCloseButton = true,
29042
- ...props
29043
- }) {
29044
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
29045
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogOverlay, {}),
29046
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
29047
- DialogPrimitive.Content,
29048
- {
29049
- "data-slot": "dialog-content",
29050
- className: cn(
29051
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
29052
- className
29053
- ),
29054
- ...props,
29055
- children: [
29056
- children,
29057
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
29058
- DialogPrimitive.Close,
29059
- {
29060
- "data-slot": "dialog-close",
29061
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
29062
- children: [
29063
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(X, {}),
29064
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "sr-only", children: "Close" })
29065
- ]
29066
- }
29067
- )
29068
- ]
29069
- }
29070
- )
29071
- ] });
29072
- }
29073
- function DialogHeader({ className, ...props }) {
29074
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29075
- "div",
29076
- {
29077
- "data-slot": "dialog-header",
29078
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
29079
- ...props
29080
- }
29081
- );
29082
- }
29083
- function DialogFooter({ className, ...props }) {
29084
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29085
- "div",
29086
- {
29087
- "data-slot": "dialog-footer",
29088
- className: cn(
29089
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
29090
- className
29091
- ),
29092
- ...props
29093
- }
29094
- );
29095
- }
29096
- function DialogTitle({
29097
- className,
29098
- ...props
29099
- }) {
29100
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29101
- DialogPrimitive.Title,
29102
- {
29103
- "data-slot": "dialog-title",
29104
- className: cn("text-lg leading-none font-semibold", className),
29105
- ...props
29106
- }
29107
- );
29108
- }
29109
- function DialogDescription({
29110
- className,
29111
- ...props
29112
- }) {
29113
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29114
- DialogPrimitive.Description,
29115
- {
29116
- "data-slot": "dialog-description",
29117
- className: cn("text-muted-foreground text-sm", className),
29118
- ...props
29119
- }
29120
- );
29121
- }
29122
-
29123
- // src/components/Navigation/Tabs/Tabs.tsx
29124
29325
  var import_react26 = require("react");
29125
- var import_jsx_runtime52 = require("react/jsx-runtime");
29326
+ var import_jsx_runtime54 = require("react/jsx-runtime");
29126
29327
  var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = true }) => {
29127
29328
  const rawTabs = Array.isArray(tabs) ? tabs : [];
29128
29329
  const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
@@ -29154,23 +29355,23 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29154
29355
  const renderDesktopTab = (tab, index) => {
29155
29356
  const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
29156
29357
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
29157
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
29158
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
29358
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DropdownMenu, { children: [
29359
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
29159
29360
  tab.header,
29160
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
29361
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
29161
29362
  ] }),
29162
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29363
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
29163
29364
  DropdownMenuContent,
29164
29365
  {
29165
29366
  align: "start",
29166
29367
  sideOffset: 6,
29167
29368
  className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
29168
- children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29369
+ children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
29169
29370
  DropdownMenuItem,
29170
29371
  {
29171
29372
  asChild: true,
29172
29373
  className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
29173
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29374
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29174
29375
  },
29175
29376
  item.id
29176
29377
  ))
@@ -29178,7 +29379,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29178
29379
  )
29179
29380
  ] }, index);
29180
29381
  }
29181
- return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29382
+ return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
29182
29383
  import_link5.default,
29183
29384
  {
29184
29385
  href: tab.url,
@@ -29188,14 +29389,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29188
29389
  children: tab.header
29189
29390
  },
29190
29391
  index
29191
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
29392
+ ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
29192
29393
  };
29193
- const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
29194
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
29195
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Menu, { className: "h-4 w-4" }),
29394
+ const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DropdownMenu, { children: [
29395
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
29396
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Menu, { className: "h-4 w-4" }),
29196
29397
  "Menu"
29197
29398
  ] }),
29198
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29399
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
29199
29400
  DropdownMenuContent,
29200
29401
  {
29201
29402
  align: "start",
@@ -29204,25 +29405,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29204
29405
  children: rawTabs.map((tab, i) => {
29205
29406
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
29206
29407
  if (hasChildren) {
29207
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuSub, { children: [
29208
- /* @__PURE__ */ (0, import_jsx_runtime52.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 }),
29209
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29408
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DropdownMenuSub, { children: [
29409
+ /* @__PURE__ */ (0, import_jsx_runtime54.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 }),
29410
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
29210
29411
  DropdownMenuItem,
29211
29412
  {
29212
29413
  asChild: true,
29213
29414
  className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
29214
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29415
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29215
29416
  },
29216
29417
  item.id
29217
29418
  )) })
29218
29419
  ] }, i);
29219
29420
  }
29220
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29421
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
29221
29422
  DropdownMenuItem,
29222
29423
  {
29223
29424
  asChild: true,
29224
29425
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
29225
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
29426
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_link5.default, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
29226
29427
  },
29227
29428
  i
29228
29429
  );
@@ -29232,19 +29433,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29232
29433
  ] });
29233
29434
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
29234
29435
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
29235
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
29236
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className, style, children: [
29237
- forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
29238
- forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
29436
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
29437
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className, style, children: [
29438
+ forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
29439
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
29239
29440
  ] }),
29240
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29241
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogHeader, { children: [
29242
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DialogTitle, { children: "Exit Builder?" }),
29243
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29441
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29442
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DialogHeader, { children: [
29443
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DialogTitle, { children: "Exit Builder?" }),
29444
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29244
29445
  ] }),
29245
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogFooter, { children: [
29246
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29247
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29446
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DialogFooter, { children: [
29447
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29448
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29248
29449
  ] })
29249
29450
  ] }) })
29250
29451
  ] });
@@ -29253,12 +29454,12 @@ var Tabs_default = Tabs;
29253
29454
 
29254
29455
  // src/components/Navigation/Stages/Stages.tsx
29255
29456
  var import_react27 = __toESM(require("react"));
29256
- var import_jsx_runtime53 = require("react/jsx-runtime");
29457
+ var import_jsx_runtime55 = require("react/jsx-runtime");
29257
29458
  var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange }) => {
29258
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
29259
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
29260
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react27.default.Fragment, { children: [
29261
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
29459
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
29460
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
29461
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react27.default.Fragment, { children: [
29462
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
29262
29463
  "button",
29263
29464
  {
29264
29465
  className: `min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap ${stage.isActive ? "bg-[#034486] text-white shadow-md" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,
@@ -29270,9 +29471,9 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
29270
29471
  children: stage.header
29271
29472
  }
29272
29473
  ),
29273
- index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
29474
+ index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
29274
29475
  ] }, stage.id)) }),
29275
- isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
29476
+ isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
29276
29477
  "button",
29277
29478
  {
29278
29479
  className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
@@ -29290,26 +29491,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
29290
29491
  var Stages_default = StagesComponent;
29291
29492
 
29292
29493
  // src/components/Navigation/Spacer/Spacer.tsx
29293
- var import_jsx_runtime54 = require("react/jsx-runtime");
29494
+ var import_jsx_runtime56 = require("react/jsx-runtime");
29294
29495
  var Spacer = ({ className, style }) => {
29295
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `${className}`, style });
29496
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: `${className}`, style });
29296
29497
  };
29297
29498
  var Spacer_default = Spacer;
29298
29499
 
29299
29500
  // src/components/Navigation/Profile/Profile.tsx
29300
- var import_jsx_runtime55 = require("react/jsx-runtime");
29501
+ var import_jsx_runtime57 = require("react/jsx-runtime");
29301
29502
 
29302
29503
  // src/components/Navigation/Notification/Notification.tsx
29303
- var import_jsx_runtime56 = require("react/jsx-runtime");
29504
+ var import_jsx_runtime58 = require("react/jsx-runtime");
29304
29505
 
29305
29506
  // src/components/Navigation/Logo/Logo.tsx
29306
- var import_jsx_runtime57 = require("react/jsx-runtime");
29507
+ var import_jsx_runtime59 = require("react/jsx-runtime");
29307
29508
 
29308
29509
  // src/components/ui/avatar.tsx
29309
- var React9 = __toESM(require("react"));
29510
+ var React10 = __toESM(require("react"));
29310
29511
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
29311
- var import_jsx_runtime58 = require("react/jsx-runtime");
29312
- var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29512
+ var import_jsx_runtime60 = require("react/jsx-runtime");
29513
+ var Avatar = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29313
29514
  AvatarPrimitive.Root,
29314
29515
  {
29315
29516
  ref,
@@ -29321,7 +29522,7 @@ var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
29321
29522
  }
29322
29523
  ));
29323
29524
  Avatar.displayName = AvatarPrimitive.Root.displayName;
29324
- var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29525
+ var AvatarImage = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29325
29526
  AvatarPrimitive.Image,
29326
29527
  {
29327
29528
  ref,
@@ -29330,7 +29531,7 @@ var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
29330
29531
  }
29331
29532
  ));
29332
29533
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
29333
- var AvatarFallback = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29534
+ var AvatarFallback = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29334
29535
  AvatarPrimitive.Fallback,
29335
29536
  {
29336
29537
  ref,
@@ -29349,7 +29550,7 @@ var import_image3 = __toESM(require("next/image"));
29349
29550
  var import_navigation4 = require("next/navigation");
29350
29551
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
29351
29552
  var import_react28 = require("react");
29352
- var import_jsx_runtime59 = require("react/jsx-runtime");
29553
+ var import_jsx_runtime61 = require("react/jsx-runtime");
29353
29554
  function Navbar({
29354
29555
  style,
29355
29556
  badgeType,
@@ -29393,23 +29594,23 @@ function Navbar({
29393
29594
  }
29394
29595
  return list || [];
29395
29596
  }, [source, navList]);
29396
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
29397
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29597
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
29598
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29398
29599
  "nav",
29399
29600
  {
29400
29601
  className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
29401
29602
  style,
29402
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
29403
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29603
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
29604
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29404
29605
  import_link6.default,
29405
29606
  {
29406
29607
  href: "/",
29407
29608
  onClick: (e) => handleBuilderExit(e, "/"),
29408
29609
  className: "flex items-center space-x-2",
29409
- children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
29610
+ children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
29410
29611
  }
29411
29612
  ),
29412
- !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29613
+ !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29413
29614
  import_link6.default,
29414
29615
  {
29415
29616
  href: item.url || "#",
@@ -29419,39 +29620,39 @@ function Navbar({
29419
29620
  },
29420
29621
  item.id
29421
29622
  )) }),
29422
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-3", children: [
29423
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
29424
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
29425
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
29426
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Search, { className: "h-5 w-5 text-gray-400" }) }),
29427
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
29428
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
29429
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.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_runtime59.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
29623
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center space-x-3", children: [
29624
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
29625
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
29626
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
29627
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Search, { className: "h-5 w-5 text-gray-400" }) }),
29628
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
29629
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
29630
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.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_runtime61.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
29430
29631
  ] }),
29431
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenu, { children: [
29432
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-2", children: [
29433
- !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
29434
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
29435
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29632
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(DropdownMenu, { children: [
29633
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center space-x-2", children: [
29634
+ !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
29635
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
29636
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29436
29637
  AvatarImage,
29437
29638
  {
29438
29639
  src: "/images/appbuilder/toolset/profile.svg",
29439
29640
  alt: "Profile"
29440
29641
  }
29441
- ) : /* @__PURE__ */ (0, import_jsx_runtime59.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) }) }),
29442
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29642
+ ) : /* @__PURE__ */ (0, import_jsx_runtime61.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) }) }),
29643
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29443
29644
  Button,
29444
29645
  {
29445
29646
  variant: "ghost",
29446
29647
  size: "icon",
29447
29648
  className: "text-gray-900 md:hidden dark:invert",
29448
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Menu, { className: "h-6 w-6" })
29649
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Menu, { className: "h-6 w-6" })
29449
29650
  }
29450
29651
  )
29451
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Menu, { className: "h-6 w-6" }) })
29652
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Menu, { className: "h-6 w-6" }) })
29452
29653
  ] }) }),
29453
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
29454
- profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29654
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
29655
+ profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29455
29656
  import_link6.default,
29456
29657
  {
29457
29658
  href: item.url || "#",
@@ -29459,9 +29660,9 @@ function Navbar({
29459
29660
  children: item.header
29460
29661
  }
29461
29662
  ) }, item.id)) }),
29462
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "md:hidden", children: [
29463
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
29464
- formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29663
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "md:hidden", children: [
29664
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
29665
+ formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29465
29666
  import_link6.default,
29466
29667
  {
29467
29668
  href: item.url || "#",
@@ -29476,14 +29677,14 @@ function Navbar({
29476
29677
  ] })
29477
29678
  }
29478
29679
  ),
29479
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29480
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogHeader, { children: [
29481
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogTitle, { children: "Exit Builder?" }),
29482
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29680
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29681
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(DialogHeader, { children: [
29682
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DialogTitle, { children: "Exit Builder?" }),
29683
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29483
29684
  ] }),
29484
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogFooter, { children: [
29485
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29486
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29685
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(DialogFooter, { children: [
29686
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29687
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29487
29688
  ] })
29488
29689
  ] }) })
29489
29690
  ] });
@@ -29492,35 +29693,35 @@ function Navbar({
29492
29693
  // src/components/Chart/BarChart.tsx
29493
29694
  var import_react29 = __toESM(require("react"));
29494
29695
  var import_recharts = require("recharts");
29495
- var import_jsx_runtime60 = require("react/jsx-runtime");
29696
+ var import_jsx_runtime62 = require("react/jsx-runtime");
29496
29697
  var ChartComponent = ({ className, style, loading, ...props }) => {
29497
29698
  const data = Array.isArray(props.data) ? props.data : [];
29498
29699
  const chartType = props.chartType || "bar";
29499
29700
  const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
29500
29701
  if (loading || data.length === 0) {
29501
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29702
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29502
29703
  "div",
29503
29704
  {
29504
29705
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
29505
29706
  style,
29506
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29707
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29507
29708
  }
29508
29709
  );
29509
29710
  }
29510
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts.BarChart, { data, title: "Leads", desc: "content", children: [
29511
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29512
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29513
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.YAxis, {}),
29514
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29515
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
29516
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29711
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_recharts.BarChart, { data, title: "Leads", desc: "content", children: [
29712
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29713
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29714
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.YAxis, {}),
29715
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29716
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
29717
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29517
29718
  import_recharts.Bar,
29518
29719
  {
29519
29720
  dataKey: "value",
29520
29721
  fill: "#00695C",
29521
29722
  radius: [6, 6, 0, 0],
29522
29723
  isAnimationActive: false,
29523
- children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29724
+ children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29524
29725
  "rect",
29525
29726
  {
29526
29727
  fill: entry.color || "#00695C"
@@ -29529,16 +29730,16 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
29529
29730
  ))
29530
29731
  }
29531
29732
  )
29532
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts.AreaChart, { data, children: [
29533
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
29534
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
29535
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
29733
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_recharts.AreaChart, { data, children: [
29734
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
29735
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
29736
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
29536
29737
  ] }) }),
29537
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29538
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29539
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.YAxis, {}),
29540
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29541
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29738
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29739
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29740
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.YAxis, {}),
29741
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29742
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29542
29743
  import_recharts.Area,
29543
29744
  {
29544
29745
  type: "monotone",
@@ -29556,7 +29757,7 @@ var BarChart_default = import_react29.default.memo(ChartComponent);
29556
29757
  // src/components/Chart/PieChart.tsx
29557
29758
  var import_react30 = __toESM(require("react"));
29558
29759
  var import_recharts2 = require("recharts");
29559
- var import_jsx_runtime61 = require("react/jsx-runtime");
29760
+ var import_jsx_runtime63 = require("react/jsx-runtime");
29560
29761
  var getRandomColor = () => {
29561
29762
  const palette = [
29562
29763
  "#2563eb",
@@ -29589,19 +29790,19 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29589
29790
  }, []);
29590
29791
  const renderLegends = (0, import_react30.useMemo)(() => {
29591
29792
  if (!showLegends) return null;
29592
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29793
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
29593
29794
  "div",
29594
29795
  {
29595
29796
  className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
29596
29797
  children: [
29597
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29798
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
29598
29799
  "span",
29599
29800
  {
29600
29801
  className: "inline-block w-[16px] h-[16px] rounded",
29601
29802
  style: { backgroundColor: d.color }
29602
29803
  }
29603
29804
  ),
29604
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
29805
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
29605
29806
  ]
29606
29807
  },
29607
29808
  d.name
@@ -29609,24 +29810,24 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29609
29810
  }, [data, showLegends]);
29610
29811
  if (!mounted) return null;
29611
29812
  if (loading || data.length === 0) {
29612
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29813
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
29613
29814
  "div",
29614
29815
  {
29615
29816
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
29616
29817
  style,
29617
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29818
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29618
29819
  }
29619
29820
  );
29620
29821
  }
29621
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29822
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
29622
29823
  "div",
29623
29824
  {
29624
29825
  className: `relative flex flex-col items-center ${className}`,
29625
29826
  style,
29626
29827
  children: [
29627
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
29628
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_recharts2.ResponsiveContainer, { width: "99%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_recharts2.PieChart, { children: [
29629
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29828
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
29829
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_recharts2.ResponsiveContainer, { width: "99%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_recharts2.PieChart, { children: [
29830
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
29630
29831
  import_recharts2.Pie,
29631
29832
  {
29632
29833
  data,
@@ -29638,8 +29839,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29638
29839
  labelLine: false,
29639
29840
  isAnimationActive: false,
29640
29841
  children: [
29641
- data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
29642
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29842
+ data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
29843
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
29643
29844
  import_recharts2.LabelList,
29644
29845
  {
29645
29846
  dataKey: "value",
@@ -29652,14 +29853,14 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29652
29853
  ]
29653
29854
  }
29654
29855
  ),
29655
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29856
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
29656
29857
  import_recharts2.Tooltip,
29657
29858
  {
29658
29859
  formatter: (value, name) => [`${value}k`, name]
29659
29860
  }
29660
29861
  )
29661
29862
  ] }) }),
29662
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29863
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
29663
29864
  "div",
29664
29865
  {
29665
29866
  className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 ${forceMobile ? "text-2xl" : "text-4xl"} font-bold text-[#000]`,
@@ -29670,7 +29871,7 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29670
29871
  }
29671
29872
  )
29672
29873
  ] }),
29673
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
29874
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
29674
29875
  ]
29675
29876
  }
29676
29877
  );
@@ -29678,10 +29879,10 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29678
29879
  var PieChart_default = import_react30.default.memo(DonutChart);
29679
29880
 
29680
29881
  // src/components/Blocks/EmailComposer.tsx
29681
- var import_jsx_runtime62 = require("react/jsx-runtime");
29882
+ var import_jsx_runtime64 = require("react/jsx-runtime");
29682
29883
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
29683
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
29684
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29884
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
29885
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29685
29886
  "input",
29686
29887
  {
29687
29888
  type: "email",
@@ -29690,8 +29891,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29690
29891
  required: true
29691
29892
  }
29692
29893
  ) }),
29693
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-2", children: [
29694
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29894
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center gap-2", children: [
29895
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29695
29896
  "input",
29696
29897
  {
29697
29898
  type: "email",
@@ -29702,7 +29903,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29702
29903
  required: true
29703
29904
  }
29704
29905
  ),
29705
- !showCc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29906
+ !showCc && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29706
29907
  "button",
29707
29908
  {
29708
29909
  onClick: () => setShowCc?.(true),
@@ -29710,7 +29911,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29710
29911
  children: "Cc"
29711
29912
  }
29712
29913
  ),
29713
- !showBcc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29914
+ !showBcc && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29714
29915
  "button",
29715
29916
  {
29716
29917
  onClick: () => setShowBcc?.(true),
@@ -29719,7 +29920,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29719
29920
  }
29720
29921
  )
29721
29922
  ] }) }),
29722
- showCc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29923
+ showCc && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29723
29924
  "input",
29724
29925
  {
29725
29926
  type: "text",
@@ -29729,7 +29930,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29729
29930
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29730
29931
  }
29731
29932
  ) }),
29732
- showBcc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29933
+ showBcc && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29733
29934
  "input",
29734
29935
  {
29735
29936
  type: "text",
@@ -29739,7 +29940,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29739
29940
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29740
29941
  }
29741
29942
  ) }),
29742
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29943
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29743
29944
  "input",
29744
29945
  {
29745
29946
  type: "text",
@@ -29749,11 +29950,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29749
29950
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29750
29951
  }
29751
29952
  ) }),
29752
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MyEditor, { value: body, onChange: setBody }) }),
29753
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex justify-end gap-2", children: [
29754
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
29755
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
29756
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
29953
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(MyEditor, { value: body, onChange: setBody }) }),
29954
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex justify-end gap-2", children: [
29955
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
29956
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
29957
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
29757
29958
  ] })
29758
29959
  ] }) });
29759
29960
  }
@@ -29798,10 +29999,10 @@ function showSonnerToast({
29798
29999
  // src/components/ui/sonner.tsx
29799
30000
  var import_next_themes = require("next-themes");
29800
30001
  var import_sonner2 = require("sonner");
29801
- var import_jsx_runtime63 = require("react/jsx-runtime");
30002
+ var import_jsx_runtime65 = require("react/jsx-runtime");
29802
30003
  var Toaster = ({ ...props }) => {
29803
30004
  const { theme = "system" } = (0, import_next_themes.useTheme)();
29804
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
30005
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
29805
30006
  import_sonner2.Toaster,
29806
30007
  {
29807
30008
  theme,
@@ -29837,6 +30038,7 @@ var Toaster = ({ ...props }) => {
29837
30038
  Image,
29838
30039
  Modal,
29839
30040
  MultiCheckbox,
30041
+ MultiSelect,
29840
30042
  Navbar,
29841
30043
  NumberInput,
29842
30044
  Pagination,