@motor-hero/ui-kit 0.30.0 → 0.31.0

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.js CHANGED
@@ -422,6 +422,7 @@ function BaseDialog({
422
422
  size = "lg",
423
423
  className,
424
424
  modal,
425
+ blurBackdrop = true,
425
426
  contentWrapper = (content) => content
426
427
  }) {
427
428
  const isDesktop = useIsDesktop();
@@ -452,8 +453,28 @@ function BaseDialog({
452
453
  /* @__PURE__ */ jsx10("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children }),
453
454
  footer && /* @__PURE__ */ jsx10("div", { className: "flex shrink-0 flex-col-reverse gap-2 border-t px-6 py-3 sm:flex-row sm:justify-end", children: footer })
454
455
  ] });
455
- return /* @__PURE__ */ jsx10(Dialog.Root, { open, onOpenChange, modal: modal ?? !isDesktop, children: /* @__PURE__ */ jsxs9(Dialog.Portal, { children: [
456
- /* @__PURE__ */ jsx10(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
456
+ const isModal = modal ?? !isDesktop;
457
+ return /* @__PURE__ */ jsx10(Dialog.Root, { open, onOpenChange, modal: isModal, children: /* @__PURE__ */ jsxs9(Dialog.Portal, { children: [
458
+ isModal ? /* @__PURE__ */ jsx10(
459
+ Dialog.Overlay,
460
+ {
461
+ className: cn(
462
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
463
+ blurBackdrop && "backdrop-blur-sm"
464
+ )
465
+ }
466
+ ) : (
467
+ // Radix skips Dialog.Overlay when non-modal, so the backdrop is
468
+ // rendered by hand; pointer-events-none keeps outside interactions
469
+ // working (the reason the dialog is non-modal on desktop).
470
+ blurBackdrop && /* @__PURE__ */ jsx10(
471
+ "div",
472
+ {
473
+ "aria-hidden": true,
474
+ className: "pointer-events-none fixed inset-0 z-50 bg-black/80 backdrop-blur-sm animate-in fade-in-0"
475
+ }
476
+ )
477
+ ),
457
478
  /* @__PURE__ */ jsx10(
458
479
  Dialog.Content,
459
480
  {