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.d.mts +78 -19
- package/dist/index.d.ts +78 -19
- package/dist/index.js +205 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +205 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -4
- package/postinstall.js +50 -0
package/dist/index.js
CHANGED
|
@@ -2416,46 +2416,66 @@ function ShimmerBlock({ className }) {
|
|
|
2416
2416
|
// src/components/special-modals.tsx
|
|
2417
2417
|
var import_lucide_react9 = require("lucide-react");
|
|
2418
2418
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2419
|
-
function GlassModal({ trigger, title, description, children, open, onOpenChange }) {
|
|
2419
|
+
function GlassModal({ trigger, title = "Glass Modal", description, children, open, onOpenChange }) {
|
|
2420
2420
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Dialog, { open, onOpenChange, children: [
|
|
2421
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTrigger, { asChild: true, children: trigger }),
|
|
2421
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTrigger, { asChild: true, children: trigger }),
|
|
2422
2422
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogContent, { className: "bg-white/10 backdrop-blur-xl border-white/20 shadow-2xl sm:max-w-[425px]", children: [
|
|
2423
2423
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogHeader, { children: [
|
|
2424
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "text-foreground", children: title }),
|
|
2424
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "text-foreground", children: title }),
|
|
2425
2425
|
description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogDescription, { className: "text-muted-foreground", children: description })
|
|
2426
2426
|
] }),
|
|
2427
2427
|
children
|
|
2428
2428
|
] })
|
|
2429
2429
|
] });
|
|
2430
2430
|
}
|
|
2431
|
-
function AlertModal({
|
|
2431
|
+
function AlertModal({
|
|
2432
|
+
trigger,
|
|
2433
|
+
title = "Are you absolutely sure?",
|
|
2434
|
+
description,
|
|
2435
|
+
onConfirm,
|
|
2436
|
+
onCancel,
|
|
2437
|
+
confirmText = "Confirm",
|
|
2438
|
+
cancelText = "Cancel",
|
|
2439
|
+
children,
|
|
2440
|
+
open,
|
|
2441
|
+
onOpenChange
|
|
2442
|
+
}) {
|
|
2432
2443
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Dialog, { open, onOpenChange, children: [
|
|
2433
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTrigger, { asChild: true, children: trigger }),
|
|
2444
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTrigger, { asChild: true, children: trigger }),
|
|
2434
2445
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogContent, { className: "sm:max-w-[400px] border-destructive/20", children: [
|
|
2435
2446
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogHeader, { className: "flex flex-col items-center text-center sm:text-center", children: [
|
|
2436
2447
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.AlertTriangle, { className: "h-6 w-6 text-destructive" }) }),
|
|
2437
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "text-xl", children: title }),
|
|
2448
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "text-xl", children: title }),
|
|
2438
2449
|
description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogDescription, { children: description })
|
|
2439
2450
|
] }),
|
|
2440
2451
|
children,
|
|
2441
2452
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogFooter, { className: "sm:justify-center flex-col sm:flex-row gap-2", children: [
|
|
2442
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "outline", className: "w-full sm:w-auto", children:
|
|
2443
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "destructive", onClick: onConfirm, className: "w-full sm:w-auto", children:
|
|
2453
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "outline", className: "w-full sm:w-auto", onClick: onCancel, children: cancelText }) }),
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "destructive", onClick: onConfirm, className: "w-full sm:w-auto", children: confirmText })
|
|
2444
2455
|
] })
|
|
2445
2456
|
] })
|
|
2446
2457
|
] });
|
|
2447
2458
|
}
|
|
2448
|
-
function SuccessModal({
|
|
2459
|
+
function SuccessModal({
|
|
2460
|
+
trigger,
|
|
2461
|
+
title = "Success!",
|
|
2462
|
+
description,
|
|
2463
|
+
children,
|
|
2464
|
+
open,
|
|
2465
|
+
onOpenChange,
|
|
2466
|
+
confirmText = "Awesome",
|
|
2467
|
+
onConfirm
|
|
2468
|
+
}) {
|
|
2449
2469
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Dialog, { open, onOpenChange, children: [
|
|
2450
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTrigger, { asChild: true, children: trigger }),
|
|
2470
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTrigger, { asChild: true, children: trigger }),
|
|
2451
2471
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogContent, { className: "sm:max-w-[400px] border-green-500/20", children: [
|
|
2452
2472
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogHeader, { className: "flex flex-col items-center text-center sm:text-center", children: [
|
|
2453
2473
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-500/10 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.CheckCircle, { className: "h-6 w-6 text-green-500" }) }),
|
|
2454
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "text-xl", children: title }),
|
|
2474
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "text-xl", children: title }),
|
|
2455
2475
|
description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogDescription, { children: description })
|
|
2456
2476
|
] }),
|
|
2457
2477
|
children,
|
|
2458
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogFooter, { className: "sm:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { className: "w-full sm:w-auto bg-green-500 hover:bg-green-600", children:
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogFooter, { className: "sm:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { className: "w-full sm:w-auto bg-green-500 hover:bg-green-600", onClick: onConfirm, children: confirmText }) }) })
|
|
2459
2479
|
] })
|
|
2460
2480
|
] });
|
|
2461
2481
|
}
|
|
@@ -5188,11 +5208,16 @@ var React23 = __toESM(require("react"));
|
|
|
5188
5208
|
var import_lucide_react29 = require("lucide-react");
|
|
5189
5209
|
var import_framer_motion24 = require("framer-motion");
|
|
5190
5210
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5191
|
-
var SimpleAccordion = (
|
|
5192
|
-
|
|
5193
|
-
|
|
5211
|
+
var SimpleAccordion = ({
|
|
5212
|
+
title = "Is this library free?",
|
|
5213
|
+
children = "Yes, it is completely free and open source.",
|
|
5214
|
+
defaultOpen = false,
|
|
5215
|
+
className = ""
|
|
5216
|
+
}) => {
|
|
5217
|
+
const [open, setOpen] = React23.useState(defaultOpen);
|
|
5218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: `w-full max-w-md border rounded-xl overflow-hidden bg-card/50 backdrop-blur-sm border-border/50 ${className}`, children: [
|
|
5194
5219
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("button", { onClick: () => setOpen(!open), className: "w-full p-4 flex justify-between items-center hover:bg-muted/50 transition-colors font-medium", children: [
|
|
5195
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children:
|
|
5220
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: title }),
|
|
5196
5221
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.ChevronDown, { className: `w-4 h-4 transition-transform duration-300 ${open ? "rotate-180" : ""}` })
|
|
5197
5222
|
] }),
|
|
5198
5223
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_framer_motion24.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
@@ -5203,16 +5228,21 @@ var SimpleAccordion = () => {
|
|
|
5203
5228
|
exit: { height: 0, opacity: 0 },
|
|
5204
5229
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
5205
5230
|
className: "overflow-hidden",
|
|
5206
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "p-4 pt-0 text-sm text-muted-foreground border-t border-border/50 mt-2 pt-2", children
|
|
5231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "p-4 pt-0 text-sm text-muted-foreground border-t border-border/50 mt-2 pt-2", children })
|
|
5207
5232
|
}
|
|
5208
5233
|
) })
|
|
5209
5234
|
] });
|
|
5210
5235
|
};
|
|
5211
|
-
var PlusAccordion = (
|
|
5212
|
-
|
|
5213
|
-
|
|
5236
|
+
var PlusAccordion = ({
|
|
5237
|
+
title = "How do I install it?",
|
|
5238
|
+
children = "You can install it via pnpm, npm, or yarn using the CLI.",
|
|
5239
|
+
defaultOpen = false,
|
|
5240
|
+
className = ""
|
|
5241
|
+
}) => {
|
|
5242
|
+
const [open, setOpen] = React23.useState(defaultOpen);
|
|
5243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: `w-full max-w-md border-b border-border/50 ${className}`, children: [
|
|
5214
5244
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("button", { onClick: () => setOpen(!open), className: "w-full py-4 flex justify-between items-center font-medium hover:text-primary transition-colors", children: [
|
|
5215
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children:
|
|
5245
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: title }),
|
|
5216
5246
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "relative w-4 h-4 flex items-center justify-center", children: [
|
|
5217
5247
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "absolute w-4 h-0.5 bg-current rounded-full" }),
|
|
5218
5248
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `absolute w-0.5 h-4 bg-current rounded-full transition-transform duration-300 ${open ? "rotate-90" : ""}` })
|
|
@@ -5226,16 +5256,21 @@ var PlusAccordion = () => {
|
|
|
5226
5256
|
exit: { height: 0, opacity: 0 },
|
|
5227
5257
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
5228
5258
|
className: "overflow-hidden",
|
|
5229
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("
|
|
5259
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "text-sm text-muted-foreground pb-4", children })
|
|
5230
5260
|
}
|
|
5231
5261
|
) })
|
|
5232
5262
|
] });
|
|
5233
5263
|
};
|
|
5234
|
-
var NeonAccordion = (
|
|
5235
|
-
|
|
5236
|
-
|
|
5264
|
+
var NeonAccordion = ({
|
|
5265
|
+
title = "Premium Features",
|
|
5266
|
+
children = "Access to exclusive animated components and premium layouts.",
|
|
5267
|
+
defaultOpen = false,
|
|
5268
|
+
className = ""
|
|
5269
|
+
}) => {
|
|
5270
|
+
const [open, setOpen] = React23.useState(defaultOpen);
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("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: [
|
|
5237
5272
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("button", { onClick: () => setOpen(!open), className: "w-full p-4 flex justify-between items-center font-medium text-white", children: [
|
|
5238
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: open ? "text-cyan-400" : "text-white", children:
|
|
5273
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: open ? "text-cyan-400" : "text-white", children: title }),
|
|
5239
5274
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.ChevronDown, { className: `w-4 h-4 transition-transform duration-300 ${open ? "rotate-180 text-cyan-400" : "text-white"}` })
|
|
5240
5275
|
] }),
|
|
5241
5276
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_framer_motion24.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
@@ -5246,15 +5281,40 @@ var NeonAccordion = () => {
|
|
|
5246
5281
|
exit: { height: 0, opacity: 0 },
|
|
5247
5282
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
5248
5283
|
className: "overflow-hidden",
|
|
5249
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "p-4 pt-0 text-sm text-neutral-400 border-t border-neutral-800 mt-2 pt-2", children
|
|
5284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "p-4 pt-0 text-sm text-neutral-400 border-t border-neutral-800 mt-2 pt-2", children })
|
|
5250
5285
|
}
|
|
5251
5286
|
) })
|
|
5252
5287
|
] });
|
|
5253
5288
|
};
|
|
5254
|
-
var BasicModal = (
|
|
5255
|
-
|
|
5289
|
+
var BasicModal = ({
|
|
5290
|
+
isOpen: externalOpen,
|
|
5291
|
+
onOpenChange,
|
|
5292
|
+
trigger,
|
|
5293
|
+
title = "Basic Modal",
|
|
5294
|
+
description = "This is a simple modal dialog that can be used for various purposes.",
|
|
5295
|
+
children,
|
|
5296
|
+
confirmText = "Confirm",
|
|
5297
|
+
cancelText = "Cancel",
|
|
5298
|
+
onConfirm,
|
|
5299
|
+
onCancel,
|
|
5300
|
+
className = ""
|
|
5301
|
+
}) => {
|
|
5302
|
+
const [localOpen, setLocalOpen] = React23.useState(false);
|
|
5303
|
+
const open = externalOpen !== void 0 ? externalOpen : localOpen;
|
|
5304
|
+
const setOpen = (val) => {
|
|
5305
|
+
if (onOpenChange) onOpenChange(val);
|
|
5306
|
+
setLocalOpen(val);
|
|
5307
|
+
};
|
|
5308
|
+
const handleConfirm = () => {
|
|
5309
|
+
if (onConfirm) onConfirm();
|
|
5310
|
+
setOpen(false);
|
|
5311
|
+
};
|
|
5312
|
+
const handleCancel = () => {
|
|
5313
|
+
if (onCancel) onCancel();
|
|
5314
|
+
setOpen(false);
|
|
5315
|
+
};
|
|
5256
5316
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
5257
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
5317
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { onClick: () => setOpen(true), className: "cursor-pointer inline-block", children: trigger }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
5258
5318
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_framer_motion24.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
5259
5319
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5260
5320
|
import_framer_motion24.motion.div,
|
|
@@ -5262,7 +5322,7 @@ var BasicModal = () => {
|
|
|
5262
5322
|
initial: { opacity: 0 },
|
|
5263
5323
|
animate: { opacity: 1 },
|
|
5264
5324
|
exit: { opacity: 0 },
|
|
5265
|
-
onClick:
|
|
5325
|
+
onClick: handleCancel,
|
|
5266
5326
|
className: "fixed inset-0 bg-black/60 backdrop-blur-sm"
|
|
5267
5327
|
}
|
|
5268
5328
|
),
|
|
@@ -5273,14 +5333,15 @@ var BasicModal = () => {
|
|
|
5273
5333
|
animate: { scale: 1, opacity: 1 },
|
|
5274
5334
|
exit: { scale: 0.95, opacity: 0 },
|
|
5275
5335
|
transition: { type: "spring", damping: 20, stiffness: 300 },
|
|
5276
|
-
className:
|
|
5336
|
+
className: `bg-background rounded-2xl shadow-xl w-full max-w-md p-6 relative z-10 border border-border/50 ${className}`,
|
|
5277
5337
|
children: [
|
|
5278
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5279
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "font-bold text-lg mb-2", children:
|
|
5280
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-muted-foreground text-sm mb-6", children:
|
|
5338
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick: handleCancel, className: "absolute top-4 right-4 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.X, { className: "w-4 h-4" }) }),
|
|
5339
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "font-bold text-lg mb-2", children: title }),
|
|
5340
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-muted-foreground text-sm mb-6", children: description }),
|
|
5341
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mb-6", children }),
|
|
5281
5342
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
5282
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5283
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5343
|
+
cancelText && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick: handleCancel, className: "px-4 py-2 hover:bg-muted rounded-lg text-sm font-medium transition-colors", children: cancelText }),
|
|
5344
|
+
confirmText && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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 })
|
|
5284
5345
|
] })
|
|
5285
5346
|
]
|
|
5286
5347
|
}
|
|
@@ -5288,10 +5349,36 @@ var BasicModal = () => {
|
|
|
5288
5349
|
] }) })
|
|
5289
5350
|
] });
|
|
5290
5351
|
};
|
|
5291
|
-
var InteractiveGlassModal = (
|
|
5292
|
-
|
|
5352
|
+
var InteractiveGlassModal = ({
|
|
5353
|
+
isOpen: externalOpen,
|
|
5354
|
+
onOpenChange,
|
|
5355
|
+
trigger,
|
|
5356
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.Star, { className: "w-6 h-6 text-yellow-300" }),
|
|
5357
|
+
title = "Premium Glass Effect",
|
|
5358
|
+
description = "This modal uses full glassmorphism for a stunning visual effect.",
|
|
5359
|
+
children,
|
|
5360
|
+
confirmText = "Upgrade Now",
|
|
5361
|
+
cancelText = "Maybe Later",
|
|
5362
|
+
onConfirm,
|
|
5363
|
+
onCancel,
|
|
5364
|
+
className = ""
|
|
5365
|
+
}) => {
|
|
5366
|
+
const [localOpen, setLocalOpen] = React23.useState(false);
|
|
5367
|
+
const open = externalOpen !== void 0 ? externalOpen : localOpen;
|
|
5368
|
+
const setOpen = (val) => {
|
|
5369
|
+
if (onOpenChange) onOpenChange(val);
|
|
5370
|
+
setLocalOpen(val);
|
|
5371
|
+
};
|
|
5372
|
+
const handleConfirm = () => {
|
|
5373
|
+
if (onConfirm) onConfirm();
|
|
5374
|
+
setOpen(false);
|
|
5375
|
+
};
|
|
5376
|
+
const handleCancel = () => {
|
|
5377
|
+
if (onCancel) onCancel();
|
|
5378
|
+
setOpen(false);
|
|
5379
|
+
};
|
|
5293
5380
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
5294
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
5381
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { onClick: () => setOpen(true), className: "cursor-pointer inline-block", children: trigger }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
5295
5382
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_framer_motion24.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
5296
5383
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5297
5384
|
import_framer_motion24.motion.div,
|
|
@@ -5299,7 +5386,7 @@ var InteractiveGlassModal = () => {
|
|
|
5299
5386
|
initial: { opacity: 0 },
|
|
5300
5387
|
animate: { opacity: 1 },
|
|
5301
5388
|
exit: { opacity: 0 },
|
|
5302
|
-
onClick:
|
|
5389
|
+
onClick: handleCancel,
|
|
5303
5390
|
className: "fixed inset-0 bg-black/40 backdrop-blur-md"
|
|
5304
5391
|
}
|
|
5305
5392
|
),
|
|
@@ -5310,15 +5397,16 @@ var InteractiveGlassModal = () => {
|
|
|
5310
5397
|
animate: { y: 0, opacity: 1 },
|
|
5311
5398
|
exit: { y: 20, opacity: 0 },
|
|
5312
5399
|
transition: { type: "spring", damping: 25, stiffness: 400 },
|
|
5313
|
-
className:
|
|
5400
|
+
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}`,
|
|
5314
5401
|
children: [
|
|
5315
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5316
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "w-12 h-12 bg-white/10 rounded-full flex items-center justify-center mb-4 border border-white/20", children:
|
|
5317
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "font-bold text-xl mb-2", children:
|
|
5318
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-white/70 text-sm mb-6", children:
|
|
5402
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick: handleCancel, className: "absolute top-4 right-4 text-white/60 hover:text-white transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.X, { className: "w-4 h-4" }) }),
|
|
5403
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "w-12 h-12 bg-white/10 rounded-full flex items-center justify-center mb-4 border border-white/20", children: icon }),
|
|
5404
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "font-bold text-xl mb-2", children: title }),
|
|
5405
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-white/70 text-sm mb-6", children: description }),
|
|
5406
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mb-6", children }),
|
|
5319
5407
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
5320
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5321
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5408
|
+
cancelText && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick: handleCancel, className: "px-4 py-2 hover:bg-white/5 rounded-lg text-sm font-medium transition-colors", children: cancelText }),
|
|
5409
|
+
confirmText && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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 })
|
|
5322
5410
|
] })
|
|
5323
5411
|
]
|
|
5324
5412
|
}
|
|
@@ -5326,10 +5414,36 @@ var InteractiveGlassModal = () => {
|
|
|
5326
5414
|
] }) })
|
|
5327
5415
|
] });
|
|
5328
5416
|
};
|
|
5329
|
-
var DangerModal = (
|
|
5330
|
-
|
|
5417
|
+
var DangerModal = ({
|
|
5418
|
+
isOpen: externalOpen,
|
|
5419
|
+
onOpenChange,
|
|
5420
|
+
trigger,
|
|
5421
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.X, { className: "w-8 h-8" }),
|
|
5422
|
+
title = "Are you absolutely sure?",
|
|
5423
|
+
description = "This action cannot be undone. This will permanently delete your account and remove your data from our servers.",
|
|
5424
|
+
children,
|
|
5425
|
+
confirmText = "Delete",
|
|
5426
|
+
cancelText = "Cancel",
|
|
5427
|
+
onConfirm,
|
|
5428
|
+
onCancel,
|
|
5429
|
+
className = ""
|
|
5430
|
+
}) => {
|
|
5431
|
+
const [localOpen, setLocalOpen] = React23.useState(false);
|
|
5432
|
+
const open = externalOpen !== void 0 ? externalOpen : localOpen;
|
|
5433
|
+
const setOpen = (val) => {
|
|
5434
|
+
if (onOpenChange) onOpenChange(val);
|
|
5435
|
+
setLocalOpen(val);
|
|
5436
|
+
};
|
|
5437
|
+
const handleConfirm = () => {
|
|
5438
|
+
if (onConfirm) onConfirm();
|
|
5439
|
+
setOpen(false);
|
|
5440
|
+
};
|
|
5441
|
+
const handleCancel = () => {
|
|
5442
|
+
if (onCancel) onCancel();
|
|
5443
|
+
setOpen(false);
|
|
5444
|
+
};
|
|
5331
5445
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
5332
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
5446
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { onClick: () => setOpen(true), className: "cursor-pointer inline-block", children: trigger }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
5333
5447
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_framer_motion24.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
5334
5448
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5335
5449
|
import_framer_motion24.motion.div,
|
|
@@ -5337,7 +5451,7 @@ var DangerModal = () => {
|
|
|
5337
5451
|
initial: { opacity: 0 },
|
|
5338
5452
|
animate: { opacity: 1 },
|
|
5339
5453
|
exit: { opacity: 0 },
|
|
5340
|
-
onClick:
|
|
5454
|
+
onClick: handleCancel,
|
|
5341
5455
|
className: "fixed inset-0 bg-black/60 backdrop-blur-sm"
|
|
5342
5456
|
}
|
|
5343
5457
|
),
|
|
@@ -5348,16 +5462,17 @@ var DangerModal = () => {
|
|
|
5348
5462
|
animate: { rotate: 0, scale: 1, opacity: 1 },
|
|
5349
5463
|
exit: { rotate: -5, scale: 0.9, opacity: 0 },
|
|
5350
5464
|
transition: { type: "spring", damping: 20, stiffness: 300 },
|
|
5351
|
-
className:
|
|
5465
|
+
className: `bg-background rounded-2xl shadow-xl w-full max-w-md overflow-hidden relative z-10 border border-destructive/20 ${className}`,
|
|
5352
5466
|
children: [
|
|
5353
5467
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "p-6 text-center", children: [
|
|
5354
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "w-16 h-16 bg-destructive/10 text-destructive rounded-full flex items-center justify-center mx-auto mb-4", children:
|
|
5355
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "font-bold text-xl mb-2", children:
|
|
5356
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-muted-foreground text-sm", children:
|
|
5468
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "w-16 h-16 bg-destructive/10 text-destructive rounded-full flex items-center justify-center mx-auto mb-4", children: icon }),
|
|
5469
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "font-bold text-xl mb-2", children: title }),
|
|
5470
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-muted-foreground text-sm", children: description }),
|
|
5471
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mt-4", children })
|
|
5357
5472
|
] }),
|
|
5358
5473
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex border-t border-border/50 bg-muted/50", children: [
|
|
5359
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5360
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick:
|
|
5474
|
+
cancelText && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick: handleCancel, className: "flex-1 py-3 font-medium hover:bg-muted transition-colors border-r border-border/50", children: cancelText }),
|
|
5475
|
+
confirmText && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("button", { onClick: handleConfirm, className: "flex-1 py-3 font-medium text-destructive hover:bg-destructive/10 transition-colors", children: confirmText })
|
|
5361
5476
|
] })
|
|
5362
5477
|
]
|
|
5363
5478
|
}
|
|
@@ -7129,7 +7244,13 @@ function MusicPlayer({ title, artist, album, className }) {
|
|
|
7129
7244
|
] })
|
|
7130
7245
|
] });
|
|
7131
7246
|
}
|
|
7132
|
-
function ImageCompare({
|
|
7247
|
+
function ImageCompare({
|
|
7248
|
+
leftImage,
|
|
7249
|
+
rightImage,
|
|
7250
|
+
leftLabel = "Before",
|
|
7251
|
+
rightLabel = "After",
|
|
7252
|
+
className
|
|
7253
|
+
}) {
|
|
7133
7254
|
const [position, setPosition] = React30.useState(50);
|
|
7134
7255
|
const containerRef = React30.useRef(null);
|
|
7135
7256
|
const handleMove = (e) => {
|
|
@@ -7138,15 +7259,38 @@ function ImageCompare({ leftLabel = "Before", rightLabel = "After", className })
|
|
|
7138
7259
|
const x = (e.clientX - rect.left) / rect.width * 100;
|
|
7139
7260
|
setPosition(Math.max(0, Math.min(100, x)));
|
|
7140
7261
|
};
|
|
7262
|
+
const handleTouchMove = (e) => {
|
|
7263
|
+
if (!containerRef.current) return;
|
|
7264
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
7265
|
+
if (e.touches[0]) {
|
|
7266
|
+
const x = (e.touches[0].clientX - rect.left) / rect.width * 100;
|
|
7267
|
+
setPosition(Math.max(0, Math.min(100, x)));
|
|
7268
|
+
}
|
|
7269
|
+
};
|
|
7141
7270
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
7142
7271
|
"div",
|
|
7143
7272
|
{
|
|
7144
7273
|
ref: containerRef,
|
|
7145
7274
|
className: cn("relative aspect-video rounded-xl overflow-hidden cursor-col-resize select-none", className),
|
|
7146
7275
|
onMouseMove: handleMove,
|
|
7276
|
+
onTouchMove: handleTouchMove,
|
|
7147
7277
|
children: [
|
|
7148
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-slate-600 to-slate-800" }),
|
|
7149
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7278
|
+
rightImage ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("img", { src: rightImage, alt: rightLabel, className: "absolute inset-0 w-full h-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-slate-600 to-slate-800" }),
|
|
7279
|
+
leftImage ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7280
|
+
"img",
|
|
7281
|
+
{
|
|
7282
|
+
src: leftImage,
|
|
7283
|
+
alt: leftLabel,
|
|
7284
|
+
className: "absolute inset-0 w-full h-full object-cover",
|
|
7285
|
+
style: { clipPath: `inset(0 ${100 - position}% 0 0)` }
|
|
7286
|
+
}
|
|
7287
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7288
|
+
"div",
|
|
7289
|
+
{
|
|
7290
|
+
className: "absolute inset-0 bg-gradient-to-br from-violet-500 to-pink-500",
|
|
7291
|
+
style: { clipPath: `inset(0 ${100 - position}% 0 0)` }
|
|
7292
|
+
}
|
|
7293
|
+
),
|
|
7150
7294
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "absolute top-0 bottom-0", style: { left: `${position}%` }, children: [
|
|
7151
7295
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "absolute top-0 bottom-0 w-0.5 bg-white shadow-lg -translate-x-1/2" }),
|
|
7152
7296
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("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__ */ (0, import_jsx_runtime62.jsx)("svg", { className: "w-4 h-4 text-slate-700", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 9l4-4 4 4m0 6l-4 4-4-4" }) }) })
|