@open-ui-kit/core 2.2.1 → 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/README.md +2 -2
- 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/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A React component library and theme system built on Material UI, with Open UI Kit defaults for product interfaces.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@open-ui-kit/core)
|
|
6
|
-
[](https://
|
|
6
|
+
[](https://open-ui-kit.outshift.ai/storybook/)
|
|
7
7
|
[](../../LICENSE)
|
|
8
8
|
|
|
9
9
|
## What you get
|
|
@@ -123,7 +123,7 @@ yarn workspace @open-ui-kit/core storybook:build
|
|
|
123
123
|
|
|
124
124
|
## Documentation
|
|
125
125
|
|
|
126
|
-
- Storybook: https://
|
|
126
|
+
- Storybook: https://open-ui-kit.outshift.ai/storybook/
|
|
127
127
|
- Installation guide: https://github.com/outshift-open/open-ui-kit/blob/main/docs/data/material/getting-started/installation/installation.md
|
|
128
128
|
- Usage guide: https://github.com/outshift-open/open-ui-kit/blob/main/docs/data/material/getting-started/usage/usage.md
|
|
129
129
|
- Theming guide: https://github.com/outshift-open/open-ui-kit/blob/main/docs/data/material/getting-started/theming/theming.md
|
package/index.cjs.js
CHANGED
|
@@ -8367,10 +8367,11 @@ const StyledBanner = material.styled(material.Alert, {
|
|
|
8367
8367
|
padding: "8px 4px 8px 12px",
|
|
8368
8368
|
width: "800px",
|
|
8369
8369
|
maxWidth: "100%",
|
|
8370
|
-
height: "
|
|
8370
|
+
height: "auto",
|
|
8371
8371
|
display: "flex",
|
|
8372
|
+
flexDirection: "row",
|
|
8373
|
+
alignItems: "flex-start",
|
|
8372
8374
|
justifyContent: "center",
|
|
8373
|
-
alignItems: "center",
|
|
8374
8375
|
gap: "16px",
|
|
8375
8376
|
borderRadius: 0,
|
|
8376
8377
|
border: `1px solid ${getBannerColors(theme, status).border}`,
|
|
@@ -8392,15 +8393,12 @@ const StyledBanner = material.styled(material.Alert, {
|
|
|
8392
8393
|
padding: 0,
|
|
8393
8394
|
width: "486px",
|
|
8394
8395
|
maxWidth: "100%",
|
|
8395
|
-
height: "
|
|
8396
|
-
|
|
8397
|
-
alignItems: "center",
|
|
8396
|
+
height: "auto",
|
|
8397
|
+
minWidth: 0,
|
|
8398
8398
|
color: "inherit",
|
|
8399
8399
|
"& .MuiTypography-root": {
|
|
8400
|
-
display: "flex",
|
|
8401
|
-
alignItems: "center",
|
|
8402
8400
|
color: "inherit",
|
|
8403
|
-
height: "
|
|
8401
|
+
height: "auto",
|
|
8404
8402
|
letterSpacing: "0.15px",
|
|
8405
8403
|
},
|
|
8406
8404
|
},
|
|
@@ -12572,31 +12570,13 @@ const getMessageIconColor = (theme, type) => {
|
|
|
12572
12570
|
}
|
|
12573
12571
|
return theme.palette.vars.successIconDefault;
|
|
12574
12572
|
};
|
|
12575
|
-
const getMessageTitleWidth = (type) => {
|
|
12576
|
-
if (type === "warning") {
|
|
12577
|
-
return "317px";
|
|
12578
|
-
}
|
|
12579
|
-
if (type === "info") {
|
|
12580
|
-
return "339px";
|
|
12581
|
-
}
|
|
12582
|
-
return "319px";
|
|
12583
|
-
};
|
|
12584
|
-
const getMessageTitleContentWidth = (type) => {
|
|
12585
|
-
if (type === "warning") {
|
|
12586
|
-
return "249px";
|
|
12587
|
-
}
|
|
12588
|
-
if (type === "info") {
|
|
12589
|
-
return "271px";
|
|
12590
|
-
}
|
|
12591
|
-
return "251px";
|
|
12592
|
-
};
|
|
12593
12573
|
const getMessageRootStyles = (theme, type, hasTitle, hasAction) => ({
|
|
12594
12574
|
boxSizing: "border-box",
|
|
12595
12575
|
display: "flex",
|
|
12596
12576
|
flexDirection: "row",
|
|
12597
12577
|
alignItems: hasTitle ? "flex-start" : "center",
|
|
12598
|
-
width: hasAction ? "480px" :
|
|
12599
|
-
height:
|
|
12578
|
+
width: hasAction ? "480px" : "320px",
|
|
12579
|
+
height: "auto",
|
|
12600
12580
|
padding: "12px 16px",
|
|
12601
12581
|
gap: "12px",
|
|
12602
12582
|
background: theme.palette.vars.baseBackgroundWeak,
|
|
@@ -12612,12 +12592,13 @@ const getMessageIconStyles = (theme, type) => ({
|
|
|
12612
12592
|
width: "24px",
|
|
12613
12593
|
height: "24px",
|
|
12614
12594
|
});
|
|
12615
|
-
const getMessageContentStyles = (
|
|
12616
|
-
const getMessageTitleRowStyles = (
|
|
12595
|
+
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" } : {})));
|
|
12596
|
+
const getMessageTitleRowStyles = () => ({
|
|
12617
12597
|
display: "flex",
|
|
12618
12598
|
flexDirection: "row",
|
|
12619
12599
|
alignItems: "center",
|
|
12620
|
-
|
|
12600
|
+
flex: "1 1 auto",
|
|
12601
|
+
width: "stretch",
|
|
12621
12602
|
height: "24px",
|
|
12622
12603
|
gap: "4px",
|
|
12623
12604
|
});
|
|
@@ -12658,12 +12639,12 @@ const StyledMessageRoot = material.styled(material.Box, {
|
|
|
12658
12639
|
shouldForwardProp: (prop) => prop !== "messageType" && prop !== "hasTitle" && prop !== "hasAction",
|
|
12659
12640
|
})(({ theme, messageType, hasTitle, hasAction }) => getMessageRootStyles(theme, messageType, hasTitle, hasAction));
|
|
12660
12641
|
const StyledMessageContent = material.styled(material.Box, {
|
|
12661
|
-
shouldForwardProp: (prop) => prop !== "
|
|
12662
|
-
})(({
|
|
12642
|
+
shouldForwardProp: (prop) => prop !== "hasTitle" && prop !== "hasAction",
|
|
12643
|
+
})(({ hasTitle, hasAction }) => getMessageContentStyles(hasTitle, hasAction));
|
|
12663
12644
|
const StyledMessageTitle = material.styled("p")(({ theme }) => getMessageTitleStyles(theme));
|
|
12664
12645
|
const StyledMessageTitleRow = material.styled(material.Box, {
|
|
12665
12646
|
shouldForwardProp: (prop) => prop !== "messageType",
|
|
12666
|
-
})((
|
|
12647
|
+
})(() => getMessageTitleRowStyles());
|
|
12667
12648
|
const StyledMessageText = material.styled("p")(({ theme }) => getMessageTextStyles(theme));
|
|
12668
12649
|
const StyledMessageAction = material.styled("button")(({ theme }) => getMessageActionStyles(theme));
|
|
12669
12650
|
const StyledMessageCloseButton = material.styled(material.IconButton)(({ theme }) => getMessageCloseStyles(theme));
|
|
@@ -12686,7 +12667,7 @@ const Message = (_a) => {
|
|
|
12686
12667
|
var { actionLabel, children, hideClose = false, onActionClick, onClose, sx, title, type = "success" } = _a, props = __rest(_a, ["actionLabel", "children", "hideClose", "onActionClick", "onClose", "sx", "title", "type"]);
|
|
12687
12668
|
const hasTitle = Boolean(title);
|
|
12688
12669
|
const hasAction = Boolean(actionLabel);
|
|
12689
|
-
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, {
|
|
12670
|
+
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] })));
|
|
12690
12671
|
};
|
|
12691
12672
|
|
|
12692
12673
|
const getNavigationActiveBackground = (theme) => theme.palette.mode === "dark"
|