@homebound/beam 4.11.1 → 4.11.2
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 +36 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -302,6 +302,8 @@ __export(index_exports, {
|
|
|
302
302
|
emptyCell: () => emptyCell,
|
|
303
303
|
ensureClientSideSortValueIsSortable: () => ensureClientSideSortValueIsSortable,
|
|
304
304
|
environmentBannerSizePx: () => environmentBannerSizePx,
|
|
305
|
+
fieldCell: () => fieldCell,
|
|
306
|
+
fieldColumn: () => fieldColumn,
|
|
305
307
|
filterTestIdPrefix: () => filterTestIdPrefix,
|
|
306
308
|
formatDate: () => formatDate,
|
|
307
309
|
formatDateRange: () => formatDateRange,
|
|
@@ -5905,6 +5907,7 @@ var nonKindGridColumnKeys = [
|
|
|
5905
5907
|
"border",
|
|
5906
5908
|
"wrapAction",
|
|
5907
5909
|
"isAction",
|
|
5910
|
+
"isField",
|
|
5908
5911
|
"isLayoutGutter",
|
|
5909
5912
|
"id",
|
|
5910
5913
|
"canHide",
|
|
@@ -8407,6 +8410,14 @@ function numericColumn(columnDef) {
|
|
|
8407
8410
|
align: "right"
|
|
8408
8411
|
};
|
|
8409
8412
|
}
|
|
8413
|
+
function fieldColumn(columnDef) {
|
|
8414
|
+
return {
|
|
8415
|
+
canHide: true,
|
|
8416
|
+
initHidden: false,
|
|
8417
|
+
...columnDef,
|
|
8418
|
+
isField: true
|
|
8419
|
+
};
|
|
8420
|
+
}
|
|
8410
8421
|
function actionColumn(columnDef) {
|
|
8411
8422
|
return {
|
|
8412
8423
|
clientSideSort: false,
|
|
@@ -9619,7 +9630,14 @@ function memoizedTableStyles() {
|
|
|
9619
9630
|
backgroundColor: ["bgColor_var", {
|
|
9620
9631
|
"--backgroundColor": (0, import_runtime20.maybeCssVar)("rgba(239, 246, 255, 1)" /* Blue50 */)
|
|
9621
9632
|
}]
|
|
9622
|
-
}
|
|
9633
|
+
},
|
|
9634
|
+
// A compact field is 8px of its own padding and border; 4px here matches a text cell's 12px inset.
|
|
9635
|
+
...rowHeight === "flexible" ? {
|
|
9636
|
+
fieldCellCss: {
|
|
9637
|
+
paddingTop: "pt_4px",
|
|
9638
|
+
paddingBottom: "pb_4px"
|
|
9639
|
+
}
|
|
9640
|
+
} : {}
|
|
9623
9641
|
};
|
|
9624
9642
|
}
|
|
9625
9643
|
return cache[key];
|
|
@@ -9705,6 +9723,8 @@ var cardStyle = {
|
|
|
9705
9723
|
}
|
|
9706
9724
|
},
|
|
9707
9725
|
rowHoverColor: "none",
|
|
9726
|
+
// Cards use their own cell padding; don't inherit flexible-row field padding.
|
|
9727
|
+
fieldCellCss: void 0,
|
|
9708
9728
|
// this will allow having N amount of nested childs without having to define each level margin
|
|
9709
9729
|
levels: (level) => ({
|
|
9710
9730
|
rowIndent: level > 0 ? 24 * level : void 0
|
|
@@ -9761,6 +9781,18 @@ var import_react_aria7 = require("react-aria");
|
|
|
9761
9781
|
var import_react_router_dom2 = require("react-router-dom");
|
|
9762
9782
|
var import_runtime21 = require("@homebound/truss/runtime");
|
|
9763
9783
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9784
|
+
function fieldCell(cell) {
|
|
9785
|
+
if (typeof cell === "object" && cell !== null && "content" in cell) {
|
|
9786
|
+
return {
|
|
9787
|
+
...cell,
|
|
9788
|
+
field: true
|
|
9789
|
+
};
|
|
9790
|
+
}
|
|
9791
|
+
return {
|
|
9792
|
+
content: cell,
|
|
9793
|
+
field: true
|
|
9794
|
+
};
|
|
9795
|
+
}
|
|
9764
9796
|
var defaultRenderFn = (as, colSpan) => (key, css2, content2, row, rowStyle, classNames, onClick, tooltip) => {
|
|
9765
9797
|
const Cell = as === "table" ? "td" : "div";
|
|
9766
9798
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Cell, { ...(0, import_runtime21.mergeProps)(classNames, void 0, {
|
|
@@ -10380,6 +10412,7 @@ function RowImpl(props) {
|
|
|
10380
10412
|
...isGridCellContent(maybeContent) && maybeContent.typeScale ? {
|
|
10381
10413
|
...__typography2[maybeContent.typeScale] ?? {}
|
|
10382
10414
|
} : {},
|
|
10415
|
+
...isBodyRow && (column2.isField || isGridCellContent(maybeContent) && maybeContent.field) && style.fieldCellCss,
|
|
10383
10416
|
// And any cell specific css
|
|
10384
10417
|
...isGridCellContent(maybeContent) && maybeContent.css ? maybeContent.css : {},
|
|
10385
10418
|
// Apply kept last row styling per-cell
|
|
@@ -30494,6 +30527,8 @@ var togglePressStyles = {
|
|
|
30494
30527
|
emptyCell,
|
|
30495
30528
|
ensureClientSideSortValueIsSortable,
|
|
30496
30529
|
environmentBannerSizePx,
|
|
30530
|
+
fieldCell,
|
|
30531
|
+
fieldColumn,
|
|
30497
30532
|
filterTestIdPrefix,
|
|
30498
30533
|
formatDate,
|
|
30499
30534
|
formatDateRange,
|