@algorithm-shift/design-system 1.2.955 → 1.2.957

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.mjs CHANGED
@@ -27649,7 +27649,7 @@ function SelectScrollDownButton({
27649
27649
  }
27650
27650
 
27651
27651
  // src/components/Inputs/Dropdown/LazyDropdown.tsx
27652
- import { useState as useState5, useRef as useRef3, useEffect as useEffect14 } from "react";
27652
+ import { useState as useState5, useRef as useRef3, useEffect as useEffect14, useMemo as useMemo3 } from "react";
27653
27653
 
27654
27654
  // src/hooks/useLazyDropdown.ts
27655
27655
  import { useState as useState4, useEffect as useEffect13, useRef as useRef2, useCallback as useCallback2 } from "react";
@@ -27664,6 +27664,14 @@ function useLazyDropdown(config) {
27664
27664
  const allDataRef = useRef2([]);
27665
27665
  const configRef = useRef2(config);
27666
27666
  const PAGE_SIZE = config.pageSize || 10;
27667
+ const uniqueOptions = (items) => {
27668
+ const seen = /* @__PURE__ */ new Set();
27669
+ return items.filter((item) => {
27670
+ if (seen.has(item.value)) return false;
27671
+ seen.add(item.value);
27672
+ return true;
27673
+ });
27674
+ };
27667
27675
  useEffect13(() => {
27668
27676
  configRef.current = config;
27669
27677
  }, [config]);
@@ -27716,7 +27724,10 @@ function useLazyDropdown(config) {
27716
27724
  pageOptions = transformToOptions(filtered.slice(start, end));
27717
27725
  setHasMore(end < filtered.length);
27718
27726
  }
27719
- setOptions((prev) => pageNum === 1 ? pageOptions : [...prev, ...pageOptions]);
27727
+ setOptions((prev) => {
27728
+ const merged = pageNum === 1 ? pageOptions : [...prev, ...pageOptions];
27729
+ return uniqueOptions(merged);
27730
+ });
27720
27731
  setPage(pageNum);
27721
27732
  } catch (err) {
27722
27733
  console.error("\u274C useLazyDropdown loadPage error:", err);
@@ -27736,7 +27747,7 @@ function useLazyDropdown(config) {
27736
27747
  });
27737
27748
  if (res.data?.success && Array.isArray(res.data.data) && res.data.data.length > 0) {
27738
27749
  const fetched = transformToOptions(res.data.data);
27739
- setOptions((prev) => [...fetched, ...prev]);
27750
+ setOptions((prev) => uniqueOptions([...fetched, ...prev]));
27740
27751
  }
27741
27752
  } catch (err) {
27742
27753
  console.warn("\u26A0\uFE0F Failed to fetch default value for dropdown:", err);
@@ -27747,8 +27758,14 @@ function useLazyDropdown(config) {
27747
27758
  useEffect13(() => {
27748
27759
  const cfg = configRef.current;
27749
27760
  if (!cfg.enabled || !cfg.value || cfg.dataSource !== "api" || !cfg.apiUrl) return;
27750
- const valueExists = options.some((opt) => opt.value === cfg.value);
27751
- if (valueExists) return;
27761
+ if (!!cfg.isMultiSelect) {
27762
+ const values = String(cfg.value).split(",").map((v) => v.trim());
27763
+ const valueExists = values.every((val) => options.some((opt) => opt.value === val));
27764
+ if (valueExists) return;
27765
+ } else {
27766
+ const valueExists = options.some((opt) => opt.value === cfg.value);
27767
+ if (valueExists) return;
27768
+ }
27752
27769
  fetchValueItem();
27753
27770
  }, [config.value, config.dataKey, config.apiUrl, config.dataSource, transformToOptions]);
27754
27771
  const loadMore = useCallback2(() => {
@@ -27831,7 +27848,7 @@ function LazySelectDropdown({
27831
27848
  value,
27832
27849
  axiosInstance
27833
27850
  });
27834
- const selectedOption = lazyOptions.find((opt) => opt.value === value);
27851
+ const selectedOption = useMemo3(() => lazyOptions.find((opt) => opt.value === value), [lazyOptions, value]);
27835
27852
  useEffect14(() => {
27836
27853
  const handleClickOutside = (e) => {
27837
27854
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -27866,7 +27883,16 @@ function LazySelectDropdown({
27866
27883
  };
27867
27884
  const handleFocus = () => {
27868
27885
  if (!disabled) setIsOpen(true);
27869
- loadPage(1, "");
27886
+ if (lazyOptions.length === 0)
27887
+ loadPage(1, "");
27888
+ };
27889
+ const handleRemoveSelection = (e) => {
27890
+ e.preventDefault();
27891
+ e.stopPropagation();
27892
+ onChange?.("", id || "");
27893
+ setSearchTerm("");
27894
+ reset();
27895
+ search("");
27870
27896
  };
27871
27897
  return /* @__PURE__ */ jsxs18("div", { ref: dropdownRef, className: "relative w-full", children: [
27872
27898
  /* @__PURE__ */ jsx36(
@@ -27876,7 +27902,7 @@ function LazySelectDropdown({
27876
27902
  id,
27877
27903
  name: id,
27878
27904
  className: cn(
27879
- "w-full px-3 py-2 border border-[#BDBDBD] rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
27905
+ "w-full px-3 py-2 border border-[#BDBDBD] rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 pr-7",
27880
27906
  disabled ? "bg-gray-100 cursor-not-allowed" : "bg-white cursor-pointer",
27881
27907
  className,
27882
27908
  errorMessage ? "border-red-500" : ""
@@ -27889,6 +27915,16 @@ function LazySelectDropdown({
27889
27915
  disabled
27890
27916
  }
27891
27917
  ),
27918
+ selectedOption && !disabled && !readOnly && /* @__PURE__ */ jsx36(
27919
+ "button",
27920
+ {
27921
+ type: "button",
27922
+ "aria-label": "Clear selection",
27923
+ onClick: handleRemoveSelection,
27924
+ className: "absolute right-2 top-1/2 -translate-y-1/2 h-5 w-5 flex items-center justify-center rounded hover:bg-gray-200 text-gray-500 focus:outline-none",
27925
+ children: /* @__PURE__ */ jsx36(SquareX, { className: "h-5 w-5 pointer-events-none" })
27926
+ }
27927
+ ),
27892
27928
  errorMessage && /* @__PURE__ */ jsx36("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
27893
27929
  isOpen && !disabled && /* @__PURE__ */ jsx36(Portal_default, { children: /* @__PURE__ */ jsx36(
27894
27930
  "div",
@@ -28611,330 +28647,218 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28611
28647
  var TextInputGroup_default = TextInputGroup;
28612
28648
 
28613
28649
  // src/components/Inputs/Multiselect/MultiSelect.tsx
28614
- import * as React8 from "react";
28615
-
28616
- // src/components/ui/command.tsx
28617
- import { Command as CommandPrimitive } from "cmdk";
28618
-
28619
- // src/components/ui/dialog.tsx
28620
- import * as DialogPrimitive from "@radix-ui/react-dialog";
28621
- import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
28622
- function Dialog({
28623
- ...props
28624
- }) {
28625
- return /* @__PURE__ */ jsx48(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
28626
- }
28627
- function DialogPortal({
28628
- ...props
28629
- }) {
28630
- return /* @__PURE__ */ jsx48(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
28631
- }
28632
- function DialogOverlay({
28650
+ import { useState as useState6, useRef as useRef5, useEffect as useEffect24, useMemo as useMemo4 } from "react";
28651
+ import { Fragment as Fragment19, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
28652
+ function LazyMultiSelectDropdown({
28653
+ options = [],
28654
+ value = [],
28655
+ onChange,
28656
+ placeholder,
28633
28657
  className,
28634
- ...props
28658
+ id,
28659
+ disabled,
28660
+ readOnly,
28661
+ source,
28662
+ apiUrl,
28663
+ pageSize,
28664
+ dataKey = "id",
28665
+ dataLabel = "name",
28666
+ errorMessage,
28667
+ axiosInstance,
28668
+ outputFormat = "array"
28635
28669
  }) {
28636
- return /* @__PURE__ */ jsx48(
28637
- DialogPrimitive.Overlay,
28638
- {
28639
- "data-slot": "dialog-overlay",
28640
- className: cn(
28641
- "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",
28642
- className
28643
- ),
28644
- ...props
28670
+ const [isOpen, setIsOpen] = useState6(false);
28671
+ const [searchTerm, setSearchTerm] = useState6("");
28672
+ const dropdownRef = useRef5(null);
28673
+ const observerTarget = useRef5(null);
28674
+ const {
28675
+ options: lazyOptions,
28676
+ loading,
28677
+ hasMore,
28678
+ loadMore,
28679
+ search,
28680
+ reset,
28681
+ loadPage
28682
+ } = useLazyDropdown({
28683
+ enabled: true,
28684
+ dataSource: source || "",
28685
+ apiUrl,
28686
+ pageSize: pageSize || 10,
28687
+ dataKey,
28688
+ dataLabel,
28689
+ initialData: options || [],
28690
+ value,
28691
+ axiosInstance,
28692
+ isMultiSelect: true
28693
+ });
28694
+ const ensureUnique = (arr) => {
28695
+ return Array.from(new Set(arr));
28696
+ };
28697
+ const convertOutput = (values) => {
28698
+ const unique = ensureUnique(values);
28699
+ switch (outputFormat) {
28700
+ case "comma":
28701
+ return unique.join(",");
28702
+ case "semicolon":
28703
+ return unique.join(";");
28704
+ default:
28705
+ return unique;
28645
28706
  }
28646
- );
28647
- }
28648
- function DialogContent({
28649
- className,
28650
- children,
28651
- showCloseButton = true,
28652
- ...props
28653
- }) {
28654
- return /* @__PURE__ */ jsxs27(DialogPortal, { "data-slot": "dialog-portal", children: [
28655
- /* @__PURE__ */ jsx48(DialogOverlay, {}),
28707
+ };
28708
+ const normalizeInput = (value2) => {
28709
+ let arr = [];
28710
+ if (Array.isArray(value2)) {
28711
+ arr = value2;
28712
+ } else if (typeof value2 === "string") {
28713
+ if (!value2.trim()) return [];
28714
+ if (value2.includes(";")) arr = value2.split(";").map((v) => v.trim());
28715
+ else if (value2.includes(",")) arr = value2.split(",").map((v) => v.trim());
28716
+ else arr = [value2.trim()];
28717
+ }
28718
+ return ensureUnique(arr);
28719
+ };
28720
+ const normalizedValue = normalizeInput(value);
28721
+ const selectedOptions = useMemo4(() => {
28722
+ return lazyOptions.filter((opt) => normalizedValue.includes(opt.value));
28723
+ }, [lazyOptions, normalizedValue]);
28724
+ useEffect24(() => {
28725
+ const handleClick = (e) => {
28726
+ if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
28727
+ setIsOpen(false);
28728
+ }
28729
+ };
28730
+ document.addEventListener("mousedown", handleClick);
28731
+ return () => document.removeEventListener("mousedown", handleClick);
28732
+ }, []);
28733
+ useEffect24(() => {
28734
+ if (!isOpen || !hasMore || loading) return;
28735
+ const obs = new IntersectionObserver(
28736
+ (entries) => {
28737
+ if (entries[0].isIntersecting) loadMore();
28738
+ },
28739
+ { threshold: 0.1 }
28740
+ );
28741
+ if (observerTarget.current) obs.observe(observerTarget.current);
28742
+ return () => obs.disconnect();
28743
+ }, [isOpen, hasMore, loading, loadMore]);
28744
+ const handleSearch = (e) => {
28745
+ const term = e.target.value;
28746
+ setSearchTerm(term);
28747
+ search(term);
28748
+ };
28749
+ const toggleSelect = (val) => {
28750
+ let updated;
28751
+ if (normalizedValue.includes(val)) {
28752
+ updated = normalizedValue.filter((v) => v !== val);
28753
+ } else {
28754
+ updated = ensureUnique([...normalizedValue, val]);
28755
+ }
28756
+ onChange?.(convertOutput(updated), id);
28757
+ };
28758
+ const removeTag = (val) => {
28759
+ const updated = normalizedValue.filter((v) => v !== val);
28760
+ onChange?.(convertOutput(updated), id);
28761
+ };
28762
+ const handleFocus = () => {
28763
+ if (!disabled) setIsOpen(true);
28764
+ if (lazyOptions.length === 0) loadPage(1, "");
28765
+ };
28766
+ return /* @__PURE__ */ jsxs27("div", { ref: dropdownRef, className: "relative w-full", children: [
28656
28767
  /* @__PURE__ */ jsxs27(
28657
- DialogPrimitive.Content,
28768
+ "div",
28658
28769
  {
28659
- "data-slot": "dialog-content",
28770
+ onClick: handleFocus,
28660
28771
  className: cn(
28661
- "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",
28772
+ "min-h-10 w-full flex items-center flex-wrap gap-1 px-2 py-1 border border-[#BDBDBD] rounded-md bg-white cursor-pointer",
28773
+ disabled && "bg-gray-100 cursor-not-allowed",
28774
+ errorMessage && "border-red-500",
28662
28775
  className
28663
28776
  ),
28664
- ...props,
28665
28777
  children: [
28666
- children,
28667
- showCloseButton && /* @__PURE__ */ jsxs27(
28668
- DialogPrimitive.Close,
28778
+ selectedOptions.map((opt) => /* @__PURE__ */ jsxs27(
28779
+ "span",
28669
28780
  {
28670
- "data-slot": "dialog-close",
28671
- 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",
28781
+ className: "bg-blue-100 text-blue-700 px-2 py-1 rounded-md text-xs flex items-center gap-1",
28672
28782
  children: [
28673
- /* @__PURE__ */ jsx48(X, {}),
28674
- /* @__PURE__ */ jsx48("span", { className: "sr-only", children: "Close" })
28783
+ opt.label,
28784
+ !disabled && !readOnly && /* @__PURE__ */ jsx48(
28785
+ "button",
28786
+ {
28787
+ type: "button",
28788
+ onClick: (e) => {
28789
+ e.stopPropagation();
28790
+ removeTag(opt.value);
28791
+ },
28792
+ className: "hover:text-red-600",
28793
+ children: /* @__PURE__ */ jsx48(X, { size: 12 })
28794
+ }
28795
+ )
28675
28796
  ]
28797
+ },
28798
+ opt.value
28799
+ )),
28800
+ /* @__PURE__ */ jsx48(
28801
+ "input",
28802
+ {
28803
+ type: "text",
28804
+ placeholder: selectedOptions.length ? "" : placeholder,
28805
+ className: "flex-1 min-w-[60px] p-1 outline-none",
28806
+ value: isOpen ? searchTerm : "",
28807
+ onChange: handleSearch,
28808
+ readOnly,
28809
+ disabled
28676
28810
  }
28677
28811
  )
28678
28812
  ]
28679
28813
  }
28680
- )
28681
- ] });
28682
- }
28683
- function DialogHeader({ className, ...props }) {
28684
- return /* @__PURE__ */ jsx48(
28685
- "div",
28686
- {
28687
- "data-slot": "dialog-header",
28688
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
28689
- ...props
28690
- }
28691
- );
28692
- }
28693
- function DialogFooter({ className, ...props }) {
28694
- return /* @__PURE__ */ jsx48(
28695
- "div",
28696
- {
28697
- "data-slot": "dialog-footer",
28698
- className: cn(
28699
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
28700
- className
28701
- ),
28702
- ...props
28703
- }
28704
- );
28705
- }
28706
- function DialogTitle({
28707
- className,
28708
- ...props
28709
- }) {
28710
- return /* @__PURE__ */ jsx48(
28711
- DialogPrimitive.Title,
28712
- {
28713
- "data-slot": "dialog-title",
28714
- className: cn("text-lg leading-none font-semibold", className),
28715
- ...props
28716
- }
28717
- );
28718
- }
28719
- function DialogDescription({
28720
- className,
28721
- ...props
28722
- }) {
28723
- return /* @__PURE__ */ jsx48(
28724
- DialogPrimitive.Description,
28725
- {
28726
- "data-slot": "dialog-description",
28727
- className: cn("text-muted-foreground text-sm", className),
28728
- ...props
28729
- }
28730
- );
28731
- }
28732
-
28733
- // src/components/ui/command.tsx
28734
- import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
28735
- function Command2({
28736
- className,
28737
- ...props
28738
- }) {
28739
- return /* @__PURE__ */ jsx49(
28740
- CommandPrimitive,
28741
- {
28742
- "data-slot": "command",
28743
- className: cn(
28744
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
28745
- className
28746
- ),
28747
- ...props
28748
- }
28749
- );
28750
- }
28751
- function CommandInput({
28752
- className,
28753
- ...props
28754
- }) {
28755
- return /* @__PURE__ */ jsxs28(
28756
- "div",
28757
- {
28758
- "data-slot": "command-input-wrapper",
28759
- className: "flex h-9 items-center gap-2 border-b px-3",
28760
- children: [
28761
- /* @__PURE__ */ jsx49(Search, { className: "size-4 shrink-0 opacity-50" }),
28762
- /* @__PURE__ */ jsx49(
28763
- CommandPrimitive.Input,
28764
- {
28765
- "data-slot": "command-input",
28766
- className: cn(
28767
- "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",
28768
- className
28769
- ),
28770
- ...props
28771
- }
28772
- )
28773
- ]
28774
- }
28775
- );
28776
- }
28777
- function CommandList({
28778
- className,
28779
- ...props
28780
- }) {
28781
- return /* @__PURE__ */ jsx49(
28782
- CommandPrimitive.List,
28783
- {
28784
- "data-slot": "command-list",
28785
- className: cn(
28786
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
28787
- className
28788
- ),
28789
- ...props
28790
- }
28791
- );
28792
- }
28793
- function CommandEmpty({
28794
- ...props
28795
- }) {
28796
- return /* @__PURE__ */ jsx49(
28797
- CommandPrimitive.Empty,
28798
- {
28799
- "data-slot": "command-empty",
28800
- className: "py-6 text-center text-sm",
28801
- ...props
28802
- }
28803
- );
28804
- }
28805
- function CommandGroup({
28806
- className,
28807
- ...props
28808
- }) {
28809
- return /* @__PURE__ */ jsx49(
28810
- CommandPrimitive.Group,
28811
- {
28812
- "data-slot": "command-group",
28813
- className: cn(
28814
- "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",
28815
- className
28816
- ),
28817
- ...props
28818
- }
28819
- );
28820
- }
28821
- function CommandItem({
28822
- className,
28823
- ...props
28824
- }) {
28825
- return /* @__PURE__ */ jsx49(
28826
- CommandPrimitive.Item,
28827
- {
28828
- "data-slot": "command-item",
28829
- className: cn(
28830
- "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",
28831
- className
28832
- ),
28833
- ...props
28834
- }
28835
- );
28836
- }
28837
-
28838
- // src/components/Inputs/Multiselect/MultiSelect.tsx
28839
- import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
28840
- var MultiSelect = ({
28841
- value = [],
28842
- onChange,
28843
- data = [],
28844
- placeholder = "Select...",
28845
- disabled,
28846
- searchable = true,
28847
- className = "",
28848
- dataKey = "value",
28849
- dataLabel = "label",
28850
- ...props
28851
- }) => {
28852
- const [open, setOpen] = React8.useState(false);
28853
- React8.useEffect(() => {
28854
- if (value) {
28855
- onChange(value, props?.name || "");
28856
- }
28857
- }, []);
28858
- const toggleOption = (val) => {
28859
- onChange(
28860
- value?.includes(val) ? value.filter((v) => v !== val) : [...value || [], val],
28861
- props?.name || ""
28862
- );
28863
- };
28864
- const selectedLabels = React8.useMemo(
28865
- () => {
28866
- if (!data || !value) return [];
28867
- return data?.filter((opt) => value?.includes(opt.value)).map((opt) => opt.label);
28868
- },
28869
- [data, value]
28870
- );
28871
- const options = data && data?.map((item) => ({
28872
- value: item[dataKey],
28873
- label: item[dataLabel]
28874
- }));
28875
- return /* @__PURE__ */ jsxs29(Popover, { open, onOpenChange: setOpen, children: [
28876
- /* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs29(
28877
- Button,
28878
- {
28879
- variant: "outline",
28880
- role: "combobox",
28881
- className: `w-full justify-between ${className} ${props.errorMessage ? "border-red-500" : ""}`,
28882
- disabled,
28883
- type: "button",
28884
- children: [
28885
- /* @__PURE__ */ jsx50("span", { className: "truncate", children: selectedLabels.length > 0 ? selectedLabels.join(", ") : placeholder }),
28886
- /* @__PURE__ */ jsx50(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
28887
- ]
28888
- }
28889
- ) }),
28890
- /* @__PURE__ */ jsx50(
28891
- PopoverContent,
28814
+ ),
28815
+ errorMessage && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
28816
+ isOpen && !disabled && /* @__PURE__ */ jsx48(Portal_default, { children: /* @__PURE__ */ jsx48(
28817
+ "div",
28892
28818
  {
28893
- align: "start",
28894
- className: "w-[var(--radix-popover-trigger-width)] p-0",
28895
- onOpenAutoFocus: (e) => e.preventDefault(),
28896
- onInteractOutside: (e) => {
28897
- if (e.target.closest(".keep-open")) e.preventDefault();
28819
+ onMouseDown: (e) => e.stopPropagation(),
28820
+ className: "absolute z-[999] mt-1 bg-white border rounded-lg shadow-lg max-h-60 overflow-y-auto",
28821
+ style: {
28822
+ zIndex: 900,
28823
+ width: dropdownRef.current?.offsetWidth,
28824
+ top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
28825
+ left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
28898
28826
  },
28899
- children: /* @__PURE__ */ jsxs29(Command2, { shouldFilter: searchable, children: [
28900
- searchable && /* @__PURE__ */ jsx50(CommandInput, { placeholder: "Search..." }),
28901
- /* @__PURE__ */ jsxs29(CommandList, { children: [
28902
- /* @__PURE__ */ jsx50(CommandEmpty, { children: "No options found." }),
28903
- /* @__PURE__ */ jsx50(CommandGroup, { children: options.map((opt) => {
28904
- const isSelected = (value ?? [])?.includes(opt.value);
28905
- return /* @__PURE__ */ jsx50(
28906
- "div",
28907
- {
28908
- className: "keep-open",
28909
- children: /* @__PURE__ */ jsx50(
28910
- CommandItem,
28911
- {
28912
- onMouseDown: (e) => {
28913
- e.preventDefault();
28914
- toggleOption(opt.value);
28915
- },
28916
- children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
28917
- /* @__PURE__ */ jsx50(Checkbox, { checked: isSelected }),
28918
- /* @__PURE__ */ jsx50("span", { children: opt.label })
28919
- ] })
28920
- },
28921
- opt.value
28922
- )
28923
- },
28924
- opt.value
28925
- );
28926
- }) })
28927
- ] })
28928
- ] })
28827
+ children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ jsx48("div", { className: "px-3 py-4 text-center text-gray-500", children: "Loading..." }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs27(Fragment19, { children: [
28828
+ lazyOptions.map((option) => {
28829
+ const isSelected = normalizedValue.includes(option.value);
28830
+ return /* @__PURE__ */ jsxs27(
28831
+ "div",
28832
+ {
28833
+ onClick: () => toggleSelect(option.value),
28834
+ className: cn(
28835
+ "px-3 py-2 text-sm cursor-pointer hover:bg-blue-50 flex justify-between",
28836
+ isSelected && "bg-blue-100"
28837
+ ),
28838
+ children: [
28839
+ option.label,
28840
+ isSelected && /* @__PURE__ */ jsx48(SquareX, { size: 16 })
28841
+ ]
28842
+ },
28843
+ option.value
28844
+ );
28845
+ }),
28846
+ hasMore && /* @__PURE__ */ jsx48(
28847
+ "div",
28848
+ {
28849
+ ref: observerTarget,
28850
+ className: "px-3 py-3 text-center text-gray-400 text-sm",
28851
+ children: loading ? "Loading\u2026" : "Scroll for more\u2026"
28852
+ }
28853
+ )
28854
+ ] }) : /* @__PURE__ */ jsx48("div", { className: "px-3 py-4 text-center text-gray-500", children: "No results" })
28929
28855
  }
28930
- ),
28931
- props.errorMessage && /* @__PURE__ */ jsx50("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
28856
+ ) })
28932
28857
  ] });
28933
- };
28934
- var MultiSelect_default = MultiSelect;
28858
+ }
28935
28859
 
28936
28860
  // src/components/ui/data-table.tsx
28937
- import * as React10 from "react";
28861
+ import * as React9 from "react";
28938
28862
  import { faEllipsisH } from "@fortawesome/free-solid-svg-icons";
28939
28863
  import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
28940
28864
  import {
@@ -28946,14 +28870,14 @@ import {
28946
28870
  } from "@tanstack/react-table";
28947
28871
 
28948
28872
  // src/components/ui/table.tsx
28949
- import { jsx as jsx51 } from "react/jsx-runtime";
28873
+ import { jsx as jsx49 } from "react/jsx-runtime";
28950
28874
  function Table3({ className, ...props }) {
28951
- return /* @__PURE__ */ jsx51(
28875
+ return /* @__PURE__ */ jsx49(
28952
28876
  "div",
28953
28877
  {
28954
28878
  "data-slot": "table-container",
28955
28879
  className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
28956
- children: /* @__PURE__ */ jsx51(
28880
+ children: /* @__PURE__ */ jsx49(
28957
28881
  "table",
28958
28882
  {
28959
28883
  "data-slot": "table",
@@ -28965,7 +28889,7 @@ function Table3({ className, ...props }) {
28965
28889
  );
28966
28890
  }
28967
28891
  function TableHeader({ className, ...props }) {
28968
- return /* @__PURE__ */ jsx51(
28892
+ return /* @__PURE__ */ jsx49(
28969
28893
  "thead",
28970
28894
  {
28971
28895
  "data-slot": "table-header",
@@ -28978,7 +28902,7 @@ function TableHeader({ className, ...props }) {
28978
28902
  );
28979
28903
  }
28980
28904
  function TableBody({ className, ...props }) {
28981
- return /* @__PURE__ */ jsx51(
28905
+ return /* @__PURE__ */ jsx49(
28982
28906
  "tbody",
28983
28907
  {
28984
28908
  "data-slot": "table-body",
@@ -28991,7 +28915,7 @@ function TableBody({ className, ...props }) {
28991
28915
  );
28992
28916
  }
28993
28917
  function TableRow({ className, ...props }) {
28994
- return /* @__PURE__ */ jsx51(
28918
+ return /* @__PURE__ */ jsx49(
28995
28919
  "tr",
28996
28920
  {
28997
28921
  "data-slot": "table-row",
@@ -29004,7 +28928,7 @@ function TableRow({ className, ...props }) {
29004
28928
  );
29005
28929
  }
29006
28930
  function TableHead({ className, ...props }) {
29007
- return /* @__PURE__ */ jsx51(
28931
+ return /* @__PURE__ */ jsx49(
29008
28932
  "th",
29009
28933
  {
29010
28934
  "data-slot": "table-head",
@@ -29017,7 +28941,7 @@ function TableHead({ className, ...props }) {
29017
28941
  );
29018
28942
  }
29019
28943
  function TableCell({ className, ...props }) {
29020
- return /* @__PURE__ */ jsx51(
28944
+ return /* @__PURE__ */ jsx49(
29021
28945
  "td",
29022
28946
  {
29023
28947
  "data-slot": "table-cell",
@@ -29034,7 +28958,7 @@ function TableCell({ className, ...props }) {
29034
28958
  import { createColumnHelper } from "@tanstack/react-table";
29035
28959
 
29036
28960
  // src/lib/table/cellRendererFactory.tsx
29037
- import React9 from "react";
28961
+ import React8 from "react";
29038
28962
  import Image2 from "next/image";
29039
28963
 
29040
28964
  // src/lib/dayjs-setup.ts
@@ -29083,7 +29007,7 @@ var valueFormatter = (value, format2, customFormatters = {}) => {
29083
29007
  };
29084
29008
 
29085
29009
  // src/lib/table/cellRendererFactory.tsx
29086
- import { Fragment as Fragment19, jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
29010
+ import { Fragment as Fragment20, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
29087
29011
  var getContrastColor = (bg) => {
29088
29012
  let c = bg.trim().toUpperCase();
29089
29013
  if (/^#([a-fA-F0-9]{3})$/.test(c)) {
@@ -29117,9 +29041,9 @@ var getContrastColor = (bg) => {
29117
29041
  };
29118
29042
  var sanitizeValue = (val) => {
29119
29043
  if (val == null) return null;
29120
- if (React9.isValidElement(val)) return val;
29044
+ if (React8.isValidElement(val)) return val;
29121
29045
  if (typeof val === "string" || typeof val === "number") return val;
29122
- if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx52(React9.Fragment, { children: sanitizeValue(v) }, i));
29046
+ if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx50(React8.Fragment, { children: sanitizeValue(v) }, i));
29123
29047
  if (typeof val === "object") {
29124
29048
  if ("name" in val && typeof val.name === "string") return val.name;
29125
29049
  if ("label" in val && typeof val.label === "string") return val.label;
@@ -29136,13 +29060,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29136
29060
  switch (renderer) {
29137
29061
  /* -------------------- BASIC -------------------- */
29138
29062
  case "text":
29139
- return /* @__PURE__ */ jsx52("span", { children: row?.[rendererProps?.rowField] || formattedValue });
29063
+ return /* @__PURE__ */ jsx50("span", { children: row?.[rendererProps?.rowField] || formattedValue });
29140
29064
  case "number":
29141
- return /* @__PURE__ */ jsx52("span", { className: "tabular-nums text-right", children: valueFormatter(row?.[rendererProps?.rowField] || value, "number:2") });
29065
+ return /* @__PURE__ */ jsx50("span", { className: "tabular-nums text-right", children: valueFormatter(row?.[rendererProps?.rowField] || value, "number:2") });
29142
29066
  case "date":
29143
- return /* @__PURE__ */ jsx52("span", { children: valueFormatter(row?.[rendererProps?.rowField] || value, format2) });
29067
+ return /* @__PURE__ */ jsx50("span", { children: valueFormatter(row?.[rendererProps?.rowField] || value, format2) });
29144
29068
  case "link":
29145
- return /* @__PURE__ */ jsx52(
29069
+ return /* @__PURE__ */ jsx50(
29146
29070
  "a",
29147
29071
  {
29148
29072
  href: `${rendererProps?.prefix || ""}${row?.[rendererProps?.rowField] || formattedValue}`,
@@ -29154,7 +29078,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29154
29078
  );
29155
29079
  /* -------------------- VISUAL -------------------- */
29156
29080
  case "image":
29157
- return /* @__PURE__ */ jsx52("div", { className: "relative", children: /* @__PURE__ */ jsx52(
29081
+ return /* @__PURE__ */ jsx50("div", { className: "relative", children: /* @__PURE__ */ jsx50(
29158
29082
  Image2,
29159
29083
  {
29160
29084
  src: row?.[rendererProps?.rowField] || formattedValue || rendererProps?.fallback || "/placeholder.png",
@@ -29171,7 +29095,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29171
29095
  case "icon":
29172
29096
  const maybeIcon = lucide_react_exports[rendererProps?.icon];
29173
29097
  const IconComponent = typeof maybeIcon === "function" ? maybeIcon : Star;
29174
- return /* @__PURE__ */ jsx52(
29098
+ return /* @__PURE__ */ jsx50(
29175
29099
  IconComponent,
29176
29100
  {
29177
29101
  size: rendererProps?.size || 16,
@@ -29183,7 +29107,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29183
29107
  const color = rendererProps?.colorMap?.[formattedValue] || rendererProps?.color || "gray";
29184
29108
  if (!formattedValue) return null;
29185
29109
  const textColor = getContrastColor(color);
29186
- return /* @__PURE__ */ jsx52(
29110
+ return /* @__PURE__ */ jsx50(
29187
29111
  "span",
29188
29112
  {
29189
29113
  className: `inline-block px-2 py-1 text-xs rounded-full bg-${color}-100 text-${textColor}-700 ${rendererProps?.className || ""}`,
@@ -29198,13 +29122,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29198
29122
  const IconComponent2 = typeof maybeIcon2 === "function" ? maybeIcon2 : Star;
29199
29123
  if (!formattedValue) return null;
29200
29124
  const textColor = getContrastColor(color);
29201
- return /* @__PURE__ */ jsxs30(
29125
+ return /* @__PURE__ */ jsxs28(
29202
29126
  "span",
29203
29127
  {
29204
29128
  className: `inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-[${color}]-100 text-[${textColor}]-700`,
29205
29129
  style: { backgroundColor: color, color: textColor },
29206
29130
  children: [
29207
- rendererProps?.icon && /* @__PURE__ */ jsx52(Fragment19, { children: IconComponent2 ? /* @__PURE__ */ jsx52(IconComponent2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx52(Box, { className: "h-4 w-4" }) }),
29131
+ rendererProps?.icon && /* @__PURE__ */ jsx50(Fragment20, { children: IconComponent2 ? /* @__PURE__ */ jsx50(IconComponent2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx50(Box, { className: "h-4 w-4" }) }),
29208
29132
  formattedValue
29209
29133
  ]
29210
29134
  }
@@ -29212,7 +29136,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29212
29136
  }
29213
29137
  /* -------------------- INTERACTIVE -------------------- */
29214
29138
  case "button":
29215
- return /* @__PURE__ */ jsx52(
29139
+ return /* @__PURE__ */ jsx50(
29216
29140
  "button",
29217
29141
  {
29218
29142
  onClick: () => rendererProps?.onClick?.(row, formattedValue),
@@ -29221,8 +29145,8 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29221
29145
  }
29222
29146
  );
29223
29147
  case "switch":
29224
- return /* @__PURE__ */ jsxs30("label", { className: "inline-flex items-center cursor-pointer", children: [
29225
- /* @__PURE__ */ jsx52(
29148
+ return /* @__PURE__ */ jsxs28("label", { className: "inline-flex items-center cursor-pointer", children: [
29149
+ /* @__PURE__ */ jsx50(
29226
29150
  "input",
29227
29151
  {
29228
29152
  type: "checkbox",
@@ -29231,10 +29155,10 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29231
29155
  className: "sr-only peer"
29232
29156
  }
29233
29157
  ),
29234
- /* @__PURE__ */ jsx52("div", { className: "relative w-9 h-5 bg-gray-300 peer-checked:bg-blue-600 rounded-full transition-all", children: /* @__PURE__ */ jsx52("div", { className: "absolute top-[2px] left-[2px] w-4 h-4 bg-white rounded-full peer-checked:translate-x-4 transition-all" }) })
29158
+ /* @__PURE__ */ jsx50("div", { className: "relative w-9 h-5 bg-gray-300 peer-checked:bg-blue-600 rounded-full transition-all", children: /* @__PURE__ */ jsx50("div", { className: "absolute top-[2px] left-[2px] w-4 h-4 bg-white rounded-full peer-checked:translate-x-4 transition-all" }) })
29235
29159
  ] });
29236
29160
  case "progress":
29237
- return /* @__PURE__ */ jsx52("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx52(
29161
+ return /* @__PURE__ */ jsx50("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx50(
29238
29162
  "div",
29239
29163
  {
29240
29164
  className: "bg-blue-600 h-2 rounded-full transition-all",
@@ -29243,7 +29167,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29243
29167
  ) });
29244
29168
  case "rating": {
29245
29169
  const stars = Math.round(Number(row?.[rendererProps?.rowField] || formattedValue) || 0);
29246
- return /* @__PURE__ */ jsx52("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx52(
29170
+ return /* @__PURE__ */ jsx50("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx50(
29247
29171
  Star,
29248
29172
  {
29249
29173
  size: 16,
@@ -29257,7 +29181,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29257
29181
  case "custom": {
29258
29182
  const CustomRenderer = customRenderers[rendererProps?.customRendererId] || customRenderers[rendererProps?.rendererId];
29259
29183
  if (CustomRenderer)
29260
- return /* @__PURE__ */ jsx52(
29184
+ return /* @__PURE__ */ jsx50(
29261
29185
  CustomRenderer,
29262
29186
  {
29263
29187
  value: formattedValue,
@@ -29265,11 +29189,11 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29265
29189
  ...rendererProps
29266
29190
  }
29267
29191
  );
29268
- return /* @__PURE__ */ jsx52("span", { children: "Missing custom renderer" });
29192
+ return /* @__PURE__ */ jsx50("span", { children: "Missing custom renderer" });
29269
29193
  }
29270
29194
  /* -------------------- DEFAULT -------------------- */
29271
29195
  default:
29272
- return /* @__PURE__ */ jsx52("span", { children: formattedValue });
29196
+ return /* @__PURE__ */ jsx50("span", { children: formattedValue });
29273
29197
  }
29274
29198
  };
29275
29199
 
@@ -29318,7 +29242,7 @@ var useDynamicColumns = (config, customRenderers = {}, customFormatters = {}) =>
29318
29242
  };
29319
29243
 
29320
29244
  // src/components/ui/data-table.tsx
29321
- import { Fragment as Fragment20, jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
29245
+ import { Fragment as Fragment21, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
29322
29246
  function DataTable({
29323
29247
  columns,
29324
29248
  data,
@@ -29337,10 +29261,10 @@ function DataTable({
29337
29261
  onDeleteRow,
29338
29262
  rowActions
29339
29263
  }) {
29340
- const [columnFilters, setColumnFilters] = React10.useState([]);
29341
- const [columnVisibility, setColumnVisibility] = React10.useState({});
29342
- const [manualSort, setManualSort] = React10.useState(null);
29343
- const [searchTerm, setSearchTerm] = React10.useState("");
29264
+ const [columnFilters, setColumnFilters] = React9.useState([]);
29265
+ const [columnVisibility, setColumnVisibility] = React9.useState({});
29266
+ const [manualSort, setManualSort] = React9.useState(null);
29267
+ const [searchTerm, setSearchTerm] = React9.useState("");
29344
29268
  const tableData = Array.isArray(data) ? data : [];
29345
29269
  const dynamicCols = useDynamicColumns({ columns });
29346
29270
  const table = useReactTable({
@@ -29391,11 +29315,11 @@ function DataTable({
29391
29315
  return [];
29392
29316
  };
29393
29317
  const pageCount = table.getPageCount() === 0 ? 1 : table.getPageCount();
29394
- return /* @__PURE__ */ jsxs31("div", { className: "overflow-hidden rounded-md w-full", children: [
29395
- /* @__PURE__ */ jsxs31("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
29396
- globalSearch && /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
29397
- /* @__PURE__ */ jsxs31("div", { className: "relative w-full", children: [
29398
- /* @__PURE__ */ jsx53(
29318
+ return /* @__PURE__ */ jsxs29("div", { className: "overflow-hidden rounded-md w-full", children: [
29319
+ /* @__PURE__ */ jsxs29("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
29320
+ globalSearch && /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
29321
+ /* @__PURE__ */ jsxs29("div", { className: "relative w-full", children: [
29322
+ /* @__PURE__ */ jsx51(
29399
29323
  "input",
29400
29324
  {
29401
29325
  type: "text",
@@ -29410,9 +29334,9 @@ function DataTable({
29410
29334
  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]"
29411
29335
  }
29412
29336
  ),
29413
- /* @__PURE__ */ jsx53(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
29337
+ /* @__PURE__ */ jsx51(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
29414
29338
  ] }),
29415
- /* @__PURE__ */ jsx53(
29339
+ /* @__PURE__ */ jsx51(
29416
29340
  Button,
29417
29341
  {
29418
29342
  size: "sm",
@@ -29422,8 +29346,8 @@ function DataTable({
29422
29346
  }
29423
29347
  )
29424
29348
  ] }),
29425
- /* @__PURE__ */ jsxs31(Popover, { children: [
29426
- /* @__PURE__ */ jsx53(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
29349
+ /* @__PURE__ */ jsxs29(Popover, { children: [
29350
+ /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
29427
29351
  Button,
29428
29352
  {
29429
29353
  variant: "outline",
@@ -29432,10 +29356,10 @@ function DataTable({
29432
29356
  children: "Manage Columns"
29433
29357
  }
29434
29358
  ) }),
29435
- /* @__PURE__ */ jsxs31(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
29436
- /* @__PURE__ */ jsx53("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
29437
- /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
29438
- /* @__PURE__ */ jsx53(
29359
+ /* @__PURE__ */ jsxs29(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
29360
+ /* @__PURE__ */ jsx51("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
29361
+ /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
29362
+ /* @__PURE__ */ jsx51(
29439
29363
  "input",
29440
29364
  {
29441
29365
  type: "checkbox",
@@ -29454,8 +29378,8 @@ function DataTable({
29454
29378
  ),
29455
29379
  "Toggle All"
29456
29380
  ] }),
29457
- table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm", children: [
29458
- /* @__PURE__ */ jsx53(
29381
+ table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm", children: [
29382
+ /* @__PURE__ */ jsx51(
29459
29383
  "input",
29460
29384
  {
29461
29385
  type: "checkbox",
@@ -29468,12 +29392,12 @@ function DataTable({
29468
29392
  ] })
29469
29393
  ] })
29470
29394
  ] }),
29471
- /* @__PURE__ */ jsxs31(Table3, { className: "table-fixed", children: [
29472
- /* @__PURE__ */ jsx53(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx53(TableRow, { children: hg.headers.map((header, index) => {
29395
+ /* @__PURE__ */ jsxs29(Table3, { className: "table-fixed", children: [
29396
+ /* @__PURE__ */ jsx51(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx51(TableRow, { children: hg.headers.map((header, index) => {
29473
29397
  const canSort = header.column.getCanSort();
29474
29398
  const canFilter = header.column.getCanFilter();
29475
29399
  const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
29476
- return /* @__PURE__ */ jsx53(
29400
+ return /* @__PURE__ */ jsx51(
29477
29401
  TableHead,
29478
29402
  {
29479
29403
  className: "relative select-none",
@@ -29482,8 +29406,8 @@ function DataTable({
29482
29406
  minWidth: header.column.columnDef.minSize,
29483
29407
  maxWidth: header.column.columnDef.maxSize
29484
29408
  },
29485
- children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
29486
- /* @__PURE__ */ jsxs31(
29409
+ children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
29410
+ /* @__PURE__ */ jsxs29(
29487
29411
  "span",
29488
29412
  {
29489
29413
  className: `flex items-center gap-1 ${canSort ? "cursor-pointer" : ""}`,
@@ -29495,32 +29419,32 @@ function DataTable({
29495
29419
  },
29496
29420
  children: [
29497
29421
  flexRender(header.column.columnDef.header, header.getContext()),
29498
- canSort && /* @__PURE__ */ jsxs31(Fragment20, { children: [
29499
- sortDir === "asc" && /* @__PURE__ */ jsx53(ArrowUp, { size: 14, className: "text-gray-500" }),
29500
- sortDir === "desc" && /* @__PURE__ */ jsx53(ArrowDown, { size: 14, className: "text-gray-500" }),
29501
- !sortDir && /* @__PURE__ */ jsx53(ArrowUpDown, { size: 14, className: "text-gray-400" })
29422
+ canSort && /* @__PURE__ */ jsxs29(Fragment21, { children: [
29423
+ sortDir === "asc" && /* @__PURE__ */ jsx51(ArrowUp, { size: 14, className: "text-gray-500" }),
29424
+ sortDir === "desc" && /* @__PURE__ */ jsx51(ArrowDown, { size: 14, className: "text-gray-500" }),
29425
+ !sortDir && /* @__PURE__ */ jsx51(ArrowUpDown, { size: 14, className: "text-gray-400" })
29502
29426
  ] })
29503
29427
  ]
29504
29428
  }
29505
29429
  ),
29506
- canFilter && /* @__PURE__ */ jsxs31(Popover, { children: [
29507
- /* @__PURE__ */ jsx53(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
29430
+ canFilter && /* @__PURE__ */ jsxs29(Popover, { children: [
29431
+ /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
29508
29432
  "span",
29509
29433
  {
29510
29434
  role: "presentation",
29511
29435
  className: "pl-5 cursor-pointer",
29512
29436
  onClick: (e) => e.stopPropagation(),
29513
- children: /* @__PURE__ */ jsx53(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
29437
+ children: /* @__PURE__ */ jsx51(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
29514
29438
  }
29515
29439
  ) }),
29516
- /* @__PURE__ */ jsx53(
29440
+ /* @__PURE__ */ jsx51(
29517
29441
  PopoverContent,
29518
29442
  {
29519
29443
  align: "center",
29520
29444
  sideOffset: 14,
29521
29445
  className: "w-50 p-3 z-[200] border-gray-300",
29522
29446
  avoidCollisions: true,
29523
- children: /* @__PURE__ */ jsxs31(
29447
+ children: /* @__PURE__ */ jsxs29(
29524
29448
  "form",
29525
29449
  {
29526
29450
  onSubmit: (e) => {
@@ -29533,8 +29457,8 @@ function DataTable({
29533
29457
  },
29534
29458
  className: "space-y-2",
29535
29459
  children: [
29536
- /* @__PURE__ */ jsx53("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
29537
- /* @__PURE__ */ jsx53(
29460
+ /* @__PURE__ */ jsx51("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
29461
+ /* @__PURE__ */ jsx51(
29538
29462
  "input",
29539
29463
  {
29540
29464
  name: "filter",
@@ -29544,7 +29468,7 @@ function DataTable({
29544
29468
  autoComplete: "off"
29545
29469
  }
29546
29470
  ),
29547
- /* @__PURE__ */ jsx53("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx53(
29471
+ /* @__PURE__ */ jsx51("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx51(
29548
29472
  Button,
29549
29473
  {
29550
29474
  type: "submit",
@@ -29563,11 +29487,11 @@ function DataTable({
29563
29487
  `header-${header.id}-${index}`
29564
29488
  );
29565
29489
  }) }, `header-group-${hg.id}`)) }),
29566
- /* @__PURE__ */ jsx53(TableBody, { children: loading ? /* @__PURE__ */ jsx53(Fragment20, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx53(TableRow, { children: dynamicCols.map((_2, j) => /* @__PURE__ */ jsx53(TableCell, { className: "p-3", children: /* @__PURE__ */ jsx53("span", { className: "h-4 bg-gray-200 rounded w-3/4 block animate-pulse" }) }, j)) }, i)) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx53(TableRow, { children: row.getVisibleCells().map((cell, cellIndex, arr) => {
29490
+ /* @__PURE__ */ jsx51(TableBody, { children: loading ? /* @__PURE__ */ jsx51(Fragment21, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx51(TableRow, { children: dynamicCols.map((_2, j) => /* @__PURE__ */ jsx51(TableCell, { className: "p-3", children: /* @__PURE__ */ jsx51("span", { className: "h-4 bg-gray-200 rounded w-3/4 block animate-pulse" }) }, j)) }, i)) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx51(TableRow, { children: row.getVisibleCells().map((cell, cellIndex, arr) => {
29567
29491
  const meta = cell.column.columnDef.meta || {};
29568
29492
  const isClickable = meta?.isClickable;
29569
29493
  const isLastCell = cellIndex === arr.length - 1;
29570
- return /* @__PURE__ */ jsxs31(
29494
+ return /* @__PURE__ */ jsxs29(
29571
29495
  TableCell,
29572
29496
  {
29573
29497
  className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100 underline text-blue-500" : ""} relative py-2`,
@@ -29584,9 +29508,9 @@ function DataTable({
29584
29508
  },
29585
29509
  children: [
29586
29510
  flexRender(cell.column.columnDef.cell, cell.getContext()),
29587
- isLastCell && rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx53("div", { className: "absolute bg-[#fff] p-1 px-4 inset-y-0 right-0 flex items-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 shadow-lg rounded", children: rowActions.map((action) => {
29511
+ isLastCell && rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx51("div", { className: "absolute bg-[#fff] p-1 px-4 inset-y-0 right-0 flex items-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 shadow-lg rounded", children: rowActions.map((action) => {
29588
29512
  const isDelete = action.id === "delete" || action.icon === "delete";
29589
- return /* @__PURE__ */ jsx53(
29513
+ return /* @__PURE__ */ jsx51(
29590
29514
  "button",
29591
29515
  {
29592
29516
  className: `ml-2 px-2 py-1 text-[12px] rounded cursor-pointer ${isDelete ? "bg-red-800 text-white hover:bg-neutral-600" : "bg-gray-300 hover:bg-gray-400"}`,
@@ -29608,17 +29532,17 @@ function DataTable({
29608
29532
  },
29609
29533
  `cell-${cell.id}-${cellIndex}`
29610
29534
  );
29611
- }) }, row.id)) : /* @__PURE__ */ jsx53(TableRow, { children: /* @__PURE__ */ jsx53(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx53("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
29535
+ }) }, row.id)) : /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx51("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
29612
29536
  ] }),
29613
- pagination && /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
29614
- /* @__PURE__ */ jsxs31("div", { children: [
29537
+ pagination && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
29538
+ /* @__PURE__ */ jsxs29("div", { children: [
29615
29539
  "Page ",
29616
29540
  table.getState().pagination.pageIndex + 1,
29617
29541
  " of ",
29618
29542
  pageCount
29619
29543
  ] }),
29620
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
29621
- /* @__PURE__ */ jsx53(
29544
+ /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
29545
+ /* @__PURE__ */ jsx51(
29622
29546
  "button",
29623
29547
  {
29624
29548
  onClick: () => table.previousPage(),
@@ -29631,7 +29555,7 @@ function DataTable({
29631
29555
  table.getState().pagination.pageIndex + 1,
29632
29556
  table.getPageCount(),
29633
29557
  5
29634
- ).map((pageNum, index) => /* @__PURE__ */ jsx53(
29558
+ ).map((pageNum, index) => /* @__PURE__ */ jsx51(
29635
29559
  "button",
29636
29560
  {
29637
29561
  disabled: pageNum === "...",
@@ -29641,7 +29565,7 @@ function DataTable({
29641
29565
  },
29642
29566
  index
29643
29567
  )),
29644
- /* @__PURE__ */ jsx53(
29568
+ /* @__PURE__ */ jsx51(
29645
29569
  "button",
29646
29570
  {
29647
29571
  onClick: () => table.nextPage(),
@@ -29656,7 +29580,7 @@ function DataTable({
29656
29580
  }
29657
29581
 
29658
29582
  // src/components/DataDisplay/Table/Table.tsx
29659
- import { jsx as jsx54 } from "react/jsx-runtime";
29583
+ import { jsx as jsx52 } from "react/jsx-runtime";
29660
29584
  var Table4 = ({
29661
29585
  columns,
29662
29586
  data,
@@ -29681,7 +29605,7 @@ var Table4 = ({
29681
29605
  const rawColumns = Array.isArray(columns) ? columns : [];
29682
29606
  const rawData = Array.isArray(data) ? data : [];
29683
29607
  const isControlled = typeof page === "number";
29684
- return /* @__PURE__ */ jsx54("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx54(
29608
+ return /* @__PURE__ */ jsx52("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx52(
29685
29609
  DataTable,
29686
29610
  {
29687
29611
  ...props,
@@ -29713,9 +29637,9 @@ var Table4 = ({
29713
29637
  var Table_default = Table4;
29714
29638
 
29715
29639
  // src/components/ui/pagination.tsx
29716
- import { jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
29640
+ import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
29717
29641
  function Pagination({ className, ...props }) {
29718
- return /* @__PURE__ */ jsx55(
29642
+ return /* @__PURE__ */ jsx53(
29719
29643
  "nav",
29720
29644
  {
29721
29645
  role: "navigation",
@@ -29730,7 +29654,7 @@ function PaginationContent({
29730
29654
  className,
29731
29655
  ...props
29732
29656
  }) {
29733
- return /* @__PURE__ */ jsx55(
29657
+ return /* @__PURE__ */ jsx53(
29734
29658
  "ul",
29735
29659
  {
29736
29660
  "data-slot": "pagination-content",
@@ -29740,7 +29664,7 @@ function PaginationContent({
29740
29664
  );
29741
29665
  }
29742
29666
  function PaginationItem({ ...props }) {
29743
- return /* @__PURE__ */ jsx55("li", { "data-slot": "pagination-item", ...props });
29667
+ return /* @__PURE__ */ jsx53("li", { "data-slot": "pagination-item", ...props });
29744
29668
  }
29745
29669
  function PaginationLink({
29746
29670
  className,
@@ -29748,7 +29672,7 @@ function PaginationLink({
29748
29672
  size = "icon",
29749
29673
  ...props
29750
29674
  }) {
29751
- return /* @__PURE__ */ jsx55(
29675
+ return /* @__PURE__ */ jsx53(
29752
29676
  "a",
29753
29677
  {
29754
29678
  "aria-current": isActive ? "page" : void 0,
@@ -29769,7 +29693,7 @@ function PaginationPrevious({
29769
29693
  className,
29770
29694
  ...props
29771
29695
  }) {
29772
- return /* @__PURE__ */ jsxs32(
29696
+ return /* @__PURE__ */ jsxs30(
29773
29697
  PaginationLink,
29774
29698
  {
29775
29699
  "aria-label": "Go to previous page",
@@ -29777,8 +29701,8 @@ function PaginationPrevious({
29777
29701
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
29778
29702
  ...props,
29779
29703
  children: [
29780
- /* @__PURE__ */ jsx55(ChevronLeft, {}),
29781
- /* @__PURE__ */ jsx55("span", { className: "hidden sm:block", children: "Previous" })
29704
+ /* @__PURE__ */ jsx53(ChevronLeft, {}),
29705
+ /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Previous" })
29782
29706
  ]
29783
29707
  }
29784
29708
  );
@@ -29787,7 +29711,7 @@ function PaginationNext({
29787
29711
  className,
29788
29712
  ...props
29789
29713
  }) {
29790
- return /* @__PURE__ */ jsxs32(
29714
+ return /* @__PURE__ */ jsxs30(
29791
29715
  PaginationLink,
29792
29716
  {
29793
29717
  "aria-label": "Go to next page",
@@ -29795,8 +29719,8 @@ function PaginationNext({
29795
29719
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
29796
29720
  ...props,
29797
29721
  children: [
29798
- /* @__PURE__ */ jsx55("span", { className: "hidden sm:block", children: "Next" }),
29799
- /* @__PURE__ */ jsx55(ChevronRight, {})
29722
+ /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Next" }),
29723
+ /* @__PURE__ */ jsx53(ChevronRight, {})
29800
29724
  ]
29801
29725
  }
29802
29726
  );
@@ -29805,7 +29729,7 @@ function PaginationEllipsis({
29805
29729
  className,
29806
29730
  ...props
29807
29731
  }) {
29808
- return /* @__PURE__ */ jsxs32(
29732
+ return /* @__PURE__ */ jsxs30(
29809
29733
  "span",
29810
29734
  {
29811
29735
  "aria-hidden": true,
@@ -29813,15 +29737,15 @@ function PaginationEllipsis({
29813
29737
  className: cn("flex size-9 items-center justify-center", className),
29814
29738
  ...props,
29815
29739
  children: [
29816
- /* @__PURE__ */ jsx55(Ellipsis, { className: "size-4" }),
29817
- /* @__PURE__ */ jsx55("span", { className: "sr-only", children: "More pages" })
29740
+ /* @__PURE__ */ jsx53(Ellipsis, { className: "size-4" }),
29741
+ /* @__PURE__ */ jsx53("span", { className: "sr-only", children: "More pages" })
29818
29742
  ]
29819
29743
  }
29820
29744
  );
29821
29745
  }
29822
29746
 
29823
29747
  // src/components/DataDisplay/Pagination/Pagination.tsx
29824
- import { jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
29748
+ import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
29825
29749
  var CustomPagination = ({
29826
29750
  totalPages,
29827
29751
  currentPage,
@@ -29867,10 +29791,10 @@ var CustomPagination = ({
29867
29791
  }
29868
29792
  };
29869
29793
  const pageNumbers = getPageNumbers();
29870
- return /* @__PURE__ */ jsxs33("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
29871
- /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
29872
- /* @__PURE__ */ jsx56("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
29873
- /* @__PURE__ */ jsxs33(
29794
+ return /* @__PURE__ */ jsxs31("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
29795
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
29796
+ /* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
29797
+ /* @__PURE__ */ jsxs31(
29874
29798
  Select,
29875
29799
  {
29876
29800
  defaultValue: String(perPage),
@@ -29878,26 +29802,26 @@ var CustomPagination = ({
29878
29802
  onPageChange({ page: 1, itemsPerPage: Number(value) });
29879
29803
  },
29880
29804
  children: [
29881
- /* @__PURE__ */ jsx56(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx56(SelectValue, { placeholder: "Select" }) }),
29882
- /* @__PURE__ */ jsxs33(SelectContent, { children: [
29883
- /* @__PURE__ */ jsx56(SelectItem, { value: "5", children: "5" }),
29884
- /* @__PURE__ */ jsx56(SelectItem, { value: "10", children: "10" }),
29885
- /* @__PURE__ */ jsx56(SelectItem, { value: "20", children: "20" }),
29886
- /* @__PURE__ */ jsx56(SelectItem, { value: "50", children: "50" })
29805
+ /* @__PURE__ */ jsx54(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: "Select" }) }),
29806
+ /* @__PURE__ */ jsxs31(SelectContent, { children: [
29807
+ /* @__PURE__ */ jsx54(SelectItem, { value: "5", children: "5" }),
29808
+ /* @__PURE__ */ jsx54(SelectItem, { value: "10", children: "10" }),
29809
+ /* @__PURE__ */ jsx54(SelectItem, { value: "20", children: "20" }),
29810
+ /* @__PURE__ */ jsx54(SelectItem, { value: "50", children: "50" })
29887
29811
  ] })
29888
29812
  ]
29889
29813
  }
29890
29814
  )
29891
29815
  ] }),
29892
- /* @__PURE__ */ jsx56(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs33(PaginationContent, { children: [
29893
- /* @__PURE__ */ jsx56(PaginationItem, { children: /* @__PURE__ */ jsx56(
29816
+ /* @__PURE__ */ jsx54(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs31(PaginationContent, { children: [
29817
+ /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
29894
29818
  PaginationPrevious,
29895
29819
  {
29896
29820
  onClick: () => handlePageChange(currentPage - 1),
29897
29821
  className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
29898
29822
  }
29899
29823
  ) }),
29900
- pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx56(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx56(PaginationEllipsis, {}) : /* @__PURE__ */ jsx56(
29824
+ pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx54(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx54(PaginationEllipsis, {}) : /* @__PURE__ */ jsx54(
29901
29825
  PaginationLink,
29902
29826
  {
29903
29827
  onClick: () => handlePageChange(pageNumber),
@@ -29906,7 +29830,7 @@ var CustomPagination = ({
29906
29830
  children: pageNumber
29907
29831
  }
29908
29832
  ) }, index)),
29909
- /* @__PURE__ */ jsx56(PaginationItem, { children: /* @__PURE__ */ jsx56(
29833
+ /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
29910
29834
  PaginationNext,
29911
29835
  {
29912
29836
  onClick: () => handlePageChange(currentPage + 1),
@@ -29919,10 +29843,126 @@ var CustomPagination = ({
29919
29843
  var Pagination_default = CustomPagination;
29920
29844
 
29921
29845
  // src/components/Navigation/Tabs/Tabs.tsx
29922
- import { useCallback as useCallback3, useMemo as useMemo4, useState as useState8 } from "react";
29846
+ import { useCallback as useCallback3, useMemo as useMemo5, useState as useState8 } from "react";
29923
29847
  import Link5 from "next/link";
29924
29848
  import { useRouter } from "next/navigation";
29925
- import { Fragment as Fragment21, jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
29849
+
29850
+ // src/components/ui/dialog.tsx
29851
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
29852
+ import { jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
29853
+ function Dialog({
29854
+ ...props
29855
+ }) {
29856
+ return /* @__PURE__ */ jsx55(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
29857
+ }
29858
+ function DialogPortal({
29859
+ ...props
29860
+ }) {
29861
+ return /* @__PURE__ */ jsx55(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
29862
+ }
29863
+ function DialogOverlay({
29864
+ className,
29865
+ ...props
29866
+ }) {
29867
+ return /* @__PURE__ */ jsx55(
29868
+ DialogPrimitive.Overlay,
29869
+ {
29870
+ "data-slot": "dialog-overlay",
29871
+ className: cn(
29872
+ "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",
29873
+ className
29874
+ ),
29875
+ ...props
29876
+ }
29877
+ );
29878
+ }
29879
+ function DialogContent({
29880
+ className,
29881
+ children,
29882
+ showCloseButton = true,
29883
+ ...props
29884
+ }) {
29885
+ return /* @__PURE__ */ jsxs32(DialogPortal, { "data-slot": "dialog-portal", children: [
29886
+ /* @__PURE__ */ jsx55(DialogOverlay, {}),
29887
+ /* @__PURE__ */ jsxs32(
29888
+ DialogPrimitive.Content,
29889
+ {
29890
+ "data-slot": "dialog-content",
29891
+ className: cn(
29892
+ "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",
29893
+ className
29894
+ ),
29895
+ ...props,
29896
+ children: [
29897
+ children,
29898
+ showCloseButton && /* @__PURE__ */ jsxs32(
29899
+ DialogPrimitive.Close,
29900
+ {
29901
+ "data-slot": "dialog-close",
29902
+ 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",
29903
+ children: [
29904
+ /* @__PURE__ */ jsx55(X, {}),
29905
+ /* @__PURE__ */ jsx55("span", { className: "sr-only", children: "Close" })
29906
+ ]
29907
+ }
29908
+ )
29909
+ ]
29910
+ }
29911
+ )
29912
+ ] });
29913
+ }
29914
+ function DialogHeader({ className, ...props }) {
29915
+ return /* @__PURE__ */ jsx55(
29916
+ "div",
29917
+ {
29918
+ "data-slot": "dialog-header",
29919
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
29920
+ ...props
29921
+ }
29922
+ );
29923
+ }
29924
+ function DialogFooter({ className, ...props }) {
29925
+ return /* @__PURE__ */ jsx55(
29926
+ "div",
29927
+ {
29928
+ "data-slot": "dialog-footer",
29929
+ className: cn(
29930
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
29931
+ className
29932
+ ),
29933
+ ...props
29934
+ }
29935
+ );
29936
+ }
29937
+ function DialogTitle({
29938
+ className,
29939
+ ...props
29940
+ }) {
29941
+ return /* @__PURE__ */ jsx55(
29942
+ DialogPrimitive.Title,
29943
+ {
29944
+ "data-slot": "dialog-title",
29945
+ className: cn("text-lg leading-none font-semibold", className),
29946
+ ...props
29947
+ }
29948
+ );
29949
+ }
29950
+ function DialogDescription({
29951
+ className,
29952
+ ...props
29953
+ }) {
29954
+ return /* @__PURE__ */ jsx55(
29955
+ DialogPrimitive.Description,
29956
+ {
29957
+ "data-slot": "dialog-description",
29958
+ className: cn("text-muted-foreground text-sm", className),
29959
+ ...props
29960
+ }
29961
+ );
29962
+ }
29963
+
29964
+ // src/components/Navigation/Tabs/Tabs.tsx
29965
+ import { Fragment as Fragment22, jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
29926
29966
  var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = false, source, parentKey, menuNameKey, menuUrlKey, loading }) => {
29927
29967
  const [openIndex, setOpenIndex] = useState8(null);
29928
29968
  function groupMenus(menus = []) {
@@ -29957,7 +29997,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29957
29997
  });
29958
29998
  return sortMenus(rootMenus);
29959
29999
  }
29960
- const rawTabs = useMemo4(() => {
30000
+ const rawTabs = useMemo5(() => {
29961
30001
  if (!Array.isArray(tabs)) return [];
29962
30002
  if (source === "manual") return Array.isArray(tabs) ? tabs : [];
29963
30003
  return groupMenus(tabs);
@@ -29992,13 +30032,13 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29992
30032
  const renderDesktopTab = (tab, index) => {
29993
30033
  const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
29994
30034
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
29995
- return /* @__PURE__ */ jsxs34(
30035
+ return /* @__PURE__ */ jsxs33(
29996
30036
  DropdownMenu,
29997
30037
  {
29998
30038
  open: openIndex === index,
29999
30039
  onOpenChange: (open) => setOpenIndex(open ? index : null),
30000
30040
  children: [
30001
- /* @__PURE__ */ jsxs34(
30041
+ /* @__PURE__ */ jsxs33(
30002
30042
  DropdownMenuTrigger,
30003
30043
  {
30004
30044
  className: `${finalClasses} inline-flex items-center gap-1`,
@@ -30011,11 +30051,11 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30011
30051
  },
30012
30052
  children: [
30013
30053
  tab.header,
30014
- /* @__PURE__ */ jsx57(ChevronDown, { className: "h-4 w-4 opacity-80" })
30054
+ /* @__PURE__ */ jsx56(ChevronDown, { className: "h-4 w-4 opacity-80" })
30015
30055
  ]
30016
30056
  }
30017
30057
  ),
30018
- /* @__PURE__ */ jsx57(
30058
+ /* @__PURE__ */ jsx56(
30019
30059
  DropdownMenuContent,
30020
30060
  {
30021
30061
  align: "start",
@@ -30028,12 +30068,12 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30028
30068
  onMouseLeave: () => {
30029
30069
  timeout = setTimeout(() => setOpenIndex(null), 150);
30030
30070
  },
30031
- children: tab.children.map((item, index2) => /* @__PURE__ */ jsx57(
30071
+ children: tab.children.map((item, index2) => /* @__PURE__ */ jsx56(
30032
30072
  DropdownMenuItem,
30033
30073
  {
30034
30074
  asChild: true,
30035
30075
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
30036
- children: /* @__PURE__ */ jsx57(
30076
+ children: /* @__PURE__ */ jsx56(
30037
30077
  Link5,
30038
30078
  {
30039
30079
  href: item.url || "#",
@@ -30052,7 +30092,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30052
30092
  index
30053
30093
  );
30054
30094
  }
30055
- return tab.url ? /* @__PURE__ */ jsx57(
30095
+ return tab.url ? /* @__PURE__ */ jsx56(
30056
30096
  Link5,
30057
30097
  {
30058
30098
  href: tab.url,
@@ -30063,14 +30103,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30063
30103
  children: tab.header
30064
30104
  },
30065
30105
  index
30066
- ) : /* @__PURE__ */ jsx57("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
30106
+ ) : /* @__PURE__ */ jsx56("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
30067
30107
  };
30068
- const renderMobileMenu = () => /* @__PURE__ */ jsxs34(DropdownMenu, { children: [
30069
- /* @__PURE__ */ jsxs34(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
30070
- /* @__PURE__ */ jsx57(Menu, { className: "h-4 w-4" }),
30108
+ const renderMobileMenu = () => /* @__PURE__ */ jsxs33(DropdownMenu, { children: [
30109
+ /* @__PURE__ */ jsxs33(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
30110
+ /* @__PURE__ */ jsx56(Menu, { className: "h-4 w-4" }),
30071
30111
  "Menu"
30072
30112
  ] }),
30073
- /* @__PURE__ */ jsx57(
30113
+ /* @__PURE__ */ jsx56(
30074
30114
  DropdownMenuContent,
30075
30115
  {
30076
30116
  align: "start",
@@ -30079,25 +30119,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30079
30119
  children: rawTabs.map((tab, i) => {
30080
30120
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
30081
30121
  if (hasChildren) {
30082
- return /* @__PURE__ */ jsxs34(DropdownMenuSub, { children: [
30083
- /* @__PURE__ */ jsx57(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 }),
30084
- /* @__PURE__ */ jsx57(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx57(
30122
+ return /* @__PURE__ */ jsxs33(DropdownMenuSub, { children: [
30123
+ /* @__PURE__ */ jsx56(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 }),
30124
+ /* @__PURE__ */ jsx56(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx56(
30085
30125
  DropdownMenuItem,
30086
30126
  {
30087
30127
  asChild: true,
30088
30128
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100",
30089
- children: /* @__PURE__ */ jsx57(Link5, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
30129
+ children: /* @__PURE__ */ jsx56(Link5, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
30090
30130
  },
30091
30131
  item.id || index
30092
30132
  )) })
30093
30133
  ] }, i);
30094
30134
  }
30095
- return /* @__PURE__ */ jsx57(
30135
+ return /* @__PURE__ */ jsx56(
30096
30136
  DropdownMenuItem,
30097
30137
  {
30098
30138
  asChild: true,
30099
30139
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
30100
- children: /* @__PURE__ */ jsx57(Link5, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
30140
+ children: /* @__PURE__ */ jsx56(Link5, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
30101
30141
  },
30102
30142
  i
30103
30143
  );
@@ -30107,19 +30147,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30107
30147
  ] });
30108
30148
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
30109
30149
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
30110
- return /* @__PURE__ */ jsxs34(Fragment21, { children: [
30111
- /* @__PURE__ */ jsxs34("div", { className: cn("min-h-10", className), style, children: [
30112
- forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx57("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx57("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx57("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx57("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
30113
- forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx57("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx57("div", { className: "flex md:hidden", children: renderMobileMenu() })
30150
+ return /* @__PURE__ */ jsxs33(Fragment22, { children: [
30151
+ /* @__PURE__ */ jsxs33("div", { className: cn("min-h-10", className), style, children: [
30152
+ forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx56("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx56("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx56("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx56("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
30153
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx56("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx56("div", { className: "flex md:hidden", children: renderMobileMenu() })
30114
30154
  ] }),
30115
- /* @__PURE__ */ jsx57(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs34(DialogContent, { className: "bg-[#fff]", children: [
30116
- /* @__PURE__ */ jsxs34(DialogHeader, { children: [
30117
- /* @__PURE__ */ jsx57(DialogTitle, { children: "Exit Builder?" }),
30118
- /* @__PURE__ */ jsx57(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30155
+ /* @__PURE__ */ jsx56(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs33(DialogContent, { className: "bg-[#fff]", children: [
30156
+ /* @__PURE__ */ jsxs33(DialogHeader, { children: [
30157
+ /* @__PURE__ */ jsx56(DialogTitle, { children: "Exit Builder?" }),
30158
+ /* @__PURE__ */ jsx56(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30119
30159
  ] }),
30120
- /* @__PURE__ */ jsxs34(DialogFooter, { children: [
30121
- /* @__PURE__ */ jsx57(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30122
- /* @__PURE__ */ jsx57(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30160
+ /* @__PURE__ */ jsxs33(DialogFooter, { children: [
30161
+ /* @__PURE__ */ jsx56(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30162
+ /* @__PURE__ */ jsx56(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30123
30163
  ] })
30124
30164
  ] }) })
30125
30165
  ] });
@@ -30127,8 +30167,8 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30127
30167
  var Tabs_default = Tabs;
30128
30168
 
30129
30169
  // src/components/Navigation/Stages/Stages.tsx
30130
- import React11, { useState as useState9 } from "react";
30131
- import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
30170
+ import React10, { useState as useState9 } from "react";
30171
+ import { jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
30132
30172
  var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header", loading }) => {
30133
30173
  const [activeStage, setActiveStage] = useState9(currentStage || (stages && stages.length > 0 ? stages[0].key : null));
30134
30174
  const nextStage = () => {
@@ -30147,9 +30187,9 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30147
30187
  onStageChange?.(stageKey);
30148
30188
  };
30149
30189
  const isAllStagesCompleted = activeStage === lastStage;
30150
- return /* @__PURE__ */ jsx58("div", { className, style, children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
30151
- /* @__PURE__ */ jsx58("div", { className: "flex items-center", children: /* @__PURE__ */ jsx58("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx58("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
30152
- /* @__PURE__ */ jsx58("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx58(
30190
+ return /* @__PURE__ */ jsx57("div", { className, style, children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
30191
+ /* @__PURE__ */ jsx57("div", { className: "flex items-center", children: /* @__PURE__ */ jsx57("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx57("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx57("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
30192
+ /* @__PURE__ */ jsx57("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx57(
30153
30193
  "button",
30154
30194
  {
30155
30195
  className: `
@@ -30162,8 +30202,8 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30162
30202
  const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
30163
30203
  const isCompleted = isAllStagesCompleted || index < currentIndex;
30164
30204
  const isActive = !isAllStagesCompleted && index === currentIndex;
30165
- return /* @__PURE__ */ jsxs35(React11.Fragment, { children: [
30166
- /* @__PURE__ */ jsx58(
30205
+ return /* @__PURE__ */ jsxs34(React10.Fragment, { children: [
30206
+ /* @__PURE__ */ jsx57(
30167
30207
  "button",
30168
30208
  {
30169
30209
  className: `
@@ -30176,10 +30216,10 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30176
30216
  children: stage[dataLabel]
30177
30217
  }
30178
30218
  ),
30179
- index < stages.length - 1 && /* @__PURE__ */ jsx58("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
30219
+ index < stages.length - 1 && /* @__PURE__ */ jsx57("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
30180
30220
  ] }, stage.id);
30181
30221
  }) }),
30182
- isShowBtn && /* @__PURE__ */ jsx58("div", { className: "flex items-center", children: /* @__PURE__ */ jsx58(
30222
+ isShowBtn && /* @__PURE__ */ jsx57("div", { className: "flex items-center", children: /* @__PURE__ */ jsx57(
30183
30223
  "button",
30184
30224
  {
30185
30225
  className: "bg-green-700 text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
@@ -30194,26 +30234,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30194
30234
  var Stages_default = StagesComponent;
30195
30235
 
30196
30236
  // src/components/Navigation/Spacer/Spacer.tsx
30197
- import { jsx as jsx59 } from "react/jsx-runtime";
30237
+ import { jsx as jsx58 } from "react/jsx-runtime";
30198
30238
  var Spacer = ({ className, style }) => {
30199
- return /* @__PURE__ */ jsx59("div", { className: `${className}`, style });
30239
+ return /* @__PURE__ */ jsx58("div", { className: `${className}`, style });
30200
30240
  };
30201
30241
  var Spacer_default = Spacer;
30202
30242
 
30203
30243
  // src/components/Navigation/Profile/Profile.tsx
30204
- import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
30244
+ import { jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
30205
30245
 
30206
30246
  // src/components/Navigation/Notification/Notification.tsx
30207
- import { jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
30247
+ import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
30208
30248
 
30209
30249
  // src/components/Navigation/Logo/Logo.tsx
30210
- import { jsx as jsx62 } from "react/jsx-runtime";
30250
+ import { jsx as jsx61 } from "react/jsx-runtime";
30211
30251
 
30212
30252
  // src/components/ui/avatar.tsx
30213
- import * as React12 from "react";
30253
+ import * as React11 from "react";
30214
30254
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
30215
- import { jsx as jsx63 } from "react/jsx-runtime";
30216
- var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx63(
30255
+ import { jsx as jsx62 } from "react/jsx-runtime";
30256
+ var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx62(
30217
30257
  AvatarPrimitive.Root,
30218
30258
  {
30219
30259
  ref,
@@ -30225,7 +30265,7 @@ var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
30225
30265
  }
30226
30266
  ));
30227
30267
  Avatar.displayName = AvatarPrimitive.Root.displayName;
30228
- var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx63(
30268
+ var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx62(
30229
30269
  AvatarPrimitive.Image,
30230
30270
  {
30231
30271
  ref,
@@ -30234,7 +30274,7 @@ var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
30234
30274
  }
30235
30275
  ));
30236
30276
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
30237
- var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx63(
30277
+ var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx62(
30238
30278
  AvatarPrimitive.Fallback,
30239
30279
  {
30240
30280
  ref,
@@ -30252,8 +30292,8 @@ import Link6 from "next/link";
30252
30292
  import Image4 from "next/image";
30253
30293
  import { useRouter as useRouter2 } from "next/navigation";
30254
30294
  import { DropdownMenuSeparator } from "@radix-ui/react-dropdown-menu";
30255
- import { useCallback as useCallback4, useMemo as useMemo5, useState as useState10 } from "react";
30256
- import { Fragment as Fragment22, jsx as jsx64, jsxs as jsxs38 } from "react/jsx-runtime";
30295
+ import { useCallback as useCallback4, useMemo as useMemo6, useState as useState10 } from "react";
30296
+ import { Fragment as Fragment23, jsx as jsx63, jsxs as jsxs37 } from "react/jsx-runtime";
30257
30297
  function Navbar({
30258
30298
  style,
30259
30299
  badgeType,
@@ -30291,29 +30331,29 @@ function Navbar({
30291
30331
  router.push(pendingUrl);
30292
30332
  }
30293
30333
  };
30294
- const formatedMenu = useMemo5(() => {
30334
+ const formatedMenu = useMemo6(() => {
30295
30335
  if (source === "state" && navList && navList.length) {
30296
30336
  return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
30297
30337
  }
30298
30338
  return list || [];
30299
30339
  }, [source, navList]);
30300
- return /* @__PURE__ */ jsxs38(Fragment22, { children: [
30301
- /* @__PURE__ */ jsx64(
30340
+ return /* @__PURE__ */ jsxs37(Fragment23, { children: [
30341
+ /* @__PURE__ */ jsx63(
30302
30342
  "nav",
30303
30343
  {
30304
30344
  className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
30305
30345
  style,
30306
- children: /* @__PURE__ */ jsxs38("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
30307
- /* @__PURE__ */ jsx64(
30346
+ children: /* @__PURE__ */ jsxs37("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
30347
+ /* @__PURE__ */ jsx63(
30308
30348
  Link6,
30309
30349
  {
30310
30350
  href: "/",
30311
30351
  onClick: (e) => handleBuilderExit(e, "/"),
30312
30352
  className: "flex items-center space-x-2",
30313
- children: imageUrl ? /* @__PURE__ */ jsx64(Image4, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ jsx64("span", { className: "font-semibold text-blue-700", children: "Logo" })
30353
+ children: imageUrl ? /* @__PURE__ */ jsx63(Image4, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ jsx63("span", { className: "font-semibold text-blue-700", children: "Logo" })
30314
30354
  }
30315
30355
  ),
30316
- !isMobileView && /* @__PURE__ */ jsx64("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ jsx64(
30356
+ !isMobileView && /* @__PURE__ */ jsx63("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ jsx63(
30317
30357
  Link6,
30318
30358
  {
30319
30359
  href: item.url || "#",
@@ -30323,39 +30363,39 @@ function Navbar({
30323
30363
  },
30324
30364
  item.id
30325
30365
  )) }),
30326
- /* @__PURE__ */ jsxs38("div", { className: "flex items-center space-x-3", children: [
30327
- !isMobileView ? /* @__PURE__ */ jsx64("div", { className: "flex-1 px-6", children: /* @__PURE__ */ jsxs38("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
30328
- /* @__PURE__ */ jsx64(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
30329
- /* @__PURE__ */ jsx64(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
30330
- ] }) }) : /* @__PURE__ */ jsx64(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ jsx64(Search, { className: "h-5 w-5 text-gray-400" }) }),
30331
- /* @__PURE__ */ jsxs38("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
30332
- /* @__PURE__ */ jsx64(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx64(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
30333
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx64("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__ */ jsx64("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
30366
+ /* @__PURE__ */ jsxs37("div", { className: "flex items-center space-x-3", children: [
30367
+ !isMobileView ? /* @__PURE__ */ jsx63("div", { className: "flex-1 px-6", children: /* @__PURE__ */ jsxs37("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
30368
+ /* @__PURE__ */ jsx63(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
30369
+ /* @__PURE__ */ jsx63(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
30370
+ ] }) }) : /* @__PURE__ */ jsx63(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ jsx63(Search, { className: "h-5 w-5 text-gray-400" }) }),
30371
+ /* @__PURE__ */ jsxs37("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
30372
+ /* @__PURE__ */ jsx63(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx63(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
30373
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx63("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__ */ jsx63("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
30334
30374
  ] }),
30335
- /* @__PURE__ */ jsxs38(DropdownMenu, { children: [
30336
- /* @__PURE__ */ jsx64(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center space-x-2", children: [
30337
- !isMobileView && showName && /* @__PURE__ */ jsx64("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
30338
- !isMobileView ? /* @__PURE__ */ jsxs38(Fragment22, { children: [
30339
- /* @__PURE__ */ jsx64(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx64(
30375
+ /* @__PURE__ */ jsxs37(DropdownMenu, { children: [
30376
+ /* @__PURE__ */ jsx63(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center space-x-2", children: [
30377
+ !isMobileView && showName && /* @__PURE__ */ jsx63("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
30378
+ !isMobileView ? /* @__PURE__ */ jsxs37(Fragment23, { children: [
30379
+ /* @__PURE__ */ jsx63(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx63(
30340
30380
  AvatarImage,
30341
30381
  {
30342
30382
  src: "/images/appbuilder/toolset/profile.svg",
30343
30383
  alt: "Profile"
30344
30384
  }
30345
- ) : /* @__PURE__ */ jsx64("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) }) }),
30346
- /* @__PURE__ */ jsx64(
30385
+ ) : /* @__PURE__ */ jsx63("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) }) }),
30386
+ /* @__PURE__ */ jsx63(
30347
30387
  Button,
30348
30388
  {
30349
30389
  variant: "ghost",
30350
30390
  size: "icon",
30351
30391
  className: "text-gray-900 md:hidden dark:invert",
30352
- children: /* @__PURE__ */ jsx64(Menu, { className: "h-6 w-6" })
30392
+ children: /* @__PURE__ */ jsx63(Menu, { className: "h-6 w-6" })
30353
30393
  }
30354
30394
  )
30355
- ] }) : /* @__PURE__ */ jsx64(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ jsx64(Menu, { className: "h-6 w-6" }) })
30395
+ ] }) : /* @__PURE__ */ jsx63(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ jsx63(Menu, { className: "h-6 w-6" }) })
30356
30396
  ] }) }),
30357
- /* @__PURE__ */ jsxs38(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
30358
- profileMenu && profileMenu.length > 0 && /* @__PURE__ */ jsx64(Fragment22, { children: profileMenu.map((item) => /* @__PURE__ */ jsx64(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx64(
30397
+ /* @__PURE__ */ jsxs37(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
30398
+ profileMenu && profileMenu.length > 0 && /* @__PURE__ */ jsx63(Fragment23, { children: profileMenu.map((item) => /* @__PURE__ */ jsx63(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx63(
30359
30399
  Link6,
30360
30400
  {
30361
30401
  href: item.url || "#",
@@ -30363,9 +30403,9 @@ function Navbar({
30363
30403
  children: item.header
30364
30404
  }
30365
30405
  ) }, item.id)) }),
30366
- /* @__PURE__ */ jsxs38("div", { className: "md:hidden", children: [
30367
- /* @__PURE__ */ jsx64(DropdownMenuSeparator, {}),
30368
- formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ jsx64(Fragment22, { children: formatedMenu.map((item) => /* @__PURE__ */ jsx64(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx64(
30406
+ /* @__PURE__ */ jsxs37("div", { className: "md:hidden", children: [
30407
+ /* @__PURE__ */ jsx63(DropdownMenuSeparator, {}),
30408
+ formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ jsx63(Fragment23, { children: formatedMenu.map((item) => /* @__PURE__ */ jsx63(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx63(
30369
30409
  Link6,
30370
30410
  {
30371
30411
  href: item.url || "#",
@@ -30380,21 +30420,21 @@ function Navbar({
30380
30420
  ] })
30381
30421
  }
30382
30422
  ),
30383
- /* @__PURE__ */ jsx64(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs38(DialogContent, { className: "bg-[#fff]", children: [
30384
- /* @__PURE__ */ jsxs38(DialogHeader, { children: [
30385
- /* @__PURE__ */ jsx64(DialogTitle, { children: "Exit Builder?" }),
30386
- /* @__PURE__ */ jsx64(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30423
+ /* @__PURE__ */ jsx63(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs37(DialogContent, { className: "bg-[#fff]", children: [
30424
+ /* @__PURE__ */ jsxs37(DialogHeader, { children: [
30425
+ /* @__PURE__ */ jsx63(DialogTitle, { children: "Exit Builder?" }),
30426
+ /* @__PURE__ */ jsx63(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30387
30427
  ] }),
30388
- /* @__PURE__ */ jsxs38(DialogFooter, { children: [
30389
- /* @__PURE__ */ jsx64(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30390
- /* @__PURE__ */ jsx64(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30428
+ /* @__PURE__ */ jsxs37(DialogFooter, { children: [
30429
+ /* @__PURE__ */ jsx63(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30430
+ /* @__PURE__ */ jsx63(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30391
30431
  ] })
30392
30432
  ] }) })
30393
30433
  ] });
30394
30434
  }
30395
30435
 
30396
30436
  // src/components/Chart/BarChart.tsx
30397
- import React13 from "react";
30437
+ import React12 from "react";
30398
30438
  import {
30399
30439
  BarChart,
30400
30440
  Bar,
@@ -30407,35 +30447,35 @@ import {
30407
30447
  ResponsiveContainer,
30408
30448
  Legend
30409
30449
  } from "recharts";
30410
- import { jsx as jsx65, jsxs as jsxs39 } from "react/jsx-runtime";
30450
+ import { jsx as jsx64, jsxs as jsxs38 } from "react/jsx-runtime";
30411
30451
  var ChartComponent = ({ className, style, loading, ...props }) => {
30412
30452
  const data = Array.isArray(props.data) ? props.data : [];
30413
30453
  const chartType = props.chartType || "bar";
30414
30454
  const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
30415
30455
  if (loading || data.length === 0) {
30416
- return /* @__PURE__ */ jsx65(
30456
+ return /* @__PURE__ */ jsx64(
30417
30457
  "div",
30418
30458
  {
30419
30459
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
30420
30460
  style,
30421
- children: /* @__PURE__ */ jsx65("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
30461
+ children: /* @__PURE__ */ jsx64("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
30422
30462
  }
30423
30463
  );
30424
30464
  }
30425
- return /* @__PURE__ */ jsx65("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ jsx65(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs39(BarChart, { data, title: "Leads", desc: "content", children: [
30426
- /* @__PURE__ */ jsx65(CartesianGrid, { strokeDasharray: "3 3" }),
30427
- /* @__PURE__ */ jsx65(XAxis, { dataKey: "name" }),
30428
- /* @__PURE__ */ jsx65(YAxis, {}),
30429
- /* @__PURE__ */ jsx65(Tooltip, { formatter: (value) => `${value}k` }),
30430
- /* @__PURE__ */ jsx65(Legend, { verticalAlign: legendsPosition, align: "center" }),
30431
- /* @__PURE__ */ jsx65(
30465
+ return /* @__PURE__ */ jsx64("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ jsx64(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs38(BarChart, { data, title: "Leads", desc: "content", children: [
30466
+ /* @__PURE__ */ jsx64(CartesianGrid, { strokeDasharray: "3 3" }),
30467
+ /* @__PURE__ */ jsx64(XAxis, { dataKey: "name" }),
30468
+ /* @__PURE__ */ jsx64(YAxis, {}),
30469
+ /* @__PURE__ */ jsx64(Tooltip, { formatter: (value) => `${value}k` }),
30470
+ /* @__PURE__ */ jsx64(Legend, { verticalAlign: legendsPosition, align: "center" }),
30471
+ /* @__PURE__ */ jsx64(
30432
30472
  Bar,
30433
30473
  {
30434
30474
  dataKey: "value",
30435
30475
  fill: "#00695C",
30436
30476
  radius: [6, 6, 0, 0],
30437
30477
  isAnimationActive: false,
30438
- children: data.map((entry, index) => /* @__PURE__ */ jsx65(
30478
+ children: data.map((entry, index) => /* @__PURE__ */ jsx64(
30439
30479
  "rect",
30440
30480
  {
30441
30481
  fill: entry.color || "#00695C"
@@ -30444,16 +30484,16 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
30444
30484
  ))
30445
30485
  }
30446
30486
  )
30447
- ] }) : /* @__PURE__ */ jsxs39(AreaChart, { data, children: [
30448
- /* @__PURE__ */ jsx65("defs", { children: /* @__PURE__ */ jsxs39("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
30449
- /* @__PURE__ */ jsx65("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
30450
- /* @__PURE__ */ jsx65("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
30487
+ ] }) : /* @__PURE__ */ jsxs38(AreaChart, { data, children: [
30488
+ /* @__PURE__ */ jsx64("defs", { children: /* @__PURE__ */ jsxs38("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
30489
+ /* @__PURE__ */ jsx64("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
30490
+ /* @__PURE__ */ jsx64("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
30451
30491
  ] }) }),
30452
- /* @__PURE__ */ jsx65(CartesianGrid, { strokeDasharray: "3 3" }),
30453
- /* @__PURE__ */ jsx65(XAxis, { dataKey: "name" }),
30454
- /* @__PURE__ */ jsx65(YAxis, {}),
30455
- /* @__PURE__ */ jsx65(Tooltip, { formatter: (value) => `${value}k` }),
30456
- /* @__PURE__ */ jsx65(
30492
+ /* @__PURE__ */ jsx64(CartesianGrid, { strokeDasharray: "3 3" }),
30493
+ /* @__PURE__ */ jsx64(XAxis, { dataKey: "name" }),
30494
+ /* @__PURE__ */ jsx64(YAxis, {}),
30495
+ /* @__PURE__ */ jsx64(Tooltip, { formatter: (value) => `${value}k` }),
30496
+ /* @__PURE__ */ jsx64(
30457
30497
  Area,
30458
30498
  {
30459
30499
  type: "monotone",
@@ -30466,10 +30506,10 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
30466
30506
  )
30467
30507
  ] }) }) });
30468
30508
  };
30469
- var BarChart_default = React13.memo(ChartComponent);
30509
+ var BarChart_default = React12.memo(ChartComponent);
30470
30510
 
30471
30511
  // src/components/Chart/PieChart.tsx
30472
- import React14, { useEffect as useEffect25, useMemo as useMemo6, useState as useState11 } from "react";
30512
+ import React13, { useEffect as useEffect25, useMemo as useMemo7, useState as useState11 } from "react";
30473
30513
  import {
30474
30514
  PieChart,
30475
30515
  Pie,
@@ -30478,7 +30518,7 @@ import {
30478
30518
  Tooltip as Tooltip2,
30479
30519
  LabelList
30480
30520
  } from "recharts";
30481
- import { Fragment as Fragment23, jsx as jsx66, jsxs as jsxs40 } from "react/jsx-runtime";
30521
+ import { Fragment as Fragment24, jsx as jsx65, jsxs as jsxs39 } from "react/jsx-runtime";
30482
30522
  var getRandomColor = () => {
30483
30523
  const palette = [
30484
30524
  "#2563eb",
@@ -30498,32 +30538,32 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30498
30538
  const showLegends = props.showLegends ?? true;
30499
30539
  const labelType = props.labelType || "inside";
30500
30540
  const canvasMode = props.canvasMode;
30501
- const data = useMemo6(() => {
30541
+ const data = useMemo7(() => {
30502
30542
  if (!Array.isArray(props.data)) return [];
30503
30543
  return props.data.map((item) => ({ ...item, color: getRandomColor() }));
30504
30544
  }, [props.data]);
30505
- const total = useMemo6(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
30545
+ const total = useMemo7(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
30506
30546
  const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
30507
30547
  const [mounted, setMounted] = useState11(false);
30508
30548
  useEffect25(() => {
30509
30549
  const timeout = setTimeout(() => setMounted(true), 100);
30510
30550
  return () => clearTimeout(timeout);
30511
30551
  }, []);
30512
- const renderLegends = useMemo6(() => {
30552
+ const renderLegends = useMemo7(() => {
30513
30553
  if (!showLegends) return null;
30514
- return /* @__PURE__ */ jsx66(Fragment23, { children: data.map((d) => /* @__PURE__ */ jsxs40(
30554
+ return /* @__PURE__ */ jsx65(Fragment24, { children: data.map((d) => /* @__PURE__ */ jsxs39(
30515
30555
  "div",
30516
30556
  {
30517
30557
  className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
30518
30558
  children: [
30519
- /* @__PURE__ */ jsx66(
30559
+ /* @__PURE__ */ jsx65(
30520
30560
  "span",
30521
30561
  {
30522
30562
  className: "inline-block w-[16px] h-[16px] rounded",
30523
30563
  style: { backgroundColor: d.color }
30524
30564
  }
30525
30565
  ),
30526
- /* @__PURE__ */ jsx66("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
30566
+ /* @__PURE__ */ jsx65("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
30527
30567
  ]
30528
30568
  },
30529
30569
  d.name
@@ -30531,24 +30571,24 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30531
30571
  }, [data, showLegends]);
30532
30572
  if (!mounted) return null;
30533
30573
  if (loading || data.length === 0) {
30534
- return /* @__PURE__ */ jsx66(
30574
+ return /* @__PURE__ */ jsx65(
30535
30575
  "div",
30536
30576
  {
30537
30577
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
30538
30578
  style,
30539
- children: /* @__PURE__ */ jsx66("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
30579
+ children: /* @__PURE__ */ jsx65("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
30540
30580
  }
30541
30581
  );
30542
30582
  }
30543
- return /* @__PURE__ */ jsxs40(
30583
+ return /* @__PURE__ */ jsxs39(
30544
30584
  "div",
30545
30585
  {
30546
30586
  className: `relative flex flex-col items-center ${className}`,
30547
30587
  style,
30548
30588
  children: [
30549
- /* @__PURE__ */ jsxs40("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
30550
- /* @__PURE__ */ jsx66(ResponsiveContainer2, { width: "99%", height: "100%", children: /* @__PURE__ */ jsxs40(PieChart, { children: [
30551
- /* @__PURE__ */ jsxs40(
30589
+ /* @__PURE__ */ jsxs39("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
30590
+ /* @__PURE__ */ jsx65(ResponsiveContainer2, { width: "99%", height: "100%", children: /* @__PURE__ */ jsxs39(PieChart, { children: [
30591
+ /* @__PURE__ */ jsxs39(
30552
30592
  Pie,
30553
30593
  {
30554
30594
  data,
@@ -30560,8 +30600,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30560
30600
  labelLine: false,
30561
30601
  isAnimationActive: false,
30562
30602
  children: [
30563
- data.map((entry, index) => /* @__PURE__ */ jsx66(Cell, { fill: entry.color }, `cell-${index}`)),
30564
- /* @__PURE__ */ jsx66(
30603
+ data.map((entry, index) => /* @__PURE__ */ jsx65(Cell, { fill: entry.color }, `cell-${index}`)),
30604
+ /* @__PURE__ */ jsx65(
30565
30605
  LabelList,
30566
30606
  {
30567
30607
  dataKey: "value",
@@ -30574,14 +30614,14 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30574
30614
  ]
30575
30615
  }
30576
30616
  ),
30577
- /* @__PURE__ */ jsx66(
30617
+ /* @__PURE__ */ jsx65(
30578
30618
  Tooltip2,
30579
30619
  {
30580
30620
  formatter: (value, name) => [`${value}k`, name]
30581
30621
  }
30582
30622
  )
30583
30623
  ] }) }),
30584
- /* @__PURE__ */ jsxs40(
30624
+ /* @__PURE__ */ jsxs39(
30585
30625
  "div",
30586
30626
  {
30587
30627
  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]`,
@@ -30592,18 +30632,18 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30592
30632
  }
30593
30633
  )
30594
30634
  ] }),
30595
- /* @__PURE__ */ jsx66("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
30635
+ /* @__PURE__ */ jsx65("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
30596
30636
  ]
30597
30637
  }
30598
30638
  );
30599
30639
  };
30600
- var PieChart_default = React14.memo(DonutChart);
30640
+ var PieChart_default = React13.memo(DonutChart);
30601
30641
 
30602
30642
  // src/components/Blocks/EmailComposer.tsx
30603
- import { jsx as jsx67, jsxs as jsxs41 } from "react/jsx-runtime";
30643
+ import { jsx as jsx66, jsxs as jsxs40 } from "react/jsx-runtime";
30604
30644
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
30605
- return /* @__PURE__ */ jsx67("div", { className, style, children: /* @__PURE__ */ jsxs41("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
30606
- /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30645
+ return /* @__PURE__ */ jsx66("div", { className, style, children: /* @__PURE__ */ jsxs40("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
30646
+ /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30607
30647
  "input",
30608
30648
  {
30609
30649
  type: "email",
@@ -30612,8 +30652,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30612
30652
  required: true
30613
30653
  }
30614
30654
  ) }),
30615
- /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
30616
- /* @__PURE__ */ jsx67(
30655
+ /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
30656
+ /* @__PURE__ */ jsx66(
30617
30657
  "input",
30618
30658
  {
30619
30659
  type: "email",
@@ -30624,7 +30664,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30624
30664
  required: true
30625
30665
  }
30626
30666
  ),
30627
- !showCc && /* @__PURE__ */ jsx67(
30667
+ !showCc && /* @__PURE__ */ jsx66(
30628
30668
  "button",
30629
30669
  {
30630
30670
  onClick: () => setShowCc?.(true),
@@ -30632,7 +30672,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30632
30672
  children: "Cc"
30633
30673
  }
30634
30674
  ),
30635
- !showBcc && /* @__PURE__ */ jsx67(
30675
+ !showBcc && /* @__PURE__ */ jsx66(
30636
30676
  "button",
30637
30677
  {
30638
30678
  onClick: () => setShowBcc?.(true),
@@ -30641,7 +30681,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30641
30681
  }
30642
30682
  )
30643
30683
  ] }) }),
30644
- showCc && /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30684
+ showCc && /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30645
30685
  "input",
30646
30686
  {
30647
30687
  type: "text",
@@ -30651,7 +30691,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30651
30691
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
30652
30692
  }
30653
30693
  ) }),
30654
- showBcc && /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30694
+ showBcc && /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30655
30695
  "input",
30656
30696
  {
30657
30697
  type: "text",
@@ -30661,7 +30701,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30661
30701
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
30662
30702
  }
30663
30703
  ) }),
30664
- /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30704
+ /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30665
30705
  "input",
30666
30706
  {
30667
30707
  type: "text",
@@ -30671,11 +30711,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30671
30711
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
30672
30712
  }
30673
30713
  ) }),
30674
- /* @__PURE__ */ jsx67("div", { className: "mb-4", children: /* @__PURE__ */ jsx67(MyEditor, { value: body, onChange: setBody }) }),
30675
- /* @__PURE__ */ jsxs41("div", { className: "flex justify-end gap-2", children: [
30676
- /* @__PURE__ */ jsx67("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
30677
- /* @__PURE__ */ jsx67("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
30678
- /* @__PURE__ */ jsx67("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
30714
+ /* @__PURE__ */ jsx66("div", { className: "mb-4", children: /* @__PURE__ */ jsx66(MyEditor, { value: body, onChange: setBody }) }),
30715
+ /* @__PURE__ */ jsxs40("div", { className: "flex justify-end gap-2", children: [
30716
+ /* @__PURE__ */ jsx66("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
30717
+ /* @__PURE__ */ jsx66("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
30718
+ /* @__PURE__ */ jsx66("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
30679
30719
  ] })
30680
30720
  ] }) });
30681
30721
  }
@@ -30720,10 +30760,10 @@ function showSonnerToast({
30720
30760
  // src/components/ui/sonner.tsx
30721
30761
  import { useTheme } from "next-themes";
30722
30762
  import { Toaster as Sonner } from "sonner";
30723
- import { jsx as jsx68 } from "react/jsx-runtime";
30763
+ import { jsx as jsx67 } from "react/jsx-runtime";
30724
30764
  var Toaster = ({ ...props }) => {
30725
30765
  const { theme = "system" } = useTheme();
30726
- return /* @__PURE__ */ jsx68(
30766
+ return /* @__PURE__ */ jsx67(
30727
30767
  Sonner,
30728
30768
  {
30729
30769
  theme,
@@ -30758,7 +30798,7 @@ export {
30758
30798
  Image_default as Image,
30759
30799
  Modal,
30760
30800
  MultiCheckbox_default as MultiCheckbox,
30761
- MultiSelect_default as MultiSelect,
30801
+ LazyMultiSelectDropdown as MultiSelect,
30762
30802
  Navbar,
30763
30803
  NumberInput_default as NumberInput,
30764
30804
  Pagination_default as Pagination,