@homebound/beam 3.79.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/Css.json +8 -1
- package/dist/index.cjs +404 -263
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +42 -3
- package/dist/index.d.ts +42 -3
- package/dist/index.js +330 -189
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -403,6 +403,8 @@ module.exports = __toCommonJS(index_exports);
|
|
|
403
403
|
// src/Css.ts
|
|
404
404
|
var import_runtime = require("@homebound/truss/runtime");
|
|
405
405
|
var Tokens = /* @__PURE__ */ ((Tokens4) => {
|
|
406
|
+
Tokens4["AiFieldBg"] = "--b-ai-field-bg";
|
|
407
|
+
Tokens4["AiFieldFg"] = "--b-ai-field-fg";
|
|
406
408
|
Tokens4["ButtonCautionDisabledBg"] = "--b-button-caution-disabled-bg";
|
|
407
409
|
Tokens4["ButtonCautionDisabledFg"] = "--b-button-caution-disabled-fg";
|
|
408
410
|
Tokens4["ButtonDangerDisabledBg"] = "--b-button-danger-disabled-bg";
|
|
@@ -456,8 +458,8 @@ var Tokens = /* @__PURE__ */ ((Tokens4) => {
|
|
|
456
458
|
Tokens4["NeutralSurfacePressed"] = "--b-neutral-surface-pressed";
|
|
457
459
|
Tokens4["OnPrimary"] = "--b-on-primary";
|
|
458
460
|
Tokens4["OnSurface"] = "--b-on-surface";
|
|
459
|
-
Tokens4["OnSurfaceMuted"] = "--b-on-surface-muted";
|
|
460
461
|
Tokens4["OnSurfaceDisabled"] = "--b-on-surface-disabled";
|
|
462
|
+
Tokens4["OnSurfaceMuted"] = "--b-on-surface-muted";
|
|
461
463
|
Tokens4["OnSurfaceRaisedHover"] = "--b-on-surface-raised-hover";
|
|
462
464
|
Tokens4["OnSurfaceRaisedPressed"] = "--b-on-surface-raised-pressed";
|
|
463
465
|
Tokens4["Primary"] = "--b-primary";
|
|
@@ -467,11 +469,11 @@ var Tokens = /* @__PURE__ */ ((Tokens4) => {
|
|
|
467
469
|
Tokens4["SelectionFill"] = "--b-selection-fill";
|
|
468
470
|
Tokens4["SelectionIndicator"] = "--b-selection-indicator";
|
|
469
471
|
Tokens4["Surface"] = "--b-surface";
|
|
472
|
+
Tokens4["SurfaceDisabled"] = "--b-surface-disabled";
|
|
470
473
|
Tokens4["SurfaceHover"] = "--b-surface-hover";
|
|
471
474
|
Tokens4["SurfaceRaised"] = "--b-surface-raised";
|
|
472
475
|
Tokens4["SurfaceRaisedHover"] = "--b-surface-raised-hover";
|
|
473
476
|
Tokens4["SurfaceRaisedPressed"] = "--b-surface-raised-pressed";
|
|
474
|
-
Tokens4["SurfaceDisabled"] = "--b-surface-disabled";
|
|
475
477
|
Tokens4["SurfaceSeparator"] = "--b-surface-separator";
|
|
476
478
|
Tokens4["SurfaceSubtle"] = "--b-surface-subtle";
|
|
477
479
|
Tokens4["TextDisabled"] = "--b-text-disabled";
|
|
@@ -523,6 +525,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
523
525
|
get bcTransparent() {
|
|
524
526
|
return this.add("borderColor", "rgba(0,0,0,0)");
|
|
525
527
|
}
|
|
528
|
+
/** Sets `borderColor: "rgba(0, 0, 0, 1)"`. */
|
|
529
|
+
get bcBlack() {
|
|
530
|
+
return this.add("borderColor", "rgba(0, 0, 0, 1)");
|
|
531
|
+
}
|
|
526
532
|
/** Sets `borderColor: "rgba(255, 253, 253, 1)"`. */
|
|
527
533
|
get bcGray50() {
|
|
528
534
|
return this.add("borderColor", "rgba(255, 253, 253, 1)");
|
|
@@ -2183,6 +2189,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
2183
2189
|
get transparent() {
|
|
2184
2190
|
return this.add("color", "rgba(0,0,0,0)");
|
|
2185
2191
|
}
|
|
2192
|
+
/** Sets `color: "rgba(0, 0, 0, 1)"`. */
|
|
2193
|
+
get black() {
|
|
2194
|
+
return this.add("color", "rgba(0, 0, 0, 1)");
|
|
2195
|
+
}
|
|
2186
2196
|
/** Sets `color: "rgba(255, 253, 253, 1)"`. */
|
|
2187
2197
|
get gray50() {
|
|
2188
2198
|
return this.add("color", "rgba(255, 253, 253, 1)");
|
|
@@ -2475,6 +2485,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
2475
2485
|
get bgTransparent() {
|
|
2476
2486
|
return this.add("backgroundColor", "rgba(0,0,0,0)");
|
|
2477
2487
|
}
|
|
2488
|
+
/** Sets `backgroundColor: "rgba(0, 0, 0, 1)"`. */
|
|
2489
|
+
get bgBlack() {
|
|
2490
|
+
return this.add("backgroundColor", "rgba(0, 0, 0, 1)");
|
|
2491
|
+
}
|
|
2478
2492
|
/** Sets `backgroundColor: "rgba(255, 253, 253, 1)"`. */
|
|
2479
2493
|
get bgGray50() {
|
|
2480
2494
|
return this.add("backgroundColor", "rgba(255, 253, 253, 1)");
|
|
@@ -2767,6 +2781,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
2767
2781
|
get fTransparent() {
|
|
2768
2782
|
return this.add("fill", "rgba(0,0,0,0)");
|
|
2769
2783
|
}
|
|
2784
|
+
/** Sets `fill: "rgba(0, 0, 0, 1)"`. */
|
|
2785
|
+
get fBlack() {
|
|
2786
|
+
return this.add("fill", "rgba(0, 0, 0, 1)");
|
|
2787
|
+
}
|
|
2770
2788
|
/** Sets `fill: "rgba(255, 253, 253, 1)"`. */
|
|
2771
2789
|
get fGray50() {
|
|
2772
2790
|
return this.add("fill", "rgba(255, 253, 253, 1)");
|
|
@@ -4221,6 +4239,28 @@ var CssBuilder = class _CssBuilder {
|
|
|
4221
4239
|
z(value) {
|
|
4222
4240
|
return this.add("zIndex", value);
|
|
4223
4241
|
}
|
|
4242
|
+
// ai
|
|
4243
|
+
/** Sets `backgroundImage: "radial-gradient(40% 1000% at 35.83% 62.18%, rgba(239, 246, 255, 1) 0%, rgba(237, 233, 254, 1) 100%)"`. */
|
|
4244
|
+
get aiBackground() {
|
|
4245
|
+
return this.add(
|
|
4246
|
+
"backgroundImage",
|
|
4247
|
+
"radial-gradient(40% 1000% at 35.83% 62.18%, rgba(239, 246, 255, 1) 0%, rgba(237, 233, 254, 1) 100%)"
|
|
4248
|
+
);
|
|
4249
|
+
}
|
|
4250
|
+
/** Sets `backgroundImage: "linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"`. */
|
|
4251
|
+
get aiBoldBg() {
|
|
4252
|
+
return this.add(
|
|
4253
|
+
"backgroundImage",
|
|
4254
|
+
"linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"
|
|
4255
|
+
);
|
|
4256
|
+
}
|
|
4257
|
+
/** Sets `color: "rgba(109, 40, 217, 1)"; backgroundImage: "linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"; backgroundClip: "text"; WebkitBackgroundClip: "text"; WebkitTextFillColor: "transparent"`. */
|
|
4258
|
+
get aiBoldText() {
|
|
4259
|
+
return this.add("color", "rgba(109, 40, 217, 1)").add(
|
|
4260
|
+
"backgroundImage",
|
|
4261
|
+
"linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"
|
|
4262
|
+
).add("backgroundClip", "text").add("WebkitBackgroundClip", "text").add("WebkitTextFillColor", "transparent");
|
|
4263
|
+
}
|
|
4224
4264
|
// fontFamily
|
|
4225
4265
|
/** Sets `fontFamily: "'Inter', sans-serif"`. */
|
|
4226
4266
|
get sansSerif() {
|
|
@@ -4501,6 +4541,7 @@ function omitUndefinedValues(value) {
|
|
|
4501
4541
|
var Palette = /* @__PURE__ */ ((Palette2) => {
|
|
4502
4542
|
Palette2["White"] = "rgba(255, 255, 255, 1)";
|
|
4503
4543
|
Palette2["Transparent"] = "rgba(0,0,0,0)";
|
|
4544
|
+
Palette2["Black"] = "rgba(0, 0, 0, 1)";
|
|
4504
4545
|
Palette2["Gray50"] = "rgba(255, 253, 253, 1)";
|
|
4505
4546
|
Palette2["Gray100"] = "rgba(247, 245, 245, 1)";
|
|
4506
4547
|
Palette2["Gray200"] = "rgba(236, 235, 235, 1)";
|
|
@@ -10806,6 +10847,37 @@ function getButtonStyles(variant, size) {
|
|
|
10806
10847
|
};
|
|
10807
10848
|
}
|
|
10808
10849
|
var variantStyles2 = {
|
|
10850
|
+
// Design applies their "AI Bold" ramp to the existing primary button. They haven't specified
|
|
10851
|
+
// hover/pressed/disabled, so those ramps are extrapolated from it rather than design-sourced.
|
|
10852
|
+
ai: {
|
|
10853
|
+
baseStyles: {
|
|
10854
|
+
backgroundImage: "aiBoldBg",
|
|
10855
|
+
color: ["color_var", {
|
|
10856
|
+
"--color": "var(--b-on-primary)"
|
|
10857
|
+
}]
|
|
10858
|
+
},
|
|
10859
|
+
hoverStyles: {
|
|
10860
|
+
backgroundImage: ["backgroundImage_var", {
|
|
10861
|
+
"--backgroundImage": (0, import_runtime31.maybeCssVar)(`linear-gradient(270deg, ${"rgba(30, 64, 175, 1)" /* Blue800 */}, ${"rgba(91, 33, 182, 1)" /* Purple800 */})`)
|
|
10862
|
+
}]
|
|
10863
|
+
},
|
|
10864
|
+
pressedStyles: {
|
|
10865
|
+
backgroundImage: ["backgroundImage_var", {
|
|
10866
|
+
"--backgroundImage": (0, import_runtime31.maybeCssVar)(`linear-gradient(270deg, ${"rgba(30, 58, 138, 1)" /* Blue900 */}, ${"rgba(76, 29, 149, 1)" /* Purple900 */})`)
|
|
10867
|
+
}]
|
|
10868
|
+
},
|
|
10869
|
+
disabledStyles: {
|
|
10870
|
+
backgroundImage: ["backgroundImage_var", {
|
|
10871
|
+
"--backgroundImage": (0, import_runtime31.maybeCssVar)(`linear-gradient(270deg, ${"rgba(191, 219, 254, 1)" /* Blue200 */}, ${"rgba(221, 214, 254, 1)" /* Purple200 */})`)
|
|
10872
|
+
}],
|
|
10873
|
+
color: ["color_var", {
|
|
10874
|
+
"--color": "var(--b-button-primary-disabled-fg)"
|
|
10875
|
+
}]
|
|
10876
|
+
},
|
|
10877
|
+
focusStyles: {
|
|
10878
|
+
boxShadow: "bshFocus"
|
|
10879
|
+
}
|
|
10880
|
+
},
|
|
10809
10881
|
primary: {
|
|
10810
10882
|
baseStyles: {
|
|
10811
10883
|
backgroundColor: ["bgColor_var", {
|
|
@@ -25248,40 +25320,82 @@ function AppNavItems(props) {
|
|
|
25248
25320
|
|
|
25249
25321
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
25250
25322
|
var import_framer_motion6 = require("framer-motion");
|
|
25251
|
-
var
|
|
25323
|
+
var import_react142 = require("react");
|
|
25252
25324
|
var import_react_aria62 = require("react-aria");
|
|
25253
25325
|
var import_react_dom7 = require("react-dom");
|
|
25254
25326
|
var import_react_router_dom7 = require("react-router-dom");
|
|
25255
|
-
|
|
25327
|
+
|
|
25328
|
+
// src/layouts/NavbarLayout/MobileSubNavContext.tsx
|
|
25329
|
+
var import_react141 = require("react");
|
|
25256
25330
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
25331
|
+
var MobileSubNavContext = (0, import_react141.createContext)(void 0);
|
|
25332
|
+
function MobileSubNavProvider(props) {
|
|
25333
|
+
const [mobileSubNav, setMobileSubNav] = (0, import_react141.useState)(null);
|
|
25334
|
+
const value = (0, import_react141.useMemo)(() => ({ mobileSubNav, setMobileSubNav }), [mobileSubNav]);
|
|
25335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(MobileSubNavContext.Provider, { value, children: props.children });
|
|
25336
|
+
}
|
|
25337
|
+
function useMobileSubNav() {
|
|
25338
|
+
return (0, import_react141.useContext)(MobileSubNavContext)?.mobileSubNav ?? null;
|
|
25339
|
+
}
|
|
25340
|
+
function useRegisterMobileSubNav(content) {
|
|
25341
|
+
const ctx = (0, import_react141.useContext)(MobileSubNavContext);
|
|
25342
|
+
const setMobileSubNav = ctx?.setMobileSubNav;
|
|
25343
|
+
const enabled = !useBreakpoint().mdAndUp;
|
|
25344
|
+
const { top, items, footer } = content;
|
|
25345
|
+
(0, import_react141.useLayoutEffect)(() => {
|
|
25346
|
+
if (!setMobileSubNav || !enabled) return;
|
|
25347
|
+
setMobileSubNav({ top, items, footer });
|
|
25348
|
+
}, [setMobileSubNav, enabled, top, items, footer]);
|
|
25349
|
+
(0, import_react141.useLayoutEffect)(() => {
|
|
25350
|
+
if (!setMobileSubNav || !enabled) return;
|
|
25351
|
+
return () => setMobileSubNav(null);
|
|
25352
|
+
}, [setMobileSubNav, enabled]);
|
|
25353
|
+
return ctx !== void 0 && enabled;
|
|
25354
|
+
}
|
|
25355
|
+
|
|
25356
|
+
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
25357
|
+
var import_runtime123 = require("@homebound/truss/runtime");
|
|
25358
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
25257
25359
|
function NavbarMobileMenu(props) {
|
|
25258
25360
|
const {
|
|
25259
25361
|
items
|
|
25260
25362
|
} = props;
|
|
25261
25363
|
const tid = useTestIds(props, "navbar");
|
|
25262
|
-
const [isOpen, setIsOpen] = (0,
|
|
25364
|
+
const [isOpen, setIsOpen] = (0, import_react142.useState)(false);
|
|
25365
|
+
const [level, setLevel] = (0, import_react142.useState)("sub");
|
|
25263
25366
|
const {
|
|
25264
25367
|
pathname,
|
|
25265
25368
|
search
|
|
25266
25369
|
} = (0, import_react_router_dom7.useLocation)();
|
|
25370
|
+
const mobileSubNav = useMobileSubNav();
|
|
25267
25371
|
(0, import_react_aria62.usePreventScroll)({
|
|
25268
25372
|
isDisabled: !isOpen
|
|
25269
25373
|
});
|
|
25270
|
-
(0, import_react141.useEffect)(() => {
|
|
25271
|
-
setIsOpen(false);
|
|
25272
|
-
}, [pathname, search]);
|
|
25273
25374
|
const close = () => setIsOpen(false);
|
|
25274
|
-
|
|
25275
|
-
|
|
25375
|
+
(0, import_react142.useEffect)(() => {
|
|
25376
|
+
close();
|
|
25377
|
+
}, [pathname, search]);
|
|
25378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
25379
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => {
|
|
25380
|
+
if (isOpen) {
|
|
25381
|
+
close();
|
|
25382
|
+
return;
|
|
25383
|
+
}
|
|
25384
|
+
setLevel("sub");
|
|
25385
|
+
setIsOpen(true);
|
|
25386
|
+
}, ...tid.mobileMenu }),
|
|
25276
25387
|
(0, import_react_dom7.createPortal)(
|
|
25277
25388
|
/* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
|
|
25278
|
-
/* @__PURE__ */ (0,
|
|
25389
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_framer_motion6.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(NavbarMobileDrawer, { items, mobileSubNav, level, onLevelChange: setLevel, onClose: close, tid }) }),
|
|
25279
25390
|
document.body
|
|
25280
25391
|
)
|
|
25281
25392
|
] });
|
|
25282
25393
|
}
|
|
25283
25394
|
function NavbarMobileDrawer({
|
|
25284
25395
|
items,
|
|
25396
|
+
mobileSubNav,
|
|
25397
|
+
level,
|
|
25398
|
+
onLevelChange,
|
|
25285
25399
|
onClose,
|
|
25286
25400
|
tid
|
|
25287
25401
|
}) {
|
|
@@ -25289,8 +25403,9 @@ function NavbarMobileDrawer({
|
|
|
25289
25403
|
const overlayTopStyle = {
|
|
25290
25404
|
top: bannerHeightPx
|
|
25291
25405
|
};
|
|
25292
|
-
|
|
25293
|
-
|
|
25406
|
+
const showSubLevel = mobileSubNav != null && level === "sub";
|
|
25407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
25408
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_framer_motion6.motion.div, { ...(0, import_runtime123.mergeProps)(void 0, overlayTopStyle, {
|
|
25294
25409
|
position: "fixed",
|
|
25295
25410
|
right: "right0",
|
|
25296
25411
|
bottom: "bottom0",
|
|
@@ -25311,7 +25426,7 @@ function NavbarMobileDrawer({
|
|
|
25311
25426
|
ease: "linear",
|
|
25312
25427
|
duration: 0.2
|
|
25313
25428
|
}, onClick: onClose, ...tid.mobileMenuScrim }, "navbarMobileMenuScrim"),
|
|
25314
|
-
/* @__PURE__ */ (0,
|
|
25429
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_react_aria62.FocusScope, { autoFocus: true, contain: true, restoreFocus: true, children: /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_framer_motion6.motion.aside, { role: "dialog", "aria-modal": "true", "aria-label": "Navigation", ...(0, import_runtime123.mergeProps)(void 0, overlayTopStyle, {
|
|
25315
25430
|
position: "fixed",
|
|
25316
25431
|
bottom: "bottom0",
|
|
25317
25432
|
left: "left0",
|
|
@@ -25336,11 +25451,11 @@ function NavbarMobileDrawer({
|
|
|
25336
25451
|
ease: "linear",
|
|
25337
25452
|
duration: 0.2
|
|
25338
25453
|
}, onClick: (e) => e.stopPropagation(), ...tid.mobileMenuDrawer, children: [
|
|
25339
|
-
/* @__PURE__ */ (0,
|
|
25454
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)("div", { ...(0, import_runtime123.trussProps)({
|
|
25340
25455
|
...{
|
|
25341
25456
|
display: "df",
|
|
25342
25457
|
alignItems: "aic",
|
|
25343
|
-
justifyContent: "
|
|
25458
|
+
justifyContent: "jcsb",
|
|
25344
25459
|
paddingTop: "pt_12px",
|
|
25345
25460
|
paddingBottom: "pb_12px",
|
|
25346
25461
|
flexShrink: "fs0",
|
|
@@ -25351,38 +25466,63 @@ function NavbarMobileDrawer({
|
|
|
25351
25466
|
}]
|
|
25352
25467
|
},
|
|
25353
25468
|
...pageContentPaddingX
|
|
25354
|
-
}), children:
|
|
25355
|
-
|
|
25356
|
-
"
|
|
25469
|
+
}), children: [
|
|
25470
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("div", { className: "mw0", children: showSubLevel && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Button, { label: "Main Menu", icon: "chevronLeft", variant: "quaternary", size: "sm", onClick: () => onLevelChange("global"), ...tid.mobileMenuMainMenu }) }),
|
|
25471
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(IconButton, { icon: "x", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: "Close navigation", onClick: onClose, ...tid.mobileMenuClose })
|
|
25472
|
+
] }),
|
|
25473
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("div", { className: "fg1 mh0 oh relative", children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_framer_motion6.AnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
25474
|
+
import_framer_motion6.motion.nav,
|
|
25357
25475
|
{
|
|
25358
25476
|
...(0, import_runtime123.trussProps)({
|
|
25359
25477
|
...{
|
|
25360
|
-
|
|
25478
|
+
position: "absolute",
|
|
25479
|
+
top: "top0",
|
|
25480
|
+
bottom: "bottom0",
|
|
25481
|
+
left: "left0",
|
|
25482
|
+
right: "right0",
|
|
25361
25483
|
overflowY: "oya",
|
|
25362
|
-
paddingBottom: "pb3",
|
|
25363
|
-
paddingTop: "pt2",
|
|
25364
25484
|
display: "df",
|
|
25365
25485
|
flexDirection: "fdc",
|
|
25366
|
-
gap: "gap_4px"
|
|
25486
|
+
gap: "gap_4px",
|
|
25487
|
+
paddingTop: "pt2",
|
|
25488
|
+
paddingBottom: "pb3"
|
|
25367
25489
|
},
|
|
25368
25490
|
...pageContentPaddingX
|
|
25369
25491
|
}),
|
|
25492
|
+
initial: {
|
|
25493
|
+
x: "-100%"
|
|
25494
|
+
},
|
|
25495
|
+
animate: {
|
|
25496
|
+
x: 0
|
|
25497
|
+
},
|
|
25498
|
+
exit: {
|
|
25499
|
+
x: "100%"
|
|
25500
|
+
},
|
|
25501
|
+
transition: {
|
|
25502
|
+
ease: "linear",
|
|
25503
|
+
duration: 0.2
|
|
25504
|
+
},
|
|
25370
25505
|
onClickCapture: (e) => {
|
|
25371
25506
|
if (e.target.closest("a")) {
|
|
25372
25507
|
onClose();
|
|
25373
25508
|
}
|
|
25374
25509
|
},
|
|
25375
25510
|
...tid.mobileMenuPanel,
|
|
25376
|
-
children:
|
|
25377
|
-
|
|
25378
|
-
|
|
25511
|
+
children: [
|
|
25512
|
+
showSubLevel && mobileSubNav?.top,
|
|
25513
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(AppNavItems, { items: showSubLevel && mobileSubNav ? mobileSubNav.items : items, panelCollapsed: false, ...tid }),
|
|
25514
|
+
showSubLevel && mobileSubNav?.footer
|
|
25515
|
+
]
|
|
25516
|
+
},
|
|
25517
|
+
showSubLevel ? "sub" : "global"
|
|
25518
|
+
) }) })
|
|
25379
25519
|
] }, "navbarMobileMenuDrawer") })
|
|
25380
25520
|
] });
|
|
25381
25521
|
}
|
|
25382
25522
|
|
|
25383
25523
|
// src/components/Navbar/Navbar.tsx
|
|
25384
25524
|
var import_runtime124 = require("@homebound/truss/runtime");
|
|
25385
|
-
var
|
|
25525
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
25386
25526
|
function Navbar(props) {
|
|
25387
25527
|
const {
|
|
25388
25528
|
brand,
|
|
@@ -25401,7 +25541,7 @@ function Navbar(props) {
|
|
|
25401
25541
|
overflows
|
|
25402
25542
|
} = useContentOverflow(!sm);
|
|
25403
25543
|
const showMobile = sm || overflows;
|
|
25404
|
-
return /* @__PURE__ */ (0,
|
|
25544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ContrastScope, { children: /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("nav", { ...(0, import_runtime124.trussProps)({
|
|
25405
25545
|
...{
|
|
25406
25546
|
backgroundColor: ["bgColor_var", {
|
|
25407
25547
|
"--backgroundColor": "var(--b-surface-raised)"
|
|
@@ -25417,10 +25557,10 @@ function Navbar(props) {
|
|
|
25417
25557
|
},
|
|
25418
25558
|
...headerContentPaddingX(showMobile)
|
|
25419
25559
|
}), ...tid, children: [
|
|
25420
|
-
/* @__PURE__ */ (0,
|
|
25421
|
-
/* @__PURE__ */ (0,
|
|
25422
|
-
showMobile && /* @__PURE__ */ (0,
|
|
25423
|
-
/* @__PURE__ */ (0,
|
|
25560
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("div", { className: "df aic gap3 fg1 mw0", children: [
|
|
25561
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("div", { className: "df aic fs0 gap2", children: [
|
|
25562
|
+
showMobile && /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(NavbarMobileMenu, { items, ...tid }),
|
|
25563
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", { ...(0, import_runtime124.trussProps)({
|
|
25424
25564
|
flexShrink: "fs0",
|
|
25425
25565
|
...hideBrandOnMobile && showMobile ? {
|
|
25426
25566
|
display: "dn"
|
|
@@ -25429,7 +25569,7 @@ function Navbar(props) {
|
|
|
25429
25569
|
] }),
|
|
25430
25570
|
!sm && // Stays mounted while overflowing (hidden) so the items remain measurable and the bar
|
|
25431
25571
|
// can expand again as space frees up.
|
|
25432
|
-
/* @__PURE__ */ (0,
|
|
25572
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", { ref: containerRef, ...(0, import_runtime124.trussProps)({
|
|
25433
25573
|
display: "df",
|
|
25434
25574
|
alignItems: "aic",
|
|
25435
25575
|
flexGrow: "fg1",
|
|
@@ -25438,11 +25578,11 @@ function Navbar(props) {
|
|
|
25438
25578
|
...overflows ? {
|
|
25439
25579
|
visibility: "visibility_hidden"
|
|
25440
25580
|
} : {}
|
|
25441
|
-
}), ...tid.items, children: /* @__PURE__ */ (0,
|
|
25581
|
+
}), ...tid.items, children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", { ref: contentRef, className: "df aic gap2 width_max_content", children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(AppNavItems, { variant: "global", items, ...tid }) }) })
|
|
25442
25582
|
] }),
|
|
25443
|
-
/* @__PURE__ */ (0,
|
|
25444
|
-
rightSlot && /* @__PURE__ */ (0,
|
|
25445
|
-
user && /* @__PURE__ */ (0,
|
|
25583
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("div", { className: "df aic gap1", children: [
|
|
25584
|
+
rightSlot && /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", { className: "df aic gap1", ...tid.rightSlot, children: rightSlot }),
|
|
25585
|
+
user && /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(NavbarUserMenu, { user, ...tid.userMenu })
|
|
25446
25586
|
] })
|
|
25447
25587
|
] }) });
|
|
25448
25588
|
}
|
|
@@ -25450,7 +25590,7 @@ function NavbarUserMenu({
|
|
|
25450
25590
|
user,
|
|
25451
25591
|
...tid
|
|
25452
25592
|
}) {
|
|
25453
|
-
return /* @__PURE__ */ (0,
|
|
25593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", { className: "df aic fs0 ml1", children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ButtonMenu, { items: user.menuItems, persistentItems: user.persistentItems, trigger: {
|
|
25454
25594
|
src: user.picture,
|
|
25455
25595
|
name: user.name,
|
|
25456
25596
|
size: "sm",
|
|
@@ -25460,7 +25600,7 @@ function NavbarUserMenu({
|
|
|
25460
25600
|
|
|
25461
25601
|
// src/components/Pagination.tsx
|
|
25462
25602
|
var import_runtime125 = require("@homebound/truss/runtime");
|
|
25463
|
-
var
|
|
25603
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
25464
25604
|
var defaultPage = {
|
|
25465
25605
|
offset: 0,
|
|
25466
25606
|
limit: 100
|
|
@@ -25492,7 +25632,7 @@ function Pagination(props) {
|
|
|
25492
25632
|
}
|
|
25493
25633
|
}
|
|
25494
25634
|
const tid = useTestIds(props, "pagination");
|
|
25495
|
-
return /* @__PURE__ */ (0,
|
|
25635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)("div", { ...(0, import_runtime125.trussProps)({
|
|
25496
25636
|
display: "df",
|
|
25497
25637
|
borderColor: ["bc_var", {
|
|
25498
25638
|
"--borderColor": "var(--b-surface-separator)"
|
|
@@ -25509,24 +25649,24 @@ function Pagination(props) {
|
|
|
25509
25649
|
paddingRight: "pr2",
|
|
25510
25650
|
paddingTop: "pt2"
|
|
25511
25651
|
}), ...tid, children: [
|
|
25512
|
-
/* @__PURE__ */ (0,
|
|
25513
|
-
/* @__PURE__ */ (0,
|
|
25652
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
25653
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "w_78px", children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
25514
25654
|
pageNumber: 1,
|
|
25515
25655
|
pageSize: val
|
|
25516
25656
|
}), autoSort: false, ...tid.pageSize }) }),
|
|
25517
|
-
/* @__PURE__ */ (0,
|
|
25518
|
-
/* @__PURE__ */ (0,
|
|
25657
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsxs)("div", { className: "mla mta mba df", children: [
|
|
25658
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsxs)("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
|
|
25519
25659
|
first,
|
|
25520
25660
|
" ",
|
|
25521
25661
|
showLast ? `- ${last}` : "",
|
|
25522
25662
|
" of ",
|
|
25523
25663
|
totalCount
|
|
25524
25664
|
] }),
|
|
25525
|
-
/* @__PURE__ */ (0,
|
|
25665
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
25526
25666
|
pageNumber: pageNumber - 1,
|
|
25527
25667
|
pageSize
|
|
25528
25668
|
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
25529
|
-
/* @__PURE__ */ (0,
|
|
25669
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(IconButton, { icon: "chevronRight", color: hasNextPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
25530
25670
|
pageNumber: pageNumber + 1,
|
|
25531
25671
|
pageSize
|
|
25532
25672
|
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
@@ -25549,9 +25689,9 @@ function toPageNumberSize(page) {
|
|
|
25549
25689
|
|
|
25550
25690
|
// src/components/ScrollShadows.tsx
|
|
25551
25691
|
var import_utils166 = require("@react-aria/utils");
|
|
25552
|
-
var
|
|
25692
|
+
var import_react143 = require("react");
|
|
25553
25693
|
var import_runtime126 = require("@homebound/truss/runtime");
|
|
25554
|
-
var
|
|
25694
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
25555
25695
|
function ScrollShadows(props) {
|
|
25556
25696
|
const {
|
|
25557
25697
|
children,
|
|
@@ -25567,10 +25707,10 @@ function ScrollShadows(props) {
|
|
|
25567
25707
|
if (!bgColor.includes("rgba")) {
|
|
25568
25708
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
25569
25709
|
}
|
|
25570
|
-
const [showStartShadow, setShowStartShadow] = (0,
|
|
25571
|
-
const [showEndShadow, setShowEndShadow] = (0,
|
|
25572
|
-
const scrollRef = (0,
|
|
25573
|
-
const [startShadowStyles, endShadowStyles] = (0,
|
|
25710
|
+
const [showStartShadow, setShowStartShadow] = (0, import_react143.useState)(false);
|
|
25711
|
+
const [showEndShadow, setShowEndShadow] = (0, import_react143.useState)(false);
|
|
25712
|
+
const scrollRef = (0, import_react143.useRef)(null);
|
|
25713
|
+
const [startShadowStyles, endShadowStyles] = (0, import_react143.useMemo)(() => {
|
|
25574
25714
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
25575
25715
|
const commonStyles = {
|
|
25576
25716
|
position: "absolute",
|
|
@@ -25621,7 +25761,7 @@ function ScrollShadows(props) {
|
|
|
25621
25761
|
}
|
|
25622
25762
|
}];
|
|
25623
25763
|
}, [horizontal, bgColor]);
|
|
25624
|
-
const updateScrollProps = (0,
|
|
25764
|
+
const updateScrollProps = (0, import_react143.useCallback)((el) => {
|
|
25625
25765
|
const {
|
|
25626
25766
|
scrollTop,
|
|
25627
25767
|
scrollHeight,
|
|
@@ -25636,12 +25776,12 @@ function ScrollShadows(props) {
|
|
|
25636
25776
|
setShowStartShadow(start > 0);
|
|
25637
25777
|
setShowEndShadow(start + boxSize < end);
|
|
25638
25778
|
}, [horizontal]);
|
|
25639
|
-
const onResize = (0,
|
|
25779
|
+
const onResize = (0, import_react143.useCallback)(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
25640
25780
|
(0, import_utils166.useResizeObserver)({
|
|
25641
25781
|
ref: scrollRef,
|
|
25642
25782
|
onResize
|
|
25643
25783
|
});
|
|
25644
|
-
return /* @__PURE__ */ (0,
|
|
25784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)("div", { ...(0, import_runtime126.trussProps)({
|
|
25645
25785
|
display: "df",
|
|
25646
25786
|
flexDirection: ["fd_var", {
|
|
25647
25787
|
"--flexDirection": (0, import_runtime126.maybeCssVar)(!horizontal ? "column" : "row")
|
|
@@ -25657,7 +25797,7 @@ function ScrollShadows(props) {
|
|
|
25657
25797
|
width: width2
|
|
25658
25798
|
}
|
|
25659
25799
|
}), ...tid, children: [
|
|
25660
|
-
/* @__PURE__ */ (0,
|
|
25800
|
+
/* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ...(0, import_runtime126.trussProps)({
|
|
25661
25801
|
...startShadowStyles,
|
|
25662
25802
|
...{
|
|
25663
25803
|
opacity: ["o_var", {
|
|
@@ -25665,7 +25805,7 @@ function ScrollShadows(props) {
|
|
|
25665
25805
|
}]
|
|
25666
25806
|
}
|
|
25667
25807
|
}), "data-chromatic": "ignore" }),
|
|
25668
|
-
/* @__PURE__ */ (0,
|
|
25808
|
+
/* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ...(0, import_runtime126.trussProps)({
|
|
25669
25809
|
...endShadowStyles,
|
|
25670
25810
|
...{
|
|
25671
25811
|
opacity: ["o_var", {
|
|
@@ -25673,7 +25813,7 @@ function ScrollShadows(props) {
|
|
|
25673
25813
|
}]
|
|
25674
25814
|
}
|
|
25675
25815
|
}), "data-chromatic": "ignore" }),
|
|
25676
|
-
/* @__PURE__ */ (0,
|
|
25816
|
+
/* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ...(0, import_runtime126.trussProps)({
|
|
25677
25817
|
...xss,
|
|
25678
25818
|
...{
|
|
25679
25819
|
overflow: "oa",
|
|
@@ -25685,8 +25825,8 @@ function ScrollShadows(props) {
|
|
|
25685
25825
|
}
|
|
25686
25826
|
|
|
25687
25827
|
// src/layouts/SideNavLayout/SideNavLayoutContext.tsx
|
|
25688
|
-
var
|
|
25689
|
-
var
|
|
25828
|
+
var import_react144 = require("react");
|
|
25829
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
25690
25830
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
25691
25831
|
function loadStoredNavState() {
|
|
25692
25832
|
try {
|
|
@@ -25708,20 +25848,20 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
25708
25848
|
}
|
|
25709
25849
|
return loadStoredNavState() ?? defaultNavState ?? "expanded";
|
|
25710
25850
|
}
|
|
25711
|
-
var SideNavLayoutContext = (0,
|
|
25851
|
+
var SideNavLayoutContext = (0, import_react144.createContext)(void 0);
|
|
25712
25852
|
function SideNavLayoutProvider(props) {
|
|
25713
|
-
const [navState, setNavStateInternal] = (0,
|
|
25853
|
+
const [navState, setNavStateInternal] = (0, import_react144.useState)(
|
|
25714
25854
|
() => resolveInitialNavState(props.defaultNavState)
|
|
25715
25855
|
);
|
|
25716
25856
|
const bp = useBreakpoint();
|
|
25717
|
-
const prevMdAndUp = (0,
|
|
25718
|
-
(0,
|
|
25857
|
+
const prevMdAndUp = (0, import_react144.useRef)(bp.mdAndUp);
|
|
25858
|
+
(0, import_react144.useEffect)(() => {
|
|
25719
25859
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
25720
25860
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
25721
25861
|
}
|
|
25722
25862
|
prevMdAndUp.current = bp.mdAndUp;
|
|
25723
25863
|
}, [bp.mdAndUp]);
|
|
25724
|
-
const setNavState = (0,
|
|
25864
|
+
const setNavState = (0, import_react144.useCallback)((value2) => {
|
|
25725
25865
|
setNavStateInternal((prev) => {
|
|
25726
25866
|
const next = typeof value2 === "function" ? value2(prev) : value2;
|
|
25727
25867
|
if (next === "expanded" || next === "collapse") {
|
|
@@ -25733,20 +25873,20 @@ function SideNavLayoutProvider(props) {
|
|
|
25733
25873
|
return next;
|
|
25734
25874
|
});
|
|
25735
25875
|
}, []);
|
|
25736
|
-
const value = (0,
|
|
25737
|
-
return /* @__PURE__ */ (0,
|
|
25876
|
+
const value = (0, import_react144.useMemo)(() => ({ navState, setNavState }), [navState, setNavState]);
|
|
25877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutContext.Provider, { value, children: props.children });
|
|
25738
25878
|
}
|
|
25739
25879
|
function useSideNavLayoutContext() {
|
|
25740
|
-
return (0,
|
|
25880
|
+
return (0, import_react144.useContext)(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
25741
25881
|
} };
|
|
25742
25882
|
}
|
|
25743
25883
|
function useHasSideNavLayoutProvider() {
|
|
25744
|
-
return (0,
|
|
25884
|
+
return (0, import_react144.useContext)(SideNavLayoutContext) !== void 0;
|
|
25745
25885
|
}
|
|
25746
25886
|
|
|
25747
25887
|
// src/components/SideNav/SideNav.tsx
|
|
25748
25888
|
var import_runtime127 = require("@homebound/truss/runtime");
|
|
25749
|
-
var
|
|
25889
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
25750
25890
|
function SideNav(props) {
|
|
25751
25891
|
const {
|
|
25752
25892
|
top,
|
|
@@ -25759,8 +25899,8 @@ function SideNav(props) {
|
|
|
25759
25899
|
const tid = useTestIds(props, "sideNav");
|
|
25760
25900
|
const panelCollapsed = navState === "collapse";
|
|
25761
25901
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
25762
|
-
return /* @__PURE__ */ (0,
|
|
25763
|
-
top !== void 0 && /* @__PURE__ */ (0,
|
|
25902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
25903
|
+
top !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime127.trussProps)({
|
|
25764
25904
|
flexShrink: "fs0",
|
|
25765
25905
|
paddingLeft: "pl2",
|
|
25766
25906
|
paddingRight: "pr2",
|
|
@@ -25771,7 +25911,7 @@ function SideNav(props) {
|
|
|
25771
25911
|
paddingBottom: "pb4"
|
|
25772
25912
|
} : {}
|
|
25773
25913
|
}), ...tid.top, children: top }),
|
|
25774
|
-
/* @__PURE__ */ (0,
|
|
25914
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime127.trussProps)({
|
|
25775
25915
|
flexGrow: "fg1",
|
|
25776
25916
|
overflowY: "oya",
|
|
25777
25917
|
display: "df",
|
|
@@ -25783,8 +25923,8 @@ function SideNav(props) {
|
|
|
25783
25923
|
...top === void 0 ? {
|
|
25784
25924
|
paddingTop: "pt5"
|
|
25785
25925
|
} : {}
|
|
25786
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ (0,
|
|
25787
|
-
footer !== void 0 && /* @__PURE__ */ (0,
|
|
25926
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(AppNavItems, { items, panelCollapsed }) }),
|
|
25927
|
+
footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime127.trussProps)({
|
|
25788
25928
|
flexShrink: "fs0",
|
|
25789
25929
|
paddingLeft: "pl2",
|
|
25790
25930
|
paddingRight: "pr2",
|
|
@@ -25800,10 +25940,10 @@ function SideNav(props) {
|
|
|
25800
25940
|
}
|
|
25801
25941
|
|
|
25802
25942
|
// src/components/Snackbar/useSnackbar.tsx
|
|
25803
|
-
var
|
|
25943
|
+
var import_react145 = require("react");
|
|
25804
25944
|
function useSnackbar() {
|
|
25805
25945
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
25806
|
-
const onClose = (0,
|
|
25946
|
+
const onClose = (0, import_react145.useCallback)(
|
|
25807
25947
|
(noticeId) => {
|
|
25808
25948
|
setNotices((prev) => {
|
|
25809
25949
|
let returnValue = prev;
|
|
@@ -25820,7 +25960,7 @@ function useSnackbar() {
|
|
|
25820
25960
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25821
25961
|
[]
|
|
25822
25962
|
);
|
|
25823
|
-
const triggerNotice = (0,
|
|
25963
|
+
const triggerNotice = (0, import_react145.useCallback)(
|
|
25824
25964
|
(props) => {
|
|
25825
25965
|
const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
|
|
25826
25966
|
let maybeTimeout;
|
|
@@ -25849,8 +25989,8 @@ function useSnackbar() {
|
|
|
25849
25989
|
},
|
|
25850
25990
|
[onClose, setNotices]
|
|
25851
25991
|
);
|
|
25852
|
-
const closeNotice = (0,
|
|
25853
|
-
const useSnackbarOffset = ({ bottom }) => (0,
|
|
25992
|
+
const closeNotice = (0, import_react145.useCallback)((id) => onClose(id), [onClose]);
|
|
25993
|
+
const useSnackbarOffset = ({ bottom }) => (0, import_react145.useEffect)(() => {
|
|
25854
25994
|
setOffset({ bottom });
|
|
25855
25995
|
return () => setOffset({});
|
|
25856
25996
|
}, [bottom]);
|
|
@@ -25859,11 +25999,11 @@ function useSnackbar() {
|
|
|
25859
25999
|
var snackbarId = 1;
|
|
25860
26000
|
|
|
25861
26001
|
// src/components/Stepper.tsx
|
|
25862
|
-
var
|
|
26002
|
+
var import_react146 = require("react");
|
|
25863
26003
|
var import_react_aria63 = require("react-aria");
|
|
25864
26004
|
var import_runtime128 = require("@homebound/truss/runtime");
|
|
25865
|
-
var
|
|
25866
|
-
var
|
|
26005
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
26006
|
+
var import_react147 = require("react");
|
|
25867
26007
|
var __maybeInc25 = (inc) => {
|
|
25868
26008
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25869
26009
|
};
|
|
@@ -25881,8 +26021,8 @@ function Stepper(props) {
|
|
|
25881
26021
|
const maxStepWidth = 200;
|
|
25882
26022
|
const minStepWidth = 100;
|
|
25883
26023
|
const gap = 8;
|
|
25884
|
-
return /* @__PURE__ */ (0,
|
|
25885
|
-
/* @__PURE__ */ (0,
|
|
26024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
26025
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)("ol", { ...(0, import_runtime128.trussProps)({
|
|
25886
26026
|
padding: "p_0",
|
|
25887
26027
|
margin: "m_0",
|
|
25888
26028
|
listStyle: "lis_none",
|
|
@@ -25892,7 +26032,7 @@ function Stepper(props) {
|
|
|
25892
26032
|
}]
|
|
25893
26033
|
}), children: steps.map((step) => {
|
|
25894
26034
|
const isCurrent = currentStep === step.value;
|
|
25895
|
-
return /* @__PURE__ */ (0,
|
|
26035
|
+
return /* @__PURE__ */ (0, import_react147.createElement)("li", { ...(0, import_runtime128.trussProps)({
|
|
25896
26036
|
display: "df",
|
|
25897
26037
|
flexGrow: "fg1",
|
|
25898
26038
|
flexDirection: "fdc",
|
|
@@ -25902,9 +26042,9 @@ function Stepper(props) {
|
|
|
25902
26042
|
minWidth: ["mw_var", {
|
|
25903
26043
|
"--minWidth": `${minStepWidth}px`
|
|
25904
26044
|
}]
|
|
25905
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0,
|
|
26045
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
25906
26046
|
}) }),
|
|
25907
|
-
/* @__PURE__ */ (0,
|
|
26047
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ...(0, import_runtime128.trussProps)({
|
|
25908
26048
|
marginTop: "mt1",
|
|
25909
26049
|
backgroundColor: ["bgColor_var", {
|
|
25910
26050
|
"--backgroundColor": "var(--b-field-border-default)"
|
|
@@ -25917,7 +26057,7 @@ function Stepper(props) {
|
|
|
25917
26057
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
25918
26058
|
}],
|
|
25919
26059
|
width: "w100"
|
|
25920
|
-
}), children: /* @__PURE__ */ (0,
|
|
26060
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ...(0, import_runtime128.trussProps)({
|
|
25921
26061
|
backgroundColor: ["bgColor_var", {
|
|
25922
26062
|
"--backgroundColor": "var(--b-primary)"
|
|
25923
26063
|
}],
|
|
@@ -25941,7 +26081,7 @@ function StepButton(props) {
|
|
|
25941
26081
|
onPress: onClick,
|
|
25942
26082
|
isDisabled: disabled
|
|
25943
26083
|
};
|
|
25944
|
-
const ref = (0,
|
|
26084
|
+
const ref = (0, import_react146.useRef)(null);
|
|
25945
26085
|
const {
|
|
25946
26086
|
buttonProps,
|
|
25947
26087
|
isPressed
|
|
@@ -25960,7 +26100,7 @@ function StepButton(props) {
|
|
|
25960
26100
|
boxShadow: "bshFocus"
|
|
25961
26101
|
};
|
|
25962
26102
|
const tid = useTestIds(props, "stepButton");
|
|
25963
|
-
return /* @__PURE__ */ (0,
|
|
26103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...(0, import_runtime128.trussProps)({
|
|
25964
26104
|
...{
|
|
25965
26105
|
fontWeight: "fw6",
|
|
25966
26106
|
fontSize: "fz_14px",
|
|
@@ -26021,7 +26161,7 @@ function StepButton(props) {
|
|
|
26021
26161
|
} : {},
|
|
26022
26162
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
26023
26163
|
}), ...tid[defaultTestId(label)], children: [
|
|
26024
|
-
/* @__PURE__ */ (0,
|
|
26164
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
26025
26165
|
label
|
|
26026
26166
|
] });
|
|
26027
26167
|
}
|
|
@@ -26032,12 +26172,12 @@ function StepIcon({
|
|
|
26032
26172
|
isCurrent = false
|
|
26033
26173
|
}) {
|
|
26034
26174
|
if (state === "error") {
|
|
26035
|
-
return /* @__PURE__ */ (0,
|
|
26175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Icon, { icon: "errorCircle" });
|
|
26036
26176
|
}
|
|
26037
26177
|
if (state === "complete") {
|
|
26038
|
-
return /* @__PURE__ */ (0,
|
|
26178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Icon, { icon: "check" });
|
|
26039
26179
|
}
|
|
26040
|
-
return /* @__PURE__ */ (0,
|
|
26180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ...(0, import_runtime128.trussProps)({
|
|
26041
26181
|
width: "w_10px",
|
|
26042
26182
|
height: "h_10px",
|
|
26043
26183
|
borderStyle: "bss",
|
|
@@ -26051,10 +26191,10 @@ function StepIcon({
|
|
|
26051
26191
|
}
|
|
26052
26192
|
|
|
26053
26193
|
// src/components/StepperTabs/StepperTab.tsx
|
|
26054
|
-
var
|
|
26194
|
+
var import_react148 = require("react");
|
|
26055
26195
|
var import_react_aria64 = require("react-aria");
|
|
26056
26196
|
var import_runtime129 = require("@homebound/truss/runtime");
|
|
26057
|
-
var
|
|
26197
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
26058
26198
|
function StepperTab(props) {
|
|
26059
26199
|
const {
|
|
26060
26200
|
label,
|
|
@@ -26070,7 +26210,7 @@ function StepperTab(props) {
|
|
|
26070
26210
|
onPress: () => onClick(value),
|
|
26071
26211
|
isDisabled: disabled || collapsed
|
|
26072
26212
|
};
|
|
26073
|
-
const ref = (0,
|
|
26213
|
+
const ref = (0, import_react148.useRef)(null);
|
|
26074
26214
|
const {
|
|
26075
26215
|
buttonProps
|
|
26076
26216
|
} = (0, import_react_aria64.useButton)(ariaProps, ref);
|
|
@@ -26085,7 +26225,7 @@ function StepperTab(props) {
|
|
|
26085
26225
|
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
26086
26226
|
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
26087
26227
|
const tid = useTestIds(props, "stepperTab");
|
|
26088
|
-
return /* @__PURE__ */ (0,
|
|
26228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)("button", { ref, ...(0, import_react_aria64.mergeProps)(buttonProps, focusProps, hoverProps), "aria-label": label, ...(0, import_runtime129.trussProps)({
|
|
26089
26229
|
...stepperTabStyles.baseStyles,
|
|
26090
26230
|
...getStateStyles(active, completed),
|
|
26091
26231
|
...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
|
|
@@ -26093,10 +26233,10 @@ function StepperTab(props) {
|
|
|
26093
26233
|
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
26094
26234
|
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
26095
26235
|
}), ...tid[defaultTestId(value)], children: [
|
|
26096
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
26097
|
-
/* @__PURE__ */ (0,
|
|
26098
|
-
/* @__PURE__ */ (0,
|
|
26099
|
-
/* @__PURE__ */ (0,
|
|
26236
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(import_jsx_runtime207.Fragment, { children: [
|
|
26237
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsxs)("span", { className: "dg jic mw0", children: [
|
|
26238
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("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 }),
|
|
26239
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("span", { ...(0, import_runtime129.trussProps)({
|
|
26100
26240
|
gridArea: "gridArea_1_1",
|
|
26101
26241
|
overflow: "oh",
|
|
26102
26242
|
display: "d_negwebkit_box",
|
|
@@ -26111,7 +26251,7 @@ function StepperTab(props) {
|
|
|
26111
26251
|
} : {}
|
|
26112
26252
|
}), children: label })
|
|
26113
26253
|
] }),
|
|
26114
|
-
/* @__PURE__ */ (0,
|
|
26254
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("span", { ...(0, import_runtime129.trussProps)({
|
|
26115
26255
|
flexShrink: "fs0",
|
|
26116
26256
|
marginLeft: "ml1",
|
|
26117
26257
|
transition: "transitionAll",
|
|
@@ -26121,10 +26261,10 @@ function StepperTab(props) {
|
|
|
26121
26261
|
opacity: "o100",
|
|
26122
26262
|
transform: "transform_scale_1_translateY_0"
|
|
26123
26263
|
} : {}
|
|
26124
|
-
}), children: /* @__PURE__ */ (0,
|
|
26264
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(Icon, { icon: "check", inc: 2.5, ...tid.check }) })
|
|
26125
26265
|
] }),
|
|
26126
|
-
/* @__PURE__ */ (0,
|
|
26127
|
-
/* @__PURE__ */ (0,
|
|
26266
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("span", { "aria-hidden": true, ...(0, import_runtime129.trussProps)(getIndicatorStyles(active, completed, disabled)), ...tid.indicator }),
|
|
26267
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(import_react_aria64.VisuallyHidden, { children: completed ? "Complete" : "Not Complete" })
|
|
26128
26268
|
] });
|
|
26129
26269
|
}
|
|
26130
26270
|
function getStateStyles(active, completed) {
|
|
@@ -26206,8 +26346,8 @@ var stepperTabStyles = {
|
|
|
26206
26346
|
|
|
26207
26347
|
// src/components/StepperTabs/StepperTabs.tsx
|
|
26208
26348
|
var import_runtime130 = require("@homebound/truss/runtime");
|
|
26209
|
-
var
|
|
26210
|
-
var
|
|
26349
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
26350
|
+
var import_react149 = require("react");
|
|
26211
26351
|
function StepperTabs(props) {
|
|
26212
26352
|
const {
|
|
26213
26353
|
steps,
|
|
@@ -26222,7 +26362,7 @@ function StepperTabs(props) {
|
|
|
26222
26362
|
const collapsed = isMobile || !!forceCollapsed;
|
|
26223
26363
|
const capWidth = steps.length <= 3;
|
|
26224
26364
|
const currentStepIndex = Math.max(0, steps.findIndex((step) => step.value === currentStep));
|
|
26225
|
-
return /* @__PURE__ */ (0,
|
|
26365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)("ol", { ...(0, import_runtime130.trussProps)({
|
|
26226
26366
|
padding: "p_0",
|
|
26227
26367
|
margin: "m_0",
|
|
26228
26368
|
listStyle: "lis_none",
|
|
@@ -26237,7 +26377,7 @@ function StepperTabs(props) {
|
|
|
26237
26377
|
}), children: steps.map((step, idx) => {
|
|
26238
26378
|
const isCurrent = idx === currentStepIndex;
|
|
26239
26379
|
const isCompleted = idx < currentStepIndex;
|
|
26240
|
-
return /* @__PURE__ */ (0,
|
|
26380
|
+
return /* @__PURE__ */ (0, import_react149.createElement)("li", { ...(0, import_runtime130.trussProps)({
|
|
26241
26381
|
display: "df",
|
|
26242
26382
|
flexGrow: "fg1",
|
|
26243
26383
|
flexBasis: "fb_0",
|
|
@@ -26249,7 +26389,7 @@ function StepperTabs(props) {
|
|
|
26249
26389
|
"--maxWidth": `${maxStepWidthPx}px`
|
|
26250
26390
|
}]
|
|
26251
26391
|
} : {}
|
|
26252
|
-
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0,
|
|
26392
|
+
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: isCompleted, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
|
|
26253
26393
|
}) }) });
|
|
26254
26394
|
}
|
|
26255
26395
|
var maxStepWidthPx = 280;
|
|
@@ -26258,7 +26398,7 @@ var gapPx = 6;
|
|
|
26258
26398
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
26259
26399
|
var import_react_dom8 = require("react-dom");
|
|
26260
26400
|
var import_runtime131 = require("@homebound/truss/runtime");
|
|
26261
|
-
var
|
|
26401
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
26262
26402
|
function SuperDrawerHeader(props) {
|
|
26263
26403
|
const {
|
|
26264
26404
|
hideControls
|
|
@@ -26275,20 +26415,20 @@ function SuperDrawerHeader(props) {
|
|
|
26275
26415
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
26276
26416
|
const isDetail = currentContent !== firstContent;
|
|
26277
26417
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
26278
|
-
return (0, import_react_dom8.createPortal)(/* @__PURE__ */ (0,
|
|
26279
|
-
isStructuredProps(props) ? /* @__PURE__ */ (0,
|
|
26280
|
-
/* @__PURE__ */ (0,
|
|
26281
|
-
/* @__PURE__ */ (0,
|
|
26418
|
+
return (0, import_react_dom8.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime209.jsxs)("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
26419
|
+
isStructuredProps(props) ? /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
26420
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsxs)("div", { className: "fg1 df aic gap2", children: [
|
|
26421
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
26282
26422
|
props.left
|
|
26283
26423
|
] }),
|
|
26284
|
-
props.right && /* @__PURE__ */ (0,
|
|
26285
|
-
] }) : /* @__PURE__ */ (0,
|
|
26286
|
-
!hideControls && /* @__PURE__ */ (0,
|
|
26424
|
+
props.right && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { className: "fs0", children: props.right })
|
|
26425
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { className: "fg1", children: props.children }),
|
|
26426
|
+
!hideControls && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { ...(0, import_runtime131.trussProps)({
|
|
26287
26427
|
flexShrink: "fs0",
|
|
26288
26428
|
...isDetail ? {
|
|
26289
26429
|
visibility: "vh"
|
|
26290
26430
|
} : {}
|
|
26291
|
-
}), children: /* @__PURE__ */ (0,
|
|
26431
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(ButtonGroup, { buttons: [{
|
|
26292
26432
|
icon: "chevronLeft",
|
|
26293
26433
|
onClick: () => onPrevClick && onPrevClick(),
|
|
26294
26434
|
disabled: !onPrevClick
|
|
@@ -26307,8 +26447,8 @@ function isStructuredProps(props) {
|
|
|
26307
26447
|
var import_framer_motion7 = require("framer-motion");
|
|
26308
26448
|
|
|
26309
26449
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
26310
|
-
var
|
|
26311
|
-
var
|
|
26450
|
+
var import_react150 = require("react");
|
|
26451
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
26312
26452
|
function useSuperDrawer() {
|
|
26313
26453
|
const {
|
|
26314
26454
|
drawerContentStack: contentStack,
|
|
@@ -26320,7 +26460,7 @@ function useSuperDrawer() {
|
|
|
26320
26460
|
function canCloseDrawerDetails(i, doChange) {
|
|
26321
26461
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
26322
26462
|
if (!canClose(canCloseDrawerDetail)) {
|
|
26323
|
-
openModal({ content: /* @__PURE__ */ (0,
|
|
26463
|
+
openModal({ content: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
26324
26464
|
return false;
|
|
26325
26465
|
}
|
|
26326
26466
|
}
|
|
@@ -26340,14 +26480,14 @@ function useSuperDrawer() {
|
|
|
26340
26480
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
26341
26481
|
if (!canClose(canCloseDrawer)) {
|
|
26342
26482
|
openModal({
|
|
26343
|
-
content: /* @__PURE__ */ (0,
|
|
26483
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
26344
26484
|
});
|
|
26345
26485
|
return;
|
|
26346
26486
|
}
|
|
26347
26487
|
}
|
|
26348
26488
|
doChange();
|
|
26349
26489
|
}
|
|
26350
|
-
const closeActions = (0,
|
|
26490
|
+
const closeActions = (0, import_react150.useMemo)(
|
|
26351
26491
|
() => {
|
|
26352
26492
|
return {
|
|
26353
26493
|
/** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
|
|
@@ -26382,7 +26522,7 @@ function useSuperDrawer() {
|
|
|
26382
26522
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26383
26523
|
[canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
|
|
26384
26524
|
);
|
|
26385
|
-
const actions = (0,
|
|
26525
|
+
const actions = (0, import_react150.useMemo)(
|
|
26386
26526
|
() => {
|
|
26387
26527
|
return {
|
|
26388
26528
|
// TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
|
|
@@ -26436,7 +26576,7 @@ function canClose(canCloseCheck) {
|
|
|
26436
26576
|
|
|
26437
26577
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
26438
26578
|
var import_runtime132 = require("@homebound/truss/runtime");
|
|
26439
|
-
var
|
|
26579
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
26440
26580
|
var SuperDrawerContent = ({
|
|
26441
26581
|
children,
|
|
26442
26582
|
actions
|
|
@@ -26456,17 +26596,17 @@ var SuperDrawerContent = ({
|
|
|
26456
26596
|
} = firstContent ?? {};
|
|
26457
26597
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
26458
26598
|
if (kind === "open") {
|
|
26459
|
-
return /* @__PURE__ */ (0,
|
|
26599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_framer_motion7.motion.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
26460
26600
|
} else if (kind === "detail") {
|
|
26461
|
-
return /* @__PURE__ */ (0,
|
|
26601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(import_framer_motion7.motion.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
26462
26602
|
overflow: "auto"
|
|
26463
26603
|
}, transition: {
|
|
26464
26604
|
overflow: {
|
|
26465
26605
|
delay: 0.3
|
|
26466
26606
|
}
|
|
26467
26607
|
}, children: [
|
|
26468
|
-
/* @__PURE__ */ (0,
|
|
26469
|
-
/* @__PURE__ */ (0,
|
|
26608
|
+
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
26609
|
+
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_framer_motion7.motion.div, { initial: {
|
|
26470
26610
|
x: width2,
|
|
26471
26611
|
opacity: 0
|
|
26472
26612
|
}, animate: {
|
|
@@ -26484,7 +26624,7 @@ var SuperDrawerContent = ({
|
|
|
26484
26624
|
}, className: "pt2", children: children2 })
|
|
26485
26625
|
] }, "content");
|
|
26486
26626
|
} else {
|
|
26487
|
-
return /* @__PURE__ */ (0,
|
|
26627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_framer_motion7.motion.div, { ...(0, import_runtime132.mergeProps)(void 0, {
|
|
26488
26628
|
overflow: "auto"
|
|
26489
26629
|
}, {
|
|
26490
26630
|
paddingTop: "pt3",
|
|
@@ -26495,9 +26635,9 @@ var SuperDrawerContent = ({
|
|
|
26495
26635
|
}) }, "content");
|
|
26496
26636
|
}
|
|
26497
26637
|
}
|
|
26498
|
-
return /* @__PURE__ */ (0,
|
|
26638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(import_jsx_runtime211.Fragment, { children: [
|
|
26499
26639
|
wrapWithMotionAndMaybeBack(children),
|
|
26500
|
-
actions && /* @__PURE__ */ (0,
|
|
26640
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)("footer", { ...(0, import_runtime132.trussProps)({
|
|
26501
26641
|
borderTopStyle: "bts_solid",
|
|
26502
26642
|
borderTopWidth: "btw_1px",
|
|
26503
26643
|
borderColor: ["bc_var", {
|
|
@@ -26510,7 +26650,7 @@ var SuperDrawerContent = ({
|
|
|
26510
26650
|
display: "df",
|
|
26511
26651
|
alignItems: "aic",
|
|
26512
26652
|
justifyContent: "jcfe"
|
|
26513
|
-
}), children: /* @__PURE__ */ (0,
|
|
26653
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Button, { ...buttonProps }, i)) }) })
|
|
26514
26654
|
] });
|
|
26515
26655
|
};
|
|
26516
26656
|
|
|
@@ -26554,19 +26694,19 @@ function visit(rows, fn) {
|
|
|
26554
26694
|
|
|
26555
26695
|
// src/components/Tabs.tsx
|
|
26556
26696
|
var import_change_case9 = require("change-case");
|
|
26557
|
-
var
|
|
26697
|
+
var import_react151 = require("react");
|
|
26558
26698
|
var import_react_aria65 = require("react-aria");
|
|
26559
26699
|
var import_react_router = require("react-router");
|
|
26560
26700
|
var import_react_router_dom8 = require("react-router-dom");
|
|
26561
26701
|
var import_runtime133 = require("@homebound/truss/runtime");
|
|
26562
|
-
var
|
|
26702
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
26563
26703
|
function TabsWithContent(props) {
|
|
26564
26704
|
const styles = hideTabs(props) ? {} : {
|
|
26565
26705
|
paddingTop: "pt3"
|
|
26566
26706
|
};
|
|
26567
|
-
return /* @__PURE__ */ (0,
|
|
26568
|
-
/* @__PURE__ */ (0,
|
|
26569
|
-
/* @__PURE__ */ (0,
|
|
26707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(import_jsx_runtime212.Fragment, { children: [
|
|
26708
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(Tabs, { ...props }),
|
|
26709
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(TabContent, { ...props, contentXss: {
|
|
26570
26710
|
...styles,
|
|
26571
26711
|
...props.contentXss
|
|
26572
26712
|
} })
|
|
@@ -26591,7 +26731,7 @@ function TabContent(props) {
|
|
|
26591
26731
|
return (
|
|
26592
26732
|
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
26593
26733
|
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
26594
|
-
/* @__PURE__ */ (0,
|
|
26734
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...(0, import_runtime133.trussProps)(contentXss), children: selectedTab.render() }) })
|
|
26595
26735
|
);
|
|
26596
26736
|
}
|
|
26597
26737
|
function Tabs(props) {
|
|
@@ -26615,9 +26755,9 @@ function Tabs(props) {
|
|
|
26615
26755
|
focusProps
|
|
26616
26756
|
} = (0, import_react_aria65.useFocusRing)();
|
|
26617
26757
|
const tid = useTestIds(others, "tabs");
|
|
26618
|
-
const [active, setActive] = (0,
|
|
26619
|
-
const ref = (0,
|
|
26620
|
-
(0,
|
|
26758
|
+
const [active, setActive] = (0, import_react151.useState)(selected);
|
|
26759
|
+
const ref = (0, import_react151.useRef)(null);
|
|
26760
|
+
(0, import_react151.useEffect)(() => setActive(selected), [selected]);
|
|
26621
26761
|
function onKeyUp(e) {
|
|
26622
26762
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
26623
26763
|
const nextTabValue = getNextTabValue(active, e.key, tabs);
|
|
@@ -26633,7 +26773,7 @@ function Tabs(props) {
|
|
|
26633
26773
|
setActive(selected);
|
|
26634
26774
|
}
|
|
26635
26775
|
}
|
|
26636
|
-
return /* @__PURE__ */ (0,
|
|
26776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)("div", { ...(0, import_runtime133.trussProps)({
|
|
26637
26777
|
...{
|
|
26638
26778
|
display: "df",
|
|
26639
26779
|
alignItems: "aic",
|
|
@@ -26651,11 +26791,11 @@ function Tabs(props) {
|
|
|
26651
26791
|
}
|
|
26652
26792
|
} : {}
|
|
26653
26793
|
}), children: [
|
|
26654
|
-
!hideTabs(props) && /* @__PURE__ */ (0,
|
|
26794
|
+
!hideTabs(props) && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
26655
26795
|
const uniqueValue = uniqueTabValue(tab);
|
|
26656
|
-
return /* @__PURE__ */ (0,
|
|
26796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
26657
26797
|
}) }),
|
|
26658
|
-
right && /* @__PURE__ */ (0,
|
|
26798
|
+
right && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("div", { className: "mla df aic gap1 pb1", children: right })
|
|
26659
26799
|
] });
|
|
26660
26800
|
}
|
|
26661
26801
|
function TabImpl(props) {
|
|
@@ -26689,7 +26829,7 @@ function TabImpl(props) {
|
|
|
26689
26829
|
hoverStyles: hoverStyles4,
|
|
26690
26830
|
disabledStyles: disabledStyles3,
|
|
26691
26831
|
activeHoverStyles
|
|
26692
|
-
} = (0,
|
|
26832
|
+
} = (0, import_react151.useMemo)(() => getTabStyles(), []);
|
|
26693
26833
|
const uniqueValue = uniqueTabValue(tab);
|
|
26694
26834
|
const tabProps = {
|
|
26695
26835
|
"aria-controls": `${uniqueValue}-tabPanel`,
|
|
@@ -26715,17 +26855,17 @@ function TabImpl(props) {
|
|
|
26715
26855
|
onClick: () => onClick(tab.value)
|
|
26716
26856
|
}
|
|
26717
26857
|
});
|
|
26718
|
-
const tabLabel = /* @__PURE__ */ (0,
|
|
26858
|
+
const tabLabel = /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(import_jsx_runtime212.Fragment, { children: [
|
|
26719
26859
|
label,
|
|
26720
|
-
(icon || endAdornment) && /* @__PURE__ */ (0,
|
|
26860
|
+
(icon || endAdornment) && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("span", { className: "ml1", children: icon ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(Icon, { icon }) : endAdornment })
|
|
26721
26861
|
] });
|
|
26722
26862
|
return isDisabled ? maybeTooltip({
|
|
26723
26863
|
title: resolveTooltip(disabled),
|
|
26724
26864
|
placement: "top",
|
|
26725
|
-
children: /* @__PURE__ */ (0,
|
|
26726
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */ (0,
|
|
26865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("div", { ...tabProps, children: tabLabel })
|
|
26866
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(import_react_router_dom8.Link, { ...(0, import_react_aria65.mergeProps)(tabProps, interactiveProps, {
|
|
26727
26867
|
className: "navLink"
|
|
26728
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ (0,
|
|
26868
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("button", { ...{
|
|
26729
26869
|
...tabProps,
|
|
26730
26870
|
...interactiveProps
|
|
26731
26871
|
}, children: tabLabel });
|
|
@@ -26833,7 +26973,7 @@ function hideTabs(props) {
|
|
|
26833
26973
|
}
|
|
26834
26974
|
|
|
26835
26975
|
// src/components/TagGroup.tsx
|
|
26836
|
-
var
|
|
26976
|
+
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
26837
26977
|
function TagGroup(props) {
|
|
26838
26978
|
const {
|
|
26839
26979
|
tags,
|
|
@@ -26841,30 +26981,30 @@ function TagGroup(props) {
|
|
|
26841
26981
|
...otherProps
|
|
26842
26982
|
} = props;
|
|
26843
26983
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
26844
|
-
return /* @__PURE__ */ (0,
|
|
26845
|
-
tags.map((tag) => /* @__PURE__ */ (0,
|
|
26846
|
-
onEdit && /* @__PURE__ */ (0,
|
|
26984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)("div", { ...tid, className: "df aic fww gap1", children: [
|
|
26985
|
+
tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
26986
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
26847
26987
|
] });
|
|
26848
26988
|
}
|
|
26849
26989
|
|
|
26850
26990
|
// src/components/Toast/useToast.tsx
|
|
26851
|
-
var
|
|
26991
|
+
var import_react152 = require("react");
|
|
26852
26992
|
function useToast() {
|
|
26853
26993
|
const { setNotice, clear } = useToastContext();
|
|
26854
|
-
const showToast = (0,
|
|
26994
|
+
const showToast = (0, import_react152.useCallback)((props) => setNotice(props), [setNotice]);
|
|
26855
26995
|
return { showToast, clear };
|
|
26856
26996
|
}
|
|
26857
26997
|
|
|
26858
26998
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
26859
26999
|
var import_runtime134 = require("@homebound/truss/runtime");
|
|
26860
|
-
var
|
|
27000
|
+
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
26861
27001
|
var __maybeInc26 = (inc) => {
|
|
26862
27002
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26863
27003
|
};
|
|
26864
27004
|
function SideNavLayout(props) {
|
|
26865
27005
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
26866
|
-
if (hasProvider) return /* @__PURE__ */ (0,
|
|
26867
|
-
return /* @__PURE__ */ (0,
|
|
27006
|
+
if (hasProvider) return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SideNavLayoutContent, { ...props });
|
|
27007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SideNavLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SideNavLayoutContent, { ...props }) });
|
|
26868
27008
|
}
|
|
26869
27009
|
function SideNavLayoutContent(props) {
|
|
26870
27010
|
const {
|
|
@@ -26881,12 +27021,13 @@ function SideNavLayoutContent(props) {
|
|
|
26881
27021
|
const bp = useBreakpoint();
|
|
26882
27022
|
const tid = useTestIds(props, "sideNavLayout");
|
|
26883
27023
|
const railCollapsedWidthPx = 56;
|
|
27024
|
+
const showMobileSubNav = useRegisterMobileSubNav(sideNav);
|
|
26884
27025
|
const collapsed = navState === "collapse";
|
|
26885
|
-
const showRail = navState !== "hidden";
|
|
27026
|
+
const showRail = navState !== "hidden" && !showMobileSubNav;
|
|
26886
27027
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
26887
27028
|
const navTop = bannerAndNavbarChromeTop();
|
|
26888
27029
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
26889
|
-
const rail = showRail && /* @__PURE__ */ (0,
|
|
27030
|
+
const rail = showRail && /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { ...(0, import_runtime134.trussProps)({
|
|
26890
27031
|
...{
|
|
26891
27032
|
display: "df",
|
|
26892
27033
|
flexDirection: "fdc",
|
|
@@ -26943,18 +27084,18 @@ function SideNavLayoutContent(props) {
|
|
|
26943
27084
|
}
|
|
26944
27085
|
}
|
|
26945
27086
|
}), ...tid.sideNav, children: [
|
|
26946
|
-
showCollapseToggle && /* @__PURE__ */ (0,
|
|
26947
|
-
/* @__PURE__ */ (0,
|
|
27087
|
+
showCollapseToggle && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
27088
|
+
/* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SideNav, { ...sideNav }) })
|
|
26948
27089
|
] });
|
|
26949
|
-
return /* @__PURE__ */ (0,
|
|
27090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { ...(0, import_runtime134.mergeProps)(void 0, {
|
|
26950
27091
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
26951
27092
|
}, {
|
|
26952
27093
|
display: "df",
|
|
26953
27094
|
flexDirection: "fdr",
|
|
26954
27095
|
width: "w100"
|
|
26955
27096
|
}), ...tid, children: [
|
|
26956
|
-
contrastRail ? /* @__PURE__ */ (0,
|
|
26957
|
-
/* @__PURE__ */ (0,
|
|
27097
|
+
contrastRail ? /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(ContrastScope, { children: rail }) : rail,
|
|
27098
|
+
/* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { ...(0, import_runtime134.trussProps)({
|
|
26958
27099
|
display: "df",
|
|
26959
27100
|
flexDirection: "fdc",
|
|
26960
27101
|
flexGrow: "fg1",
|
|
@@ -26971,7 +27112,7 @@ function SideNavLayoutContent(props) {
|
|
|
26971
27112
|
|
|
26972
27113
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
26973
27114
|
var import_runtime135 = require("@homebound/truss/runtime");
|
|
26974
|
-
var
|
|
27115
|
+
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
26975
27116
|
var __maybeInc27 = (inc) => {
|
|
26976
27117
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26977
27118
|
};
|
|
@@ -26987,18 +27128,18 @@ function EnvironmentBannerLayout(props) {
|
|
|
26987
27128
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
26988
27129
|
};
|
|
26989
27130
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
26990
|
-
return /* @__PURE__ */ (0,
|
|
27131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { ...(0, import_runtime135.mergeProps)(void 0, style, {
|
|
26991
27132
|
display: "df",
|
|
26992
27133
|
flexDirection: "fdc",
|
|
26993
27134
|
width: "wfc",
|
|
26994
27135
|
minWidth: "mw100"
|
|
26995
27136
|
}), ...tid, children: [
|
|
26996
|
-
showBanner && environmentBanner && /* @__PURE__ */ (0,
|
|
27137
|
+
showBanner && environmentBanner && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { ...(0, import_runtime135.mergeProps)(void 0, {
|
|
26997
27138
|
height: environmentBannerSizePx
|
|
26998
27139
|
}, {
|
|
26999
27140
|
flexShrink: "fs0",
|
|
27000
27141
|
width: "w100"
|
|
27001
|
-
}), children: /* @__PURE__ */ (0,
|
|
27142
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { ...(0, import_runtime135.trussProps)({
|
|
27002
27143
|
position: "fixed",
|
|
27003
27144
|
top: "top0",
|
|
27004
27145
|
left: "left0",
|
|
@@ -27008,14 +27149,14 @@ function EnvironmentBannerLayout(props) {
|
|
|
27008
27149
|
width: ["w_var", {
|
|
27009
27150
|
"--width": (0, import_runtime135.maybeCssVar)(__maybeInc27(innerWidth))
|
|
27010
27151
|
}]
|
|
27011
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0,
|
|
27152
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
27012
27153
|
children
|
|
27013
27154
|
] }) }) });
|
|
27014
27155
|
}
|
|
27015
27156
|
|
|
27016
27157
|
// src/layouts/FormSectionLayout/FormSectionLayout.tsx
|
|
27017
27158
|
var import_runtime136 = require("@homebound/truss/runtime");
|
|
27018
|
-
var
|
|
27159
|
+
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
27019
27160
|
function FormSectionLayout(props) {
|
|
27020
27161
|
const {
|
|
27021
27162
|
title,
|
|
@@ -27025,14 +27166,14 @@ function FormSectionLayout(props) {
|
|
|
27025
27166
|
sections
|
|
27026
27167
|
} = props;
|
|
27027
27168
|
const tid = useTestIds(props, "formSectionLayout");
|
|
27028
|
-
return /* @__PURE__ */ (0,
|
|
27029
|
-
/* @__PURE__ */ (0,
|
|
27030
|
-
/* @__PURE__ */ (0,
|
|
27031
|
-
/* @__PURE__ */ (0,
|
|
27032
|
-
/* @__PURE__ */ (0,
|
|
27033
|
-
actions && /* @__PURE__ */ (0,
|
|
27169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", { className: "df fdc gap8 w100 pt4 maxw_720px mla mra sm_pl2 sm_pr2", ...tid, children: [
|
|
27170
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", { className: "df fdc gap3", children: [
|
|
27171
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", { className: "df fdc jcsb gap_12px", children: [
|
|
27172
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", { className: "df jcsb aic", children: [
|
|
27173
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)("h1", { className: "fw6 fz_20px lh_28px", ...tid.title, children: title }),
|
|
27174
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("div", { className: "df gap1 fs0", ...tid.actions, children: actions.map((action) => action.kind === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(IconButton, { ...action, variant: "outline" }, action.icon) : /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(Button, { ...action }, `${action.label}`)) })
|
|
27034
27175
|
] }),
|
|
27035
|
-
description && /* @__PURE__ */ (0,
|
|
27176
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("div", { ...(0, import_runtime136.trussProps)({
|
|
27036
27177
|
fontWeight: "fw4",
|
|
27037
27178
|
fontSize: "fz_14px",
|
|
27038
27179
|
lineHeight: "lh_20px",
|
|
@@ -27043,16 +27184,16 @@ function FormSectionLayout(props) {
|
|
|
27043
27184
|
] }),
|
|
27044
27185
|
initialFields
|
|
27045
27186
|
] }),
|
|
27046
|
-
sections && /* @__PURE__ */ (0,
|
|
27187
|
+
sections && /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
27047
27188
|
] });
|
|
27048
27189
|
}
|
|
27049
27190
|
|
|
27050
27191
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27051
|
-
var
|
|
27192
|
+
var import_react156 = require("react");
|
|
27052
27193
|
var import_runtime137 = require("@homebound/truss/runtime");
|
|
27053
27194
|
|
|
27054
27195
|
// src/layouts/useAutoHideOnScroll.ts
|
|
27055
|
-
var
|
|
27196
|
+
var import_react153 = require("react");
|
|
27056
27197
|
var THRESHOLD = 80;
|
|
27057
27198
|
function getInitialAutoHideState() {
|
|
27058
27199
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -27062,15 +27203,15 @@ function getInitialAutoHideState() {
|
|
|
27062
27203
|
}
|
|
27063
27204
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
27064
27205
|
const initial = getInitialAutoHideState();
|
|
27065
|
-
const [state, setState] = (0,
|
|
27066
|
-
const stateRef = (0,
|
|
27067
|
-
const [atTop, setAtTop] = (0,
|
|
27068
|
-
const atTopRef = (0,
|
|
27069
|
-
const getTopOffsetRef = (0,
|
|
27206
|
+
const [state, setState] = (0, import_react153.useState)(initial.state);
|
|
27207
|
+
const stateRef = (0, import_react153.useRef)(initial.state);
|
|
27208
|
+
const [atTop, setAtTop] = (0, import_react153.useState)(initial.atTop);
|
|
27209
|
+
const atTopRef = (0, import_react153.useRef)(initial.atTop);
|
|
27210
|
+
const getTopOffsetRef = (0, import_react153.useRef)(getTopOffset);
|
|
27070
27211
|
getTopOffsetRef.current = getTopOffset;
|
|
27071
|
-
const lastScrollY = (0,
|
|
27072
|
-
const lastScrollHeight = (0,
|
|
27073
|
-
(0,
|
|
27212
|
+
const lastScrollY = (0, import_react153.useRef)(Number.POSITIVE_INFINITY);
|
|
27213
|
+
const lastScrollHeight = (0, import_react153.useRef)(0);
|
|
27214
|
+
(0, import_react153.useLayoutEffect)(() => {
|
|
27074
27215
|
if (!enabled) {
|
|
27075
27216
|
stateRef.current = "static";
|
|
27076
27217
|
atTopRef.current = true;
|
|
@@ -27143,34 +27284,34 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
27143
27284
|
|
|
27144
27285
|
// src/layouts/useMeasuredHeight.ts
|
|
27145
27286
|
var import_utils179 = require("@react-aria/utils");
|
|
27146
|
-
var
|
|
27287
|
+
var import_react154 = require("react");
|
|
27147
27288
|
function useMeasuredHeight(ref, enabled) {
|
|
27148
|
-
const [height, setHeight] = (0,
|
|
27149
|
-
const syncElementHeight = (0,
|
|
27289
|
+
const [height, setHeight] = (0, import_react154.useState)(0);
|
|
27290
|
+
const syncElementHeight = (0, import_react154.useCallback)(() => {
|
|
27150
27291
|
const el = ref.current;
|
|
27151
27292
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
27152
27293
|
setHeight((prev) => prev === next ? prev : next);
|
|
27153
27294
|
}, [ref]);
|
|
27154
27295
|
(0, import_utils179.useResizeObserver)({ ref, onResize: syncElementHeight });
|
|
27155
|
-
(0,
|
|
27296
|
+
(0, import_react154.useLayoutEffect)(() => {
|
|
27156
27297
|
syncElementHeight();
|
|
27157
27298
|
}, [enabled, syncElementHeight]);
|
|
27158
27299
|
return height;
|
|
27159
27300
|
}
|
|
27160
27301
|
|
|
27161
27302
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
27162
|
-
var
|
|
27163
|
-
var
|
|
27164
|
-
var NavbarLayoutHeightContext = (0,
|
|
27303
|
+
var import_react155 = require("react");
|
|
27304
|
+
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
27305
|
+
var NavbarLayoutHeightContext = (0, import_react155.createContext)(0);
|
|
27165
27306
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
27166
|
-
return /* @__PURE__ */ (0,
|
|
27307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(NavbarLayoutHeightContext.Provider, { value, children });
|
|
27167
27308
|
}
|
|
27168
27309
|
function useNavbarLayoutHeight() {
|
|
27169
|
-
return (0,
|
|
27310
|
+
return (0, import_react155.useContext)(NavbarLayoutHeightContext);
|
|
27170
27311
|
}
|
|
27171
27312
|
|
|
27172
27313
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27173
|
-
var
|
|
27314
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
27174
27315
|
var __maybeInc28 = (inc) => {
|
|
27175
27316
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27176
27317
|
};
|
|
@@ -27180,8 +27321,8 @@ function NavbarLayout(props) {
|
|
|
27180
27321
|
children
|
|
27181
27322
|
} = props;
|
|
27182
27323
|
const tid = useTestIds(props, "navbarLayout");
|
|
27183
|
-
const navMetricsRef = (0,
|
|
27184
|
-
const spacerRef = (0,
|
|
27324
|
+
const navMetricsRef = (0, import_react156.useRef)(null);
|
|
27325
|
+
const spacerRef = (0, import_react156.useRef)(null);
|
|
27185
27326
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
27186
27327
|
const {
|
|
27187
27328
|
state: autoHideState,
|
|
@@ -27223,29 +27364,29 @@ function NavbarLayout(props) {
|
|
|
27223
27364
|
const innerStyle = autoHideState !== "static" ? {
|
|
27224
27365
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
27225
27366
|
} : void 0;
|
|
27226
|
-
const navbarEl = (0,
|
|
27227
|
-
return /* @__PURE__ */ (0,
|
|
27367
|
+
const navbarEl = (0, import_react156.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Navbar, { ...navbar }), [navbar]);
|
|
27368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(MobileSubNavProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...(0, import_runtime137.mergeProps)(void 0, cssVars, {
|
|
27228
27369
|
display: "df",
|
|
27229
27370
|
flexDirection: "fdc",
|
|
27230
27371
|
width: "wfc",
|
|
27231
27372
|
minWidth: "mw100"
|
|
27232
27373
|
}), ...tid, children: [
|
|
27233
|
-
/* @__PURE__ */ (0,
|
|
27374
|
+
/* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ref: spacerRef, ...(0, import_runtime137.mergeProps)(void 0, {
|
|
27234
27375
|
height: navHeight
|
|
27235
27376
|
}, {
|
|
27236
27377
|
flexShrink: "fs0",
|
|
27237
27378
|
width: "w100"
|
|
27238
|
-
}), children: /* @__PURE__ */ (0,
|
|
27239
|
-
/* @__PURE__ */ (0,
|
|
27240
|
-
] }) }) });
|
|
27379
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime137.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
27380
|
+
/* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
27381
|
+
] }) }) }) });
|
|
27241
27382
|
}
|
|
27242
27383
|
|
|
27243
27384
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
27244
|
-
var
|
|
27385
|
+
var import_react157 = require("react");
|
|
27245
27386
|
|
|
27246
27387
|
// src/components/Headers/BaseHeader.tsx
|
|
27247
27388
|
var import_runtime138 = require("@homebound/truss/runtime");
|
|
27248
|
-
var
|
|
27389
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
27249
27390
|
function BaseHeader(props) {
|
|
27250
27391
|
const {
|
|
27251
27392
|
title,
|
|
@@ -27257,7 +27398,7 @@ function BaseHeader(props) {
|
|
|
27257
27398
|
} = props;
|
|
27258
27399
|
const tid = useTestIds(otherProps, "header");
|
|
27259
27400
|
useDocumentTitle(title, documentTitleSuffix);
|
|
27260
|
-
return /* @__PURE__ */ (0,
|
|
27401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("header", { ...tid, ...(0, import_runtime138.trussProps)({
|
|
27261
27402
|
display: "df",
|
|
27262
27403
|
flexDirection: "fdc",
|
|
27263
27404
|
paddingTop: "pt3",
|
|
@@ -27271,7 +27412,7 @@ function BaseHeader(props) {
|
|
|
27271
27412
|
"--backgroundColor": "var(--b-surface)"
|
|
27272
27413
|
}]
|
|
27273
27414
|
}), children: [
|
|
27274
|
-
/* @__PURE__ */ (0,
|
|
27415
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { ...(0, import_runtime138.trussProps)({
|
|
27275
27416
|
...{
|
|
27276
27417
|
display: "df",
|
|
27277
27418
|
justifyContent: "jcsb",
|
|
@@ -27285,9 +27426,9 @@ function BaseHeader(props) {
|
|
|
27285
27426
|
} : {}
|
|
27286
27427
|
}
|
|
27287
27428
|
}), children: [
|
|
27288
|
-
/* @__PURE__ */ (0,
|
|
27289
|
-
breadcrumbs && /* @__PURE__ */ (0,
|
|
27290
|
-
/* @__PURE__ */ (0,
|
|
27429
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "mw0", children: [
|
|
27430
|
+
breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Breadcrumbs, { ...breadcrumbs }),
|
|
27431
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)("h1", { ...tid.title, ...(0, import_runtime138.trussProps)({
|
|
27291
27432
|
fontWeight: "fw6",
|
|
27292
27433
|
fontSize: "fz_20px",
|
|
27293
27434
|
lineHeight: "lh_28px",
|
|
@@ -27296,7 +27437,7 @@ function BaseHeader(props) {
|
|
|
27296
27437
|
}]
|
|
27297
27438
|
}), children: title })
|
|
27298
27439
|
] }),
|
|
27299
|
-
/* @__PURE__ */ (0,
|
|
27440
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { className: "fs0", children: rightSlot })
|
|
27300
27441
|
] }),
|
|
27301
27442
|
bottomSlot
|
|
27302
27443
|
] });
|
|
@@ -27304,14 +27445,14 @@ function BaseHeader(props) {
|
|
|
27304
27445
|
|
|
27305
27446
|
// src/components/Headers/PageHeader.tsx
|
|
27306
27447
|
var import_runtime139 = require("@homebound/truss/runtime");
|
|
27307
|
-
var
|
|
27448
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
27308
27449
|
function PageHeader2(props) {
|
|
27309
27450
|
const {
|
|
27310
27451
|
tabs,
|
|
27311
27452
|
...otherProps
|
|
27312
27453
|
} = props;
|
|
27313
27454
|
const tid = useTestIds(otherProps, "header");
|
|
27314
|
-
return /* @__PURE__ */ (0,
|
|
27455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)("div", { ...(0, import_runtime139.trussProps)(pageContentPaddingX), children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
27315
27456
|
}
|
|
27316
27457
|
|
|
27317
27458
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
@@ -27321,7 +27462,7 @@ function useBannerAndNavbarHeight() {
|
|
|
27321
27462
|
|
|
27322
27463
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
27323
27464
|
var import_runtime140 = require("@homebound/truss/runtime");
|
|
27324
|
-
var
|
|
27465
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
27325
27466
|
var __maybeInc29 = (inc) => {
|
|
27326
27467
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27327
27468
|
};
|
|
@@ -27332,11 +27473,11 @@ function PageHeaderLayout(props) {
|
|
|
27332
27473
|
} = props;
|
|
27333
27474
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
27334
27475
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
27335
|
-
const bannerAndNavbarHeightRef = (0,
|
|
27476
|
+
const bannerAndNavbarHeightRef = (0, import_react157.useRef)(bannerAndNavbarHeight);
|
|
27336
27477
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
27337
|
-
const getBannerAndNavbarHeight = (0,
|
|
27338
|
-
const headerMetricsRef = (0,
|
|
27339
|
-
const spacerRef = (0,
|
|
27478
|
+
const getBannerAndNavbarHeight = (0, import_react157.useCallback)(() => bannerAndNavbarHeightRef.current, []);
|
|
27479
|
+
const headerMetricsRef = (0, import_react157.useRef)(null);
|
|
27480
|
+
const spacerRef = (0, import_react157.useRef)(null);
|
|
27340
27481
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
27341
27482
|
const {
|
|
27342
27483
|
state: autoHideState,
|
|
@@ -27376,43 +27517,43 @@ function PageHeaderLayout(props) {
|
|
|
27376
27517
|
const innerStyle = autoHideState !== "static" ? {
|
|
27377
27518
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
27378
27519
|
} : void 0;
|
|
27379
|
-
const pageHeaderEl = (0,
|
|
27380
|
-
return /* @__PURE__ */ (0,
|
|
27520
|
+
const pageHeaderEl = (0, import_react157.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
27521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("div", { ...(0, import_runtime140.mergeProps)(void 0, cssVars, {
|
|
27381
27522
|
display: "df",
|
|
27382
27523
|
flexDirection: "fdc",
|
|
27383
27524
|
width: "w100"
|
|
27384
27525
|
}), ...tid, children: [
|
|
27385
|
-
/* @__PURE__ */ (0,
|
|
27526
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { ref: spacerRef, ...(0, import_runtime140.mergeProps)(void 0, {
|
|
27386
27527
|
height: headerHeight
|
|
27387
27528
|
}, {
|
|
27388
27529
|
flexShrink: "fs0",
|
|
27389
27530
|
width: "w100"
|
|
27390
|
-
}), children: /* @__PURE__ */ (0,
|
|
27391
|
-
/* @__PURE__ */ (0,
|
|
27531
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime140.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
27532
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
27392
27533
|
] }) });
|
|
27393
27534
|
}
|
|
27394
27535
|
|
|
27395
27536
|
// src/layouts/WorkflowLayout/WorkflowLayout.tsx
|
|
27396
|
-
var
|
|
27537
|
+
var import_react159 = require("react");
|
|
27397
27538
|
|
|
27398
27539
|
// src/components/Headers/WorkflowHeader.tsx
|
|
27399
|
-
var
|
|
27540
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
27400
27541
|
function WorkflowHeader(props) {
|
|
27401
27542
|
const { stepperTabs, ...otherProps } = props;
|
|
27402
27543
|
const tid = useTestIds(otherProps, "header");
|
|
27403
|
-
return /* @__PURE__ */ (0,
|
|
27544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(BaseHeader, { ...otherProps, bottomSlot: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(StepperTabs, { ...stepperTabs, ...tid.stepperTabs }) });
|
|
27404
27545
|
}
|
|
27405
27546
|
|
|
27406
27547
|
// src/layouts/WorkflowLayout/useUnsavedChangesGuard.tsx
|
|
27407
|
-
var
|
|
27548
|
+
var import_react158 = require("react");
|
|
27408
27549
|
var import_react_router_dom9 = require("react-router-dom");
|
|
27409
|
-
var
|
|
27550
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
27410
27551
|
function useUnsavedChangesGuard(options) {
|
|
27411
27552
|
const { isDirty, onCancel } = options;
|
|
27412
27553
|
const { openModal } = useModal();
|
|
27413
|
-
const isDirtyRef = (0,
|
|
27554
|
+
const isDirtyRef = (0, import_react158.useRef)(isDirty);
|
|
27414
27555
|
isDirtyRef.current = isDirty;
|
|
27415
|
-
(0,
|
|
27556
|
+
(0, import_react158.useEffect)(() => {
|
|
27416
27557
|
const onBeforeUnload = (e) => {
|
|
27417
27558
|
if (isDirtyRef.current?.()) {
|
|
27418
27559
|
e.preventDefault();
|
|
@@ -27429,7 +27570,7 @@ function useUnsavedChangesGuard(options) {
|
|
|
27429
27570
|
}
|
|
27430
27571
|
openModal({
|
|
27431
27572
|
allowClosing: false,
|
|
27432
|
-
content: /* @__PURE__ */ (0,
|
|
27573
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(ConfirmCloseModal, { onClose: () => onCancel(e) })
|
|
27433
27574
|
});
|
|
27434
27575
|
};
|
|
27435
27576
|
const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
|
|
@@ -27438,10 +27579,10 @@ function useUnsavedChangesGuard(options) {
|
|
|
27438
27579
|
function UnsavedChangesNavigationModal(props) {
|
|
27439
27580
|
const { proceed, cancelNavigation } = props;
|
|
27440
27581
|
const { openModal, closeModal } = useModal();
|
|
27441
|
-
(0,
|
|
27582
|
+
(0, import_react158.useEffect)(() => {
|
|
27442
27583
|
openModal({
|
|
27443
27584
|
allowClosing: false,
|
|
27444
|
-
content: /* @__PURE__ */ (0,
|
|
27585
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
|
|
27445
27586
|
});
|
|
27446
27587
|
return () => closeModal();
|
|
27447
27588
|
}, []);
|
|
@@ -27449,7 +27590,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
27449
27590
|
}
|
|
27450
27591
|
|
|
27451
27592
|
// src/layouts/WorkflowLayout/WorkflowActions.tsx
|
|
27452
|
-
var
|
|
27593
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
27453
27594
|
function WorkflowActions(props) {
|
|
27454
27595
|
const {
|
|
27455
27596
|
isFirstStep,
|
|
@@ -27463,19 +27604,19 @@ function WorkflowActions(props) {
|
|
|
27463
27604
|
onContinue,
|
|
27464
27605
|
primaryDisabled
|
|
27465
27606
|
} = props;
|
|
27466
|
-
return /* @__PURE__ */ (0,
|
|
27467
|
-
/* @__PURE__ */ (0,
|
|
27468
|
-
/* @__PURE__ */ (0,
|
|
27469
|
-
/* @__PURE__ */ (0,
|
|
27470
|
-
onSaveAndExit && /* @__PURE__ */ (0,
|
|
27471
|
-
isLastStep ? /* @__PURE__ */ (0,
|
|
27607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
|
|
27608
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { className: "df aic", children: !isFirstStep && isMobile && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
|
|
27609
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { className: "df aic gap1", children: [
|
|
27610
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
27611
|
+
onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
27612
|
+
isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Button, { label: completeLabel, variant: "primary", onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Button, { label: "Continue", variant: "primary", onClick: onContinue, disabled: primaryDisabled })
|
|
27472
27613
|
] })
|
|
27473
27614
|
] });
|
|
27474
27615
|
}
|
|
27475
27616
|
|
|
27476
27617
|
// src/layouts/WorkflowLayout/WorkflowLayout.tsx
|
|
27477
27618
|
var import_runtime141 = require("@homebound/truss/runtime");
|
|
27478
|
-
var
|
|
27619
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
27479
27620
|
var __maybeInc30 = (inc) => {
|
|
27480
27621
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27481
27622
|
};
|
|
@@ -27494,7 +27635,7 @@ function WorkflowLayout(props) {
|
|
|
27494
27635
|
...step,
|
|
27495
27636
|
value: defaultTestId(step.label)
|
|
27496
27637
|
}));
|
|
27497
|
-
const [currentStep, setCurrentStep] = (0,
|
|
27638
|
+
const [currentStep, setCurrentStep] = (0, import_react159.useState)(() => getInitialStep(stepTabs, defaultStep));
|
|
27498
27639
|
const tid = useTestIds(props, "workflowLayout");
|
|
27499
27640
|
const {
|
|
27500
27641
|
sm: isMobile
|
|
@@ -27506,7 +27647,7 @@ function WorkflowLayout(props) {
|
|
|
27506
27647
|
isDirty,
|
|
27507
27648
|
onCancel
|
|
27508
27649
|
});
|
|
27509
|
-
const headerMetricsRef = (0,
|
|
27650
|
+
const headerMetricsRef = (0, import_react159.useRef)(null);
|
|
27510
27651
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
27511
27652
|
const headerWidth = documentScrollChromeWidth();
|
|
27512
27653
|
const outerTop = bannerAndNavbarChromeTop();
|
|
@@ -27517,7 +27658,7 @@ function WorkflowLayout(props) {
|
|
|
27517
27658
|
const isFirstStep = currentIndex <= 0;
|
|
27518
27659
|
const isLastStep = currentIndex === stepTabs.length - 1;
|
|
27519
27660
|
const activeStep = stepTabs[currentIndex];
|
|
27520
|
-
const buttons = /* @__PURE__ */ (0,
|
|
27661
|
+
const buttons = /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(stepTabs[currentIndex - 1].value), onCancel: onCancelClick, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !activeStep?.isValid, onContinue: async () => {
|
|
27521
27662
|
const onContinue = activeStep?.onContinue;
|
|
27522
27663
|
if (onContinue) {
|
|
27523
27664
|
const allowed = await onContinue();
|
|
@@ -27526,7 +27667,7 @@ function WorkflowLayout(props) {
|
|
|
27526
27667
|
setCurrentStep(stepTabs[currentIndex + 1].value);
|
|
27527
27668
|
} });
|
|
27528
27669
|
const showFooter = isMobile;
|
|
27529
|
-
(0,
|
|
27670
|
+
(0, import_react159.useLayoutEffect)(() => {
|
|
27530
27671
|
const root = document.documentElement;
|
|
27531
27672
|
const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
|
|
27532
27673
|
root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
|
|
@@ -27538,7 +27679,7 @@ function WorkflowLayout(props) {
|
|
|
27538
27679
|
}
|
|
27539
27680
|
};
|
|
27540
27681
|
}, [showFooter]);
|
|
27541
|
-
const headerEl = /* @__PURE__ */ (0,
|
|
27682
|
+
const headerEl = /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
|
|
27542
27683
|
WorkflowHeader,
|
|
27543
27684
|
{
|
|
27544
27685
|
...headerProps,
|
|
@@ -27551,13 +27692,13 @@ function WorkflowLayout(props) {
|
|
|
27551
27692
|
}
|
|
27552
27693
|
}
|
|
27553
27694
|
);
|
|
27554
|
-
return /* @__PURE__ */ (0,
|
|
27555
|
-
/* @__PURE__ */ (0,
|
|
27695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(DocumentScrollLayoutProvider, { children: [
|
|
27696
|
+
/* @__PURE__ */ (0, import_jsx_runtime225.jsxs)("div", { ...(0, import_runtime141.mergeProps)(void 0, cssVars, {
|
|
27556
27697
|
display: "df",
|
|
27557
27698
|
flexDirection: "fdc",
|
|
27558
27699
|
width: "w100"
|
|
27559
27700
|
}), ...tid, children: [
|
|
27560
|
-
/* @__PURE__ */ (0,
|
|
27701
|
+
/* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime141.trussProps)({
|
|
27561
27702
|
position: "sticky",
|
|
27562
27703
|
left: "left0",
|
|
27563
27704
|
width: ["w_var", {
|
|
@@ -27570,14 +27711,14 @@ function WorkflowLayout(props) {
|
|
|
27570
27711
|
"--top": (0, import_runtime141.maybeCssVar)(__maybeInc30(outerTop))
|
|
27571
27712
|
}]
|
|
27572
27713
|
}), ...tid.header, children: headerEl }),
|
|
27573
|
-
/* @__PURE__ */ (0,
|
|
27574
|
-
showFooter && /* @__PURE__ */ (0,
|
|
27714
|
+
/* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children: activeStep?.content }),
|
|
27715
|
+
showFooter && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ...(0, import_runtime141.trussProps)({
|
|
27575
27716
|
flexShrink: "fs0",
|
|
27576
27717
|
width: "w100",
|
|
27577
27718
|
height: ["h_var", {
|
|
27578
27719
|
"--height": `${mobileFooterHeightPx}px`
|
|
27579
27720
|
}]
|
|
27580
|
-
}), children: /* @__PURE__ */ (0,
|
|
27721
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ...(0, import_runtime141.trussProps)({
|
|
27581
27722
|
...{
|
|
27582
27723
|
position: "fixed",
|
|
27583
27724
|
bottom: "bottom0",
|
|
@@ -27606,7 +27747,7 @@ function WorkflowLayout(props) {
|
|
|
27606
27747
|
...pageContentPaddingX
|
|
27607
27748
|
}), ...tid.footer, children: buttons }) })
|
|
27608
27749
|
] }),
|
|
27609
|
-
navigationBlocker && /* @__PURE__ */ (0,
|
|
27750
|
+
navigationBlocker && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(UnsavedChangesNavigationModal, { ...navigationBlocker })
|
|
27610
27751
|
] });
|
|
27611
27752
|
}
|
|
27612
27753
|
var mobileFooterHeightPx = 80;
|