@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 CHANGED
@@ -2515,52 +2515,68 @@ function PopConfirm({
2515
2515
  onCancel?.();
2516
2516
  setOpen(false);
2517
2517
  };
2518
- return /* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: isOpen, onOpenChange: (o) => o ? setOpen(true) : handleCancel(), children: [
2519
- /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { asChild: true, children }),
2520
- /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
2521
- Popover__namespace.Content,
2522
- {
2523
- side,
2524
- sideOffset: 8,
2525
- collisionPadding: 12,
2526
- className: cx("z-[400] focus:outline-none", className),
2527
- children: [
2528
- /* @__PURE__ */ jsxRuntime.jsxs(
2529
- framerMotion.motion.div,
2530
- {
2531
- initial: { opacity: 0, scale: 0.95 },
2532
- animate: { opacity: 1, scale: 1 },
2533
- transition: { duration: 0.12, ease: [0.16, 1, 0.3, 1] },
2534
- className: "w-64 rounded-lg border border-border bg-surface p-3.5 shadow-lg",
2535
- children: [
2536
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2.5", children: [
2537
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center ${ICON_COLOR[tone]}`, children: icon }),
2538
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2539
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-foreground", children: title }),
2540
- description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-foreground-secondary leading-snug", children: description })
2541
- ] })
2542
- ] }),
2543
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex justify-end gap-2", children: [
2544
- /* @__PURE__ */ jsxRuntime.jsx(Button_default, { content: cancelText, size: "sm", variant: "ghost", onClick: handleCancel }),
2545
- /* @__PURE__ */ jsxRuntime.jsx(
2546
- Button_default,
2547
- {
2548
- content: confirmText,
2549
- size: "sm",
2550
- variant: CONFIRM_VARIANT[tone],
2551
- loading,
2552
- onClick: handleConfirm
2553
- }
2554
- )
2555
- ] })
2556
- ]
2557
- }
2558
- ),
2559
- /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Arrow, { className: "fill-surface" })
2560
- ]
2561
- }
2562
- ) })
2563
- ] });
2518
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2519
+ Popover__namespace.Root,
2520
+ {
2521
+ open: isOpen,
2522
+ onOpenChange: (o) => {
2523
+ if (o) setOpen(true);
2524
+ else if (!loading) handleCancel();
2525
+ },
2526
+ children: [
2527
+ /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { asChild: true, children }),
2528
+ /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
2529
+ Popover__namespace.Content,
2530
+ {
2531
+ side,
2532
+ sideOffset: 8,
2533
+ collisionPadding: 12,
2534
+ className: cx("z-[400] focus:outline-none", className),
2535
+ onEscapeKeyDown: (e) => {
2536
+ if (loading) e.preventDefault();
2537
+ },
2538
+ onInteractOutside: (e) => {
2539
+ if (loading) e.preventDefault();
2540
+ },
2541
+ children: [
2542
+ /* @__PURE__ */ jsxRuntime.jsxs(
2543
+ framerMotion.motion.div,
2544
+ {
2545
+ initial: { opacity: 0, scale: 0.95 },
2546
+ animate: { opacity: 1, scale: 1 },
2547
+ transition: { duration: 0.12, ease: [0.16, 1, 0.3, 1] },
2548
+ className: "w-64 rounded-lg border border-border bg-surface p-3.5 shadow-lg",
2549
+ children: [
2550
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2.5", children: [
2551
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center ${ICON_COLOR[tone]}`, children: icon }),
2552
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2553
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-foreground", children: title }),
2554
+ description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-foreground-secondary leading-snug", children: description })
2555
+ ] })
2556
+ ] }),
2557
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex justify-end gap-2", children: [
2558
+ /* @__PURE__ */ jsxRuntime.jsx(Button_default, { content: cancelText, size: "sm", variant: "ghost", disabled: loading, onClick: handleCancel }),
2559
+ /* @__PURE__ */ jsxRuntime.jsx(
2560
+ Button_default,
2561
+ {
2562
+ content: confirmText,
2563
+ size: "sm",
2564
+ variant: CONFIRM_VARIANT[tone],
2565
+ loading,
2566
+ onClick: handleConfirm
2567
+ }
2568
+ )
2569
+ ] })
2570
+ ]
2571
+ }
2572
+ ),
2573
+ /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Arrow, { className: "fill-surface" })
2574
+ ]
2575
+ }
2576
+ ) })
2577
+ ]
2578
+ }
2579
+ );
2564
2580
  }
2565
2581
  var DEFAULT_EVENTS = ["mousemove", "mousedown", "keydown", "touchstart", "scroll", "wheel"];
2566
2582
  var formatTime = (ms) => {