@homebound/beam 4.14.5 → 4.14.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 CHANGED
@@ -14430,7 +14430,7 @@ function GridTable(props) {
14430
14430
  }
14431
14431
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
14432
14432
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ref: resizeRef, ...(0, import_runtime42.trussProps)(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)), ...tid.probe }),
14433
- loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ...(0, import_runtime42.trussProps)(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Loader, { ...tid.loadingSpinner }) }),
14433
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ...(0, import_runtime42.trussProps)(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Loader, { ...tid.loadingSpinner, size: "md" }) }),
14434
14434
  as === "card" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(VirtualGridTableView, { style: tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition, loading }) : renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
14435
14435
  ] }) });
14436
14436
  }
@@ -25323,11 +25323,12 @@ function GridTableLayoutComponent(props) {
25323
25323
  const emptyState = (0, import_react130.useMemo)(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
25324
25324
  const tableActionsEl = /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef, actions });
25325
25325
  const cardAs = view === "card" ? "card" : void 0;
25326
+ const tableStyle = (0, import_react130.useMemo)(() => getDefaultStyle(tableProps.style), [tableProps.style]);
25326
25327
  const tableBody = /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_jsx_runtime178.Fragment, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(GridTable, { ...tableProps, ...cardAs ? {
25327
25328
  as: cardAs
25328
- } : {}, api, emptyState, filter: clientSearch, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(QueryTable, { ...tableProps, ...cardAs ? {
25329
+ } : {}, api, emptyState, filter: clientSearch, style: tableStyle, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(QueryTable, { ...tableProps, ...cardAs ? {
25329
25330
  as: cardAs
25330
- } : {}, api, emptyState, filter: clientSearch, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
25331
+ } : {}, api, emptyState, filter: clientSearch, style: tableStyle, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
25331
25332
  const tableScrollContent = /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
25332
25333
  showTableActions && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)("div", { ref: tableActionsRef, ...(0, import_runtime117.trussProps)({
25333
25334
  ...inDocumentScrollLayout ? {
@@ -25373,6 +25374,13 @@ function GridTableLayoutComponent(props) {
25373
25374
  );
25374
25375
  }
25375
25376
  var GridTableLayout = import_react130.default.memo(GridTableLayoutComponent);
25377
+ function getDefaultStyle(style) {
25378
+ if (style !== void 0 && !isGridStyleDef(style)) return style;
25379
+ return {
25380
+ allWhite: true,
25381
+ ...style
25382
+ };
25383
+ }
25376
25384
  function validateColumns(columns) {
25377
25385
  for (const col of columns) {
25378
25386
  if (!col.id || !col.name) {
@@ -28931,15 +28939,13 @@ var import_react_router_dom8 = require("react-router-dom");
28931
28939
  var import_runtime145 = require("@homebound/truss/runtime");
28932
28940
  var import_jsx_runtime224 = require("react/jsx-runtime");
28933
28941
  function TabsWithContent(props) {
28934
- const styles = hideTabs(props) ? {} : {
28935
- paddingTop: "pt3"
28936
- };
28942
+ const {
28943
+ omitTopSpacing = false,
28944
+ ...tabProps
28945
+ } = props;
28937
28946
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_jsx_runtime224.Fragment, { children: [
28938
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Tabs, { ...props }),
28939
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(TabContent, { ...props, contentXss: {
28940
- ...styles,
28941
- ...props.contentXss
28942
- } })
28947
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Tabs, { ...tabProps }),
28948
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(TabContent, { ...tabProps, omitTopSpacing: omitTopSpacing || hideTabs(props) })
28943
28949
  ] });
28944
28950
  }
28945
28951
  function TabContent(props) {
@@ -28947,7 +28953,8 @@ function TabContent(props) {
28947
28953
  const {
28948
28954
  tabs,
28949
28955
  contentXss = {},
28950
- omitFullBleedPadding = false
28956
+ omitFullBleedPadding = false,
28957
+ omitTopSpacing = false
28951
28958
  } = props;
28952
28959
  const location = (0, import_react_router_dom8.useLocation)();
28953
28960
  const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
@@ -28961,7 +28968,26 @@ function TabContent(props) {
28961
28968
  return (
28962
28969
  // Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
28963
28970
  // Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
28964
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...(0, import_runtime145.trussProps)(contentXss), children: selectedTab.render() }) })
28971
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
28972
+ "div",
28973
+ {
28974
+ "aria-labelledby": `${uniqueValue}-tab`,
28975
+ id: `${uniqueValue}-tabPanel`,
28976
+ role: "tabpanel",
28977
+ tabIndex: 0,
28978
+ ...tid.panel,
28979
+ ...selfTopSpaced,
28980
+ ...(0, import_runtime145.trussProps)({
28981
+ ...{
28982
+ ...!omitTopSpacing ? {
28983
+ paddingTop: "first_child_n_data_self_top_spaced_pt3"
28984
+ } : {}
28985
+ },
28986
+ ...contentXss
28987
+ }),
28988
+ children: selectedTab.render()
28989
+ }
28990
+ ) })
28965
28991
  );
28966
28992
  }
28967
28993
  function Tabs(props) {
@@ -30024,7 +30050,7 @@ function PageHeaderLayout(props) {
30024
30050
  flexShrink: "fs0",
30025
30051
  width: "w100"
30026
30052
  }), children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime156.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
30027
- /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: "df fdc fg1 mh0 w100 first_child_n_data_self_top_spaced_mt3", ...tid.body, children })
30053
+ /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: "df fdc fg1 mh0 w100 first_child_n_data_self_top_spaced_pt3", ...tid.body, children })
30028
30054
  ] }) });
30029
30055
  }
30030
30056