@algorithm-shift/design-system 1.2.955 → 1.2.956

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);
@@ -27831,7 +27842,7 @@ function LazySelectDropdown({
27831
27842
  value,
27832
27843
  axiosInstance
27833
27844
  });
27834
- const selectedOption = lazyOptions.find((opt) => opt.value === value);
27845
+ const selectedOption = useMemo3(() => lazyOptions.find((opt) => opt.value === value), [lazyOptions, value]);
27835
27846
  useEffect14(() => {
27836
27847
  const handleClickOutside = (e) => {
27837
27848
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -27866,7 +27877,16 @@ function LazySelectDropdown({
27866
27877
  };
27867
27878
  const handleFocus = () => {
27868
27879
  if (!disabled) setIsOpen(true);
27869
- loadPage(1, "");
27880
+ if (lazyOptions.length === 0)
27881
+ loadPage(1, "");
27882
+ };
27883
+ const handleRemoveSelection = (e) => {
27884
+ e.preventDefault();
27885
+ e.stopPropagation();
27886
+ onChange?.("", id || "");
27887
+ setSearchTerm("");
27888
+ reset();
27889
+ search("");
27870
27890
  };
27871
27891
  return /* @__PURE__ */ jsxs18("div", { ref: dropdownRef, className: "relative w-full", children: [
27872
27892
  /* @__PURE__ */ jsx36(
@@ -27876,7 +27896,7 @@ function LazySelectDropdown({
27876
27896
  id,
27877
27897
  name: id,
27878
27898
  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",
27899
+ "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
27900
  disabled ? "bg-gray-100 cursor-not-allowed" : "bg-white cursor-pointer",
27881
27901
  className,
27882
27902
  errorMessage ? "border-red-500" : ""
@@ -27889,6 +27909,16 @@ function LazySelectDropdown({
27889
27909
  disabled
27890
27910
  }
27891
27911
  ),
27912
+ selectedOption && !disabled && !readOnly && /* @__PURE__ */ jsx36(
27913
+ "button",
27914
+ {
27915
+ type: "button",
27916
+ "aria-label": "Clear selection",
27917
+ onClick: handleRemoveSelection,
27918
+ 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",
27919
+ children: /* @__PURE__ */ jsx36(SquareX, { className: "h-5 w-5 pointer-events-none" })
27920
+ }
27921
+ ),
27892
27922
  errorMessage && /* @__PURE__ */ jsx36("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
27893
27923
  isOpen && !disabled && /* @__PURE__ */ jsx36(Portal_default, { children: /* @__PURE__ */ jsx36(
27894
27924
  "div",
@@ -28611,330 +28641,217 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28611
28641
  var TextInputGroup_default = TextInputGroup;
28612
28642
 
28613
28643
  // 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({
28644
+ import { useState as useState6, useRef as useRef5, useEffect as useEffect24, useMemo as useMemo4 } from "react";
28645
+ import { Fragment as Fragment19, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
28646
+ function LazyMultiSelectDropdown({
28647
+ options = [],
28648
+ value = [],
28649
+ onChange,
28650
+ placeholder,
28633
28651
  className,
28634
- ...props
28652
+ id,
28653
+ disabled,
28654
+ readOnly,
28655
+ source,
28656
+ apiUrl,
28657
+ pageSize,
28658
+ dataKey = "id",
28659
+ dataLabel = "name",
28660
+ errorMessage,
28661
+ axiosInstance,
28662
+ outputFormat = "array"
28635
28663
  }) {
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
28664
+ const [isOpen, setIsOpen] = useState6(false);
28665
+ const [searchTerm, setSearchTerm] = useState6("");
28666
+ const dropdownRef = useRef5(null);
28667
+ const observerTarget = useRef5(null);
28668
+ const {
28669
+ options: lazyOptions,
28670
+ loading,
28671
+ hasMore,
28672
+ loadMore,
28673
+ search,
28674
+ reset,
28675
+ loadPage
28676
+ } = useLazyDropdown({
28677
+ enabled: true,
28678
+ dataSource: source || "",
28679
+ apiUrl,
28680
+ pageSize: pageSize || 10,
28681
+ dataKey,
28682
+ dataLabel,
28683
+ initialData: options || [],
28684
+ value,
28685
+ axiosInstance
28686
+ });
28687
+ const ensureUnique = (arr) => {
28688
+ return Array.from(new Set(arr));
28689
+ };
28690
+ const convertOutput = (values) => {
28691
+ const unique = ensureUnique(values);
28692
+ switch (outputFormat) {
28693
+ case "comma":
28694
+ return unique.join(",");
28695
+ case "semicolon":
28696
+ return unique.join(";");
28697
+ default:
28698
+ return unique;
28645
28699
  }
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, {}),
28700
+ };
28701
+ const normalizeInput = (value2) => {
28702
+ let arr = [];
28703
+ if (Array.isArray(value2)) {
28704
+ arr = value2;
28705
+ } else if (typeof value2 === "string") {
28706
+ if (!value2.trim()) return [];
28707
+ if (value2.includes(";")) arr = value2.split(";").map((v) => v.trim());
28708
+ else if (value2.includes(",")) arr = value2.split(",").map((v) => v.trim());
28709
+ else arr = [value2.trim()];
28710
+ }
28711
+ return ensureUnique(arr);
28712
+ };
28713
+ const normalizedValue = normalizeInput(value);
28714
+ const selectedOptions = useMemo4(() => {
28715
+ return lazyOptions.filter((opt) => normalizedValue.includes(opt.value));
28716
+ }, [lazyOptions, normalizedValue]);
28717
+ useEffect24(() => {
28718
+ const handleClick = (e) => {
28719
+ if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
28720
+ setIsOpen(false);
28721
+ }
28722
+ };
28723
+ document.addEventListener("mousedown", handleClick);
28724
+ return () => document.removeEventListener("mousedown", handleClick);
28725
+ }, []);
28726
+ useEffect24(() => {
28727
+ if (!isOpen || !hasMore || loading) return;
28728
+ const obs = new IntersectionObserver(
28729
+ (entries) => {
28730
+ if (entries[0].isIntersecting) loadMore();
28731
+ },
28732
+ { threshold: 0.1 }
28733
+ );
28734
+ if (observerTarget.current) obs.observe(observerTarget.current);
28735
+ return () => obs.disconnect();
28736
+ }, [isOpen, hasMore, loading, loadMore]);
28737
+ const handleSearch = (e) => {
28738
+ const term = e.target.value;
28739
+ setSearchTerm(term);
28740
+ search(term);
28741
+ };
28742
+ const toggleSelect = (val) => {
28743
+ let updated;
28744
+ if (normalizedValue.includes(val)) {
28745
+ updated = normalizedValue.filter((v) => v !== val);
28746
+ } else {
28747
+ updated = ensureUnique([...normalizedValue, val]);
28748
+ }
28749
+ onChange(convertOutput(updated), id);
28750
+ };
28751
+ const removeTag = (val) => {
28752
+ const updated = normalizedValue.filter((v) => v !== val);
28753
+ onChange(convertOutput(updated), id);
28754
+ };
28755
+ const handleFocus = () => {
28756
+ if (!disabled) setIsOpen(true);
28757
+ if (lazyOptions.length === 0) loadPage(1, "");
28758
+ };
28759
+ return /* @__PURE__ */ jsxs27("div", { ref: dropdownRef, className: "relative w-full", children: [
28656
28760
  /* @__PURE__ */ jsxs27(
28657
- DialogPrimitive.Content,
28761
+ "div",
28658
28762
  {
28659
- "data-slot": "dialog-content",
28763
+ onClick: handleFocus,
28660
28764
  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",
28765
+ "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",
28766
+ disabled && "bg-gray-100 cursor-not-allowed",
28767
+ errorMessage && "border-red-500",
28662
28768
  className
28663
28769
  ),
28664
- ...props,
28665
28770
  children: [
28666
- children,
28667
- showCloseButton && /* @__PURE__ */ jsxs27(
28668
- DialogPrimitive.Close,
28771
+ selectedOptions.map((opt) => /* @__PURE__ */ jsxs27(
28772
+ "span",
28669
28773
  {
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",
28774
+ className: "bg-blue-100 text-blue-700 px-2 py-1 rounded-md text-xs flex items-center gap-1",
28672
28775
  children: [
28673
- /* @__PURE__ */ jsx48(X, {}),
28674
- /* @__PURE__ */ jsx48("span", { className: "sr-only", children: "Close" })
28776
+ opt.label,
28777
+ !disabled && !readOnly && /* @__PURE__ */ jsx48(
28778
+ "button",
28779
+ {
28780
+ type: "button",
28781
+ onClick: (e) => {
28782
+ e.stopPropagation();
28783
+ removeTag(opt.value);
28784
+ },
28785
+ className: "hover:text-red-600",
28786
+ children: /* @__PURE__ */ jsx48(X, { size: 12 })
28787
+ }
28788
+ )
28675
28789
  ]
28790
+ },
28791
+ opt.value
28792
+ )),
28793
+ /* @__PURE__ */ jsx48(
28794
+ "input",
28795
+ {
28796
+ type: "text",
28797
+ placeholder: selectedOptions.length ? "" : placeholder,
28798
+ className: "flex-1 min-w-[60px] p-1 outline-none",
28799
+ value: isOpen ? searchTerm : "",
28800
+ onChange: handleSearch,
28801
+ readOnly,
28802
+ disabled
28676
28803
  }
28677
28804
  )
28678
28805
  ]
28679
28806
  }
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,
28807
+ ),
28808
+ errorMessage && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
28809
+ isOpen && !disabled && /* @__PURE__ */ jsx48(Portal_default, { children: /* @__PURE__ */ jsx48(
28810
+ "div",
28892
28811
  {
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();
28812
+ onMouseDown: (e) => e.stopPropagation(),
28813
+ className: "absolute z-[999] mt-1 bg-white border rounded-lg shadow-lg max-h-60 overflow-y-auto",
28814
+ style: {
28815
+ zIndex: 900,
28816
+ width: dropdownRef.current?.offsetWidth,
28817
+ top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
28818
+ left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
28898
28819
  },
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
- ] })
28820
+ 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: [
28821
+ lazyOptions.map((option) => {
28822
+ const isSelected = normalizedValue.includes(option.value);
28823
+ return /* @__PURE__ */ jsxs27(
28824
+ "div",
28825
+ {
28826
+ onClick: () => toggleSelect(option.value),
28827
+ className: cn(
28828
+ "px-3 py-2 text-sm cursor-pointer hover:bg-blue-50 flex justify-between",
28829
+ isSelected && "bg-blue-100"
28830
+ ),
28831
+ children: [
28832
+ option.label,
28833
+ isSelected && /* @__PURE__ */ jsx48(SquareX, { size: 16 })
28834
+ ]
28835
+ },
28836
+ option.value
28837
+ );
28838
+ }),
28839
+ hasMore && /* @__PURE__ */ jsx48(
28840
+ "div",
28841
+ {
28842
+ ref: observerTarget,
28843
+ className: "px-3 py-3 text-center text-gray-400 text-sm",
28844
+ children: loading ? "Loading\u2026" : "Scroll for more\u2026"
28845
+ }
28846
+ )
28847
+ ] }) : /* @__PURE__ */ jsx48("div", { className: "px-3 py-4 text-center text-gray-500", children: "No results" })
28929
28848
  }
28930
- ),
28931
- props.errorMessage && /* @__PURE__ */ jsx50("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
28849
+ ) })
28932
28850
  ] });
28933
- };
28934
- var MultiSelect_default = MultiSelect;
28851
+ }
28935
28852
 
28936
28853
  // src/components/ui/data-table.tsx
28937
- import * as React10 from "react";
28854
+ import * as React9 from "react";
28938
28855
  import { faEllipsisH } from "@fortawesome/free-solid-svg-icons";
28939
28856
  import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
28940
28857
  import {
@@ -28946,14 +28863,14 @@ import {
28946
28863
  } from "@tanstack/react-table";
28947
28864
 
28948
28865
  // src/components/ui/table.tsx
28949
- import { jsx as jsx51 } from "react/jsx-runtime";
28866
+ import { jsx as jsx49 } from "react/jsx-runtime";
28950
28867
  function Table3({ className, ...props }) {
28951
- return /* @__PURE__ */ jsx51(
28868
+ return /* @__PURE__ */ jsx49(
28952
28869
  "div",
28953
28870
  {
28954
28871
  "data-slot": "table-container",
28955
28872
  className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
28956
- children: /* @__PURE__ */ jsx51(
28873
+ children: /* @__PURE__ */ jsx49(
28957
28874
  "table",
28958
28875
  {
28959
28876
  "data-slot": "table",
@@ -28965,7 +28882,7 @@ function Table3({ className, ...props }) {
28965
28882
  );
28966
28883
  }
28967
28884
  function TableHeader({ className, ...props }) {
28968
- return /* @__PURE__ */ jsx51(
28885
+ return /* @__PURE__ */ jsx49(
28969
28886
  "thead",
28970
28887
  {
28971
28888
  "data-slot": "table-header",
@@ -28978,7 +28895,7 @@ function TableHeader({ className, ...props }) {
28978
28895
  );
28979
28896
  }
28980
28897
  function TableBody({ className, ...props }) {
28981
- return /* @__PURE__ */ jsx51(
28898
+ return /* @__PURE__ */ jsx49(
28982
28899
  "tbody",
28983
28900
  {
28984
28901
  "data-slot": "table-body",
@@ -28991,7 +28908,7 @@ function TableBody({ className, ...props }) {
28991
28908
  );
28992
28909
  }
28993
28910
  function TableRow({ className, ...props }) {
28994
- return /* @__PURE__ */ jsx51(
28911
+ return /* @__PURE__ */ jsx49(
28995
28912
  "tr",
28996
28913
  {
28997
28914
  "data-slot": "table-row",
@@ -29004,7 +28921,7 @@ function TableRow({ className, ...props }) {
29004
28921
  );
29005
28922
  }
29006
28923
  function TableHead({ className, ...props }) {
29007
- return /* @__PURE__ */ jsx51(
28924
+ return /* @__PURE__ */ jsx49(
29008
28925
  "th",
29009
28926
  {
29010
28927
  "data-slot": "table-head",
@@ -29017,7 +28934,7 @@ function TableHead({ className, ...props }) {
29017
28934
  );
29018
28935
  }
29019
28936
  function TableCell({ className, ...props }) {
29020
- return /* @__PURE__ */ jsx51(
28937
+ return /* @__PURE__ */ jsx49(
29021
28938
  "td",
29022
28939
  {
29023
28940
  "data-slot": "table-cell",
@@ -29034,7 +28951,7 @@ function TableCell({ className, ...props }) {
29034
28951
  import { createColumnHelper } from "@tanstack/react-table";
29035
28952
 
29036
28953
  // src/lib/table/cellRendererFactory.tsx
29037
- import React9 from "react";
28954
+ import React8 from "react";
29038
28955
  import Image2 from "next/image";
29039
28956
 
29040
28957
  // src/lib/dayjs-setup.ts
@@ -29083,7 +29000,7 @@ var valueFormatter = (value, format2, customFormatters = {}) => {
29083
29000
  };
29084
29001
 
29085
29002
  // src/lib/table/cellRendererFactory.tsx
29086
- import { Fragment as Fragment19, jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
29003
+ import { Fragment as Fragment20, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
29087
29004
  var getContrastColor = (bg) => {
29088
29005
  let c = bg.trim().toUpperCase();
29089
29006
  if (/^#([a-fA-F0-9]{3})$/.test(c)) {
@@ -29117,9 +29034,9 @@ var getContrastColor = (bg) => {
29117
29034
  };
29118
29035
  var sanitizeValue = (val) => {
29119
29036
  if (val == null) return null;
29120
- if (React9.isValidElement(val)) return val;
29037
+ if (React8.isValidElement(val)) return val;
29121
29038
  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));
29039
+ if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx50(React8.Fragment, { children: sanitizeValue(v) }, i));
29123
29040
  if (typeof val === "object") {
29124
29041
  if ("name" in val && typeof val.name === "string") return val.name;
29125
29042
  if ("label" in val && typeof val.label === "string") return val.label;
@@ -29136,13 +29053,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29136
29053
  switch (renderer) {
29137
29054
  /* -------------------- BASIC -------------------- */
29138
29055
  case "text":
29139
- return /* @__PURE__ */ jsx52("span", { children: row?.[rendererProps?.rowField] || formattedValue });
29056
+ return /* @__PURE__ */ jsx50("span", { children: row?.[rendererProps?.rowField] || formattedValue });
29140
29057
  case "number":
29141
- return /* @__PURE__ */ jsx52("span", { className: "tabular-nums text-right", children: valueFormatter(row?.[rendererProps?.rowField] || value, "number:2") });
29058
+ return /* @__PURE__ */ jsx50("span", { className: "tabular-nums text-right", children: valueFormatter(row?.[rendererProps?.rowField] || value, "number:2") });
29142
29059
  case "date":
29143
- return /* @__PURE__ */ jsx52("span", { children: valueFormatter(row?.[rendererProps?.rowField] || value, format2) });
29060
+ return /* @__PURE__ */ jsx50("span", { children: valueFormatter(row?.[rendererProps?.rowField] || value, format2) });
29144
29061
  case "link":
29145
- return /* @__PURE__ */ jsx52(
29062
+ return /* @__PURE__ */ jsx50(
29146
29063
  "a",
29147
29064
  {
29148
29065
  href: `${rendererProps?.prefix || ""}${row?.[rendererProps?.rowField] || formattedValue}`,
@@ -29154,7 +29071,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29154
29071
  );
29155
29072
  /* -------------------- VISUAL -------------------- */
29156
29073
  case "image":
29157
- return /* @__PURE__ */ jsx52("div", { className: "relative", children: /* @__PURE__ */ jsx52(
29074
+ return /* @__PURE__ */ jsx50("div", { className: "relative", children: /* @__PURE__ */ jsx50(
29158
29075
  Image2,
29159
29076
  {
29160
29077
  src: row?.[rendererProps?.rowField] || formattedValue || rendererProps?.fallback || "/placeholder.png",
@@ -29171,7 +29088,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29171
29088
  case "icon":
29172
29089
  const maybeIcon = lucide_react_exports[rendererProps?.icon];
29173
29090
  const IconComponent = typeof maybeIcon === "function" ? maybeIcon : Star;
29174
- return /* @__PURE__ */ jsx52(
29091
+ return /* @__PURE__ */ jsx50(
29175
29092
  IconComponent,
29176
29093
  {
29177
29094
  size: rendererProps?.size || 16,
@@ -29183,7 +29100,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29183
29100
  const color = rendererProps?.colorMap?.[formattedValue] || rendererProps?.color || "gray";
29184
29101
  if (!formattedValue) return null;
29185
29102
  const textColor = getContrastColor(color);
29186
- return /* @__PURE__ */ jsx52(
29103
+ return /* @__PURE__ */ jsx50(
29187
29104
  "span",
29188
29105
  {
29189
29106
  className: `inline-block px-2 py-1 text-xs rounded-full bg-${color}-100 text-${textColor}-700 ${rendererProps?.className || ""}`,
@@ -29198,13 +29115,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29198
29115
  const IconComponent2 = typeof maybeIcon2 === "function" ? maybeIcon2 : Star;
29199
29116
  if (!formattedValue) return null;
29200
29117
  const textColor = getContrastColor(color);
29201
- return /* @__PURE__ */ jsxs30(
29118
+ return /* @__PURE__ */ jsxs28(
29202
29119
  "span",
29203
29120
  {
29204
29121
  className: `inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-[${color}]-100 text-[${textColor}]-700`,
29205
29122
  style: { backgroundColor: color, color: textColor },
29206
29123
  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" }) }),
29124
+ rendererProps?.icon && /* @__PURE__ */ jsx50(Fragment20, { children: IconComponent2 ? /* @__PURE__ */ jsx50(IconComponent2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx50(Box, { className: "h-4 w-4" }) }),
29208
29125
  formattedValue
29209
29126
  ]
29210
29127
  }
@@ -29212,7 +29129,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29212
29129
  }
29213
29130
  /* -------------------- INTERACTIVE -------------------- */
29214
29131
  case "button":
29215
- return /* @__PURE__ */ jsx52(
29132
+ return /* @__PURE__ */ jsx50(
29216
29133
  "button",
29217
29134
  {
29218
29135
  onClick: () => rendererProps?.onClick?.(row, formattedValue),
@@ -29221,8 +29138,8 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29221
29138
  }
29222
29139
  );
29223
29140
  case "switch":
29224
- return /* @__PURE__ */ jsxs30("label", { className: "inline-flex items-center cursor-pointer", children: [
29225
- /* @__PURE__ */ jsx52(
29141
+ return /* @__PURE__ */ jsxs28("label", { className: "inline-flex items-center cursor-pointer", children: [
29142
+ /* @__PURE__ */ jsx50(
29226
29143
  "input",
29227
29144
  {
29228
29145
  type: "checkbox",
@@ -29231,10 +29148,10 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29231
29148
  className: "sr-only peer"
29232
29149
  }
29233
29150
  ),
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" }) })
29151
+ /* @__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
29152
  ] });
29236
29153
  case "progress":
29237
- return /* @__PURE__ */ jsx52("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx52(
29154
+ return /* @__PURE__ */ jsx50("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx50(
29238
29155
  "div",
29239
29156
  {
29240
29157
  className: "bg-blue-600 h-2 rounded-full transition-all",
@@ -29243,7 +29160,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29243
29160
  ) });
29244
29161
  case "rating": {
29245
29162
  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(
29163
+ return /* @__PURE__ */ jsx50("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx50(
29247
29164
  Star,
29248
29165
  {
29249
29166
  size: 16,
@@ -29257,7 +29174,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29257
29174
  case "custom": {
29258
29175
  const CustomRenderer = customRenderers[rendererProps?.customRendererId] || customRenderers[rendererProps?.rendererId];
29259
29176
  if (CustomRenderer)
29260
- return /* @__PURE__ */ jsx52(
29177
+ return /* @__PURE__ */ jsx50(
29261
29178
  CustomRenderer,
29262
29179
  {
29263
29180
  value: formattedValue,
@@ -29265,11 +29182,11 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
29265
29182
  ...rendererProps
29266
29183
  }
29267
29184
  );
29268
- return /* @__PURE__ */ jsx52("span", { children: "Missing custom renderer" });
29185
+ return /* @__PURE__ */ jsx50("span", { children: "Missing custom renderer" });
29269
29186
  }
29270
29187
  /* -------------------- DEFAULT -------------------- */
29271
29188
  default:
29272
- return /* @__PURE__ */ jsx52("span", { children: formattedValue });
29189
+ return /* @__PURE__ */ jsx50("span", { children: formattedValue });
29273
29190
  }
29274
29191
  };
29275
29192
 
@@ -29318,7 +29235,7 @@ var useDynamicColumns = (config, customRenderers = {}, customFormatters = {}) =>
29318
29235
  };
29319
29236
 
29320
29237
  // src/components/ui/data-table.tsx
29321
- import { Fragment as Fragment20, jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
29238
+ import { Fragment as Fragment21, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
29322
29239
  function DataTable({
29323
29240
  columns,
29324
29241
  data,
@@ -29337,10 +29254,10 @@ function DataTable({
29337
29254
  onDeleteRow,
29338
29255
  rowActions
29339
29256
  }) {
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("");
29257
+ const [columnFilters, setColumnFilters] = React9.useState([]);
29258
+ const [columnVisibility, setColumnVisibility] = React9.useState({});
29259
+ const [manualSort, setManualSort] = React9.useState(null);
29260
+ const [searchTerm, setSearchTerm] = React9.useState("");
29344
29261
  const tableData = Array.isArray(data) ? data : [];
29345
29262
  const dynamicCols = useDynamicColumns({ columns });
29346
29263
  const table = useReactTable({
@@ -29391,11 +29308,11 @@ function DataTable({
29391
29308
  return [];
29392
29309
  };
29393
29310
  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(
29311
+ return /* @__PURE__ */ jsxs29("div", { className: "overflow-hidden rounded-md w-full", children: [
29312
+ /* @__PURE__ */ jsxs29("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 bg-gray-50`, children: [
29313
+ globalSearch && /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
29314
+ /* @__PURE__ */ jsxs29("div", { className: "relative w-full", children: [
29315
+ /* @__PURE__ */ jsx51(
29399
29316
  "input",
29400
29317
  {
29401
29318
  type: "text",
@@ -29410,9 +29327,9 @@ function DataTable({
29410
29327
  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
29328
  }
29412
29329
  ),
29413
- /* @__PURE__ */ jsx53(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
29330
+ /* @__PURE__ */ jsx51(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
29414
29331
  ] }),
29415
- /* @__PURE__ */ jsx53(
29332
+ /* @__PURE__ */ jsx51(
29416
29333
  Button,
29417
29334
  {
29418
29335
  size: "sm",
@@ -29422,8 +29339,8 @@ function DataTable({
29422
29339
  }
29423
29340
  )
29424
29341
  ] }),
29425
- /* @__PURE__ */ jsxs31(Popover, { children: [
29426
- /* @__PURE__ */ jsx53(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
29342
+ /* @__PURE__ */ jsxs29(Popover, { children: [
29343
+ /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
29427
29344
  Button,
29428
29345
  {
29429
29346
  variant: "outline",
@@ -29432,10 +29349,10 @@ function DataTable({
29432
29349
  children: "Manage Columns"
29433
29350
  }
29434
29351
  ) }),
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(
29352
+ /* @__PURE__ */ jsxs29(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
29353
+ /* @__PURE__ */ jsx51("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
29354
+ /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
29355
+ /* @__PURE__ */ jsx51(
29439
29356
  "input",
29440
29357
  {
29441
29358
  type: "checkbox",
@@ -29454,8 +29371,8 @@ function DataTable({
29454
29371
  ),
29455
29372
  "Toggle All"
29456
29373
  ] }),
29457
- table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm", children: [
29458
- /* @__PURE__ */ jsx53(
29374
+ table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm", children: [
29375
+ /* @__PURE__ */ jsx51(
29459
29376
  "input",
29460
29377
  {
29461
29378
  type: "checkbox",
@@ -29468,12 +29385,12 @@ function DataTable({
29468
29385
  ] })
29469
29386
  ] })
29470
29387
  ] }),
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) => {
29388
+ /* @__PURE__ */ jsxs29(Table3, { className: "table-fixed", children: [
29389
+ /* @__PURE__ */ jsx51(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx51(TableRow, { children: hg.headers.map((header, index) => {
29473
29390
  const canSort = header.column.getCanSort();
29474
29391
  const canFilter = header.column.getCanFilter();
29475
29392
  const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
29476
- return /* @__PURE__ */ jsx53(
29393
+ return /* @__PURE__ */ jsx51(
29477
29394
  TableHead,
29478
29395
  {
29479
29396
  className: "relative select-none",
@@ -29482,8 +29399,8 @@ function DataTable({
29482
29399
  minWidth: header.column.columnDef.minSize,
29483
29400
  maxWidth: header.column.columnDef.maxSize
29484
29401
  },
29485
- children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
29486
- /* @__PURE__ */ jsxs31(
29402
+ children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
29403
+ /* @__PURE__ */ jsxs29(
29487
29404
  "span",
29488
29405
  {
29489
29406
  className: `flex items-center gap-1 ${canSort ? "cursor-pointer" : ""}`,
@@ -29495,32 +29412,32 @@ function DataTable({
29495
29412
  },
29496
29413
  children: [
29497
29414
  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" })
29415
+ canSort && /* @__PURE__ */ jsxs29(Fragment21, { children: [
29416
+ sortDir === "asc" && /* @__PURE__ */ jsx51(ArrowUp, { size: 14, className: "text-gray-500" }),
29417
+ sortDir === "desc" && /* @__PURE__ */ jsx51(ArrowDown, { size: 14, className: "text-gray-500" }),
29418
+ !sortDir && /* @__PURE__ */ jsx51(ArrowUpDown, { size: 14, className: "text-gray-400" })
29502
29419
  ] })
29503
29420
  ]
29504
29421
  }
29505
29422
  ),
29506
- canFilter && /* @__PURE__ */ jsxs31(Popover, { children: [
29507
- /* @__PURE__ */ jsx53(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
29423
+ canFilter && /* @__PURE__ */ jsxs29(Popover, { children: [
29424
+ /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
29508
29425
  "span",
29509
29426
  {
29510
29427
  role: "presentation",
29511
29428
  className: "pl-5 cursor-pointer",
29512
29429
  onClick: (e) => e.stopPropagation(),
29513
- children: /* @__PURE__ */ jsx53(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
29430
+ children: /* @__PURE__ */ jsx51(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
29514
29431
  }
29515
29432
  ) }),
29516
- /* @__PURE__ */ jsx53(
29433
+ /* @__PURE__ */ jsx51(
29517
29434
  PopoverContent,
29518
29435
  {
29519
29436
  align: "center",
29520
29437
  sideOffset: 14,
29521
29438
  className: "w-50 p-3 z-[200] border-gray-300",
29522
29439
  avoidCollisions: true,
29523
- children: /* @__PURE__ */ jsxs31(
29440
+ children: /* @__PURE__ */ jsxs29(
29524
29441
  "form",
29525
29442
  {
29526
29443
  onSubmit: (e) => {
@@ -29533,8 +29450,8 @@ function DataTable({
29533
29450
  },
29534
29451
  className: "space-y-2",
29535
29452
  children: [
29536
- /* @__PURE__ */ jsx53("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
29537
- /* @__PURE__ */ jsx53(
29453
+ /* @__PURE__ */ jsx51("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
29454
+ /* @__PURE__ */ jsx51(
29538
29455
  "input",
29539
29456
  {
29540
29457
  name: "filter",
@@ -29544,7 +29461,7 @@ function DataTable({
29544
29461
  autoComplete: "off"
29545
29462
  }
29546
29463
  ),
29547
- /* @__PURE__ */ jsx53("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx53(
29464
+ /* @__PURE__ */ jsx51("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx51(
29548
29465
  Button,
29549
29466
  {
29550
29467
  type: "submit",
@@ -29563,11 +29480,11 @@ function DataTable({
29563
29480
  `header-${header.id}-${index}`
29564
29481
  );
29565
29482
  }) }, `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) => {
29483
+ /* @__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
29484
  const meta = cell.column.columnDef.meta || {};
29568
29485
  const isClickable = meta?.isClickable;
29569
29486
  const isLastCell = cellIndex === arr.length - 1;
29570
- return /* @__PURE__ */ jsxs31(
29487
+ return /* @__PURE__ */ jsxs29(
29571
29488
  TableCell,
29572
29489
  {
29573
29490
  className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100 underline text-blue-500" : ""} relative py-2`,
@@ -29584,9 +29501,9 @@ function DataTable({
29584
29501
  },
29585
29502
  children: [
29586
29503
  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) => {
29504
+ 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
29505
  const isDelete = action.id === "delete" || action.icon === "delete";
29589
- return /* @__PURE__ */ jsx53(
29506
+ return /* @__PURE__ */ jsx51(
29590
29507
  "button",
29591
29508
  {
29592
29509
  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 +29525,17 @@ function DataTable({
29608
29525
  },
29609
29526
  `cell-${cell.id}-${cellIndex}`
29610
29527
  );
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." }) }) }) })
29528
+ }) }, 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
29529
  ] }),
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: [
29530
+ pagination && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
29531
+ /* @__PURE__ */ jsxs29("div", { children: [
29615
29532
  "Page ",
29616
29533
  table.getState().pagination.pageIndex + 1,
29617
29534
  " of ",
29618
29535
  pageCount
29619
29536
  ] }),
29620
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
29621
- /* @__PURE__ */ jsx53(
29537
+ /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
29538
+ /* @__PURE__ */ jsx51(
29622
29539
  "button",
29623
29540
  {
29624
29541
  onClick: () => table.previousPage(),
@@ -29631,7 +29548,7 @@ function DataTable({
29631
29548
  table.getState().pagination.pageIndex + 1,
29632
29549
  table.getPageCount(),
29633
29550
  5
29634
- ).map((pageNum, index) => /* @__PURE__ */ jsx53(
29551
+ ).map((pageNum, index) => /* @__PURE__ */ jsx51(
29635
29552
  "button",
29636
29553
  {
29637
29554
  disabled: pageNum === "...",
@@ -29641,7 +29558,7 @@ function DataTable({
29641
29558
  },
29642
29559
  index
29643
29560
  )),
29644
- /* @__PURE__ */ jsx53(
29561
+ /* @__PURE__ */ jsx51(
29645
29562
  "button",
29646
29563
  {
29647
29564
  onClick: () => table.nextPage(),
@@ -29656,7 +29573,7 @@ function DataTable({
29656
29573
  }
29657
29574
 
29658
29575
  // src/components/DataDisplay/Table/Table.tsx
29659
- import { jsx as jsx54 } from "react/jsx-runtime";
29576
+ import { jsx as jsx52 } from "react/jsx-runtime";
29660
29577
  var Table4 = ({
29661
29578
  columns,
29662
29579
  data,
@@ -29681,7 +29598,7 @@ var Table4 = ({
29681
29598
  const rawColumns = Array.isArray(columns) ? columns : [];
29682
29599
  const rawData = Array.isArray(data) ? data : [];
29683
29600
  const isControlled = typeof page === "number";
29684
- return /* @__PURE__ */ jsx54("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx54(
29601
+ return /* @__PURE__ */ jsx52("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx52(
29685
29602
  DataTable,
29686
29603
  {
29687
29604
  ...props,
@@ -29713,9 +29630,9 @@ var Table4 = ({
29713
29630
  var Table_default = Table4;
29714
29631
 
29715
29632
  // src/components/ui/pagination.tsx
29716
- import { jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
29633
+ import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
29717
29634
  function Pagination({ className, ...props }) {
29718
- return /* @__PURE__ */ jsx55(
29635
+ return /* @__PURE__ */ jsx53(
29719
29636
  "nav",
29720
29637
  {
29721
29638
  role: "navigation",
@@ -29730,7 +29647,7 @@ function PaginationContent({
29730
29647
  className,
29731
29648
  ...props
29732
29649
  }) {
29733
- return /* @__PURE__ */ jsx55(
29650
+ return /* @__PURE__ */ jsx53(
29734
29651
  "ul",
29735
29652
  {
29736
29653
  "data-slot": "pagination-content",
@@ -29740,7 +29657,7 @@ function PaginationContent({
29740
29657
  );
29741
29658
  }
29742
29659
  function PaginationItem({ ...props }) {
29743
- return /* @__PURE__ */ jsx55("li", { "data-slot": "pagination-item", ...props });
29660
+ return /* @__PURE__ */ jsx53("li", { "data-slot": "pagination-item", ...props });
29744
29661
  }
29745
29662
  function PaginationLink({
29746
29663
  className,
@@ -29748,7 +29665,7 @@ function PaginationLink({
29748
29665
  size = "icon",
29749
29666
  ...props
29750
29667
  }) {
29751
- return /* @__PURE__ */ jsx55(
29668
+ return /* @__PURE__ */ jsx53(
29752
29669
  "a",
29753
29670
  {
29754
29671
  "aria-current": isActive ? "page" : void 0,
@@ -29769,7 +29686,7 @@ function PaginationPrevious({
29769
29686
  className,
29770
29687
  ...props
29771
29688
  }) {
29772
- return /* @__PURE__ */ jsxs32(
29689
+ return /* @__PURE__ */ jsxs30(
29773
29690
  PaginationLink,
29774
29691
  {
29775
29692
  "aria-label": "Go to previous page",
@@ -29777,8 +29694,8 @@ function PaginationPrevious({
29777
29694
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
29778
29695
  ...props,
29779
29696
  children: [
29780
- /* @__PURE__ */ jsx55(ChevronLeft, {}),
29781
- /* @__PURE__ */ jsx55("span", { className: "hidden sm:block", children: "Previous" })
29697
+ /* @__PURE__ */ jsx53(ChevronLeft, {}),
29698
+ /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Previous" })
29782
29699
  ]
29783
29700
  }
29784
29701
  );
@@ -29787,7 +29704,7 @@ function PaginationNext({
29787
29704
  className,
29788
29705
  ...props
29789
29706
  }) {
29790
- return /* @__PURE__ */ jsxs32(
29707
+ return /* @__PURE__ */ jsxs30(
29791
29708
  PaginationLink,
29792
29709
  {
29793
29710
  "aria-label": "Go to next page",
@@ -29795,8 +29712,8 @@ function PaginationNext({
29795
29712
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
29796
29713
  ...props,
29797
29714
  children: [
29798
- /* @__PURE__ */ jsx55("span", { className: "hidden sm:block", children: "Next" }),
29799
- /* @__PURE__ */ jsx55(ChevronRight, {})
29715
+ /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Next" }),
29716
+ /* @__PURE__ */ jsx53(ChevronRight, {})
29800
29717
  ]
29801
29718
  }
29802
29719
  );
@@ -29805,7 +29722,7 @@ function PaginationEllipsis({
29805
29722
  className,
29806
29723
  ...props
29807
29724
  }) {
29808
- return /* @__PURE__ */ jsxs32(
29725
+ return /* @__PURE__ */ jsxs30(
29809
29726
  "span",
29810
29727
  {
29811
29728
  "aria-hidden": true,
@@ -29813,15 +29730,15 @@ function PaginationEllipsis({
29813
29730
  className: cn("flex size-9 items-center justify-center", className),
29814
29731
  ...props,
29815
29732
  children: [
29816
- /* @__PURE__ */ jsx55(Ellipsis, { className: "size-4" }),
29817
- /* @__PURE__ */ jsx55("span", { className: "sr-only", children: "More pages" })
29733
+ /* @__PURE__ */ jsx53(Ellipsis, { className: "size-4" }),
29734
+ /* @__PURE__ */ jsx53("span", { className: "sr-only", children: "More pages" })
29818
29735
  ]
29819
29736
  }
29820
29737
  );
29821
29738
  }
29822
29739
 
29823
29740
  // src/components/DataDisplay/Pagination/Pagination.tsx
29824
- import { jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
29741
+ import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
29825
29742
  var CustomPagination = ({
29826
29743
  totalPages,
29827
29744
  currentPage,
@@ -29867,10 +29784,10 @@ var CustomPagination = ({
29867
29784
  }
29868
29785
  };
29869
29786
  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(
29787
+ return /* @__PURE__ */ jsxs31("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
29788
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
29789
+ /* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
29790
+ /* @__PURE__ */ jsxs31(
29874
29791
  Select,
29875
29792
  {
29876
29793
  defaultValue: String(perPage),
@@ -29878,26 +29795,26 @@ var CustomPagination = ({
29878
29795
  onPageChange({ page: 1, itemsPerPage: Number(value) });
29879
29796
  },
29880
29797
  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" })
29798
+ /* @__PURE__ */ jsx54(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: "Select" }) }),
29799
+ /* @__PURE__ */ jsxs31(SelectContent, { children: [
29800
+ /* @__PURE__ */ jsx54(SelectItem, { value: "5", children: "5" }),
29801
+ /* @__PURE__ */ jsx54(SelectItem, { value: "10", children: "10" }),
29802
+ /* @__PURE__ */ jsx54(SelectItem, { value: "20", children: "20" }),
29803
+ /* @__PURE__ */ jsx54(SelectItem, { value: "50", children: "50" })
29887
29804
  ] })
29888
29805
  ]
29889
29806
  }
29890
29807
  )
29891
29808
  ] }),
29892
- /* @__PURE__ */ jsx56(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs33(PaginationContent, { children: [
29893
- /* @__PURE__ */ jsx56(PaginationItem, { children: /* @__PURE__ */ jsx56(
29809
+ /* @__PURE__ */ jsx54(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs31(PaginationContent, { children: [
29810
+ /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
29894
29811
  PaginationPrevious,
29895
29812
  {
29896
29813
  onClick: () => handlePageChange(currentPage - 1),
29897
29814
  className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
29898
29815
  }
29899
29816
  ) }),
29900
- pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx56(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx56(PaginationEllipsis, {}) : /* @__PURE__ */ jsx56(
29817
+ pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx54(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx54(PaginationEllipsis, {}) : /* @__PURE__ */ jsx54(
29901
29818
  PaginationLink,
29902
29819
  {
29903
29820
  onClick: () => handlePageChange(pageNumber),
@@ -29906,7 +29823,7 @@ var CustomPagination = ({
29906
29823
  children: pageNumber
29907
29824
  }
29908
29825
  ) }, index)),
29909
- /* @__PURE__ */ jsx56(PaginationItem, { children: /* @__PURE__ */ jsx56(
29826
+ /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
29910
29827
  PaginationNext,
29911
29828
  {
29912
29829
  onClick: () => handlePageChange(currentPage + 1),
@@ -29919,10 +29836,126 @@ var CustomPagination = ({
29919
29836
  var Pagination_default = CustomPagination;
29920
29837
 
29921
29838
  // src/components/Navigation/Tabs/Tabs.tsx
29922
- import { useCallback as useCallback3, useMemo as useMemo4, useState as useState8 } from "react";
29839
+ import { useCallback as useCallback3, useMemo as useMemo5, useState as useState8 } from "react";
29923
29840
  import Link5 from "next/link";
29924
29841
  import { useRouter } from "next/navigation";
29925
- import { Fragment as Fragment21, jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
29842
+
29843
+ // src/components/ui/dialog.tsx
29844
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
29845
+ import { jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
29846
+ function Dialog({
29847
+ ...props
29848
+ }) {
29849
+ return /* @__PURE__ */ jsx55(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
29850
+ }
29851
+ function DialogPortal({
29852
+ ...props
29853
+ }) {
29854
+ return /* @__PURE__ */ jsx55(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
29855
+ }
29856
+ function DialogOverlay({
29857
+ className,
29858
+ ...props
29859
+ }) {
29860
+ return /* @__PURE__ */ jsx55(
29861
+ DialogPrimitive.Overlay,
29862
+ {
29863
+ "data-slot": "dialog-overlay",
29864
+ className: cn(
29865
+ "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",
29866
+ className
29867
+ ),
29868
+ ...props
29869
+ }
29870
+ );
29871
+ }
29872
+ function DialogContent({
29873
+ className,
29874
+ children,
29875
+ showCloseButton = true,
29876
+ ...props
29877
+ }) {
29878
+ return /* @__PURE__ */ jsxs32(DialogPortal, { "data-slot": "dialog-portal", children: [
29879
+ /* @__PURE__ */ jsx55(DialogOverlay, {}),
29880
+ /* @__PURE__ */ jsxs32(
29881
+ DialogPrimitive.Content,
29882
+ {
29883
+ "data-slot": "dialog-content",
29884
+ className: cn(
29885
+ "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",
29886
+ className
29887
+ ),
29888
+ ...props,
29889
+ children: [
29890
+ children,
29891
+ showCloseButton && /* @__PURE__ */ jsxs32(
29892
+ DialogPrimitive.Close,
29893
+ {
29894
+ "data-slot": "dialog-close",
29895
+ 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",
29896
+ children: [
29897
+ /* @__PURE__ */ jsx55(X, {}),
29898
+ /* @__PURE__ */ jsx55("span", { className: "sr-only", children: "Close" })
29899
+ ]
29900
+ }
29901
+ )
29902
+ ]
29903
+ }
29904
+ )
29905
+ ] });
29906
+ }
29907
+ function DialogHeader({ className, ...props }) {
29908
+ return /* @__PURE__ */ jsx55(
29909
+ "div",
29910
+ {
29911
+ "data-slot": "dialog-header",
29912
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
29913
+ ...props
29914
+ }
29915
+ );
29916
+ }
29917
+ function DialogFooter({ className, ...props }) {
29918
+ return /* @__PURE__ */ jsx55(
29919
+ "div",
29920
+ {
29921
+ "data-slot": "dialog-footer",
29922
+ className: cn(
29923
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
29924
+ className
29925
+ ),
29926
+ ...props
29927
+ }
29928
+ );
29929
+ }
29930
+ function DialogTitle({
29931
+ className,
29932
+ ...props
29933
+ }) {
29934
+ return /* @__PURE__ */ jsx55(
29935
+ DialogPrimitive.Title,
29936
+ {
29937
+ "data-slot": "dialog-title",
29938
+ className: cn("text-lg leading-none font-semibold", className),
29939
+ ...props
29940
+ }
29941
+ );
29942
+ }
29943
+ function DialogDescription({
29944
+ className,
29945
+ ...props
29946
+ }) {
29947
+ return /* @__PURE__ */ jsx55(
29948
+ DialogPrimitive.Description,
29949
+ {
29950
+ "data-slot": "dialog-description",
29951
+ className: cn("text-muted-foreground text-sm", className),
29952
+ ...props
29953
+ }
29954
+ );
29955
+ }
29956
+
29957
+ // src/components/Navigation/Tabs/Tabs.tsx
29958
+ import { Fragment as Fragment22, jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
29926
29959
  var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = false, source, parentKey, menuNameKey, menuUrlKey, loading }) => {
29927
29960
  const [openIndex, setOpenIndex] = useState8(null);
29928
29961
  function groupMenus(menus = []) {
@@ -29957,7 +29990,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29957
29990
  });
29958
29991
  return sortMenus(rootMenus);
29959
29992
  }
29960
- const rawTabs = useMemo4(() => {
29993
+ const rawTabs = useMemo5(() => {
29961
29994
  if (!Array.isArray(tabs)) return [];
29962
29995
  if (source === "manual") return Array.isArray(tabs) ? tabs : [];
29963
29996
  return groupMenus(tabs);
@@ -29992,13 +30025,13 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
29992
30025
  const renderDesktopTab = (tab, index) => {
29993
30026
  const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
29994
30027
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
29995
- return /* @__PURE__ */ jsxs34(
30028
+ return /* @__PURE__ */ jsxs33(
29996
30029
  DropdownMenu,
29997
30030
  {
29998
30031
  open: openIndex === index,
29999
30032
  onOpenChange: (open) => setOpenIndex(open ? index : null),
30000
30033
  children: [
30001
- /* @__PURE__ */ jsxs34(
30034
+ /* @__PURE__ */ jsxs33(
30002
30035
  DropdownMenuTrigger,
30003
30036
  {
30004
30037
  className: `${finalClasses} inline-flex items-center gap-1`,
@@ -30011,11 +30044,11 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30011
30044
  },
30012
30045
  children: [
30013
30046
  tab.header,
30014
- /* @__PURE__ */ jsx57(ChevronDown, { className: "h-4 w-4 opacity-80" })
30047
+ /* @__PURE__ */ jsx56(ChevronDown, { className: "h-4 w-4 opacity-80" })
30015
30048
  ]
30016
30049
  }
30017
30050
  ),
30018
- /* @__PURE__ */ jsx57(
30051
+ /* @__PURE__ */ jsx56(
30019
30052
  DropdownMenuContent,
30020
30053
  {
30021
30054
  align: "start",
@@ -30028,12 +30061,12 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30028
30061
  onMouseLeave: () => {
30029
30062
  timeout = setTimeout(() => setOpenIndex(null), 150);
30030
30063
  },
30031
- children: tab.children.map((item, index2) => /* @__PURE__ */ jsx57(
30064
+ children: tab.children.map((item, index2) => /* @__PURE__ */ jsx56(
30032
30065
  DropdownMenuItem,
30033
30066
  {
30034
30067
  asChild: true,
30035
30068
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
30036
- children: /* @__PURE__ */ jsx57(
30069
+ children: /* @__PURE__ */ jsx56(
30037
30070
  Link5,
30038
30071
  {
30039
30072
  href: item.url || "#",
@@ -30052,7 +30085,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30052
30085
  index
30053
30086
  );
30054
30087
  }
30055
- return tab.url ? /* @__PURE__ */ jsx57(
30088
+ return tab.url ? /* @__PURE__ */ jsx56(
30056
30089
  Link5,
30057
30090
  {
30058
30091
  href: tab.url,
@@ -30063,14 +30096,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30063
30096
  children: tab.header
30064
30097
  },
30065
30098
  index
30066
- ) : /* @__PURE__ */ jsx57("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
30099
+ ) : /* @__PURE__ */ jsx56("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
30067
30100
  };
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" }),
30101
+ const renderMobileMenu = () => /* @__PURE__ */ jsxs33(DropdownMenu, { children: [
30102
+ /* @__PURE__ */ jsxs33(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
30103
+ /* @__PURE__ */ jsx56(Menu, { className: "h-4 w-4" }),
30071
30104
  "Menu"
30072
30105
  ] }),
30073
- /* @__PURE__ */ jsx57(
30106
+ /* @__PURE__ */ jsx56(
30074
30107
  DropdownMenuContent,
30075
30108
  {
30076
30109
  align: "start",
@@ -30079,25 +30112,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30079
30112
  children: rawTabs.map((tab, i) => {
30080
30113
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
30081
30114
  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(
30115
+ return /* @__PURE__ */ jsxs33(DropdownMenuSub, { children: [
30116
+ /* @__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 }),
30117
+ /* @__PURE__ */ jsx56(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx56(
30085
30118
  DropdownMenuItem,
30086
30119
  {
30087
30120
  asChild: true,
30088
30121
  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 })
30122
+ children: /* @__PURE__ */ jsx56(Link5, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
30090
30123
  },
30091
30124
  item.id || index
30092
30125
  )) })
30093
30126
  ] }, i);
30094
30127
  }
30095
- return /* @__PURE__ */ jsx57(
30128
+ return /* @__PURE__ */ jsx56(
30096
30129
  DropdownMenuItem,
30097
30130
  {
30098
30131
  asChild: true,
30099
30132
  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 })
30133
+ children: /* @__PURE__ */ jsx56(Link5, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
30101
30134
  },
30102
30135
  i
30103
30136
  );
@@ -30107,19 +30140,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30107
30140
  ] });
30108
30141
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
30109
30142
  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() })
30143
+ return /* @__PURE__ */ jsxs33(Fragment22, { children: [
30144
+ /* @__PURE__ */ jsxs33("div", { className: cn("min-h-10", className), style, children: [
30145
+ 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) }) }),
30146
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx56("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx56("div", { className: "flex md:hidden", children: renderMobileMenu() })
30114
30147
  ] }),
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." })
30148
+ /* @__PURE__ */ jsx56(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs33(DialogContent, { className: "bg-[#fff]", children: [
30149
+ /* @__PURE__ */ jsxs33(DialogHeader, { children: [
30150
+ /* @__PURE__ */ jsx56(DialogTitle, { children: "Exit Builder?" }),
30151
+ /* @__PURE__ */ jsx56(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30119
30152
  ] }),
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" })
30153
+ /* @__PURE__ */ jsxs33(DialogFooter, { children: [
30154
+ /* @__PURE__ */ jsx56(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30155
+ /* @__PURE__ */ jsx56(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30123
30156
  ] })
30124
30157
  ] }) })
30125
30158
  ] });
@@ -30127,8 +30160,8 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30127
30160
  var Tabs_default = Tabs;
30128
30161
 
30129
30162
  // 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";
30163
+ import React10, { useState as useState9 } from "react";
30164
+ import { jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
30132
30165
  var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange, currentStage, dataKey = "key", dataLabel = "header", loading }) => {
30133
30166
  const [activeStage, setActiveStage] = useState9(currentStage || (stages && stages.length > 0 ? stages[0].key : null));
30134
30167
  const nextStage = () => {
@@ -30147,9 +30180,9 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30147
30180
  onStageChange?.(stageKey);
30148
30181
  };
30149
30182
  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(
30183
+ 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: [
30184
+ /* @__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" }) }) }) }),
30185
+ /* @__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
30186
  "button",
30154
30187
  {
30155
30188
  className: `
@@ -30162,8 +30195,8 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30162
30195
  const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
30163
30196
  const isCompleted = isAllStagesCompleted || index < currentIndex;
30164
30197
  const isActive = !isAllStagesCompleted && index === currentIndex;
30165
- return /* @__PURE__ */ jsxs35(React11.Fragment, { children: [
30166
- /* @__PURE__ */ jsx58(
30198
+ return /* @__PURE__ */ jsxs34(React10.Fragment, { children: [
30199
+ /* @__PURE__ */ jsx57(
30167
30200
  "button",
30168
30201
  {
30169
30202
  className: `
@@ -30176,10 +30209,10 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30176
30209
  children: stage[dataLabel]
30177
30210
  }
30178
30211
  ),
30179
- index < stages.length - 1 && /* @__PURE__ */ jsx58("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
30212
+ index < stages.length - 1 && /* @__PURE__ */ jsx57("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
30180
30213
  ] }, stage.id);
30181
30214
  }) }),
30182
- isShowBtn && /* @__PURE__ */ jsx58("div", { className: "flex items-center", children: /* @__PURE__ */ jsx58(
30215
+ isShowBtn && /* @__PURE__ */ jsx57("div", { className: "flex items-center", children: /* @__PURE__ */ jsx57(
30183
30216
  "button",
30184
30217
  {
30185
30218
  className: "bg-green-700 text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
@@ -30194,26 +30227,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStag
30194
30227
  var Stages_default = StagesComponent;
30195
30228
 
30196
30229
  // src/components/Navigation/Spacer/Spacer.tsx
30197
- import { jsx as jsx59 } from "react/jsx-runtime";
30230
+ import { jsx as jsx58 } from "react/jsx-runtime";
30198
30231
  var Spacer = ({ className, style }) => {
30199
- return /* @__PURE__ */ jsx59("div", { className: `${className}`, style });
30232
+ return /* @__PURE__ */ jsx58("div", { className: `${className}`, style });
30200
30233
  };
30201
30234
  var Spacer_default = Spacer;
30202
30235
 
30203
30236
  // src/components/Navigation/Profile/Profile.tsx
30204
- import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
30237
+ import { jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
30205
30238
 
30206
30239
  // src/components/Navigation/Notification/Notification.tsx
30207
- import { jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
30240
+ import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
30208
30241
 
30209
30242
  // src/components/Navigation/Logo/Logo.tsx
30210
- import { jsx as jsx62 } from "react/jsx-runtime";
30243
+ import { jsx as jsx61 } from "react/jsx-runtime";
30211
30244
 
30212
30245
  // src/components/ui/avatar.tsx
30213
- import * as React12 from "react";
30246
+ import * as React11 from "react";
30214
30247
  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(
30248
+ import { jsx as jsx62 } from "react/jsx-runtime";
30249
+ var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx62(
30217
30250
  AvatarPrimitive.Root,
30218
30251
  {
30219
30252
  ref,
@@ -30225,7 +30258,7 @@ var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
30225
30258
  }
30226
30259
  ));
30227
30260
  Avatar.displayName = AvatarPrimitive.Root.displayName;
30228
- var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx63(
30261
+ var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx62(
30229
30262
  AvatarPrimitive.Image,
30230
30263
  {
30231
30264
  ref,
@@ -30234,7 +30267,7 @@ var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
30234
30267
  }
30235
30268
  ));
30236
30269
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
30237
- var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx63(
30270
+ var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx62(
30238
30271
  AvatarPrimitive.Fallback,
30239
30272
  {
30240
30273
  ref,
@@ -30252,8 +30285,8 @@ import Link6 from "next/link";
30252
30285
  import Image4 from "next/image";
30253
30286
  import { useRouter as useRouter2 } from "next/navigation";
30254
30287
  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";
30288
+ import { useCallback as useCallback4, useMemo as useMemo6, useState as useState10 } from "react";
30289
+ import { Fragment as Fragment23, jsx as jsx63, jsxs as jsxs37 } from "react/jsx-runtime";
30257
30290
  function Navbar({
30258
30291
  style,
30259
30292
  badgeType,
@@ -30291,29 +30324,29 @@ function Navbar({
30291
30324
  router.push(pendingUrl);
30292
30325
  }
30293
30326
  };
30294
- const formatedMenu = useMemo5(() => {
30327
+ const formatedMenu = useMemo6(() => {
30295
30328
  if (source === "state" && navList && navList.length) {
30296
30329
  return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
30297
30330
  }
30298
30331
  return list || [];
30299
30332
  }, [source, navList]);
30300
- return /* @__PURE__ */ jsxs38(Fragment22, { children: [
30301
- /* @__PURE__ */ jsx64(
30333
+ return /* @__PURE__ */ jsxs37(Fragment23, { children: [
30334
+ /* @__PURE__ */ jsx63(
30302
30335
  "nav",
30303
30336
  {
30304
30337
  className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
30305
30338
  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(
30339
+ children: /* @__PURE__ */ jsxs37("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
30340
+ /* @__PURE__ */ jsx63(
30308
30341
  Link6,
30309
30342
  {
30310
30343
  href: "/",
30311
30344
  onClick: (e) => handleBuilderExit(e, "/"),
30312
30345
  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" })
30346
+ 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
30347
  }
30315
30348
  ),
30316
- !isMobileView && /* @__PURE__ */ jsx64("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ jsx64(
30349
+ !isMobileView && /* @__PURE__ */ jsx63("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ jsx63(
30317
30350
  Link6,
30318
30351
  {
30319
30352
  href: item.url || "#",
@@ -30323,39 +30356,39 @@ function Navbar({
30323
30356
  },
30324
30357
  item.id
30325
30358
  )) }),
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" })
30359
+ /* @__PURE__ */ jsxs37("div", { className: "flex items-center space-x-3", children: [
30360
+ !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: [
30361
+ /* @__PURE__ */ jsx63(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
30362
+ /* @__PURE__ */ jsx63(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
30363
+ ] }) }) : /* @__PURE__ */ jsx63(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ jsx63(Search, { className: "h-5 w-5 text-gray-400" }) }),
30364
+ /* @__PURE__ */ jsxs37("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
30365
+ /* @__PURE__ */ jsx63(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx63(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
30366
+ 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
30367
  ] }),
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(
30368
+ /* @__PURE__ */ jsxs37(DropdownMenu, { children: [
30369
+ /* @__PURE__ */ jsx63(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center space-x-2", children: [
30370
+ !isMobileView && showName && /* @__PURE__ */ jsx63("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
30371
+ !isMobileView ? /* @__PURE__ */ jsxs37(Fragment23, { children: [
30372
+ /* @__PURE__ */ jsx63(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx63(
30340
30373
  AvatarImage,
30341
30374
  {
30342
30375
  src: "/images/appbuilder/toolset/profile.svg",
30343
30376
  alt: "Profile"
30344
30377
  }
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(
30378
+ ) : /* @__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) }) }),
30379
+ /* @__PURE__ */ jsx63(
30347
30380
  Button,
30348
30381
  {
30349
30382
  variant: "ghost",
30350
30383
  size: "icon",
30351
30384
  className: "text-gray-900 md:hidden dark:invert",
30352
- children: /* @__PURE__ */ jsx64(Menu, { className: "h-6 w-6" })
30385
+ children: /* @__PURE__ */ jsx63(Menu, { className: "h-6 w-6" })
30353
30386
  }
30354
30387
  )
30355
- ] }) : /* @__PURE__ */ jsx64(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ jsx64(Menu, { className: "h-6 w-6" }) })
30388
+ ] }) : /* @__PURE__ */ jsx63(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ jsx63(Menu, { className: "h-6 w-6" }) })
30356
30389
  ] }) }),
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(
30390
+ /* @__PURE__ */ jsxs37(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
30391
+ profileMenu && profileMenu.length > 0 && /* @__PURE__ */ jsx63(Fragment23, { children: profileMenu.map((item) => /* @__PURE__ */ jsx63(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx63(
30359
30392
  Link6,
30360
30393
  {
30361
30394
  href: item.url || "#",
@@ -30363,9 +30396,9 @@ function Navbar({
30363
30396
  children: item.header
30364
30397
  }
30365
30398
  ) }, 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(
30399
+ /* @__PURE__ */ jsxs37("div", { className: "md:hidden", children: [
30400
+ /* @__PURE__ */ jsx63(DropdownMenuSeparator, {}),
30401
+ formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ jsx63(Fragment23, { children: formatedMenu.map((item) => /* @__PURE__ */ jsx63(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ jsx63(
30369
30402
  Link6,
30370
30403
  {
30371
30404
  href: item.url || "#",
@@ -30380,21 +30413,21 @@ function Navbar({
30380
30413
  ] })
30381
30414
  }
30382
30415
  ),
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." })
30416
+ /* @__PURE__ */ jsx63(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs37(DialogContent, { className: "bg-[#fff]", children: [
30417
+ /* @__PURE__ */ jsxs37(DialogHeader, { children: [
30418
+ /* @__PURE__ */ jsx63(DialogTitle, { children: "Exit Builder?" }),
30419
+ /* @__PURE__ */ jsx63(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30387
30420
  ] }),
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" })
30421
+ /* @__PURE__ */ jsxs37(DialogFooter, { children: [
30422
+ /* @__PURE__ */ jsx63(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30423
+ /* @__PURE__ */ jsx63(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30391
30424
  ] })
30392
30425
  ] }) })
30393
30426
  ] });
30394
30427
  }
30395
30428
 
30396
30429
  // src/components/Chart/BarChart.tsx
30397
- import React13 from "react";
30430
+ import React12 from "react";
30398
30431
  import {
30399
30432
  BarChart,
30400
30433
  Bar,
@@ -30407,35 +30440,35 @@ import {
30407
30440
  ResponsiveContainer,
30408
30441
  Legend
30409
30442
  } from "recharts";
30410
- import { jsx as jsx65, jsxs as jsxs39 } from "react/jsx-runtime";
30443
+ import { jsx as jsx64, jsxs as jsxs38 } from "react/jsx-runtime";
30411
30444
  var ChartComponent = ({ className, style, loading, ...props }) => {
30412
30445
  const data = Array.isArray(props.data) ? props.data : [];
30413
30446
  const chartType = props.chartType || "bar";
30414
30447
  const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
30415
30448
  if (loading || data.length === 0) {
30416
- return /* @__PURE__ */ jsx65(
30449
+ return /* @__PURE__ */ jsx64(
30417
30450
  "div",
30418
30451
  {
30419
30452
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
30420
30453
  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." })
30454
+ 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
30455
  }
30423
30456
  );
30424
30457
  }
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(
30458
+ 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: [
30459
+ /* @__PURE__ */ jsx64(CartesianGrid, { strokeDasharray: "3 3" }),
30460
+ /* @__PURE__ */ jsx64(XAxis, { dataKey: "name" }),
30461
+ /* @__PURE__ */ jsx64(YAxis, {}),
30462
+ /* @__PURE__ */ jsx64(Tooltip, { formatter: (value) => `${value}k` }),
30463
+ /* @__PURE__ */ jsx64(Legend, { verticalAlign: legendsPosition, align: "center" }),
30464
+ /* @__PURE__ */ jsx64(
30432
30465
  Bar,
30433
30466
  {
30434
30467
  dataKey: "value",
30435
30468
  fill: "#00695C",
30436
30469
  radius: [6, 6, 0, 0],
30437
30470
  isAnimationActive: false,
30438
- children: data.map((entry, index) => /* @__PURE__ */ jsx65(
30471
+ children: data.map((entry, index) => /* @__PURE__ */ jsx64(
30439
30472
  "rect",
30440
30473
  {
30441
30474
  fill: entry.color || "#00695C"
@@ -30444,16 +30477,16 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
30444
30477
  ))
30445
30478
  }
30446
30479
  )
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 })
30480
+ ] }) : /* @__PURE__ */ jsxs38(AreaChart, { data, children: [
30481
+ /* @__PURE__ */ jsx64("defs", { children: /* @__PURE__ */ jsxs38("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
30482
+ /* @__PURE__ */ jsx64("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
30483
+ /* @__PURE__ */ jsx64("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
30451
30484
  ] }) }),
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(
30485
+ /* @__PURE__ */ jsx64(CartesianGrid, { strokeDasharray: "3 3" }),
30486
+ /* @__PURE__ */ jsx64(XAxis, { dataKey: "name" }),
30487
+ /* @__PURE__ */ jsx64(YAxis, {}),
30488
+ /* @__PURE__ */ jsx64(Tooltip, { formatter: (value) => `${value}k` }),
30489
+ /* @__PURE__ */ jsx64(
30457
30490
  Area,
30458
30491
  {
30459
30492
  type: "monotone",
@@ -30466,10 +30499,10 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
30466
30499
  )
30467
30500
  ] }) }) });
30468
30501
  };
30469
- var BarChart_default = React13.memo(ChartComponent);
30502
+ var BarChart_default = React12.memo(ChartComponent);
30470
30503
 
30471
30504
  // src/components/Chart/PieChart.tsx
30472
- import React14, { useEffect as useEffect25, useMemo as useMemo6, useState as useState11 } from "react";
30505
+ import React13, { useEffect as useEffect25, useMemo as useMemo7, useState as useState11 } from "react";
30473
30506
  import {
30474
30507
  PieChart,
30475
30508
  Pie,
@@ -30478,7 +30511,7 @@ import {
30478
30511
  Tooltip as Tooltip2,
30479
30512
  LabelList
30480
30513
  } from "recharts";
30481
- import { Fragment as Fragment23, jsx as jsx66, jsxs as jsxs40 } from "react/jsx-runtime";
30514
+ import { Fragment as Fragment24, jsx as jsx65, jsxs as jsxs39 } from "react/jsx-runtime";
30482
30515
  var getRandomColor = () => {
30483
30516
  const palette = [
30484
30517
  "#2563eb",
@@ -30498,32 +30531,32 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30498
30531
  const showLegends = props.showLegends ?? true;
30499
30532
  const labelType = props.labelType || "inside";
30500
30533
  const canvasMode = props.canvasMode;
30501
- const data = useMemo6(() => {
30534
+ const data = useMemo7(() => {
30502
30535
  if (!Array.isArray(props.data)) return [];
30503
30536
  return props.data.map((item) => ({ ...item, color: getRandomColor() }));
30504
30537
  }, [props.data]);
30505
- const total = useMemo6(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
30538
+ const total = useMemo7(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
30506
30539
  const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
30507
30540
  const [mounted, setMounted] = useState11(false);
30508
30541
  useEffect25(() => {
30509
30542
  const timeout = setTimeout(() => setMounted(true), 100);
30510
30543
  return () => clearTimeout(timeout);
30511
30544
  }, []);
30512
- const renderLegends = useMemo6(() => {
30545
+ const renderLegends = useMemo7(() => {
30513
30546
  if (!showLegends) return null;
30514
- return /* @__PURE__ */ jsx66(Fragment23, { children: data.map((d) => /* @__PURE__ */ jsxs40(
30547
+ return /* @__PURE__ */ jsx65(Fragment24, { children: data.map((d) => /* @__PURE__ */ jsxs39(
30515
30548
  "div",
30516
30549
  {
30517
30550
  className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
30518
30551
  children: [
30519
- /* @__PURE__ */ jsx66(
30552
+ /* @__PURE__ */ jsx65(
30520
30553
  "span",
30521
30554
  {
30522
30555
  className: "inline-block w-[16px] h-[16px] rounded",
30523
30556
  style: { backgroundColor: d.color }
30524
30557
  }
30525
30558
  ),
30526
- /* @__PURE__ */ jsx66("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
30559
+ /* @__PURE__ */ jsx65("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
30527
30560
  ]
30528
30561
  },
30529
30562
  d.name
@@ -30531,24 +30564,24 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30531
30564
  }, [data, showLegends]);
30532
30565
  if (!mounted) return null;
30533
30566
  if (loading || data.length === 0) {
30534
- return /* @__PURE__ */ jsx66(
30567
+ return /* @__PURE__ */ jsx65(
30535
30568
  "div",
30536
30569
  {
30537
30570
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
30538
30571
  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." })
30572
+ 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
30573
  }
30541
30574
  );
30542
30575
  }
30543
- return /* @__PURE__ */ jsxs40(
30576
+ return /* @__PURE__ */ jsxs39(
30544
30577
  "div",
30545
30578
  {
30546
30579
  className: `relative flex flex-col items-center ${className}`,
30547
30580
  style,
30548
30581
  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(
30582
+ /* @__PURE__ */ jsxs39("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
30583
+ /* @__PURE__ */ jsx65(ResponsiveContainer2, { width: "99%", height: "100%", children: /* @__PURE__ */ jsxs39(PieChart, { children: [
30584
+ /* @__PURE__ */ jsxs39(
30552
30585
  Pie,
30553
30586
  {
30554
30587
  data,
@@ -30560,8 +30593,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30560
30593
  labelLine: false,
30561
30594
  isAnimationActive: false,
30562
30595
  children: [
30563
- data.map((entry, index) => /* @__PURE__ */ jsx66(Cell, { fill: entry.color }, `cell-${index}`)),
30564
- /* @__PURE__ */ jsx66(
30596
+ data.map((entry, index) => /* @__PURE__ */ jsx65(Cell, { fill: entry.color }, `cell-${index}`)),
30597
+ /* @__PURE__ */ jsx65(
30565
30598
  LabelList,
30566
30599
  {
30567
30600
  dataKey: "value",
@@ -30574,14 +30607,14 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30574
30607
  ]
30575
30608
  }
30576
30609
  ),
30577
- /* @__PURE__ */ jsx66(
30610
+ /* @__PURE__ */ jsx65(
30578
30611
  Tooltip2,
30579
30612
  {
30580
30613
  formatter: (value, name) => [`${value}k`, name]
30581
30614
  }
30582
30615
  )
30583
30616
  ] }) }),
30584
- /* @__PURE__ */ jsxs40(
30617
+ /* @__PURE__ */ jsxs39(
30585
30618
  "div",
30586
30619
  {
30587
30620
  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 +30625,18 @@ var DonutChart = ({ className, style, loading, ...props }) => {
30592
30625
  }
30593
30626
  )
30594
30627
  ] }),
30595
- /* @__PURE__ */ jsx66("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
30628
+ /* @__PURE__ */ jsx65("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
30596
30629
  ]
30597
30630
  }
30598
30631
  );
30599
30632
  };
30600
- var PieChart_default = React14.memo(DonutChart);
30633
+ var PieChart_default = React13.memo(DonutChart);
30601
30634
 
30602
30635
  // src/components/Blocks/EmailComposer.tsx
30603
- import { jsx as jsx67, jsxs as jsxs41 } from "react/jsx-runtime";
30636
+ import { jsx as jsx66, jsxs as jsxs40 } from "react/jsx-runtime";
30604
30637
  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(
30638
+ 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: [
30639
+ /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30607
30640
  "input",
30608
30641
  {
30609
30642
  type: "email",
@@ -30612,8 +30645,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30612
30645
  required: true
30613
30646
  }
30614
30647
  ) }),
30615
- /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
30616
- /* @__PURE__ */ jsx67(
30648
+ /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
30649
+ /* @__PURE__ */ jsx66(
30617
30650
  "input",
30618
30651
  {
30619
30652
  type: "email",
@@ -30624,7 +30657,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30624
30657
  required: true
30625
30658
  }
30626
30659
  ),
30627
- !showCc && /* @__PURE__ */ jsx67(
30660
+ !showCc && /* @__PURE__ */ jsx66(
30628
30661
  "button",
30629
30662
  {
30630
30663
  onClick: () => setShowCc?.(true),
@@ -30632,7 +30665,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30632
30665
  children: "Cc"
30633
30666
  }
30634
30667
  ),
30635
- !showBcc && /* @__PURE__ */ jsx67(
30668
+ !showBcc && /* @__PURE__ */ jsx66(
30636
30669
  "button",
30637
30670
  {
30638
30671
  onClick: () => setShowBcc?.(true),
@@ -30641,7 +30674,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30641
30674
  }
30642
30675
  )
30643
30676
  ] }) }),
30644
- showCc && /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30677
+ showCc && /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30645
30678
  "input",
30646
30679
  {
30647
30680
  type: "text",
@@ -30651,7 +30684,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30651
30684
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
30652
30685
  }
30653
30686
  ) }),
30654
- showBcc && /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30687
+ showBcc && /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30655
30688
  "input",
30656
30689
  {
30657
30690
  type: "text",
@@ -30661,7 +30694,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30661
30694
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
30662
30695
  }
30663
30696
  ) }),
30664
- /* @__PURE__ */ jsx67("div", { className: "mb-3", children: /* @__PURE__ */ jsx67(
30697
+ /* @__PURE__ */ jsx66("div", { className: "mb-3", children: /* @__PURE__ */ jsx66(
30665
30698
  "input",
30666
30699
  {
30667
30700
  type: "text",
@@ -30671,11 +30704,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
30671
30704
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
30672
30705
  }
30673
30706
  ) }),
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" })
30707
+ /* @__PURE__ */ jsx66("div", { className: "mb-4", children: /* @__PURE__ */ jsx66(MyEditor, { value: body, onChange: setBody }) }),
30708
+ /* @__PURE__ */ jsxs40("div", { className: "flex justify-end gap-2", children: [
30709
+ /* @__PURE__ */ jsx66("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
30710
+ /* @__PURE__ */ jsx66("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
30711
+ /* @__PURE__ */ jsx66("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
30679
30712
  ] })
30680
30713
  ] }) });
30681
30714
  }
@@ -30720,10 +30753,10 @@ function showSonnerToast({
30720
30753
  // src/components/ui/sonner.tsx
30721
30754
  import { useTheme } from "next-themes";
30722
30755
  import { Toaster as Sonner } from "sonner";
30723
- import { jsx as jsx68 } from "react/jsx-runtime";
30756
+ import { jsx as jsx67 } from "react/jsx-runtime";
30724
30757
  var Toaster = ({ ...props }) => {
30725
30758
  const { theme = "system" } = useTheme();
30726
- return /* @__PURE__ */ jsx68(
30759
+ return /* @__PURE__ */ jsx67(
30727
30760
  Sonner,
30728
30761
  {
30729
30762
  theme,
@@ -30758,7 +30791,7 @@ export {
30758
30791
  Image_default as Image,
30759
30792
  Modal,
30760
30793
  MultiCheckbox_default as MultiCheckbox,
30761
- MultiSelect_default as MultiSelect,
30794
+ LazyMultiSelectDropdown as MultiSelect,
30762
30795
  Navbar,
30763
30796
  NumberInput_default as NumberInput,
30764
30797
  Pagination_default as Pagination,