@homebound/beam 4.11.0 → 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 +42 -4
- 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 +40 -4
- 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",
|
|
@@ -6139,11 +6142,14 @@ function variantStyles(variant, {
|
|
|
6139
6142
|
}]
|
|
6140
6143
|
},
|
|
6141
6144
|
hover: {
|
|
6142
|
-
backgroundColor: "
|
|
6143
|
-
|
|
6145
|
+
backgroundColor: ["bgColor_var", {
|
|
6146
|
+
"--backgroundColor": "var(--b-surface-raised-hover)"
|
|
6147
|
+
}]
|
|
6144
6148
|
},
|
|
6145
6149
|
focus: {
|
|
6146
|
-
backgroundColor: "
|
|
6150
|
+
backgroundColor: ["bgColor_var", {
|
|
6151
|
+
"--backgroundColor": "var(--b-surface-raised-hover)"
|
|
6152
|
+
}],
|
|
6147
6153
|
borderColor: ["bc_var", {
|
|
6148
6154
|
"--borderColor": "var(--b-field-border-focus)"
|
|
6149
6155
|
}]
|
|
@@ -8404,6 +8410,14 @@ function numericColumn(columnDef) {
|
|
|
8404
8410
|
align: "right"
|
|
8405
8411
|
};
|
|
8406
8412
|
}
|
|
8413
|
+
function fieldColumn(columnDef) {
|
|
8414
|
+
return {
|
|
8415
|
+
canHide: true,
|
|
8416
|
+
initHidden: false,
|
|
8417
|
+
...columnDef,
|
|
8418
|
+
isField: true
|
|
8419
|
+
};
|
|
8420
|
+
}
|
|
8407
8421
|
function actionColumn(columnDef) {
|
|
8408
8422
|
return {
|
|
8409
8423
|
clientSideSort: false,
|
|
@@ -9616,7 +9630,14 @@ function memoizedTableStyles() {
|
|
|
9616
9630
|
backgroundColor: ["bgColor_var", {
|
|
9617
9631
|
"--backgroundColor": (0, import_runtime20.maybeCssVar)("rgba(239, 246, 255, 1)" /* Blue50 */)
|
|
9618
9632
|
}]
|
|
9619
|
-
}
|
|
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
|
+
} : {}
|
|
9620
9641
|
};
|
|
9621
9642
|
}
|
|
9622
9643
|
return cache[key];
|
|
@@ -9702,6 +9723,8 @@ var cardStyle = {
|
|
|
9702
9723
|
}
|
|
9703
9724
|
},
|
|
9704
9725
|
rowHoverColor: "none",
|
|
9726
|
+
// Cards use their own cell padding; don't inherit flexible-row field padding.
|
|
9727
|
+
fieldCellCss: void 0,
|
|
9705
9728
|
// this will allow having N amount of nested childs without having to define each level margin
|
|
9706
9729
|
levels: (level) => ({
|
|
9707
9730
|
rowIndent: level > 0 ? 24 * level : void 0
|
|
@@ -9758,6 +9781,18 @@ var import_react_aria7 = require("react-aria");
|
|
|
9758
9781
|
var import_react_router_dom2 = require("react-router-dom");
|
|
9759
9782
|
var import_runtime21 = require("@homebound/truss/runtime");
|
|
9760
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
|
+
}
|
|
9761
9796
|
var defaultRenderFn = (as, colSpan) => (key, css2, content2, row, rowStyle, classNames, onClick, tooltip) => {
|
|
9762
9797
|
const Cell = as === "table" ? "td" : "div";
|
|
9763
9798
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Cell, { ...(0, import_runtime21.mergeProps)(classNames, void 0, {
|
|
@@ -10377,6 +10412,7 @@ function RowImpl(props) {
|
|
|
10377
10412
|
...isGridCellContent(maybeContent) && maybeContent.typeScale ? {
|
|
10378
10413
|
...__typography2[maybeContent.typeScale] ?? {}
|
|
10379
10414
|
} : {},
|
|
10415
|
+
...isBodyRow && (column2.isField || isGridCellContent(maybeContent) && maybeContent.field) && style.fieldCellCss,
|
|
10380
10416
|
// And any cell specific css
|
|
10381
10417
|
...isGridCellContent(maybeContent) && maybeContent.css ? maybeContent.css : {},
|
|
10382
10418
|
// Apply kept last row styling per-cell
|
|
@@ -30491,6 +30527,8 @@ var togglePressStyles = {
|
|
|
30491
30527
|
emptyCell,
|
|
30492
30528
|
ensureClientSideSortValueIsSortable,
|
|
30493
30529
|
environmentBannerSizePx,
|
|
30530
|
+
fieldCell,
|
|
30531
|
+
fieldColumn,
|
|
30494
30532
|
filterTestIdPrefix,
|
|
30495
30533
|
formatDate,
|
|
30496
30534
|
formatDateRange,
|