@typeolymp/ui-components 2.1.2 → 2.1.4

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
@@ -48790,7 +48790,7 @@ var TableBody = styled__default["default"].tbody(templateObject_3$1 || (template
48790
48790
  styled__default["default"].tfoot(templateObject_4 || (templateObject_4 = __makeTemplateObject$1([""], [""])));
48791
48791
  var ColumnTitle = styled__default["default"].th(templateObject_5 || (templateObject_5 = __makeTemplateObject$1(["\n text-align: left;\n padding-left: 15px;\n"], ["\n text-align: left;\n padding-left: 15px;\n"])));
48792
48792
  var TableRow = styled__default["default"].tr(templateObject_6 || (templateObject_6 = __makeTemplateObject$1(["\n height: 50px;\n border-bottom: 1px solid ", ";\n\n :nth-child(odd) {\n background: ", ";\n }\n :nth-child(even) {\n background: ", ";\n }\n"], ["\n height: 50px;\n border-bottom: 1px solid ", ";\n\n :nth-child(odd) {\n background: ", ";\n }\n :nth-child(even) {\n background: ", ";\n }\n"])), theme.colors.lightGray.dark, theme.colors.lightGray.light, theme.colors.lightGray.base);
48793
- var TableCell = styled__default["default"].td(templateObject_7 || (templateObject_7 = __makeTemplateObject$1(["\n padding: 0 15px;\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n font-style: normal;\n line-height: 0;\n color: ", ";\n text-align: ", ";\n"], ["\n padding: 0 15px;\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n font-style: normal;\n line-height: 0;\n color: ", ";\n text-align: ", ";\n"])), theme.fonts.paragraph, theme.paragraph.medium.fontSize, theme.colors.darkGray.light, function (_a) {
48793
+ var TableCell = styled__default["default"].td(templateObject_7 || (templateObject_7 = __makeTemplateObject$1(["\n padding: 0 15px;\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n font-style: normal;\n color: ", ";\n text-align: ", ";\n"], ["\n padding: 0 15px;\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n font-style: normal;\n color: ", ";\n text-align: ", ";\n"])), theme.fonts.paragraph, theme.paragraph.medium.fontSize, theme.colors.darkGray.light, function (_a) {
48794
48794
  var align = _a.align;
48795
48795
  switch (align) {
48796
48796
  default:
@@ -48851,7 +48851,8 @@ var Table = function (_a) {
48851
48851
  } }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length > 0 &&
48852
48852
  selectedRowKeys.length === data.length, onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
48853
48853
  var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
48854
- return (jsxRuntime.jsx(ColumnTitle, { children: jsxRuntime.jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title && (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))), titlePopup && (jsxRuntime.jsx(Popup, __assign$2({ content: titlePopup }, { children: jsxRuntime.jsx(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
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)));
48855
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) {
48856
48857
  var dataIndex = _a.dataIndex, render = _a.render, align = _a.align;
48857
48858
  var data = row[dataIndex];