@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.d.cts CHANGED
@@ -10216,6 +10216,8 @@ type SideNavProps = {
10216
10216
  items: AppNavItem[];
10217
10217
  /** Optional area pinned to the bottom (user menu, settings, sign-out). */
10218
10218
  footer?: ReactNode;
10219
+ /** Keep `top` / `items` / `footer` in the collapsed rail (icon-only items). Default hides them. */
10220
+ showContentWhenCollapsed?: boolean;
10219
10221
  };
10220
10222
  declare function SideNav(props: SideNavProps): JSX.Element;
10221
10223
 
@@ -10738,6 +10740,9 @@ declare function defaultTestId(label: string): string;
10738
10740
  *
10739
10741
  * Keep values sparse so new layers can slot between existing ones without ripple
10740
10742
  * edits. Lower numbers sit behind higher numbers in the same stacking context.
10743
+ *
10744
+ * Global overlays (Modal, SuperDrawer, Snackbar) must portal to `document.body`, otherwise an app
10745
+ * root that establishes a stacking context traps them below the layers listed here.
10741
10746
  */
10742
10747
  declare const zIndices: {
10743
10748
  readonly tableExpandableIcon: 10;
package/dist/index.d.ts CHANGED
@@ -10216,6 +10216,8 @@ type SideNavProps = {
10216
10216
  items: AppNavItem[];
10217
10217
  /** Optional area pinned to the bottom (user menu, settings, sign-out). */
10218
10218
  footer?: ReactNode;
10219
+ /** Keep `top` / `items` / `footer` in the collapsed rail (icon-only items). Default hides them. */
10220
+ showContentWhenCollapsed?: boolean;
10219
10221
  };
10220
10222
  declare function SideNav(props: SideNavProps): JSX.Element;
10221
10223
 
@@ -10738,6 +10740,9 @@ declare function defaultTestId(label: string): string;
10738
10740
  *
10739
10741
  * Keep values sparse so new layers can slot between existing ones without ripple
10740
10742
  * edits. Lower numbers sit behind higher numbers in the same stacking context.
10743
+ *
10744
+ * Global overlays (Modal, SuperDrawer, Snackbar) must portal to `document.body`, otherwise an app
10745
+ * root that establishes a stacking context traps them below the layers listed here.
10741
10746
  */
10742
10747
  declare const zIndices: {
10743
10748
  readonly tableExpandableIcon: 10;
package/dist/index.js CHANGED
@@ -19715,6 +19715,9 @@ function getSize(size) {
19715
19715
  // src/components/Snackbar/SnackbarContext.tsx
19716
19716
  import { createContext as createContext8, useContext as useContext18, useMemo as useMemo32, useState as useState39 } from "react";
19717
19717
 
19718
+ // src/components/Snackbar/Snackbar.tsx
19719
+ import { createPortal as createPortal4 } from "react-dom";
19720
+
19718
19721
  // src/components/Snackbar/SnackbarNotice.tsx
19719
19722
  import { useLayoutEffect as useLayoutEffect7, useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
19720
19723
  import { useCallback as useCallback25, useRef as useRef48, useState as useState38 } from "react";
@@ -19852,7 +19855,7 @@ function Snackbar({
19852
19855
  offset
19853
19856
  }) {
19854
19857
  const tid = useTestIds({});
19855
- return /* @__PURE__ */ jsx120("div", { ...tid.snackbarWrapper, ...trussProps82({
19858
+ return createPortal4(/* @__PURE__ */ jsx120("div", { ...tid.snackbarWrapper, ...trussProps82({
19856
19859
  position: "fixed",
19857
19860
  zIndex: ["z_var", {
19858
19861
  "--zIndex": maybeCssVar40(zIndices.snackbar)
@@ -19865,7 +19868,7 @@ function Snackbar({
19865
19868
  flexDirection: "fdc",
19866
19869
  alignItems: "aifs",
19867
19870
  gap: "gap_12px"
19868
- }), children: notices.map((data) => /* @__PURE__ */ jsx120(SnackbarNotice, { ...data }, data.id)) });
19871
+ }), children: notices.map((data) => /* @__PURE__ */ jsx120(SnackbarNotice, { ...data }, data.id)) }), document.body);
19869
19872
  }
19870
19873
  var defaultOffset = {
19871
19874
  bottom: 24
@@ -19892,7 +19895,7 @@ function useSnackbarContext() {
19892
19895
  // src/components/SuperDrawer/SuperDrawer.tsx
19893
19896
  import { AnimatePresence, motion } from "framer-motion";
19894
19897
  import { useEffect as useEffect25, useRef as useRef49 } from "react";
19895
- import { createPortal as createPortal4 } from "react-dom";
19898
+ import { createPortal as createPortal5 } from "react-dom";
19896
19899
 
19897
19900
  // src/components/SuperDrawer/utils.ts
19898
19901
  var SuperDrawerWidth = /* @__PURE__ */ ((SuperDrawerWidth2) => {
@@ -19941,7 +19944,7 @@ function SuperDrawer() {
19941
19944
  // eslint-disable-next-line react-hooks/exhaustive-deps
19942
19945
  [headerRef, content]
19943
19946
  );
19944
- return createPortal4(/* @__PURE__ */ jsx122(AnimatePresence, { children: content && /* @__PURE__ */ jsx122(Fragment27, { children: /* @__PURE__ */ createElement4(
19947
+ return createPortal5(/* @__PURE__ */ jsx122(AnimatePresence, { children: content && /* @__PURE__ */ jsx122(Fragment27, { children: /* @__PURE__ */ createElement4(
19945
19948
  motion.div,
19946
19949
  {
19947
19950
  ...testId,
@@ -22507,7 +22510,7 @@ import { mergeProps as mergeProps27 } from "@homebound/truss/runtime";
22507
22510
  import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
22508
22511
  import { useEffect as useEffect27 } from "react";
22509
22512
  import { usePreventScroll as usePreventScroll2 } from "react-aria";
22510
- import { createPortal as createPortal5 } from "react-dom";
22513
+ import { createPortal as createPortal6 } from "react-dom";
22511
22514
 
22512
22515
  // src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayoutHeightContext.tsx
22513
22516
  import { createContext as createContext11, useContext as useContext21 } from "react";
@@ -22630,7 +22633,7 @@ function DocumentScrollRightPane({
22630
22633
  ease: "linear",
22631
22634
  duration: 0.2
22632
22635
  }, onAnimationComplete: (definition) => definition.x !== 0 && clearPane(), children: rightPaneContent }, "documentScrollRightPane") });
22633
- return sm ? createPortal5(pane, document.body) : pane;
22636
+ return sm ? createPortal6(pane, document.body) : pane;
22634
22637
  }
22635
22638
 
22636
22639
  // src/components/Layout/RightPaneLayout/DocumentScrollRightPaneLayout.tsx
@@ -24159,7 +24162,7 @@ function useRightPane() {
24159
24162
  }
24160
24163
 
24161
24164
  // src/components/Layout/ScrollableFooter.tsx
24162
- import { createPortal as createPortal6 } from "react-dom";
24165
+ import { createPortal as createPortal7 } from "react-dom";
24163
24166
  import { Fragment as Fragment42, jsx as jsx189 } from "react/jsx-runtime";
24164
24167
  function ScrollableFooter(props) {
24165
24168
  const { children } = props;
@@ -24167,7 +24170,7 @@ function ScrollableFooter(props) {
24167
24170
  if (!footerEl) {
24168
24171
  return /* @__PURE__ */ jsx189(Fragment42, { children });
24169
24172
  }
24170
- return createPortal6(/* @__PURE__ */ jsx189(Fragment42, { children }), footerEl);
24173
+ return createPortal7(/* @__PURE__ */ jsx189(Fragment42, { children }), footerEl);
24171
24174
  }
24172
24175
 
24173
24176
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
@@ -26029,7 +26032,7 @@ function AppNavItems(props) {
26029
26032
  import { AnimatePresence as AnimatePresence6, motion as motion6 } from "framer-motion";
26030
26033
  import { useEffect as useEffect35, useState as useState57 } from "react";
26031
26034
  import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll3 } from "react-aria";
26032
- import { createPortal as createPortal7 } from "react-dom";
26035
+ import { createPortal as createPortal8 } from "react-dom";
26033
26036
  import { useLocation } from "react-router-dom";
26034
26037
 
26035
26038
  // src/layouts/NavbarLayout/MobileSubNavContext.tsx
@@ -26091,7 +26094,7 @@ function NavbarMobileMenu(props) {
26091
26094
  setLevel("sub");
26092
26095
  setIsOpen(true);
26093
26096
  }, ...tid.mobileMenu }),
26094
- createPortal7(
26097
+ createPortal8(
26095
26098
  /* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
26096
26099
  /* @__PURE__ */ jsx212(AnimatePresence6, { children: isOpen && /* @__PURE__ */ jsx212(NavbarMobileDrawer, { items, mobileSubNav, level, onLevelChange: setLevel, onClose: close, tid }) }),
26097
26100
  document.body
@@ -26606,16 +26609,18 @@ function SideNav(props) {
26606
26609
  const {
26607
26610
  top,
26608
26611
  items,
26609
- footer
26612
+ footer,
26613
+ showContentWhenCollapsed = false
26610
26614
  } = props;
26611
26615
  const {
26612
26616
  navState
26613
26617
  } = useSideNavLayoutContext();
26614
26618
  const tid = useTestIds(props, "sideNav");
26615
26619
  const panelCollapsed = navState === "collapse";
26616
- const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
26620
+ const hideContent = panelCollapsed && !showContentWhenCollapsed;
26621
+ const hideItems = hideContent || panelCollapsed && !allItemsHaveIcons(items);
26617
26622
  return /* @__PURE__ */ jsxs111("nav", { className: "df fdc h100 fs0", ...tid, children: [
26618
- top !== void 0 && /* @__PURE__ */ jsx217("div", { ...trussProps124({
26623
+ !hideContent && top !== void 0 && /* @__PURE__ */ jsx217("div", { ...trussProps124({
26619
26624
  flexShrink: "fs0",
26620
26625
  paddingLeft: "pl2",
26621
26626
  paddingRight: "pr2",
@@ -26626,7 +26631,7 @@ function SideNav(props) {
26626
26631
  paddingBottom: "pb4"
26627
26632
  } : {}
26628
26633
  }), ...tid.top, children: top }),
26629
- /* @__PURE__ */ jsx217("div", { ...trussProps124({
26634
+ !hideContent && /* @__PURE__ */ jsx217("div", { ...trussProps124({
26630
26635
  flexGrow: "fg1",
26631
26636
  overflowY: "oya",
26632
26637
  display: "df",
@@ -26638,8 +26643,8 @@ function SideNav(props) {
26638
26643
  ...top === void 0 ? {
26639
26644
  paddingTop: "pt5"
26640
26645
  } : {}
26641
- }), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx217(AppNavItems, { items, panelCollapsed }) }),
26642
- footer !== void 0 && /* @__PURE__ */ jsx217("div", { ...trussProps124({
26646
+ }), ...tid.items, children: !hideItems && /* @__PURE__ */ jsx217(AppNavItems, { items, panelCollapsed }) }),
26647
+ !hideContent && footer !== void 0 && /* @__PURE__ */ jsx217("div", { ...trussProps124({
26643
26648
  flexShrink: "fs0",
26644
26649
  paddingLeft: "pl2",
26645
26650
  paddingRight: "pr2",
@@ -27111,7 +27116,7 @@ var maxStepWidthPx = 280;
27111
27116
  var gapPx = 6;
27112
27117
 
27113
27118
  // src/components/SuperDrawer/components/SuperDrawerHeader.tsx
27114
- import { createPortal as createPortal8 } from "react-dom";
27119
+ import { createPortal as createPortal9 } from "react-dom";
27115
27120
  import { trussProps as trussProps128 } from "@homebound/truss/runtime";
27116
27121
  import { jsx as jsx221, jsxs as jsxs114 } from "react/jsx-runtime";
27117
27122
  function SuperDrawerHeader(props) {
@@ -27130,7 +27135,7 @@ function SuperDrawerHeader(props) {
27130
27135
  const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
27131
27136
  const isDetail = currentContent !== firstContent;
27132
27137
  const tid = useTestIds({}, "superDrawerHeader");
27133
- return createPortal8(/* @__PURE__ */ jsxs114("div", { className: "df aic jcsb gap3", ...tid, children: [
27138
+ return createPortal9(/* @__PURE__ */ jsxs114("div", { className: "df aic jcsb gap3", ...tid, children: [
27134
27139
  isStructuredProps(props) ? /* @__PURE__ */ jsxs114("div", { className: "df jcsb aic gap2 fg1", children: [
27135
27140
  /* @__PURE__ */ jsxs114("div", { className: "fg1 df aic gap2", children: [
27136
27141
  /* @__PURE__ */ jsx221("h1", { className: "fw6 fz_24px lh_32px", children: props.title }),