react-better-html 1.1.145 → 1.1.146
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +60 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7329,12 +7329,65 @@ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs17 } from "react/jsx-r
|
|
|
7329
7329
|
var defaultImageWidth = 160;
|
|
7330
7330
|
var maximumVisiblePages = 11;
|
|
7331
7331
|
var TableStyledComponent = styled11.table.withConfig({
|
|
7332
|
-
shouldForwardProp: (prop) => ![
|
|
7332
|
+
shouldForwardProp: (prop) => ![
|
|
7333
|
+
"isStriped",
|
|
7334
|
+
"withHover",
|
|
7335
|
+
"withStickyHeader",
|
|
7336
|
+
"colorTheme",
|
|
7337
|
+
"theme",
|
|
7338
|
+
"containsOverflowComponents",
|
|
7339
|
+
"withFooter"
|
|
7340
|
+
].includes(prop)
|
|
7333
7341
|
})`
|
|
7334
7342
|
width: 100%;
|
|
7335
7343
|
border-collapse: collapse;
|
|
7336
7344
|
border-spacing: 0;
|
|
7337
7345
|
|
|
7346
|
+
thead {
|
|
7347
|
+
tr:first-child {
|
|
7348
|
+
border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7349
|
+
border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7350
|
+
|
|
7351
|
+
th:first-child {
|
|
7352
|
+
border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7353
|
+
}
|
|
7354
|
+
|
|
7355
|
+
th:last-child {
|
|
7356
|
+
border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7357
|
+
}
|
|
7358
|
+
}
|
|
7359
|
+
}
|
|
7360
|
+
|
|
7361
|
+
tbody {
|
|
7362
|
+
tr:last-child {
|
|
7363
|
+
border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7364
|
+
border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7365
|
+
|
|
7366
|
+
td:first-child {
|
|
7367
|
+
border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7368
|
+
}
|
|
7369
|
+
|
|
7370
|
+
td:last-child {
|
|
7371
|
+
border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7372
|
+
}
|
|
7373
|
+
}
|
|
7374
|
+
}
|
|
7375
|
+
|
|
7376
|
+
tfoot {
|
|
7377
|
+
tr:last-child {
|
|
7378
|
+
border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7379
|
+
border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7380
|
+
|
|
7381
|
+
td:first-child {
|
|
7382
|
+
border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7383
|
+
}
|
|
7384
|
+
|
|
7385
|
+
td:last-child {
|
|
7386
|
+
border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
|
|
7387
|
+
}
|
|
7388
|
+
}
|
|
7389
|
+
}
|
|
7390
|
+
|
|
7338
7391
|
tr {
|
|
7339
7392
|
background-color: ${(props) => props.theme.colors.backgroundContent};
|
|
7340
7393
|
|
|
@@ -7427,6 +7480,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7427
7480
|
pageSize,
|
|
7428
7481
|
pageCount,
|
|
7429
7482
|
isInsideTableExpandRow,
|
|
7483
|
+
containsOverflowComponents,
|
|
7430
7484
|
getRowStyle,
|
|
7431
7485
|
onClickRow,
|
|
7432
7486
|
onClickAllCheckboxes,
|
|
@@ -7797,6 +7851,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7797
7851
|
},
|
|
7798
7852
|
[currentPage, setCurrentPage, pageCountInternal, setCheckedItems]
|
|
7799
7853
|
);
|
|
7854
|
+
const withFooter = pageSize !== void 0 && pageCountInternal > 1;
|
|
7800
7855
|
const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
|
|
7801
7856
|
return /* @__PURE__ */ jsxs17(Fragment6, { children: [
|
|
7802
7857
|
/* @__PURE__ */ jsx22(
|
|
@@ -7804,7 +7859,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7804
7859
|
{
|
|
7805
7860
|
border: `1px solid ${theme2.colors.border}`,
|
|
7806
7861
|
borderRadius: theme2.styles.borderRadius * 2,
|
|
7807
|
-
overflow: "auto",
|
|
7862
|
+
overflow: !containsOverflowComponents ? "auto" : void 0,
|
|
7808
7863
|
...props,
|
|
7809
7864
|
children: /* @__PURE__ */ jsxs17(
|
|
7810
7865
|
TableStyledComponent,
|
|
@@ -7814,6 +7869,8 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7814
7869
|
withStickyHeader,
|
|
7815
7870
|
colorTheme,
|
|
7816
7871
|
theme: theme2,
|
|
7872
|
+
containsOverflowComponents,
|
|
7873
|
+
withFooter,
|
|
7817
7874
|
children: [
|
|
7818
7875
|
/* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsx22("tr", { className: "isHeader", children: columns.map((column, index) => /* @__PURE__ */ jsx22(
|
|
7819
7876
|
ThStyledComponent,
|
|
@@ -7875,7 +7932,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7875
7932
|
),
|
|
7876
7933
|
expandedRows[rowIndex] && /* @__PURE__ */ jsx22("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: renderExpandedRow(item, rowIndex) }) })
|
|
7877
7934
|
] }, JSON.stringify(item) + rowIndex)) : /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx22(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
|
|
7878
|
-
|
|
7935
|
+
withFooter && /* @__PURE__ */ jsx22("tfoot", { children: /* @__PURE__ */ jsx22("tr", { className: "isFooter", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: /* @__PURE__ */ jsxs17(
|
|
7879
7936
|
Div_default.column,
|
|
7880
7937
|
{
|
|
7881
7938
|
position: "relative",
|