@underverse-ui/underverse 0.2.7 → 0.2.9
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 +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2123,7 +2123,9 @@ var Modal = ({
|
|
|
2123
2123
|
closeOnEsc = true,
|
|
2124
2124
|
size = "md",
|
|
2125
2125
|
noPadding = false,
|
|
2126
|
-
fullWidth = false
|
|
2126
|
+
fullWidth = false,
|
|
2127
|
+
width,
|
|
2128
|
+
height
|
|
2127
2129
|
}) => {
|
|
2128
2130
|
const [isMounted, setIsMounted] = React9.useState(false);
|
|
2129
2131
|
const [isVisible, setIsVisible] = React9.useState(false);
|
|
@@ -2175,6 +2177,7 @@ var Modal = ({
|
|
|
2175
2177
|
if (!isMounted || !isOpen && !isVisible) {
|
|
2176
2178
|
return null;
|
|
2177
2179
|
}
|
|
2180
|
+
const maxWidthClass = width ? "max-w-none" : fullWidth ? "max-w-full" : sizeStyles3[size];
|
|
2178
2181
|
const modalContent = /* @__PURE__ */ jsxs11("div", { className: cn("fixed inset-0 z-[9999] flex items-center justify-center", overlayClassName), onClick: handleOverlayClick, children: [
|
|
2179
2182
|
/* @__PURE__ */ jsx13(
|
|
2180
2183
|
"div",
|
|
@@ -2189,9 +2192,9 @@ var Modal = ({
|
|
|
2189
2192
|
"div",
|
|
2190
2193
|
{
|
|
2191
2194
|
className: cn(
|
|
2192
|
-
"relative w-full rounded-lg
|
|
2195
|
+
"relative w-full rounded-lg bg-card text-card-foreground shadow-xl",
|
|
2193
2196
|
"transition-all duration-200 ease-out",
|
|
2194
|
-
|
|
2197
|
+
maxWidthClass,
|
|
2195
2198
|
fullWidth && "mx-0",
|
|
2196
2199
|
className
|
|
2197
2200
|
),
|
|
@@ -2199,7 +2202,9 @@ var Modal = ({
|
|
|
2199
2202
|
opacity: isOpen && !isAnimating ? 1 : 0,
|
|
2200
2203
|
transform: isOpen && !isAnimating ? "scale(1)" : "scale(0.9)",
|
|
2201
2204
|
// Thêm dòng này để tạo hiệu ứng nảy
|
|
2202
|
-
transition: "all 300ms cubic-bezier(0.34, 1.76, 0.64, 1)"
|
|
2205
|
+
transition: "all 300ms cubic-bezier(0.34, 1.76, 0.64, 1)",
|
|
2206
|
+
width,
|
|
2207
|
+
height
|
|
2203
2208
|
},
|
|
2204
2209
|
onClick: (e) => e.stopPropagation(),
|
|
2205
2210
|
children: [
|