@homebound/beam 3.82.0 → 3.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +116 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +87 -57
- package/dist/index.js.map +1 -1
- package/dist/truss.css +4 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -77,6 +77,7 @@ __export(index_exports, {
|
|
|
77
77
|
ButtonMenu: () => ButtonMenu,
|
|
78
78
|
ButtonModal: () => ButtonModal,
|
|
79
79
|
Card: () => Card,
|
|
80
|
+
CenteredLayout: () => CenteredLayout,
|
|
80
81
|
Checkbox: () => Checkbox,
|
|
81
82
|
CheckboxGroup: () => CheckboxGroup,
|
|
82
83
|
Chip: () => Chip,
|
|
@@ -27196,9 +27197,34 @@ function SideNavLayoutContent(props) {
|
|
|
27196
27197
|
] }) });
|
|
27197
27198
|
}
|
|
27198
27199
|
|
|
27199
|
-
// src/layouts/
|
|
27200
|
+
// src/layouts/CenteredLayout/CenteredLayout.tsx
|
|
27200
27201
|
var import_runtime137 = require("@homebound/truss/runtime");
|
|
27201
27202
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
27203
|
+
var centeredMaxWidthPx = {
|
|
27204
|
+
sm: 768,
|
|
27205
|
+
lg: 1440
|
|
27206
|
+
};
|
|
27207
|
+
function CenteredLayout(props) {
|
|
27208
|
+
const {
|
|
27209
|
+
size,
|
|
27210
|
+
children
|
|
27211
|
+
} = props;
|
|
27212
|
+
const tid = useTestIds(props, "centeredLayout");
|
|
27213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ...(0, import_runtime137.trussProps)({
|
|
27214
|
+
width: "w100",
|
|
27215
|
+
maxWidth: ["maxw_var", {
|
|
27216
|
+
"--maxWidth": `${centeredMaxWidthPx[size]}px`
|
|
27217
|
+
}],
|
|
27218
|
+
marginLeft: "mla",
|
|
27219
|
+
marginRight: "mra",
|
|
27220
|
+
paddingLeft: "pl_12px mdandup_pl3",
|
|
27221
|
+
paddingRight: "pr_12px mdandup_pr3"
|
|
27222
|
+
}), ...tid, children });
|
|
27223
|
+
}
|
|
27224
|
+
|
|
27225
|
+
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
27226
|
+
var import_runtime138 = require("@homebound/truss/runtime");
|
|
27227
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
27202
27228
|
var __maybeInc27 = (inc) => {
|
|
27203
27229
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27204
27230
|
};
|
|
@@ -27214,52 +27240,56 @@ function EnvironmentBannerLayout(props) {
|
|
|
27214
27240
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
27215
27241
|
};
|
|
27216
27242
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
27217
|
-
return /* @__PURE__ */ (0,
|
|
27243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...(0, import_runtime138.mergeProps)(void 0, style, {
|
|
27218
27244
|
display: "df",
|
|
27219
27245
|
flexDirection: "fdc",
|
|
27220
27246
|
width: "wfc",
|
|
27221
27247
|
minWidth: "mw100"
|
|
27222
27248
|
}), ...tid, children: [
|
|
27223
|
-
showBanner && environmentBanner && /* @__PURE__ */ (0,
|
|
27249
|
+
showBanner && environmentBanner && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ...(0, import_runtime138.mergeProps)(void 0, {
|
|
27224
27250
|
height: environmentBannerSizePx
|
|
27225
27251
|
}, {
|
|
27226
27252
|
flexShrink: "fs0",
|
|
27227
27253
|
width: "w100"
|
|
27228
|
-
}), children: /* @__PURE__ */ (0,
|
|
27254
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ...(0, import_runtime138.trussProps)({
|
|
27229
27255
|
position: "fixed",
|
|
27230
27256
|
top: "top0",
|
|
27231
27257
|
left: "left0",
|
|
27232
27258
|
zIndex: ["z_var", {
|
|
27233
|
-
"--zIndex": (0,
|
|
27259
|
+
"--zIndex": (0, import_runtime138.maybeCssVar)(zIndices.environmentBanner)
|
|
27234
27260
|
}],
|
|
27235
27261
|
width: ["w_var", {
|
|
27236
|
-
"--width": (0,
|
|
27262
|
+
"--width": (0, import_runtime138.maybeCssVar)(__maybeInc27(innerWidth))
|
|
27237
27263
|
}]
|
|
27238
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0,
|
|
27264
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
27239
27265
|
children
|
|
27240
27266
|
] }) }) });
|
|
27241
27267
|
}
|
|
27242
27268
|
|
|
27243
27269
|
// src/layouts/FormSectionLayout/FormSectionLayout.tsx
|
|
27244
|
-
var
|
|
27245
|
-
var
|
|
27270
|
+
var import_runtime139 = require("@homebound/truss/runtime");
|
|
27271
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
27246
27272
|
function FormSectionLayout(props) {
|
|
27247
27273
|
const {
|
|
27248
27274
|
title,
|
|
27249
27275
|
description,
|
|
27250
27276
|
actions,
|
|
27277
|
+
withAutoSave,
|
|
27251
27278
|
initialFields,
|
|
27252
27279
|
sections
|
|
27253
27280
|
} = props;
|
|
27254
27281
|
const tid = useTestIds(props, "formSectionLayout");
|
|
27255
|
-
return /* @__PURE__ */ (0,
|
|
27256
|
-
/* @__PURE__ */ (0,
|
|
27257
|
-
/* @__PURE__ */ (0,
|
|
27258
|
-
/* @__PURE__ */ (0,
|
|
27259
|
-
/* @__PURE__ */ (0,
|
|
27260
|
-
actions && /* @__PURE__ */ (0,
|
|
27282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(CenteredLayout, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "df fdc gap8 pt4", ...tid, children: [
|
|
27283
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "df fdc gap3", children: [
|
|
27284
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "df fdc jcsb gap_12px", children: [
|
|
27285
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "df jcsb aic", children: [
|
|
27286
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)("h1", { className: "fw6 fz_20px lh_28px", ...tid.title, children: title }),
|
|
27287
|
+
(withAutoSave || actions) && /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "df gap1 fs0", ...tid.actions, children: [
|
|
27288
|
+
withAutoSave && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(AutoSaveIndicator, {}),
|
|
27289
|
+
actions?.map((action) => action.kind === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(IconButton, { ...action, variant: "outline" }, action.icon) : /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Button, { ...action }, `${action.label}`))
|
|
27290
|
+
] })
|
|
27261
27291
|
] }),
|
|
27262
|
-
description && /* @__PURE__ */ (0,
|
|
27292
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...(0, import_runtime139.trussProps)({
|
|
27263
27293
|
fontWeight: "fw4",
|
|
27264
27294
|
fontSize: "fz_14px",
|
|
27265
27295
|
lineHeight: "lh_20px",
|
|
@@ -27270,13 +27300,13 @@ function FormSectionLayout(props) {
|
|
|
27270
27300
|
] }),
|
|
27271
27301
|
initialFields
|
|
27272
27302
|
] }),
|
|
27273
|
-
sections && /* @__PURE__ */ (0,
|
|
27274
|
-
] });
|
|
27303
|
+
sections && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
27304
|
+
] }) });
|
|
27275
27305
|
}
|
|
27276
27306
|
|
|
27277
27307
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27278
27308
|
var import_react156 = require("react");
|
|
27279
|
-
var
|
|
27309
|
+
var import_runtime140 = require("@homebound/truss/runtime");
|
|
27280
27310
|
|
|
27281
27311
|
// src/layouts/useAutoHideOnScroll.ts
|
|
27282
27312
|
var import_react153 = require("react");
|
|
@@ -27369,7 +27399,7 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
27369
27399
|
}
|
|
27370
27400
|
|
|
27371
27401
|
// src/layouts/useMeasuredHeight.ts
|
|
27372
|
-
var
|
|
27402
|
+
var import_utils182 = require("@react-aria/utils");
|
|
27373
27403
|
var import_react154 = require("react");
|
|
27374
27404
|
function useMeasuredHeight(ref, enabled) {
|
|
27375
27405
|
const [height, setHeight] = (0, import_react154.useState)(0);
|
|
@@ -27378,7 +27408,7 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
27378
27408
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
27379
27409
|
setHeight((prev) => prev === next ? prev : next);
|
|
27380
27410
|
}, [ref]);
|
|
27381
|
-
(0,
|
|
27411
|
+
(0, import_utils182.useResizeObserver)({ ref, onResize: syncElementHeight });
|
|
27382
27412
|
(0, import_react154.useLayoutEffect)(() => {
|
|
27383
27413
|
syncElementHeight();
|
|
27384
27414
|
}, [enabled, syncElementHeight]);
|
|
@@ -27387,17 +27417,17 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
27387
27417
|
|
|
27388
27418
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
27389
27419
|
var import_react155 = require("react");
|
|
27390
|
-
var
|
|
27420
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
27391
27421
|
var NavbarLayoutHeightContext = (0, import_react155.createContext)(0);
|
|
27392
27422
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
27393
|
-
return /* @__PURE__ */ (0,
|
|
27423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(NavbarLayoutHeightContext.Provider, { value, children });
|
|
27394
27424
|
}
|
|
27395
27425
|
function useNavbarLayoutHeight() {
|
|
27396
27426
|
return (0, import_react155.useContext)(NavbarLayoutHeightContext);
|
|
27397
27427
|
}
|
|
27398
27428
|
|
|
27399
27429
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27400
|
-
var
|
|
27430
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
27401
27431
|
var __maybeInc28 = (inc) => {
|
|
27402
27432
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27403
27433
|
};
|
|
@@ -27426,10 +27456,10 @@ function NavbarLayout(props) {
|
|
|
27426
27456
|
position: "sticky",
|
|
27427
27457
|
left: "left0",
|
|
27428
27458
|
zIndex: ["z_var", {
|
|
27429
|
-
"--zIndex": (0,
|
|
27459
|
+
"--zIndex": (0, import_runtime140.maybeCssVar)(zIndices.navbar)
|
|
27430
27460
|
}],
|
|
27431
27461
|
width: ["w_var", {
|
|
27432
|
-
"--width": (0,
|
|
27462
|
+
"--width": (0, import_runtime140.maybeCssVar)(__maybeInc28(innerWidth))
|
|
27433
27463
|
}]
|
|
27434
27464
|
}
|
|
27435
27465
|
) : (
|
|
@@ -27438,10 +27468,10 @@ function NavbarLayout(props) {
|
|
|
27438
27468
|
position: "fixed",
|
|
27439
27469
|
left: "left0",
|
|
27440
27470
|
zIndex: ["z_var", {
|
|
27441
|
-
"--zIndex": (0,
|
|
27471
|
+
"--zIndex": (0, import_runtime140.maybeCssVar)(zIndices.navbar)
|
|
27442
27472
|
}],
|
|
27443
27473
|
width: ["w_var", {
|
|
27444
|
-
"--width": (0,
|
|
27474
|
+
"--width": (0, import_runtime140.maybeCssVar)(__maybeInc28(innerWidth))
|
|
27445
27475
|
}],
|
|
27446
27476
|
transition: "transitionTop"
|
|
27447
27477
|
}
|
|
@@ -27450,20 +27480,20 @@ function NavbarLayout(props) {
|
|
|
27450
27480
|
const innerStyle = autoHideState !== "static" ? {
|
|
27451
27481
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
27452
27482
|
} : void 0;
|
|
27453
|
-
const navbarEl = (0, import_react156.useMemo)(() => /* @__PURE__ */ (0,
|
|
27454
|
-
return /* @__PURE__ */ (0,
|
|
27483
|
+
const navbarEl = (0, import_react156.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(Navbar, { ...navbar }), [navbar]);
|
|
27484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(MobileSubNavProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("div", { ...(0, import_runtime140.mergeProps)(void 0, cssVars, {
|
|
27455
27485
|
display: "df",
|
|
27456
27486
|
flexDirection: "fdc",
|
|
27457
27487
|
width: "wfc",
|
|
27458
27488
|
minWidth: "mw100"
|
|
27459
27489
|
}), ...tid, children: [
|
|
27460
|
-
/* @__PURE__ */ (0,
|
|
27490
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { ref: spacerRef, ...(0, import_runtime140.mergeProps)(void 0, {
|
|
27461
27491
|
height: navHeight
|
|
27462
27492
|
}, {
|
|
27463
27493
|
flexShrink: "fs0",
|
|
27464
27494
|
width: "w100"
|
|
27465
|
-
}), children: /* @__PURE__ */ (0,
|
|
27466
|
-
/* @__PURE__ */ (0,
|
|
27495
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime140.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
27496
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
27467
27497
|
] }) }) }) });
|
|
27468
27498
|
}
|
|
27469
27499
|
|
|
@@ -27471,8 +27501,8 @@ function NavbarLayout(props) {
|
|
|
27471
27501
|
var import_react157 = require("react");
|
|
27472
27502
|
|
|
27473
27503
|
// src/components/Headers/BaseHeader.tsx
|
|
27474
|
-
var
|
|
27475
|
-
var
|
|
27504
|
+
var import_runtime141 = require("@homebound/truss/runtime");
|
|
27505
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
27476
27506
|
function BaseHeader(props) {
|
|
27477
27507
|
const {
|
|
27478
27508
|
title,
|
|
@@ -27484,7 +27514,7 @@ function BaseHeader(props) {
|
|
|
27484
27514
|
} = props;
|
|
27485
27515
|
const tid = useTestIds(otherProps, "header");
|
|
27486
27516
|
useDocumentTitle(title, documentTitleSuffix);
|
|
27487
|
-
return /* @__PURE__ */ (0,
|
|
27517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("header", { ...tid, ...(0, import_runtime141.trussProps)({
|
|
27488
27518
|
display: "df",
|
|
27489
27519
|
flexDirection: "fdc",
|
|
27490
27520
|
paddingTop: "pt3",
|
|
@@ -27498,7 +27528,7 @@ function BaseHeader(props) {
|
|
|
27498
27528
|
"--backgroundColor": "var(--b-surface)"
|
|
27499
27529
|
}]
|
|
27500
27530
|
}), children: [
|
|
27501
|
-
/* @__PURE__ */ (0,
|
|
27531
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { ...(0, import_runtime141.trussProps)({
|
|
27502
27532
|
...{
|
|
27503
27533
|
display: "df",
|
|
27504
27534
|
justifyContent: "jcsb",
|
|
@@ -27512,9 +27542,9 @@ function BaseHeader(props) {
|
|
|
27512
27542
|
} : {}
|
|
27513
27543
|
}
|
|
27514
27544
|
}), children: [
|
|
27515
|
-
/* @__PURE__ */ (0,
|
|
27516
|
-
breadcrumbs && /* @__PURE__ */ (0,
|
|
27517
|
-
/* @__PURE__ */ (0,
|
|
27545
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { className: "mw0", children: [
|
|
27546
|
+
breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Breadcrumbs, { ...breadcrumbs }),
|
|
27547
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("h1", { ...tid.title, ...(0, import_runtime141.trussProps)({
|
|
27518
27548
|
fontWeight: "fw6",
|
|
27519
27549
|
fontSize: "fz_20px",
|
|
27520
27550
|
lineHeight: "lh_28px",
|
|
@@ -27523,22 +27553,22 @@ function BaseHeader(props) {
|
|
|
27523
27553
|
}]
|
|
27524
27554
|
}), children: title })
|
|
27525
27555
|
] }),
|
|
27526
|
-
/* @__PURE__ */ (0,
|
|
27556
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("div", { className: "fs0", children: rightSlot })
|
|
27527
27557
|
] }),
|
|
27528
27558
|
bottomSlot
|
|
27529
27559
|
] });
|
|
27530
27560
|
}
|
|
27531
27561
|
|
|
27532
27562
|
// src/components/Headers/PageHeader.tsx
|
|
27533
|
-
var
|
|
27534
|
-
var
|
|
27563
|
+
var import_runtime142 = require("@homebound/truss/runtime");
|
|
27564
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
27535
27565
|
function PageHeader2(props) {
|
|
27536
27566
|
const {
|
|
27537
27567
|
tabs,
|
|
27538
27568
|
...otherProps
|
|
27539
27569
|
} = props;
|
|
27540
27570
|
const tid = useTestIds(otherProps, "header");
|
|
27541
|
-
return /* @__PURE__ */ (0,
|
|
27571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("div", { ...(0, import_runtime142.trussProps)(pageContentPaddingX), children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
27542
27572
|
}
|
|
27543
27573
|
|
|
27544
27574
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
@@ -27547,8 +27577,8 @@ function useBannerAndNavbarHeight() {
|
|
|
27547
27577
|
}
|
|
27548
27578
|
|
|
27549
27579
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
27550
|
-
var
|
|
27551
|
-
var
|
|
27580
|
+
var import_runtime143 = require("@homebound/truss/runtime");
|
|
27581
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
27552
27582
|
var __maybeInc29 = (inc) => {
|
|
27553
27583
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27554
27584
|
};
|
|
@@ -27579,43 +27609,43 @@ function PageHeaderLayout(props) {
|
|
|
27579
27609
|
const innerCss = autoHideState === "static" ? {
|
|
27580
27610
|
position: "sticky",
|
|
27581
27611
|
left: ["left_var", {
|
|
27582
|
-
"--left": (0,
|
|
27612
|
+
"--left": (0, import_runtime143.maybeCssVar)(__maybeInc29(headerLeft))
|
|
27583
27613
|
}],
|
|
27584
27614
|
width: ["w_var", {
|
|
27585
|
-
"--width": (0,
|
|
27615
|
+
"--width": (0, import_runtime143.maybeCssVar)(__maybeInc29(headerWidth))
|
|
27586
27616
|
}],
|
|
27587
27617
|
zIndex: ["z_var", {
|
|
27588
|
-
"--zIndex": (0,
|
|
27618
|
+
"--zIndex": (0, import_runtime143.maybeCssVar)(zIndices.pageStickyHeader)
|
|
27589
27619
|
}]
|
|
27590
27620
|
} : {
|
|
27591
27621
|
position: "fixed",
|
|
27592
27622
|
left: ["left_var", {
|
|
27593
|
-
"--left": (0,
|
|
27623
|
+
"--left": (0, import_runtime143.maybeCssVar)(__maybeInc29(headerLeft))
|
|
27594
27624
|
}],
|
|
27595
27625
|
width: ["w_var", {
|
|
27596
|
-
"--width": (0,
|
|
27626
|
+
"--width": (0, import_runtime143.maybeCssVar)(__maybeInc29(headerWidth))
|
|
27597
27627
|
}],
|
|
27598
27628
|
zIndex: ["z_var", {
|
|
27599
|
-
"--zIndex": (0,
|
|
27629
|
+
"--zIndex": (0, import_runtime143.maybeCssVar)(zIndices.pageStickyHeader)
|
|
27600
27630
|
}],
|
|
27601
27631
|
transition: "transitionTop"
|
|
27602
27632
|
};
|
|
27603
27633
|
const innerStyle = autoHideState !== "static" ? {
|
|
27604
27634
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
27605
27635
|
} : void 0;
|
|
27606
|
-
const pageHeaderEl = (0, import_react157.useMemo)(() => /* @__PURE__ */ (0,
|
|
27607
|
-
return /* @__PURE__ */ (0,
|
|
27636
|
+
const pageHeaderEl = (0, import_react157.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
27637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { ...(0, import_runtime143.mergeProps)(void 0, cssVars, {
|
|
27608
27638
|
display: "df",
|
|
27609
27639
|
flexDirection: "fdc",
|
|
27610
27640
|
width: "w100"
|
|
27611
27641
|
}), ...tid, children: [
|
|
27612
|
-
/* @__PURE__ */ (0,
|
|
27642
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { ref: spacerRef, ...(0, import_runtime143.mergeProps)(void 0, {
|
|
27613
27643
|
height: headerHeight
|
|
27614
27644
|
}, {
|
|
27615
27645
|
flexShrink: "fs0",
|
|
27616
27646
|
width: "w100"
|
|
27617
|
-
}), children: /* @__PURE__ */ (0,
|
|
27618
|
-
/* @__PURE__ */ (0,
|
|
27647
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime143.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
27648
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
27619
27649
|
] }) });
|
|
27620
27650
|
}
|
|
27621
27651
|
|
|
@@ -27623,17 +27653,17 @@ function PageHeaderLayout(props) {
|
|
|
27623
27653
|
var import_react159 = require("react");
|
|
27624
27654
|
|
|
27625
27655
|
// src/components/Headers/WorkflowHeader.tsx
|
|
27626
|
-
var
|
|
27656
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
27627
27657
|
function WorkflowHeader(props) {
|
|
27628
27658
|
const { stepperTabs, ...otherProps } = props;
|
|
27629
27659
|
const tid = useTestIds(otherProps, "header");
|
|
27630
|
-
return /* @__PURE__ */ (0,
|
|
27660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(BaseHeader, { ...otherProps, bottomSlot: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(StepperTabs, { ...stepperTabs, ...tid.stepperTabs }) });
|
|
27631
27661
|
}
|
|
27632
27662
|
|
|
27633
27663
|
// src/layouts/WorkflowLayout/useUnsavedChangesGuard.tsx
|
|
27634
27664
|
var import_react158 = require("react");
|
|
27635
27665
|
var import_react_router_dom9 = require("react-router-dom");
|
|
27636
|
-
var
|
|
27666
|
+
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
27637
27667
|
function useUnsavedChangesGuard(options) {
|
|
27638
27668
|
const { isDirty, onCancel } = options;
|
|
27639
27669
|
const { openModal } = useModal();
|
|
@@ -27656,7 +27686,7 @@ function useUnsavedChangesGuard(options) {
|
|
|
27656
27686
|
}
|
|
27657
27687
|
openModal({
|
|
27658
27688
|
allowClosing: false,
|
|
27659
|
-
content: /* @__PURE__ */ (0,
|
|
27689
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(ConfirmCloseModal, { onClose: () => onCancel(e) })
|
|
27660
27690
|
});
|
|
27661
27691
|
};
|
|
27662
27692
|
const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
|
|
@@ -27668,7 +27698,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
27668
27698
|
(0, import_react158.useEffect)(() => {
|
|
27669
27699
|
openModal({
|
|
27670
27700
|
allowClosing: false,
|
|
27671
|
-
content: /* @__PURE__ */ (0,
|
|
27701
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
|
|
27672
27702
|
});
|
|
27673
27703
|
return () => closeModal();
|
|
27674
27704
|
}, []);
|
|
@@ -27676,7 +27706,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
27676
27706
|
}
|
|
27677
27707
|
|
|
27678
27708
|
// src/layouts/WorkflowLayout/WorkflowActions.tsx
|
|
27679
|
-
var
|
|
27709
|
+
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
27680
27710
|
function WorkflowActions(props) {
|
|
27681
27711
|
const {
|
|
27682
27712
|
isFirstStep,
|
|
@@ -27690,19 +27720,19 @@ function WorkflowActions(props) {
|
|
|
27690
27720
|
onContinue,
|
|
27691
27721
|
primaryDisabled
|
|
27692
27722
|
} = props;
|
|
27693
|
-
return /* @__PURE__ */ (0,
|
|
27694
|
-
/* @__PURE__ */ (0,
|
|
27695
|
-
/* @__PURE__ */ (0,
|
|
27696
|
-
/* @__PURE__ */ (0,
|
|
27697
|
-
onSaveAndExit && /* @__PURE__ */ (0,
|
|
27698
|
-
isLastStep ? /* @__PURE__ */ (0,
|
|
27723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
|
|
27724
|
+
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { className: "df aic", children: !isFirstStep && isMobile && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
|
|
27725
|
+
/* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: "df aic gap1", children: [
|
|
27726
|
+
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
27727
|
+
onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
27728
|
+
isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Button, { label: completeLabel, variant: "primary", onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Button, { label: "Continue", variant: "primary", onClick: onContinue, disabled: primaryDisabled })
|
|
27699
27729
|
] })
|
|
27700
27730
|
] });
|
|
27701
27731
|
}
|
|
27702
27732
|
|
|
27703
27733
|
// src/layouts/WorkflowLayout/WorkflowLayout.tsx
|
|
27704
|
-
var
|
|
27705
|
-
var
|
|
27734
|
+
var import_runtime144 = require("@homebound/truss/runtime");
|
|
27735
|
+
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
27706
27736
|
var __maybeInc30 = (inc) => {
|
|
27707
27737
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27708
27738
|
};
|
|
@@ -27744,7 +27774,7 @@ function WorkflowLayout(props) {
|
|
|
27744
27774
|
const isFirstStep = currentIndex <= 0;
|
|
27745
27775
|
const isLastStep = currentIndex === stepTabs.length - 1;
|
|
27746
27776
|
const activeStep = stepTabs[currentIndex];
|
|
27747
|
-
const buttons = /* @__PURE__ */ (0,
|
|
27777
|
+
const buttons = /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(stepTabs[currentIndex - 1].value), onCancel: onCancelClick, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !activeStep?.isValid, onContinue: async () => {
|
|
27748
27778
|
const onContinue = activeStep?.onContinue;
|
|
27749
27779
|
if (onContinue) {
|
|
27750
27780
|
const allowed = await onContinue();
|
|
@@ -27765,7 +27795,7 @@ function WorkflowLayout(props) {
|
|
|
27765
27795
|
}
|
|
27766
27796
|
};
|
|
27767
27797
|
}, [showFooter]);
|
|
27768
|
-
const headerEl = /* @__PURE__ */ (0,
|
|
27798
|
+
const headerEl = /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
27769
27799
|
WorkflowHeader,
|
|
27770
27800
|
{
|
|
27771
27801
|
...headerProps,
|
|
@@ -27778,44 +27808,44 @@ function WorkflowLayout(props) {
|
|
|
27778
27808
|
}
|
|
27779
27809
|
}
|
|
27780
27810
|
);
|
|
27781
|
-
return /* @__PURE__ */ (0,
|
|
27782
|
-
/* @__PURE__ */ (0,
|
|
27811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(DocumentScrollLayoutProvider, { children: [
|
|
27812
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("div", { ...(0, import_runtime144.mergeProps)(void 0, cssVars, {
|
|
27783
27813
|
display: "df",
|
|
27784
27814
|
flexDirection: "fdc",
|
|
27785
27815
|
width: "w100"
|
|
27786
27816
|
}), ...tid, children: [
|
|
27787
|
-
/* @__PURE__ */ (0,
|
|
27817
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime144.trussProps)({
|
|
27788
27818
|
position: "sticky",
|
|
27789
27819
|
left: "left0",
|
|
27790
27820
|
width: ["w_var", {
|
|
27791
|
-
"--width": (0,
|
|
27821
|
+
"--width": (0, import_runtime144.maybeCssVar)(__maybeInc30(headerWidth))
|
|
27792
27822
|
}],
|
|
27793
27823
|
zIndex: ["z_var", {
|
|
27794
|
-
"--zIndex": (0,
|
|
27824
|
+
"--zIndex": (0, import_runtime144.maybeCssVar)(zIndices.pageStickyHeader)
|
|
27795
27825
|
}],
|
|
27796
27826
|
top: ["top_var", {
|
|
27797
|
-
"--top": (0,
|
|
27827
|
+
"--top": (0, import_runtime144.maybeCssVar)(__maybeInc30(outerTop))
|
|
27798
27828
|
}]
|
|
27799
27829
|
}), ...tid.header, children: headerEl }),
|
|
27800
|
-
/* @__PURE__ */ (0,
|
|
27801
|
-
showFooter && /* @__PURE__ */ (0,
|
|
27830
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children: activeStep?.content }),
|
|
27831
|
+
showFooter && /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("div", { ...(0, import_runtime144.trussProps)({
|
|
27802
27832
|
flexShrink: "fs0",
|
|
27803
27833
|
width: "w100",
|
|
27804
27834
|
height: ["h_var", {
|
|
27805
27835
|
"--height": `${mobileFooterHeightPx}px`
|
|
27806
27836
|
}]
|
|
27807
|
-
}), children: /* @__PURE__ */ (0,
|
|
27837
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("div", { ...(0, import_runtime144.trussProps)({
|
|
27808
27838
|
...{
|
|
27809
27839
|
position: "fixed",
|
|
27810
27840
|
bottom: "bottom0",
|
|
27811
27841
|
width: ["w_var", {
|
|
27812
|
-
"--width": (0,
|
|
27842
|
+
"--width": (0, import_runtime144.maybeCssVar)(__maybeInc30(headerWidth))
|
|
27813
27843
|
}],
|
|
27814
27844
|
height: ["h_var", {
|
|
27815
27845
|
"--height": `${mobileFooterHeightPx}px`
|
|
27816
27846
|
}],
|
|
27817
27847
|
zIndex: ["z_var", {
|
|
27818
|
-
"--zIndex": (0,
|
|
27848
|
+
"--zIndex": (0, import_runtime144.maybeCssVar)(zIndices.pageStickyFooter)
|
|
27819
27849
|
}],
|
|
27820
27850
|
display: "df",
|
|
27821
27851
|
alignItems: "aic",
|
|
@@ -27833,7 +27863,7 @@ function WorkflowLayout(props) {
|
|
|
27833
27863
|
...pageContentPaddingX
|
|
27834
27864
|
}), ...tid.footer, children: buttons }) })
|
|
27835
27865
|
] }),
|
|
27836
|
-
navigationBlocker && /* @__PURE__ */ (0,
|
|
27866
|
+
navigationBlocker && /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(UnsavedChangesNavigationModal, { ...navigationBlocker })
|
|
27837
27867
|
] });
|
|
27838
27868
|
}
|
|
27839
27869
|
var mobileFooterHeightPx = 80;
|
|
@@ -27892,6 +27922,7 @@ function getInitialStep(steps, defaultStep) {
|
|
|
27892
27922
|
ButtonMenu,
|
|
27893
27923
|
ButtonModal,
|
|
27894
27924
|
Card,
|
|
27925
|
+
CenteredLayout,
|
|
27895
27926
|
Checkbox,
|
|
27896
27927
|
CheckboxGroup,
|
|
27897
27928
|
Chip,
|