@geomak/ui 7.5.2 → 7.5.3
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.cjs +62 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +62 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2478,52 +2478,68 @@ function PopConfirm({
|
|
|
2478
2478
|
onCancel?.();
|
|
2479
2479
|
setOpen(false);
|
|
2480
2480
|
};
|
|
2481
|
-
return /* @__PURE__ */ jsxs(
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
{
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2481
|
+
return /* @__PURE__ */ jsxs(
|
|
2482
|
+
Popover.Root,
|
|
2483
|
+
{
|
|
2484
|
+
open: isOpen,
|
|
2485
|
+
onOpenChange: (o) => {
|
|
2486
|
+
if (o) setOpen(true);
|
|
2487
|
+
else if (!loading) handleCancel();
|
|
2488
|
+
},
|
|
2489
|
+
children: [
|
|
2490
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
|
|
2491
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2492
|
+
Popover.Content,
|
|
2493
|
+
{
|
|
2494
|
+
side,
|
|
2495
|
+
sideOffset: 8,
|
|
2496
|
+
collisionPadding: 12,
|
|
2497
|
+
className: cx("z-[400] focus:outline-none", className),
|
|
2498
|
+
onEscapeKeyDown: (e) => {
|
|
2499
|
+
if (loading) e.preventDefault();
|
|
2500
|
+
},
|
|
2501
|
+
onInteractOutside: (e) => {
|
|
2502
|
+
if (loading) e.preventDefault();
|
|
2503
|
+
},
|
|
2504
|
+
children: [
|
|
2505
|
+
/* @__PURE__ */ jsxs(
|
|
2506
|
+
motion.div,
|
|
2507
|
+
{
|
|
2508
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
2509
|
+
animate: { opacity: 1, scale: 1 },
|
|
2510
|
+
transition: { duration: 0.12, ease: [0.16, 1, 0.3, 1] },
|
|
2511
|
+
className: "w-64 rounded-lg border border-border bg-surface p-3.5 shadow-lg",
|
|
2512
|
+
children: [
|
|
2513
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2.5", children: [
|
|
2514
|
+
icon && /* @__PURE__ */ jsx("span", { className: `mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center ${ICON_COLOR[tone]}`, children: icon }),
|
|
2515
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2516
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: title }),
|
|
2517
|
+
description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-foreground-secondary leading-snug", children: description })
|
|
2518
|
+
] })
|
|
2519
|
+
] }),
|
|
2520
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex justify-end gap-2", children: [
|
|
2521
|
+
/* @__PURE__ */ jsx(Button_default, { content: cancelText, size: "sm", variant: "ghost", disabled: loading, onClick: handleCancel }),
|
|
2522
|
+
/* @__PURE__ */ jsx(
|
|
2523
|
+
Button_default,
|
|
2524
|
+
{
|
|
2525
|
+
content: confirmText,
|
|
2526
|
+
size: "sm",
|
|
2527
|
+
variant: CONFIRM_VARIANT[tone],
|
|
2528
|
+
loading,
|
|
2529
|
+
onClick: handleConfirm
|
|
2530
|
+
}
|
|
2531
|
+
)
|
|
2532
|
+
] })
|
|
2533
|
+
]
|
|
2534
|
+
}
|
|
2535
|
+
),
|
|
2536
|
+
/* @__PURE__ */ jsx(Popover.Arrow, { className: "fill-surface" })
|
|
2537
|
+
]
|
|
2538
|
+
}
|
|
2539
|
+
) })
|
|
2540
|
+
]
|
|
2541
|
+
}
|
|
2542
|
+
);
|
|
2527
2543
|
}
|
|
2528
2544
|
var DEFAULT_EVENTS = ["mousemove", "mousedown", "keydown", "touchstart", "scroll", "wheel"];
|
|
2529
2545
|
var formatTime = (ms) => {
|