@homebound/beam 4.14.6 → 4.14.8

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
@@ -28939,15 +28939,13 @@ var import_react_router_dom8 = require("react-router-dom");
28939
28939
  var import_runtime145 = require("@homebound/truss/runtime");
28940
28940
  var import_jsx_runtime224 = require("react/jsx-runtime");
28941
28941
  function TabsWithContent(props) {
28942
- const styles = hideTabs(props) ? {} : {
28943
- paddingTop: "pt3"
28944
- };
28942
+ const {
28943
+ omitTopSpacing = false,
28944
+ ...tabProps
28945
+ } = props;
28945
28946
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_jsx_runtime224.Fragment, { children: [
28946
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Tabs, { ...props }),
28947
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(TabContent, { ...props, contentXss: {
28948
- ...styles,
28949
- ...props.contentXss
28950
- } })
28947
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Tabs, { ...tabProps }),
28948
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(TabContent, { ...tabProps, omitTopSpacing: omitTopSpacing || hideTabs(props) })
28951
28949
  ] });
28952
28950
  }
28953
28951
  function TabContent(props) {
@@ -28955,7 +28953,8 @@ function TabContent(props) {
28955
28953
  const {
28956
28954
  tabs,
28957
28955
  contentXss = {},
28958
- omitFullBleedPadding = false
28956
+ omitFullBleedPadding = false,
28957
+ omitTopSpacing = false
28959
28958
  } = props;
28960
28959
  const location = (0, import_react_router_dom8.useLocation)();
28961
28960
  const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
@@ -28969,7 +28968,27 @@ function TabContent(props) {
28969
28968
  return (
28970
28969
  // Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
28971
28970
  // Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
28972
- /* @__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
+ // Top padding, unless the first child pads its own top (e.g. sticky table actions).
28982
+ ...{
28983
+ ...!omitTopSpacing ? {
28984
+ paddingTop: "n_has_data_self_top_spaced_first_child_pt3"
28985
+ } : {}
28986
+ },
28987
+ ...contentXss
28988
+ }),
28989
+ children: selectedTab.render()
28990
+ }
28991
+ ) })
28973
28992
  );
28974
28993
  }
28975
28994
  function Tabs(props) {
@@ -30032,7 +30051,7 @@ function PageHeaderLayout(props) {
30032
30051
  flexShrink: "fs0",
30033
30052
  width: "w100"
30034
30053
  }), children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime156.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
30035
- /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: "df fdc fg1 mh0 w100 first_child_n_data_self_top_spaced_mt3", ...tid.body, children })
30054
+ /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: "df fdc fg1 mh0 w100 n_has_data_self_top_spaced_first_child_pt3", ...tid.body, children })
30036
30055
  ] }) });
30037
30056
  }
30038
30057