@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.d.cts CHANGED
@@ -10851,8 +10851,14 @@ type RequiredRenderRouteTabs<V extends string, X> = {
10851
10851
  * If you want to tease apart Tabs from their TabContent, you can use the `Tab`
10852
10852
  * and `TabContent` components directly.
10853
10853
  */
10854
- declare function TabsWithContent<V extends string, X extends Only<TabsContentXss, X>>(props: RequiredRenderTabs<V, X> | RequiredRenderRouteTabs<V, X>): React$1.JSX.Element;
10855
- declare function TabContent<V extends string, X extends Only<TabsContentXss, X>>(props: Omit<RequiredRenderTabs<V, X>, "onChange"> | RequiredRenderRouteTabs<V, X>): React$1.JSX.Element;
10854
+ declare function TabsWithContent<V extends string, X extends Only<TabsContentXss, X>>(props: (RequiredRenderTabs<V, X> | RequiredRenderRouteTabs<V, X>) & {
10855
+ /** Skip the default top gap. Also set when the tab list is hidden. */
10856
+ omitTopSpacing?: boolean;
10857
+ }): React$1.JSX.Element;
10858
+ declare function TabContent<V extends string, X extends Only<TabsContentXss, X>>(props: (Omit<RequiredRenderTabs<V, X>, "onChange"> | RequiredRenderRouteTabs<V, X>) & {
10859
+ /** Skip the default top gap. `TabsWithContent` sets this when the tab list is hidden. */
10860
+ omitTopSpacing?: boolean;
10861
+ }): React$1.JSX.Element;
10856
10862
  /** The top list of tabs. */
10857
10863
  declare function Tabs<V extends string, X extends Only<TabsContentXss, X>>(props: TabsProps<V, X> | RouteTabsProps<V, X>): React$1.JSX.Element;
10858
10864
 
package/dist/index.d.ts CHANGED
@@ -10851,8 +10851,14 @@ type RequiredRenderRouteTabs<V extends string, X> = {
10851
10851
  * If you want to tease apart Tabs from their TabContent, you can use the `Tab`
10852
10852
  * and `TabContent` components directly.
10853
10853
  */
10854
- declare function TabsWithContent<V extends string, X extends Only<TabsContentXss, X>>(props: RequiredRenderTabs<V, X> | RequiredRenderRouteTabs<V, X>): React$1.JSX.Element;
10855
- declare function TabContent<V extends string, X extends Only<TabsContentXss, X>>(props: Omit<RequiredRenderTabs<V, X>, "onChange"> | RequiredRenderRouteTabs<V, X>): React$1.JSX.Element;
10854
+ declare function TabsWithContent<V extends string, X extends Only<TabsContentXss, X>>(props: (RequiredRenderTabs<V, X> | RequiredRenderRouteTabs<V, X>) & {
10855
+ /** Skip the default top gap. Also set when the tab list is hidden. */
10856
+ omitTopSpacing?: boolean;
10857
+ }): React$1.JSX.Element;
10858
+ declare function TabContent<V extends string, X extends Only<TabsContentXss, X>>(props: (Omit<RequiredRenderTabs<V, X>, "onChange"> | RequiredRenderRouteTabs<V, X>) & {
10859
+ /** Skip the default top gap. `TabsWithContent` sets this when the tab list is hidden. */
10860
+ omitTopSpacing?: boolean;
10861
+ }): React$1.JSX.Element;
10856
10862
  /** The top list of tabs. */
10857
10863
  declare function Tabs<V extends string, X extends Only<TabsContentXss, X>>(props: TabsProps<V, X> | RouteTabsProps<V, X>): React$1.JSX.Element;
10858
10864
 
package/dist/index.js CHANGED
@@ -13954,7 +13954,7 @@ function GridTable(props) {
13954
13954
  }
13955
13955
  return /* @__PURE__ */ jsx52(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs33(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
13956
13956
  /* @__PURE__ */ jsx52("div", { ref: resizeRef, ...trussProps33(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)), ...tid.probe }),
13957
- loading && /* @__PURE__ */ jsx52("div", { ...trussProps33(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx52(Loader, { ...tid.loadingSpinner }) }),
13957
+ loading && /* @__PURE__ */ jsx52("div", { ...trussProps33(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx52(Loader, { ...tid.loadingSpinner, size: "md" }) }),
13958
13958
  as === "card" ? /* @__PURE__ */ jsx52(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx52(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)
13959
13959
  ] }) });
13960
13960
  }
@@ -24853,11 +24853,12 @@ function GridTableLayoutComponent(props) {
24853
24853
  const emptyState = useMemo45(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
24854
24854
  const tableActionsEl = /* @__PURE__ */ jsx178(_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 });
24855
24855
  const cardAs = view === "card" ? "card" : void 0;
24856
+ const tableStyle = useMemo45(() => getDefaultStyle(tableProps.style), [tableProps.style]);
24856
24857
  const tableBody = /* @__PURE__ */ jsx178(Fragment40, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx178(GridTable, { ...tableProps, ...cardAs ? {
24857
24858
  as: cardAs
24858
- } : {}, api, emptyState, filter: clientSearch, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ jsx178(QueryTable, { ...tableProps, ...cardAs ? {
24859
+ } : {}, api, emptyState, filter: clientSearch, style: tableStyle, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ jsx178(QueryTable, { ...tableProps, ...cardAs ? {
24859
24860
  as: cardAs
24860
- } : {}, api, emptyState, filter: clientSearch, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
24861
+ } : {}, api, emptyState, filter: clientSearch, style: tableStyle, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
24861
24862
  const tableScrollContent = /* @__PURE__ */ jsxs91(Fragment40, { children: [
24862
24863
  showTableActions && /* @__PURE__ */ jsx178("div", { ref: tableActionsRef, ...trussProps101({
24863
24864
  ...inDocumentScrollLayout ? {
@@ -24903,6 +24904,13 @@ function GridTableLayoutComponent(props) {
24903
24904
  );
24904
24905
  }
24905
24906
  var GridTableLayout = React18.memo(GridTableLayoutComponent);
24907
+ function getDefaultStyle(style) {
24908
+ if (style !== void 0 && !isGridStyleDef(style)) return style;
24909
+ return {
24910
+ allWhite: true,
24911
+ ...style
24912
+ };
24913
+ }
24906
24914
  function validateColumns(columns) {
24907
24915
  for (const col of columns) {
24908
24916
  if (!col.id || !col.name) {
@@ -28469,15 +28477,13 @@ import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
28469
28477
  import { trussProps as trussProps128, maybeCssVar as maybeCssVar61 } from "@homebound/truss/runtime";
28470
28478
  import { Fragment as Fragment51, jsx as jsx224, jsxs as jsxs118 } from "react/jsx-runtime";
28471
28479
  function TabsWithContent(props) {
28472
- const styles = hideTabs(props) ? {} : {
28473
- paddingTop: "pt3"
28474
- };
28480
+ const {
28481
+ omitTopSpacing = false,
28482
+ ...tabProps
28483
+ } = props;
28475
28484
  return /* @__PURE__ */ jsxs118(Fragment51, { children: [
28476
- /* @__PURE__ */ jsx224(Tabs, { ...props }),
28477
- /* @__PURE__ */ jsx224(TabContent, { ...props, contentXss: {
28478
- ...styles,
28479
- ...props.contentXss
28480
- } })
28485
+ /* @__PURE__ */ jsx224(Tabs, { ...tabProps }),
28486
+ /* @__PURE__ */ jsx224(TabContent, { ...tabProps, omitTopSpacing: omitTopSpacing || hideTabs(props) })
28481
28487
  ] });
28482
28488
  }
28483
28489
  function TabContent(props) {
@@ -28485,7 +28491,8 @@ function TabContent(props) {
28485
28491
  const {
28486
28492
  tabs,
28487
28493
  contentXss = {},
28488
- omitFullBleedPadding = false
28494
+ omitFullBleedPadding = false,
28495
+ omitTopSpacing = false
28489
28496
  } = props;
28490
28497
  const location = useLocation2();
28491
28498
  const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
@@ -28499,7 +28506,26 @@ function TabContent(props) {
28499
28506
  return (
28500
28507
  // Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
28501
28508
  // Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
28502
- /* @__PURE__ */ jsx224(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx224("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps128(contentXss), children: selectedTab.render() }) })
28509
+ /* @__PURE__ */ jsx224(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx224(
28510
+ "div",
28511
+ {
28512
+ "aria-labelledby": `${uniqueValue}-tab`,
28513
+ id: `${uniqueValue}-tabPanel`,
28514
+ role: "tabpanel",
28515
+ tabIndex: 0,
28516
+ ...tid.panel,
28517
+ ...selfTopSpaced,
28518
+ ...trussProps128({
28519
+ ...{
28520
+ ...!omitTopSpacing ? {
28521
+ paddingTop: "first_child_n_data_self_top_spaced_pt3"
28522
+ } : {}
28523
+ },
28524
+ ...contentXss
28525
+ }),
28526
+ children: selectedTab.render()
28527
+ }
28528
+ ) })
28503
28529
  );
28504
28530
  }
28505
28531
  function Tabs(props) {
@@ -29562,7 +29588,7 @@ function PageHeaderLayout(props) {
29562
29588
  flexShrink: "fs0",
29563
29589
  width: "w100"
29564
29590
  }), children: /* @__PURE__ */ jsx236("div", { ref: headerMetricsRef, ...mergeProps42(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
29565
- /* @__PURE__ */ jsx236("div", { className: "df fdc fg1 mh0 w100 first_child_n_data_self_top_spaced_mt3", ...tid.body, children })
29591
+ /* @__PURE__ */ jsx236("div", { className: "df fdc fg1 mh0 w100 first_child_n_data_self_top_spaced_pt3", ...tid.body, children })
29566
29592
  ] }) });
29567
29593
  }
29568
29594