@homebound/beam 2.417.5 → 2.417.7
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.cjs +141 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -17
- package/dist/index.d.ts +115 -17
- package/dist/index.js +141 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7156,21 +7156,19 @@ function memoizedTableStyles() {
|
|
|
7156
7156
|
cellCss: {
|
|
7157
7157
|
...Css[cellTypography].gray900.bgWhite.ai(alignItems).pxPx(12).boxShadow(`inset 0 -1px 0 ${"rgba(236, 235, 235, 1)" /* Gray200 */}`).$,
|
|
7158
7158
|
...rowHeight === "flexible" ? Css.pyPx(12).$ : Css.wsnw.hPx(inlineEditing ? 48 : 36).$,
|
|
7159
|
-
...cellHighlight ? { "&:hover": Css.bgGray100.$ } : {}
|
|
7160
|
-
...bordered && { "&:first-child": Css.bl.bcGray200.$, "&:last-child": Css.br.bcGray200.$ }
|
|
7159
|
+
...cellHighlight ? { "&:hover": Css.bgGray100.$ } : {}
|
|
7161
7160
|
},
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
).$ : Css.addIn("> *", Css.bsh0.$).$,
|
|
7161
|
+
firstCellCss: bordered ? Css.bl.bcGray200.$ : void 0,
|
|
7162
|
+
lastCellCss: bordered ? Css.br.bcGray200.$ : void 0,
|
|
7163
|
+
firstRowCellCss: bordered ? Css.bt.bcGray200.$ : void 0,
|
|
7164
|
+
firstRowFirstCellCss: Css.borderRadius("8px 0 0 0 ").$,
|
|
7165
|
+
firstRowLastCellCss: Css.borderRadius("0 8px 0 0").$,
|
|
7166
|
+
// Keep `betweenRowsCss` on all body rows, but on the final body row
|
|
7167
|
+
// remove the inset shadow and, when bordered, replace it with a true bottom border.
|
|
7168
|
+
lastRowCellCss: bordered ? Css.bsh0.bb.bcGray200.$ : Css.bsh0.$,
|
|
7169
|
+
// Only apply bottom corner radii to the final body-row cells when using `bordered`.
|
|
7170
|
+
lastRowFirstCellCss: bordered ? Css.borderRadius("0 0 0 8px").$ : void 0,
|
|
7171
|
+
lastRowLastCellCss: bordered ? Css.borderRadius("0 0 8px 0").$ : void 0,
|
|
7174
7172
|
presentationSettings: {
|
|
7175
7173
|
borderless: true,
|
|
7176
7174
|
typeScale: "xs",
|
|
@@ -7189,6 +7187,7 @@ function memoizedTableStyles() {
|
|
|
7189
7187
|
var getTableStyles = memoizedTableStyles();
|
|
7190
7188
|
var totalsRowHeight = 40;
|
|
7191
7189
|
var expandableHeaderRowHeight = 40;
|
|
7190
|
+
var tableRowPrintBreakCss = Css.add("pageBreakAfter", "auto").add("pageBreakInside", "avoid").$;
|
|
7192
7191
|
var defaultStyle = getTableStyles({});
|
|
7193
7192
|
var condensedStyle = {
|
|
7194
7193
|
...getTableStyles({ rowHeight: "fixed" }),
|
|
@@ -7457,10 +7456,10 @@ function applyRowFn(column2, row, api, level, expanded, dragData) {
|
|
|
7457
7456
|
var ASC = "ASC";
|
|
7458
7457
|
var DESC = "DESC";
|
|
7459
7458
|
var emptyCell = { content: () => /* @__PURE__ */ jsx31(Fragment9, {}), value: "" };
|
|
7460
|
-
function getFirstOrLastCellCss(style, columnIndex, columns) {
|
|
7459
|
+
function getFirstOrLastCellCss(style, columnIndex, columns, colspan = 1) {
|
|
7461
7460
|
return {
|
|
7462
7461
|
...columnIndex === 0 ? style.firstCellCss : {},
|
|
7463
|
-
...columnIndex
|
|
7462
|
+
...columnIndex + colspan >= columns.length ? style.lastCellCss : {}
|
|
7464
7463
|
};
|
|
7465
7464
|
}
|
|
7466
7465
|
function isJSX(content) {
|
|
@@ -7851,7 +7850,7 @@ function ColumnResizeHandle({
|
|
|
7851
7850
|
import { useContext as useContext8 } from "react";
|
|
7852
7851
|
import { jsx as jsx33, jsxs as jsxs20 } from "@emotion/react/jsx-runtime";
|
|
7853
7852
|
function KeptGroupRow(props) {
|
|
7854
|
-
const { as, columnSizes, style, row, colSpan } = props;
|
|
7853
|
+
const { as, columnSizes, style, row, colSpan, isLastBodyRow } = props;
|
|
7855
7854
|
const CellTag = as === "table" ? "td" : "div";
|
|
7856
7855
|
const { tableState } = useContext8(TableStateContext);
|
|
7857
7856
|
const numHiddenSelectedRows = useComputed(() => tableState.keptRows.length, [tableState]);
|
|
@@ -7860,6 +7859,10 @@ function KeptGroupRow(props) {
|
|
|
7860
7859
|
{
|
|
7861
7860
|
css: {
|
|
7862
7861
|
...style.cellCss,
|
|
7862
|
+
...style.betweenRowsCss,
|
|
7863
|
+
...isLastBodyRow && style.lastRowCellCss,
|
|
7864
|
+
...isLastBodyRow && style.lastRowFirstCellCss,
|
|
7865
|
+
...isLastBodyRow && style.lastRowLastCellCss,
|
|
7863
7866
|
...style.keptGroupRowCss,
|
|
7864
7867
|
...Css.pl0.w(`calc(${columnSizes.join(" + ")})`).$
|
|
7865
7868
|
},
|
|
@@ -8174,6 +8177,9 @@ function RowImpl(props) {
|
|
|
8174
8177
|
cellHighlight,
|
|
8175
8178
|
omitRowHover,
|
|
8176
8179
|
hasExpandableHeader,
|
|
8180
|
+
isFirstHeadRow,
|
|
8181
|
+
isFirstBodyRow,
|
|
8182
|
+
isLastBodyRow,
|
|
8177
8183
|
resizedWidths,
|
|
8178
8184
|
setResizedWidth,
|
|
8179
8185
|
disableColumnResizing = true,
|
|
@@ -8192,6 +8198,8 @@ function RowImpl(props) {
|
|
|
8192
8198
|
const isTotals = row.kind === TOTALS;
|
|
8193
8199
|
const isExpandableHeader = row.kind === EXPANDABLE_HEADER;
|
|
8194
8200
|
const isKeptGroupRow = row.kind === KEPT_GROUP;
|
|
8201
|
+
const isBodyRow = !isHeader && !isTotals && !isExpandableHeader;
|
|
8202
|
+
const isFirstHeadCellRow = isExpandableHeader || !hasExpandableHeader && (isHeader || isTotals);
|
|
8195
8203
|
const rowStyle = rowStyles?.[row.kind];
|
|
8196
8204
|
const RowTag = as === "table" ? "tr" : "div";
|
|
8197
8205
|
const sortOn = tableState.sortConfig?.on;
|
|
@@ -8207,6 +8215,9 @@ function RowImpl(props) {
|
|
|
8207
8215
|
};
|
|
8208
8216
|
const rowCss = {
|
|
8209
8217
|
...!reservedRowKinds.includes(row.kind) && style.nonHeaderRowCss,
|
|
8218
|
+
...isFirstBodyRow && style.firstBodyRowCss,
|
|
8219
|
+
...isFirstHeadRow && style.firstRowCss,
|
|
8220
|
+
...as === "table" && tableRowPrintBreakCss,
|
|
8210
8221
|
// Optionally include the row hover styles, by default they should be turned on.
|
|
8211
8222
|
...showRowHoverColor && {
|
|
8212
8223
|
// Even though backgroundColor is set on the cellCss, the hover target is the row.
|
|
@@ -8219,6 +8230,7 @@ function RowImpl(props) {
|
|
|
8219
8230
|
...levelIndent && Css.mlPx(levelIndent).$,
|
|
8220
8231
|
// For virtual tables use `display: flex` to keep all cells on the same row.
|
|
8221
8232
|
...as === "table" ? {} : Css.relative.df.fg1.fs1.$,
|
|
8233
|
+
...isLastBodyRow && style.lastRowCss,
|
|
8222
8234
|
// Apply `cursorPointer` to the row if it has a link or `onClick` value.
|
|
8223
8235
|
...(rowStyle?.rowLink || rowStyle?.onClick) && { "&:hover": Css.cursorPointer.$ },
|
|
8224
8236
|
...maybeApplyFunction(row, rowStyle?.rowCss),
|
|
@@ -8239,7 +8251,17 @@ function RowImpl(props) {
|
|
|
8239
8251
|
[onDragOver]
|
|
8240
8252
|
);
|
|
8241
8253
|
const onDragOverDebounced = useDebouncedCallback4(dragOverCallback, 100);
|
|
8242
|
-
const RowContent = () => /* @__PURE__ */ jsx34(RowTag, { css: rowCss, ...others, "data-gridrow": true, ...getCount(row.id), ref, className: BorderHoverParent, children: isKeptGroupRow ? /* @__PURE__ */ jsx34(
|
|
8254
|
+
const RowContent = () => /* @__PURE__ */ jsx34(RowTag, { css: rowCss, ...others, "data-gridrow": true, ...getCount(row.id), ref, className: BorderHoverParent, children: isKeptGroupRow ? /* @__PURE__ */ jsx34(
|
|
8255
|
+
KeptGroupRow,
|
|
8256
|
+
{
|
|
8257
|
+
as,
|
|
8258
|
+
style,
|
|
8259
|
+
columnSizes,
|
|
8260
|
+
row,
|
|
8261
|
+
colSpan: columns.length,
|
|
8262
|
+
isLastBodyRow
|
|
8263
|
+
}
|
|
8264
|
+
) : columns.map((column2, columnIndex) => {
|
|
8243
8265
|
const maybeExpandedColumn = expandColumnHidden ? columns[columnIndex - 1] : column2;
|
|
8244
8266
|
const isExpanded = tableState.isExpandedColumn(maybeExpandedColumn.id);
|
|
8245
8267
|
if (column2.hideOnExpand && isExpanded) {
|
|
@@ -8323,8 +8345,16 @@ function RowImpl(props) {
|
|
|
8323
8345
|
...maybeStickyColumnStyles,
|
|
8324
8346
|
// Apply any static/all-cell styling
|
|
8325
8347
|
...style.cellCss,
|
|
8348
|
+
// Apply between-row cell styling for body rows.
|
|
8349
|
+
...isBodyRow && style.betweenRowsCss,
|
|
8350
|
+
...isFirstHeadCellRow && style.firstRowCellCss,
|
|
8351
|
+
...isLastBodyRow && style.lastRowCellCss,
|
|
8326
8352
|
// Then override with first/last cell styling
|
|
8327
|
-
...getFirstOrLastCellCss(style, columnIndex, columns),
|
|
8353
|
+
...getFirstOrLastCellCss(style, columnIndex, columns, currentColspan),
|
|
8354
|
+
...columnIndex === 0 && isFirstHeadCellRow && style.firstRowFirstCellCss,
|
|
8355
|
+
...columnIndex === columns.length - 1 && isFirstHeadCellRow && style.firstRowLastCellCss,
|
|
8356
|
+
...columnIndex === 0 && isLastBodyRow && style.lastRowFirstCellCss,
|
|
8357
|
+
...columnIndex === columns.length - 1 && isLastBodyRow && style.lastRowLastCellCss,
|
|
8328
8358
|
// Then override with per-cell/per-row justification
|
|
8329
8359
|
...justificationCss,
|
|
8330
8360
|
// Then apply any header-specific override
|
|
@@ -8340,7 +8370,7 @@ function RowImpl(props) {
|
|
|
8340
8370
|
// Only apply if not the last column in the table AND when this column is the last column in the group of expandable column or not expanded AND
|
|
8341
8371
|
...hasExpandableHeader && columnIndex + currentColspan < columns.length && (isHeader || isTotals) && currentExpandedColumnCount === 0 && Css.boxShadow(`inset -1px -1px 0 ${"rgba(236, 235, 235, 1)" /* Gray200 */}`).$,
|
|
8342
8372
|
// Or level-specific styling
|
|
8343
|
-
|
|
8373
|
+
...isBodyRow && levelStyle?.cellCss,
|
|
8344
8374
|
// Level specific styling for the first content column
|
|
8345
8375
|
...applyFirstContentColumnStyles && levelStyle?.firstContentColumn,
|
|
8346
8376
|
// The specific cell's css (if any from GridCellContent)
|
|
@@ -8535,6 +8565,7 @@ function TextFieldBase(props) {
|
|
|
8535
8565
|
},
|
|
8536
8566
|
input: {
|
|
8537
8567
|
...Css.w100.mw0.outline0.fg1.bgTransparent.$,
|
|
8568
|
+
// Keep `addIn` for `::selection` until we finish the StyleX migration.
|
|
8538
8569
|
// Not using Truss's inline `if` statement here because `addIn` properties do not respect the if statement.
|
|
8539
8570
|
...contrast && !inputStylePalette && Css.addIn("&::selection", Css.bgGray800.$).$,
|
|
8540
8571
|
// For "multiline" fields we add top and bottom padding of 7px for compact, or 11px for non-compact, to properly match the height of the single line fields
|
|
@@ -13778,7 +13809,25 @@ function GridTable(props) {
|
|
|
13778
13809
|
let visibleDataRows2 = [];
|
|
13779
13810
|
const { visibleRows } = tableState;
|
|
13780
13811
|
const hasExpandableHeader = visibleRows.some((rs) => rs.row.id === EXPANDABLE_HEADER);
|
|
13812
|
+
const bodyRowsCount = visibleRows.filter((rs) => ![HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind)).length;
|
|
13813
|
+
const onlyKeptBodyRows = bodyRowsCount > 0 && visibleRows.every(
|
|
13814
|
+
(rs) => (
|
|
13815
|
+
// For our purposes, "body rows" are any non-header / non-totals rows.
|
|
13816
|
+
[HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind) || rs.isKept || rs.kind === KEPT_GROUP
|
|
13817
|
+
)
|
|
13818
|
+
);
|
|
13819
|
+
let bodyRowsSeen = 0;
|
|
13820
|
+
let foundFirstBodyRow = false;
|
|
13821
|
+
let foundFirstHeadRow = false;
|
|
13781
13822
|
visibleRows.forEach((rs) => {
|
|
13823
|
+
const isHeadRow = [HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind);
|
|
13824
|
+
const isFirstHeadRow = isHeadRow && !foundFirstHeadRow;
|
|
13825
|
+
const isBodyRow = ![HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind);
|
|
13826
|
+
const isFirstBodyRow = isBodyRow && !foundFirstBodyRow;
|
|
13827
|
+
if (isHeadRow) foundFirstHeadRow = true;
|
|
13828
|
+
if (isBodyRow) bodyRowsSeen += 1;
|
|
13829
|
+
if (isBodyRow) foundFirstBodyRow = true;
|
|
13830
|
+
const isLastBodyRow = isBodyRow && bodyRowsSeen === bodyRowsCount && !onlyKeptBodyRows;
|
|
13782
13831
|
const row = /* @__PURE__ */ jsx81(
|
|
13783
13832
|
Row,
|
|
13784
13833
|
{
|
|
@@ -13797,6 +13846,9 @@ function GridTable(props) {
|
|
|
13797
13846
|
cellHighlight: "cellHighlight" in maybeStyle && maybeStyle.cellHighlight === true,
|
|
13798
13847
|
omitRowHover: "rowHover" in maybeStyle && maybeStyle.rowHover === false,
|
|
13799
13848
|
hasExpandableHeader,
|
|
13849
|
+
isFirstHeadRow,
|
|
13850
|
+
isFirstBodyRow,
|
|
13851
|
+
isLastBodyRow,
|
|
13800
13852
|
resizedWidths,
|
|
13801
13853
|
setResizedWidth: handleColumnResize,
|
|
13802
13854
|
disableColumnResizing,
|
|
@@ -13895,27 +13947,30 @@ function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, firstR
|
|
|
13895
13947
|
"div",
|
|
13896
13948
|
{
|
|
13897
13949
|
css: {
|
|
13898
|
-
...style.firstRowCss && Css.addIn("& > div:first-of-type", style.firstRowCss).$,
|
|
13899
13950
|
...Css.if(stickyHeader).sticky.topPx(stickyOffset).z(zIndices.stickyHeader).$
|
|
13900
13951
|
},
|
|
13901
13952
|
children: tableHeadRows
|
|
13902
13953
|
}
|
|
13903
13954
|
),
|
|
13904
|
-
/* @__PURE__ */ jsxs48(
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13955
|
+
/* @__PURE__ */ jsxs48("div", { children: [
|
|
13956
|
+
keptSelectedRows,
|
|
13957
|
+
firstRowMessage && /* @__PURE__ */ jsx81(
|
|
13958
|
+
"div",
|
|
13959
|
+
{
|
|
13960
|
+
css: {
|
|
13961
|
+
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
13962
|
+
...style.firstRowMessageCss,
|
|
13963
|
+
...visibleDataRows.length === 0 && style.lastRowCss,
|
|
13964
|
+
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
13965
|
+
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
13966
|
+
...visibleDataRows.length === 0 && style.lastRowLastCellCss
|
|
13967
|
+
},
|
|
13968
|
+
"data-gridrow": true,
|
|
13969
|
+
children: firstRowMessage
|
|
13970
|
+
}
|
|
13971
|
+
),
|
|
13972
|
+
visibleDataRows
|
|
13973
|
+
] })
|
|
13919
13974
|
]
|
|
13920
13975
|
}
|
|
13921
13976
|
);
|
|
@@ -13927,10 +13982,6 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
13927
13982
|
ref: tableContainerRef,
|
|
13928
13983
|
css: {
|
|
13929
13984
|
...Css.w100.add("borderCollapse", "separate").add("borderSpacing", "0").$,
|
|
13930
|
-
...Css.addIn("& tr ", { pageBreakAfter: "auto", pageBreakInside: "avoid" }).$,
|
|
13931
|
-
...Css.addIn("& > tbody > tr > * ", style.betweenRowsCss || {}).addIn("& > tbody > tr:first-of-type", style.firstNonHeaderRowCss || {}).$,
|
|
13932
|
-
...Css.addIn("& > tbody > tr:last-of-type", style.lastRowCss).$,
|
|
13933
|
-
...Css.addIn("& > thead > tr:first-of-type", style.firstRowCss).$,
|
|
13934
13985
|
...style.rootCss,
|
|
13935
13986
|
...style.minWidthPx ? Css.mwPx(style.minWidthPx).$ : {},
|
|
13936
13987
|
...xss
|
|
@@ -13940,7 +13991,30 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
13940
13991
|
/* @__PURE__ */ jsx81("thead", { css: Css.if(stickyHeader).sticky.topPx(stickyOffset).z(zIndices.stickyHeader).$, children: tableHeadRows }),
|
|
13941
13992
|
/* @__PURE__ */ jsxs48("tbody", { children: [
|
|
13942
13993
|
keptSelectedRows,
|
|
13943
|
-
firstRowMessage && /* @__PURE__ */ jsx81(
|
|
13994
|
+
firstRowMessage && /* @__PURE__ */ jsx81(
|
|
13995
|
+
"tr",
|
|
13996
|
+
{
|
|
13997
|
+
css: {
|
|
13998
|
+
...tableRowPrintBreakCss,
|
|
13999
|
+
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
14000
|
+
...visibleDataRows.length === 0 && style.lastRowCss
|
|
14001
|
+
},
|
|
14002
|
+
children: /* @__PURE__ */ jsx81(
|
|
14003
|
+
"td",
|
|
14004
|
+
{
|
|
14005
|
+
colSpan: columns.length,
|
|
14006
|
+
css: {
|
|
14007
|
+
...style.betweenRowsCss,
|
|
14008
|
+
...style.firstRowMessageCss,
|
|
14009
|
+
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
14010
|
+
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
14011
|
+
...visibleDataRows.length === 0 && style.lastRowLastCellCss
|
|
14012
|
+
},
|
|
14013
|
+
children: firstRowMessage
|
|
14014
|
+
}
|
|
14015
|
+
)
|
|
14016
|
+
}
|
|
14017
|
+
),
|
|
13944
14018
|
visibleDataRows
|
|
13945
14019
|
] })
|
|
13946
14020
|
]
|
|
@@ -13993,7 +14067,28 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
13993
14067
|
if (index === 0) {
|
|
13994
14068
|
return (
|
|
13995
14069
|
// Ensure the fallback message is the same width as the table
|
|
13996
|
-
/* @__PURE__ */ jsx81(
|
|
14070
|
+
/* @__PURE__ */ jsx81(
|
|
14071
|
+
"div",
|
|
14072
|
+
{
|
|
14073
|
+
css: {
|
|
14074
|
+
...getTableRefWidthStyles(true),
|
|
14075
|
+
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
14076
|
+
...visibleDataRows.length === 0 && style.lastRowCss
|
|
14077
|
+
},
|
|
14078
|
+
children: /* @__PURE__ */ jsx81(
|
|
14079
|
+
"div",
|
|
14080
|
+
{
|
|
14081
|
+
css: {
|
|
14082
|
+
...style.firstRowMessageCss,
|
|
14083
|
+
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
14084
|
+
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
14085
|
+
...visibleDataRows.length === 0 && style.lastRowLastCellCss
|
|
14086
|
+
},
|
|
14087
|
+
children: firstRowMessage
|
|
14088
|
+
}
|
|
14089
|
+
)
|
|
14090
|
+
}
|
|
14091
|
+
)
|
|
13997
14092
|
);
|
|
13998
14093
|
}
|
|
13999
14094
|
index--;
|
|
@@ -14031,20 +14126,12 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
14031
14126
|
var VirtualRoot = memoizeOne(
|
|
14032
14127
|
(gs, _columns, id, xss) => {
|
|
14033
14128
|
return React13.forwardRef(function VirtualRoot2({ style, children }, ref) {
|
|
14034
|
-
const isHeader = Object.keys(style || {}).length === 0;
|
|
14035
14129
|
return /* @__PURE__ */ jsx81(
|
|
14036
14130
|
"div",
|
|
14037
14131
|
{
|
|
14038
14132
|
ref,
|
|
14039
14133
|
style: { ...style, ...{ minWidth: "fit-content" } },
|
|
14040
14134
|
css: {
|
|
14041
|
-
// Add an extra `> div` due to Item + itemContent both having divs
|
|
14042
|
-
...Css.addIn("& > div + div > div > *", gs.betweenRowsCss || {}).$,
|
|
14043
|
-
// Table list styles only
|
|
14044
|
-
...isHeader ? Css.addIn("& > div:first-of-type > *", gs.firstRowCss).$ : {
|
|
14045
|
-
...Css.addIn("& > div:first-of-type", gs.firstNonHeaderRowCss).$,
|
|
14046
|
-
...Css.addIn("& > div:last-of-type > *", gs.lastRowCss).$
|
|
14047
|
-
},
|
|
14048
14135
|
...gs.rootCss,
|
|
14049
14136
|
...gs.minWidthPx ? Css.mwPx(gs.minWidthPx).$ : {},
|
|
14050
14137
|
...xss
|
|
@@ -18023,8 +18110,10 @@ function useResponsiveGrid(props) {
|
|
|
18023
18110
|
|
|
18024
18111
|
// src/components/Grid/useResponsiveGridItem.ts
|
|
18025
18112
|
import { useContext as useContext18, useMemo as useMemo45 } from "react";
|
|
18026
|
-
function useResponsiveGridItem(
|
|
18027
|
-
const
|
|
18113
|
+
function useResponsiveGridItem(props) {
|
|
18114
|
+
const { colSpan = 1, gridConfig } = props;
|
|
18115
|
+
const contextConfig = useContext18(ResponsiveGridContext);
|
|
18116
|
+
const config = gridConfig ?? contextConfig;
|
|
18028
18117
|
const gridItemStyles = useMemo45(() => {
|
|
18029
18118
|
if (!config || colSpan <= 1) return {};
|
|
18030
18119
|
const { minColumnWidth, gap } = config;
|