@homebound/beam 3.105.0 → 3.105.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 CHANGED
@@ -20223,6 +20223,9 @@ function getSize(size) {
20223
20223
  // src/components/Snackbar/SnackbarContext.tsx
20224
20224
  var import_react99 = require("react");
20225
20225
 
20226
+ // src/components/Snackbar/Snackbar.tsx
20227
+ var import_react_dom4 = require("react-dom");
20228
+
20226
20229
  // src/components/Snackbar/SnackbarNotice.tsx
20227
20230
  var import_utils100 = require("@react-aria/utils");
20228
20231
  var import_react98 = require("react");
@@ -20360,7 +20363,7 @@ function Snackbar({
20360
20363
  offset
20361
20364
  }) {
20362
20365
  const tid = useTestIds({});
20363
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { ...tid.snackbarWrapper, ...(0, import_runtime90.trussProps)({
20366
+ return (0, import_react_dom4.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { ...tid.snackbarWrapper, ...(0, import_runtime90.trussProps)({
20364
20367
  position: "fixed",
20365
20368
  zIndex: ["z_var", {
20366
20369
  "--zIndex": (0, import_runtime90.maybeCssVar)(zIndices.snackbar)
@@ -20373,7 +20376,7 @@ function Snackbar({
20373
20376
  flexDirection: "fdc",
20374
20377
  alignItems: "aifs",
20375
20378
  gap: "gap_12px"
20376
- }), children: notices.map((data) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SnackbarNotice, { ...data }, data.id)) });
20379
+ }), children: notices.map((data) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SnackbarNotice, { ...data }, data.id)) }), document.body);
20377
20380
  }
20378
20381
  var defaultOffset = {
20379
20382
  bottom: 24
@@ -20400,7 +20403,7 @@ function useSnackbarContext() {
20400
20403
  // src/components/SuperDrawer/SuperDrawer.tsx
20401
20404
  var import_framer_motion = require("framer-motion");
20402
20405
  var import_react100 = require("react");
20403
- var import_react_dom4 = require("react-dom");
20406
+ var import_react_dom5 = require("react-dom");
20404
20407
 
20405
20408
  // src/components/SuperDrawer/utils.ts
20406
20409
  var SuperDrawerWidth = /* @__PURE__ */ ((SuperDrawerWidth2) => {
@@ -20449,7 +20452,7 @@ function SuperDrawer() {
20449
20452
  // eslint-disable-next-line react-hooks/exhaustive-deps
20450
20453
  [headerRef, content]
20451
20454
  );
20452
- return (0, import_react_dom4.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_framer_motion.AnimatePresence, { children: content && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_jsx_runtime122.Fragment, { children: /* @__PURE__ */ (0, import_react101.createElement)(
20455
+ return (0, import_react_dom5.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_framer_motion.AnimatePresence, { children: content && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_jsx_runtime122.Fragment, { children: /* @__PURE__ */ (0, import_react101.createElement)(
20453
20456
  import_framer_motion.motion.div,
20454
20457
  {
20455
20458
  ...testId,
@@ -23015,7 +23018,7 @@ var import_runtime107 = require("@homebound/truss/runtime");
23015
23018
  var import_framer_motion3 = require("framer-motion");
23016
23019
  var import_react118 = require("react");
23017
23020
  var import_react_aria54 = require("react-aria");
23018
- var import_react_dom5 = require("react-dom");
23021
+ var import_react_dom6 = require("react-dom");
23019
23022
 
23020
23023
  // src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayoutHeightContext.tsx
23021
23024
  var import_react116 = require("react");
@@ -23138,7 +23141,7 @@ function DocumentScrollRightPane({
23138
23141
  ease: "linear",
23139
23142
  duration: 0.2
23140
23143
  }, onAnimationComplete: (definition) => definition.x !== 0 && clearPane(), children: rightPaneContent }, "documentScrollRightPane") });
23141
- return sm ? (0, import_react_dom5.createPortal)(pane, document.body) : pane;
23144
+ return sm ? (0, import_react_dom6.createPortal)(pane, document.body) : pane;
23142
23145
  }
23143
23146
 
23144
23147
  // src/components/Layout/RightPaneLayout/DocumentScrollRightPaneLayout.tsx
@@ -24667,7 +24670,7 @@ function useRightPane() {
24667
24670
  }
24668
24671
 
24669
24672
  // src/components/Layout/ScrollableFooter.tsx
24670
- var import_react_dom6 = require("react-dom");
24673
+ var import_react_dom7 = require("react-dom");
24671
24674
  var import_jsx_runtime189 = require("react/jsx-runtime");
24672
24675
  function ScrollableFooter(props) {
24673
24676
  const { children } = props;
@@ -24675,7 +24678,7 @@ function ScrollableFooter(props) {
24675
24678
  if (!footerEl) {
24676
24679
  return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_jsx_runtime189.Fragment, { children });
24677
24680
  }
24678
- return (0, import_react_dom6.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_jsx_runtime189.Fragment, { children }), footerEl);
24681
+ return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_jsx_runtime189.Fragment, { children }), footerEl);
24679
24682
  }
24680
24683
 
24681
24684
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
@@ -26537,7 +26540,7 @@ function AppNavItems(props) {
26537
26540
  var import_framer_motion6 = require("framer-motion");
26538
26541
  var import_react147 = require("react");
26539
26542
  var import_react_aria63 = require("react-aria");
26540
- var import_react_dom7 = require("react-dom");
26543
+ var import_react_dom8 = require("react-dom");
26541
26544
  var import_react_router_dom7 = require("react-router-dom");
26542
26545
 
26543
26546
  // src/layouts/NavbarLayout/MobileSubNavContext.tsx
@@ -26599,7 +26602,7 @@ function NavbarMobileMenu(props) {
26599
26602
  setLevel("sub");
26600
26603
  setIsOpen(true);
26601
26604
  }, ...tid.mobileMenu }),
26602
- (0, import_react_dom7.createPortal)(
26605
+ (0, import_react_dom8.createPortal)(
26603
26606
  /* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
26604
26607
  /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(import_framer_motion6.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(NavbarMobileDrawer, { items, mobileSubNav, level, onLevelChange: setLevel, onClose: close, tid }) }),
26605
26608
  document.body
@@ -27106,16 +27109,18 @@ function SideNav(props) {
27106
27109
  const {
27107
27110
  top,
27108
27111
  items,
27109
- footer
27112
+ footer,
27113
+ showContentWhenCollapsed = false
27110
27114
  } = props;
27111
27115
  const {
27112
27116
  navState
27113
27117
  } = useSideNavLayoutContext();
27114
27118
  const tid = useTestIds(props, "sideNav");
27115
27119
  const panelCollapsed = navState === "collapse";
27116
- const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
27120
+ const hideContent = panelCollapsed && !showContentWhenCollapsed;
27121
+ const hideItems = hideContent || panelCollapsed && !allItemsHaveIcons(items);
27117
27122
  return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("nav", { className: "df fdc h100 fs0", ...tid, children: [
27118
- top !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
27123
+ !hideContent && top !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
27119
27124
  flexShrink: "fs0",
27120
27125
  paddingLeft: "pl2",
27121
27126
  paddingRight: "pr2",
@@ -27126,7 +27131,7 @@ function SideNav(props) {
27126
27131
  paddingBottom: "pb4"
27127
27132
  } : {}
27128
27133
  }), ...tid.top, children: top }),
27129
- /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
27134
+ !hideContent && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
27130
27135
  flexGrow: "fg1",
27131
27136
  overflowY: "oya",
27132
27137
  display: "df",
@@ -27138,8 +27143,8 @@ function SideNav(props) {
27138
27143
  ...top === void 0 ? {
27139
27144
  paddingTop: "pt5"
27140
27145
  } : {}
27141
- }), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(AppNavItems, { items, panelCollapsed }) }),
27142
- footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
27146
+ }), ...tid.items, children: !hideItems && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(AppNavItems, { items, panelCollapsed }) }),
27147
+ !hideContent && footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
27143
27148
  flexShrink: "fs0",
27144
27149
  paddingLeft: "pl2",
27145
27150
  paddingRight: "pr2",
@@ -27611,7 +27616,7 @@ var maxStepWidthPx = 280;
27611
27616
  var gapPx = 6;
27612
27617
 
27613
27618
  // src/components/SuperDrawer/components/SuperDrawerHeader.tsx
27614
- var import_react_dom8 = require("react-dom");
27619
+ var import_react_dom9 = require("react-dom");
27615
27620
  var import_runtime141 = require("@homebound/truss/runtime");
27616
27621
  var import_jsx_runtime221 = require("react/jsx-runtime");
27617
27622
  function SuperDrawerHeader(props) {
@@ -27630,7 +27635,7 @@ function SuperDrawerHeader(props) {
27630
27635
  const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
27631
27636
  const isDetail = currentContent !== firstContent;
27632
27637
  const tid = useTestIds({}, "superDrawerHeader");
27633
- return (0, import_react_dom8.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("div", { className: "df aic jcsb gap3", ...tid, children: [
27638
+ return (0, import_react_dom9.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("div", { className: "df aic jcsb gap3", ...tid, children: [
27634
27639
  isStructuredProps(props) ? /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("div", { className: "df jcsb aic gap2 fg1", children: [
27635
27640
  /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("div", { className: "fg1 df aic gap2", children: [
27636
27641
  /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("h1", { className: "fw6 fz_24px lh_32px", children: props.title }),