@appolabs/ui 0.1.6 → 0.1.8

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
@@ -1238,33 +1238,33 @@ var DialogOverlay = React39__namespace.forwardRef(({ className, ...props }, ref)
1238
1238
  }
1239
1239
  ));
1240
1240
  DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1241
- var DialogContent = React39__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
1242
- /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
1243
- /* @__PURE__ */ jsxRuntime.jsxs(
1244
- DialogPrimitive__namespace.Content,
1245
- {
1246
- ref,
1247
- className: cn(
1248
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 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",
1249
- className
1250
- ),
1251
- ...props,
1252
- children: [
1253
- children,
1254
- /* @__PURE__ */ jsxRuntime.jsxs(
1255
- DialogPrimitive__namespace.Close,
1256
- {
1257
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
1258
- children: [
1259
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
1260
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1261
- ]
1262
- }
1263
- )
1264
- ]
1265
- }
1266
- )
1267
- ] }));
1241
+ var DialogContent = React39__namespace.forwardRef(({ className, children, onCloseComplete, onAnimationEnd, ...props }, ref) => {
1242
+ const handleAnimationEnd = React39__namespace.useCallback(
1243
+ (e) => {
1244
+ onAnimationEnd?.(e);
1245
+ if (e.currentTarget.getAttribute("data-state") === "closed") {
1246
+ onCloseComplete?.();
1247
+ }
1248
+ },
1249
+ [onAnimationEnd, onCloseComplete]
1250
+ );
1251
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
1252
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
1253
+ /* @__PURE__ */ jsxRuntime.jsx(
1254
+ DialogPrimitive__namespace.Content,
1255
+ {
1256
+ ref,
1257
+ className: cn(
1258
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 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",
1259
+ className
1260
+ ),
1261
+ onAnimationEnd: handleAnimationEnd,
1262
+ ...props,
1263
+ children
1264
+ }
1265
+ )
1266
+ ] });
1267
+ });
1268
1268
  DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
1269
1269
  var DialogHeader = ({
1270
1270
  className,
@@ -2867,25 +2867,13 @@ var sheetVariants = classVarianceAuthority.cva(
2867
2867
  );
2868
2868
  var SheetContent = React39__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
2869
2869
  /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
2870
- /* @__PURE__ */ jsxRuntime.jsxs(
2870
+ /* @__PURE__ */ jsxRuntime.jsx(
2871
2871
  DialogPrimitive__namespace.Content,
2872
2872
  {
2873
2873
  ref,
2874
2874
  className: cn(sheetVariants({ side }), className),
2875
2875
  ...props,
2876
- children: [
2877
- children,
2878
- /* @__PURE__ */ jsxRuntime.jsxs(
2879
- DialogPrimitive__namespace.Close,
2880
- {
2881
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
2882
- children: [
2883
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
2884
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
2885
- ]
2886
- }
2887
- )
2888
- ]
2876
+ children
2889
2877
  }
2890
2878
  )
2891
2879
  ] }));