@homebound/beam 3.105.1 → 3.106.0
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 +28 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +28 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10283,6 +10283,7 @@ type StepperTabProps = {
|
|
|
10283
10283
|
/** Whether this step's content has been completed. */
|
|
10284
10284
|
completed: boolean;
|
|
10285
10285
|
onClick: (value: string) => void;
|
|
10286
|
+
/** Tab isn't clickable. */
|
|
10286
10287
|
disabled?: boolean;
|
|
10287
10288
|
/** Collapses the tab down to its colored bottom border only, hiding the label — for the mobile view */
|
|
10288
10289
|
collapsed?: boolean;
|
|
@@ -10303,8 +10304,8 @@ type WorkflowActionsProps = {
|
|
|
10303
10304
|
completeLabel: "Create" | "Save";
|
|
10304
10305
|
/** Called when the completion button is clicked. */
|
|
10305
10306
|
onComplete: (e: PressEvent) => void | Promise<void>;
|
|
10306
|
-
/**
|
|
10307
|
-
primaryDisabled?: boolean;
|
|
10307
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10308
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10308
10309
|
/** When true, Continue/Complete use the `ai` button variant instead of `primary`. */
|
|
10309
10310
|
aiMode?: boolean;
|
|
10310
10311
|
isFirstStep?: boolean;
|
|
@@ -10680,8 +10681,8 @@ type PageHeaderLayoutProps<V extends string, X> = {
|
|
|
10680
10681
|
declare function PageHeaderLayout<V extends string, X extends Only<TabsContentXss, X>>(props: PageHeaderLayoutProps<V, X>): JSX.Element;
|
|
10681
10682
|
|
|
10682
10683
|
type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10683
|
-
/**
|
|
10684
|
-
|
|
10684
|
+
/** Create/Save is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10685
|
+
primaryDisabled?: WorkflowActionsProps["primaryDisabled"];
|
|
10685
10686
|
/** Read on Cancel / leave — a callback so flipping dirty does not re-render. */
|
|
10686
10687
|
isDirty?: () => boolean;
|
|
10687
10688
|
/** Full-bleed AI wash on the body and the `ai` Create/Save variant. Pair with body `aiMode` (e.g. FormSectionLayout). */
|
|
@@ -10697,15 +10698,15 @@ type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuff
|
|
|
10697
10698
|
declare function FocusedFormLayout(props: FocusedFormLayoutProps): JSX.Element;
|
|
10698
10699
|
|
|
10699
10700
|
/**
|
|
10700
|
-
* A `StepperLayout` step:
|
|
10701
|
-
* page content. Stepper chrome marks prior steps complete via current-step index; `isValid` only
|
|
10702
|
-
* gates the Continue/Complete CTA for the active step.
|
|
10701
|
+
* A `StepperLayout` step: `StepperTabsStep` (minus `value`) plus page content.
|
|
10703
10702
|
*/
|
|
10704
|
-
type StepperLayoutStep = Omit<StepperTabsStep, "value"> & {
|
|
10703
|
+
type StepperLayoutStep = Omit<StepperTabsStep, "value" | "disabled"> & {
|
|
10705
10704
|
/** Rendered as the page body while this is the active step. */
|
|
10706
10705
|
content: ReactNode;
|
|
10707
|
-
/**
|
|
10708
|
-
|
|
10706
|
+
/** Tab isn't clickable. */
|
|
10707
|
+
disabled?: boolean;
|
|
10708
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10709
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10709
10710
|
};
|
|
10710
10711
|
type StepperLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10711
10712
|
/** The workflow's steps; the active step's `content` is the body, and it drives the header's tab strip. */
|
|
@@ -10740,6 +10741,9 @@ declare function defaultTestId(label: string): string;
|
|
|
10740
10741
|
*
|
|
10741
10742
|
* Keep values sparse so new layers can slot between existing ones without ripple
|
|
10742
10743
|
* edits. Lower numbers sit behind higher numbers in the same stacking context.
|
|
10744
|
+
*
|
|
10745
|
+
* Global overlays (Modal, SuperDrawer, Snackbar) must portal to `document.body`, otherwise an app
|
|
10746
|
+
* root that establishes a stacking context traps them below the layers listed here.
|
|
10743
10747
|
*/
|
|
10744
10748
|
declare const zIndices: {
|
|
10745
10749
|
readonly tableExpandableIcon: 10;
|
package/dist/index.d.ts
CHANGED
|
@@ -10283,6 +10283,7 @@ type StepperTabProps = {
|
|
|
10283
10283
|
/** Whether this step's content has been completed. */
|
|
10284
10284
|
completed: boolean;
|
|
10285
10285
|
onClick: (value: string) => void;
|
|
10286
|
+
/** Tab isn't clickable. */
|
|
10286
10287
|
disabled?: boolean;
|
|
10287
10288
|
/** Collapses the tab down to its colored bottom border only, hiding the label — for the mobile view */
|
|
10288
10289
|
collapsed?: boolean;
|
|
@@ -10303,8 +10304,8 @@ type WorkflowActionsProps = {
|
|
|
10303
10304
|
completeLabel: "Create" | "Save";
|
|
10304
10305
|
/** Called when the completion button is clicked. */
|
|
10305
10306
|
onComplete: (e: PressEvent) => void | Promise<void>;
|
|
10306
|
-
/**
|
|
10307
|
-
primaryDisabled?: boolean;
|
|
10307
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10308
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10308
10309
|
/** When true, Continue/Complete use the `ai` button variant instead of `primary`. */
|
|
10309
10310
|
aiMode?: boolean;
|
|
10310
10311
|
isFirstStep?: boolean;
|
|
@@ -10680,8 +10681,8 @@ type PageHeaderLayoutProps<V extends string, X> = {
|
|
|
10680
10681
|
declare function PageHeaderLayout<V extends string, X extends Only<TabsContentXss, X>>(props: PageHeaderLayoutProps<V, X>): JSX.Element;
|
|
10681
10682
|
|
|
10682
10683
|
type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10683
|
-
/**
|
|
10684
|
-
|
|
10684
|
+
/** Create/Save is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10685
|
+
primaryDisabled?: WorkflowActionsProps["primaryDisabled"];
|
|
10685
10686
|
/** Read on Cancel / leave — a callback so flipping dirty does not re-render. */
|
|
10686
10687
|
isDirty?: () => boolean;
|
|
10687
10688
|
/** Full-bleed AI wash on the body and the `ai` Create/Save variant. Pair with body `aiMode` (e.g. FormSectionLayout). */
|
|
@@ -10697,15 +10698,15 @@ type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuff
|
|
|
10697
10698
|
declare function FocusedFormLayout(props: FocusedFormLayoutProps): JSX.Element;
|
|
10698
10699
|
|
|
10699
10700
|
/**
|
|
10700
|
-
* A `StepperLayout` step:
|
|
10701
|
-
* page content. Stepper chrome marks prior steps complete via current-step index; `isValid` only
|
|
10702
|
-
* gates the Continue/Complete CTA for the active step.
|
|
10701
|
+
* A `StepperLayout` step: `StepperTabsStep` (minus `value`) plus page content.
|
|
10703
10702
|
*/
|
|
10704
|
-
type StepperLayoutStep = Omit<StepperTabsStep, "value"> & {
|
|
10703
|
+
type StepperLayoutStep = Omit<StepperTabsStep, "value" | "disabled"> & {
|
|
10705
10704
|
/** Rendered as the page body while this is the active step. */
|
|
10706
10705
|
content: ReactNode;
|
|
10707
|
-
/**
|
|
10708
|
-
|
|
10706
|
+
/** Tab isn't clickable. */
|
|
10707
|
+
disabled?: boolean;
|
|
10708
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10709
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10709
10710
|
};
|
|
10710
10711
|
type StepperLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10711
10712
|
/** The workflow's steps; the active step's `content` is the body, and it drives the header's tab strip. */
|
|
@@ -10740,6 +10741,9 @@ declare function defaultTestId(label: string): string;
|
|
|
10740
10741
|
*
|
|
10741
10742
|
* Keep values sparse so new layers can slot between existing ones without ripple
|
|
10742
10743
|
* edits. Lower numbers sit behind higher numbers in the same stacking context.
|
|
10744
|
+
*
|
|
10745
|
+
* Global overlays (Modal, SuperDrawer, Snackbar) must portal to `document.body`, otherwise an app
|
|
10746
|
+
* root that establishes a stacking context traps them below the layers listed here.
|
|
10743
10747
|
*/
|
|
10744
10748
|
declare const zIndices: {
|
|
10745
10749
|
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
|
|
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
|
|
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
|
|
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 ?
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
@@ -27113,7 +27116,7 @@ var maxStepWidthPx = 280;
|
|
|
27113
27116
|
var gapPx = 6;
|
|
27114
27117
|
|
|
27115
27118
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
27116
|
-
import { createPortal as
|
|
27119
|
+
import { createPortal as createPortal9 } from "react-dom";
|
|
27117
27120
|
import { trussProps as trussProps128 } from "@homebound/truss/runtime";
|
|
27118
27121
|
import { jsx as jsx221, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
27119
27122
|
function SuperDrawerHeader(props) {
|
|
@@ -27132,7 +27135,7 @@ function SuperDrawerHeader(props) {
|
|
|
27132
27135
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
27133
27136
|
const isDetail = currentContent !== firstContent;
|
|
27134
27137
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
27135
|
-
return
|
|
27138
|
+
return createPortal9(/* @__PURE__ */ jsxs114("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
27136
27139
|
isStructuredProps(props) ? /* @__PURE__ */ jsxs114("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
27137
27140
|
/* @__PURE__ */ jsxs114("div", { className: "fg1 df aic gap2", children: [
|
|
27138
27141
|
/* @__PURE__ */ jsx221("h1", { className: "fw6 fz_24px lh_32px", children: props.title }),
|
|
@@ -28644,7 +28647,17 @@ function WorkflowPageLayout(props) {
|
|
|
28644
28647
|
// src/layouts/Workflow/FocusedFormLayout.tsx
|
|
28645
28648
|
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
28646
28649
|
function FocusedFormLayout(props) {
|
|
28647
|
-
const {
|
|
28650
|
+
const {
|
|
28651
|
+
onCancel,
|
|
28652
|
+
completeLabel,
|
|
28653
|
+
onComplete,
|
|
28654
|
+
onSaveAndExit,
|
|
28655
|
+
primaryDisabled,
|
|
28656
|
+
isDirty,
|
|
28657
|
+
aiMode,
|
|
28658
|
+
children,
|
|
28659
|
+
...headerProps
|
|
28660
|
+
} = props;
|
|
28648
28661
|
const tid = useTestIds(props, "focusedFormLayout");
|
|
28649
28662
|
return /* @__PURE__ */ jsx240(
|
|
28650
28663
|
WorkflowPageLayout,
|
|
@@ -28657,7 +28670,7 @@ function FocusedFormLayout(props) {
|
|
|
28657
28670
|
onSaveAndExit,
|
|
28658
28671
|
completeLabel,
|
|
28659
28672
|
onComplete,
|
|
28660
|
-
primaryDisabled
|
|
28673
|
+
primaryDisabled,
|
|
28661
28674
|
children
|
|
28662
28675
|
}
|
|
28663
28676
|
);
|
|
@@ -28693,7 +28706,7 @@ function StepperLayout(props) {
|
|
|
28693
28706
|
onSaveAndExit,
|
|
28694
28707
|
completeLabel,
|
|
28695
28708
|
onComplete,
|
|
28696
|
-
primaryDisabled:
|
|
28709
|
+
primaryDisabled: activeStep?.primaryDisabled,
|
|
28697
28710
|
onContinue: async () => {
|
|
28698
28711
|
const onContinue = activeStep?.onContinue;
|
|
28699
28712
|
if (onContinue) {
|