@homebound/beam 3.80.0 → 3.81.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 +330 -261
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +256 -187
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24835,40 +24835,82 @@ function AppNavItems(props) {
|
|
|
24835
24835
|
|
|
24836
24836
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
24837
24837
|
import { AnimatePresence as AnimatePresence6, motion as motion6 } from "framer-motion";
|
|
24838
|
-
import { useEffect as useEffect35, useState as
|
|
24838
|
+
import { useEffect as useEffect35, useState as useState54 } from "react";
|
|
24839
24839
|
import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll3 } from "react-aria";
|
|
24840
24840
|
import { createPortal as createPortal7 } from "react-dom";
|
|
24841
24841
|
import { useLocation } from "react-router-dom";
|
|
24842
|
+
|
|
24843
|
+
// src/layouts/NavbarLayout/MobileSubNavContext.tsx
|
|
24844
|
+
import { createContext as createContext14, useContext as useContext26, useLayoutEffect as useLayoutEffect9, useMemo as useMemo52, useState as useState53 } from "react";
|
|
24845
|
+
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
24846
|
+
var MobileSubNavContext = createContext14(void 0);
|
|
24847
|
+
function MobileSubNavProvider(props) {
|
|
24848
|
+
const [mobileSubNav, setMobileSubNav] = useState53(null);
|
|
24849
|
+
const value = useMemo52(() => ({ mobileSubNav, setMobileSubNav }), [mobileSubNav]);
|
|
24850
|
+
return /* @__PURE__ */ jsx199(MobileSubNavContext.Provider, { value, children: props.children });
|
|
24851
|
+
}
|
|
24852
|
+
function useMobileSubNav() {
|
|
24853
|
+
return useContext26(MobileSubNavContext)?.mobileSubNav ?? null;
|
|
24854
|
+
}
|
|
24855
|
+
function useRegisterMobileSubNav(content) {
|
|
24856
|
+
const ctx = useContext26(MobileSubNavContext);
|
|
24857
|
+
const setMobileSubNav = ctx?.setMobileSubNav;
|
|
24858
|
+
const enabled = !useBreakpoint().mdAndUp;
|
|
24859
|
+
const { top, items, footer } = content;
|
|
24860
|
+
useLayoutEffect9(() => {
|
|
24861
|
+
if (!setMobileSubNav || !enabled) return;
|
|
24862
|
+
setMobileSubNav({ top, items, footer });
|
|
24863
|
+
}, [setMobileSubNav, enabled, top, items, footer]);
|
|
24864
|
+
useLayoutEffect9(() => {
|
|
24865
|
+
if (!setMobileSubNav || !enabled) return;
|
|
24866
|
+
return () => setMobileSubNav(null);
|
|
24867
|
+
}, [setMobileSubNav, enabled]);
|
|
24868
|
+
return ctx !== void 0 && enabled;
|
|
24869
|
+
}
|
|
24870
|
+
|
|
24871
|
+
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
24842
24872
|
import { trussProps as trussProps111, mergeProps as mergeProps31, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
24843
|
-
import { Fragment as Fragment44, jsx as
|
|
24873
|
+
import { Fragment as Fragment44, jsx as jsx200, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
24844
24874
|
function NavbarMobileMenu(props) {
|
|
24845
24875
|
const {
|
|
24846
24876
|
items
|
|
24847
24877
|
} = props;
|
|
24848
24878
|
const tid = useTestIds(props, "navbar");
|
|
24849
|
-
const [isOpen, setIsOpen] =
|
|
24879
|
+
const [isOpen, setIsOpen] = useState54(false);
|
|
24880
|
+
const [level, setLevel] = useState54("sub");
|
|
24850
24881
|
const {
|
|
24851
24882
|
pathname,
|
|
24852
24883
|
search
|
|
24853
24884
|
} = useLocation();
|
|
24885
|
+
const mobileSubNav = useMobileSubNav();
|
|
24854
24886
|
usePreventScroll3({
|
|
24855
24887
|
isDisabled: !isOpen
|
|
24856
24888
|
});
|
|
24889
|
+
const close = () => setIsOpen(false);
|
|
24857
24890
|
useEffect35(() => {
|
|
24858
|
-
|
|
24891
|
+
close();
|
|
24859
24892
|
}, [pathname, search]);
|
|
24860
|
-
const close = () => setIsOpen(false);
|
|
24861
24893
|
return /* @__PURE__ */ jsxs98(Fragment44, { children: [
|
|
24862
|
-
/* @__PURE__ */
|
|
24894
|
+
/* @__PURE__ */ jsx200(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => {
|
|
24895
|
+
if (isOpen) {
|
|
24896
|
+
close();
|
|
24897
|
+
return;
|
|
24898
|
+
}
|
|
24899
|
+
setLevel("sub");
|
|
24900
|
+
setIsOpen(true);
|
|
24901
|
+
}, ...tid.mobileMenu }),
|
|
24863
24902
|
createPortal7(
|
|
24864
24903
|
/* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
|
|
24865
|
-
/* @__PURE__ */
|
|
24904
|
+
/* @__PURE__ */ jsx200(AnimatePresence6, { children: isOpen && /* @__PURE__ */ jsx200(NavbarMobileDrawer, { items, mobileSubNav, level, onLevelChange: setLevel, onClose: close, tid }) }),
|
|
24866
24905
|
document.body
|
|
24867
24906
|
)
|
|
24868
24907
|
] });
|
|
24869
24908
|
}
|
|
24870
24909
|
function NavbarMobileDrawer({
|
|
24871
24910
|
items,
|
|
24911
|
+
mobileSubNav,
|
|
24912
|
+
level,
|
|
24913
|
+
onLevelChange,
|
|
24872
24914
|
onClose,
|
|
24873
24915
|
tid
|
|
24874
24916
|
}) {
|
|
@@ -24876,8 +24918,9 @@ function NavbarMobileDrawer({
|
|
|
24876
24918
|
const overlayTopStyle = {
|
|
24877
24919
|
top: bannerHeightPx
|
|
24878
24920
|
};
|
|
24921
|
+
const showSubLevel = mobileSubNav != null && level === "sub";
|
|
24879
24922
|
return /* @__PURE__ */ jsxs98(Fragment44, { children: [
|
|
24880
|
-
/* @__PURE__ */
|
|
24923
|
+
/* @__PURE__ */ jsx200(motion6.div, { ...mergeProps31(void 0, overlayTopStyle, {
|
|
24881
24924
|
position: "fixed",
|
|
24882
24925
|
right: "right0",
|
|
24883
24926
|
bottom: "bottom0",
|
|
@@ -24898,7 +24941,7 @@ function NavbarMobileDrawer({
|
|
|
24898
24941
|
ease: "linear",
|
|
24899
24942
|
duration: 0.2
|
|
24900
24943
|
}, onClick: onClose, ...tid.mobileMenuScrim }, "navbarMobileMenuScrim"),
|
|
24901
|
-
/* @__PURE__ */
|
|
24944
|
+
/* @__PURE__ */ jsx200(FocusScope5, { autoFocus: true, contain: true, restoreFocus: true, children: /* @__PURE__ */ jsxs98(motion6.aside, { role: "dialog", "aria-modal": "true", "aria-label": "Navigation", ...mergeProps31(void 0, overlayTopStyle, {
|
|
24902
24945
|
position: "fixed",
|
|
24903
24946
|
bottom: "bottom0",
|
|
24904
24947
|
left: "left0",
|
|
@@ -24923,11 +24966,11 @@ function NavbarMobileDrawer({
|
|
|
24923
24966
|
ease: "linear",
|
|
24924
24967
|
duration: 0.2
|
|
24925
24968
|
}, onClick: (e) => e.stopPropagation(), ...tid.mobileMenuDrawer, children: [
|
|
24926
|
-
/* @__PURE__ */
|
|
24969
|
+
/* @__PURE__ */ jsxs98("div", { ...trussProps111({
|
|
24927
24970
|
...{
|
|
24928
24971
|
display: "df",
|
|
24929
24972
|
alignItems: "aic",
|
|
24930
|
-
justifyContent: "
|
|
24973
|
+
justifyContent: "jcsb",
|
|
24931
24974
|
paddingTop: "pt_12px",
|
|
24932
24975
|
paddingBottom: "pb_12px",
|
|
24933
24976
|
flexShrink: "fs0",
|
|
@@ -24938,38 +24981,63 @@ function NavbarMobileDrawer({
|
|
|
24938
24981
|
}]
|
|
24939
24982
|
},
|
|
24940
24983
|
...pageContentPaddingX
|
|
24941
|
-
}), children:
|
|
24942
|
-
|
|
24943
|
-
"
|
|
24984
|
+
}), children: [
|
|
24985
|
+
/* @__PURE__ */ jsx200("div", { className: "mw0", children: showSubLevel && /* @__PURE__ */ jsx200(Button, { label: "Main Menu", icon: "chevronLeft", variant: "quaternary", size: "sm", onClick: () => onLevelChange("global"), ...tid.mobileMenuMainMenu }) }),
|
|
24986
|
+
/* @__PURE__ */ jsx200(IconButton, { icon: "x", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: "Close navigation", onClick: onClose, ...tid.mobileMenuClose })
|
|
24987
|
+
] }),
|
|
24988
|
+
/* @__PURE__ */ jsx200("div", { className: "fg1 mh0 oh relative", children: /* @__PURE__ */ jsx200(AnimatePresence6, { initial: false, children: /* @__PURE__ */ jsxs98(
|
|
24989
|
+
motion6.nav,
|
|
24944
24990
|
{
|
|
24945
24991
|
...trussProps111({
|
|
24946
24992
|
...{
|
|
24947
|
-
|
|
24993
|
+
position: "absolute",
|
|
24994
|
+
top: "top0",
|
|
24995
|
+
bottom: "bottom0",
|
|
24996
|
+
left: "left0",
|
|
24997
|
+
right: "right0",
|
|
24948
24998
|
overflowY: "oya",
|
|
24949
|
-
paddingBottom: "pb3",
|
|
24950
|
-
paddingTop: "pt2",
|
|
24951
24999
|
display: "df",
|
|
24952
25000
|
flexDirection: "fdc",
|
|
24953
|
-
gap: "gap_4px"
|
|
25001
|
+
gap: "gap_4px",
|
|
25002
|
+
paddingTop: "pt2",
|
|
25003
|
+
paddingBottom: "pb3"
|
|
24954
25004
|
},
|
|
24955
25005
|
...pageContentPaddingX
|
|
24956
25006
|
}),
|
|
25007
|
+
initial: {
|
|
25008
|
+
x: "-100%"
|
|
25009
|
+
},
|
|
25010
|
+
animate: {
|
|
25011
|
+
x: 0
|
|
25012
|
+
},
|
|
25013
|
+
exit: {
|
|
25014
|
+
x: "100%"
|
|
25015
|
+
},
|
|
25016
|
+
transition: {
|
|
25017
|
+
ease: "linear",
|
|
25018
|
+
duration: 0.2
|
|
25019
|
+
},
|
|
24957
25020
|
onClickCapture: (e) => {
|
|
24958
25021
|
if (e.target.closest("a")) {
|
|
24959
25022
|
onClose();
|
|
24960
25023
|
}
|
|
24961
25024
|
},
|
|
24962
25025
|
...tid.mobileMenuPanel,
|
|
24963
|
-
children:
|
|
24964
|
-
|
|
24965
|
-
|
|
25026
|
+
children: [
|
|
25027
|
+
showSubLevel && mobileSubNav?.top,
|
|
25028
|
+
/* @__PURE__ */ jsx200(AppNavItems, { items: showSubLevel && mobileSubNav ? mobileSubNav.items : items, panelCollapsed: false, ...tid }),
|
|
25029
|
+
showSubLevel && mobileSubNav?.footer
|
|
25030
|
+
]
|
|
25031
|
+
},
|
|
25032
|
+
showSubLevel ? "sub" : "global"
|
|
25033
|
+
) }) })
|
|
24966
25034
|
] }, "navbarMobileMenuDrawer") })
|
|
24967
25035
|
] });
|
|
24968
25036
|
}
|
|
24969
25037
|
|
|
24970
25038
|
// src/components/Navbar/Navbar.tsx
|
|
24971
25039
|
import { trussProps as trussProps112 } from "@homebound/truss/runtime";
|
|
24972
|
-
import { jsx as
|
|
25040
|
+
import { jsx as jsx201, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
24973
25041
|
function Navbar(props) {
|
|
24974
25042
|
const {
|
|
24975
25043
|
brand,
|
|
@@ -24988,7 +25056,7 @@ function Navbar(props) {
|
|
|
24988
25056
|
overflows
|
|
24989
25057
|
} = useContentOverflow(!sm);
|
|
24990
25058
|
const showMobile = sm || overflows;
|
|
24991
|
-
return /* @__PURE__ */
|
|
25059
|
+
return /* @__PURE__ */ jsx201(ContrastScope, { children: /* @__PURE__ */ jsxs99("nav", { ...trussProps112({
|
|
24992
25060
|
...{
|
|
24993
25061
|
backgroundColor: ["bgColor_var", {
|
|
24994
25062
|
"--backgroundColor": "var(--b-surface-raised)"
|
|
@@ -25006,8 +25074,8 @@ function Navbar(props) {
|
|
|
25006
25074
|
}), ...tid, children: [
|
|
25007
25075
|
/* @__PURE__ */ jsxs99("div", { className: "df aic gap3 fg1 mw0", children: [
|
|
25008
25076
|
/* @__PURE__ */ jsxs99("div", { className: "df aic fs0 gap2", children: [
|
|
25009
|
-
showMobile && /* @__PURE__ */
|
|
25010
|
-
/* @__PURE__ */
|
|
25077
|
+
showMobile && /* @__PURE__ */ jsx201(NavbarMobileMenu, { items, ...tid }),
|
|
25078
|
+
/* @__PURE__ */ jsx201("div", { ...trussProps112({
|
|
25011
25079
|
flexShrink: "fs0",
|
|
25012
25080
|
...hideBrandOnMobile && showMobile ? {
|
|
25013
25081
|
display: "dn"
|
|
@@ -25016,7 +25084,7 @@ function Navbar(props) {
|
|
|
25016
25084
|
] }),
|
|
25017
25085
|
!sm && // Stays mounted while overflowing (hidden) so the items remain measurable and the bar
|
|
25018
25086
|
// can expand again as space frees up.
|
|
25019
|
-
/* @__PURE__ */
|
|
25087
|
+
/* @__PURE__ */ jsx201("div", { ref: containerRef, ...trussProps112({
|
|
25020
25088
|
display: "df",
|
|
25021
25089
|
alignItems: "aic",
|
|
25022
25090
|
flexGrow: "fg1",
|
|
@@ -25025,11 +25093,11 @@ function Navbar(props) {
|
|
|
25025
25093
|
...overflows ? {
|
|
25026
25094
|
visibility: "visibility_hidden"
|
|
25027
25095
|
} : {}
|
|
25028
|
-
}), ...tid.items, children: /* @__PURE__ */
|
|
25096
|
+
}), ...tid.items, children: /* @__PURE__ */ jsx201("div", { ref: contentRef, className: "df aic gap2 width_max_content", children: /* @__PURE__ */ jsx201(AppNavItems, { variant: "global", items, ...tid }) }) })
|
|
25029
25097
|
] }),
|
|
25030
25098
|
/* @__PURE__ */ jsxs99("div", { className: "df aic gap1", children: [
|
|
25031
|
-
rightSlot && /* @__PURE__ */
|
|
25032
|
-
user && /* @__PURE__ */
|
|
25099
|
+
rightSlot && /* @__PURE__ */ jsx201("div", { className: "df aic gap1", ...tid.rightSlot, children: rightSlot }),
|
|
25100
|
+
user && /* @__PURE__ */ jsx201(NavbarUserMenu, { user, ...tid.userMenu })
|
|
25033
25101
|
] })
|
|
25034
25102
|
] }) });
|
|
25035
25103
|
}
|
|
@@ -25037,7 +25105,7 @@ function NavbarUserMenu({
|
|
|
25037
25105
|
user,
|
|
25038
25106
|
...tid
|
|
25039
25107
|
}) {
|
|
25040
|
-
return /* @__PURE__ */
|
|
25108
|
+
return /* @__PURE__ */ jsx201("div", { className: "df aic fs0 ml1", children: /* @__PURE__ */ jsx201(ButtonMenu, { items: user.menuItems, persistentItems: user.persistentItems, trigger: {
|
|
25041
25109
|
src: user.picture,
|
|
25042
25110
|
name: user.name,
|
|
25043
25111
|
size: "sm",
|
|
@@ -25047,7 +25115,7 @@ function NavbarUserMenu({
|
|
|
25047
25115
|
|
|
25048
25116
|
// src/components/Pagination.tsx
|
|
25049
25117
|
import { trussProps as trussProps113 } from "@homebound/truss/runtime";
|
|
25050
|
-
import { jsx as
|
|
25118
|
+
import { jsx as jsx202, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
25051
25119
|
var defaultPage = {
|
|
25052
25120
|
offset: 0,
|
|
25053
25121
|
limit: 100
|
|
@@ -25096,8 +25164,8 @@ function Pagination(props) {
|
|
|
25096
25164
|
paddingRight: "pr2",
|
|
25097
25165
|
paddingTop: "pt2"
|
|
25098
25166
|
}), ...tid, children: [
|
|
25099
|
-
/* @__PURE__ */
|
|
25100
|
-
/* @__PURE__ */
|
|
25167
|
+
/* @__PURE__ */ jsx202("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
25168
|
+
/* @__PURE__ */ jsx202("div", { className: "w_78px", children: /* @__PURE__ */ jsx202(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
25101
25169
|
pageNumber: 1,
|
|
25102
25170
|
pageSize: val
|
|
25103
25171
|
}), autoSort: false, ...tid.pageSize }) }),
|
|
@@ -25109,11 +25177,11 @@ function Pagination(props) {
|
|
|
25109
25177
|
" of ",
|
|
25110
25178
|
totalCount
|
|
25111
25179
|
] }),
|
|
25112
|
-
/* @__PURE__ */
|
|
25180
|
+
/* @__PURE__ */ jsx202(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
25113
25181
|
pageNumber: pageNumber - 1,
|
|
25114
25182
|
pageSize
|
|
25115
25183
|
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
25116
|
-
/* @__PURE__ */
|
|
25184
|
+
/* @__PURE__ */ jsx202(IconButton, { icon: "chevronRight", color: hasNextPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
25117
25185
|
pageNumber: pageNumber + 1,
|
|
25118
25186
|
pageSize
|
|
25119
25187
|
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
@@ -25136,9 +25204,9 @@ function toPageNumberSize(page) {
|
|
|
25136
25204
|
|
|
25137
25205
|
// src/components/ScrollShadows.tsx
|
|
25138
25206
|
import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
25139
|
-
import { useCallback as useCallback34, useMemo as
|
|
25207
|
+
import { useCallback as useCallback34, useMemo as useMemo53, useRef as useRef60, useState as useState55 } from "react";
|
|
25140
25208
|
import { trussProps as trussProps114, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
25141
|
-
import { jsx as
|
|
25209
|
+
import { jsx as jsx203, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
25142
25210
|
function ScrollShadows(props) {
|
|
25143
25211
|
const {
|
|
25144
25212
|
children,
|
|
@@ -25154,10 +25222,10 @@ function ScrollShadows(props) {
|
|
|
25154
25222
|
if (!bgColor.includes("rgba")) {
|
|
25155
25223
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
25156
25224
|
}
|
|
25157
|
-
const [showStartShadow, setShowStartShadow] =
|
|
25158
|
-
const [showEndShadow, setShowEndShadow] =
|
|
25225
|
+
const [showStartShadow, setShowStartShadow] = useState55(false);
|
|
25226
|
+
const [showEndShadow, setShowEndShadow] = useState55(false);
|
|
25159
25227
|
const scrollRef = useRef60(null);
|
|
25160
|
-
const [startShadowStyles, endShadowStyles] =
|
|
25228
|
+
const [startShadowStyles, endShadowStyles] = useMemo53(() => {
|
|
25161
25229
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
25162
25230
|
const commonStyles = {
|
|
25163
25231
|
position: "absolute",
|
|
@@ -25244,7 +25312,7 @@ function ScrollShadows(props) {
|
|
|
25244
25312
|
width: width2
|
|
25245
25313
|
}
|
|
25246
25314
|
}), ...tid, children: [
|
|
25247
|
-
/* @__PURE__ */
|
|
25315
|
+
/* @__PURE__ */ jsx203("div", { ...trussProps114({
|
|
25248
25316
|
...startShadowStyles,
|
|
25249
25317
|
...{
|
|
25250
25318
|
opacity: ["o_var", {
|
|
@@ -25252,7 +25320,7 @@ function ScrollShadows(props) {
|
|
|
25252
25320
|
}]
|
|
25253
25321
|
}
|
|
25254
25322
|
}), "data-chromatic": "ignore" }),
|
|
25255
|
-
/* @__PURE__ */
|
|
25323
|
+
/* @__PURE__ */ jsx203("div", { ...trussProps114({
|
|
25256
25324
|
...endShadowStyles,
|
|
25257
25325
|
...{
|
|
25258
25326
|
opacity: ["o_var", {
|
|
@@ -25260,7 +25328,7 @@ function ScrollShadows(props) {
|
|
|
25260
25328
|
}]
|
|
25261
25329
|
}
|
|
25262
25330
|
}), "data-chromatic": "ignore" }),
|
|
25263
|
-
/* @__PURE__ */
|
|
25331
|
+
/* @__PURE__ */ jsx203("div", { ...trussProps114({
|
|
25264
25332
|
...xss,
|
|
25265
25333
|
...{
|
|
25266
25334
|
overflow: "oa",
|
|
@@ -25273,15 +25341,15 @@ function ScrollShadows(props) {
|
|
|
25273
25341
|
|
|
25274
25342
|
// src/layouts/SideNavLayout/SideNavLayoutContext.tsx
|
|
25275
25343
|
import {
|
|
25276
|
-
createContext as
|
|
25344
|
+
createContext as createContext15,
|
|
25277
25345
|
useCallback as useCallback35,
|
|
25278
|
-
useContext as
|
|
25346
|
+
useContext as useContext27,
|
|
25279
25347
|
useEffect as useEffect36,
|
|
25280
|
-
useMemo as
|
|
25348
|
+
useMemo as useMemo54,
|
|
25281
25349
|
useRef as useRef61,
|
|
25282
|
-
useState as
|
|
25350
|
+
useState as useState56
|
|
25283
25351
|
} from "react";
|
|
25284
|
-
import { jsx as
|
|
25352
|
+
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
25285
25353
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
25286
25354
|
function loadStoredNavState() {
|
|
25287
25355
|
try {
|
|
@@ -25303,9 +25371,9 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
25303
25371
|
}
|
|
25304
25372
|
return loadStoredNavState() ?? defaultNavState ?? "expanded";
|
|
25305
25373
|
}
|
|
25306
|
-
var SideNavLayoutContext =
|
|
25374
|
+
var SideNavLayoutContext = createContext15(void 0);
|
|
25307
25375
|
function SideNavLayoutProvider(props) {
|
|
25308
|
-
const [navState, setNavStateInternal] =
|
|
25376
|
+
const [navState, setNavStateInternal] = useState56(
|
|
25309
25377
|
() => resolveInitialNavState(props.defaultNavState)
|
|
25310
25378
|
);
|
|
25311
25379
|
const bp = useBreakpoint();
|
|
@@ -25328,20 +25396,20 @@ function SideNavLayoutProvider(props) {
|
|
|
25328
25396
|
return next;
|
|
25329
25397
|
});
|
|
25330
25398
|
}, []);
|
|
25331
|
-
const value =
|
|
25332
|
-
return /* @__PURE__ */
|
|
25399
|
+
const value = useMemo54(() => ({ navState, setNavState }), [navState, setNavState]);
|
|
25400
|
+
return /* @__PURE__ */ jsx204(SideNavLayoutContext.Provider, { value, children: props.children });
|
|
25333
25401
|
}
|
|
25334
25402
|
function useSideNavLayoutContext() {
|
|
25335
|
-
return
|
|
25403
|
+
return useContext27(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
25336
25404
|
} };
|
|
25337
25405
|
}
|
|
25338
25406
|
function useHasSideNavLayoutProvider() {
|
|
25339
|
-
return
|
|
25407
|
+
return useContext27(SideNavLayoutContext) !== void 0;
|
|
25340
25408
|
}
|
|
25341
25409
|
|
|
25342
25410
|
// src/components/SideNav/SideNav.tsx
|
|
25343
25411
|
import { trussProps as trussProps115 } from "@homebound/truss/runtime";
|
|
25344
|
-
import { jsx as
|
|
25412
|
+
import { jsx as jsx205, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
25345
25413
|
function SideNav(props) {
|
|
25346
25414
|
const {
|
|
25347
25415
|
top,
|
|
@@ -25355,7 +25423,7 @@ function SideNav(props) {
|
|
|
25355
25423
|
const panelCollapsed = navState === "collapse";
|
|
25356
25424
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
25357
25425
|
return /* @__PURE__ */ jsxs102("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
25358
|
-
top !== void 0 && /* @__PURE__ */
|
|
25426
|
+
top !== void 0 && /* @__PURE__ */ jsx205("div", { ...trussProps115({
|
|
25359
25427
|
flexShrink: "fs0",
|
|
25360
25428
|
paddingLeft: "pl2",
|
|
25361
25429
|
paddingRight: "pr2",
|
|
@@ -25366,7 +25434,7 @@ function SideNav(props) {
|
|
|
25366
25434
|
paddingBottom: "pb4"
|
|
25367
25435
|
} : {}
|
|
25368
25436
|
}), ...tid.top, children: top }),
|
|
25369
|
-
/* @__PURE__ */
|
|
25437
|
+
/* @__PURE__ */ jsx205("div", { ...trussProps115({
|
|
25370
25438
|
flexGrow: "fg1",
|
|
25371
25439
|
overflowY: "oya",
|
|
25372
25440
|
display: "df",
|
|
@@ -25378,8 +25446,8 @@ function SideNav(props) {
|
|
|
25378
25446
|
...top === void 0 ? {
|
|
25379
25447
|
paddingTop: "pt5"
|
|
25380
25448
|
} : {}
|
|
25381
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */
|
|
25382
|
-
footer !== void 0 && /* @__PURE__ */
|
|
25449
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx205(AppNavItems, { items, panelCollapsed }) }),
|
|
25450
|
+
footer !== void 0 && /* @__PURE__ */ jsx205("div", { ...trussProps115({
|
|
25383
25451
|
flexShrink: "fs0",
|
|
25384
25452
|
paddingLeft: "pl2",
|
|
25385
25453
|
paddingRight: "pr2",
|
|
@@ -25457,7 +25525,7 @@ var snackbarId = 1;
|
|
|
25457
25525
|
import { useRef as useRef62 } from "react";
|
|
25458
25526
|
import { useButton as useButton12, useFocusRing as useFocusRing17, useHover as useHover21 } from "react-aria";
|
|
25459
25527
|
import { trussProps as trussProps116, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
|
|
25460
|
-
import { jsx as
|
|
25528
|
+
import { jsx as jsx206, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
25461
25529
|
import { createElement as createElement6 } from "react";
|
|
25462
25530
|
var __maybeInc25 = (inc) => {
|
|
25463
25531
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -25477,7 +25545,7 @@ function Stepper(props) {
|
|
|
25477
25545
|
const minStepWidth = 100;
|
|
25478
25546
|
const gap = 8;
|
|
25479
25547
|
return /* @__PURE__ */ jsxs103("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
25480
|
-
/* @__PURE__ */
|
|
25548
|
+
/* @__PURE__ */ jsx206("ol", { ...trussProps116({
|
|
25481
25549
|
padding: "p_0",
|
|
25482
25550
|
margin: "m_0",
|
|
25483
25551
|
listStyle: "lis_none",
|
|
@@ -25497,9 +25565,9 @@ function Stepper(props) {
|
|
|
25497
25565
|
minWidth: ["mw_var", {
|
|
25498
25566
|
"--minWidth": `${minStepWidth}px`
|
|
25499
25567
|
}]
|
|
25500
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
25568
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx206(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
25501
25569
|
}) }),
|
|
25502
|
-
/* @__PURE__ */
|
|
25570
|
+
/* @__PURE__ */ jsx206("div", { ...trussProps116({
|
|
25503
25571
|
marginTop: "mt1",
|
|
25504
25572
|
backgroundColor: ["bgColor_var", {
|
|
25505
25573
|
"--backgroundColor": "var(--b-field-border-default)"
|
|
@@ -25512,7 +25580,7 @@ function Stepper(props) {
|
|
|
25512
25580
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
25513
25581
|
}],
|
|
25514
25582
|
width: "w100"
|
|
25515
|
-
}), children: /* @__PURE__ */
|
|
25583
|
+
}), children: /* @__PURE__ */ jsx206("div", { ...trussProps116({
|
|
25516
25584
|
backgroundColor: ["bgColor_var", {
|
|
25517
25585
|
"--backgroundColor": "var(--b-primary)"
|
|
25518
25586
|
}],
|
|
@@ -25616,7 +25684,7 @@ function StepButton(props) {
|
|
|
25616
25684
|
} : {},
|
|
25617
25685
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
25618
25686
|
}), ...tid[defaultTestId(label)], children: [
|
|
25619
|
-
/* @__PURE__ */
|
|
25687
|
+
/* @__PURE__ */ jsx206("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx206(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
25620
25688
|
label
|
|
25621
25689
|
] });
|
|
25622
25690
|
}
|
|
@@ -25627,12 +25695,12 @@ function StepIcon({
|
|
|
25627
25695
|
isCurrent = false
|
|
25628
25696
|
}) {
|
|
25629
25697
|
if (state === "error") {
|
|
25630
|
-
return /* @__PURE__ */
|
|
25698
|
+
return /* @__PURE__ */ jsx206(Icon, { icon: "errorCircle" });
|
|
25631
25699
|
}
|
|
25632
25700
|
if (state === "complete") {
|
|
25633
|
-
return /* @__PURE__ */
|
|
25701
|
+
return /* @__PURE__ */ jsx206(Icon, { icon: "check" });
|
|
25634
25702
|
}
|
|
25635
|
-
return /* @__PURE__ */
|
|
25703
|
+
return /* @__PURE__ */ jsx206("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx206("div", { ...trussProps116({
|
|
25636
25704
|
width: "w_10px",
|
|
25637
25705
|
height: "h_10px",
|
|
25638
25706
|
borderStyle: "bss",
|
|
@@ -25649,7 +25717,7 @@ function StepIcon({
|
|
|
25649
25717
|
import { useRef as useRef63 } from "react";
|
|
25650
25718
|
import { mergeProps as mergeProps32, useButton as useButton13, useFocusRing as useFocusRing18, useHover as useHover22, VisuallyHidden as VisuallyHidden10 } from "react-aria";
|
|
25651
25719
|
import { trussProps as trussProps117 } from "@homebound/truss/runtime";
|
|
25652
|
-
import { Fragment as Fragment45, jsx as
|
|
25720
|
+
import { Fragment as Fragment45, jsx as jsx207, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
25653
25721
|
function StepperTab(props) {
|
|
25654
25722
|
const {
|
|
25655
25723
|
label,
|
|
@@ -25690,8 +25758,8 @@ function StepperTab(props) {
|
|
|
25690
25758
|
}), ...tid[defaultTestId(value)], children: [
|
|
25691
25759
|
!collapsed && /* @__PURE__ */ jsxs104(Fragment45, { children: [
|
|
25692
25760
|
/* @__PURE__ */ jsxs104("span", { className: "dg jic mw0", children: [
|
|
25693
|
-
/* @__PURE__ */
|
|
25694
|
-
/* @__PURE__ */
|
|
25761
|
+
/* @__PURE__ */ jsx207("span", { className: "fw6 fz_14px lh_20px visibility_hidden gridArea_1_1 oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1 wordBreak_break_all", "aria-hidden": true, children: label }),
|
|
25762
|
+
/* @__PURE__ */ jsx207("span", { ...trussProps117({
|
|
25695
25763
|
gridArea: "gridArea_1_1",
|
|
25696
25764
|
overflow: "oh",
|
|
25697
25765
|
display: "d_negwebkit_box",
|
|
@@ -25706,7 +25774,7 @@ function StepperTab(props) {
|
|
|
25706
25774
|
} : {}
|
|
25707
25775
|
}), children: label })
|
|
25708
25776
|
] }),
|
|
25709
|
-
/* @__PURE__ */
|
|
25777
|
+
/* @__PURE__ */ jsx207("span", { ...trussProps117({
|
|
25710
25778
|
flexShrink: "fs0",
|
|
25711
25779
|
marginLeft: "ml1",
|
|
25712
25780
|
transition: "transitionAll",
|
|
@@ -25716,10 +25784,10 @@ function StepperTab(props) {
|
|
|
25716
25784
|
opacity: "o100",
|
|
25717
25785
|
transform: "transform_scale_1_translateY_0"
|
|
25718
25786
|
} : {}
|
|
25719
|
-
}), children: /* @__PURE__ */
|
|
25787
|
+
}), children: /* @__PURE__ */ jsx207(Icon, { icon: "check", inc: 2.5, ...tid.check }) })
|
|
25720
25788
|
] }),
|
|
25721
|
-
/* @__PURE__ */
|
|
25722
|
-
/* @__PURE__ */
|
|
25789
|
+
/* @__PURE__ */ jsx207("span", { "aria-hidden": true, ...trussProps117(getIndicatorStyles(active, completed, disabled)), ...tid.indicator }),
|
|
25790
|
+
/* @__PURE__ */ jsx207(VisuallyHidden10, { children: completed ? "Complete" : "Not Complete" })
|
|
25723
25791
|
] });
|
|
25724
25792
|
}
|
|
25725
25793
|
function getStateStyles(active, completed) {
|
|
@@ -25801,7 +25869,7 @@ var stepperTabStyles = {
|
|
|
25801
25869
|
|
|
25802
25870
|
// src/components/StepperTabs/StepperTabs.tsx
|
|
25803
25871
|
import { trussProps as trussProps118 } from "@homebound/truss/runtime";
|
|
25804
|
-
import { jsx as
|
|
25872
|
+
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
25805
25873
|
import { createElement as createElement7 } from "react";
|
|
25806
25874
|
function StepperTabs(props) {
|
|
25807
25875
|
const {
|
|
@@ -25817,7 +25885,7 @@ function StepperTabs(props) {
|
|
|
25817
25885
|
const collapsed = isMobile || !!forceCollapsed;
|
|
25818
25886
|
const capWidth = steps.length <= 3;
|
|
25819
25887
|
const currentStepIndex = Math.max(0, steps.findIndex((step) => step.value === currentStep));
|
|
25820
|
-
return /* @__PURE__ */
|
|
25888
|
+
return /* @__PURE__ */ jsx208("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ jsx208("ol", { ...trussProps118({
|
|
25821
25889
|
padding: "p_0",
|
|
25822
25890
|
margin: "m_0",
|
|
25823
25891
|
listStyle: "lis_none",
|
|
@@ -25844,7 +25912,7 @@ function StepperTabs(props) {
|
|
|
25844
25912
|
"--maxWidth": `${maxStepWidthPx}px`
|
|
25845
25913
|
}]
|
|
25846
25914
|
} : {}
|
|
25847
|
-
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
25915
|
+
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx208(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: isCompleted, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
|
|
25848
25916
|
}) }) });
|
|
25849
25917
|
}
|
|
25850
25918
|
var maxStepWidthPx = 280;
|
|
@@ -25853,7 +25921,7 @@ var gapPx = 6;
|
|
|
25853
25921
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
25854
25922
|
import { createPortal as createPortal8 } from "react-dom";
|
|
25855
25923
|
import { trussProps as trussProps119 } from "@homebound/truss/runtime";
|
|
25856
|
-
import { jsx as
|
|
25924
|
+
import { jsx as jsx209, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
25857
25925
|
function SuperDrawerHeader(props) {
|
|
25858
25926
|
const {
|
|
25859
25927
|
hideControls
|
|
@@ -25873,17 +25941,17 @@ function SuperDrawerHeader(props) {
|
|
|
25873
25941
|
return createPortal8(/* @__PURE__ */ jsxs105("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
25874
25942
|
isStructuredProps(props) ? /* @__PURE__ */ jsxs105("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
25875
25943
|
/* @__PURE__ */ jsxs105("div", { className: "fg1 df aic gap2", children: [
|
|
25876
|
-
/* @__PURE__ */
|
|
25944
|
+
/* @__PURE__ */ jsx209("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
25877
25945
|
props.left
|
|
25878
25946
|
] }),
|
|
25879
|
-
props.right && /* @__PURE__ */
|
|
25880
|
-
] }) : /* @__PURE__ */
|
|
25881
|
-
!hideControls && /* @__PURE__ */
|
|
25947
|
+
props.right && /* @__PURE__ */ jsx209("div", { className: "fs0", children: props.right })
|
|
25948
|
+
] }) : /* @__PURE__ */ jsx209("div", { className: "fg1", children: props.children }),
|
|
25949
|
+
!hideControls && /* @__PURE__ */ jsx209("div", { ...trussProps119({
|
|
25882
25950
|
flexShrink: "fs0",
|
|
25883
25951
|
...isDetail ? {
|
|
25884
25952
|
visibility: "vh"
|
|
25885
25953
|
} : {}
|
|
25886
|
-
}), children: /* @__PURE__ */
|
|
25954
|
+
}), children: /* @__PURE__ */ jsx209(ButtonGroup, { buttons: [{
|
|
25887
25955
|
icon: "chevronLeft",
|
|
25888
25956
|
onClick: () => onPrevClick && onPrevClick(),
|
|
25889
25957
|
disabled: !onPrevClick
|
|
@@ -25902,8 +25970,8 @@ function isStructuredProps(props) {
|
|
|
25902
25970
|
import { motion as motion7 } from "framer-motion";
|
|
25903
25971
|
|
|
25904
25972
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
25905
|
-
import { useMemo as
|
|
25906
|
-
import { jsx as
|
|
25973
|
+
import { useMemo as useMemo55 } from "react";
|
|
25974
|
+
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
25907
25975
|
function useSuperDrawer() {
|
|
25908
25976
|
const {
|
|
25909
25977
|
drawerContentStack: contentStack,
|
|
@@ -25915,7 +25983,7 @@ function useSuperDrawer() {
|
|
|
25915
25983
|
function canCloseDrawerDetails(i, doChange) {
|
|
25916
25984
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
25917
25985
|
if (!canClose(canCloseDrawerDetail)) {
|
|
25918
|
-
openModal({ content: /* @__PURE__ */
|
|
25986
|
+
openModal({ content: /* @__PURE__ */ jsx210(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
25919
25987
|
return false;
|
|
25920
25988
|
}
|
|
25921
25989
|
}
|
|
@@ -25935,14 +26003,14 @@ function useSuperDrawer() {
|
|
|
25935
26003
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
25936
26004
|
if (!canClose(canCloseDrawer)) {
|
|
25937
26005
|
openModal({
|
|
25938
|
-
content: /* @__PURE__ */
|
|
26006
|
+
content: /* @__PURE__ */ jsx210(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
25939
26007
|
});
|
|
25940
26008
|
return;
|
|
25941
26009
|
}
|
|
25942
26010
|
}
|
|
25943
26011
|
doChange();
|
|
25944
26012
|
}
|
|
25945
|
-
const closeActions =
|
|
26013
|
+
const closeActions = useMemo55(
|
|
25946
26014
|
() => {
|
|
25947
26015
|
return {
|
|
25948
26016
|
/** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
|
|
@@ -25977,7 +26045,7 @@ function useSuperDrawer() {
|
|
|
25977
26045
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25978
26046
|
[canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
|
|
25979
26047
|
);
|
|
25980
|
-
const actions =
|
|
26048
|
+
const actions = useMemo55(
|
|
25981
26049
|
() => {
|
|
25982
26050
|
return {
|
|
25983
26051
|
// TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
|
|
@@ -26031,7 +26099,7 @@ function canClose(canCloseCheck) {
|
|
|
26031
26099
|
|
|
26032
26100
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
26033
26101
|
import { trussProps as trussProps120, mergeProps as mergeProps33 } from "@homebound/truss/runtime";
|
|
26034
|
-
import { Fragment as Fragment46, jsx as
|
|
26102
|
+
import { Fragment as Fragment46, jsx as jsx211, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
26035
26103
|
var SuperDrawerContent = ({
|
|
26036
26104
|
children,
|
|
26037
26105
|
actions
|
|
@@ -26051,7 +26119,7 @@ var SuperDrawerContent = ({
|
|
|
26051
26119
|
} = firstContent ?? {};
|
|
26052
26120
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
26053
26121
|
if (kind === "open") {
|
|
26054
|
-
return /* @__PURE__ */
|
|
26122
|
+
return /* @__PURE__ */ jsx211(motion7.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
26055
26123
|
} else if (kind === "detail") {
|
|
26056
26124
|
return /* @__PURE__ */ jsxs106(motion7.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
26057
26125
|
overflow: "auto"
|
|
@@ -26060,8 +26128,8 @@ var SuperDrawerContent = ({
|
|
|
26060
26128
|
delay: 0.3
|
|
26061
26129
|
}
|
|
26062
26130
|
}, children: [
|
|
26063
|
-
/* @__PURE__ */
|
|
26064
|
-
/* @__PURE__ */
|
|
26131
|
+
/* @__PURE__ */ jsx211(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
26132
|
+
/* @__PURE__ */ jsx211(motion7.div, { initial: {
|
|
26065
26133
|
x: width2,
|
|
26066
26134
|
opacity: 0
|
|
26067
26135
|
}, animate: {
|
|
@@ -26079,7 +26147,7 @@ var SuperDrawerContent = ({
|
|
|
26079
26147
|
}, className: "pt2", children: children2 })
|
|
26080
26148
|
] }, "content");
|
|
26081
26149
|
} else {
|
|
26082
|
-
return /* @__PURE__ */
|
|
26150
|
+
return /* @__PURE__ */ jsx211(motion7.div, { ...mergeProps33(void 0, {
|
|
26083
26151
|
overflow: "auto"
|
|
26084
26152
|
}, {
|
|
26085
26153
|
paddingTop: "pt3",
|
|
@@ -26092,7 +26160,7 @@ var SuperDrawerContent = ({
|
|
|
26092
26160
|
}
|
|
26093
26161
|
return /* @__PURE__ */ jsxs106(Fragment46, { children: [
|
|
26094
26162
|
wrapWithMotionAndMaybeBack(children),
|
|
26095
|
-
actions && /* @__PURE__ */
|
|
26163
|
+
actions && /* @__PURE__ */ jsx211("footer", { ...trussProps120({
|
|
26096
26164
|
borderTopStyle: "bts_solid",
|
|
26097
26165
|
borderTopWidth: "btw_1px",
|
|
26098
26166
|
borderColor: ["bc_var", {
|
|
@@ -26105,7 +26173,7 @@ var SuperDrawerContent = ({
|
|
|
26105
26173
|
display: "df",
|
|
26106
26174
|
alignItems: "aic",
|
|
26107
26175
|
justifyContent: "jcfe"
|
|
26108
|
-
}), children: /* @__PURE__ */
|
|
26176
|
+
}), children: /* @__PURE__ */ jsx211("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx211(Button, { ...buttonProps }, i)) }) })
|
|
26109
26177
|
] });
|
|
26110
26178
|
};
|
|
26111
26179
|
|
|
@@ -26149,19 +26217,19 @@ function visit(rows, fn) {
|
|
|
26149
26217
|
|
|
26150
26218
|
// src/components/Tabs.tsx
|
|
26151
26219
|
import { camelCase as camelCase7 } from "change-case";
|
|
26152
|
-
import { useEffect as useEffect38, useMemo as
|
|
26220
|
+
import { useEffect as useEffect38, useMemo as useMemo56, useRef as useRef64, useState as useState57 } from "react";
|
|
26153
26221
|
import { mergeProps as mergeProps34, useFocusRing as useFocusRing19, useHover as useHover23 } from "react-aria";
|
|
26154
26222
|
import { matchPath } from "react-router";
|
|
26155
26223
|
import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
|
|
26156
26224
|
import { trussProps as trussProps121, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
|
|
26157
|
-
import { Fragment as Fragment47, jsx as
|
|
26225
|
+
import { Fragment as Fragment47, jsx as jsx212, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
26158
26226
|
function TabsWithContent(props) {
|
|
26159
26227
|
const styles = hideTabs(props) ? {} : {
|
|
26160
26228
|
paddingTop: "pt3"
|
|
26161
26229
|
};
|
|
26162
26230
|
return /* @__PURE__ */ jsxs107(Fragment47, { children: [
|
|
26163
|
-
/* @__PURE__ */
|
|
26164
|
-
/* @__PURE__ */
|
|
26231
|
+
/* @__PURE__ */ jsx212(Tabs, { ...props }),
|
|
26232
|
+
/* @__PURE__ */ jsx212(TabContent, { ...props, contentXss: {
|
|
26165
26233
|
...styles,
|
|
26166
26234
|
...props.contentXss
|
|
26167
26235
|
} })
|
|
@@ -26186,7 +26254,7 @@ function TabContent(props) {
|
|
|
26186
26254
|
return (
|
|
26187
26255
|
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
26188
26256
|
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
26189
|
-
/* @__PURE__ */
|
|
26257
|
+
/* @__PURE__ */ jsx212(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx212("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps121(contentXss), children: selectedTab.render() }) })
|
|
26190
26258
|
);
|
|
26191
26259
|
}
|
|
26192
26260
|
function Tabs(props) {
|
|
@@ -26210,7 +26278,7 @@ function Tabs(props) {
|
|
|
26210
26278
|
focusProps
|
|
26211
26279
|
} = useFocusRing19();
|
|
26212
26280
|
const tid = useTestIds(others, "tabs");
|
|
26213
|
-
const [active, setActive] =
|
|
26281
|
+
const [active, setActive] = useState57(selected);
|
|
26214
26282
|
const ref = useRef64(null);
|
|
26215
26283
|
useEffect38(() => setActive(selected), [selected]);
|
|
26216
26284
|
function onKeyUp(e) {
|
|
@@ -26246,11 +26314,11 @@ function Tabs(props) {
|
|
|
26246
26314
|
}
|
|
26247
26315
|
} : {}
|
|
26248
26316
|
}), children: [
|
|
26249
|
-
!hideTabs(props) && /* @__PURE__ */
|
|
26317
|
+
!hideTabs(props) && /* @__PURE__ */ jsx212("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
26250
26318
|
const uniqueValue = uniqueTabValue(tab);
|
|
26251
|
-
return /* @__PURE__ */
|
|
26319
|
+
return /* @__PURE__ */ jsx212(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
26252
26320
|
}) }),
|
|
26253
|
-
right && /* @__PURE__ */
|
|
26321
|
+
right && /* @__PURE__ */ jsx212("div", { className: "mla df aic gap1 pb1", children: right })
|
|
26254
26322
|
] });
|
|
26255
26323
|
}
|
|
26256
26324
|
function TabImpl(props) {
|
|
@@ -26284,7 +26352,7 @@ function TabImpl(props) {
|
|
|
26284
26352
|
hoverStyles: hoverStyles4,
|
|
26285
26353
|
disabledStyles: disabledStyles3,
|
|
26286
26354
|
activeHoverStyles
|
|
26287
|
-
} =
|
|
26355
|
+
} = useMemo56(() => getTabStyles(), []);
|
|
26288
26356
|
const uniqueValue = uniqueTabValue(tab);
|
|
26289
26357
|
const tabProps = {
|
|
26290
26358
|
"aria-controls": `${uniqueValue}-tabPanel`,
|
|
@@ -26312,15 +26380,15 @@ function TabImpl(props) {
|
|
|
26312
26380
|
});
|
|
26313
26381
|
const tabLabel = /* @__PURE__ */ jsxs107(Fragment47, { children: [
|
|
26314
26382
|
label,
|
|
26315
|
-
(icon || endAdornment) && /* @__PURE__ */
|
|
26383
|
+
(icon || endAdornment) && /* @__PURE__ */ jsx212("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx212(Icon, { icon }) : endAdornment })
|
|
26316
26384
|
] });
|
|
26317
26385
|
return isDisabled ? maybeTooltip({
|
|
26318
26386
|
title: resolveTooltip(disabled),
|
|
26319
26387
|
placement: "top",
|
|
26320
|
-
children: /* @__PURE__ */
|
|
26321
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */
|
|
26388
|
+
children: /* @__PURE__ */ jsx212("div", { ...tabProps, children: tabLabel })
|
|
26389
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx212(Link7, { ...mergeProps34(tabProps, interactiveProps, {
|
|
26322
26390
|
className: "navLink"
|
|
26323
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */
|
|
26391
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx212("button", { ...{
|
|
26324
26392
|
...tabProps,
|
|
26325
26393
|
...interactiveProps
|
|
26326
26394
|
}, children: tabLabel });
|
|
@@ -26428,7 +26496,7 @@ function hideTabs(props) {
|
|
|
26428
26496
|
}
|
|
26429
26497
|
|
|
26430
26498
|
// src/components/TagGroup.tsx
|
|
26431
|
-
import { jsx as
|
|
26499
|
+
import { jsx as jsx213, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
26432
26500
|
function TagGroup(props) {
|
|
26433
26501
|
const {
|
|
26434
26502
|
tags,
|
|
@@ -26437,8 +26505,8 @@ function TagGroup(props) {
|
|
|
26437
26505
|
} = props;
|
|
26438
26506
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
26439
26507
|
return /* @__PURE__ */ jsxs108("div", { ...tid, className: "df aic fww gap1", children: [
|
|
26440
|
-
tags.map((tag) => /* @__PURE__ */
|
|
26441
|
-
onEdit && /* @__PURE__ */
|
|
26508
|
+
tags.map((tag) => /* @__PURE__ */ jsx213(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
26509
|
+
onEdit && /* @__PURE__ */ jsx213("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ jsx213(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
26442
26510
|
] });
|
|
26443
26511
|
}
|
|
26444
26512
|
|
|
@@ -26452,14 +26520,14 @@ function useToast() {
|
|
|
26452
26520
|
|
|
26453
26521
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
26454
26522
|
import { trussProps as trussProps122, mergeProps as mergeProps35, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
|
|
26455
|
-
import { jsx as
|
|
26523
|
+
import { jsx as jsx214, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
26456
26524
|
var __maybeInc26 = (inc) => {
|
|
26457
26525
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26458
26526
|
};
|
|
26459
26527
|
function SideNavLayout(props) {
|
|
26460
26528
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
26461
|
-
if (hasProvider) return /* @__PURE__ */
|
|
26462
|
-
return /* @__PURE__ */
|
|
26529
|
+
if (hasProvider) return /* @__PURE__ */ jsx214(SideNavLayoutContent, { ...props });
|
|
26530
|
+
return /* @__PURE__ */ jsx214(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx214(SideNavLayoutContent, { ...props }) });
|
|
26463
26531
|
}
|
|
26464
26532
|
function SideNavLayoutContent(props) {
|
|
26465
26533
|
const {
|
|
@@ -26476,8 +26544,9 @@ function SideNavLayoutContent(props) {
|
|
|
26476
26544
|
const bp = useBreakpoint();
|
|
26477
26545
|
const tid = useTestIds(props, "sideNavLayout");
|
|
26478
26546
|
const railCollapsedWidthPx = 56;
|
|
26547
|
+
const showMobileSubNav = useRegisterMobileSubNav(sideNav);
|
|
26479
26548
|
const collapsed = navState === "collapse";
|
|
26480
|
-
const showRail = navState !== "hidden";
|
|
26549
|
+
const showRail = navState !== "hidden" && !showMobileSubNav;
|
|
26481
26550
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
26482
26551
|
const navTop = bannerAndNavbarChromeTop();
|
|
26483
26552
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
@@ -26538,18 +26607,18 @@ function SideNavLayoutContent(props) {
|
|
|
26538
26607
|
}
|
|
26539
26608
|
}
|
|
26540
26609
|
}), ...tid.sideNav, children: [
|
|
26541
|
-
showCollapseToggle && /* @__PURE__ */
|
|
26542
|
-
/* @__PURE__ */
|
|
26610
|
+
showCollapseToggle && /* @__PURE__ */ jsx214("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ jsx214(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
26611
|
+
/* @__PURE__ */ jsx214("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ jsx214(SideNav, { ...sideNav }) })
|
|
26543
26612
|
] });
|
|
26544
|
-
return /* @__PURE__ */
|
|
26613
|
+
return /* @__PURE__ */ jsx214(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs109("div", { ...mergeProps35(void 0, {
|
|
26545
26614
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
26546
26615
|
}, {
|
|
26547
26616
|
display: "df",
|
|
26548
26617
|
flexDirection: "fdr",
|
|
26549
26618
|
width: "w100"
|
|
26550
26619
|
}), ...tid, children: [
|
|
26551
|
-
contrastRail ? /* @__PURE__ */
|
|
26552
|
-
/* @__PURE__ */
|
|
26620
|
+
contrastRail ? /* @__PURE__ */ jsx214(ContrastScope, { children: rail }) : rail,
|
|
26621
|
+
/* @__PURE__ */ jsx214("div", { ...trussProps122({
|
|
26553
26622
|
display: "df",
|
|
26554
26623
|
flexDirection: "fdc",
|
|
26555
26624
|
flexGrow: "fg1",
|
|
@@ -26566,7 +26635,7 @@ function SideNavLayoutContent(props) {
|
|
|
26566
26635
|
|
|
26567
26636
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
26568
26637
|
import { trussProps as trussProps123, mergeProps as mergeProps36, maybeCssVar as maybeCssVar59 } from "@homebound/truss/runtime";
|
|
26569
|
-
import { jsx as
|
|
26638
|
+
import { jsx as jsx215, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
26570
26639
|
var __maybeInc27 = (inc) => {
|
|
26571
26640
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26572
26641
|
};
|
|
@@ -26582,18 +26651,18 @@ function EnvironmentBannerLayout(props) {
|
|
|
26582
26651
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
26583
26652
|
};
|
|
26584
26653
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
26585
|
-
return /* @__PURE__ */
|
|
26654
|
+
return /* @__PURE__ */ jsx215(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx215(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ jsxs110("div", { ...mergeProps36(void 0, style, {
|
|
26586
26655
|
display: "df",
|
|
26587
26656
|
flexDirection: "fdc",
|
|
26588
26657
|
width: "wfc",
|
|
26589
26658
|
minWidth: "mw100"
|
|
26590
26659
|
}), ...tid, children: [
|
|
26591
|
-
showBanner && environmentBanner && /* @__PURE__ */
|
|
26660
|
+
showBanner && environmentBanner && /* @__PURE__ */ jsx215("div", { ...mergeProps36(void 0, {
|
|
26592
26661
|
height: environmentBannerSizePx
|
|
26593
26662
|
}, {
|
|
26594
26663
|
flexShrink: "fs0",
|
|
26595
26664
|
width: "w100"
|
|
26596
|
-
}), children: /* @__PURE__ */
|
|
26665
|
+
}), children: /* @__PURE__ */ jsx215("div", { ...trussProps123({
|
|
26597
26666
|
position: "fixed",
|
|
26598
26667
|
top: "top0",
|
|
26599
26668
|
left: "left0",
|
|
@@ -26603,14 +26672,14 @@ function EnvironmentBannerLayout(props) {
|
|
|
26603
26672
|
width: ["w_var", {
|
|
26604
26673
|
"--width": maybeCssVar59(__maybeInc27(innerWidth))
|
|
26605
26674
|
}]
|
|
26606
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */
|
|
26675
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ jsx215(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
26607
26676
|
children
|
|
26608
26677
|
] }) }) });
|
|
26609
26678
|
}
|
|
26610
26679
|
|
|
26611
26680
|
// src/layouts/FormSectionLayout/FormSectionLayout.tsx
|
|
26612
26681
|
import { trussProps as trussProps124 } from "@homebound/truss/runtime";
|
|
26613
|
-
import { jsx as
|
|
26682
|
+
import { jsx as jsx216, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
26614
26683
|
function FormSectionLayout(props) {
|
|
26615
26684
|
const {
|
|
26616
26685
|
title,
|
|
@@ -26624,10 +26693,10 @@ function FormSectionLayout(props) {
|
|
|
26624
26693
|
/* @__PURE__ */ jsxs111("div", { className: "df fdc gap3", children: [
|
|
26625
26694
|
/* @__PURE__ */ jsxs111("div", { className: "df fdc jcsb gap_12px", children: [
|
|
26626
26695
|
/* @__PURE__ */ jsxs111("div", { className: "df jcsb aic", children: [
|
|
26627
|
-
/* @__PURE__ */
|
|
26628
|
-
actions && /* @__PURE__ */
|
|
26696
|
+
/* @__PURE__ */ jsx216("h1", { className: "fw6 fz_20px lh_28px", ...tid.title, children: title }),
|
|
26697
|
+
actions && /* @__PURE__ */ jsx216("div", { className: "df gap1 fs0", ...tid.actions, children: actions.map((action) => action.kind === "icon" ? /* @__PURE__ */ jsx216(IconButton, { ...action, variant: "outline" }, action.icon) : /* @__PURE__ */ jsx216(Button, { ...action }, `${action.label}`)) })
|
|
26629
26698
|
] }),
|
|
26630
|
-
description && /* @__PURE__ */
|
|
26699
|
+
description && /* @__PURE__ */ jsx216("div", { ...trussProps124({
|
|
26631
26700
|
fontWeight: "fw4",
|
|
26632
26701
|
fontSize: "fz_14px",
|
|
26633
26702
|
lineHeight: "lh_20px",
|
|
@@ -26638,16 +26707,16 @@ function FormSectionLayout(props) {
|
|
|
26638
26707
|
] }),
|
|
26639
26708
|
initialFields
|
|
26640
26709
|
] }),
|
|
26641
|
-
sections && /* @__PURE__ */
|
|
26710
|
+
sections && /* @__PURE__ */ jsx216("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ jsx216(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
26642
26711
|
] });
|
|
26643
26712
|
}
|
|
26644
26713
|
|
|
26645
26714
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
26646
|
-
import { useMemo as
|
|
26715
|
+
import { useMemo as useMemo57, useRef as useRef66 } from "react";
|
|
26647
26716
|
import { mergeProps as mergeProps37, maybeCssVar as maybeCssVar60 } from "@homebound/truss/runtime";
|
|
26648
26717
|
|
|
26649
26718
|
// src/layouts/useAutoHideOnScroll.ts
|
|
26650
|
-
import { useLayoutEffect as
|
|
26719
|
+
import { useLayoutEffect as useLayoutEffect10, useRef as useRef65, useState as useState58 } from "react";
|
|
26651
26720
|
var THRESHOLD = 80;
|
|
26652
26721
|
function getInitialAutoHideState() {
|
|
26653
26722
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -26657,15 +26726,15 @@ function getInitialAutoHideState() {
|
|
|
26657
26726
|
}
|
|
26658
26727
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
26659
26728
|
const initial = getInitialAutoHideState();
|
|
26660
|
-
const [state, setState] =
|
|
26729
|
+
const [state, setState] = useState58(initial.state);
|
|
26661
26730
|
const stateRef = useRef65(initial.state);
|
|
26662
|
-
const [atTop, setAtTop] =
|
|
26731
|
+
const [atTop, setAtTop] = useState58(initial.atTop);
|
|
26663
26732
|
const atTopRef = useRef65(initial.atTop);
|
|
26664
26733
|
const getTopOffsetRef = useRef65(getTopOffset);
|
|
26665
26734
|
getTopOffsetRef.current = getTopOffset;
|
|
26666
26735
|
const lastScrollY = useRef65(Number.POSITIVE_INFINITY);
|
|
26667
26736
|
const lastScrollHeight = useRef65(0);
|
|
26668
|
-
|
|
26737
|
+
useLayoutEffect10(() => {
|
|
26669
26738
|
if (!enabled) {
|
|
26670
26739
|
stateRef.current = "static";
|
|
26671
26740
|
atTopRef.current = true;
|
|
@@ -26738,34 +26807,34 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
26738
26807
|
|
|
26739
26808
|
// src/layouts/useMeasuredHeight.ts
|
|
26740
26809
|
import { useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
|
|
26741
|
-
import { useCallback as useCallback38, useLayoutEffect as
|
|
26810
|
+
import { useCallback as useCallback38, useLayoutEffect as useLayoutEffect11, useState as useState59 } from "react";
|
|
26742
26811
|
function useMeasuredHeight(ref, enabled) {
|
|
26743
|
-
const [height, setHeight] =
|
|
26812
|
+
const [height, setHeight] = useState59(0);
|
|
26744
26813
|
const syncElementHeight = useCallback38(() => {
|
|
26745
26814
|
const el = ref.current;
|
|
26746
26815
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
26747
26816
|
setHeight((prev) => prev === next ? prev : next);
|
|
26748
26817
|
}, [ref]);
|
|
26749
26818
|
useResizeObserver10({ ref, onResize: syncElementHeight });
|
|
26750
|
-
|
|
26819
|
+
useLayoutEffect11(() => {
|
|
26751
26820
|
syncElementHeight();
|
|
26752
26821
|
}, [enabled, syncElementHeight]);
|
|
26753
26822
|
return height;
|
|
26754
26823
|
}
|
|
26755
26824
|
|
|
26756
26825
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
26757
|
-
import { createContext as
|
|
26758
|
-
import { jsx as
|
|
26759
|
-
var NavbarLayoutHeightContext =
|
|
26826
|
+
import { createContext as createContext16, useContext as useContext28 } from "react";
|
|
26827
|
+
import { jsx as jsx217 } from "react/jsx-runtime";
|
|
26828
|
+
var NavbarLayoutHeightContext = createContext16(0);
|
|
26760
26829
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
26761
|
-
return /* @__PURE__ */
|
|
26830
|
+
return /* @__PURE__ */ jsx217(NavbarLayoutHeightContext.Provider, { value, children });
|
|
26762
26831
|
}
|
|
26763
26832
|
function useNavbarLayoutHeight() {
|
|
26764
|
-
return
|
|
26833
|
+
return useContext28(NavbarLayoutHeightContext);
|
|
26765
26834
|
}
|
|
26766
26835
|
|
|
26767
26836
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
26768
|
-
import { jsx as
|
|
26837
|
+
import { jsx as jsx218, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
26769
26838
|
var __maybeInc28 = (inc) => {
|
|
26770
26839
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26771
26840
|
};
|
|
@@ -26818,29 +26887,29 @@ function NavbarLayout(props) {
|
|
|
26818
26887
|
const innerStyle = autoHideState !== "static" ? {
|
|
26819
26888
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
26820
26889
|
} : void 0;
|
|
26821
|
-
const navbarEl =
|
|
26822
|
-
return /* @__PURE__ */
|
|
26890
|
+
const navbarEl = useMemo57(() => /* @__PURE__ */ jsx218(Navbar, { ...navbar }), [navbar]);
|
|
26891
|
+
return /* @__PURE__ */ jsx218(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx218(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsx218(MobileSubNavProvider, { children: /* @__PURE__ */ jsxs112("div", { ...mergeProps37(void 0, cssVars, {
|
|
26823
26892
|
display: "df",
|
|
26824
26893
|
flexDirection: "fdc",
|
|
26825
26894
|
width: "wfc",
|
|
26826
26895
|
minWidth: "mw100"
|
|
26827
26896
|
}), ...tid, children: [
|
|
26828
|
-
/* @__PURE__ */
|
|
26897
|
+
/* @__PURE__ */ jsx218("div", { ref: spacerRef, ...mergeProps37(void 0, {
|
|
26829
26898
|
height: navHeight
|
|
26830
26899
|
}, {
|
|
26831
26900
|
flexShrink: "fs0",
|
|
26832
26901
|
width: "w100"
|
|
26833
|
-
}), children: /* @__PURE__ */
|
|
26834
|
-
/* @__PURE__ */
|
|
26835
|
-
] }) }) });
|
|
26902
|
+
}), children: /* @__PURE__ */ jsx218("div", { ref: navMetricsRef, ...mergeProps37(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
26903
|
+
/* @__PURE__ */ jsx218("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
26904
|
+
] }) }) }) });
|
|
26836
26905
|
}
|
|
26837
26906
|
|
|
26838
26907
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
26839
|
-
import { useCallback as useCallback39, useMemo as
|
|
26908
|
+
import { useCallback as useCallback39, useMemo as useMemo58, useRef as useRef67 } from "react";
|
|
26840
26909
|
|
|
26841
26910
|
// src/components/Headers/BaseHeader.tsx
|
|
26842
26911
|
import { trussProps as trussProps125 } from "@homebound/truss/runtime";
|
|
26843
|
-
import { jsx as
|
|
26912
|
+
import { jsx as jsx219, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
26844
26913
|
function BaseHeader(props) {
|
|
26845
26914
|
const {
|
|
26846
26915
|
title,
|
|
@@ -26881,8 +26950,8 @@ function BaseHeader(props) {
|
|
|
26881
26950
|
}
|
|
26882
26951
|
}), children: [
|
|
26883
26952
|
/* @__PURE__ */ jsxs113("div", { className: "mw0", children: [
|
|
26884
|
-
breadcrumbs && /* @__PURE__ */
|
|
26885
|
-
/* @__PURE__ */
|
|
26953
|
+
breadcrumbs && /* @__PURE__ */ jsx219(Breadcrumbs, { ...breadcrumbs }),
|
|
26954
|
+
/* @__PURE__ */ jsx219("h1", { ...tid.title, ...trussProps125({
|
|
26886
26955
|
fontWeight: "fw6",
|
|
26887
26956
|
fontSize: "fz_20px",
|
|
26888
26957
|
lineHeight: "lh_28px",
|
|
@@ -26891,7 +26960,7 @@ function BaseHeader(props) {
|
|
|
26891
26960
|
}]
|
|
26892
26961
|
}), children: title })
|
|
26893
26962
|
] }),
|
|
26894
|
-
/* @__PURE__ */
|
|
26963
|
+
/* @__PURE__ */ jsx219("div", { className: "fs0", children: rightSlot })
|
|
26895
26964
|
] }),
|
|
26896
26965
|
bottomSlot
|
|
26897
26966
|
] });
|
|
@@ -26899,14 +26968,14 @@ function BaseHeader(props) {
|
|
|
26899
26968
|
|
|
26900
26969
|
// src/components/Headers/PageHeader.tsx
|
|
26901
26970
|
import { trussProps as trussProps126 } from "@homebound/truss/runtime";
|
|
26902
|
-
import { jsx as
|
|
26971
|
+
import { jsx as jsx220 } from "react/jsx-runtime";
|
|
26903
26972
|
function PageHeader2(props) {
|
|
26904
26973
|
const {
|
|
26905
26974
|
tabs,
|
|
26906
26975
|
...otherProps
|
|
26907
26976
|
} = props;
|
|
26908
26977
|
const tid = useTestIds(otherProps, "header");
|
|
26909
|
-
return /* @__PURE__ */
|
|
26978
|
+
return /* @__PURE__ */ jsx220(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ jsx220("div", { ...trussProps126(pageContentPaddingX), children: /* @__PURE__ */ jsx220(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
26910
26979
|
}
|
|
26911
26980
|
|
|
26912
26981
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
@@ -26916,7 +26985,7 @@ function useBannerAndNavbarHeight() {
|
|
|
26916
26985
|
|
|
26917
26986
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
26918
26987
|
import { mergeProps as mergeProps38, maybeCssVar as maybeCssVar61 } from "@homebound/truss/runtime";
|
|
26919
|
-
import { jsx as
|
|
26988
|
+
import { jsx as jsx221, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
26920
26989
|
var __maybeInc29 = (inc) => {
|
|
26921
26990
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26922
26991
|
};
|
|
@@ -26971,37 +27040,37 @@ function PageHeaderLayout(props) {
|
|
|
26971
27040
|
const innerStyle = autoHideState !== "static" ? {
|
|
26972
27041
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
26973
27042
|
} : void 0;
|
|
26974
|
-
const pageHeaderEl =
|
|
26975
|
-
return /* @__PURE__ */
|
|
27043
|
+
const pageHeaderEl = useMemo58(() => /* @__PURE__ */ jsx221(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
27044
|
+
return /* @__PURE__ */ jsx221(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs114("div", { ...mergeProps38(void 0, cssVars, {
|
|
26976
27045
|
display: "df",
|
|
26977
27046
|
flexDirection: "fdc",
|
|
26978
27047
|
width: "w100"
|
|
26979
27048
|
}), ...tid, children: [
|
|
26980
|
-
/* @__PURE__ */
|
|
27049
|
+
/* @__PURE__ */ jsx221("div", { ref: spacerRef, ...mergeProps38(void 0, {
|
|
26981
27050
|
height: headerHeight
|
|
26982
27051
|
}, {
|
|
26983
27052
|
flexShrink: "fs0",
|
|
26984
27053
|
width: "w100"
|
|
26985
|
-
}), children: /* @__PURE__ */
|
|
26986
|
-
/* @__PURE__ */
|
|
27054
|
+
}), children: /* @__PURE__ */ jsx221("div", { ref: headerMetricsRef, ...mergeProps38(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
27055
|
+
/* @__PURE__ */ jsx221("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
26987
27056
|
] }) });
|
|
26988
27057
|
}
|
|
26989
27058
|
|
|
26990
27059
|
// src/layouts/WorkflowLayout/WorkflowLayout.tsx
|
|
26991
|
-
import { useLayoutEffect as
|
|
27060
|
+
import { useLayoutEffect as useLayoutEffect12, useRef as useRef69, useState as useState60 } from "react";
|
|
26992
27061
|
|
|
26993
27062
|
// src/components/Headers/WorkflowHeader.tsx
|
|
26994
|
-
import { jsx as
|
|
27063
|
+
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
26995
27064
|
function WorkflowHeader(props) {
|
|
26996
27065
|
const { stepperTabs, ...otherProps } = props;
|
|
26997
27066
|
const tid = useTestIds(otherProps, "header");
|
|
26998
|
-
return /* @__PURE__ */
|
|
27067
|
+
return /* @__PURE__ */ jsx222(BaseHeader, { ...otherProps, bottomSlot: /* @__PURE__ */ jsx222(StepperTabs, { ...stepperTabs, ...tid.stepperTabs }) });
|
|
26999
27068
|
}
|
|
27000
27069
|
|
|
27001
27070
|
// src/layouts/WorkflowLayout/useUnsavedChangesGuard.tsx
|
|
27002
27071
|
import { useEffect as useEffect39, useRef as useRef68 } from "react";
|
|
27003
27072
|
import { useBlocker } from "react-router-dom";
|
|
27004
|
-
import { jsx as
|
|
27073
|
+
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
27005
27074
|
function useUnsavedChangesGuard(options) {
|
|
27006
27075
|
const { isDirty, onCancel } = options;
|
|
27007
27076
|
const { openModal } = useModal();
|
|
@@ -27024,7 +27093,7 @@ function useUnsavedChangesGuard(options) {
|
|
|
27024
27093
|
}
|
|
27025
27094
|
openModal({
|
|
27026
27095
|
allowClosing: false,
|
|
27027
|
-
content: /* @__PURE__ */
|
|
27096
|
+
content: /* @__PURE__ */ jsx223(ConfirmCloseModal, { onClose: () => onCancel(e) })
|
|
27028
27097
|
});
|
|
27029
27098
|
};
|
|
27030
27099
|
const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
|
|
@@ -27036,7 +27105,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
27036
27105
|
useEffect39(() => {
|
|
27037
27106
|
openModal({
|
|
27038
27107
|
allowClosing: false,
|
|
27039
|
-
content: /* @__PURE__ */
|
|
27108
|
+
content: /* @__PURE__ */ jsx223(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
|
|
27040
27109
|
});
|
|
27041
27110
|
return () => closeModal();
|
|
27042
27111
|
}, []);
|
|
@@ -27044,7 +27113,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
27044
27113
|
}
|
|
27045
27114
|
|
|
27046
27115
|
// src/layouts/WorkflowLayout/WorkflowActions.tsx
|
|
27047
|
-
import { jsx as
|
|
27116
|
+
import { jsx as jsx224, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
27048
27117
|
function WorkflowActions(props) {
|
|
27049
27118
|
const {
|
|
27050
27119
|
isFirstStep,
|
|
@@ -27059,18 +27128,18 @@ function WorkflowActions(props) {
|
|
|
27059
27128
|
primaryDisabled
|
|
27060
27129
|
} = props;
|
|
27061
27130
|
return /* @__PURE__ */ jsxs115("div", { className: "df aic jcsb sm_w100", children: [
|
|
27062
|
-
/* @__PURE__ */
|
|
27131
|
+
/* @__PURE__ */ jsx224("div", { className: "df aic", children: !isFirstStep && isMobile && /* @__PURE__ */ jsx224(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
|
|
27063
27132
|
/* @__PURE__ */ jsxs115("div", { className: "df aic gap1", children: [
|
|
27064
|
-
/* @__PURE__ */
|
|
27065
|
-
onSaveAndExit && /* @__PURE__ */
|
|
27066
|
-
isLastStep ? /* @__PURE__ */
|
|
27133
|
+
/* @__PURE__ */ jsx224(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
27134
|
+
onSaveAndExit && /* @__PURE__ */ jsx224(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
27135
|
+
isLastStep ? /* @__PURE__ */ jsx224(Button, { label: completeLabel, variant: "primary", onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ jsx224(Button, { label: "Continue", variant: "primary", onClick: onContinue, disabled: primaryDisabled })
|
|
27067
27136
|
] })
|
|
27068
27137
|
] });
|
|
27069
27138
|
}
|
|
27070
27139
|
|
|
27071
27140
|
// src/layouts/WorkflowLayout/WorkflowLayout.tsx
|
|
27072
27141
|
import { trussProps as trussProps127, mergeProps as mergeProps39, maybeCssVar as maybeCssVar62 } from "@homebound/truss/runtime";
|
|
27073
|
-
import { jsx as
|
|
27142
|
+
import { jsx as jsx225, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
27074
27143
|
var __maybeInc30 = (inc) => {
|
|
27075
27144
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27076
27145
|
};
|
|
@@ -27089,7 +27158,7 @@ function WorkflowLayout(props) {
|
|
|
27089
27158
|
...step,
|
|
27090
27159
|
value: defaultTestId(step.label)
|
|
27091
27160
|
}));
|
|
27092
|
-
const [currentStep, setCurrentStep] =
|
|
27161
|
+
const [currentStep, setCurrentStep] = useState60(() => getInitialStep(stepTabs, defaultStep));
|
|
27093
27162
|
const tid = useTestIds(props, "workflowLayout");
|
|
27094
27163
|
const {
|
|
27095
27164
|
sm: isMobile
|
|
@@ -27112,7 +27181,7 @@ function WorkflowLayout(props) {
|
|
|
27112
27181
|
const isFirstStep = currentIndex <= 0;
|
|
27113
27182
|
const isLastStep = currentIndex === stepTabs.length - 1;
|
|
27114
27183
|
const activeStep = stepTabs[currentIndex];
|
|
27115
|
-
const buttons = /* @__PURE__ */
|
|
27184
|
+
const buttons = /* @__PURE__ */ jsx225(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(stepTabs[currentIndex - 1].value), onCancel: onCancelClick, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !activeStep?.isValid, onContinue: async () => {
|
|
27116
27185
|
const onContinue = activeStep?.onContinue;
|
|
27117
27186
|
if (onContinue) {
|
|
27118
27187
|
const allowed = await onContinue();
|
|
@@ -27121,7 +27190,7 @@ function WorkflowLayout(props) {
|
|
|
27121
27190
|
setCurrentStep(stepTabs[currentIndex + 1].value);
|
|
27122
27191
|
} });
|
|
27123
27192
|
const showFooter = isMobile;
|
|
27124
|
-
|
|
27193
|
+
useLayoutEffect12(() => {
|
|
27125
27194
|
const root = document.documentElement;
|
|
27126
27195
|
const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
|
|
27127
27196
|
root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
|
|
@@ -27133,7 +27202,7 @@ function WorkflowLayout(props) {
|
|
|
27133
27202
|
}
|
|
27134
27203
|
};
|
|
27135
27204
|
}, [showFooter]);
|
|
27136
|
-
const headerEl = /* @__PURE__ */
|
|
27205
|
+
const headerEl = /* @__PURE__ */ jsx225(
|
|
27137
27206
|
WorkflowHeader,
|
|
27138
27207
|
{
|
|
27139
27208
|
...headerProps,
|
|
@@ -27152,7 +27221,7 @@ function WorkflowLayout(props) {
|
|
|
27152
27221
|
flexDirection: "fdc",
|
|
27153
27222
|
width: "w100"
|
|
27154
27223
|
}), ...tid, children: [
|
|
27155
|
-
/* @__PURE__ */
|
|
27224
|
+
/* @__PURE__ */ jsx225("div", { ref: headerMetricsRef, ...trussProps127({
|
|
27156
27225
|
position: "sticky",
|
|
27157
27226
|
left: "left0",
|
|
27158
27227
|
width: ["w_var", {
|
|
@@ -27165,14 +27234,14 @@ function WorkflowLayout(props) {
|
|
|
27165
27234
|
"--top": maybeCssVar62(__maybeInc30(outerTop))
|
|
27166
27235
|
}]
|
|
27167
27236
|
}), ...tid.header, children: headerEl }),
|
|
27168
|
-
/* @__PURE__ */
|
|
27169
|
-
showFooter && /* @__PURE__ */
|
|
27237
|
+
/* @__PURE__ */ jsx225("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children: activeStep?.content }),
|
|
27238
|
+
showFooter && /* @__PURE__ */ jsx225("div", { ...trussProps127({
|
|
27170
27239
|
flexShrink: "fs0",
|
|
27171
27240
|
width: "w100",
|
|
27172
27241
|
height: ["h_var", {
|
|
27173
27242
|
"--height": `${mobileFooterHeightPx}px`
|
|
27174
27243
|
}]
|
|
27175
|
-
}), children: /* @__PURE__ */
|
|
27244
|
+
}), children: /* @__PURE__ */ jsx225("div", { ...trussProps127({
|
|
27176
27245
|
...{
|
|
27177
27246
|
position: "fixed",
|
|
27178
27247
|
bottom: "bottom0",
|
|
@@ -27201,7 +27270,7 @@ function WorkflowLayout(props) {
|
|
|
27201
27270
|
...pageContentPaddingX
|
|
27202
27271
|
}), ...tid.footer, children: buttons }) })
|
|
27203
27272
|
] }),
|
|
27204
|
-
navigationBlocker && /* @__PURE__ */
|
|
27273
|
+
navigationBlocker && /* @__PURE__ */ jsx225(UnsavedChangesNavigationModal, { ...navigationBlocker })
|
|
27205
27274
|
] });
|
|
27206
27275
|
}
|
|
27207
27276
|
var mobileFooterHeightPx = 80;
|