@hilum/ui 3.6.0 → 3.6.1

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
@@ -8255,6 +8255,7 @@ var DialogContent = forwardRef(
8255
8255
  if (!open) setMounted(false);
8256
8256
  };
8257
8257
  if (!mounted) return null;
8258
+ const sizeClassName = size === "sm" ? container ? "max-w-[400px]" : "sm:max-w-[400px]" : container ? "max-w-[540px]" : "sm:max-w-[540px]";
8258
8259
  return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { forceMount: true, container: container ?? void 0, children: [
8259
8260
  /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx(
8260
8261
  motion.div,
@@ -8272,24 +8273,25 @@ var DialogContent = forwardRef(
8272
8273
  motion.div,
8273
8274
  {
8274
8275
  className: cn(
8275
- container ? "absolute" : "fixed",
8276
- "left-1/2 top-1/2 z-50 w-[calc(100%-2rem)]",
8276
+ container ? "absolute left-1/2 top-1/2 z-50 w-[calc(100%-2rem)]" : [
8277
+ mobileDialogSheetContentClassName,
8278
+ desktopDialogContentClassName,
8279
+ dialogSheetMotionClassName
8280
+ ],
8277
8281
  surfaceClasses(dialogLevel),
8278
8282
  "p-6 focus:outline-none",
8279
- "rounded-t-2xl max-sm:pb-[calc(1.5rem+env(safe-area-inset-bottom))] data-[state=open]:slide-in-from-bottom sm:data-[state=open]:zoom-in-95",
8280
- size === "sm" && "max-w-[400px]",
8281
- size === "lg" && "max-w-[540px]",
8283
+ sizeClassName,
8282
8284
  shape3.container,
8283
8285
  "rounded-t-2xl",
8284
8286
  className
8285
8287
  ),
8286
- initial: { opacity: 0, scale: 0.97, x: "-50%", y: "-50%" },
8287
- animate: {
8288
+ initial: container ? { opacity: 0, scale: 0.97, x: "-50%", y: "-50%" } : { opacity: 0 },
8289
+ animate: container ? {
8288
8290
  opacity: open ? 1 : 0,
8289
8291
  scale: open ? 1 : 0.97,
8290
8292
  x: "-50%",
8291
8293
  y: "-50%"
8292
- },
8294
+ } : { opacity: open ? 1 : 0 },
8293
8295
  transition: open ? spring.slow : spring.slow.exit,
8294
8296
  onAnimationComplete: handleExitComplete,
8295
8297
  children: /* @__PURE__ */ jsxs(SurfaceProvider, { value: dialogLevel, children: [