nexoreui 0.1.0 → 0.1.2

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
@@ -1896,46 +1896,66 @@ function ShimmerBlock({ className }) {
1896
1896
  // src/components/special-modals.tsx
1897
1897
  import { AlertTriangle as AlertTriangle3, CheckCircle as CheckCircle3 } from "lucide-react";
1898
1898
  import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
1899
- function GlassModal({ trigger, title, description, children, open, onOpenChange }) {
1899
+ function GlassModal({ trigger, title = "Glass Modal", description, children, open, onOpenChange }) {
1900
1900
  return /* @__PURE__ */ jsxs22(Dialog, { open, onOpenChange, children: [
1901
- /* @__PURE__ */ jsx26(DialogTrigger, { asChild: true, children: trigger }),
1901
+ trigger && /* @__PURE__ */ jsx26(DialogTrigger, { asChild: true, children: trigger }),
1902
1902
  /* @__PURE__ */ jsxs22(DialogContent, { className: "bg-white/10 backdrop-blur-xl border-white/20 shadow-2xl sm:max-w-[425px]", children: [
1903
1903
  /* @__PURE__ */ jsxs22(DialogHeader, { children: [
1904
- /* @__PURE__ */ jsx26(DialogTitle, { className: "text-foreground", children: title }),
1904
+ title && /* @__PURE__ */ jsx26(DialogTitle, { className: "text-foreground", children: title }),
1905
1905
  description && /* @__PURE__ */ jsx26(DialogDescription, { className: "text-muted-foreground", children: description })
1906
1906
  ] }),
1907
1907
  children
1908
1908
  ] })
1909
1909
  ] });
1910
1910
  }
1911
- function AlertModal({ trigger, title, description, onConfirm, children, open, onOpenChange }) {
1911
+ function AlertModal({
1912
+ trigger,
1913
+ title = "Are you absolutely sure?",
1914
+ description,
1915
+ onConfirm,
1916
+ onCancel,
1917
+ confirmText = "Confirm",
1918
+ cancelText = "Cancel",
1919
+ children,
1920
+ open,
1921
+ onOpenChange
1922
+ }) {
1912
1923
  return /* @__PURE__ */ jsxs22(Dialog, { open, onOpenChange, children: [
1913
- /* @__PURE__ */ jsx26(DialogTrigger, { asChild: true, children: trigger }),
1924
+ trigger && /* @__PURE__ */ jsx26(DialogTrigger, { asChild: true, children: trigger }),
1914
1925
  /* @__PURE__ */ jsxs22(DialogContent, { className: "sm:max-w-[400px] border-destructive/20", children: [
1915
1926
  /* @__PURE__ */ jsxs22(DialogHeader, { className: "flex flex-col items-center text-center sm:text-center", children: [
1916
1927
  /* @__PURE__ */ jsx26("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10 mb-4", children: /* @__PURE__ */ jsx26(AlertTriangle3, { className: "h-6 w-6 text-destructive" }) }),
1917
- /* @__PURE__ */ jsx26(DialogTitle, { className: "text-xl", children: title }),
1928
+ title && /* @__PURE__ */ jsx26(DialogTitle, { className: "text-xl", children: title }),
1918
1929
  description && /* @__PURE__ */ jsx26(DialogDescription, { children: description })
1919
1930
  ] }),
1920
1931
  children,
1921
1932
  /* @__PURE__ */ jsxs22(DialogFooter, { className: "sm:justify-center flex-col sm:flex-row gap-2", children: [
1922
- /* @__PURE__ */ jsx26(Button, { variant: "outline", className: "w-full sm:w-auto", children: "Cancel" }),
1923
- /* @__PURE__ */ jsx26(Button, { variant: "destructive", onClick: onConfirm, className: "w-full sm:w-auto", children: "Confirm" })
1933
+ /* @__PURE__ */ jsx26(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx26(Button, { variant: "outline", className: "w-full sm:w-auto", onClick: onCancel, children: cancelText }) }),
1934
+ /* @__PURE__ */ jsx26(Button, { variant: "destructive", onClick: onConfirm, className: "w-full sm:w-auto", children: confirmText })
1924
1935
  ] })
1925
1936
  ] })
1926
1937
  ] });
1927
1938
  }
1928
- function SuccessModal({ trigger, title, description, children, open, onOpenChange }) {
1939
+ function SuccessModal({
1940
+ trigger,
1941
+ title = "Success!",
1942
+ description,
1943
+ children,
1944
+ open,
1945
+ onOpenChange,
1946
+ confirmText = "Awesome",
1947
+ onConfirm
1948
+ }) {
1929
1949
  return /* @__PURE__ */ jsxs22(Dialog, { open, onOpenChange, children: [
1930
- /* @__PURE__ */ jsx26(DialogTrigger, { asChild: true, children: trigger }),
1950
+ trigger && /* @__PURE__ */ jsx26(DialogTrigger, { asChild: true, children: trigger }),
1931
1951
  /* @__PURE__ */ jsxs22(DialogContent, { className: "sm:max-w-[400px] border-green-500/20", children: [
1932
1952
  /* @__PURE__ */ jsxs22(DialogHeader, { className: "flex flex-col items-center text-center sm:text-center", children: [
1933
1953
  /* @__PURE__ */ jsx26("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-500/10 mb-4", children: /* @__PURE__ */ jsx26(CheckCircle3, { className: "h-6 w-6 text-green-500" }) }),
1934
- /* @__PURE__ */ jsx26(DialogTitle, { className: "text-xl", children: title }),
1954
+ title && /* @__PURE__ */ jsx26(DialogTitle, { className: "text-xl", children: title }),
1935
1955
  description && /* @__PURE__ */ jsx26(DialogDescription, { children: description })
1936
1956
  ] }),
1937
1957
  children,
1938
- /* @__PURE__ */ jsx26(DialogFooter, { className: "sm:justify-center", children: /* @__PURE__ */ jsx26(Button, { className: "w-full sm:w-auto bg-green-500 hover:bg-green-600", children: "Awesome" }) })
1958
+ /* @__PURE__ */ jsx26(DialogFooter, { className: "sm:justify-center", children: /* @__PURE__ */ jsx26(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx26(Button, { className: "w-full sm:w-auto bg-green-500 hover:bg-green-600", onClick: onConfirm, children: confirmText }) }) })
1939
1959
  ] })
1940
1960
  ] });
1941
1961
  }
@@ -4668,11 +4688,16 @@ import * as React23 from "react";
4668
4688
  import { Check as Check11, ChevronDown as ChevronDown5, X as X8, Info as Info3, HelpCircle, Star as Star5 } from "lucide-react";
4669
4689
  import { motion as motion24, AnimatePresence as AnimatePresence4 } from "framer-motion";
4670
4690
  import { Fragment as Fragment5, jsx as jsx54, jsxs as jsxs49 } from "react/jsx-runtime";
4671
- var SimpleAccordion = () => {
4672
- const [open, setOpen] = React23.useState(false);
4673
- return /* @__PURE__ */ jsxs49("div", { className: "w-full max-w-md border rounded-xl overflow-hidden bg-card/50 backdrop-blur-sm border-border/50", children: [
4691
+ var SimpleAccordion = ({
4692
+ title = "Is this library free?",
4693
+ children = "Yes, it is completely free and open source.",
4694
+ defaultOpen = false,
4695
+ className = ""
4696
+ }) => {
4697
+ const [open, setOpen] = React23.useState(defaultOpen);
4698
+ return /* @__PURE__ */ jsxs49("div", { className: `w-full max-w-md border rounded-xl overflow-hidden bg-card/50 backdrop-blur-sm border-border/50 ${className}`, children: [
4674
4699
  /* @__PURE__ */ jsxs49("button", { onClick: () => setOpen(!open), className: "w-full p-4 flex justify-between items-center hover:bg-muted/50 transition-colors font-medium", children: [
4675
- /* @__PURE__ */ jsx54("span", { children: "Is this library free?" }),
4700
+ /* @__PURE__ */ jsx54("span", { children: title }),
4676
4701
  /* @__PURE__ */ jsx54(ChevronDown5, { className: `w-4 h-4 transition-transform duration-300 ${open ? "rotate-180" : ""}` })
4677
4702
  ] }),
4678
4703
  /* @__PURE__ */ jsx54(AnimatePresence4, { children: open && /* @__PURE__ */ jsx54(
@@ -4683,16 +4708,21 @@ var SimpleAccordion = () => {
4683
4708
  exit: { height: 0, opacity: 0 },
4684
4709
  transition: { duration: 0.3, ease: "easeInOut" },
4685
4710
  className: "overflow-hidden",
4686
- children: /* @__PURE__ */ jsx54("div", { className: "p-4 pt-0 text-sm text-muted-foreground border-t border-border/50 mt-2 pt-2", children: "Yes, it is completely free and open source." })
4711
+ children: /* @__PURE__ */ jsx54("div", { className: "p-4 pt-0 text-sm text-muted-foreground border-t border-border/50 mt-2 pt-2", children })
4687
4712
  }
4688
4713
  ) })
4689
4714
  ] });
4690
4715
  };
4691
- var PlusAccordion = () => {
4692
- const [open, setOpen] = React23.useState(false);
4693
- return /* @__PURE__ */ jsxs49("div", { className: "w-full max-w-md border-b border-border/50", children: [
4716
+ var PlusAccordion = ({
4717
+ title = "How do I install it?",
4718
+ children = "You can install it via pnpm, npm, or yarn using the CLI.",
4719
+ defaultOpen = false,
4720
+ className = ""
4721
+ }) => {
4722
+ const [open, setOpen] = React23.useState(defaultOpen);
4723
+ return /* @__PURE__ */ jsxs49("div", { className: `w-full max-w-md border-b border-border/50 ${className}`, children: [
4694
4724
  /* @__PURE__ */ jsxs49("button", { onClick: () => setOpen(!open), className: "w-full py-4 flex justify-between items-center font-medium hover:text-primary transition-colors", children: [
4695
- /* @__PURE__ */ jsx54("span", { children: "How do I install it?" }),
4725
+ /* @__PURE__ */ jsx54("span", { children: title }),
4696
4726
  /* @__PURE__ */ jsxs49("div", { className: "relative w-4 h-4 flex items-center justify-center", children: [
4697
4727
  /* @__PURE__ */ jsx54("div", { className: "absolute w-4 h-0.5 bg-current rounded-full" }),
4698
4728
  /* @__PURE__ */ jsx54("div", { className: `absolute w-0.5 h-4 bg-current rounded-full transition-transform duration-300 ${open ? "rotate-90" : ""}` })
@@ -4706,16 +4736,21 @@ var PlusAccordion = () => {
4706
4736
  exit: { height: 0, opacity: 0 },
4707
4737
  transition: { duration: 0.3, ease: "easeInOut" },
4708
4738
  className: "overflow-hidden",
4709
- children: /* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground pb-4", children: "You can install it via pnpm, npm, or yarn using the CLI." })
4739
+ children: /* @__PURE__ */ jsx54("div", { className: "text-sm text-muted-foreground pb-4", children })
4710
4740
  }
4711
4741
  ) })
4712
4742
  ] });
4713
4743
  };
4714
- var NeonAccordion = () => {
4715
- const [open, setOpen] = React23.useState(false);
4716
- return /* @__PURE__ */ jsxs49("div", { className: `w-full max-w-md border rounded-xl overflow-hidden bg-black transition-all duration-300 ${open ? "border-cyan-500 shadow-[0_0_15px_rgba(6,182,212,0.3)]" : "border-neutral-800"}`, children: [
4744
+ var NeonAccordion = ({
4745
+ title = "Premium Features",
4746
+ children = "Access to exclusive animated components and premium layouts.",
4747
+ defaultOpen = false,
4748
+ className = ""
4749
+ }) => {
4750
+ const [open, setOpen] = React23.useState(defaultOpen);
4751
+ return /* @__PURE__ */ jsxs49("div", { className: `w-full max-w-md border rounded-xl overflow-hidden bg-black transition-all duration-300 ${open ? "border-cyan-500 shadow-[0_0_15px_rgba(6,182,212,0.3)]" : "border-neutral-800"} ${className}`, children: [
4717
4752
  /* @__PURE__ */ jsxs49("button", { onClick: () => setOpen(!open), className: "w-full p-4 flex justify-between items-center font-medium text-white", children: [
4718
- /* @__PURE__ */ jsx54("span", { className: open ? "text-cyan-400" : "text-white", children: "Premium Features" }),
4753
+ /* @__PURE__ */ jsx54("span", { className: open ? "text-cyan-400" : "text-white", children: title }),
4719
4754
  /* @__PURE__ */ jsx54(ChevronDown5, { className: `w-4 h-4 transition-transform duration-300 ${open ? "rotate-180 text-cyan-400" : "text-white"}` })
4720
4755
  ] }),
4721
4756
  /* @__PURE__ */ jsx54(AnimatePresence4, { children: open && /* @__PURE__ */ jsx54(
@@ -4726,15 +4761,40 @@ var NeonAccordion = () => {
4726
4761
  exit: { height: 0, opacity: 0 },
4727
4762
  transition: { duration: 0.3, ease: "easeInOut" },
4728
4763
  className: "overflow-hidden",
4729
- children: /* @__PURE__ */ jsx54("div", { className: "p-4 pt-0 text-sm text-neutral-400 border-t border-neutral-800 mt-2 pt-2", children: "Access to exclusive animated components and premium layouts." })
4764
+ children: /* @__PURE__ */ jsx54("div", { className: "p-4 pt-0 text-sm text-neutral-400 border-t border-neutral-800 mt-2 pt-2", children })
4730
4765
  }
4731
4766
  ) })
4732
4767
  ] });
4733
4768
  };
4734
- var BasicModal = () => {
4735
- const [open, setOpen] = React23.useState(false);
4769
+ var BasicModal = ({
4770
+ isOpen: externalOpen,
4771
+ onOpenChange,
4772
+ trigger,
4773
+ title = "Basic Modal",
4774
+ description = "This is a simple modal dialog that can be used for various purposes.",
4775
+ children,
4776
+ confirmText = "Confirm",
4777
+ cancelText = "Cancel",
4778
+ onConfirm,
4779
+ onCancel,
4780
+ className = ""
4781
+ }) => {
4782
+ const [localOpen, setLocalOpen] = React23.useState(false);
4783
+ const open = externalOpen !== void 0 ? externalOpen : localOpen;
4784
+ const setOpen = (val) => {
4785
+ if (onOpenChange) onOpenChange(val);
4786
+ setLocalOpen(val);
4787
+ };
4788
+ const handleConfirm = () => {
4789
+ if (onConfirm) onConfirm();
4790
+ setOpen(false);
4791
+ };
4792
+ const handleCancel = () => {
4793
+ if (onCancel) onCancel();
4794
+ setOpen(false);
4795
+ };
4736
4796
  return /* @__PURE__ */ jsxs49(Fragment5, { children: [
4737
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(true), className: "px-4 py-2 bg-primary text-primary-foreground rounded-lg font-medium hover:opacity-90 transition-opacity", children: "Open Basic Modal" }),
4797
+ trigger ? /* @__PURE__ */ jsx54("span", { onClick: () => setOpen(true), className: "cursor-pointer inline-block", children: trigger }) : /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(true), className: "px-4 py-2 bg-primary text-primary-foreground rounded-lg font-medium hover:opacity-90 transition-opacity", children: "Open Basic Modal" }),
4738
4798
  /* @__PURE__ */ jsx54(AnimatePresence4, { children: open && /* @__PURE__ */ jsxs49("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
4739
4799
  /* @__PURE__ */ jsx54(
4740
4800
  motion24.div,
@@ -4742,7 +4802,7 @@ var BasicModal = () => {
4742
4802
  initial: { opacity: 0 },
4743
4803
  animate: { opacity: 1 },
4744
4804
  exit: { opacity: 0 },
4745
- onClick: () => setOpen(false),
4805
+ onClick: handleCancel,
4746
4806
  className: "fixed inset-0 bg-black/60 backdrop-blur-sm"
4747
4807
  }
4748
4808
  ),
@@ -4753,14 +4813,15 @@ var BasicModal = () => {
4753
4813
  animate: { scale: 1, opacity: 1 },
4754
4814
  exit: { scale: 0.95, opacity: 0 },
4755
4815
  transition: { type: "spring", damping: 20, stiffness: 300 },
4756
- className: "bg-background rounded-2xl shadow-xl w-full max-w-md p-6 relative z-10 border border-border/50",
4816
+ className: `bg-background rounded-2xl shadow-xl w-full max-w-md p-6 relative z-10 border border-border/50 ${className}`,
4757
4817
  children: [
4758
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "absolute top-4 right-4 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ jsx54(X8, { className: "w-4 h-4" }) }),
4759
- /* @__PURE__ */ jsx54("h3", { className: "font-bold text-lg mb-2", children: "Basic Modal" }),
4760
- /* @__PURE__ */ jsx54("p", { className: "text-muted-foreground text-sm mb-6", children: "This is a simple modal dialog that can be used for various purposes." }),
4818
+ /* @__PURE__ */ jsx54("button", { onClick: handleCancel, className: "absolute top-4 right-4 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ jsx54(X8, { className: "w-4 h-4" }) }),
4819
+ title && /* @__PURE__ */ jsx54("h3", { className: "font-bold text-lg mb-2", children: title }),
4820
+ description && /* @__PURE__ */ jsx54("p", { className: "text-muted-foreground text-sm mb-6", children: description }),
4821
+ children && /* @__PURE__ */ jsx54("div", { className: "mb-6", children }),
4761
4822
  /* @__PURE__ */ jsxs49("div", { className: "flex justify-end gap-2", children: [
4762
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "px-4 py-2 hover:bg-muted rounded-lg text-sm font-medium transition-colors", children: "Cancel" }),
4763
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "px-4 py-2 bg-primary text-primary-foreground rounded-lg text-sm font-medium hover:opacity-90 transition-opacity", children: "Confirm" })
4823
+ cancelText && /* @__PURE__ */ jsx54("button", { onClick: handleCancel, className: "px-4 py-2 hover:bg-muted rounded-lg text-sm font-medium transition-colors", children: cancelText }),
4824
+ confirmText && /* @__PURE__ */ jsx54("button", { onClick: handleConfirm, className: "px-4 py-2 bg-primary text-primary-foreground rounded-lg text-sm font-medium hover:opacity-90 transition-opacity", children: confirmText })
4764
4825
  ] })
4765
4826
  ]
4766
4827
  }
@@ -4768,10 +4829,36 @@ var BasicModal = () => {
4768
4829
  ] }) })
4769
4830
  ] });
4770
4831
  };
4771
- var InteractiveGlassModal = () => {
4772
- const [open, setOpen] = React23.useState(false);
4832
+ var InteractiveGlassModal = ({
4833
+ isOpen: externalOpen,
4834
+ onOpenChange,
4835
+ trigger,
4836
+ icon = /* @__PURE__ */ jsx54(Star5, { className: "w-6 h-6 text-yellow-300" }),
4837
+ title = "Premium Glass Effect",
4838
+ description = "This modal uses full glassmorphism for a stunning visual effect.",
4839
+ children,
4840
+ confirmText = "Upgrade Now",
4841
+ cancelText = "Maybe Later",
4842
+ onConfirm,
4843
+ onCancel,
4844
+ className = ""
4845
+ }) => {
4846
+ const [localOpen, setLocalOpen] = React23.useState(false);
4847
+ const open = externalOpen !== void 0 ? externalOpen : localOpen;
4848
+ const setOpen = (val) => {
4849
+ if (onOpenChange) onOpenChange(val);
4850
+ setLocalOpen(val);
4851
+ };
4852
+ const handleConfirm = () => {
4853
+ if (onConfirm) onConfirm();
4854
+ setOpen(false);
4855
+ };
4856
+ const handleCancel = () => {
4857
+ if (onCancel) onCancel();
4858
+ setOpen(false);
4859
+ };
4773
4860
  return /* @__PURE__ */ jsxs49(Fragment5, { children: [
4774
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(true), className: "px-4 py-2 bg-white/10 backdrop-blur-md border border-white/20 rounded-lg font-medium hover:bg-white/20 transition-colors", children: "Open Glass Modal" }),
4861
+ trigger ? /* @__PURE__ */ jsx54("span", { onClick: () => setOpen(true), className: "cursor-pointer inline-block", children: trigger }) : /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(true), className: "px-4 py-2 bg-white/10 backdrop-blur-md border border-white/20 rounded-lg font-medium hover:bg-white/20 transition-colors", children: "Open Glass Modal" }),
4775
4862
  /* @__PURE__ */ jsx54(AnimatePresence4, { children: open && /* @__PURE__ */ jsxs49("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
4776
4863
  /* @__PURE__ */ jsx54(
4777
4864
  motion24.div,
@@ -4779,7 +4866,7 @@ var InteractiveGlassModal = () => {
4779
4866
  initial: { opacity: 0 },
4780
4867
  animate: { opacity: 1 },
4781
4868
  exit: { opacity: 0 },
4782
- onClick: () => setOpen(false),
4869
+ onClick: handleCancel,
4783
4870
  className: "fixed inset-0 bg-black/40 backdrop-blur-md"
4784
4871
  }
4785
4872
  ),
@@ -4790,15 +4877,16 @@ var InteractiveGlassModal = () => {
4790
4877
  animate: { y: 0, opacity: 1 },
4791
4878
  exit: { y: 20, opacity: 0 },
4792
4879
  transition: { type: "spring", damping: 25, stiffness: 400 },
4793
- className: "bg-white/10 backdrop-blur-xl rounded-2xl shadow-2xl w-full max-w-md p-6 relative z-10 border border-white/20 text-white",
4880
+ className: `bg-white/10 backdrop-blur-xl rounded-2xl shadow-2xl w-full max-w-md p-6 relative z-10 border border-white/20 text-white ${className}`,
4794
4881
  children: [
4795
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "absolute top-4 right-4 text-white/60 hover:text-white transition-colors", children: /* @__PURE__ */ jsx54(X8, { className: "w-4 h-4" }) }),
4796
- /* @__PURE__ */ jsx54("div", { className: "w-12 h-12 bg-white/10 rounded-full flex items-center justify-center mb-4 border border-white/20", children: /* @__PURE__ */ jsx54(Star5, { className: "w-6 h-6 text-yellow-300" }) }),
4797
- /* @__PURE__ */ jsx54("h3", { className: "font-bold text-xl mb-2", children: "Premium Glass Effect" }),
4798
- /* @__PURE__ */ jsx54("p", { className: "text-white/70 text-sm mb-6", children: "This modal uses full glassmorphism for a stunning visual effect." }),
4882
+ /* @__PURE__ */ jsx54("button", { onClick: handleCancel, className: "absolute top-4 right-4 text-white/60 hover:text-white transition-colors", children: /* @__PURE__ */ jsx54(X8, { className: "w-4 h-4" }) }),
4883
+ icon && /* @__PURE__ */ jsx54("div", { className: "w-12 h-12 bg-white/10 rounded-full flex items-center justify-center mb-4 border border-white/20", children: icon }),
4884
+ title && /* @__PURE__ */ jsx54("h3", { className: "font-bold text-xl mb-2", children: title }),
4885
+ description && /* @__PURE__ */ jsx54("p", { className: "text-white/70 text-sm mb-6", children: description }),
4886
+ children && /* @__PURE__ */ jsx54("div", { className: "mb-6", children }),
4799
4887
  /* @__PURE__ */ jsxs49("div", { className: "flex justify-end gap-2", children: [
4800
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "px-4 py-2 hover:bg-white/5 rounded-lg text-sm font-medium transition-colors", children: "Maybe Later" }),
4801
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "px-4 py-2 bg-white text-black rounded-lg text-sm font-medium hover:bg-white/90 transition-colors", children: "Upgrade Now" })
4888
+ cancelText && /* @__PURE__ */ jsx54("button", { onClick: handleCancel, className: "px-4 py-2 hover:bg-white/5 rounded-lg text-sm font-medium transition-colors", children: cancelText }),
4889
+ confirmText && /* @__PURE__ */ jsx54("button", { onClick: handleConfirm, className: "px-4 py-2 bg-white text-black rounded-lg text-sm font-medium hover:bg-white/90 transition-colors", children: confirmText })
4802
4890
  ] })
4803
4891
  ]
4804
4892
  }
@@ -4806,10 +4894,36 @@ var InteractiveGlassModal = () => {
4806
4894
  ] }) })
4807
4895
  ] });
4808
4896
  };
4809
- var DangerModal = () => {
4810
- const [open, setOpen] = React23.useState(false);
4897
+ var DangerModal = ({
4898
+ isOpen: externalOpen,
4899
+ onOpenChange,
4900
+ trigger,
4901
+ icon = /* @__PURE__ */ jsx54(X8, { className: "w-8 h-8" }),
4902
+ title = "Are you absolutely sure?",
4903
+ description = "This action cannot be undone. This will permanently delete your account and remove your data from our servers.",
4904
+ children,
4905
+ confirmText = "Delete",
4906
+ cancelText = "Cancel",
4907
+ onConfirm,
4908
+ onCancel,
4909
+ className = ""
4910
+ }) => {
4911
+ const [localOpen, setLocalOpen] = React23.useState(false);
4912
+ const open = externalOpen !== void 0 ? externalOpen : localOpen;
4913
+ const setOpen = (val) => {
4914
+ if (onOpenChange) onOpenChange(val);
4915
+ setLocalOpen(val);
4916
+ };
4917
+ const handleConfirm = () => {
4918
+ if (onConfirm) onConfirm();
4919
+ setOpen(false);
4920
+ };
4921
+ const handleCancel = () => {
4922
+ if (onCancel) onCancel();
4923
+ setOpen(false);
4924
+ };
4811
4925
  return /* @__PURE__ */ jsxs49(Fragment5, { children: [
4812
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(true), className: "px-4 py-2 bg-destructive text-destructive-foreground rounded-lg font-medium hover:opacity-90 transition-opacity", children: "Delete Account" }),
4926
+ trigger ? /* @__PURE__ */ jsx54("span", { onClick: () => setOpen(true), className: "cursor-pointer inline-block", children: trigger }) : /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(true), className: "px-4 py-2 bg-destructive text-destructive-foreground rounded-lg font-medium hover:opacity-90 transition-opacity", children: "Delete Account" }),
4813
4927
  /* @__PURE__ */ jsx54(AnimatePresence4, { children: open && /* @__PURE__ */ jsxs49("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
4814
4928
  /* @__PURE__ */ jsx54(
4815
4929
  motion24.div,
@@ -4817,7 +4931,7 @@ var DangerModal = () => {
4817
4931
  initial: { opacity: 0 },
4818
4932
  animate: { opacity: 1 },
4819
4933
  exit: { opacity: 0 },
4820
- onClick: () => setOpen(false),
4934
+ onClick: handleCancel,
4821
4935
  className: "fixed inset-0 bg-black/60 backdrop-blur-sm"
4822
4936
  }
4823
4937
  ),
@@ -4828,16 +4942,17 @@ var DangerModal = () => {
4828
4942
  animate: { rotate: 0, scale: 1, opacity: 1 },
4829
4943
  exit: { rotate: -5, scale: 0.9, opacity: 0 },
4830
4944
  transition: { type: "spring", damping: 20, stiffness: 300 },
4831
- className: "bg-background rounded-2xl shadow-xl w-full max-w-md overflow-hidden relative z-10 border border-destructive/20",
4945
+ className: `bg-background rounded-2xl shadow-xl w-full max-w-md overflow-hidden relative z-10 border border-destructive/20 ${className}`,
4832
4946
  children: [
4833
4947
  /* @__PURE__ */ jsxs49("div", { className: "p-6 text-center", children: [
4834
- /* @__PURE__ */ jsx54("div", { className: "w-16 h-16 bg-destructive/10 text-destructive rounded-full flex items-center justify-center mx-auto mb-4", children: /* @__PURE__ */ jsx54(X8, { className: "w-8 h-8" }) }),
4835
- /* @__PURE__ */ jsx54("h3", { className: "font-bold text-xl mb-2", children: "Are you absolutely sure?" }),
4836
- /* @__PURE__ */ jsx54("p", { className: "text-muted-foreground text-sm", children: "This action cannot be undone. This will permanently delete your account and remove your data from our servers." })
4948
+ icon && /* @__PURE__ */ jsx54("div", { className: "w-16 h-16 bg-destructive/10 text-destructive rounded-full flex items-center justify-center mx-auto mb-4", children: icon }),
4949
+ title && /* @__PURE__ */ jsx54("h3", { className: "font-bold text-xl mb-2", children: title }),
4950
+ description && /* @__PURE__ */ jsx54("p", { className: "text-muted-foreground text-sm", children: description }),
4951
+ children && /* @__PURE__ */ jsx54("div", { className: "mt-4", children })
4837
4952
  ] }),
4838
4953
  /* @__PURE__ */ jsxs49("div", { className: "flex border-t border-border/50 bg-muted/50", children: [
4839
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "flex-1 py-3 font-medium hover:bg-muted transition-colors border-r border-border/50", children: "Cancel" }),
4840
- /* @__PURE__ */ jsx54("button", { onClick: () => setOpen(false), className: "flex-1 py-3 font-medium text-destructive hover:bg-destructive/10 transition-colors", children: "Delete" })
4954
+ cancelText && /* @__PURE__ */ jsx54("button", { onClick: handleCancel, className: "flex-1 py-3 font-medium hover:bg-muted transition-colors border-r border-border/50", children: cancelText }),
4955
+ confirmText && /* @__PURE__ */ jsx54("button", { onClick: handleConfirm, className: "flex-1 py-3 font-medium text-destructive hover:bg-destructive/10 transition-colors", children: confirmText })
4841
4956
  ] })
4842
4957
  ]
4843
4958
  }
@@ -6609,7 +6724,13 @@ function MusicPlayer({ title, artist, album, className }) {
6609
6724
  ] })
6610
6725
  ] });
6611
6726
  }
6612
- function ImageCompare({ leftLabel = "Before", rightLabel = "After", className }) {
6727
+ function ImageCompare({
6728
+ leftImage,
6729
+ rightImage,
6730
+ leftLabel = "Before",
6731
+ rightLabel = "After",
6732
+ className
6733
+ }) {
6613
6734
  const [position, setPosition] = React30.useState(50);
6614
6735
  const containerRef = React30.useRef(null);
6615
6736
  const handleMove = (e) => {
@@ -6618,15 +6739,38 @@ function ImageCompare({ leftLabel = "Before", rightLabel = "After", className })
6618
6739
  const x = (e.clientX - rect.left) / rect.width * 100;
6619
6740
  setPosition(Math.max(0, Math.min(100, x)));
6620
6741
  };
6742
+ const handleTouchMove = (e) => {
6743
+ if (!containerRef.current) return;
6744
+ const rect = containerRef.current.getBoundingClientRect();
6745
+ if (e.touches[0]) {
6746
+ const x = (e.touches[0].clientX - rect.left) / rect.width * 100;
6747
+ setPosition(Math.max(0, Math.min(100, x)));
6748
+ }
6749
+ };
6621
6750
  return /* @__PURE__ */ jsxs57(
6622
6751
  "div",
6623
6752
  {
6624
6753
  ref: containerRef,
6625
6754
  className: cn("relative aspect-video rounded-xl overflow-hidden cursor-col-resize select-none", className),
6626
6755
  onMouseMove: handleMove,
6756
+ onTouchMove: handleTouchMove,
6627
6757
  children: [
6628
- /* @__PURE__ */ jsx62("div", { className: "absolute inset-0 bg-gradient-to-br from-slate-600 to-slate-800" }),
6629
- /* @__PURE__ */ jsx62("div", { className: "absolute inset-0 bg-gradient-to-br from-violet-500 to-pink-500", style: { clipPath: `inset(0 ${100 - position}% 0 0)` } }),
6758
+ rightImage ? /* @__PURE__ */ jsx62("img", { src: rightImage, alt: rightLabel, className: "absolute inset-0 w-full h-full object-cover" }) : /* @__PURE__ */ jsx62("div", { className: "absolute inset-0 bg-gradient-to-br from-slate-600 to-slate-800" }),
6759
+ leftImage ? /* @__PURE__ */ jsx62(
6760
+ "img",
6761
+ {
6762
+ src: leftImage,
6763
+ alt: leftLabel,
6764
+ className: "absolute inset-0 w-full h-full object-cover",
6765
+ style: { clipPath: `inset(0 ${100 - position}% 0 0)` }
6766
+ }
6767
+ ) : /* @__PURE__ */ jsx62(
6768
+ "div",
6769
+ {
6770
+ className: "absolute inset-0 bg-gradient-to-br from-violet-500 to-pink-500",
6771
+ style: { clipPath: `inset(0 ${100 - position}% 0 0)` }
6772
+ }
6773
+ ),
6630
6774
  /* @__PURE__ */ jsxs57("div", { className: "absolute top-0 bottom-0", style: { left: `${position}%` }, children: [
6631
6775
  /* @__PURE__ */ jsx62("div", { className: "absolute top-0 bottom-0 w-0.5 bg-white shadow-lg -translate-x-1/2" }),
6632
6776
  /* @__PURE__ */ jsx62("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-8 h-8 rounded-full bg-white shadow-lg flex items-center justify-center", children: /* @__PURE__ */ jsx62("svg", { className: "w-4 h-4 text-slate-700", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx62("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 9l4-4 4 4m0 6l-4 4-4-4" }) }) })