@appolabs/ui 0.1.6 → 0.1.7
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 +33 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +33 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1238,33 +1238,39 @@ 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) =>
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
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.jsxs(
|
|
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
|
+
children,
|
|
1265
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { 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", children: [
|
|
1266
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
1267
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1268
|
+
] })
|
|
1269
|
+
]
|
|
1270
|
+
}
|
|
1271
|
+
)
|
|
1272
|
+
] });
|
|
1273
|
+
});
|
|
1268
1274
|
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
1269
1275
|
var DialogHeader = ({
|
|
1270
1276
|
className,
|