@typeolymp/ui-components 2.1.1 → 2.1.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/build/index.js
CHANGED
|
@@ -17921,10 +17921,10 @@ var templateObject_1$i, templateObject_2$i, templateObject_3$8;
|
|
|
17921
17921
|
|
|
17922
17922
|
var ProgressBar = function (props) { return (jsxRuntime.jsxs(Wrapper, { children: [jsxRuntime.jsx(StyledProgressBar, __assign$2({}, props, { children: jsxRuntime.jsx(Indicator$1, __assign$2({}, props)) })), props.showInfo && (jsxRuntime.jsx(Paragraph, __assign$2({ size: "small" }, { children: props.info ? props.info : "".concat(props.percent, "%") })))] })); };
|
|
17923
17923
|
|
|
17924
|
-
var Container$a = styled__default["default"].ol(templateObject_1$h || (templateObject_1$h = __makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n"], ["\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n"])));
|
|
17925
|
-
var
|
|
17924
|
+
var Container$a = styled__default["default"].ol(templateObject_1$h || (templateObject_1$h = __makeTemplateObject$1(["\n display: flex;\n justify-content: space-between;\n gap: 20px;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n list-style-type: none;\n position: relative;\n\n :after {\n content: \"\";\n height: 4px;\n width: 100%;\n background-color: ", ";\n position: absolute;\n top: 24px;\n z-index: -1;\n }\n"], ["\n display: flex;\n justify-content: space-between;\n gap: 20px;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n list-style-type: none;\n position: relative;\n\n :after {\n content: \"\";\n height: 4px;\n width: 100%;\n background-color: ", ";\n position: absolute;\n top: 24px;\n z-index: -1;\n }\n"])), theme.colors.lightGray.dark);
|
|
17925
|
+
var Dot$2 = styled__default["default"].div(templateObject_2$h || (templateObject_2$h = __makeTemplateObject$1(["\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: 10px solid ", ";\n cursor: ", ";\n\n background-color: ", ";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n :hover {\n background-color: ", ";\n }\n\n > div {\n pointer-events: none;\n }\n"], ["\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: 10px solid ", ";\n cursor: ", ";\n\n background-color: ", ";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n :hover {\n background-color: ", ";\n }\n\n > div {\n pointer-events: none;\n }\n"])), theme.colors.lightGray.light, function (_a) {
|
|
17926
17926
|
var status = _a.status;
|
|
17927
|
-
return
|
|
17927
|
+
return status === "passed" ? "pointer" : "not-allowed";
|
|
17928
17928
|
}, function (_a) {
|
|
17929
17929
|
var status = _a.status;
|
|
17930
17930
|
switch (status) {
|
|
@@ -17932,18 +17932,20 @@ var Step$2 = styled__default["default"].li(templateObject_2$h || (templateObject
|
|
|
17932
17932
|
return theme.colors.green.base;
|
|
17933
17933
|
case "active":
|
|
17934
17934
|
return theme.colors.blue.base;
|
|
17935
|
-
|
|
17935
|
+
case "waiting":
|
|
17936
17936
|
return theme.colors.lightGray.dark;
|
|
17937
17937
|
}
|
|
17938
|
-
},
|
|
17938
|
+
}, function (_a) {
|
|
17939
17939
|
var status = _a.status;
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
|
|
17940
|
+
switch (status) {
|
|
17941
|
+
case "passed":
|
|
17942
|
+
return theme.colors.green.light;
|
|
17943
|
+
case "active":
|
|
17944
|
+
return theme.colors.blue.light;
|
|
17945
|
+
case "waiting":
|
|
17946
|
+
return theme.colors.lightGray.base;
|
|
17947
|
+
}
|
|
17948
|
+
});
|
|
17947
17949
|
var templateObject_1$h, templateObject_2$h;
|
|
17948
17950
|
|
|
17949
17951
|
var Steps$2 = function (props) { return (jsxRuntime.jsx(Container$a, { children: props.steps.map(function (_a, index) {
|
|
@@ -17953,16 +17955,16 @@ var Steps$2 = function (props) { return (jsxRuntime.jsx(Container$a, { children:
|
|
|
17953
17955
|
? "passed"
|
|
17954
17956
|
: props.current === step
|
|
17955
17957
|
? "active"
|
|
17956
|
-
: "";
|
|
17958
|
+
: "waiting";
|
|
17957
17959
|
var onClickStep = function () {
|
|
17958
17960
|
if (onClick && props.current >= step)
|
|
17959
17961
|
onClick(step);
|
|
17960
17962
|
};
|
|
17961
|
-
return (jsxRuntime.jsxs(
|
|
17963
|
+
return (jsxRuntime.jsxs("li", { children: [jsxRuntime.jsx(Dot$2, __assign$2({ status: status, onClick: onClickStep }, { children: status === "passed" ? (jsxRuntime.jsx(Icon, { type: "check", size: "small", color: "white" })) : (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", color: status === "active" ? "white" : "gray" }, { children: step }))) })), title && jsxRuntime.jsx(Paragraph, { children: title })] }, "step-".concat(step)));
|
|
17962
17964
|
}) })); };
|
|
17963
17965
|
|
|
17964
17966
|
var Container$9 = styled__default["default"].ol(templateObject_1$g || (templateObject_1$g = __makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n"], ["\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n"])));
|
|
17965
|
-
var Step$1 = styled__default["default"].li(templateObject_2$g || (templateObject_2$g = __makeTemplateObject$1(["\n display: flex;\n align-items: center;\n box-shadow: inset 0px -1px 0px ", ";\n padding: 20px 0 20px 20px;\n cursor: ", ";\n\n > div:first-child {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-sizing: initial;\n margin-right: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n background-color: ", ";\n }\n\n
|
|
17967
|
+
var Step$1 = styled__default["default"].li(templateObject_2$g || (templateObject_2$g = __makeTemplateObject$1(["\n display: flex;\n align-items: center;\n box-shadow: inset 0px -1px 0px ", ";\n padding: 20px 0 20px 20px;\n cursor: ", ";\n\n > div:first-child {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-sizing: initial;\n margin-right: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n background-color: ", ";\n }\n\n p {\n color: ", ";\n }\n\n :hover {\n background-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n box-shadow: inset 0px -1px 0px ", ";\n padding: 20px 0 20px 20px;\n cursor: ", ";\n\n > div:first-child {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-sizing: initial;\n margin-right: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n background-color: ", ";\n }\n\n p {\n color: ", ";\n }\n\n :hover {\n background-color: ", ";\n }\n"])), theme.colors.lightGray.dark, function (_a) {
|
|
17966
17968
|
var status = _a.status;
|
|
17967
17969
|
return (!!status ? "pointer" : "not-allowed");
|
|
17968
17970
|
}, function (_a) {
|
|
@@ -17975,11 +17977,6 @@ var Step$1 = styled__default["default"].li(templateObject_2$g || (templateObject
|
|
|
17975
17977
|
default:
|
|
17976
17978
|
return theme.colors.lightGray.dark;
|
|
17977
17979
|
}
|
|
17978
|
-
}, function (_a) {
|
|
17979
|
-
var status = _a.status;
|
|
17980
|
-
return status === "active"
|
|
17981
|
-
? theme.colors.lightGray.light
|
|
17982
|
-
: theme.colors.darkGray.light;
|
|
17983
17980
|
}, theme.colors.darkGray.base, theme.colors.lightGray.base);
|
|
17984
17981
|
var templateObject_1$g, templateObject_2$g;
|
|
17985
17982
|
|
|
@@ -17995,7 +17992,7 @@ var Steps$1 = function (props) { return (jsxRuntime.jsx(Container$9, { children:
|
|
|
17995
17992
|
if (onClick && props.current >= step)
|
|
17996
17993
|
onClick(step);
|
|
17997
17994
|
};
|
|
17998
|
-
return (jsxRuntime.jsxs(Step$1, __assign$2({ status: status, onClick: onClickStep }, { children: [jsxRuntime.jsx("div", { children: status === "passed" ? (jsxRuntime.jsx(Icon, { type: "check", size: "small", color: "white" })) : (jsxRuntime.jsx(Heading, __assign$2({ type: "h6" }, { children: step }))) }), title && jsxRuntime.jsx(Paragraph, { children: title })] }), "".concat(title, "-").concat(step)));
|
|
17995
|
+
return (jsxRuntime.jsxs(Step$1, __assign$2({ status: status, onClick: onClickStep }, { children: [jsxRuntime.jsx("div", { children: status === "passed" ? (jsxRuntime.jsx(Icon, { type: "check", size: "small", color: "white" })) : (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", color: status === "active" ? "white" : "gray" }, { children: step }))) }), title && jsxRuntime.jsx(Paragraph, { children: title })] }), "".concat(title, "-").concat(step)));
|
|
17999
17996
|
}) })); };
|
|
18000
17997
|
|
|
18001
17998
|
var Steps = function (props) {
|
|
@@ -48851,9 +48848,11 @@ var Table = function (_a) {
|
|
|
48851
48848
|
display: "flex",
|
|
48852
48849
|
justifyContent: "center",
|
|
48853
48850
|
marginTop: 10,
|
|
48854
|
-
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length > 0 &&
|
|
48851
|
+
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length > 0 &&
|
|
48852
|
+
selectedRowKeys.length === data.length, onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48855
48853
|
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48856
|
-
return (jsxRuntime.jsx(ColumnTitle, { children: jsxRuntime.jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title &&
|
|
48854
|
+
return (jsxRuntime.jsx(ColumnTitle, { children: jsxRuntime.jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title &&
|
|
48855
|
+
(typeof title === "string" ? (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))) : (title)), titlePopup && (jsxRuntime.jsx(Popup, __assign$2({ content: titlePopup }, { children: jsxRuntime.jsx(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
|
|
48857
48856
|
})] }) }), jsxRuntime.jsx(TableBody, { children: data.length === 0 ? (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(EmptyTableCell, __assign$2({ colSpan: rowSelection ? columns.length + 1 : columns.length }, { children: jsxRuntime.jsx(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) { return (jsxRuntime.jsxs(TableRow, { children: [rowSelection && (jsxRuntime.jsx(TableCell, { children: jsxRuntime.jsx(Checkbox, { id: rowIndex.toString(), name: rowIndex.toString(), value: row.key, checked: selectedRowKeys.includes(row.key), onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|
|
48858
48857
|
var dataIndex = _a.dataIndex, render = _a.render, align = _a.align;
|
|
48859
48858
|
var data = row[dataIndex];
|