@open-ui-kit/core 2.2.2 → 2.2.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/index.cjs.js +16 -35
- package/index.cjs.js.map +1 -1
- package/index.esm.js +16 -35
- package/index.esm.js.map +1 -1
- package/index.umd.js +16 -35
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -8296,10 +8296,11 @@
|
|
|
8296
8296
|
padding: "8px 4px 8px 12px",
|
|
8297
8297
|
width: "800px",
|
|
8298
8298
|
maxWidth: "100%",
|
|
8299
|
-
height: "
|
|
8299
|
+
height: "auto",
|
|
8300
8300
|
display: "flex",
|
|
8301
|
+
flexDirection: "row",
|
|
8302
|
+
alignItems: "flex-start",
|
|
8301
8303
|
justifyContent: "center",
|
|
8302
|
-
alignItems: "center",
|
|
8303
8304
|
gap: "16px",
|
|
8304
8305
|
borderRadius: 0,
|
|
8305
8306
|
border: `1px solid ${getBannerColors(theme, status).border}`,
|
|
@@ -8321,15 +8322,12 @@
|
|
|
8321
8322
|
padding: 0,
|
|
8322
8323
|
width: "486px",
|
|
8323
8324
|
maxWidth: "100%",
|
|
8324
|
-
height: "
|
|
8325
|
-
|
|
8326
|
-
alignItems: "center",
|
|
8325
|
+
height: "auto",
|
|
8326
|
+
minWidth: 0,
|
|
8327
8327
|
color: "inherit",
|
|
8328
8328
|
"& .MuiTypography-root": {
|
|
8329
|
-
display: "flex",
|
|
8330
|
-
alignItems: "center",
|
|
8331
8329
|
color: "inherit",
|
|
8332
|
-
height: "
|
|
8330
|
+
height: "auto",
|
|
8333
8331
|
letterSpacing: "0.15px",
|
|
8334
8332
|
},
|
|
8335
8333
|
},
|
|
@@ -12501,31 +12499,13 @@
|
|
|
12501
12499
|
}
|
|
12502
12500
|
return theme.palette.vars.successIconDefault;
|
|
12503
12501
|
};
|
|
12504
|
-
const getMessageTitleWidth = (type) => {
|
|
12505
|
-
if (type === "warning") {
|
|
12506
|
-
return "317px";
|
|
12507
|
-
}
|
|
12508
|
-
if (type === "info") {
|
|
12509
|
-
return "339px";
|
|
12510
|
-
}
|
|
12511
|
-
return "319px";
|
|
12512
|
-
};
|
|
12513
|
-
const getMessageTitleContentWidth = (type) => {
|
|
12514
|
-
if (type === "warning") {
|
|
12515
|
-
return "249px";
|
|
12516
|
-
}
|
|
12517
|
-
if (type === "info") {
|
|
12518
|
-
return "271px";
|
|
12519
|
-
}
|
|
12520
|
-
return "251px";
|
|
12521
|
-
};
|
|
12522
12502
|
const getMessageRootStyles = (theme, type, hasTitle, hasAction) => ({
|
|
12523
12503
|
boxSizing: "border-box",
|
|
12524
12504
|
display: "flex",
|
|
12525
12505
|
flexDirection: "row",
|
|
12526
12506
|
alignItems: hasTitle ? "flex-start" : "center",
|
|
12527
|
-
width: hasAction ? "480px" :
|
|
12528
|
-
height:
|
|
12507
|
+
width: hasAction ? "480px" : "320px",
|
|
12508
|
+
height: "auto",
|
|
12529
12509
|
padding: "12px 16px",
|
|
12530
12510
|
gap: "12px",
|
|
12531
12511
|
background: theme.palette.vars.baseBackgroundWeak,
|
|
@@ -12541,12 +12521,13 @@
|
|
|
12541
12521
|
width: "24px",
|
|
12542
12522
|
height: "24px",
|
|
12543
12523
|
});
|
|
12544
|
-
const getMessageContentStyles = (
|
|
12545
|
-
const getMessageTitleRowStyles = (
|
|
12524
|
+
const getMessageContentStyles = (hasTitle, hasAction) => (Object.assign({ display: "flex", flexDirection: hasTitle ? "column" : "row", alignItems: hasTitle ? "flex-start" : "center", flex: "1 1 auto", minWidth: 0, width: "stretch", gap: hasTitle ? "4px" : "16px" }, (hasAction ? { paddingRight: "8px" } : {})));
|
|
12525
|
+
const getMessageTitleRowStyles = () => ({
|
|
12546
12526
|
display: "flex",
|
|
12547
12527
|
flexDirection: "row",
|
|
12548
12528
|
alignItems: "center",
|
|
12549
|
-
|
|
12529
|
+
flex: "1 1 auto",
|
|
12530
|
+
width: "stretch",
|
|
12550
12531
|
height: "24px",
|
|
12551
12532
|
gap: "4px",
|
|
12552
12533
|
});
|
|
@@ -12587,12 +12568,12 @@
|
|
|
12587
12568
|
shouldForwardProp: (prop) => prop !== "messageType" && prop !== "hasTitle" && prop !== "hasAction",
|
|
12588
12569
|
})(({ theme, messageType, hasTitle, hasAction }) => getMessageRootStyles(theme, messageType, hasTitle, hasAction));
|
|
12589
12570
|
const StyledMessageContent = material.styled(material.Box, {
|
|
12590
|
-
shouldForwardProp: (prop) => prop !== "
|
|
12591
|
-
})(({
|
|
12571
|
+
shouldForwardProp: (prop) => prop !== "hasTitle" && prop !== "hasAction",
|
|
12572
|
+
})(({ hasTitle, hasAction }) => getMessageContentStyles(hasTitle, hasAction));
|
|
12592
12573
|
const StyledMessageTitle = material.styled("p")(({ theme }) => getMessageTitleStyles(theme));
|
|
12593
12574
|
const StyledMessageTitleRow = material.styled(material.Box, {
|
|
12594
12575
|
shouldForwardProp: (prop) => prop !== "messageType",
|
|
12595
|
-
})((
|
|
12576
|
+
})(() => getMessageTitleRowStyles());
|
|
12596
12577
|
const StyledMessageText = material.styled("p")(({ theme }) => getMessageTextStyles(theme));
|
|
12597
12578
|
const StyledMessageAction = material.styled("button")(({ theme }) => getMessageActionStyles(theme));
|
|
12598
12579
|
const StyledMessageCloseButton = material.styled(material.IconButton)(({ theme }) => getMessageCloseStyles(theme));
|
|
@@ -12615,7 +12596,7 @@
|
|
|
12615
12596
|
var { actionLabel, children, hideClose = false, onActionClick, onClose, sx, title, type = "success" } = _a, props = __rest(_a, ["actionLabel", "children", "hideClose", "onActionClick", "onClose", "sx", "title", "type"]);
|
|
12616
12597
|
const hasTitle = Boolean(title);
|
|
12617
12598
|
const hasAction = Boolean(actionLabel);
|
|
12618
|
-
return (jsxRuntime.jsxs(StyledMessageRoot, Object.assign({ messageType: type, hasTitle: hasTitle, hasAction: hasAction, role: "status", sx: Array.isArray(sx) ? sx : sx ? [sx] : [] }, props, { children: [jsxRuntime.jsx(MessageIcon, { type: type }), jsxRuntime.jsxs(StyledMessageContent, {
|
|
12599
|
+
return (jsxRuntime.jsxs(StyledMessageRoot, Object.assign({ messageType: type, hasTitle: hasTitle, hasAction: hasAction, role: "status", sx: Array.isArray(sx) ? sx : sx ? [sx] : [] }, props, { children: [jsxRuntime.jsx(MessageIcon, { type: type }), jsxRuntime.jsxs(StyledMessageContent, { hasTitle: hasTitle, hasAction: hasAction, children: [title ? (jsxRuntime.jsxs(StyledMessageTitleRow, { messageType: type, children: [jsxRuntime.jsx(StyledMessageTitle, { children: title }), !hideClose && !hasAction ? (jsxRuntime.jsx(StyledMessageCloseButton, { "aria-label": "Close message", onClick: onClose, children: jsxRuntime.jsx(iconsMaterial.Close, {}) })) : null] })) : null, jsxRuntime.jsx(StyledMessageText, { children: children })] }), actionLabel ? (jsxRuntime.jsx(StyledMessageAction, { type: "button", onClick: onActionClick, children: actionLabel })) : null, !hideClose && (!hasTitle || hasAction) ? (jsxRuntime.jsx(StyledMessageCloseButton, { "aria-label": "Close message", onClick: onClose, children: jsxRuntime.jsx(iconsMaterial.Close, {}) })) : null] })));
|
|
12619
12600
|
};
|
|
12620
12601
|
|
|
12621
12602
|
const getNavigationActiveBackground = (theme) => theme.palette.mode === "dark"
|