react-better-html 1.1.75 → 1.1.76
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/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1335,7 +1335,7 @@ var theme = {
|
|
|
1335
1335
|
},
|
|
1336
1336
|
dark: {
|
|
1337
1337
|
textPrimary: "#f8f8f8",
|
|
1338
|
-
textSecondary: "#
|
|
1338
|
+
textSecondary: "#c8c8c8",
|
|
1339
1339
|
textLink: "#0894ff",
|
|
1340
1340
|
label: "#111111",
|
|
1341
1341
|
primary: "#9b6499",
|
|
@@ -1344,7 +1344,7 @@ var theme = {
|
|
|
1344
1344
|
success: "#28a745",
|
|
1345
1345
|
info: "#0fa0da",
|
|
1346
1346
|
warn: "#ffc107",
|
|
1347
|
-
error: "#
|
|
1347
|
+
error: "#f5384b",
|
|
1348
1348
|
base: "#f8f8f8",
|
|
1349
1349
|
backgroundBase: "#111111",
|
|
1350
1350
|
backgroundSecondary: "#222222",
|
|
@@ -5908,7 +5908,7 @@ import styled10, { css as css2 } from "styled-components";
|
|
|
5908
5908
|
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5909
5909
|
var defaultImageWidth = 120;
|
|
5910
5910
|
var TableStyledComponent = styled10.table.withConfig({
|
|
5911
|
-
shouldForwardProp: (prop) => !["isStriped", "withHover", "withStickyHeader", "theme"].includes(prop)
|
|
5911
|
+
shouldForwardProp: (prop) => !["isStriped", "withHover", "withStickyHeader", "colorTheme", "theme"].includes(prop)
|
|
5912
5912
|
})`
|
|
5913
5913
|
width: 100%;
|
|
5914
5914
|
border-collapse: collapse;
|
|
@@ -5936,7 +5936,7 @@ var TableStyledComponent = styled10.table.withConfig({
|
|
|
5936
5936
|
transition: ${props.theme.styles.transition};
|
|
5937
5937
|
|
|
5938
5938
|
&:not(.isHeader):hover {
|
|
5939
|
-
filter: brightness(0.95);
|
|
5939
|
+
filter: brightness(${props.colorTheme === "light" ? "0.95" : "0.85"});
|
|
5940
5940
|
}
|
|
5941
5941
|
` : ""}
|
|
5942
5942
|
|
|
@@ -5947,7 +5947,7 @@ var TableStyledComponent = styled10.table.withConfig({
|
|
|
5947
5947
|
}
|
|
5948
5948
|
|
|
5949
5949
|
td {
|
|
5950
|
-
border-top: 1px solid ${(props) => props.theme.colors.border}
|
|
5950
|
+
border-top: 1px solid ${(props) => props.theme.colors.border + (props.colorTheme === "light" ? "60" : "40")};
|
|
5951
5951
|
padding: ${(props) => props.theme.styles.gap}px ${(props) => props.theme.styles.space}px;
|
|
5952
5952
|
|
|
5953
5953
|
&.noData {
|
|
@@ -5974,12 +5974,14 @@ var TableComponent = forwardRef11(function Table({
|
|
|
5974
5974
|
columns,
|
|
5975
5975
|
data,
|
|
5976
5976
|
isStriped,
|
|
5977
|
+
isLoading,
|
|
5977
5978
|
withStickyHeader,
|
|
5978
5979
|
noDataItemsMessage = "No data available",
|
|
5979
5980
|
onClickRow,
|
|
5980
5981
|
onClickAllCheckboxes,
|
|
5981
5982
|
...props
|
|
5982
5983
|
}, ref) {
|
|
5984
|
+
const { colorTheme } = useBetterHtmlContext();
|
|
5983
5985
|
const theme2 = useTheme();
|
|
5984
5986
|
const [checkedItems, setCheckedItems] = useState8([]);
|
|
5985
5987
|
const renderCellContent = useCallback10(
|
|
@@ -6051,6 +6053,7 @@ var TableComponent = forwardRef11(function Table({
|
|
|
6051
6053
|
isStriped,
|
|
6052
6054
|
withHover: onClickRow !== void 0,
|
|
6053
6055
|
withStickyHeader,
|
|
6056
|
+
colorTheme,
|
|
6054
6057
|
theme: theme2,
|
|
6055
6058
|
children: [
|
|
6056
6059
|
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsx19("tr", { className: "isHeader", children: columns.map((column, index) => /* @__PURE__ */ jsx19(
|
|
@@ -6070,7 +6073,7 @@ var TableComponent = forwardRef11(function Table({
|
|
|
6070
6073
|
},
|
|
6071
6074
|
column.type + column.label + index
|
|
6072
6075
|
)) }) }),
|
|
6073
|
-
/* @__PURE__ */ jsx19("tbody", { children: data.length > 0 ? data.map((item, rowIndex) => /* @__PURE__ */ jsx19(
|
|
6076
|
+
/* @__PURE__ */ jsx19("tbody", { children: isLoading ? /* @__PURE__ */ jsx19("tr", { children: /* @__PURE__ */ jsx19("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx19(Loader_default.box, {}) }) }) : data.length > 0 ? data.map((item, rowIndex) => /* @__PURE__ */ jsx19(
|
|
6074
6077
|
"tr",
|
|
6075
6078
|
{
|
|
6076
6079
|
className: onClickRow ? "isClickable" : void 0,
|