@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.esm.js
CHANGED
|
@@ -8322,10 +8322,11 @@ const StyledBanner = styled(Alert, {
|
|
|
8322
8322
|
padding: "8px 4px 8px 12px",
|
|
8323
8323
|
width: "800px",
|
|
8324
8324
|
maxWidth: "100%",
|
|
8325
|
-
height: "
|
|
8325
|
+
height: "auto",
|
|
8326
8326
|
display: "flex",
|
|
8327
|
+
flexDirection: "row",
|
|
8328
|
+
alignItems: "flex-start",
|
|
8327
8329
|
justifyContent: "center",
|
|
8328
|
-
alignItems: "center",
|
|
8329
8330
|
gap: "16px",
|
|
8330
8331
|
borderRadius: 0,
|
|
8331
8332
|
border: `1px solid ${getBannerColors(theme, status).border}`,
|
|
@@ -8347,15 +8348,12 @@ const StyledBanner = styled(Alert, {
|
|
|
8347
8348
|
padding: 0,
|
|
8348
8349
|
width: "486px",
|
|
8349
8350
|
maxWidth: "100%",
|
|
8350
|
-
height: "
|
|
8351
|
-
|
|
8352
|
-
alignItems: "center",
|
|
8351
|
+
height: "auto",
|
|
8352
|
+
minWidth: 0,
|
|
8353
8353
|
color: "inherit",
|
|
8354
8354
|
"& .MuiTypography-root": {
|
|
8355
|
-
display: "flex",
|
|
8356
|
-
alignItems: "center",
|
|
8357
8355
|
color: "inherit",
|
|
8358
|
-
height: "
|
|
8356
|
+
height: "auto",
|
|
8359
8357
|
letterSpacing: "0.15px",
|
|
8360
8358
|
},
|
|
8361
8359
|
},
|
|
@@ -12527,31 +12525,13 @@ const getMessageIconColor = (theme, type) => {
|
|
|
12527
12525
|
}
|
|
12528
12526
|
return theme.palette.vars.successIconDefault;
|
|
12529
12527
|
};
|
|
12530
|
-
const getMessageTitleWidth = (type) => {
|
|
12531
|
-
if (type === "warning") {
|
|
12532
|
-
return "317px";
|
|
12533
|
-
}
|
|
12534
|
-
if (type === "info") {
|
|
12535
|
-
return "339px";
|
|
12536
|
-
}
|
|
12537
|
-
return "319px";
|
|
12538
|
-
};
|
|
12539
|
-
const getMessageTitleContentWidth = (type) => {
|
|
12540
|
-
if (type === "warning") {
|
|
12541
|
-
return "249px";
|
|
12542
|
-
}
|
|
12543
|
-
if (type === "info") {
|
|
12544
|
-
return "271px";
|
|
12545
|
-
}
|
|
12546
|
-
return "251px";
|
|
12547
|
-
};
|
|
12548
12528
|
const getMessageRootStyles = (theme, type, hasTitle, hasAction) => ({
|
|
12549
12529
|
boxSizing: "border-box",
|
|
12550
12530
|
display: "flex",
|
|
12551
12531
|
flexDirection: "row",
|
|
12552
12532
|
alignItems: hasTitle ? "flex-start" : "center",
|
|
12553
|
-
width: hasAction ? "480px" :
|
|
12554
|
-
height:
|
|
12533
|
+
width: hasAction ? "480px" : "320px",
|
|
12534
|
+
height: "auto",
|
|
12555
12535
|
padding: "12px 16px",
|
|
12556
12536
|
gap: "12px",
|
|
12557
12537
|
background: theme.palette.vars.baseBackgroundWeak,
|
|
@@ -12567,12 +12547,13 @@ const getMessageIconStyles = (theme, type) => ({
|
|
|
12567
12547
|
width: "24px",
|
|
12568
12548
|
height: "24px",
|
|
12569
12549
|
});
|
|
12570
|
-
const getMessageContentStyles = (
|
|
12571
|
-
const getMessageTitleRowStyles = (
|
|
12550
|
+
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" } : {})));
|
|
12551
|
+
const getMessageTitleRowStyles = () => ({
|
|
12572
12552
|
display: "flex",
|
|
12573
12553
|
flexDirection: "row",
|
|
12574
12554
|
alignItems: "center",
|
|
12575
|
-
|
|
12555
|
+
flex: "1 1 auto",
|
|
12556
|
+
width: "stretch",
|
|
12576
12557
|
height: "24px",
|
|
12577
12558
|
gap: "4px",
|
|
12578
12559
|
});
|
|
@@ -12613,12 +12594,12 @@ const StyledMessageRoot = styled(Box, {
|
|
|
12613
12594
|
shouldForwardProp: (prop) => prop !== "messageType" && prop !== "hasTitle" && prop !== "hasAction",
|
|
12614
12595
|
})(({ theme, messageType, hasTitle, hasAction }) => getMessageRootStyles(theme, messageType, hasTitle, hasAction));
|
|
12615
12596
|
const StyledMessageContent = styled(Box, {
|
|
12616
|
-
shouldForwardProp: (prop) => prop !== "
|
|
12617
|
-
})(({
|
|
12597
|
+
shouldForwardProp: (prop) => prop !== "hasTitle" && prop !== "hasAction",
|
|
12598
|
+
})(({ hasTitle, hasAction }) => getMessageContentStyles(hasTitle, hasAction));
|
|
12618
12599
|
const StyledMessageTitle = styled("p")(({ theme }) => getMessageTitleStyles(theme));
|
|
12619
12600
|
const StyledMessageTitleRow = styled(Box, {
|
|
12620
12601
|
shouldForwardProp: (prop) => prop !== "messageType",
|
|
12621
|
-
})((
|
|
12602
|
+
})(() => getMessageTitleRowStyles());
|
|
12622
12603
|
const StyledMessageText = styled("p")(({ theme }) => getMessageTextStyles(theme));
|
|
12623
12604
|
const StyledMessageAction = styled("button")(({ theme }) => getMessageActionStyles(theme));
|
|
12624
12605
|
const StyledMessageCloseButton = styled(IconButton)(({ theme }) => getMessageCloseStyles(theme));
|
|
@@ -12641,7 +12622,7 @@ const Message = (_a) => {
|
|
|
12641
12622
|
var { actionLabel, children, hideClose = false, onActionClick, onClose, sx, title, type = "success" } = _a, props = __rest(_a, ["actionLabel", "children", "hideClose", "onActionClick", "onClose", "sx", "title", "type"]);
|
|
12642
12623
|
const hasTitle = Boolean(title);
|
|
12643
12624
|
const hasAction = Boolean(actionLabel);
|
|
12644
|
-
return (jsxs(StyledMessageRoot, Object.assign({ messageType: type, hasTitle: hasTitle, hasAction: hasAction, role: "status", sx: Array.isArray(sx) ? sx : sx ? [sx] : [] }, props, { children: [jsx(MessageIcon, { type: type }), jsxs(StyledMessageContent, {
|
|
12625
|
+
return (jsxs(StyledMessageRoot, Object.assign({ messageType: type, hasTitle: hasTitle, hasAction: hasAction, role: "status", sx: Array.isArray(sx) ? sx : sx ? [sx] : [] }, props, { children: [jsx(MessageIcon, { type: type }), jsxs(StyledMessageContent, { hasTitle: hasTitle, hasAction: hasAction, children: [title ? (jsxs(StyledMessageTitleRow, { messageType: type, children: [jsx(StyledMessageTitle, { children: title }), !hideClose && !hasAction ? (jsx(StyledMessageCloseButton, { "aria-label": "Close message", onClick: onClose, children: jsx(Close$1, {}) })) : null] })) : null, jsx(StyledMessageText, { children: children })] }), actionLabel ? (jsx(StyledMessageAction, { type: "button", onClick: onActionClick, children: actionLabel })) : null, !hideClose && (!hasTitle || hasAction) ? (jsx(StyledMessageCloseButton, { "aria-label": "Close message", onClick: onClose, children: jsx(Close$1, {}) })) : null] })));
|
|
12645
12626
|
};
|
|
12646
12627
|
|
|
12647
12628
|
const getNavigationActiveBackground = (theme) => theme.palette.mode === "dark"
|