infinity-ui-elements 1.8.1 → 1.8.3
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/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +9 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -681,11 +681,10 @@ const linkVariants = classVarianceAuthority.cva("inline-flex items-center gap-1
|
|
|
681
681
|
},
|
|
682
682
|
{
|
|
683
683
|
color: "white",
|
|
684
|
-
class: `text-
|
|
685
|
-
hover:text-
|
|
686
|
-
hover:decoration-action-outline-white-hover
|
|
684
|
+
class: `text-surface-ink-white-normal
|
|
685
|
+
hover:text-surface-ink-white-subtle
|
|
687
686
|
hover:text-action-ink-white-hover
|
|
688
|
-
disabled:text-action-ink-white-
|
|
687
|
+
disabled:text-action-ink-white-muted
|
|
689
688
|
focus:text-action-ink-white-hover
|
|
690
689
|
`,
|
|
691
690
|
},
|
|
@@ -1002,13 +1001,13 @@ const Alert = React__namespace.forwardRef(({ className, emphasis = "subtle", int
|
|
|
1002
1001
|
const hasActions = actionButton || actionLink;
|
|
1003
1002
|
return (jsxRuntime.jsxs("div", { ref: ref, className: cn(alertVariants({ emphasis, intent }), className), role: "alert", ...props, children: [jsxRuntime.jsx("div", { className: cn(alertIconVariants({ emphasis, intent }), "h-5 w-5 shrink-0"), children: displayIcon }), isFullWidth ? (
|
|
1004
1003
|
/* Full Width Layout: Icon, Content, Actions/Close in one row */
|
|
1005
|
-
jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex items-center justify-between gap-4", children: [jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [title && (jsxRuntime.jsx("div", { className: cn("text-body-medium-semibold", alertTextVariants({ emphasis, intent })), children: title })), jsxRuntime.jsx("div", { className: cn("text-body-small-regular", alertTextVariants({ emphasis, intent })), children: children })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-
|
|
1004
|
+
jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex items-center justify-between gap-4", children: [jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [title && (jsxRuntime.jsx("div", { className: cn("text-body-medium-semibold", alertTextVariants({ emphasis, intent })), children: title })), jsxRuntime.jsx("div", { className: cn("text-body-small-regular", alertTextVariants({ emphasis, intent })), children: children })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4 shrink-0", children: [hasActions && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [actionButton, actionLink] })), onClose && (jsxRuntime.jsx(IconButton, { icon: "close", color: emphasis === "intense" ? "white" : getButtonColor(intent), size: "xsmall", onClick: onClose, className: cn("shrink-0 h-5 w-5", emphasis === "intense"
|
|
1006
1005
|
? "hover:bg-white/20"
|
|
1007
1006
|
: "hover:bg-black/10"), "aria-label": "Close alert" }))] })] })) : (
|
|
1008
1007
|
/* Not Full Width Layout: Icon and Content in row, Actions below, Close top-right */
|
|
1009
1008
|
jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 relative", children: [onClose && (jsxRuntime.jsx("div", { className: "absolute top-0 right-0", children: jsxRuntime.jsx(IconButton, { icon: "close", color: emphasis === "intense" ? "white" : getButtonColor(intent), size: "xsmall", onClick: onClose, className: cn("shrink-0 h-5 w-5", emphasis === "intense"
|
|
1010
1009
|
? "hover:bg-white/20"
|
|
1011
|
-
: "hover:bg-black/10"), "aria-label": "Close alert" }) })), jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 pr-8", children: [title && (jsxRuntime.jsx("div", { className: cn("text-body-medium-semibold", alertTextVariants({ emphasis, intent })), children: title })), jsxRuntime.jsx("div", { className: cn("text-body-small-regular", alertTextVariants({ emphasis, intent })), children: children }), hasActions && (jsxRuntime.jsxs("div", { className: "flex items-center gap-
|
|
1010
|
+
: "hover:bg-black/10"), "aria-label": "Close alert" }) })), jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 pr-8", children: [title && (jsxRuntime.jsx("div", { className: cn("text-body-medium-semibold", alertTextVariants({ emphasis, intent })), children: title })), jsxRuntime.jsx("div", { className: cn("text-body-small-regular", alertTextVariants({ emphasis, intent })), children: children }), hasActions && (jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [actionButton, actionLink] }))] })] }))] }));
|
|
1012
1011
|
});
|
|
1013
1012
|
Alert.displayName = "Alert";
|
|
1014
1013
|
|
|
@@ -2235,7 +2234,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
2235
2234
|
};
|
|
2236
2235
|
// Handle escape key
|
|
2237
2236
|
React__namespace.useEffect(() => {
|
|
2238
|
-
if (!isOpen || !closeOnEscape)
|
|
2237
|
+
if (!isOpen || !closeOnEscape || !onClose)
|
|
2239
2238
|
return;
|
|
2240
2239
|
const handleEscape = (e) => {
|
|
2241
2240
|
if (e.key === "Escape") {
|
|
@@ -2259,7 +2258,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
2259
2258
|
}, [isOpen]);
|
|
2260
2259
|
// Handle overlay click
|
|
2261
2260
|
const handleOverlayClick = (e) => {
|
|
2262
|
-
if (closeOnOverlayClick && e.target === e.currentTarget) {
|
|
2261
|
+
if (closeOnOverlayClick && e.target === e.currentTarget && onClose) {
|
|
2263
2262
|
onClose();
|
|
2264
2263
|
}
|
|
2265
2264
|
};
|
|
@@ -2267,7 +2266,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
2267
2266
|
if (!isOpen)
|
|
2268
2267
|
return null;
|
|
2269
2268
|
const hasHeader = title || description;
|
|
2270
|
-
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-50 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative w-full bg-white rounded-large shadow-xl transition-all", "flex flex-col max-h-[90vh]", sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4 px-6 pt-6", !description && "pb-4", description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && (jsxRuntime.jsx(
|
|
2269
|
+
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-50 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative w-full bg-white rounded-large shadow-xl transition-all", "flex flex-col max-h-[90vh]", sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4 px-6 pt-6", !description && "pb-4", description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: "absolute top-4 right-4 z-10", children: jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal" }) })), jsxRuntime.jsx("div", { className: cn("flex-1 overflow-y-auto px-6", hasHeader ? "py-4" : "pt-6 pb-4", !footer && "pb-6", bodyClassName), children: children }), footer && (jsxRuntime.jsxs("div", { className: "flex flex-col", children: [jsxRuntime.jsx(Divider, { thickness: "thin", variant: "muted" }), jsxRuntime.jsx("div", { className: cn("flex items-center justify-end gap-3 px-6 py-4", footerClassName), children: footer })] }))] })] }));
|
|
2271
2270
|
});
|
|
2272
2271
|
Modal.displayName = "Modal";
|
|
2273
2272
|
|