@homebound/beam 3.102.0 → 3.103.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 +183 -162
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -15
- package/dist/index.d.ts +21 -15
- package/dist/index.js +169 -148
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27923,8 +27923,72 @@ function EnvironmentBannerLayout(props) {
|
|
|
27923
27923
|
}
|
|
27924
27924
|
|
|
27925
27925
|
// src/layouts/FormSectionLayout/FormSectionLayout.tsx
|
|
27926
|
-
import { trussProps as
|
|
27927
|
-
|
|
27926
|
+
import { trussProps as trussProps134, maybeCssVar as maybeCssVar67 } from "@homebound/truss/runtime";
|
|
27927
|
+
|
|
27928
|
+
// src/layouts/FormSectionLayout/JumpLinksRail.tsx
|
|
27929
|
+
import { trussProps as trussProps133, maybeCssVar as maybeCssVar66 } from "@homebound/truss/runtime";
|
|
27930
|
+
import { jsx as jsx229 } from "react/jsx-runtime";
|
|
27931
|
+
var __maybeInc31 = (inc) => {
|
|
27932
|
+
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27933
|
+
};
|
|
27934
|
+
function JumpLinksRail(props) {
|
|
27935
|
+
const {
|
|
27936
|
+
links,
|
|
27937
|
+
activeId
|
|
27938
|
+
} = props;
|
|
27939
|
+
const tid = useTestIds(props, "jumpLinks");
|
|
27940
|
+
return /* @__PURE__ */ jsx229("nav", { ...trussProps133({
|
|
27941
|
+
display: "df",
|
|
27942
|
+
flexDirection: "fdc",
|
|
27943
|
+
flexShrink: "fs0",
|
|
27944
|
+
width: ["w_var", {
|
|
27945
|
+
"--width": `${jumpLinksRailWidthPx}px`
|
|
27946
|
+
}],
|
|
27947
|
+
position: "sticky",
|
|
27948
|
+
alignSelf: "asfs",
|
|
27949
|
+
top: ["top_var", {
|
|
27950
|
+
"--top": maybeCssVar66(__maybeInc31(stickyNavAndHeaderOffset()))
|
|
27951
|
+
}]
|
|
27952
|
+
}), ...tid, children: links.map((link) => /* @__PURE__ */ jsx229(JumpLink, { label: link.label, href: `#${link.id}`, active: link.id === activeId, ...tid.link }, link.id)) });
|
|
27953
|
+
}
|
|
27954
|
+
var jumpLinksRailWidthPx = 192;
|
|
27955
|
+
var railAndShellPx = centeredShellMaxPx.sm + jumpLinksRailWidthPx;
|
|
27956
|
+
var jumpLinksRailReservation = `clamp(0px, 100% - ${railAndShellPx}px, ${jumpLinksRailWidthPx}px)`;
|
|
27957
|
+
|
|
27958
|
+
// src/layouts/FormSectionLayout/useActiveJumpLink.ts
|
|
27959
|
+
import { useLayoutEffect as useLayoutEffect12, useState as useState61 } from "react";
|
|
27960
|
+
var activationLeadPx = 120;
|
|
27961
|
+
function useActiveJumpLink(sectionIds) {
|
|
27962
|
+
const idsKey = sectionIds.join("\0");
|
|
27963
|
+
const [activeId, setActiveId] = useState61(sectionIds[0]);
|
|
27964
|
+
useLayoutEffect12(() => {
|
|
27965
|
+
const ids = idsKey.length === 0 ? [] : idsKey.split("\0");
|
|
27966
|
+
if (ids.length === 0) return;
|
|
27967
|
+
const update = () => {
|
|
27968
|
+
const first = ids.map((id) => document.getElementById(id)).find((el) => el !== null);
|
|
27969
|
+
if (!first) return;
|
|
27970
|
+
const headerOffset = stickyNavAndHeaderOffsetPx(first);
|
|
27971
|
+
let current = ids[0];
|
|
27972
|
+
for (const id of ids) {
|
|
27973
|
+
const el = document.getElementById(id);
|
|
27974
|
+
if (el && el.getBoundingClientRect().top - headerOffset <= activationLeadPx) {
|
|
27975
|
+
current = id;
|
|
27976
|
+
}
|
|
27977
|
+
}
|
|
27978
|
+
setActiveId(current);
|
|
27979
|
+
};
|
|
27980
|
+
update();
|
|
27981
|
+
window.addEventListener("scroll", update, { passive: true });
|
|
27982
|
+
return () => window.removeEventListener("scroll", update);
|
|
27983
|
+
}, [idsKey]);
|
|
27984
|
+
return sectionIds.includes(activeId ?? "") ? activeId : sectionIds[0];
|
|
27985
|
+
}
|
|
27986
|
+
|
|
27987
|
+
// src/layouts/FormSectionLayout/FormSectionLayout.tsx
|
|
27988
|
+
import { jsx as jsx230, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
27989
|
+
var __maybeInc32 = (inc) => {
|
|
27990
|
+
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27991
|
+
};
|
|
27928
27992
|
function FormSectionLayout(props) {
|
|
27929
27993
|
const {
|
|
27930
27994
|
title,
|
|
@@ -27933,10 +27997,23 @@ function FormSectionLayout(props) {
|
|
|
27933
27997
|
withAutoSave,
|
|
27934
27998
|
initialFields,
|
|
27935
27999
|
sections,
|
|
27936
|
-
aiMode = false
|
|
28000
|
+
aiMode = false,
|
|
28001
|
+
withJumpLinks = false
|
|
27937
28002
|
} = props;
|
|
27938
28003
|
const tid = useTestIds(props, "formSectionLayout");
|
|
27939
|
-
const
|
|
28004
|
+
const {
|
|
28005
|
+
sm: isMobile
|
|
28006
|
+
} = useBreakpoint();
|
|
28007
|
+
const jumpLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
|
|
28008
|
+
const id = defaultTestId(section.title);
|
|
28009
|
+
return {
|
|
28010
|
+
id,
|
|
28011
|
+
label: section.title
|
|
28012
|
+
};
|
|
28013
|
+
});
|
|
28014
|
+
const showRail = withJumpLinks && jumpLinks.length >= 2 && !isMobile;
|
|
28015
|
+
const activeId = useActiveJumpLink(showRail ? jumpLinks.map((link) => link.id) : []);
|
|
28016
|
+
const content = /* @__PURE__ */ jsxs120("div", { ...trussProps134({
|
|
27940
28017
|
display: "df",
|
|
27941
28018
|
flexDirection: "fdc",
|
|
27942
28019
|
gap: "gap8",
|
|
@@ -27948,20 +28025,33 @@ function FormSectionLayout(props) {
|
|
|
27948
28025
|
} : {}
|
|
27949
28026
|
}), children: [
|
|
27950
28027
|
/* @__PURE__ */ jsxs120("div", { className: "df fdc gap3", children: [
|
|
27951
|
-
/* @__PURE__ */
|
|
28028
|
+
/* @__PURE__ */ jsx230(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
|
|
27952
28029
|
initialFields
|
|
27953
28030
|
] }),
|
|
27954
|
-
sections && /* @__PURE__ */
|
|
28031
|
+
sections && /* @__PURE__ */ jsx230("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ jsx230(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
28032
|
+
] });
|
|
28033
|
+
const form = /* @__PURE__ */ jsx230(CenteredLayout, { size: "sm", children: aiMode ? /* @__PURE__ */ jsx230(AiCard, { size: "lg", ...tid, children: content }) : content });
|
|
28034
|
+
if (!showRail) {
|
|
28035
|
+
return /* @__PURE__ */ jsx230("div", { className: "mb4", children: form });
|
|
28036
|
+
}
|
|
28037
|
+
return /* @__PURE__ */ jsxs120("div", { className: "df w100 mb4", children: [
|
|
28038
|
+
/* @__PURE__ */ jsx230(JumpLinksRail, { links: jumpLinks, activeId, ...tid.jumpLinks }),
|
|
28039
|
+
/* @__PURE__ */ jsx230("div", { ...trussProps134({
|
|
28040
|
+
flexGrow: "fg1",
|
|
28041
|
+
minWidth: "mw0",
|
|
28042
|
+
marginRight: ["mr_var", {
|
|
28043
|
+
"--marginRight": maybeCssVar67(__maybeInc32(jumpLinksRailReservation))
|
|
28044
|
+
}]
|
|
28045
|
+
}), ...tid.column, children: form })
|
|
27955
28046
|
] });
|
|
27956
|
-
return /* @__PURE__ */ jsx229(CenteredLayout, { size: "sm", children: aiMode ? /* @__PURE__ */ jsx229(AiCard, { size: "lg", ...tid, children: content }) : content });
|
|
27957
28047
|
}
|
|
27958
28048
|
|
|
27959
28049
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27960
28050
|
import { useMemo as useMemo57, useRef as useRef69 } from "react";
|
|
27961
|
-
import { mergeProps as mergeProps39, maybeCssVar as
|
|
28051
|
+
import { mergeProps as mergeProps39, maybeCssVar as maybeCssVar68 } from "@homebound/truss/runtime";
|
|
27962
28052
|
|
|
27963
28053
|
// src/layouts/useAutoHideOnScroll.ts
|
|
27964
|
-
import { useLayoutEffect as
|
|
28054
|
+
import { useLayoutEffect as useLayoutEffect13, useRef as useRef68, useState as useState62 } from "react";
|
|
27965
28055
|
var THRESHOLD = 80;
|
|
27966
28056
|
function getInitialAutoHideState() {
|
|
27967
28057
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -27971,15 +28061,15 @@ function getInitialAutoHideState() {
|
|
|
27971
28061
|
}
|
|
27972
28062
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
27973
28063
|
const initial = getInitialAutoHideState();
|
|
27974
|
-
const [state, setState] =
|
|
28064
|
+
const [state, setState] = useState62(initial.state);
|
|
27975
28065
|
const stateRef = useRef68(initial.state);
|
|
27976
|
-
const [atTop, setAtTop] =
|
|
28066
|
+
const [atTop, setAtTop] = useState62(initial.atTop);
|
|
27977
28067
|
const atTopRef = useRef68(initial.atTop);
|
|
27978
28068
|
const getTopOffsetRef = useRef68(getTopOffset);
|
|
27979
28069
|
getTopOffsetRef.current = getTopOffset;
|
|
27980
28070
|
const lastScrollY = useRef68(Number.POSITIVE_INFINITY);
|
|
27981
28071
|
const lastScrollHeight = useRef68(0);
|
|
27982
|
-
|
|
28072
|
+
useLayoutEffect13(() => {
|
|
27983
28073
|
if (!enabled) {
|
|
27984
28074
|
stateRef.current = "static";
|
|
27985
28075
|
atTopRef.current = true;
|
|
@@ -28052,16 +28142,16 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
28052
28142
|
|
|
28053
28143
|
// src/layouts/useMeasuredHeight.ts
|
|
28054
28144
|
import { useResizeObserver as useResizeObserver12 } from "@react-aria/utils";
|
|
28055
|
-
import { useCallback as useCallback41, useLayoutEffect as
|
|
28145
|
+
import { useCallback as useCallback41, useLayoutEffect as useLayoutEffect14, useState as useState63 } from "react";
|
|
28056
28146
|
function useMeasuredHeight(ref, enabled) {
|
|
28057
|
-
const [height, setHeight] =
|
|
28147
|
+
const [height, setHeight] = useState63(0);
|
|
28058
28148
|
const syncElementHeight = useCallback41(() => {
|
|
28059
28149
|
const el = ref.current;
|
|
28060
28150
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
28061
28151
|
setHeight((prev) => prev === next ? prev : next);
|
|
28062
28152
|
}, [ref]);
|
|
28063
28153
|
useResizeObserver12({ ref, onResize: syncElementHeight });
|
|
28064
|
-
|
|
28154
|
+
useLayoutEffect14(() => {
|
|
28065
28155
|
syncElementHeight();
|
|
28066
28156
|
}, [enabled, syncElementHeight]);
|
|
28067
28157
|
return height;
|
|
@@ -28069,18 +28159,18 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
28069
28159
|
|
|
28070
28160
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
28071
28161
|
import { createContext as createContext16, useContext as useContext28 } from "react";
|
|
28072
|
-
import { jsx as
|
|
28162
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
28073
28163
|
var NavbarLayoutHeightContext = createContext16(0);
|
|
28074
28164
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
28075
|
-
return /* @__PURE__ */
|
|
28165
|
+
return /* @__PURE__ */ jsx231(NavbarLayoutHeightContext.Provider, { value, children });
|
|
28076
28166
|
}
|
|
28077
28167
|
function useNavbarLayoutHeight() {
|
|
28078
28168
|
return useContext28(NavbarLayoutHeightContext);
|
|
28079
28169
|
}
|
|
28080
28170
|
|
|
28081
28171
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
28082
|
-
import { jsx as
|
|
28083
|
-
var
|
|
28172
|
+
import { jsx as jsx232, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
28173
|
+
var __maybeInc33 = (inc) => {
|
|
28084
28174
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28085
28175
|
};
|
|
28086
28176
|
function NavbarLayout(props) {
|
|
@@ -28108,10 +28198,10 @@ function NavbarLayout(props) {
|
|
|
28108
28198
|
position: "sticky",
|
|
28109
28199
|
left: "left0",
|
|
28110
28200
|
zIndex: ["z_var", {
|
|
28111
|
-
"--zIndex":
|
|
28201
|
+
"--zIndex": maybeCssVar68(zIndices.navbar)
|
|
28112
28202
|
}],
|
|
28113
28203
|
width: ["w_var", {
|
|
28114
|
-
"--width":
|
|
28204
|
+
"--width": maybeCssVar68(__maybeInc33(innerWidth))
|
|
28115
28205
|
}]
|
|
28116
28206
|
}
|
|
28117
28207
|
) : (
|
|
@@ -28120,10 +28210,10 @@ function NavbarLayout(props) {
|
|
|
28120
28210
|
position: "fixed",
|
|
28121
28211
|
left: "left0",
|
|
28122
28212
|
zIndex: ["z_var", {
|
|
28123
|
-
"--zIndex":
|
|
28213
|
+
"--zIndex": maybeCssVar68(zIndices.navbar)
|
|
28124
28214
|
}],
|
|
28125
28215
|
width: ["w_var", {
|
|
28126
|
-
"--width":
|
|
28216
|
+
"--width": maybeCssVar68(__maybeInc33(innerWidth))
|
|
28127
28217
|
}],
|
|
28128
28218
|
transition: "transitionTop"
|
|
28129
28219
|
}
|
|
@@ -28132,20 +28222,20 @@ function NavbarLayout(props) {
|
|
|
28132
28222
|
const innerStyle = autoHideState !== "static" ? {
|
|
28133
28223
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
28134
28224
|
} : void 0;
|
|
28135
|
-
const navbarEl = useMemo57(() => /* @__PURE__ */
|
|
28136
|
-
return /* @__PURE__ */
|
|
28225
|
+
const navbarEl = useMemo57(() => /* @__PURE__ */ jsx232(Navbar, { ...navbar }), [navbar]);
|
|
28226
|
+
return /* @__PURE__ */ jsx232(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx232(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsx232(MobileSubNavProvider, { children: /* @__PURE__ */ jsxs121("div", { ...mergeProps39(void 0, cssVars, {
|
|
28137
28227
|
display: "df",
|
|
28138
28228
|
flexDirection: "fdc",
|
|
28139
28229
|
width: "wfc",
|
|
28140
28230
|
minWidth: "mw100"
|
|
28141
28231
|
}), ...tid, children: [
|
|
28142
|
-
/* @__PURE__ */
|
|
28232
|
+
/* @__PURE__ */ jsx232("div", { ref: spacerRef, ...mergeProps39(void 0, {
|
|
28143
28233
|
height: navHeight
|
|
28144
28234
|
}, {
|
|
28145
28235
|
flexShrink: "fs0",
|
|
28146
28236
|
width: "w100"
|
|
28147
|
-
}), children: /* @__PURE__ */
|
|
28148
|
-
/* @__PURE__ */
|
|
28237
|
+
}), children: /* @__PURE__ */ jsx232("div", { ref: navMetricsRef, ...mergeProps39(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
28238
|
+
/* @__PURE__ */ jsx232("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
28149
28239
|
] }) }) }) });
|
|
28150
28240
|
}
|
|
28151
28241
|
|
|
@@ -28153,8 +28243,8 @@ function NavbarLayout(props) {
|
|
|
28153
28243
|
import { useCallback as useCallback42, useMemo as useMemo58, useRef as useRef70 } from "react";
|
|
28154
28244
|
|
|
28155
28245
|
// src/components/Headers/BaseHeader.tsx
|
|
28156
|
-
import { trussProps as
|
|
28157
|
-
import { jsx as
|
|
28246
|
+
import { trussProps as trussProps135 } from "@homebound/truss/runtime";
|
|
28247
|
+
import { jsx as jsx233, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
28158
28248
|
function BaseHeader(props) {
|
|
28159
28249
|
const {
|
|
28160
28250
|
title,
|
|
@@ -28166,7 +28256,7 @@ function BaseHeader(props) {
|
|
|
28166
28256
|
} = props;
|
|
28167
28257
|
const tid = useTestIds(otherProps, "header");
|
|
28168
28258
|
useDocumentTitle(title, documentTitleSuffix);
|
|
28169
|
-
return /* @__PURE__ */ jsxs122("header", { ...tid, ...
|
|
28259
|
+
return /* @__PURE__ */ jsxs122("header", { ...tid, ...trussProps135({
|
|
28170
28260
|
display: "df",
|
|
28171
28261
|
flexDirection: "fdc",
|
|
28172
28262
|
paddingTop: "pt3",
|
|
@@ -28180,7 +28270,7 @@ function BaseHeader(props) {
|
|
|
28180
28270
|
"--backgroundColor": "var(--b-surface)"
|
|
28181
28271
|
}]
|
|
28182
28272
|
}), children: [
|
|
28183
|
-
/* @__PURE__ */ jsxs122("div", { ...
|
|
28273
|
+
/* @__PURE__ */ jsxs122("div", { ...trussProps135({
|
|
28184
28274
|
...{
|
|
28185
28275
|
display: "df",
|
|
28186
28276
|
justifyContent: "jcsb",
|
|
@@ -28195,8 +28285,8 @@ function BaseHeader(props) {
|
|
|
28195
28285
|
}
|
|
28196
28286
|
}), children: [
|
|
28197
28287
|
/* @__PURE__ */ jsxs122("div", { className: "mw0", children: [
|
|
28198
|
-
breadcrumbs && /* @__PURE__ */
|
|
28199
|
-
/* @__PURE__ */
|
|
28288
|
+
breadcrumbs && /* @__PURE__ */ jsx233(Breadcrumbs, { ...breadcrumbs }),
|
|
28289
|
+
/* @__PURE__ */ jsx233("h1", { ...tid.title, ...trussProps135({
|
|
28200
28290
|
fontWeight: "fw6",
|
|
28201
28291
|
fontSize: "fz_20px",
|
|
28202
28292
|
lineHeight: "lh_28px",
|
|
@@ -28205,15 +28295,15 @@ function BaseHeader(props) {
|
|
|
28205
28295
|
}]
|
|
28206
28296
|
}), children: title })
|
|
28207
28297
|
] }),
|
|
28208
|
-
/* @__PURE__ */
|
|
28298
|
+
/* @__PURE__ */ jsx233("div", { className: "fs0", children: rightSlot })
|
|
28209
28299
|
] }),
|
|
28210
28300
|
bottomSlot
|
|
28211
28301
|
] });
|
|
28212
28302
|
}
|
|
28213
28303
|
|
|
28214
28304
|
// src/components/Headers/PageHeader.tsx
|
|
28215
|
-
import { trussProps as
|
|
28216
|
-
import { Fragment as Fragment51, jsx as
|
|
28305
|
+
import { trussProps as trussProps136 } from "@homebound/truss/runtime";
|
|
28306
|
+
import { Fragment as Fragment51, jsx as jsx234, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
28217
28307
|
function PageHeader2(props) {
|
|
28218
28308
|
const {
|
|
28219
28309
|
tabs,
|
|
@@ -28222,10 +28312,10 @@ function PageHeader2(props) {
|
|
|
28222
28312
|
...otherProps
|
|
28223
28313
|
} = props;
|
|
28224
28314
|
const tid = useTestIds(otherProps, "header");
|
|
28225
|
-
return /* @__PURE__ */
|
|
28315
|
+
return /* @__PURE__ */ jsx234(BaseHeader, { ...otherProps, rightSlot: /* @__PURE__ */ jsxs123(Fragment51, { children: [
|
|
28226
28316
|
rightSlot,
|
|
28227
|
-
actions && actions.length > 0 && /* @__PURE__ */
|
|
28228
|
-
] }), bottomSlot: tabs && /* @__PURE__ */
|
|
28317
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx234(HeaderActions, { actions, collapseOnSm: true })
|
|
28318
|
+
] }), bottomSlot: tabs && /* @__PURE__ */ jsx234("div", { ...trussProps136(pageContentPaddingX), children: /* @__PURE__ */ jsx234(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
28229
28319
|
}
|
|
28230
28320
|
|
|
28231
28321
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
@@ -28234,9 +28324,9 @@ function useBannerAndNavbarHeight() {
|
|
|
28234
28324
|
}
|
|
28235
28325
|
|
|
28236
28326
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
28237
|
-
import { mergeProps as mergeProps40, maybeCssVar as
|
|
28238
|
-
import { jsx as
|
|
28239
|
-
var
|
|
28327
|
+
import { mergeProps as mergeProps40, maybeCssVar as maybeCssVar69 } from "@homebound/truss/runtime";
|
|
28328
|
+
import { jsx as jsx235, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
28329
|
+
var __maybeInc34 = (inc) => {
|
|
28240
28330
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28241
28331
|
};
|
|
28242
28332
|
function PageHeaderLayout(props) {
|
|
@@ -28266,103 +28356,46 @@ function PageHeaderLayout(props) {
|
|
|
28266
28356
|
const innerCss = autoHideState === "static" ? {
|
|
28267
28357
|
position: "sticky",
|
|
28268
28358
|
left: ["left_var", {
|
|
28269
|
-
"--left":
|
|
28359
|
+
"--left": maybeCssVar69(__maybeInc34(headerLeft))
|
|
28270
28360
|
}],
|
|
28271
28361
|
width: ["w_var", {
|
|
28272
|
-
"--width":
|
|
28362
|
+
"--width": maybeCssVar69(__maybeInc34(headerWidth))
|
|
28273
28363
|
}],
|
|
28274
28364
|
zIndex: ["z_var", {
|
|
28275
|
-
"--zIndex":
|
|
28365
|
+
"--zIndex": maybeCssVar69(zIndices.pageStickyHeader)
|
|
28276
28366
|
}]
|
|
28277
28367
|
} : {
|
|
28278
28368
|
position: "fixed",
|
|
28279
28369
|
left: ["left_var", {
|
|
28280
|
-
"--left":
|
|
28370
|
+
"--left": maybeCssVar69(__maybeInc34(headerLeft))
|
|
28281
28371
|
}],
|
|
28282
28372
|
width: ["w_var", {
|
|
28283
|
-
"--width":
|
|
28373
|
+
"--width": maybeCssVar69(__maybeInc34(headerWidth))
|
|
28284
28374
|
}],
|
|
28285
28375
|
zIndex: ["z_var", {
|
|
28286
|
-
"--zIndex":
|
|
28376
|
+
"--zIndex": maybeCssVar69(zIndices.pageStickyHeader)
|
|
28287
28377
|
}],
|
|
28288
28378
|
transition: "transitionTop"
|
|
28289
28379
|
};
|
|
28290
28380
|
const innerStyle = autoHideState !== "static" ? {
|
|
28291
28381
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
28292
28382
|
} : void 0;
|
|
28293
|
-
const pageHeaderEl = useMemo58(() => /* @__PURE__ */
|
|
28294
|
-
return /* @__PURE__ */
|
|
28383
|
+
const pageHeaderEl = useMemo58(() => /* @__PURE__ */ jsx235(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
28384
|
+
return /* @__PURE__ */ jsx235(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs124("div", { ...mergeProps40(void 0, cssVars, {
|
|
28295
28385
|
display: "df",
|
|
28296
28386
|
flexDirection: "fdc",
|
|
28297
28387
|
width: "w100"
|
|
28298
28388
|
}), ...tid, children: [
|
|
28299
|
-
/* @__PURE__ */
|
|
28389
|
+
/* @__PURE__ */ jsx235("div", { ref: spacerRef, ...mergeProps40(void 0, {
|
|
28300
28390
|
height: headerHeight
|
|
28301
28391
|
}, {
|
|
28302
28392
|
flexShrink: "fs0",
|
|
28303
28393
|
width: "w100"
|
|
28304
|
-
}), children: /* @__PURE__ */
|
|
28305
|
-
/* @__PURE__ */
|
|
28394
|
+
}), children: /* @__PURE__ */ jsx235("div", { ref: headerMetricsRef, ...mergeProps40(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
28395
|
+
/* @__PURE__ */ jsx235("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
28306
28396
|
] }) });
|
|
28307
28397
|
}
|
|
28308
28398
|
|
|
28309
|
-
// src/layouts/Workflow/JumpLinksRail.tsx
|
|
28310
|
-
import { trussProps as trussProps136, maybeCssVar as maybeCssVar68 } from "@homebound/truss/runtime";
|
|
28311
|
-
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
28312
|
-
var __maybeInc33 = (inc) => {
|
|
28313
|
-
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28314
|
-
};
|
|
28315
|
-
var jumpLinksRailWidthPx = 180;
|
|
28316
|
-
function JumpLinksRail(props) {
|
|
28317
|
-
const {
|
|
28318
|
-
links,
|
|
28319
|
-
activeId
|
|
28320
|
-
} = props;
|
|
28321
|
-
const tid = useTestIds(props, "jumpLinks");
|
|
28322
|
-
return /* @__PURE__ */ jsx235("nav", { ...trussProps136({
|
|
28323
|
-
display: "df",
|
|
28324
|
-
flexDirection: "fdc",
|
|
28325
|
-
flexShrink: "fs0",
|
|
28326
|
-
width: ["w_var", {
|
|
28327
|
-
"--width": `${jumpLinksRailWidthPx}px`
|
|
28328
|
-
}],
|
|
28329
|
-
position: "sticky",
|
|
28330
|
-
alignSelf: "asfs",
|
|
28331
|
-
top: ["top_var", {
|
|
28332
|
-
"--top": maybeCssVar68(__maybeInc33(stickyNavAndHeaderOffset()))
|
|
28333
|
-
}]
|
|
28334
|
-
}), ...tid, children: links.map((link) => /* @__PURE__ */ jsx235(JumpLink, { label: link.label, href: `#${link.id}`, active: link.id === activeId, ...tid.link }, link.id)) });
|
|
28335
|
-
}
|
|
28336
|
-
|
|
28337
|
-
// src/layouts/Workflow/useActiveJumpLink.ts
|
|
28338
|
-
import { useLayoutEffect as useLayoutEffect14, useState as useState63 } from "react";
|
|
28339
|
-
var activationLeadPx = 120;
|
|
28340
|
-
function useActiveJumpLink(sectionIds) {
|
|
28341
|
-
const idsKey = sectionIds.join("\0");
|
|
28342
|
-
const [activeId, setActiveId] = useState63(sectionIds[0]);
|
|
28343
|
-
useLayoutEffect14(() => {
|
|
28344
|
-
const ids = idsKey.length === 0 ? [] : idsKey.split("\0");
|
|
28345
|
-
if (ids.length === 0) return;
|
|
28346
|
-
const update = () => {
|
|
28347
|
-
const first = ids.map((id) => document.getElementById(id)).find((el) => el !== null);
|
|
28348
|
-
if (!first) return;
|
|
28349
|
-
const headerOffset = stickyNavAndHeaderOffsetPx(first);
|
|
28350
|
-
let current = ids[0];
|
|
28351
|
-
for (const id of ids) {
|
|
28352
|
-
const el = document.getElementById(id);
|
|
28353
|
-
if (el && el.getBoundingClientRect().top - headerOffset <= activationLeadPx) {
|
|
28354
|
-
current = id;
|
|
28355
|
-
}
|
|
28356
|
-
}
|
|
28357
|
-
setActiveId(current);
|
|
28358
|
-
};
|
|
28359
|
-
update();
|
|
28360
|
-
window.addEventListener("scroll", update, { passive: true });
|
|
28361
|
-
return () => window.removeEventListener("scroll", update);
|
|
28362
|
-
}, [idsKey]);
|
|
28363
|
-
return sectionIds.includes(activeId ?? "") ? activeId : sectionIds[0];
|
|
28364
|
-
}
|
|
28365
|
-
|
|
28366
28399
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
28367
28400
|
import { useLayoutEffect as useLayoutEffect15, useRef as useRef72 } from "react";
|
|
28368
28401
|
|
|
@@ -28457,9 +28490,9 @@ function WorkflowActions(props) {
|
|
|
28457
28490
|
}
|
|
28458
28491
|
|
|
28459
28492
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
28460
|
-
import { trussProps as trussProps137, mergeProps as mergeProps41, maybeCssVar as
|
|
28493
|
+
import { trussProps as trussProps137, mergeProps as mergeProps41, maybeCssVar as maybeCssVar70 } from "@homebound/truss/runtime";
|
|
28461
28494
|
import { jsx as jsx239, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
28462
|
-
var
|
|
28495
|
+
var __maybeInc35 = (inc) => {
|
|
28463
28496
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28464
28497
|
};
|
|
28465
28498
|
var mobileFooterHeightPx = 80;
|
|
@@ -28517,13 +28550,13 @@ function WorkflowPageLayout(props) {
|
|
|
28517
28550
|
position: "sticky",
|
|
28518
28551
|
left: "left0",
|
|
28519
28552
|
width: ["w_var", {
|
|
28520
|
-
"--width":
|
|
28553
|
+
"--width": maybeCssVar70(__maybeInc35(headerWidth))
|
|
28521
28554
|
}],
|
|
28522
28555
|
zIndex: ["z_var", {
|
|
28523
|
-
"--zIndex":
|
|
28556
|
+
"--zIndex": maybeCssVar70(zIndices.pageStickyHeader)
|
|
28524
28557
|
}],
|
|
28525
28558
|
top: ["top_var", {
|
|
28526
|
-
"--top":
|
|
28559
|
+
"--top": maybeCssVar70(__maybeInc35(outerTop))
|
|
28527
28560
|
}]
|
|
28528
28561
|
}), ...tid.header, children: /* @__PURE__ */ jsx239(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? void 0 : actions, stepperTabs }) }),
|
|
28529
28562
|
/* @__PURE__ */ jsx239("div", { ...trussProps137({
|
|
@@ -28538,7 +28571,7 @@ function WorkflowPageLayout(props) {
|
|
|
28538
28571
|
...aiMode && {
|
|
28539
28572
|
backgroundImage: "aiBackground",
|
|
28540
28573
|
minHeight: ["mh_var", {
|
|
28541
|
-
"--minHeight":
|
|
28574
|
+
"--minHeight": maybeCssVar70(documentScrollBodyMinHeight())
|
|
28542
28575
|
}]
|
|
28543
28576
|
}
|
|
28544
28577
|
}), ...tid.body, children }),
|
|
@@ -28553,13 +28586,13 @@ function WorkflowPageLayout(props) {
|
|
|
28553
28586
|
position: "fixed",
|
|
28554
28587
|
bottom: "bottom0",
|
|
28555
28588
|
width: ["w_var", {
|
|
28556
|
-
"--width":
|
|
28589
|
+
"--width": maybeCssVar70(__maybeInc35(headerWidth))
|
|
28557
28590
|
}],
|
|
28558
28591
|
height: ["h_var", {
|
|
28559
28592
|
"--height": `${mobileFooterHeightPx}px`
|
|
28560
28593
|
}],
|
|
28561
28594
|
zIndex: ["z_var", {
|
|
28562
|
-
"--zIndex":
|
|
28595
|
+
"--zIndex": maybeCssVar70(zIndices.pageStickyFooter)
|
|
28563
28596
|
}],
|
|
28564
28597
|
display: "df",
|
|
28565
28598
|
alignItems: "aic",
|
|
@@ -28582,37 +28615,25 @@ function WorkflowPageLayout(props) {
|
|
|
28582
28615
|
}
|
|
28583
28616
|
|
|
28584
28617
|
// src/layouts/Workflow/FocusedFormLayout.tsx
|
|
28585
|
-
import { jsx as jsx240
|
|
28618
|
+
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
28586
28619
|
function FocusedFormLayout(props) {
|
|
28587
|
-
const {
|
|
28588
|
-
onCancel,
|
|
28589
|
-
completeLabel,
|
|
28590
|
-
onComplete,
|
|
28591
|
-
onSaveAndExit,
|
|
28592
|
-
isValid,
|
|
28593
|
-
isDirty,
|
|
28594
|
-
withJumpLinks = true,
|
|
28595
|
-
aiMode,
|
|
28596
|
-
form,
|
|
28597
|
-
...headerProps
|
|
28598
|
-
} = props;
|
|
28620
|
+
const { onCancel, completeLabel, onComplete, onSaveAndExit, isValid, isDirty, aiMode, children, ...headerProps } = props;
|
|
28599
28621
|
const tid = useTestIds(props, "focusedFormLayout");
|
|
28600
|
-
|
|
28601
|
-
|
|
28602
|
-
|
|
28603
|
-
|
|
28604
|
-
|
|
28605
|
-
|
|
28606
|
-
|
|
28607
|
-
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
] }) });
|
|
28622
|
+
return /* @__PURE__ */ jsx240(
|
|
28623
|
+
WorkflowPageLayout,
|
|
28624
|
+
{
|
|
28625
|
+
...tid,
|
|
28626
|
+
...headerProps,
|
|
28627
|
+
aiMode,
|
|
28628
|
+
isDirty,
|
|
28629
|
+
onCancel,
|
|
28630
|
+
onSaveAndExit,
|
|
28631
|
+
completeLabel,
|
|
28632
|
+
onComplete,
|
|
28633
|
+
primaryDisabled: !isValid,
|
|
28634
|
+
children
|
|
28635
|
+
}
|
|
28636
|
+
);
|
|
28616
28637
|
}
|
|
28617
28638
|
|
|
28618
28639
|
// src/layouts/Workflow/StepperLayout.tsx
|