@appolabs/ui 0.1.11 → 0.1.13

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.cts CHANGED
@@ -388,6 +388,8 @@ declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dia
388
388
  declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
389
389
  interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
390
390
  onCloseComplete?: () => void;
391
+ /** Render open immediately with no entry/exit animation. */
392
+ instant?: boolean;
391
393
  }
392
394
  declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
393
395
  declare const DialogHeader: {
package/dist/index.d.ts CHANGED
@@ -388,6 +388,8 @@ declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dia
388
388
  declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
389
389
  interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
390
390
  onCloseComplete?: () => void;
391
+ /** Render open immediately with no entry/exit animation. */
392
+ instant?: boolean;
391
393
  }
392
394
  declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
393
395
  declare const DialogHeader: {
package/dist/index.js CHANGED
@@ -1321,7 +1321,7 @@ var DialogOverlay = React40.forwardRef(({ className, ...props }, ref) => /* @__P
1321
1321
  }
1322
1322
  ));
1323
1323
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1324
- var DialogContent = React40.forwardRef(({ className, children, onCloseComplete, onAnimationEnd, ...props }, ref) => {
1324
+ var DialogContent = React40.forwardRef(({ className, children, onCloseComplete, onAnimationEnd, instant, ...props }, ref) => {
1325
1325
  const handleAnimationEnd = React40.useCallback(
1326
1326
  (e) => {
1327
1327
  onAnimationEnd?.(e);
@@ -1332,16 +1332,17 @@ var DialogContent = React40.forwardRef(({ className, children, onCloseComplete,
1332
1332
  [onAnimationEnd, onCloseComplete]
1333
1333
  );
1334
1334
  return /* @__PURE__ */ jsxs(DialogPortal, { children: [
1335
- /* @__PURE__ */ jsx(DialogOverlay, {}),
1335
+ /* @__PURE__ */ jsx(DialogOverlay, { className: instant ? "animate-none" : void 0 }),
1336
1336
  /* @__PURE__ */ jsx(
1337
1337
  DialogPrimitive.Content,
1338
1338
  {
1339
1339
  ref,
1340
1340
  className: cn(
1341
- "fixed left-[50%] top-[50%] z-50 flex max-h-[85vh] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] flex-col gap-4 border bg-background p-1 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
1341
+ "fixed left-[50%] top-[50%] z-50 flex max-h-[85vh] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] flex-col gap-4 border bg-background p-1 shadow-lg sm:rounded-lg",
1342
+ !instant && "duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
1342
1343
  className
1343
1344
  ),
1344
- onAnimationEnd: handleAnimationEnd,
1345
+ onAnimationEnd: instant ? void 0 : handleAnimationEnd,
1345
1346
  ...props,
1346
1347
  children
1347
1348
  }
@@ -1370,7 +1371,7 @@ var DialogBody = ({
1370
1371
  "div",
1371
1372
  {
1372
1373
  className: cn(
1373
- "flex-1 overflow-y-auto px-6 pb-1",
1374
+ "flex-1 overflow-y-auto px-6 pb-2",
1374
1375
  className
1375
1376
  ),
1376
1377
  ...props