@homebound/beam 3.48.0 → 3.50.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 +409 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +296 -195
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -119,6 +119,7 @@ __export(index_exports, {
|
|
|
119
119
|
Icon: () => Icon,
|
|
120
120
|
IconButton: () => IconButton,
|
|
121
121
|
Icons: () => Icons,
|
|
122
|
+
JumpLink: () => JumpLink,
|
|
122
123
|
KEPT_GROUP: () => KEPT_GROUP,
|
|
123
124
|
Loader: () => Loader,
|
|
124
125
|
LoadingSkeleton: () => LoadingSkeleton,
|
|
@@ -23361,26 +23362,126 @@ function HomeboundLogo(props) {
|
|
|
23361
23362
|
}), children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("path", { d: "M158.1,97.6H0.2L0,39.7L76.8,0l68,38.7l-3.1,5.3l-65-37L6.2,43.4l0.2,48h151.7V97.6z" }) });
|
|
23362
23363
|
}
|
|
23363
23364
|
|
|
23364
|
-
// src/components/
|
|
23365
|
-
var import_utils149 = require("@react-aria/utils");
|
|
23365
|
+
// src/components/JumpLink.tsx
|
|
23366
23366
|
var import_react131 = require("react");
|
|
23367
|
+
var import_react_aria59 = require("react-aria");
|
|
23367
23368
|
var import_runtime103 = require("@homebound/truss/runtime");
|
|
23368
23369
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
23370
|
+
function JumpLink(props) {
|
|
23371
|
+
const {
|
|
23372
|
+
label,
|
|
23373
|
+
active,
|
|
23374
|
+
href,
|
|
23375
|
+
disabled,
|
|
23376
|
+
__storyState,
|
|
23377
|
+
...otherProps
|
|
23378
|
+
} = props;
|
|
23379
|
+
const ref = (0, import_react131.useRef)(null);
|
|
23380
|
+
const {
|
|
23381
|
+
linkProps
|
|
23382
|
+
} = (0, import_react_aria59.useLink)({
|
|
23383
|
+
isDisabled: disabled,
|
|
23384
|
+
onClick: handleClick,
|
|
23385
|
+
href
|
|
23386
|
+
}, ref);
|
|
23387
|
+
const {
|
|
23388
|
+
isFocusVisible: isFocusVisibleFromEvents,
|
|
23389
|
+
focusProps
|
|
23390
|
+
} = (0, import_react_aria59.useFocusRing)();
|
|
23391
|
+
const {
|
|
23392
|
+
hoverProps,
|
|
23393
|
+
isHovered: isHoveredFromEvents
|
|
23394
|
+
} = (0, import_react_aria59.useHover)({
|
|
23395
|
+
isDisabled: disabled
|
|
23396
|
+
});
|
|
23397
|
+
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
23398
|
+
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
23399
|
+
const tid = useTestIds(otherProps, "jumpLink");
|
|
23400
|
+
function handleClick(e) {
|
|
23401
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
|
|
23402
|
+
e.preventDefault();
|
|
23403
|
+
const target = document.getElementById(href.replace(/^#/, ""));
|
|
23404
|
+
if (target) {
|
|
23405
|
+
window.scrollTo({
|
|
23406
|
+
top: target.getBoundingClientRect().top + window.scrollY,
|
|
23407
|
+
behavior: "smooth"
|
|
23408
|
+
});
|
|
23409
|
+
}
|
|
23410
|
+
}
|
|
23411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("a", { ref, ...(0, import_react_aria59.mergeProps)(linkProps, focusProps, hoverProps), ...tid, ...(0, import_runtime103.trussProps)({
|
|
23412
|
+
...jumpLinkStyles.baseStyles,
|
|
23413
|
+
...active && jumpLinkStyles.activeStyles,
|
|
23414
|
+
...isHovered && !disabled && jumpLinkStyles.hoverStyles,
|
|
23415
|
+
...isFocusVisible && jumpLinkStyles.focusStyles,
|
|
23416
|
+
...disabled && jumpLinkStyles.disabledStyles,
|
|
23417
|
+
...disabled && active && jumpLinkStyles.disabledActiveStyles
|
|
23418
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_2", children: label }) });
|
|
23419
|
+
}
|
|
23420
|
+
var jumpLinkStyles = {
|
|
23421
|
+
baseStyles: {
|
|
23422
|
+
width: "w100",
|
|
23423
|
+
fontWeight: "fw4",
|
|
23424
|
+
fontSize: "fz_16px",
|
|
23425
|
+
lineHeight: "lh_24px",
|
|
23426
|
+
paddingLeft: "pl3",
|
|
23427
|
+
paddingRight: "pr3",
|
|
23428
|
+
paddingTop: "pt1",
|
|
23429
|
+
paddingBottom: "pb1",
|
|
23430
|
+
color: ["color_var", {
|
|
23431
|
+
"--color": "var(--b-text-link-default)"
|
|
23432
|
+
}],
|
|
23433
|
+
borderLeftStyle: "bls_solid",
|
|
23434
|
+
borderLeftWidth: "borderLeftWidth_3px",
|
|
23435
|
+
borderColor: "bcTransparent"
|
|
23436
|
+
},
|
|
23437
|
+
activeStyles: {
|
|
23438
|
+
fontWeight: "fw6",
|
|
23439
|
+
fontSize: "fz_16px",
|
|
23440
|
+
lineHeight: "lh_24px",
|
|
23441
|
+
borderColor: "bcBlue600"
|
|
23442
|
+
},
|
|
23443
|
+
hoverStyles: {
|
|
23444
|
+
backgroundColor: ["bgColor_var", {
|
|
23445
|
+
"--backgroundColor": "var(--b-neutral-fill-hover-subtle)"
|
|
23446
|
+
}],
|
|
23447
|
+
color: ["color_var", {
|
|
23448
|
+
"--color": "var(--b-text-link-hover)"
|
|
23449
|
+
}]
|
|
23450
|
+
},
|
|
23451
|
+
focusStyles: {
|
|
23452
|
+
boxShadow: "bshFocus"
|
|
23453
|
+
},
|
|
23454
|
+
disabledStyles: {
|
|
23455
|
+
color: ["color_var", {
|
|
23456
|
+
"--color": "var(--b-text-link-disabled)"
|
|
23457
|
+
}],
|
|
23458
|
+
cursor: "cursorNotAllowed"
|
|
23459
|
+
},
|
|
23460
|
+
disabledActiveStyles: {
|
|
23461
|
+
borderColor: "bcBlue200"
|
|
23462
|
+
}
|
|
23463
|
+
};
|
|
23464
|
+
|
|
23465
|
+
// src/components/MaxLines.tsx
|
|
23466
|
+
var import_utils149 = require("@react-aria/utils");
|
|
23467
|
+
var import_react132 = require("react");
|
|
23468
|
+
var import_runtime104 = require("@homebound/truss/runtime");
|
|
23469
|
+
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
23369
23470
|
function MaxLines({
|
|
23370
23471
|
maxLines,
|
|
23371
23472
|
children
|
|
23372
23473
|
}) {
|
|
23373
|
-
const elRef = (0,
|
|
23374
|
-
const [hasMore, setHasMore] = (0,
|
|
23375
|
-
const [expanded, setExpanded] = (0,
|
|
23474
|
+
const elRef = (0, import_react132.useRef)(null);
|
|
23475
|
+
const [hasMore, setHasMore] = (0, import_react132.useState)(false);
|
|
23476
|
+
const [expanded, setExpanded] = (0, import_react132.useState)(false);
|
|
23376
23477
|
(0, import_utils149.useLayoutEffect)(() => {
|
|
23377
23478
|
if (!elRef.current) return;
|
|
23378
23479
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
23379
23480
|
}, []);
|
|
23380
|
-
(0,
|
|
23481
|
+
(0, import_react132.useEffect)(() => {
|
|
23381
23482
|
setExpanded(false);
|
|
23382
23483
|
}, [children]);
|
|
23383
|
-
const onResize = (0,
|
|
23484
|
+
const onResize = (0, import_react132.useCallback)(() => {
|
|
23384
23485
|
if (!elRef.current) return;
|
|
23385
23486
|
!expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
23386
23487
|
}, [expanded]);
|
|
@@ -23388,11 +23489,11 @@ function MaxLines({
|
|
|
23388
23489
|
ref: elRef,
|
|
23389
23490
|
onResize
|
|
23390
23491
|
});
|
|
23391
|
-
return /* @__PURE__ */ (0,
|
|
23392
|
-
/* @__PURE__ */ (0,
|
|
23492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { children: [
|
|
23493
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { ref: elRef, ...(0, import_runtime104.trussProps)({
|
|
23393
23494
|
...!expanded ? {
|
|
23394
23495
|
WebkitLineClamp: ["lineClamp_var", {
|
|
23395
|
-
"--WebkitLineClamp": (0,
|
|
23496
|
+
"--WebkitLineClamp": (0, import_runtime104.maybeCssVar)(maxLines)
|
|
23396
23497
|
}],
|
|
23397
23498
|
overflow: "oh",
|
|
23398
23499
|
display: "d_negwebkit_box",
|
|
@@ -23400,7 +23501,7 @@ function MaxLines({
|
|
|
23400
23501
|
textOverflow: "to_ellipsis"
|
|
23401
23502
|
} : {}
|
|
23402
23503
|
}), children }),
|
|
23403
|
-
hasMore && /* @__PURE__ */ (0,
|
|
23504
|
+
hasMore && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("button", { className: "db fw4 fz_14px lh_20px", onClick: () => setExpanded((prev) => !prev), children: expanded ? "Show Less" : "Show More" })
|
|
23404
23505
|
] });
|
|
23405
23506
|
}
|
|
23406
23507
|
|
|
@@ -23410,13 +23511,13 @@ var import_change_case8 = require("change-case");
|
|
|
23410
23511
|
// src/components/AppNav/AppNavGroup.tsx
|
|
23411
23512
|
var import_utils151 = require("@react-aria/utils");
|
|
23412
23513
|
var import_change_case7 = require("change-case");
|
|
23413
|
-
var
|
|
23514
|
+
var import_react135 = require("react");
|
|
23414
23515
|
|
|
23415
23516
|
// src/components/AppNav/AppNavGroupTrigger.tsx
|
|
23416
|
-
var
|
|
23417
|
-
var
|
|
23418
|
-
var
|
|
23419
|
-
var
|
|
23517
|
+
var import_react133 = require("react");
|
|
23518
|
+
var import_react_aria60 = require("react-aria");
|
|
23519
|
+
var import_runtime105 = require("@homebound/truss/runtime");
|
|
23520
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
23420
23521
|
function AppNavGroupTrigger(props) {
|
|
23421
23522
|
const {
|
|
23422
23523
|
label,
|
|
@@ -23426,33 +23527,33 @@ function AppNavGroupTrigger(props) {
|
|
|
23426
23527
|
active = false
|
|
23427
23528
|
} = props;
|
|
23428
23529
|
const tid = useTestIds(props, "trigger");
|
|
23429
|
-
const ref = (0,
|
|
23530
|
+
const ref = (0, import_react133.useRef)(null);
|
|
23430
23531
|
const {
|
|
23431
23532
|
buttonProps,
|
|
23432
23533
|
isPressed
|
|
23433
|
-
} = (0,
|
|
23534
|
+
} = (0, import_react_aria60.useButton)({
|
|
23434
23535
|
onPress: onClick,
|
|
23435
23536
|
elementType: "button"
|
|
23436
23537
|
}, ref);
|
|
23437
23538
|
const {
|
|
23438
23539
|
hoverProps,
|
|
23439
23540
|
isHovered
|
|
23440
|
-
} = (0,
|
|
23541
|
+
} = (0, import_react_aria60.useHover)({});
|
|
23441
23542
|
const {
|
|
23442
23543
|
isFocusVisible,
|
|
23443
23544
|
focusProps
|
|
23444
|
-
} = (0,
|
|
23545
|
+
} = (0, import_react_aria60.useFocusRing)();
|
|
23445
23546
|
const {
|
|
23446
23547
|
baseStyles: baseStyles4,
|
|
23447
23548
|
focusRingStyles: focusRingStyles2,
|
|
23448
23549
|
hoverStyles: hoverStyles4,
|
|
23449
23550
|
pressedStyles: pressedStyles2
|
|
23450
|
-
} = (0,
|
|
23451
|
-
return /* @__PURE__ */ (0,
|
|
23551
|
+
} = (0, import_react133.useMemo)(() => getNavLinkStyles("side"), []);
|
|
23552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)("button", { type: "button", ...(0, import_react_aria60.mergeProps)(buttonProps, focusProps, hoverProps, tid.trigger, {
|
|
23452
23553
|
ref,
|
|
23453
23554
|
"aria-expanded": expanded,
|
|
23454
23555
|
"aria-controls": navGroupId,
|
|
23455
|
-
...(0,
|
|
23556
|
+
...(0, import_runtime105.mergeProps)(navLink, void 0, {
|
|
23456
23557
|
...baseStyles4,
|
|
23457
23558
|
...isFocusVisible && focusRingStyles2,
|
|
23458
23559
|
...isHovered && hoverStyles4,
|
|
@@ -23466,7 +23567,7 @@ function AppNavGroupTrigger(props) {
|
|
|
23466
23567
|
})
|
|
23467
23568
|
}), children: [
|
|
23468
23569
|
label,
|
|
23469
|
-
/* @__PURE__ */ (0,
|
|
23570
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)("div", { ...(0, import_runtime105.trussProps)({
|
|
23470
23571
|
...{
|
|
23471
23572
|
display: "df",
|
|
23472
23573
|
alignItems: "aic",
|
|
@@ -23476,7 +23577,7 @@ function AppNavGroupTrigger(props) {
|
|
|
23476
23577
|
...props.expanded ? {
|
|
23477
23578
|
transform: "transform_rotate_180deg"
|
|
23478
23579
|
} : {}
|
|
23479
|
-
}), children: /* @__PURE__ */ (0,
|
|
23580
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(Icon, { icon: "chevronDown" }) })
|
|
23480
23581
|
] });
|
|
23481
23582
|
}
|
|
23482
23583
|
|
|
@@ -23585,7 +23686,7 @@ function entryHasIcons(item) {
|
|
|
23585
23686
|
}
|
|
23586
23687
|
|
|
23587
23688
|
// src/components/AppNav/useAppNavGroupExpanded.ts
|
|
23588
|
-
var
|
|
23689
|
+
var import_react134 = require("react");
|
|
23589
23690
|
var APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY = "beam.appNav.expandedLinkGroups";
|
|
23590
23691
|
function loadStored() {
|
|
23591
23692
|
try {
|
|
@@ -23604,13 +23705,13 @@ function persistLabel(label, expanded) {
|
|
|
23604
23705
|
}
|
|
23605
23706
|
function useAppNavGroupExpanded(linkGroup) {
|
|
23606
23707
|
const { label } = linkGroup;
|
|
23607
|
-
const [userExpanded, setUserExpanded] = (0,
|
|
23708
|
+
const [userExpanded, setUserExpanded] = (0, import_react134.useState)(() => {
|
|
23608
23709
|
const stored = loadStored();
|
|
23609
23710
|
return label in stored ? stored[label] : null;
|
|
23610
23711
|
});
|
|
23611
23712
|
const hasActiveLink = appNavLinkGroupLinks(linkGroup).some((l) => l.active);
|
|
23612
23713
|
const expanded = userExpanded !== null ? userExpanded : hasActiveLink ? true : linkGroup.defaultExpanded ?? false;
|
|
23613
|
-
const onToggle = (0,
|
|
23714
|
+
const onToggle = (0, import_react134.useCallback)(() => {
|
|
23614
23715
|
const next = !expanded;
|
|
23615
23716
|
setUserExpanded(next);
|
|
23616
23717
|
persistLabel(label, next);
|
|
@@ -23619,8 +23720,8 @@ function useAppNavGroupExpanded(linkGroup) {
|
|
|
23619
23720
|
}
|
|
23620
23721
|
|
|
23621
23722
|
// src/components/AppNav/AppNavGroup.tsx
|
|
23622
|
-
var
|
|
23623
|
-
var
|
|
23723
|
+
var import_runtime106 = require("@homebound/truss/runtime");
|
|
23724
|
+
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
23624
23725
|
var __maybeInc19 = (inc) => {
|
|
23625
23726
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
23626
23727
|
};
|
|
@@ -23631,9 +23732,9 @@ function AppNavGroupView(props) {
|
|
|
23631
23732
|
} = props;
|
|
23632
23733
|
const tid = useTestIds(props, "linkGroup");
|
|
23633
23734
|
if (panelCollapsed) {
|
|
23634
|
-
return /* @__PURE__ */ (0,
|
|
23735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_jsx_runtime183.Fragment, { children: appNavLinkGroupLinks(linkGroup).map((link) => /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(NavLink, { variant: "side", ...link, iconOnly: !!link.icon, ...tid[`link_${(0, import_change_case7.camelCase)(link.label)}`] }, link.label)) });
|
|
23635
23736
|
}
|
|
23636
|
-
return /* @__PURE__ */ (0,
|
|
23737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(AppNavGroupDisclosure, { ...props });
|
|
23637
23738
|
}
|
|
23638
23739
|
function AppNavGroupDisclosure(props) {
|
|
23639
23740
|
const {
|
|
@@ -23645,15 +23746,15 @@ function AppNavGroupDisclosure(props) {
|
|
|
23645
23746
|
} = useAppNavGroupExpanded(linkGroup);
|
|
23646
23747
|
const tid = useTestIds(props, "linkGroup");
|
|
23647
23748
|
const navGroupId = `nav-group-${(0, import_change_case7.kebabCase)(linkGroup.label)}`;
|
|
23648
|
-
const [contentEl, setContentEl] = (0,
|
|
23649
|
-
const contentRef = (0,
|
|
23749
|
+
const [contentEl, setContentEl] = (0, import_react135.useState)(null);
|
|
23750
|
+
const contentRef = (0, import_react135.useMemo)(() => ({
|
|
23650
23751
|
current: contentEl
|
|
23651
23752
|
}), [contentEl]);
|
|
23652
|
-
const [contentHeight, setContentHeight] = (0,
|
|
23653
|
-
(0,
|
|
23753
|
+
const [contentHeight, setContentHeight] = (0, import_react135.useState)(expanded ? "auto" : "0");
|
|
23754
|
+
(0, import_react135.useEffect)(() => {
|
|
23654
23755
|
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
23655
23756
|
}, [expanded, contentEl]);
|
|
23656
|
-
const onResize = (0,
|
|
23757
|
+
const onResize = (0, import_react135.useCallback)(() => {
|
|
23657
23758
|
if (contentEl && expanded) {
|
|
23658
23759
|
setContentHeight(`${contentEl.scrollHeight}px`);
|
|
23659
23760
|
}
|
|
@@ -23662,27 +23763,27 @@ function AppNavGroupDisclosure(props) {
|
|
|
23662
23763
|
ref: contentRef,
|
|
23663
23764
|
onResize
|
|
23664
23765
|
});
|
|
23665
|
-
return /* @__PURE__ */ (0,
|
|
23666
|
-
/* @__PURE__ */ (0,
|
|
23667
|
-
/* @__PURE__ */ (0,
|
|
23766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("div", { className: "df fdc", ...tid, children: [
|
|
23767
|
+
/* @__PURE__ */ (0, import_jsx_runtime183.jsx)(AppNavGroupTrigger, { label: linkGroup.label, navGroupId, expanded, active: linkGroupHasActiveLink(linkGroup), onClick: onToggle, ...tid }),
|
|
23768
|
+
/* @__PURE__ */ (0, import_jsx_runtime183.jsx)("div", { id: navGroupId, role: "region", "aria-hidden": !expanded, ...(0, import_runtime106.trussProps)({
|
|
23668
23769
|
overflow: "oh",
|
|
23669
23770
|
transition: "transitionHeight",
|
|
23670
23771
|
height: ["h_var", {
|
|
23671
|
-
"--height": (0,
|
|
23772
|
+
"--height": (0, import_runtime106.maybeCssVar)(__maybeInc19(contentHeight))
|
|
23672
23773
|
}]
|
|
23673
23774
|
}), ...tid.panel, ...!expanded ? {
|
|
23674
23775
|
inert: "true"
|
|
23675
|
-
} : {}, children: /* @__PURE__ */ (0,
|
|
23776
|
+
} : {}, children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)("div", { ref: setContentEl, className: "df fdc", children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(AppNavItems, { items: linkGroup.items, panelCollapsed: false, nested: true, ...tid }) }) })
|
|
23676
23777
|
] });
|
|
23677
23778
|
}
|
|
23678
23779
|
|
|
23679
23780
|
// src/components/AppNav/AppNavGroupMenu.tsx
|
|
23680
|
-
var
|
|
23781
|
+
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
23681
23782
|
function AppNavGroupMenu({
|
|
23682
23783
|
linkGroup,
|
|
23683
23784
|
...tid
|
|
23684
23785
|
}) {
|
|
23685
|
-
return /* @__PURE__ */ (0,
|
|
23786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
23686
23787
|
ButtonMenu,
|
|
23687
23788
|
{
|
|
23688
23789
|
trigger: {
|
|
@@ -23698,8 +23799,8 @@ function AppNavGroupMenu({
|
|
|
23698
23799
|
}
|
|
23699
23800
|
|
|
23700
23801
|
// src/components/AppNav/AppNavSectionView.tsx
|
|
23701
|
-
var
|
|
23702
|
-
var
|
|
23802
|
+
var import_runtime107 = require("@homebound/truss/runtime");
|
|
23803
|
+
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
23703
23804
|
function AppNavSectionView(props) {
|
|
23704
23805
|
const {
|
|
23705
23806
|
section,
|
|
@@ -23725,7 +23826,7 @@ function AppNavSectionView(props) {
|
|
|
23725
23826
|
"--borderColor": "var(--b-surface-separator)"
|
|
23726
23827
|
}]
|
|
23727
23828
|
};
|
|
23728
|
-
return /* @__PURE__ */ (0,
|
|
23829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { ...(0, import_runtime107.trussProps)({
|
|
23729
23830
|
...{
|
|
23730
23831
|
display: "df",
|
|
23731
23832
|
flexDirection: "fdc",
|
|
@@ -23733,7 +23834,7 @@ function AppNavSectionView(props) {
|
|
|
23733
23834
|
},
|
|
23734
23835
|
...showDivider ? dividerStyles : {}
|
|
23735
23836
|
}), ...tid, children: [
|
|
23736
|
-
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */ (0,
|
|
23837
|
+
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { ...(0, import_runtime107.trussProps)({
|
|
23737
23838
|
fontWeight: "fw6",
|
|
23738
23839
|
fontSize: "fz_10px",
|
|
23739
23840
|
lineHeight: "lh_14px",
|
|
@@ -23746,18 +23847,18 @@ function AppNavSectionView(props) {
|
|
|
23746
23847
|
paddingBottom: "pb1",
|
|
23747
23848
|
textTransform: "ttu"
|
|
23748
23849
|
}), ...tid.label, children: section.label }),
|
|
23749
|
-
/* @__PURE__ */ (0,
|
|
23850
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(AppNavItems, { ...scopeProps, items: section.items, variant, panelCollapsed, nested })
|
|
23750
23851
|
] });
|
|
23751
23852
|
}
|
|
23752
23853
|
|
|
23753
23854
|
// src/components/AppNav/AppNavItems.tsx
|
|
23754
|
-
var
|
|
23855
|
+
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
23755
23856
|
function AppNavItems(props) {
|
|
23756
23857
|
const { items, variant = "side", panelCollapsed = false, nested = false } = props;
|
|
23757
23858
|
const tid = useTestIds(props, "appNav");
|
|
23758
|
-
return /* @__PURE__ */ (0,
|
|
23859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_jsx_runtime186.Fragment, { children: items.map((item, idx) => {
|
|
23759
23860
|
if (isAppNavLink(item)) {
|
|
23760
|
-
return /* @__PURE__ */ (0,
|
|
23861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
23761
23862
|
NavLink,
|
|
23762
23863
|
{
|
|
23763
23864
|
variant,
|
|
@@ -23770,7 +23871,7 @@ function AppNavItems(props) {
|
|
|
23770
23871
|
);
|
|
23771
23872
|
}
|
|
23772
23873
|
if (isAppNavGroup(item)) {
|
|
23773
|
-
return variant === "global" ? /* @__PURE__ */ (0,
|
|
23874
|
+
return variant === "global" ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(AppNavGroupMenu, { linkGroup: item, ...tid.linkGroup }, appNavItemKey(item)) : /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
23774
23875
|
AppNavGroupView,
|
|
23775
23876
|
{
|
|
23776
23877
|
linkGroup: item,
|
|
@@ -23781,7 +23882,7 @@ function AppNavItems(props) {
|
|
|
23781
23882
|
);
|
|
23782
23883
|
}
|
|
23783
23884
|
if (isAppNavSection(item)) {
|
|
23784
|
-
return /* @__PURE__ */ (0,
|
|
23885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
23785
23886
|
AppNavSectionView,
|
|
23786
23887
|
{
|
|
23787
23888
|
section: item,
|
|
@@ -23800,47 +23901,47 @@ function AppNavItems(props) {
|
|
|
23800
23901
|
|
|
23801
23902
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
23802
23903
|
var import_framer_motion5 = require("framer-motion");
|
|
23803
|
-
var
|
|
23804
|
-
var
|
|
23904
|
+
var import_react137 = require("react");
|
|
23905
|
+
var import_react_aria61 = require("react-aria");
|
|
23805
23906
|
var import_react_dom6 = require("react-dom");
|
|
23806
23907
|
var import_react_router_dom7 = require("react-router-dom");
|
|
23807
23908
|
|
|
23808
23909
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayoutHeightContext.tsx
|
|
23809
|
-
var
|
|
23810
|
-
var
|
|
23811
|
-
var EnvironmentBannerLayoutHeightContext = (0,
|
|
23910
|
+
var import_react136 = require("react");
|
|
23911
|
+
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
23912
|
+
var EnvironmentBannerLayoutHeightContext = (0, import_react136.createContext)(0);
|
|
23812
23913
|
function EnvironmentBannerLayoutHeightProvider({ value, children }) {
|
|
23813
|
-
return /* @__PURE__ */ (0,
|
|
23914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(EnvironmentBannerLayoutHeightContext.Provider, { value, children });
|
|
23814
23915
|
}
|
|
23815
23916
|
function useEnvironmentBannerLayoutHeight() {
|
|
23816
|
-
return (0,
|
|
23917
|
+
return (0, import_react136.useContext)(EnvironmentBannerLayoutHeightContext);
|
|
23817
23918
|
}
|
|
23818
23919
|
|
|
23819
23920
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
23820
|
-
var
|
|
23821
|
-
var
|
|
23921
|
+
var import_runtime108 = require("@homebound/truss/runtime");
|
|
23922
|
+
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
23822
23923
|
function NavbarMobileMenu(props) {
|
|
23823
23924
|
const {
|
|
23824
23925
|
items
|
|
23825
23926
|
} = props;
|
|
23826
23927
|
const tid = useTestIds(props, "navbar");
|
|
23827
|
-
const [isOpen, setIsOpen] = (0,
|
|
23928
|
+
const [isOpen, setIsOpen] = (0, import_react137.useState)(false);
|
|
23828
23929
|
const {
|
|
23829
23930
|
pathname,
|
|
23830
23931
|
search
|
|
23831
23932
|
} = (0, import_react_router_dom7.useLocation)();
|
|
23832
|
-
(0,
|
|
23933
|
+
(0, import_react_aria61.usePreventScroll)({
|
|
23833
23934
|
isDisabled: !isOpen
|
|
23834
23935
|
});
|
|
23835
|
-
(0,
|
|
23936
|
+
(0, import_react137.useEffect)(() => {
|
|
23836
23937
|
setIsOpen(false);
|
|
23837
23938
|
}, [pathname, search]);
|
|
23838
23939
|
const close = () => setIsOpen(false);
|
|
23839
|
-
return /* @__PURE__ */ (0,
|
|
23840
|
-
/* @__PURE__ */ (0,
|
|
23940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_jsx_runtime188.Fragment, { children: [
|
|
23941
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => setIsOpen((open) => !open), ...tid.mobileMenu }),
|
|
23841
23942
|
(0, import_react_dom6.createPortal)(
|
|
23842
23943
|
/* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
|
|
23843
|
-
/* @__PURE__ */ (0,
|
|
23944
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_framer_motion5.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(NavbarMobileDrawer, { items, onClose: close, tid }) }),
|
|
23844
23945
|
document.body
|
|
23845
23946
|
)
|
|
23846
23947
|
] });
|
|
@@ -23854,14 +23955,14 @@ function NavbarMobileDrawer({
|
|
|
23854
23955
|
const overlayTopStyle = {
|
|
23855
23956
|
top: bannerHeightPx
|
|
23856
23957
|
};
|
|
23857
|
-
return /* @__PURE__ */ (0,
|
|
23858
|
-
/* @__PURE__ */ (0,
|
|
23958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_jsx_runtime188.Fragment, { children: [
|
|
23959
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_framer_motion5.motion.div, { ...(0, import_runtime108.mergeProps)(void 0, overlayTopStyle, {
|
|
23859
23960
|
position: "fixed",
|
|
23860
23961
|
right: "right0",
|
|
23861
23962
|
bottom: "bottom0",
|
|
23862
23963
|
left: "left0",
|
|
23863
23964
|
zIndex: ["z_var", {
|
|
23864
|
-
"--zIndex": (0,
|
|
23965
|
+
"--zIndex": (0, import_runtime108.maybeCssVar)(zIndices.navbarMobileMenuScrim)
|
|
23865
23966
|
}],
|
|
23866
23967
|
backgroundColor: "backgroundColor_rgba_36_36_36_0_2"
|
|
23867
23968
|
}), initial: {
|
|
@@ -23874,7 +23975,7 @@ function NavbarMobileDrawer({
|
|
|
23874
23975
|
ease: "linear",
|
|
23875
23976
|
duration: 0.2
|
|
23876
23977
|
}, onClick: onClose, ...tid.mobileMenuScrim }, "navbarMobileMenuScrim"),
|
|
23877
|
-
/* @__PURE__ */ (0,
|
|
23978
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_react_aria61.FocusScope, { autoFocus: true, contain: true, restoreFocus: true, children: /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_framer_motion5.motion.aside, { role: "dialog", "aria-modal": "true", "aria-label": "Navigation", ...(0, import_runtime108.mergeProps)(void 0, overlayTopStyle, {
|
|
23878
23979
|
position: "fixed",
|
|
23879
23980
|
bottom: "bottom0",
|
|
23880
23981
|
left: "left0",
|
|
@@ -23884,7 +23985,7 @@ function NavbarMobileDrawer({
|
|
|
23884
23985
|
width: "w_260px",
|
|
23885
23986
|
overflow: "oh",
|
|
23886
23987
|
zIndex: ["z_var", {
|
|
23887
|
-
"--zIndex": (0,
|
|
23988
|
+
"--zIndex": (0, import_runtime108.maybeCssVar)(zIndices.navbarMobileMenu)
|
|
23888
23989
|
}],
|
|
23889
23990
|
backgroundColor: ["bgColor_var", {
|
|
23890
23991
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -23899,7 +24000,7 @@ function NavbarMobileDrawer({
|
|
|
23899
24000
|
ease: "linear",
|
|
23900
24001
|
duration: 0.2
|
|
23901
24002
|
}, onClick: (e) => e.stopPropagation(), ...tid.mobileMenuDrawer, children: [
|
|
23902
|
-
/* @__PURE__ */ (0,
|
|
24003
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { ...(0, import_runtime108.trussProps)({
|
|
23903
24004
|
display: "df",
|
|
23904
24005
|
alignItems: "aic",
|
|
23905
24006
|
justifyContent: "jcfe",
|
|
@@ -23913,8 +24014,8 @@ function NavbarMobileDrawer({
|
|
|
23913
24014
|
borderColor: ["bc_var", {
|
|
23914
24015
|
"--borderColor": "var(--b-surface-separator)"
|
|
23915
24016
|
}]
|
|
23916
|
-
}), children: /* @__PURE__ */ (0,
|
|
23917
|
-
/* @__PURE__ */ (0,
|
|
24017
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(IconButton, { icon: "x", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: "Close navigation", onClick: onClose, ...tid.mobileMenuClose }) }),
|
|
24018
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
|
|
23918
24019
|
"nav",
|
|
23919
24020
|
{
|
|
23920
24021
|
className: "fg1 oya pl3 pr3 pb3 pt2 df fdc gap_4px",
|
|
@@ -23924,7 +24025,7 @@ function NavbarMobileDrawer({
|
|
|
23924
24025
|
}
|
|
23925
24026
|
},
|
|
23926
24027
|
...tid.mobileMenuPanel,
|
|
23927
|
-
children: /* @__PURE__ */ (0,
|
|
24028
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(AppNavItems, { items, panelCollapsed: false, ...tid })
|
|
23928
24029
|
}
|
|
23929
24030
|
)
|
|
23930
24031
|
] }, "navbarMobileMenuDrawer") })
|
|
@@ -23932,8 +24033,8 @@ function NavbarMobileDrawer({
|
|
|
23932
24033
|
}
|
|
23933
24034
|
|
|
23934
24035
|
// src/components/Navbar/Navbar.tsx
|
|
23935
|
-
var
|
|
23936
|
-
var
|
|
24036
|
+
var import_runtime109 = require("@homebound/truss/runtime");
|
|
24037
|
+
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
23937
24038
|
function Navbar(props) {
|
|
23938
24039
|
const {
|
|
23939
24040
|
brand,
|
|
@@ -23952,7 +24053,7 @@ function Navbar(props) {
|
|
|
23952
24053
|
overflows
|
|
23953
24054
|
} = useContentOverflow(!sm);
|
|
23954
24055
|
const showMobile = sm || overflows;
|
|
23955
|
-
return /* @__PURE__ */ (0,
|
|
24056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(ContrastScope, { children: /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("nav", { ...(0, import_runtime109.trussProps)({
|
|
23956
24057
|
backgroundColor: ["bgColor_var", {
|
|
23957
24058
|
"--backgroundColor": "var(--b-surface-raised)"
|
|
23958
24059
|
}],
|
|
@@ -23971,10 +24072,10 @@ function Navbar(props) {
|
|
|
23971
24072
|
paddingRight: "pr5"
|
|
23972
24073
|
} : {}
|
|
23973
24074
|
}), ...tid, children: [
|
|
23974
|
-
/* @__PURE__ */ (0,
|
|
23975
|
-
/* @__PURE__ */ (0,
|
|
23976
|
-
showMobile && /* @__PURE__ */ (0,
|
|
23977
|
-
/* @__PURE__ */ (0,
|
|
24075
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("div", { className: "df aic gap3 fg1 mw0", children: [
|
|
24076
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("div", { className: "df aic fs0 gap2", children: [
|
|
24077
|
+
showMobile && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(NavbarMobileMenu, { items, ...tid }),
|
|
24078
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { ...(0, import_runtime109.trussProps)({
|
|
23978
24079
|
flexShrink: "fs0",
|
|
23979
24080
|
...hideBrandOnMobile && showMobile ? {
|
|
23980
24081
|
display: "dn"
|
|
@@ -23983,7 +24084,7 @@ function Navbar(props) {
|
|
|
23983
24084
|
] }),
|
|
23984
24085
|
!sm && // Stays mounted while overflowing (hidden) so the items remain measurable and the bar
|
|
23985
24086
|
// can expand again as space frees up.
|
|
23986
|
-
/* @__PURE__ */ (0,
|
|
24087
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { ref: containerRef, ...(0, import_runtime109.trussProps)({
|
|
23987
24088
|
display: "df",
|
|
23988
24089
|
alignItems: "aic",
|
|
23989
24090
|
flexGrow: "fg1",
|
|
@@ -23992,11 +24093,11 @@ function Navbar(props) {
|
|
|
23992
24093
|
...overflows ? {
|
|
23993
24094
|
visibility: "visibility_hidden"
|
|
23994
24095
|
} : {}
|
|
23995
|
-
}), ...tid.items, children: /* @__PURE__ */ (0,
|
|
24096
|
+
}), ...tid.items, children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { ref: contentRef, className: "df aic gap2 width_max_content", children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(AppNavItems, { variant: "global", items, ...tid }) }) })
|
|
23996
24097
|
] }),
|
|
23997
|
-
/* @__PURE__ */ (0,
|
|
23998
|
-
rightSlot && /* @__PURE__ */ (0,
|
|
23999
|
-
user && /* @__PURE__ */ (0,
|
|
24098
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("div", { className: "df aic gap1", children: [
|
|
24099
|
+
rightSlot && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "df aic gap1", ...tid.rightSlot, children: rightSlot }),
|
|
24100
|
+
user && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(NavbarUserMenu, { user, ...tid.userMenu })
|
|
24000
24101
|
] })
|
|
24001
24102
|
] }) });
|
|
24002
24103
|
}
|
|
@@ -24004,7 +24105,7 @@ function NavbarUserMenu({
|
|
|
24004
24105
|
user,
|
|
24005
24106
|
...tid
|
|
24006
24107
|
}) {
|
|
24007
|
-
return /* @__PURE__ */ (0,
|
|
24108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "df aic fs0 ml1", children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(ButtonMenu, { items: user.menuItems, persistentItems: user.persistentItems, trigger: {
|
|
24008
24109
|
src: user.picture,
|
|
24009
24110
|
name: user.name,
|
|
24010
24111
|
size: "sm",
|
|
@@ -24014,19 +24115,19 @@ function NavbarUserMenu({
|
|
|
24014
24115
|
|
|
24015
24116
|
// src/components/Tabs.tsx
|
|
24016
24117
|
var import_change_case9 = require("change-case");
|
|
24017
|
-
var
|
|
24018
|
-
var
|
|
24118
|
+
var import_react138 = require("react");
|
|
24119
|
+
var import_react_aria62 = require("react-aria");
|
|
24019
24120
|
var import_react_router = require("react-router");
|
|
24020
24121
|
var import_react_router_dom8 = require("react-router-dom");
|
|
24021
|
-
var
|
|
24022
|
-
var
|
|
24122
|
+
var import_runtime110 = require("@homebound/truss/runtime");
|
|
24123
|
+
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
24023
24124
|
function TabsWithContent(props) {
|
|
24024
24125
|
const styles = hideTabs(props) ? {} : {
|
|
24025
24126
|
paddingTop: "pt3"
|
|
24026
24127
|
};
|
|
24027
|
-
return /* @__PURE__ */ (0,
|
|
24028
|
-
/* @__PURE__ */ (0,
|
|
24029
|
-
/* @__PURE__ */ (0,
|
|
24128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_jsx_runtime190.Fragment, { children: [
|
|
24129
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Tabs, { ...props }),
|
|
24130
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(TabContent, { ...props, contentXss: {
|
|
24030
24131
|
...styles,
|
|
24031
24132
|
...props.contentXss
|
|
24032
24133
|
} })
|
|
@@ -24051,7 +24152,7 @@ function TabContent(props) {
|
|
|
24051
24152
|
return (
|
|
24052
24153
|
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
24053
24154
|
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
24054
|
-
/* @__PURE__ */ (0,
|
|
24155
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...(0, import_runtime110.trussProps)(contentXss), children: selectedTab.render() }) })
|
|
24055
24156
|
);
|
|
24056
24157
|
}
|
|
24057
24158
|
function Tabs(props) {
|
|
@@ -24073,11 +24174,11 @@ function Tabs(props) {
|
|
|
24073
24174
|
const {
|
|
24074
24175
|
isFocusVisible,
|
|
24075
24176
|
focusProps
|
|
24076
|
-
} = (0,
|
|
24177
|
+
} = (0, import_react_aria62.useFocusRing)();
|
|
24077
24178
|
const tid = useTestIds(others, "tabs");
|
|
24078
|
-
const [active, setActive] = (0,
|
|
24079
|
-
const ref = (0,
|
|
24080
|
-
(0,
|
|
24179
|
+
const [active, setActive] = (0, import_react138.useState)(selected);
|
|
24180
|
+
const ref = (0, import_react138.useRef)(null);
|
|
24181
|
+
(0, import_react138.useEffect)(() => setActive(selected), [selected]);
|
|
24081
24182
|
function onKeyUp(e) {
|
|
24082
24183
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
24083
24184
|
const nextTabValue = getNextTabValue(active, e.key, tabs);
|
|
@@ -24093,7 +24194,7 @@ function Tabs(props) {
|
|
|
24093
24194
|
setActive(selected);
|
|
24094
24195
|
}
|
|
24095
24196
|
}
|
|
24096
|
-
return /* @__PURE__ */ (0,
|
|
24197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)("div", { ...(0, import_runtime110.trussProps)({
|
|
24097
24198
|
...{
|
|
24098
24199
|
display: "df",
|
|
24099
24200
|
alignItems: "aic",
|
|
@@ -24109,11 +24210,11 @@ function Tabs(props) {
|
|
|
24109
24210
|
}
|
|
24110
24211
|
} : {}
|
|
24111
24212
|
}), children: [
|
|
24112
|
-
!hideTabs(props) && /* @__PURE__ */ (0,
|
|
24213
|
+
!hideTabs(props) && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
24113
24214
|
const uniqueValue = uniqueTabValue(tab);
|
|
24114
|
-
return /* @__PURE__ */ (0,
|
|
24215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
24115
24216
|
}) }),
|
|
24116
|
-
right && /* @__PURE__ */ (0,
|
|
24217
|
+
right && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "mla df aic gap1 pb1", children: right })
|
|
24117
24218
|
] });
|
|
24118
24219
|
}
|
|
24119
24220
|
function TabImpl(props) {
|
|
@@ -24137,7 +24238,7 @@ function TabImpl(props) {
|
|
|
24137
24238
|
const {
|
|
24138
24239
|
hoverProps,
|
|
24139
24240
|
isHovered
|
|
24140
|
-
} = (0,
|
|
24241
|
+
} = (0, import_react_aria62.useHover)({
|
|
24141
24242
|
isDisabled
|
|
24142
24243
|
});
|
|
24143
24244
|
const {
|
|
@@ -24147,7 +24248,7 @@ function TabImpl(props) {
|
|
|
24147
24248
|
hoverStyles: hoverStyles4,
|
|
24148
24249
|
disabledStyles: disabledStyles3,
|
|
24149
24250
|
activeHoverStyles
|
|
24150
|
-
} = (0,
|
|
24251
|
+
} = (0, import_react138.useMemo)(() => getTabStyles(), []);
|
|
24151
24252
|
const uniqueValue = uniqueTabValue(tab);
|
|
24152
24253
|
const tabProps = {
|
|
24153
24254
|
"aria-controls": `${uniqueValue}-tabPanel`,
|
|
@@ -24157,7 +24258,7 @@ function TabImpl(props) {
|
|
|
24157
24258
|
role: "tab",
|
|
24158
24259
|
tabIndex: active ? 0 : -1,
|
|
24159
24260
|
...others,
|
|
24160
|
-
...(0,
|
|
24261
|
+
...(0, import_runtime110.trussProps)({
|
|
24161
24262
|
...baseStyles4,
|
|
24162
24263
|
...active && activeStyles3,
|
|
24163
24264
|
...isDisabled && disabledStyles3,
|
|
@@ -24166,24 +24267,24 @@ function TabImpl(props) {
|
|
|
24166
24267
|
...isFocusVisible && active && focusRingStyles2
|
|
24167
24268
|
})
|
|
24168
24269
|
};
|
|
24169
|
-
const interactiveProps = (0,
|
|
24270
|
+
const interactiveProps = (0, import_react_aria62.mergeProps)(focusProps, hoverProps, {
|
|
24170
24271
|
onKeyUp,
|
|
24171
24272
|
onBlur,
|
|
24172
24273
|
...isRouteTab(tab) ? {} : {
|
|
24173
24274
|
onClick: () => onClick(tab.value)
|
|
24174
24275
|
}
|
|
24175
24276
|
});
|
|
24176
|
-
const tabLabel = /* @__PURE__ */ (0,
|
|
24277
|
+
const tabLabel = /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_jsx_runtime190.Fragment, { children: [
|
|
24177
24278
|
label,
|
|
24178
|
-
(icon || endAdornment) && /* @__PURE__ */ (0,
|
|
24279
|
+
(icon || endAdornment) && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("span", { className: "ml1", children: icon ? /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Icon, { icon }) : endAdornment })
|
|
24179
24280
|
] });
|
|
24180
24281
|
return isDisabled ? maybeTooltip({
|
|
24181
24282
|
title: resolveTooltip(disabled),
|
|
24182
24283
|
placement: "top",
|
|
24183
|
-
children: /* @__PURE__ */ (0,
|
|
24184
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */ (0,
|
|
24284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { ...tabProps, children: tabLabel })
|
|
24285
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_react_router_dom8.Link, { ...(0, import_react_aria62.mergeProps)(tabProps, interactiveProps, {
|
|
24185
24286
|
className: "navLink"
|
|
24186
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ (0,
|
|
24287
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("button", { ...{
|
|
24187
24288
|
...tabProps,
|
|
24188
24289
|
...interactiveProps
|
|
24189
24290
|
}, children: tabLabel });
|
|
@@ -24194,7 +24295,7 @@ function getTabStyles() {
|
|
|
24194
24295
|
const borderBottomStyles = {
|
|
24195
24296
|
borderBottomStyle: "bbs_solid",
|
|
24196
24297
|
borderBottomWidth: ["borderBottomWidth_var", {
|
|
24197
|
-
"--borderBottomWidth": (0,
|
|
24298
|
+
"--borderBottomWidth": (0, import_runtime110.maybeCssVar)(`${borderBottomWidthPx}px`)
|
|
24198
24299
|
}],
|
|
24199
24300
|
paddingBottom: ["pb_var", {
|
|
24200
24301
|
"--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
|
|
@@ -24278,8 +24379,8 @@ function hideTabs(props) {
|
|
|
24278
24379
|
}
|
|
24279
24380
|
|
|
24280
24381
|
// src/components/PageHeader.tsx
|
|
24281
|
-
var
|
|
24282
|
-
var
|
|
24382
|
+
var import_runtime111 = require("@homebound/truss/runtime");
|
|
24383
|
+
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
24283
24384
|
function PageHeader2(props) {
|
|
24284
24385
|
const {
|
|
24285
24386
|
title,
|
|
@@ -24291,7 +24392,7 @@ function PageHeader2(props) {
|
|
|
24291
24392
|
} = props;
|
|
24292
24393
|
const tid = useTestIds(otherProps, "pageHeader");
|
|
24293
24394
|
useDocumentTitle(title, documentTitleSuffix);
|
|
24294
|
-
return /* @__PURE__ */ (0,
|
|
24395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("header", { ...tid, ...(0, import_runtime111.trussProps)({
|
|
24295
24396
|
display: "df",
|
|
24296
24397
|
flexDirection: "fdc",
|
|
24297
24398
|
paddingTop: "pt3",
|
|
@@ -24307,7 +24408,7 @@ function PageHeader2(props) {
|
|
|
24307
24408
|
"--backgroundColor": "var(--b-surface)"
|
|
24308
24409
|
}]
|
|
24309
24410
|
}), children: [
|
|
24310
|
-
/* @__PURE__ */ (0,
|
|
24411
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("div", { ...(0, import_runtime111.trussProps)({
|
|
24311
24412
|
...{
|
|
24312
24413
|
display: "df",
|
|
24313
24414
|
justifyContent: "jcsb",
|
|
@@ -24320,18 +24421,18 @@ function PageHeader2(props) {
|
|
|
24320
24421
|
} : {}
|
|
24321
24422
|
}
|
|
24322
24423
|
}), children: [
|
|
24323
|
-
/* @__PURE__ */ (0,
|
|
24324
|
-
breadcrumbs && /* @__PURE__ */ (0,
|
|
24325
|
-
/* @__PURE__ */ (0,
|
|
24424
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("div", { className: "mw0", children: [
|
|
24425
|
+
breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Breadcrumbs, { ...breadcrumbs }),
|
|
24426
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title })
|
|
24326
24427
|
] }),
|
|
24327
|
-
/* @__PURE__ */ (0,
|
|
24428
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: "fs0", children: rightSlot })
|
|
24328
24429
|
] }),
|
|
24329
|
-
tabs && /* @__PURE__ */ (0,
|
|
24430
|
+
tabs && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Tabs, { ...tabs })
|
|
24330
24431
|
] });
|
|
24331
24432
|
}
|
|
24332
24433
|
|
|
24333
24434
|
// src/components/Pagination.tsx
|
|
24334
|
-
var
|
|
24435
|
+
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
24335
24436
|
var defaultPage = {
|
|
24336
24437
|
offset: 0,
|
|
24337
24438
|
limit: 100
|
|
@@ -24363,25 +24464,25 @@ function Pagination(props) {
|
|
|
24363
24464
|
}
|
|
24364
24465
|
}
|
|
24365
24466
|
const tid = useTestIds(props, "pagination");
|
|
24366
|
-
return /* @__PURE__ */ (0,
|
|
24367
|
-
/* @__PURE__ */ (0,
|
|
24368
|
-
/* @__PURE__ */ (0,
|
|
24467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)("div", { className: "df bcGray200 bts_solid btw_1px fw4 fz_12px lh_16px gray500 pl2 pr2 pt2", ...tid, children: [
|
|
24468
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
24469
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: "w_78px", children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
24369
24470
|
pageNumber: 1,
|
|
24370
24471
|
pageSize: val
|
|
24371
24472
|
}), autoSort: false, ...tid.pageSize }) }),
|
|
24372
|
-
/* @__PURE__ */ (0,
|
|
24373
|
-
/* @__PURE__ */ (0,
|
|
24473
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsxs)("div", { className: "mla mta mba df", children: [
|
|
24474
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsxs)("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
|
|
24374
24475
|
first,
|
|
24375
24476
|
" ",
|
|
24376
24477
|
showLast ? `- ${last}` : "",
|
|
24377
24478
|
" of ",
|
|
24378
24479
|
totalCount
|
|
24379
24480
|
] }),
|
|
24380
|
-
/* @__PURE__ */ (0,
|
|
24481
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
24381
24482
|
pageNumber: pageNumber - 1,
|
|
24382
24483
|
pageSize
|
|
24383
24484
|
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
24384
|
-
/* @__PURE__ */ (0,
|
|
24485
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(IconButton, { icon: "chevronRight", color: hasNextPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
24385
24486
|
pageNumber: pageNumber + 1,
|
|
24386
24487
|
pageSize
|
|
24387
24488
|
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
@@ -24404,9 +24505,9 @@ function toPageNumberSize(page) {
|
|
|
24404
24505
|
|
|
24405
24506
|
// src/components/ScrollShadows.tsx
|
|
24406
24507
|
var import_utils160 = require("@react-aria/utils");
|
|
24407
|
-
var
|
|
24408
|
-
var
|
|
24409
|
-
var
|
|
24508
|
+
var import_react139 = require("react");
|
|
24509
|
+
var import_runtime112 = require("@homebound/truss/runtime");
|
|
24510
|
+
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
24410
24511
|
function ScrollShadows(props) {
|
|
24411
24512
|
const {
|
|
24412
24513
|
children,
|
|
@@ -24422,15 +24523,15 @@ function ScrollShadows(props) {
|
|
|
24422
24523
|
if (!bgColor.includes("rgba")) {
|
|
24423
24524
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
24424
24525
|
}
|
|
24425
|
-
const [showStartShadow, setShowStartShadow] = (0,
|
|
24426
|
-
const [showEndShadow, setShowEndShadow] = (0,
|
|
24427
|
-
const scrollRef = (0,
|
|
24428
|
-
const [startShadowStyles, endShadowStyles] = (0,
|
|
24526
|
+
const [showStartShadow, setShowStartShadow] = (0, import_react139.useState)(false);
|
|
24527
|
+
const [showEndShadow, setShowEndShadow] = (0, import_react139.useState)(false);
|
|
24528
|
+
const scrollRef = (0, import_react139.useRef)(null);
|
|
24529
|
+
const [startShadowStyles, endShadowStyles] = (0, import_react139.useMemo)(() => {
|
|
24429
24530
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
24430
24531
|
const commonStyles = {
|
|
24431
24532
|
position: "absolute",
|
|
24432
24533
|
zIndex: ["z_var", {
|
|
24433
|
-
"--zIndex": (0,
|
|
24534
|
+
"--zIndex": (0, import_runtime112.maybeCssVar)(zIndices.scrollShadow)
|
|
24434
24535
|
}],
|
|
24435
24536
|
pointerEvents: "pointerEvents_none"
|
|
24436
24537
|
};
|
|
@@ -24463,7 +24564,7 @@ function ScrollShadows(props) {
|
|
|
24463
24564
|
...startShadowStyles2,
|
|
24464
24565
|
...{
|
|
24465
24566
|
background: ["background_var", {
|
|
24466
|
-
"--background": (0,
|
|
24567
|
+
"--background": (0, import_runtime112.maybeCssVar)(startGradient)
|
|
24467
24568
|
}]
|
|
24468
24569
|
}
|
|
24469
24570
|
}, {
|
|
@@ -24471,12 +24572,12 @@ function ScrollShadows(props) {
|
|
|
24471
24572
|
...endShadowStyles2,
|
|
24472
24573
|
...{
|
|
24473
24574
|
background: ["background_var", {
|
|
24474
|
-
"--background": (0,
|
|
24575
|
+
"--background": (0, import_runtime112.maybeCssVar)(endGradient)
|
|
24475
24576
|
}]
|
|
24476
24577
|
}
|
|
24477
24578
|
}];
|
|
24478
24579
|
}, [horizontal, bgColor]);
|
|
24479
|
-
const updateScrollProps = (0,
|
|
24580
|
+
const updateScrollProps = (0, import_react139.useCallback)((el) => {
|
|
24480
24581
|
const {
|
|
24481
24582
|
scrollTop,
|
|
24482
24583
|
scrollHeight,
|
|
@@ -24491,15 +24592,15 @@ function ScrollShadows(props) {
|
|
|
24491
24592
|
setShowStartShadow(start > 0);
|
|
24492
24593
|
setShowEndShadow(start + boxSize < end);
|
|
24493
24594
|
}, [horizontal]);
|
|
24494
|
-
const onResize = (0,
|
|
24595
|
+
const onResize = (0, import_react139.useCallback)(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
24495
24596
|
(0, import_utils160.useResizeObserver)({
|
|
24496
24597
|
ref: scrollRef,
|
|
24497
24598
|
onResize
|
|
24498
24599
|
});
|
|
24499
|
-
return /* @__PURE__ */ (0,
|
|
24600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { ...(0, import_runtime112.trussProps)({
|
|
24500
24601
|
display: "df",
|
|
24501
24602
|
flexDirection: ["fd_var", {
|
|
24502
|
-
"--flexDirection": (0,
|
|
24603
|
+
"--flexDirection": (0, import_runtime112.maybeCssVar)(!horizontal ? "column" : "row")
|
|
24503
24604
|
}],
|
|
24504
24605
|
position: "relative",
|
|
24505
24606
|
overflow: "oh",
|
|
@@ -24512,23 +24613,23 @@ function ScrollShadows(props) {
|
|
|
24512
24613
|
width: width2
|
|
24513
24614
|
}
|
|
24514
24615
|
}), ...tid, children: [
|
|
24515
|
-
/* @__PURE__ */ (0,
|
|
24616
|
+
/* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { ...(0, import_runtime112.trussProps)({
|
|
24516
24617
|
...startShadowStyles,
|
|
24517
24618
|
...{
|
|
24518
24619
|
opacity: ["o_var", {
|
|
24519
|
-
"--opacity": (0,
|
|
24620
|
+
"--opacity": (0, import_runtime112.maybeCssVar)(showStartShadow ? 1 : 0)
|
|
24520
24621
|
}]
|
|
24521
24622
|
}
|
|
24522
24623
|
}), "data-chromatic": "ignore" }),
|
|
24523
|
-
/* @__PURE__ */ (0,
|
|
24624
|
+
/* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { ...(0, import_runtime112.trussProps)({
|
|
24524
24625
|
...endShadowStyles,
|
|
24525
24626
|
...{
|
|
24526
24627
|
opacity: ["o_var", {
|
|
24527
|
-
"--opacity": (0,
|
|
24628
|
+
"--opacity": (0, import_runtime112.maybeCssVar)(showEndShadow ? 1 : 0)
|
|
24528
24629
|
}]
|
|
24529
24630
|
}
|
|
24530
24631
|
}), "data-chromatic": "ignore" }),
|
|
24531
|
-
/* @__PURE__ */ (0,
|
|
24632
|
+
/* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { ...(0, import_runtime112.trussProps)({
|
|
24532
24633
|
...xss,
|
|
24533
24634
|
...{
|
|
24534
24635
|
overflow: "oa",
|
|
@@ -24540,8 +24641,8 @@ function ScrollShadows(props) {
|
|
|
24540
24641
|
}
|
|
24541
24642
|
|
|
24542
24643
|
// src/layouts/SideNavLayout/SideNavLayoutContext.tsx
|
|
24543
|
-
var
|
|
24544
|
-
var
|
|
24644
|
+
var import_react140 = require("react");
|
|
24645
|
+
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
24545
24646
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
24546
24647
|
function loadStoredNavState() {
|
|
24547
24648
|
try {
|
|
@@ -24563,20 +24664,20 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
24563
24664
|
}
|
|
24564
24665
|
return loadStoredNavState() ?? defaultNavState ?? "expanded";
|
|
24565
24666
|
}
|
|
24566
|
-
var SideNavLayoutContext = (0,
|
|
24667
|
+
var SideNavLayoutContext = (0, import_react140.createContext)(void 0);
|
|
24567
24668
|
function SideNavLayoutProvider(props) {
|
|
24568
|
-
const [navState, setNavStateInternal] = (0,
|
|
24669
|
+
const [navState, setNavStateInternal] = (0, import_react140.useState)(
|
|
24569
24670
|
() => resolveInitialNavState(props.defaultNavState)
|
|
24570
24671
|
);
|
|
24571
24672
|
const bp = useBreakpoint();
|
|
24572
|
-
const prevMdAndUp = (0,
|
|
24573
|
-
(0,
|
|
24673
|
+
const prevMdAndUp = (0, import_react140.useRef)(bp.mdAndUp);
|
|
24674
|
+
(0, import_react140.useEffect)(() => {
|
|
24574
24675
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
24575
24676
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
24576
24677
|
}
|
|
24577
24678
|
prevMdAndUp.current = bp.mdAndUp;
|
|
24578
24679
|
}, [bp.mdAndUp]);
|
|
24579
|
-
const setNavState = (0,
|
|
24680
|
+
const setNavState = (0, import_react140.useCallback)((value2) => {
|
|
24580
24681
|
setNavStateInternal((prev) => {
|
|
24581
24682
|
const next = typeof value2 === "function" ? value2(prev) : value2;
|
|
24582
24683
|
if (next === "expanded" || next === "collapse") {
|
|
@@ -24588,20 +24689,20 @@ function SideNavLayoutProvider(props) {
|
|
|
24588
24689
|
return next;
|
|
24589
24690
|
});
|
|
24590
24691
|
}, []);
|
|
24591
|
-
const value = (0,
|
|
24592
|
-
return /* @__PURE__ */ (0,
|
|
24692
|
+
const value = (0, import_react140.useMemo)(() => ({ navState, setNavState }), [navState, setNavState]);
|
|
24693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(SideNavLayoutContext.Provider, { value, children: props.children });
|
|
24593
24694
|
}
|
|
24594
24695
|
function useSideNavLayoutContext() {
|
|
24595
|
-
return (0,
|
|
24696
|
+
return (0, import_react140.useContext)(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
24596
24697
|
} };
|
|
24597
24698
|
}
|
|
24598
24699
|
function useHasSideNavLayoutProvider() {
|
|
24599
|
-
return (0,
|
|
24700
|
+
return (0, import_react140.useContext)(SideNavLayoutContext) !== void 0;
|
|
24600
24701
|
}
|
|
24601
24702
|
|
|
24602
24703
|
// src/components/SideNav/SideNav.tsx
|
|
24603
|
-
var
|
|
24604
|
-
var
|
|
24704
|
+
var import_runtime113 = require("@homebound/truss/runtime");
|
|
24705
|
+
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
24605
24706
|
function SideNav(props) {
|
|
24606
24707
|
const {
|
|
24607
24708
|
top,
|
|
@@ -24614,8 +24715,8 @@ function SideNav(props) {
|
|
|
24614
24715
|
const tid = useTestIds(props, "sideNav");
|
|
24615
24716
|
const panelCollapsed = navState === "collapse";
|
|
24616
24717
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
24617
|
-
return /* @__PURE__ */ (0,
|
|
24618
|
-
top !== void 0 && /* @__PURE__ */ (0,
|
|
24718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
24719
|
+
top !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { ...(0, import_runtime113.trussProps)({
|
|
24619
24720
|
flexShrink: "fs0",
|
|
24620
24721
|
paddingLeft: "pl2",
|
|
24621
24722
|
paddingRight: "pr2",
|
|
@@ -24626,7 +24727,7 @@ function SideNav(props) {
|
|
|
24626
24727
|
paddingBottom: "pb4"
|
|
24627
24728
|
} : {}
|
|
24628
24729
|
}), ...tid.top, children: top }),
|
|
24629
|
-
/* @__PURE__ */ (0,
|
|
24730
|
+
/* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { ...(0, import_runtime113.trussProps)({
|
|
24630
24731
|
flexGrow: "fg1",
|
|
24631
24732
|
overflowY: "oya",
|
|
24632
24733
|
display: "df",
|
|
@@ -24638,8 +24739,8 @@ function SideNav(props) {
|
|
|
24638
24739
|
...top === void 0 ? {
|
|
24639
24740
|
paddingTop: "pt5"
|
|
24640
24741
|
} : {}
|
|
24641
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ (0,
|
|
24642
|
-
footer !== void 0 && /* @__PURE__ */ (0,
|
|
24742
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(AppNavItems, { items, panelCollapsed }) }),
|
|
24743
|
+
footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { ...(0, import_runtime113.trussProps)({
|
|
24643
24744
|
flexShrink: "fs0",
|
|
24644
24745
|
paddingLeft: "pl2",
|
|
24645
24746
|
paddingRight: "pr2",
|
|
@@ -24655,10 +24756,10 @@ function SideNav(props) {
|
|
|
24655
24756
|
}
|
|
24656
24757
|
|
|
24657
24758
|
// src/components/Snackbar/useSnackbar.tsx
|
|
24658
|
-
var
|
|
24759
|
+
var import_react141 = require("react");
|
|
24659
24760
|
function useSnackbar() {
|
|
24660
24761
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
24661
|
-
const onClose = (0,
|
|
24762
|
+
const onClose = (0, import_react141.useCallback)(
|
|
24662
24763
|
(noticeId) => {
|
|
24663
24764
|
setNotices((prev) => {
|
|
24664
24765
|
let returnValue = prev;
|
|
@@ -24675,7 +24776,7 @@ function useSnackbar() {
|
|
|
24675
24776
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24676
24777
|
[]
|
|
24677
24778
|
);
|
|
24678
|
-
const triggerNotice = (0,
|
|
24779
|
+
const triggerNotice = (0, import_react141.useCallback)(
|
|
24679
24780
|
(props) => {
|
|
24680
24781
|
const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
|
|
24681
24782
|
let maybeTimeout;
|
|
@@ -24704,8 +24805,8 @@ function useSnackbar() {
|
|
|
24704
24805
|
},
|
|
24705
24806
|
[onClose, setNotices]
|
|
24706
24807
|
);
|
|
24707
|
-
const closeNotice = (0,
|
|
24708
|
-
const useSnackbarOffset = ({ bottom }) => (0,
|
|
24808
|
+
const closeNotice = (0, import_react141.useCallback)((id) => onClose(id), [onClose]);
|
|
24809
|
+
const useSnackbarOffset = ({ bottom }) => (0, import_react141.useEffect)(() => {
|
|
24709
24810
|
setOffset({ bottom });
|
|
24710
24811
|
return () => setOffset({});
|
|
24711
24812
|
}, [bottom]);
|
|
@@ -24714,11 +24815,11 @@ function useSnackbar() {
|
|
|
24714
24815
|
var snackbarId = 1;
|
|
24715
24816
|
|
|
24716
24817
|
// src/components/Stepper.tsx
|
|
24717
|
-
var import_react141 = require("react");
|
|
24718
|
-
var import_react_aria62 = require("react-aria");
|
|
24719
|
-
var import_runtime113 = require("@homebound/truss/runtime");
|
|
24720
|
-
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
24721
24818
|
var import_react142 = require("react");
|
|
24819
|
+
var import_react_aria63 = require("react-aria");
|
|
24820
|
+
var import_runtime114 = require("@homebound/truss/runtime");
|
|
24821
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
24822
|
+
var import_react143 = require("react");
|
|
24722
24823
|
var __maybeInc20 = (inc) => {
|
|
24723
24824
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
24724
24825
|
};
|
|
@@ -24736,8 +24837,8 @@ function Stepper(props) {
|
|
|
24736
24837
|
const maxStepWidth = 200;
|
|
24737
24838
|
const minStepWidth = 100;
|
|
24738
24839
|
const gap = 8;
|
|
24739
|
-
return /* @__PURE__ */ (0,
|
|
24740
|
-
/* @__PURE__ */ (0,
|
|
24840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
24841
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)("ol", { ...(0, import_runtime114.trussProps)({
|
|
24741
24842
|
padding: "p_0",
|
|
24742
24843
|
margin: "m_0",
|
|
24743
24844
|
listStyle: "lis_none",
|
|
@@ -24747,7 +24848,7 @@ function Stepper(props) {
|
|
|
24747
24848
|
}]
|
|
24748
24849
|
}), children: steps.map((step) => {
|
|
24749
24850
|
const isCurrent = currentStep === step.value;
|
|
24750
|
-
return /* @__PURE__ */ (0,
|
|
24851
|
+
return /* @__PURE__ */ (0, import_react143.createElement)("li", { ...(0, import_runtime114.trussProps)({
|
|
24751
24852
|
display: "df",
|
|
24752
24853
|
flexGrow: "fg1",
|
|
24753
24854
|
flexDirection: "fdc",
|
|
@@ -24757,9 +24858,9 @@ function Stepper(props) {
|
|
|
24757
24858
|
minWidth: ["mw_var", {
|
|
24758
24859
|
"--minWidth": `${minStepWidth}px`
|
|
24759
24860
|
}]
|
|
24760
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0,
|
|
24861
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
24761
24862
|
}) }),
|
|
24762
|
-
/* @__PURE__ */ (0,
|
|
24863
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)("div", { ...(0, import_runtime114.trussProps)({
|
|
24763
24864
|
marginTop: "mt1",
|
|
24764
24865
|
backgroundColor: "bgGray300",
|
|
24765
24866
|
height: "h_4px",
|
|
@@ -24770,12 +24871,12 @@ function Stepper(props) {
|
|
|
24770
24871
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
24771
24872
|
}],
|
|
24772
24873
|
width: "w100"
|
|
24773
|
-
}), children: /* @__PURE__ */ (0,
|
|
24874
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("div", { ...(0, import_runtime114.trussProps)({
|
|
24774
24875
|
backgroundColor: "bgBlue600",
|
|
24775
24876
|
transition: "transition_width_200ms",
|
|
24776
24877
|
height: "h100",
|
|
24777
24878
|
width: ["w_var", {
|
|
24778
|
-
"--width": (0,
|
|
24879
|
+
"--width": (0, import_runtime114.maybeCssVar)(__maybeInc20(`${(lastCompletedStep + 1) / steps.length * 100}%`))
|
|
24779
24880
|
}]
|
|
24780
24881
|
}) }) })
|
|
24781
24882
|
] });
|
|
@@ -24792,26 +24893,26 @@ function StepButton(props) {
|
|
|
24792
24893
|
onPress: onClick,
|
|
24793
24894
|
isDisabled: disabled
|
|
24794
24895
|
};
|
|
24795
|
-
const ref = (0,
|
|
24896
|
+
const ref = (0, import_react142.useRef)(null);
|
|
24796
24897
|
const {
|
|
24797
24898
|
buttonProps,
|
|
24798
24899
|
isPressed
|
|
24799
|
-
} = (0,
|
|
24900
|
+
} = (0, import_react_aria63.useButton)(ariaProps, ref);
|
|
24800
24901
|
const {
|
|
24801
24902
|
isFocusVisible,
|
|
24802
24903
|
focusProps
|
|
24803
|
-
} = (0,
|
|
24904
|
+
} = (0, import_react_aria63.useFocusRing)();
|
|
24804
24905
|
const {
|
|
24805
24906
|
hoverProps,
|
|
24806
24907
|
isHovered
|
|
24807
|
-
} = (0,
|
|
24908
|
+
} = (0, import_react_aria63.useHover)(ariaProps);
|
|
24808
24909
|
const focusRingStyles2 = state === "error" ? {
|
|
24809
24910
|
boxShadow: "bshDanger"
|
|
24810
24911
|
} : {
|
|
24811
24912
|
boxShadow: "bshFocus"
|
|
24812
24913
|
};
|
|
24813
24914
|
const tid = useTestIds(props, "stepButton");
|
|
24814
|
-
return /* @__PURE__ */ (0,
|
|
24915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...(0, import_runtime114.trussProps)({
|
|
24815
24916
|
...{
|
|
24816
24917
|
fontWeight: "fw6",
|
|
24817
24918
|
fontSize: "fz_14px",
|
|
@@ -24863,7 +24964,7 @@ function StepButton(props) {
|
|
|
24863
24964
|
} : {},
|
|
24864
24965
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
24865
24966
|
}), ...tid[defaultTestId(label)], children: [
|
|
24866
|
-
/* @__PURE__ */ (0,
|
|
24967
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
24867
24968
|
label
|
|
24868
24969
|
] });
|
|
24869
24970
|
}
|
|
@@ -24874,12 +24975,12 @@ function StepIcon({
|
|
|
24874
24975
|
isCurrent = false
|
|
24875
24976
|
}) {
|
|
24876
24977
|
if (state === "error") {
|
|
24877
|
-
return /* @__PURE__ */ (0,
|
|
24978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Icon, { icon: "errorCircle" });
|
|
24878
24979
|
}
|
|
24879
24980
|
if (state === "complete") {
|
|
24880
|
-
return /* @__PURE__ */ (0,
|
|
24981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Icon, { icon: "check" });
|
|
24881
24982
|
}
|
|
24882
|
-
return /* @__PURE__ */ (0,
|
|
24983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("div", { ...(0, import_runtime114.trussProps)({
|
|
24883
24984
|
width: "w_10px",
|
|
24884
24985
|
height: "h_10px",
|
|
24885
24986
|
borderStyle: "bss",
|
|
@@ -24894,8 +24995,8 @@ function StepIcon({
|
|
|
24894
24995
|
|
|
24895
24996
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
24896
24997
|
var import_react_dom7 = require("react-dom");
|
|
24897
|
-
var
|
|
24898
|
-
var
|
|
24998
|
+
var import_runtime115 = require("@homebound/truss/runtime");
|
|
24999
|
+
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
24899
25000
|
function SuperDrawerHeader(props) {
|
|
24900
25001
|
const {
|
|
24901
25002
|
hideControls
|
|
@@ -24912,20 +25013,20 @@ function SuperDrawerHeader(props) {
|
|
|
24912
25013
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
24913
25014
|
const isDetail = currentContent !== firstContent;
|
|
24914
25015
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
24915
|
-
return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0,
|
|
24916
|
-
isStructuredProps(props) ? /* @__PURE__ */ (0,
|
|
24917
|
-
/* @__PURE__ */ (0,
|
|
24918
|
-
/* @__PURE__ */ (0,
|
|
25016
|
+
return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
25017
|
+
isStructuredProps(props) ? /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
25018
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("div", { className: "fg1 df aic gap2", children: [
|
|
25019
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
24919
25020
|
props.left
|
|
24920
25021
|
] }),
|
|
24921
|
-
props.right && /* @__PURE__ */ (0,
|
|
24922
|
-
] }) : /* @__PURE__ */ (0,
|
|
24923
|
-
!hideControls && /* @__PURE__ */ (0,
|
|
25022
|
+
props.right && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "fs0", children: props.right })
|
|
25023
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "fg1", children: props.children }),
|
|
25024
|
+
!hideControls && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { ...(0, import_runtime115.trussProps)({
|
|
24924
25025
|
flexShrink: "fs0",
|
|
24925
25026
|
...isDetail ? {
|
|
24926
25027
|
visibility: "vh"
|
|
24927
25028
|
} : {}
|
|
24928
|
-
}), children: /* @__PURE__ */ (0,
|
|
25029
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(ButtonGroup, { buttons: [{
|
|
24929
25030
|
icon: "chevronLeft",
|
|
24930
25031
|
onClick: () => onPrevClick && onPrevClick(),
|
|
24931
25032
|
disabled: !onPrevClick
|
|
@@ -24941,18 +25042,18 @@ function isStructuredProps(props) {
|
|
|
24941
25042
|
}
|
|
24942
25043
|
|
|
24943
25044
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
24944
|
-
var
|
|
25045
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
24945
25046
|
function ConfirmCloseModal(props) {
|
|
24946
25047
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
24947
25048
|
const { modalState } = useBeamContext();
|
|
24948
25049
|
function closeModal() {
|
|
24949
25050
|
modalState.current = void 0;
|
|
24950
25051
|
}
|
|
24951
|
-
return /* @__PURE__ */ (0,
|
|
24952
|
-
/* @__PURE__ */ (0,
|
|
24953
|
-
/* @__PURE__ */ (0,
|
|
24954
|
-
/* @__PURE__ */ (0,
|
|
24955
|
-
/* @__PURE__ */ (0,
|
|
25052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [
|
|
25053
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
25054
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("p", { children: "Any changes you've made so far will be lost." }) }),
|
|
25055
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(ModalFooter, { children: [
|
|
25056
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
24956
25057
|
Button,
|
|
24957
25058
|
{
|
|
24958
25059
|
variant: "quaternary",
|
|
@@ -24963,7 +25064,7 @@ function ConfirmCloseModal(props) {
|
|
|
24963
25064
|
}
|
|
24964
25065
|
}
|
|
24965
25066
|
),
|
|
24966
|
-
/* @__PURE__ */ (0,
|
|
25067
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Button, { label: continueText, onClick: closeModal })
|
|
24967
25068
|
] })
|
|
24968
25069
|
] });
|
|
24969
25070
|
}
|
|
@@ -24972,8 +25073,8 @@ function ConfirmCloseModal(props) {
|
|
|
24972
25073
|
var import_framer_motion6 = require("framer-motion");
|
|
24973
25074
|
|
|
24974
25075
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
24975
|
-
var
|
|
24976
|
-
var
|
|
25076
|
+
var import_react144 = require("react");
|
|
25077
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
24977
25078
|
function useSuperDrawer() {
|
|
24978
25079
|
const {
|
|
24979
25080
|
drawerContentStack: contentStack,
|
|
@@ -24985,7 +25086,7 @@ function useSuperDrawer() {
|
|
|
24985
25086
|
function canCloseDrawerDetails(i, doChange) {
|
|
24986
25087
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
24987
25088
|
if (!canClose(canCloseDrawerDetail)) {
|
|
24988
|
-
openModal({ content: /* @__PURE__ */ (0,
|
|
25089
|
+
openModal({ content: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
24989
25090
|
return false;
|
|
24990
25091
|
}
|
|
24991
25092
|
}
|
|
@@ -25005,14 +25106,14 @@ function useSuperDrawer() {
|
|
|
25005
25106
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
25006
25107
|
if (!canClose(canCloseDrawer)) {
|
|
25007
25108
|
openModal({
|
|
25008
|
-
content: /* @__PURE__ */ (0,
|
|
25109
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
25009
25110
|
});
|
|
25010
25111
|
return;
|
|
25011
25112
|
}
|
|
25012
25113
|
}
|
|
25013
25114
|
doChange();
|
|
25014
25115
|
}
|
|
25015
|
-
const closeActions = (0,
|
|
25116
|
+
const closeActions = (0, import_react144.useMemo)(
|
|
25016
25117
|
() => {
|
|
25017
25118
|
return {
|
|
25018
25119
|
/** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
|
|
@@ -25047,7 +25148,7 @@ function useSuperDrawer() {
|
|
|
25047
25148
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25048
25149
|
[canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
|
|
25049
25150
|
);
|
|
25050
|
-
const actions = (0,
|
|
25151
|
+
const actions = (0, import_react144.useMemo)(
|
|
25051
25152
|
() => {
|
|
25052
25153
|
return {
|
|
25053
25154
|
// TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
|
|
@@ -25100,8 +25201,8 @@ function canClose(canCloseCheck) {
|
|
|
25100
25201
|
}
|
|
25101
25202
|
|
|
25102
25203
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
25103
|
-
var
|
|
25104
|
-
var
|
|
25204
|
+
var import_runtime116 = require("@homebound/truss/runtime");
|
|
25205
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
25105
25206
|
var SuperDrawerContent = ({
|
|
25106
25207
|
children,
|
|
25107
25208
|
actions
|
|
@@ -25121,17 +25222,17 @@ var SuperDrawerContent = ({
|
|
|
25121
25222
|
} = firstContent ?? {};
|
|
25122
25223
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
25123
25224
|
if (kind === "open") {
|
|
25124
|
-
return /* @__PURE__ */ (0,
|
|
25225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_framer_motion6.motion.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
25125
25226
|
} else if (kind === "detail") {
|
|
25126
|
-
return /* @__PURE__ */ (0,
|
|
25227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_framer_motion6.motion.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
25127
25228
|
overflow: "auto"
|
|
25128
25229
|
}, transition: {
|
|
25129
25230
|
overflow: {
|
|
25130
25231
|
delay: 0.3
|
|
25131
25232
|
}
|
|
25132
25233
|
}, children: [
|
|
25133
|
-
/* @__PURE__ */ (0,
|
|
25134
|
-
/* @__PURE__ */ (0,
|
|
25234
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
25235
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_framer_motion6.motion.div, { initial: {
|
|
25135
25236
|
x: width2,
|
|
25136
25237
|
opacity: 0
|
|
25137
25238
|
}, animate: {
|
|
@@ -25149,7 +25250,7 @@ var SuperDrawerContent = ({
|
|
|
25149
25250
|
}, className: "pt2", children: children2 })
|
|
25150
25251
|
] }, "content");
|
|
25151
25252
|
} else {
|
|
25152
|
-
return /* @__PURE__ */ (0,
|
|
25253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_framer_motion6.motion.div, { ...(0, import_runtime116.mergeProps)(void 0, {
|
|
25153
25254
|
overflow: "auto"
|
|
25154
25255
|
}, {
|
|
25155
25256
|
paddingTop: "pt3",
|
|
@@ -25160,9 +25261,9 @@ var SuperDrawerContent = ({
|
|
|
25160
25261
|
}) }, "content");
|
|
25161
25262
|
}
|
|
25162
25263
|
}
|
|
25163
|
-
return /* @__PURE__ */ (0,
|
|
25264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
25164
25265
|
wrapWithMotionAndMaybeBack(children),
|
|
25165
|
-
actions && /* @__PURE__ */ (0,
|
|
25266
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Button, { ...buttonProps }, i)) }) })
|
|
25166
25267
|
] });
|
|
25167
25268
|
};
|
|
25168
25269
|
|
|
@@ -25205,7 +25306,7 @@ function visit(rows, fn) {
|
|
|
25205
25306
|
}
|
|
25206
25307
|
|
|
25207
25308
|
// src/components/TagGroup.tsx
|
|
25208
|
-
var
|
|
25309
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
25209
25310
|
function TagGroup(props) {
|
|
25210
25311
|
const {
|
|
25211
25312
|
tags,
|
|
@@ -25213,30 +25314,30 @@ function TagGroup(props) {
|
|
|
25213
25314
|
...otherProps
|
|
25214
25315
|
} = props;
|
|
25215
25316
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
25216
|
-
return /* @__PURE__ */ (0,
|
|
25217
|
-
tags.map((tag) => /* @__PURE__ */ (0,
|
|
25218
|
-
onEdit && /* @__PURE__ */ (0,
|
|
25317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("div", { ...tid, className: "df aic fww gap1", children: [
|
|
25318
|
+
tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
25319
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
25219
25320
|
] });
|
|
25220
25321
|
}
|
|
25221
25322
|
|
|
25222
25323
|
// src/components/Toast/useToast.tsx
|
|
25223
|
-
var
|
|
25324
|
+
var import_react145 = require("react");
|
|
25224
25325
|
function useToast() {
|
|
25225
25326
|
const { setNotice, clear } = useToastContext();
|
|
25226
|
-
const showToast = (0,
|
|
25327
|
+
const showToast = (0, import_react145.useCallback)((props) => setNotice(props), [setNotice]);
|
|
25227
25328
|
return { showToast, clear };
|
|
25228
25329
|
}
|
|
25229
25330
|
|
|
25230
25331
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
25231
|
-
var
|
|
25232
|
-
var
|
|
25332
|
+
var import_runtime117 = require("@homebound/truss/runtime");
|
|
25333
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
25233
25334
|
var __maybeInc21 = (inc) => {
|
|
25234
25335
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25235
25336
|
};
|
|
25236
25337
|
function SideNavLayout(props) {
|
|
25237
25338
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
25238
|
-
if (hasProvider) return /* @__PURE__ */ (0,
|
|
25239
|
-
return /* @__PURE__ */ (0,
|
|
25339
|
+
if (hasProvider) return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(SideNavLayoutContent, { ...props });
|
|
25340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(SideNavLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(SideNavLayoutContent, { ...props }) });
|
|
25240
25341
|
}
|
|
25241
25342
|
function SideNavLayoutContent(props) {
|
|
25242
25343
|
const {
|
|
@@ -25258,7 +25359,7 @@ function SideNavLayoutContent(props) {
|
|
|
25258
25359
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
25259
25360
|
const navTop = bannerAndNavbarChromeTop();
|
|
25260
25361
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
25261
|
-
const rail = showRail && /* @__PURE__ */ (0,
|
|
25362
|
+
const rail = showRail && /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)("div", { ...(0, import_runtime117.trussProps)({
|
|
25262
25363
|
...{
|
|
25263
25364
|
display: "df",
|
|
25264
25365
|
flexDirection: "fdc",
|
|
@@ -25282,14 +25383,14 @@ function SideNavLayoutContent(props) {
|
|
|
25282
25383
|
position: "sticky",
|
|
25283
25384
|
left: "left0",
|
|
25284
25385
|
zIndex: ["z_var", {
|
|
25285
|
-
"--zIndex": (0,
|
|
25386
|
+
"--zIndex": (0, import_runtime117.maybeCssVar)(zIndices.sideNav)
|
|
25286
25387
|
}],
|
|
25287
25388
|
top: ["top_var", {
|
|
25288
|
-
"--top": (0,
|
|
25389
|
+
"--top": (0, import_runtime117.maybeCssVar)(__maybeInc21(navTop))
|
|
25289
25390
|
}],
|
|
25290
25391
|
alignSelf: "asfs",
|
|
25291
25392
|
height: ["h_var", {
|
|
25292
|
-
"--height": (0,
|
|
25393
|
+
"--height": (0, import_runtime117.maybeCssVar)(__maybeInc21(railViewportHeight))
|
|
25293
25394
|
}],
|
|
25294
25395
|
width: ["w_var", {
|
|
25295
25396
|
"--width": `${collapsed ? railCollapsedWidthPx : railWidthPx}px`
|
|
@@ -25299,11 +25400,11 @@ function SideNavLayoutContent(props) {
|
|
|
25299
25400
|
position: "fixed",
|
|
25300
25401
|
left: "left0",
|
|
25301
25402
|
top: ["top_var", {
|
|
25302
|
-
"--top": (0,
|
|
25403
|
+
"--top": (0, import_runtime117.maybeCssVar)(__maybeInc21(navTop))
|
|
25303
25404
|
}],
|
|
25304
25405
|
bottom: "bottom0",
|
|
25305
25406
|
zIndex: ["z_var", {
|
|
25306
|
-
"--zIndex": (0,
|
|
25407
|
+
"--zIndex": (0, import_runtime117.maybeCssVar)(zIndices.sideNav)
|
|
25307
25408
|
}]
|
|
25308
25409
|
},
|
|
25309
25410
|
...collapsed ? {
|
|
@@ -25315,18 +25416,18 @@ function SideNavLayoutContent(props) {
|
|
|
25315
25416
|
}
|
|
25316
25417
|
}
|
|
25317
25418
|
}), ...tid.sideNav, children: [
|
|
25318
|
-
showCollapseToggle && /* @__PURE__ */ (0,
|
|
25319
|
-
/* @__PURE__ */ (0,
|
|
25419
|
+
showCollapseToggle && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
25420
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(SideNav, { ...sideNav }) })
|
|
25320
25421
|
] });
|
|
25321
|
-
return /* @__PURE__ */ (0,
|
|
25422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)("div", { ...(0, import_runtime117.mergeProps)(void 0, {
|
|
25322
25423
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
25323
25424
|
}, {
|
|
25324
25425
|
display: "df",
|
|
25325
25426
|
flexDirection: "fdr",
|
|
25326
25427
|
width: "w100"
|
|
25327
25428
|
}), ...tid, children: [
|
|
25328
|
-
contrastRail ? /* @__PURE__ */ (0,
|
|
25329
|
-
/* @__PURE__ */ (0,
|
|
25429
|
+
contrastRail ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(ContrastScope, { children: rail }) : rail,
|
|
25430
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { ...(0, import_runtime117.trussProps)({
|
|
25330
25431
|
display: "df",
|
|
25331
25432
|
flexDirection: "fdc",
|
|
25332
25433
|
flexGrow: "fg1",
|
|
@@ -25342,8 +25443,8 @@ function SideNavLayoutContent(props) {
|
|
|
25342
25443
|
}
|
|
25343
25444
|
|
|
25344
25445
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
25345
|
-
var
|
|
25346
|
-
var
|
|
25446
|
+
var import_runtime118 = require("@homebound/truss/runtime");
|
|
25447
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
25347
25448
|
var __maybeInc22 = (inc) => {
|
|
25348
25449
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25349
25450
|
};
|
|
@@ -25359,38 +25460,38 @@ function EnvironmentBannerLayout(props) {
|
|
|
25359
25460
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
25360
25461
|
};
|
|
25361
25462
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
25362
|
-
return /* @__PURE__ */ (0,
|
|
25463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)("div", { ...(0, import_runtime118.mergeProps)(void 0, style, {
|
|
25363
25464
|
display: "df",
|
|
25364
25465
|
flexDirection: "fdc",
|
|
25365
25466
|
width: "wfc",
|
|
25366
25467
|
minWidth: "mw100"
|
|
25367
25468
|
}), ...tid, children: [
|
|
25368
|
-
showBanner && environmentBanner && /* @__PURE__ */ (0,
|
|
25469
|
+
showBanner && environmentBanner && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ...(0, import_runtime118.mergeProps)(void 0, {
|
|
25369
25470
|
height: environmentBannerSizePx
|
|
25370
25471
|
}, {
|
|
25371
25472
|
flexShrink: "fs0",
|
|
25372
25473
|
width: "w100"
|
|
25373
|
-
}), children: /* @__PURE__ */ (0,
|
|
25474
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ...(0, import_runtime118.trussProps)({
|
|
25374
25475
|
position: "fixed",
|
|
25375
25476
|
top: "top0",
|
|
25376
25477
|
left: "left0",
|
|
25377
25478
|
zIndex: ["z_var", {
|
|
25378
|
-
"--zIndex": (0,
|
|
25479
|
+
"--zIndex": (0, import_runtime118.maybeCssVar)(zIndices.environmentBanner)
|
|
25379
25480
|
}],
|
|
25380
25481
|
width: ["w_var", {
|
|
25381
|
-
"--width": (0,
|
|
25482
|
+
"--width": (0, import_runtime118.maybeCssVar)(__maybeInc22(innerWidth))
|
|
25382
25483
|
}]
|
|
25383
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0,
|
|
25484
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
25384
25485
|
children
|
|
25385
25486
|
] }) }) });
|
|
25386
25487
|
}
|
|
25387
25488
|
|
|
25388
25489
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25389
|
-
var
|
|
25390
|
-
var
|
|
25490
|
+
var import_react149 = require("react");
|
|
25491
|
+
var import_runtime119 = require("@homebound/truss/runtime");
|
|
25391
25492
|
|
|
25392
25493
|
// src/layouts/useAutoHideOnScroll.ts
|
|
25393
|
-
var
|
|
25494
|
+
var import_react146 = require("react");
|
|
25394
25495
|
var THRESHOLD = 80;
|
|
25395
25496
|
function getInitialAutoHideState() {
|
|
25396
25497
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -25400,15 +25501,15 @@ function getInitialAutoHideState() {
|
|
|
25400
25501
|
}
|
|
25401
25502
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
25402
25503
|
const initial = getInitialAutoHideState();
|
|
25403
|
-
const [state, setState] = (0,
|
|
25404
|
-
const stateRef = (0,
|
|
25405
|
-
const [atTop, setAtTop] = (0,
|
|
25406
|
-
const atTopRef = (0,
|
|
25407
|
-
const getTopOffsetRef = (0,
|
|
25504
|
+
const [state, setState] = (0, import_react146.useState)(initial.state);
|
|
25505
|
+
const stateRef = (0, import_react146.useRef)(initial.state);
|
|
25506
|
+
const [atTop, setAtTop] = (0, import_react146.useState)(initial.atTop);
|
|
25507
|
+
const atTopRef = (0, import_react146.useRef)(initial.atTop);
|
|
25508
|
+
const getTopOffsetRef = (0, import_react146.useRef)(getTopOffset);
|
|
25408
25509
|
getTopOffsetRef.current = getTopOffset;
|
|
25409
|
-
const lastScrollY = (0,
|
|
25410
|
-
const lastScrollHeight = (0,
|
|
25411
|
-
(0,
|
|
25510
|
+
const lastScrollY = (0, import_react146.useRef)(Number.POSITIVE_INFINITY);
|
|
25511
|
+
const lastScrollHeight = (0, import_react146.useRef)(0);
|
|
25512
|
+
(0, import_react146.useLayoutEffect)(() => {
|
|
25412
25513
|
if (!enabled) {
|
|
25413
25514
|
stateRef.current = "static";
|
|
25414
25515
|
atTopRef.current = true;
|
|
@@ -25481,34 +25582,34 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
25481
25582
|
|
|
25482
25583
|
// src/layouts/useMeasuredHeight.ts
|
|
25483
25584
|
var import_utils169 = require("@react-aria/utils");
|
|
25484
|
-
var
|
|
25585
|
+
var import_react147 = require("react");
|
|
25485
25586
|
function useMeasuredHeight(ref, enabled) {
|
|
25486
|
-
const [height, setHeight] = (0,
|
|
25487
|
-
const syncElementHeight = (0,
|
|
25587
|
+
const [height, setHeight] = (0, import_react147.useState)(0);
|
|
25588
|
+
const syncElementHeight = (0, import_react147.useCallback)(() => {
|
|
25488
25589
|
const el = ref.current;
|
|
25489
25590
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
25490
25591
|
setHeight((prev) => prev === next ? prev : next);
|
|
25491
25592
|
}, [ref]);
|
|
25492
25593
|
(0, import_utils169.useResizeObserver)({ ref, onResize: syncElementHeight });
|
|
25493
|
-
(0,
|
|
25594
|
+
(0, import_react147.useLayoutEffect)(() => {
|
|
25494
25595
|
syncElementHeight();
|
|
25495
25596
|
}, [enabled, syncElementHeight]);
|
|
25496
25597
|
return height;
|
|
25497
25598
|
}
|
|
25498
25599
|
|
|
25499
25600
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
25500
|
-
var
|
|
25501
|
-
var
|
|
25502
|
-
var NavbarLayoutHeightContext = (0,
|
|
25601
|
+
var import_react148 = require("react");
|
|
25602
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
25603
|
+
var NavbarLayoutHeightContext = (0, import_react148.createContext)(0);
|
|
25503
25604
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
25504
|
-
return /* @__PURE__ */ (0,
|
|
25605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(NavbarLayoutHeightContext.Provider, { value, children });
|
|
25505
25606
|
}
|
|
25506
25607
|
function useNavbarLayoutHeight() {
|
|
25507
|
-
return (0,
|
|
25608
|
+
return (0, import_react148.useContext)(NavbarLayoutHeightContext);
|
|
25508
25609
|
}
|
|
25509
25610
|
|
|
25510
25611
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25511
|
-
var
|
|
25612
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
25512
25613
|
var __maybeInc23 = (inc) => {
|
|
25513
25614
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25514
25615
|
};
|
|
@@ -25518,8 +25619,8 @@ function NavbarLayout(props) {
|
|
|
25518
25619
|
children
|
|
25519
25620
|
} = props;
|
|
25520
25621
|
const tid = useTestIds(props, "navbarLayout");
|
|
25521
|
-
const navMetricsRef = (0,
|
|
25522
|
-
const spacerRef = (0,
|
|
25622
|
+
const navMetricsRef = (0, import_react149.useRef)(null);
|
|
25623
|
+
const spacerRef = (0, import_react149.useRef)(null);
|
|
25523
25624
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
25524
25625
|
const {
|
|
25525
25626
|
state: autoHideState,
|
|
@@ -25537,10 +25638,10 @@ function NavbarLayout(props) {
|
|
|
25537
25638
|
position: "sticky",
|
|
25538
25639
|
left: "left0",
|
|
25539
25640
|
zIndex: ["z_var", {
|
|
25540
|
-
"--zIndex": (0,
|
|
25641
|
+
"--zIndex": (0, import_runtime119.maybeCssVar)(zIndices.navbar)
|
|
25541
25642
|
}],
|
|
25542
25643
|
width: ["w_var", {
|
|
25543
|
-
"--width": (0,
|
|
25644
|
+
"--width": (0, import_runtime119.maybeCssVar)(__maybeInc23(innerWidth))
|
|
25544
25645
|
}]
|
|
25545
25646
|
}
|
|
25546
25647
|
) : (
|
|
@@ -25549,10 +25650,10 @@ function NavbarLayout(props) {
|
|
|
25549
25650
|
position: "fixed",
|
|
25550
25651
|
left: "left0",
|
|
25551
25652
|
zIndex: ["z_var", {
|
|
25552
|
-
"--zIndex": (0,
|
|
25653
|
+
"--zIndex": (0, import_runtime119.maybeCssVar)(zIndices.navbar)
|
|
25553
25654
|
}],
|
|
25554
25655
|
width: ["w_var", {
|
|
25555
|
-
"--width": (0,
|
|
25656
|
+
"--width": (0, import_runtime119.maybeCssVar)(__maybeInc23(innerWidth))
|
|
25556
25657
|
}],
|
|
25557
25658
|
transition: "transitionTop"
|
|
25558
25659
|
}
|
|
@@ -25561,25 +25662,25 @@ function NavbarLayout(props) {
|
|
|
25561
25662
|
const innerStyle = autoHideState !== "static" ? {
|
|
25562
25663
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
25563
25664
|
} : void 0;
|
|
25564
|
-
const navbarEl = (0,
|
|
25565
|
-
return /* @__PURE__ */ (0,
|
|
25665
|
+
const navbarEl = (0, import_react149.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(Navbar, { ...navbar }), [navbar]);
|
|
25666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("div", { ...(0, import_runtime119.mergeProps)(void 0, cssVars, {
|
|
25566
25667
|
display: "df",
|
|
25567
25668
|
flexDirection: "fdc",
|
|
25568
25669
|
width: "wfc",
|
|
25569
25670
|
minWidth: "mw100"
|
|
25570
25671
|
}), ...tid, children: [
|
|
25571
|
-
/* @__PURE__ */ (0,
|
|
25672
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ref: spacerRef, ...(0, import_runtime119.mergeProps)(void 0, {
|
|
25572
25673
|
height: navHeight
|
|
25573
25674
|
}, {
|
|
25574
25675
|
flexShrink: "fs0",
|
|
25575
25676
|
width: "w100"
|
|
25576
|
-
}), children: /* @__PURE__ */ (0,
|
|
25577
|
-
/* @__PURE__ */ (0,
|
|
25677
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime119.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
25678
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
25578
25679
|
] }) }) });
|
|
25579
25680
|
}
|
|
25580
25681
|
|
|
25581
25682
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25582
|
-
var
|
|
25683
|
+
var import_react150 = require("react");
|
|
25583
25684
|
|
|
25584
25685
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
25585
25686
|
function useBannerAndNavbarHeight() {
|
|
@@ -25587,8 +25688,8 @@ function useBannerAndNavbarHeight() {
|
|
|
25587
25688
|
}
|
|
25588
25689
|
|
|
25589
25690
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25590
|
-
var
|
|
25591
|
-
var
|
|
25691
|
+
var import_runtime120 = require("@homebound/truss/runtime");
|
|
25692
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
25592
25693
|
var __maybeInc24 = (inc) => {
|
|
25593
25694
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25594
25695
|
};
|
|
@@ -25599,11 +25700,11 @@ function PageHeaderLayout(props) {
|
|
|
25599
25700
|
} = props;
|
|
25600
25701
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
25601
25702
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
25602
|
-
const bannerAndNavbarHeightRef = (0,
|
|
25703
|
+
const bannerAndNavbarHeightRef = (0, import_react150.useRef)(bannerAndNavbarHeight);
|
|
25603
25704
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
25604
|
-
const getBannerAndNavbarHeight = (0,
|
|
25605
|
-
const headerMetricsRef = (0,
|
|
25606
|
-
const spacerRef = (0,
|
|
25705
|
+
const getBannerAndNavbarHeight = (0, import_react150.useCallback)(() => bannerAndNavbarHeightRef.current, []);
|
|
25706
|
+
const headerMetricsRef = (0, import_react150.useRef)(null);
|
|
25707
|
+
const spacerRef = (0, import_react150.useRef)(null);
|
|
25607
25708
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
25608
25709
|
const {
|
|
25609
25710
|
state: autoHideState,
|
|
@@ -25619,43 +25720,43 @@ function PageHeaderLayout(props) {
|
|
|
25619
25720
|
const innerCss = autoHideState === "static" ? {
|
|
25620
25721
|
position: "sticky",
|
|
25621
25722
|
left: ["left_var", {
|
|
25622
|
-
"--left": (0,
|
|
25723
|
+
"--left": (0, import_runtime120.maybeCssVar)(__maybeInc24(headerLeft))
|
|
25623
25724
|
}],
|
|
25624
25725
|
width: ["w_var", {
|
|
25625
|
-
"--width": (0,
|
|
25726
|
+
"--width": (0, import_runtime120.maybeCssVar)(__maybeInc24(headerWidth))
|
|
25626
25727
|
}],
|
|
25627
25728
|
zIndex: ["z_var", {
|
|
25628
|
-
"--zIndex": (0,
|
|
25729
|
+
"--zIndex": (0, import_runtime120.maybeCssVar)(zIndices.pageStickyHeader)
|
|
25629
25730
|
}]
|
|
25630
25731
|
} : {
|
|
25631
25732
|
position: "fixed",
|
|
25632
25733
|
left: ["left_var", {
|
|
25633
|
-
"--left": (0,
|
|
25734
|
+
"--left": (0, import_runtime120.maybeCssVar)(__maybeInc24(headerLeft))
|
|
25634
25735
|
}],
|
|
25635
25736
|
width: ["w_var", {
|
|
25636
|
-
"--width": (0,
|
|
25737
|
+
"--width": (0, import_runtime120.maybeCssVar)(__maybeInc24(headerWidth))
|
|
25637
25738
|
}],
|
|
25638
25739
|
zIndex: ["z_var", {
|
|
25639
|
-
"--zIndex": (0,
|
|
25740
|
+
"--zIndex": (0, import_runtime120.maybeCssVar)(zIndices.pageStickyHeader)
|
|
25640
25741
|
}],
|
|
25641
25742
|
transition: "transitionTop"
|
|
25642
25743
|
};
|
|
25643
25744
|
const innerStyle = autoHideState !== "static" ? {
|
|
25644
25745
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
25645
25746
|
} : void 0;
|
|
25646
|
-
const pageHeaderEl = (0,
|
|
25647
|
-
return /* @__PURE__ */ (0,
|
|
25747
|
+
const pageHeaderEl = (0, import_react150.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
25748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { ...(0, import_runtime120.mergeProps)(void 0, cssVars, {
|
|
25648
25749
|
display: "df",
|
|
25649
25750
|
flexDirection: "fdc",
|
|
25650
25751
|
width: "w100"
|
|
25651
25752
|
}), ...tid, children: [
|
|
25652
|
-
/* @__PURE__ */ (0,
|
|
25753
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ref: spacerRef, ...(0, import_runtime120.mergeProps)(void 0, {
|
|
25653
25754
|
height: headerHeight
|
|
25654
25755
|
}, {
|
|
25655
25756
|
flexShrink: "fs0",
|
|
25656
25757
|
width: "w100"
|
|
25657
|
-
}), children: /* @__PURE__ */ (0,
|
|
25658
|
-
/* @__PURE__ */ (0,
|
|
25758
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime120.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
25759
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
25659
25760
|
] }) });
|
|
25660
25761
|
}
|
|
25661
25762
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -25749,6 +25850,7 @@ function PageHeaderLayout(props) {
|
|
|
25749
25850
|
Icon,
|
|
25750
25851
|
IconButton,
|
|
25751
25852
|
Icons,
|
|
25853
|
+
JumpLink,
|
|
25752
25854
|
KEPT_GROUP,
|
|
25753
25855
|
Loader,
|
|
25754
25856
|
LoadingSkeleton,
|