@homebound/beam 3.48.0 → 3.49.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.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.js
CHANGED
|
@@ -22898,16 +22898,116 @@ function HomeboundLogo(props) {
|
|
|
22898
22898
|
}), children: /* @__PURE__ */ jsx179("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" }) });
|
|
22899
22899
|
}
|
|
22900
22900
|
|
|
22901
|
+
// src/components/JumpLink.tsx
|
|
22902
|
+
import { useRef as useRef56 } from "react";
|
|
22903
|
+
import { mergeProps as mergeProps27, useFocusRing as useFocusRing15, useHover as useHover19, useLink } from "react-aria";
|
|
22904
|
+
import { trussProps as trussProps93 } from "@homebound/truss/runtime";
|
|
22905
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
22906
|
+
function JumpLink(props) {
|
|
22907
|
+
const {
|
|
22908
|
+
label,
|
|
22909
|
+
active,
|
|
22910
|
+
href,
|
|
22911
|
+
disabled,
|
|
22912
|
+
__storyState,
|
|
22913
|
+
...otherProps
|
|
22914
|
+
} = props;
|
|
22915
|
+
const ref = useRef56(null);
|
|
22916
|
+
const {
|
|
22917
|
+
linkProps
|
|
22918
|
+
} = useLink({
|
|
22919
|
+
isDisabled: disabled,
|
|
22920
|
+
onClick: handleClick,
|
|
22921
|
+
href
|
|
22922
|
+
}, ref);
|
|
22923
|
+
const {
|
|
22924
|
+
isFocusVisible: isFocusVisibleFromEvents,
|
|
22925
|
+
focusProps
|
|
22926
|
+
} = useFocusRing15();
|
|
22927
|
+
const {
|
|
22928
|
+
hoverProps,
|
|
22929
|
+
isHovered: isHoveredFromEvents
|
|
22930
|
+
} = useHover19({
|
|
22931
|
+
isDisabled: disabled
|
|
22932
|
+
});
|
|
22933
|
+
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
22934
|
+
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
22935
|
+
const tid = useTestIds(otherProps, "jumpLink");
|
|
22936
|
+
function handleClick(e) {
|
|
22937
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
|
|
22938
|
+
e.preventDefault();
|
|
22939
|
+
const target = document.getElementById(href.replace(/^#/, ""));
|
|
22940
|
+
if (target) {
|
|
22941
|
+
window.scrollTo({
|
|
22942
|
+
top: target.getBoundingClientRect().top + window.scrollY,
|
|
22943
|
+
behavior: "smooth"
|
|
22944
|
+
});
|
|
22945
|
+
}
|
|
22946
|
+
}
|
|
22947
|
+
return /* @__PURE__ */ jsx180("a", { ref, ...mergeProps27(linkProps, focusProps, hoverProps), ...tid, ...trussProps93({
|
|
22948
|
+
...jumpLinkStyles.baseStyles,
|
|
22949
|
+
...active && jumpLinkStyles.activeStyles,
|
|
22950
|
+
...isHovered && !disabled && jumpLinkStyles.hoverStyles,
|
|
22951
|
+
...isFocusVisible && jumpLinkStyles.focusStyles,
|
|
22952
|
+
...disabled && jumpLinkStyles.disabledStyles,
|
|
22953
|
+
...disabled && active && jumpLinkStyles.disabledActiveStyles
|
|
22954
|
+
}), children: /* @__PURE__ */ jsx180("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_2", children: label }) });
|
|
22955
|
+
}
|
|
22956
|
+
var jumpLinkStyles = {
|
|
22957
|
+
baseStyles: {
|
|
22958
|
+
width: "w100",
|
|
22959
|
+
fontWeight: "fw4",
|
|
22960
|
+
fontSize: "fz_16px",
|
|
22961
|
+
lineHeight: "lh_24px",
|
|
22962
|
+
paddingLeft: "pl3",
|
|
22963
|
+
paddingRight: "pr3",
|
|
22964
|
+
paddingTop: "pt1",
|
|
22965
|
+
paddingBottom: "pb1",
|
|
22966
|
+
color: ["color_var", {
|
|
22967
|
+
"--color": "var(--b-text-link-default)"
|
|
22968
|
+
}],
|
|
22969
|
+
borderLeftStyle: "bls_solid",
|
|
22970
|
+
borderLeftWidth: "borderLeftWidth_3px",
|
|
22971
|
+
borderColor: "bcTransparent"
|
|
22972
|
+
},
|
|
22973
|
+
activeStyles: {
|
|
22974
|
+
fontWeight: "fw6",
|
|
22975
|
+
fontSize: "fz_16px",
|
|
22976
|
+
lineHeight: "lh_24px",
|
|
22977
|
+
borderColor: "bcBlue600"
|
|
22978
|
+
},
|
|
22979
|
+
hoverStyles: {
|
|
22980
|
+
backgroundColor: ["bgColor_var", {
|
|
22981
|
+
"--backgroundColor": "var(--b-neutral-fill-hover-subtle)"
|
|
22982
|
+
}],
|
|
22983
|
+
color: ["color_var", {
|
|
22984
|
+
"--color": "var(--b-text-link-hover)"
|
|
22985
|
+
}]
|
|
22986
|
+
},
|
|
22987
|
+
focusStyles: {
|
|
22988
|
+
boxShadow: "bshFocus"
|
|
22989
|
+
},
|
|
22990
|
+
disabledStyles: {
|
|
22991
|
+
color: ["color_var", {
|
|
22992
|
+
"--color": "var(--b-text-link-disabled)"
|
|
22993
|
+
}],
|
|
22994
|
+
cursor: "cursorNotAllowed"
|
|
22995
|
+
},
|
|
22996
|
+
disabledActiveStyles: {
|
|
22997
|
+
borderColor: "bcBlue200"
|
|
22998
|
+
}
|
|
22999
|
+
};
|
|
23000
|
+
|
|
22901
23001
|
// src/components/MaxLines.tsx
|
|
22902
23002
|
import { useLayoutEffect as useLayoutEffect7, useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
|
|
22903
|
-
import { useCallback as useCallback31, useEffect as useEffect32, useRef as
|
|
22904
|
-
import { trussProps as
|
|
22905
|
-
import { jsx as
|
|
23003
|
+
import { useCallback as useCallback31, useEffect as useEffect32, useRef as useRef57, useState as useState50 } from "react";
|
|
23004
|
+
import { trussProps as trussProps94, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
|
|
23005
|
+
import { jsx as jsx181, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
22906
23006
|
function MaxLines({
|
|
22907
23007
|
maxLines,
|
|
22908
23008
|
children
|
|
22909
23009
|
}) {
|
|
22910
|
-
const elRef =
|
|
23010
|
+
const elRef = useRef57(null);
|
|
22911
23011
|
const [hasMore, setHasMore] = useState50(false);
|
|
22912
23012
|
const [expanded, setExpanded] = useState50(false);
|
|
22913
23013
|
useLayoutEffect7(() => {
|
|
@@ -22926,7 +23026,7 @@ function MaxLines({
|
|
|
22926
23026
|
onResize
|
|
22927
23027
|
});
|
|
22928
23028
|
return /* @__PURE__ */ jsxs88("div", { children: [
|
|
22929
|
-
/* @__PURE__ */
|
|
23029
|
+
/* @__PURE__ */ jsx181("div", { ref: elRef, ...trussProps94({
|
|
22930
23030
|
...!expanded ? {
|
|
22931
23031
|
WebkitLineClamp: ["lineClamp_var", {
|
|
22932
23032
|
"--WebkitLineClamp": maybeCssVar50(maxLines)
|
|
@@ -22937,7 +23037,7 @@ function MaxLines({
|
|
|
22937
23037
|
textOverflow: "to_ellipsis"
|
|
22938
23038
|
} : {}
|
|
22939
23039
|
}), children }),
|
|
22940
|
-
hasMore && /* @__PURE__ */
|
|
23040
|
+
hasMore && /* @__PURE__ */ jsx181("button", { className: "db fw4 fz_14px lh_20px", onClick: () => setExpanded((prev) => !prev), children: expanded ? "Show Less" : "Show More" })
|
|
22941
23041
|
] });
|
|
22942
23042
|
}
|
|
22943
23043
|
|
|
@@ -22950,10 +23050,10 @@ import { camelCase as camelCase5, kebabCase } from "change-case";
|
|
|
22950
23050
|
import { useCallback as useCallback33, useEffect as useEffect33, useMemo as useMemo51, useState as useState52 } from "react";
|
|
22951
23051
|
|
|
22952
23052
|
// src/components/AppNav/AppNavGroupTrigger.tsx
|
|
22953
|
-
import { useMemo as useMemo50, useRef as
|
|
22954
|
-
import { mergeProps as
|
|
22955
|
-
import { trussProps as
|
|
22956
|
-
import { jsx as
|
|
23053
|
+
import { useMemo as useMemo50, useRef as useRef58 } from "react";
|
|
23054
|
+
import { mergeProps as mergeProps28, useButton as useButton11, useFocusRing as useFocusRing16, useHover as useHover20 } from "react-aria";
|
|
23055
|
+
import { trussProps as trussProps95, mergeProps as mergeProps_14 } from "@homebound/truss/runtime";
|
|
23056
|
+
import { jsx as jsx182, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
22957
23057
|
function AppNavGroupTrigger(props) {
|
|
22958
23058
|
const {
|
|
22959
23059
|
label,
|
|
@@ -22963,7 +23063,7 @@ function AppNavGroupTrigger(props) {
|
|
|
22963
23063
|
active = false
|
|
22964
23064
|
} = props;
|
|
22965
23065
|
const tid = useTestIds(props, "trigger");
|
|
22966
|
-
const ref =
|
|
23066
|
+
const ref = useRef58(null);
|
|
22967
23067
|
const {
|
|
22968
23068
|
buttonProps,
|
|
22969
23069
|
isPressed
|
|
@@ -22974,18 +23074,18 @@ function AppNavGroupTrigger(props) {
|
|
|
22974
23074
|
const {
|
|
22975
23075
|
hoverProps,
|
|
22976
23076
|
isHovered
|
|
22977
|
-
} =
|
|
23077
|
+
} = useHover20({});
|
|
22978
23078
|
const {
|
|
22979
23079
|
isFocusVisible,
|
|
22980
23080
|
focusProps
|
|
22981
|
-
} =
|
|
23081
|
+
} = useFocusRing16();
|
|
22982
23082
|
const {
|
|
22983
23083
|
baseStyles: baseStyles4,
|
|
22984
23084
|
focusRingStyles: focusRingStyles2,
|
|
22985
23085
|
hoverStyles: hoverStyles4,
|
|
22986
23086
|
pressedStyles: pressedStyles2
|
|
22987
23087
|
} = useMemo50(() => getNavLinkStyles("side"), []);
|
|
22988
|
-
return /* @__PURE__ */ jsxs89("button", { type: "button", ...
|
|
23088
|
+
return /* @__PURE__ */ jsxs89("button", { type: "button", ...mergeProps28(buttonProps, focusProps, hoverProps, tid.trigger, {
|
|
22989
23089
|
ref,
|
|
22990
23090
|
"aria-expanded": expanded,
|
|
22991
23091
|
"aria-controls": navGroupId,
|
|
@@ -23003,7 +23103,7 @@ function AppNavGroupTrigger(props) {
|
|
|
23003
23103
|
})
|
|
23004
23104
|
}), children: [
|
|
23005
23105
|
label,
|
|
23006
|
-
/* @__PURE__ */
|
|
23106
|
+
/* @__PURE__ */ jsx182("div", { ...trussProps95({
|
|
23007
23107
|
...{
|
|
23008
23108
|
display: "df",
|
|
23009
23109
|
alignItems: "aic",
|
|
@@ -23013,7 +23113,7 @@ function AppNavGroupTrigger(props) {
|
|
|
23013
23113
|
...props.expanded ? {
|
|
23014
23114
|
transform: "transform_rotate_180deg"
|
|
23015
23115
|
} : {}
|
|
23016
|
-
}), children: /* @__PURE__ */
|
|
23116
|
+
}), children: /* @__PURE__ */ jsx182(Icon, { icon: "chevronDown" }) })
|
|
23017
23117
|
] });
|
|
23018
23118
|
}
|
|
23019
23119
|
|
|
@@ -23156,8 +23256,8 @@ function useAppNavGroupExpanded(linkGroup) {
|
|
|
23156
23256
|
}
|
|
23157
23257
|
|
|
23158
23258
|
// src/components/AppNav/AppNavGroup.tsx
|
|
23159
|
-
import { trussProps as
|
|
23160
|
-
import { Fragment as Fragment41, jsx as
|
|
23259
|
+
import { trussProps as trussProps96, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
|
|
23260
|
+
import { Fragment as Fragment41, jsx as jsx183, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
23161
23261
|
var __maybeInc19 = (inc) => {
|
|
23162
23262
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
23163
23263
|
};
|
|
@@ -23168,9 +23268,9 @@ function AppNavGroupView(props) {
|
|
|
23168
23268
|
} = props;
|
|
23169
23269
|
const tid = useTestIds(props, "linkGroup");
|
|
23170
23270
|
if (panelCollapsed) {
|
|
23171
|
-
return /* @__PURE__ */
|
|
23271
|
+
return /* @__PURE__ */ jsx183(Fragment41, { children: appNavLinkGroupLinks(linkGroup).map((link) => /* @__PURE__ */ jsx183(NavLink, { variant: "side", ...link, iconOnly: !!link.icon, ...tid[`link_${camelCase5(link.label)}`] }, link.label)) });
|
|
23172
23272
|
}
|
|
23173
|
-
return /* @__PURE__ */
|
|
23273
|
+
return /* @__PURE__ */ jsx183(AppNavGroupDisclosure, { ...props });
|
|
23174
23274
|
}
|
|
23175
23275
|
function AppNavGroupDisclosure(props) {
|
|
23176
23276
|
const {
|
|
@@ -23200,8 +23300,8 @@ function AppNavGroupDisclosure(props) {
|
|
|
23200
23300
|
onResize
|
|
23201
23301
|
});
|
|
23202
23302
|
return /* @__PURE__ */ jsxs90("div", { className: "df fdc", ...tid, children: [
|
|
23203
|
-
/* @__PURE__ */
|
|
23204
|
-
/* @__PURE__ */
|
|
23303
|
+
/* @__PURE__ */ jsx183(AppNavGroupTrigger, { label: linkGroup.label, navGroupId, expanded, active: linkGroupHasActiveLink(linkGroup), onClick: onToggle, ...tid }),
|
|
23304
|
+
/* @__PURE__ */ jsx183("div", { id: navGroupId, role: "region", "aria-hidden": !expanded, ...trussProps96({
|
|
23205
23305
|
overflow: "oh",
|
|
23206
23306
|
transition: "transitionHeight",
|
|
23207
23307
|
height: ["h_var", {
|
|
@@ -23209,17 +23309,17 @@ function AppNavGroupDisclosure(props) {
|
|
|
23209
23309
|
}]
|
|
23210
23310
|
}), ...tid.panel, ...!expanded ? {
|
|
23211
23311
|
inert: "true"
|
|
23212
|
-
} : {}, children: /* @__PURE__ */
|
|
23312
|
+
} : {}, children: /* @__PURE__ */ jsx183("div", { ref: setContentEl, className: "df fdc", children: /* @__PURE__ */ jsx183(AppNavItems, { items: linkGroup.items, panelCollapsed: false, nested: true, ...tid }) }) })
|
|
23213
23313
|
] });
|
|
23214
23314
|
}
|
|
23215
23315
|
|
|
23216
23316
|
// src/components/AppNav/AppNavGroupMenu.tsx
|
|
23217
|
-
import { jsx as
|
|
23317
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
23218
23318
|
function AppNavGroupMenu({
|
|
23219
23319
|
linkGroup,
|
|
23220
23320
|
...tid
|
|
23221
23321
|
}) {
|
|
23222
|
-
return /* @__PURE__ */
|
|
23322
|
+
return /* @__PURE__ */ jsx184(
|
|
23223
23323
|
ButtonMenu,
|
|
23224
23324
|
{
|
|
23225
23325
|
trigger: {
|
|
@@ -23235,8 +23335,8 @@ function AppNavGroupMenu({
|
|
|
23235
23335
|
}
|
|
23236
23336
|
|
|
23237
23337
|
// src/components/AppNav/AppNavSectionView.tsx
|
|
23238
|
-
import { trussProps as
|
|
23239
|
-
import { jsx as
|
|
23338
|
+
import { trussProps as trussProps97 } from "@homebound/truss/runtime";
|
|
23339
|
+
import { jsx as jsx185, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
23240
23340
|
function AppNavSectionView(props) {
|
|
23241
23341
|
const {
|
|
23242
23342
|
section,
|
|
@@ -23262,7 +23362,7 @@ function AppNavSectionView(props) {
|
|
|
23262
23362
|
"--borderColor": "var(--b-surface-separator)"
|
|
23263
23363
|
}]
|
|
23264
23364
|
};
|
|
23265
|
-
return /* @__PURE__ */ jsxs91("div", { ...
|
|
23365
|
+
return /* @__PURE__ */ jsxs91("div", { ...trussProps97({
|
|
23266
23366
|
...{
|
|
23267
23367
|
display: "df",
|
|
23268
23368
|
flexDirection: "fdc",
|
|
@@ -23270,7 +23370,7 @@ function AppNavSectionView(props) {
|
|
|
23270
23370
|
},
|
|
23271
23371
|
...showDivider ? dividerStyles : {}
|
|
23272
23372
|
}), ...tid, children: [
|
|
23273
|
-
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */
|
|
23373
|
+
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */ jsx185("div", { ...trussProps97({
|
|
23274
23374
|
fontWeight: "fw6",
|
|
23275
23375
|
fontSize: "fz_10px",
|
|
23276
23376
|
lineHeight: "lh_14px",
|
|
@@ -23283,18 +23383,18 @@ function AppNavSectionView(props) {
|
|
|
23283
23383
|
paddingBottom: "pb1",
|
|
23284
23384
|
textTransform: "ttu"
|
|
23285
23385
|
}), ...tid.label, children: section.label }),
|
|
23286
|
-
/* @__PURE__ */
|
|
23386
|
+
/* @__PURE__ */ jsx185(AppNavItems, { ...scopeProps, items: section.items, variant, panelCollapsed, nested })
|
|
23287
23387
|
] });
|
|
23288
23388
|
}
|
|
23289
23389
|
|
|
23290
23390
|
// src/components/AppNav/AppNavItems.tsx
|
|
23291
|
-
import { Fragment as Fragment42, jsx as
|
|
23391
|
+
import { Fragment as Fragment42, jsx as jsx186 } from "react/jsx-runtime";
|
|
23292
23392
|
function AppNavItems(props) {
|
|
23293
23393
|
const { items, variant = "side", panelCollapsed = false, nested = false } = props;
|
|
23294
23394
|
const tid = useTestIds(props, "appNav");
|
|
23295
|
-
return /* @__PURE__ */
|
|
23395
|
+
return /* @__PURE__ */ jsx186(Fragment42, { children: items.map((item, idx) => {
|
|
23296
23396
|
if (isAppNavLink(item)) {
|
|
23297
|
-
return /* @__PURE__ */
|
|
23397
|
+
return /* @__PURE__ */ jsx186(
|
|
23298
23398
|
NavLink,
|
|
23299
23399
|
{
|
|
23300
23400
|
variant,
|
|
@@ -23307,7 +23407,7 @@ function AppNavItems(props) {
|
|
|
23307
23407
|
);
|
|
23308
23408
|
}
|
|
23309
23409
|
if (isAppNavGroup(item)) {
|
|
23310
|
-
return variant === "global" ? /* @__PURE__ */
|
|
23410
|
+
return variant === "global" ? /* @__PURE__ */ jsx186(AppNavGroupMenu, { linkGroup: item, ...tid.linkGroup }, appNavItemKey(item)) : /* @__PURE__ */ jsx186(
|
|
23311
23411
|
AppNavGroupView,
|
|
23312
23412
|
{
|
|
23313
23413
|
linkGroup: item,
|
|
@@ -23318,7 +23418,7 @@ function AppNavItems(props) {
|
|
|
23318
23418
|
);
|
|
23319
23419
|
}
|
|
23320
23420
|
if (isAppNavSection(item)) {
|
|
23321
|
-
return /* @__PURE__ */
|
|
23421
|
+
return /* @__PURE__ */ jsx186(
|
|
23322
23422
|
AppNavSectionView,
|
|
23323
23423
|
{
|
|
23324
23424
|
section: item,
|
|
@@ -23344,18 +23444,18 @@ import { useLocation } from "react-router-dom";
|
|
|
23344
23444
|
|
|
23345
23445
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayoutHeightContext.tsx
|
|
23346
23446
|
import { createContext as createContext13, useContext as useContext25 } from "react";
|
|
23347
|
-
import { jsx as
|
|
23447
|
+
import { jsx as jsx187 } from "react/jsx-runtime";
|
|
23348
23448
|
var EnvironmentBannerLayoutHeightContext = createContext13(0);
|
|
23349
23449
|
function EnvironmentBannerLayoutHeightProvider({ value, children }) {
|
|
23350
|
-
return /* @__PURE__ */
|
|
23450
|
+
return /* @__PURE__ */ jsx187(EnvironmentBannerLayoutHeightContext.Provider, { value, children });
|
|
23351
23451
|
}
|
|
23352
23452
|
function useEnvironmentBannerLayoutHeight() {
|
|
23353
23453
|
return useContext25(EnvironmentBannerLayoutHeightContext);
|
|
23354
23454
|
}
|
|
23355
23455
|
|
|
23356
23456
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
23357
|
-
import { trussProps as
|
|
23358
|
-
import { Fragment as Fragment43, jsx as
|
|
23457
|
+
import { trussProps as trussProps98, mergeProps as mergeProps29, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
|
|
23458
|
+
import { Fragment as Fragment43, jsx as jsx188, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
23359
23459
|
function NavbarMobileMenu(props) {
|
|
23360
23460
|
const {
|
|
23361
23461
|
items
|
|
@@ -23374,10 +23474,10 @@ function NavbarMobileMenu(props) {
|
|
|
23374
23474
|
}, [pathname, search]);
|
|
23375
23475
|
const close = () => setIsOpen(false);
|
|
23376
23476
|
return /* @__PURE__ */ jsxs92(Fragment43, { children: [
|
|
23377
|
-
/* @__PURE__ */
|
|
23477
|
+
/* @__PURE__ */ jsx188(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => setIsOpen((open) => !open), ...tid.mobileMenu }),
|
|
23378
23478
|
createPortal6(
|
|
23379
23479
|
/* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
|
|
23380
|
-
/* @__PURE__ */
|
|
23480
|
+
/* @__PURE__ */ jsx188(AnimatePresence5, { children: isOpen && /* @__PURE__ */ jsx188(NavbarMobileDrawer, { items, onClose: close, tid }) }),
|
|
23381
23481
|
document.body
|
|
23382
23482
|
)
|
|
23383
23483
|
] });
|
|
@@ -23392,7 +23492,7 @@ function NavbarMobileDrawer({
|
|
|
23392
23492
|
top: bannerHeightPx
|
|
23393
23493
|
};
|
|
23394
23494
|
return /* @__PURE__ */ jsxs92(Fragment43, { children: [
|
|
23395
|
-
/* @__PURE__ */
|
|
23495
|
+
/* @__PURE__ */ jsx188(motion5.div, { ...mergeProps29(void 0, overlayTopStyle, {
|
|
23396
23496
|
position: "fixed",
|
|
23397
23497
|
right: "right0",
|
|
23398
23498
|
bottom: "bottom0",
|
|
@@ -23411,7 +23511,7 @@ function NavbarMobileDrawer({
|
|
|
23411
23511
|
ease: "linear",
|
|
23412
23512
|
duration: 0.2
|
|
23413
23513
|
}, onClick: onClose, ...tid.mobileMenuScrim }, "navbarMobileMenuScrim"),
|
|
23414
|
-
/* @__PURE__ */
|
|
23514
|
+
/* @__PURE__ */ jsx188(FocusScope5, { autoFocus: true, contain: true, restoreFocus: true, children: /* @__PURE__ */ jsxs92(motion5.aside, { role: "dialog", "aria-modal": "true", "aria-label": "Navigation", ...mergeProps29(void 0, overlayTopStyle, {
|
|
23415
23515
|
position: "fixed",
|
|
23416
23516
|
bottom: "bottom0",
|
|
23417
23517
|
left: "left0",
|
|
@@ -23436,7 +23536,7 @@ function NavbarMobileDrawer({
|
|
|
23436
23536
|
ease: "linear",
|
|
23437
23537
|
duration: 0.2
|
|
23438
23538
|
}, onClick: (e) => e.stopPropagation(), ...tid.mobileMenuDrawer, children: [
|
|
23439
|
-
/* @__PURE__ */
|
|
23539
|
+
/* @__PURE__ */ jsx188("div", { ...trussProps98({
|
|
23440
23540
|
display: "df",
|
|
23441
23541
|
alignItems: "aic",
|
|
23442
23542
|
justifyContent: "jcfe",
|
|
@@ -23450,8 +23550,8 @@ function NavbarMobileDrawer({
|
|
|
23450
23550
|
borderColor: ["bc_var", {
|
|
23451
23551
|
"--borderColor": "var(--b-surface-separator)"
|
|
23452
23552
|
}]
|
|
23453
|
-
}), children: /* @__PURE__ */
|
|
23454
|
-
/* @__PURE__ */
|
|
23553
|
+
}), children: /* @__PURE__ */ jsx188(IconButton, { icon: "x", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: "Close navigation", onClick: onClose, ...tid.mobileMenuClose }) }),
|
|
23554
|
+
/* @__PURE__ */ jsx188(
|
|
23455
23555
|
"nav",
|
|
23456
23556
|
{
|
|
23457
23557
|
className: "fg1 oya pl3 pr3 pb3 pt2 df fdc gap_4px",
|
|
@@ -23461,7 +23561,7 @@ function NavbarMobileDrawer({
|
|
|
23461
23561
|
}
|
|
23462
23562
|
},
|
|
23463
23563
|
...tid.mobileMenuPanel,
|
|
23464
|
-
children: /* @__PURE__ */
|
|
23564
|
+
children: /* @__PURE__ */ jsx188(AppNavItems, { items, panelCollapsed: false, ...tid })
|
|
23465
23565
|
}
|
|
23466
23566
|
)
|
|
23467
23567
|
] }, "navbarMobileMenuDrawer") })
|
|
@@ -23469,8 +23569,8 @@ function NavbarMobileDrawer({
|
|
|
23469
23569
|
}
|
|
23470
23570
|
|
|
23471
23571
|
// src/components/Navbar/Navbar.tsx
|
|
23472
|
-
import { trussProps as
|
|
23473
|
-
import { jsx as
|
|
23572
|
+
import { trussProps as trussProps99 } from "@homebound/truss/runtime";
|
|
23573
|
+
import { jsx as jsx189, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
23474
23574
|
function Navbar(props) {
|
|
23475
23575
|
const {
|
|
23476
23576
|
brand,
|
|
@@ -23489,7 +23589,7 @@ function Navbar(props) {
|
|
|
23489
23589
|
overflows
|
|
23490
23590
|
} = useContentOverflow(!sm);
|
|
23491
23591
|
const showMobile = sm || overflows;
|
|
23492
|
-
return /* @__PURE__ */
|
|
23592
|
+
return /* @__PURE__ */ jsx189(ContrastScope, { children: /* @__PURE__ */ jsxs93("nav", { ...trussProps99({
|
|
23493
23593
|
backgroundColor: ["bgColor_var", {
|
|
23494
23594
|
"--backgroundColor": "var(--b-surface-raised)"
|
|
23495
23595
|
}],
|
|
@@ -23510,8 +23610,8 @@ function Navbar(props) {
|
|
|
23510
23610
|
}), ...tid, children: [
|
|
23511
23611
|
/* @__PURE__ */ jsxs93("div", { className: "df aic gap3 fg1 mw0", children: [
|
|
23512
23612
|
/* @__PURE__ */ jsxs93("div", { className: "df aic fs0 gap2", children: [
|
|
23513
|
-
showMobile && /* @__PURE__ */
|
|
23514
|
-
/* @__PURE__ */
|
|
23613
|
+
showMobile && /* @__PURE__ */ jsx189(NavbarMobileMenu, { items, ...tid }),
|
|
23614
|
+
/* @__PURE__ */ jsx189("div", { ...trussProps99({
|
|
23515
23615
|
flexShrink: "fs0",
|
|
23516
23616
|
...hideBrandOnMobile && showMobile ? {
|
|
23517
23617
|
display: "dn"
|
|
@@ -23520,7 +23620,7 @@ function Navbar(props) {
|
|
|
23520
23620
|
] }),
|
|
23521
23621
|
!sm && // Stays mounted while overflowing (hidden) so the items remain measurable and the bar
|
|
23522
23622
|
// can expand again as space frees up.
|
|
23523
|
-
/* @__PURE__ */
|
|
23623
|
+
/* @__PURE__ */ jsx189("div", { ref: containerRef, ...trussProps99({
|
|
23524
23624
|
display: "df",
|
|
23525
23625
|
alignItems: "aic",
|
|
23526
23626
|
flexGrow: "fg1",
|
|
@@ -23529,11 +23629,11 @@ function Navbar(props) {
|
|
|
23529
23629
|
...overflows ? {
|
|
23530
23630
|
visibility: "visibility_hidden"
|
|
23531
23631
|
} : {}
|
|
23532
|
-
}), ...tid.items, children: /* @__PURE__ */
|
|
23632
|
+
}), ...tid.items, children: /* @__PURE__ */ jsx189("div", { ref: contentRef, className: "df aic gap2 width_max_content", children: /* @__PURE__ */ jsx189(AppNavItems, { variant: "global", items, ...tid }) }) })
|
|
23533
23633
|
] }),
|
|
23534
23634
|
/* @__PURE__ */ jsxs93("div", { className: "df aic gap1", children: [
|
|
23535
|
-
rightSlot && /* @__PURE__ */
|
|
23536
|
-
user && /* @__PURE__ */
|
|
23635
|
+
rightSlot && /* @__PURE__ */ jsx189("div", { className: "df aic gap1", ...tid.rightSlot, children: rightSlot }),
|
|
23636
|
+
user && /* @__PURE__ */ jsx189(NavbarUserMenu, { user, ...tid.userMenu })
|
|
23537
23637
|
] })
|
|
23538
23638
|
] }) });
|
|
23539
23639
|
}
|
|
@@ -23541,7 +23641,7 @@ function NavbarUserMenu({
|
|
|
23541
23641
|
user,
|
|
23542
23642
|
...tid
|
|
23543
23643
|
}) {
|
|
23544
|
-
return /* @__PURE__ */
|
|
23644
|
+
return /* @__PURE__ */ jsx189("div", { className: "df aic fs0 ml1", children: /* @__PURE__ */ jsx189(ButtonMenu, { items: user.menuItems, persistentItems: user.persistentItems, trigger: {
|
|
23545
23645
|
src: user.picture,
|
|
23546
23646
|
name: user.name,
|
|
23547
23647
|
size: "sm",
|
|
@@ -23551,19 +23651,19 @@ function NavbarUserMenu({
|
|
|
23551
23651
|
|
|
23552
23652
|
// src/components/Tabs.tsx
|
|
23553
23653
|
import { camelCase as camelCase7 } from "change-case";
|
|
23554
|
-
import { useEffect as useEffect35, useMemo as useMemo52, useRef as
|
|
23555
|
-
import { mergeProps as
|
|
23654
|
+
import { useEffect as useEffect35, useMemo as useMemo52, useRef as useRef59, useState as useState54 } from "react";
|
|
23655
|
+
import { mergeProps as mergeProps30, useFocusRing as useFocusRing17, useHover as useHover21 } from "react-aria";
|
|
23556
23656
|
import { matchPath } from "react-router";
|
|
23557
23657
|
import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
|
|
23558
|
-
import { trussProps as
|
|
23559
|
-
import { Fragment as Fragment44, jsx as
|
|
23658
|
+
import { trussProps as trussProps100, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
|
|
23659
|
+
import { Fragment as Fragment44, jsx as jsx190, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
23560
23660
|
function TabsWithContent(props) {
|
|
23561
23661
|
const styles = hideTabs(props) ? {} : {
|
|
23562
23662
|
paddingTop: "pt3"
|
|
23563
23663
|
};
|
|
23564
23664
|
return /* @__PURE__ */ jsxs94(Fragment44, { children: [
|
|
23565
|
-
/* @__PURE__ */
|
|
23566
|
-
/* @__PURE__ */
|
|
23665
|
+
/* @__PURE__ */ jsx190(Tabs, { ...props }),
|
|
23666
|
+
/* @__PURE__ */ jsx190(TabContent, { ...props, contentXss: {
|
|
23567
23667
|
...styles,
|
|
23568
23668
|
...props.contentXss
|
|
23569
23669
|
} })
|
|
@@ -23588,7 +23688,7 @@ function TabContent(props) {
|
|
|
23588
23688
|
return (
|
|
23589
23689
|
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
23590
23690
|
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
23591
|
-
/* @__PURE__ */
|
|
23691
|
+
/* @__PURE__ */ jsx190(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx190("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps100(contentXss), children: selectedTab.render() }) })
|
|
23592
23692
|
);
|
|
23593
23693
|
}
|
|
23594
23694
|
function Tabs(props) {
|
|
@@ -23610,10 +23710,10 @@ function Tabs(props) {
|
|
|
23610
23710
|
const {
|
|
23611
23711
|
isFocusVisible,
|
|
23612
23712
|
focusProps
|
|
23613
|
-
} =
|
|
23713
|
+
} = useFocusRing17();
|
|
23614
23714
|
const tid = useTestIds(others, "tabs");
|
|
23615
23715
|
const [active, setActive] = useState54(selected);
|
|
23616
|
-
const ref =
|
|
23716
|
+
const ref = useRef59(null);
|
|
23617
23717
|
useEffect35(() => setActive(selected), [selected]);
|
|
23618
23718
|
function onKeyUp(e) {
|
|
23619
23719
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
@@ -23630,7 +23730,7 @@ function Tabs(props) {
|
|
|
23630
23730
|
setActive(selected);
|
|
23631
23731
|
}
|
|
23632
23732
|
}
|
|
23633
|
-
return /* @__PURE__ */ jsxs94("div", { ...
|
|
23733
|
+
return /* @__PURE__ */ jsxs94("div", { ...trussProps100({
|
|
23634
23734
|
...{
|
|
23635
23735
|
display: "df",
|
|
23636
23736
|
alignItems: "aic",
|
|
@@ -23646,11 +23746,11 @@ function Tabs(props) {
|
|
|
23646
23746
|
}
|
|
23647
23747
|
} : {}
|
|
23648
23748
|
}), children: [
|
|
23649
|
-
!hideTabs(props) && /* @__PURE__ */
|
|
23749
|
+
!hideTabs(props) && /* @__PURE__ */ jsx190("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
23650
23750
|
const uniqueValue = uniqueTabValue(tab);
|
|
23651
|
-
return /* @__PURE__ */
|
|
23751
|
+
return /* @__PURE__ */ jsx190(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
23652
23752
|
}) }),
|
|
23653
|
-
right && /* @__PURE__ */
|
|
23753
|
+
right && /* @__PURE__ */ jsx190("div", { className: "mla df aic gap1 pb1", children: right })
|
|
23654
23754
|
] });
|
|
23655
23755
|
}
|
|
23656
23756
|
function TabImpl(props) {
|
|
@@ -23674,7 +23774,7 @@ function TabImpl(props) {
|
|
|
23674
23774
|
const {
|
|
23675
23775
|
hoverProps,
|
|
23676
23776
|
isHovered
|
|
23677
|
-
} =
|
|
23777
|
+
} = useHover21({
|
|
23678
23778
|
isDisabled
|
|
23679
23779
|
});
|
|
23680
23780
|
const {
|
|
@@ -23694,7 +23794,7 @@ function TabImpl(props) {
|
|
|
23694
23794
|
role: "tab",
|
|
23695
23795
|
tabIndex: active ? 0 : -1,
|
|
23696
23796
|
...others,
|
|
23697
|
-
...
|
|
23797
|
+
...trussProps100({
|
|
23698
23798
|
...baseStyles4,
|
|
23699
23799
|
...active && activeStyles3,
|
|
23700
23800
|
...isDisabled && disabledStyles3,
|
|
@@ -23703,7 +23803,7 @@ function TabImpl(props) {
|
|
|
23703
23803
|
...isFocusVisible && active && focusRingStyles2
|
|
23704
23804
|
})
|
|
23705
23805
|
};
|
|
23706
|
-
const interactiveProps =
|
|
23806
|
+
const interactiveProps = mergeProps30(focusProps, hoverProps, {
|
|
23707
23807
|
onKeyUp,
|
|
23708
23808
|
onBlur,
|
|
23709
23809
|
...isRouteTab(tab) ? {} : {
|
|
@@ -23712,15 +23812,15 @@ function TabImpl(props) {
|
|
|
23712
23812
|
});
|
|
23713
23813
|
const tabLabel = /* @__PURE__ */ jsxs94(Fragment44, { children: [
|
|
23714
23814
|
label,
|
|
23715
|
-
(icon || endAdornment) && /* @__PURE__ */
|
|
23815
|
+
(icon || endAdornment) && /* @__PURE__ */ jsx190("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx190(Icon, { icon }) : endAdornment })
|
|
23716
23816
|
] });
|
|
23717
23817
|
return isDisabled ? maybeTooltip({
|
|
23718
23818
|
title: resolveTooltip(disabled),
|
|
23719
23819
|
placement: "top",
|
|
23720
|
-
children: /* @__PURE__ */
|
|
23721
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */
|
|
23820
|
+
children: /* @__PURE__ */ jsx190("div", { ...tabProps, children: tabLabel })
|
|
23821
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx190(Link7, { ...mergeProps30(tabProps, interactiveProps, {
|
|
23722
23822
|
className: "navLink"
|
|
23723
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */
|
|
23823
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx190("button", { ...{
|
|
23724
23824
|
...tabProps,
|
|
23725
23825
|
...interactiveProps
|
|
23726
23826
|
}, children: tabLabel });
|
|
@@ -23815,8 +23915,8 @@ function hideTabs(props) {
|
|
|
23815
23915
|
}
|
|
23816
23916
|
|
|
23817
23917
|
// src/components/PageHeader.tsx
|
|
23818
|
-
import { trussProps as
|
|
23819
|
-
import { jsx as
|
|
23918
|
+
import { trussProps as trussProps101 } from "@homebound/truss/runtime";
|
|
23919
|
+
import { jsx as jsx191, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
23820
23920
|
function PageHeader2(props) {
|
|
23821
23921
|
const {
|
|
23822
23922
|
title,
|
|
@@ -23828,7 +23928,7 @@ function PageHeader2(props) {
|
|
|
23828
23928
|
} = props;
|
|
23829
23929
|
const tid = useTestIds(otherProps, "pageHeader");
|
|
23830
23930
|
useDocumentTitle(title, documentTitleSuffix);
|
|
23831
|
-
return /* @__PURE__ */ jsxs95("header", { ...tid, ...
|
|
23931
|
+
return /* @__PURE__ */ jsxs95("header", { ...tid, ...trussProps101({
|
|
23832
23932
|
display: "df",
|
|
23833
23933
|
flexDirection: "fdc",
|
|
23834
23934
|
paddingTop: "pt3",
|
|
@@ -23844,7 +23944,7 @@ function PageHeader2(props) {
|
|
|
23844
23944
|
"--backgroundColor": "var(--b-surface)"
|
|
23845
23945
|
}]
|
|
23846
23946
|
}), children: [
|
|
23847
|
-
/* @__PURE__ */ jsxs95("div", { ...
|
|
23947
|
+
/* @__PURE__ */ jsxs95("div", { ...trussProps101({
|
|
23848
23948
|
...{
|
|
23849
23949
|
display: "df",
|
|
23850
23950
|
justifyContent: "jcsb",
|
|
@@ -23858,17 +23958,17 @@ function PageHeader2(props) {
|
|
|
23858
23958
|
}
|
|
23859
23959
|
}), children: [
|
|
23860
23960
|
/* @__PURE__ */ jsxs95("div", { className: "mw0", children: [
|
|
23861
|
-
breadcrumbs && /* @__PURE__ */
|
|
23862
|
-
/* @__PURE__ */
|
|
23961
|
+
breadcrumbs && /* @__PURE__ */ jsx191(Breadcrumbs, { ...breadcrumbs }),
|
|
23962
|
+
/* @__PURE__ */ jsx191("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title })
|
|
23863
23963
|
] }),
|
|
23864
|
-
/* @__PURE__ */
|
|
23964
|
+
/* @__PURE__ */ jsx191("div", { className: "fs0", children: rightSlot })
|
|
23865
23965
|
] }),
|
|
23866
|
-
tabs && /* @__PURE__ */
|
|
23966
|
+
tabs && /* @__PURE__ */ jsx191(Tabs, { ...tabs })
|
|
23867
23967
|
] });
|
|
23868
23968
|
}
|
|
23869
23969
|
|
|
23870
23970
|
// src/components/Pagination.tsx
|
|
23871
|
-
import { jsx as
|
|
23971
|
+
import { jsx as jsx192, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
23872
23972
|
var defaultPage = {
|
|
23873
23973
|
offset: 0,
|
|
23874
23974
|
limit: 100
|
|
@@ -23901,8 +24001,8 @@ function Pagination(props) {
|
|
|
23901
24001
|
}
|
|
23902
24002
|
const tid = useTestIds(props, "pagination");
|
|
23903
24003
|
return /* @__PURE__ */ jsxs96("div", { className: "df bcGray200 bts_solid btw_1px fw4 fz_12px lh_16px gray500 pl2 pr2 pt2", ...tid, children: [
|
|
23904
|
-
/* @__PURE__ */
|
|
23905
|
-
/* @__PURE__ */
|
|
24004
|
+
/* @__PURE__ */ jsx192("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
24005
|
+
/* @__PURE__ */ jsx192("div", { className: "w_78px", children: /* @__PURE__ */ jsx192(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
23906
24006
|
pageNumber: 1,
|
|
23907
24007
|
pageSize: val
|
|
23908
24008
|
}), autoSort: false, ...tid.pageSize }) }),
|
|
@@ -23914,11 +24014,11 @@ function Pagination(props) {
|
|
|
23914
24014
|
" of ",
|
|
23915
24015
|
totalCount
|
|
23916
24016
|
] }),
|
|
23917
|
-
/* @__PURE__ */
|
|
24017
|
+
/* @__PURE__ */ jsx192(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
23918
24018
|
pageNumber: pageNumber - 1,
|
|
23919
24019
|
pageSize
|
|
23920
24020
|
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
23921
|
-
/* @__PURE__ */
|
|
24021
|
+
/* @__PURE__ */ jsx192(IconButton, { icon: "chevronRight", color: hasNextPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
23922
24022
|
pageNumber: pageNumber + 1,
|
|
23923
24023
|
pageSize
|
|
23924
24024
|
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
@@ -23941,9 +24041,9 @@ function toPageNumberSize(page) {
|
|
|
23941
24041
|
|
|
23942
24042
|
// src/components/ScrollShadows.tsx
|
|
23943
24043
|
import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
23944
|
-
import { useCallback as useCallback34, useMemo as useMemo53, useRef as
|
|
23945
|
-
import { trussProps as
|
|
23946
|
-
import { jsx as
|
|
24044
|
+
import { useCallback as useCallback34, useMemo as useMemo53, useRef as useRef60, useState as useState55 } from "react";
|
|
24045
|
+
import { trussProps as trussProps102, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
24046
|
+
import { jsx as jsx193, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
23947
24047
|
function ScrollShadows(props) {
|
|
23948
24048
|
const {
|
|
23949
24049
|
children,
|
|
@@ -23961,7 +24061,7 @@ function ScrollShadows(props) {
|
|
|
23961
24061
|
}
|
|
23962
24062
|
const [showStartShadow, setShowStartShadow] = useState55(false);
|
|
23963
24063
|
const [showEndShadow, setShowEndShadow] = useState55(false);
|
|
23964
|
-
const scrollRef =
|
|
24064
|
+
const scrollRef = useRef60(null);
|
|
23965
24065
|
const [startShadowStyles, endShadowStyles] = useMemo53(() => {
|
|
23966
24066
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
23967
24067
|
const commonStyles = {
|
|
@@ -24033,7 +24133,7 @@ function ScrollShadows(props) {
|
|
|
24033
24133
|
ref: scrollRef,
|
|
24034
24134
|
onResize
|
|
24035
24135
|
});
|
|
24036
|
-
return /* @__PURE__ */ jsxs97("div", { ...
|
|
24136
|
+
return /* @__PURE__ */ jsxs97("div", { ...trussProps102({
|
|
24037
24137
|
display: "df",
|
|
24038
24138
|
flexDirection: ["fd_var", {
|
|
24039
24139
|
"--flexDirection": maybeCssVar54(!horizontal ? "column" : "row")
|
|
@@ -24049,7 +24149,7 @@ function ScrollShadows(props) {
|
|
|
24049
24149
|
width: width2
|
|
24050
24150
|
}
|
|
24051
24151
|
}), ...tid, children: [
|
|
24052
|
-
/* @__PURE__ */
|
|
24152
|
+
/* @__PURE__ */ jsx193("div", { ...trussProps102({
|
|
24053
24153
|
...startShadowStyles,
|
|
24054
24154
|
...{
|
|
24055
24155
|
opacity: ["o_var", {
|
|
@@ -24057,7 +24157,7 @@ function ScrollShadows(props) {
|
|
|
24057
24157
|
}]
|
|
24058
24158
|
}
|
|
24059
24159
|
}), "data-chromatic": "ignore" }),
|
|
24060
|
-
/* @__PURE__ */
|
|
24160
|
+
/* @__PURE__ */ jsx193("div", { ...trussProps102({
|
|
24061
24161
|
...endShadowStyles,
|
|
24062
24162
|
...{
|
|
24063
24163
|
opacity: ["o_var", {
|
|
@@ -24065,7 +24165,7 @@ function ScrollShadows(props) {
|
|
|
24065
24165
|
}]
|
|
24066
24166
|
}
|
|
24067
24167
|
}), "data-chromatic": "ignore" }),
|
|
24068
|
-
/* @__PURE__ */
|
|
24168
|
+
/* @__PURE__ */ jsx193("div", { ...trussProps102({
|
|
24069
24169
|
...xss,
|
|
24070
24170
|
...{
|
|
24071
24171
|
overflow: "oa",
|
|
@@ -24083,10 +24183,10 @@ import {
|
|
|
24083
24183
|
useContext as useContext26,
|
|
24084
24184
|
useEffect as useEffect36,
|
|
24085
24185
|
useMemo as useMemo54,
|
|
24086
|
-
useRef as
|
|
24186
|
+
useRef as useRef61,
|
|
24087
24187
|
useState as useState56
|
|
24088
24188
|
} from "react";
|
|
24089
|
-
import { jsx as
|
|
24189
|
+
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
24090
24190
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
24091
24191
|
function loadStoredNavState() {
|
|
24092
24192
|
try {
|
|
@@ -24114,7 +24214,7 @@ function SideNavLayoutProvider(props) {
|
|
|
24114
24214
|
() => resolveInitialNavState(props.defaultNavState)
|
|
24115
24215
|
);
|
|
24116
24216
|
const bp = useBreakpoint();
|
|
24117
|
-
const prevMdAndUp =
|
|
24217
|
+
const prevMdAndUp = useRef61(bp.mdAndUp);
|
|
24118
24218
|
useEffect36(() => {
|
|
24119
24219
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
24120
24220
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
@@ -24134,7 +24234,7 @@ function SideNavLayoutProvider(props) {
|
|
|
24134
24234
|
});
|
|
24135
24235
|
}, []);
|
|
24136
24236
|
const value = useMemo54(() => ({ navState, setNavState }), [navState, setNavState]);
|
|
24137
|
-
return /* @__PURE__ */
|
|
24237
|
+
return /* @__PURE__ */ jsx194(SideNavLayoutContext.Provider, { value, children: props.children });
|
|
24138
24238
|
}
|
|
24139
24239
|
function useSideNavLayoutContext() {
|
|
24140
24240
|
return useContext26(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
@@ -24145,8 +24245,8 @@ function useHasSideNavLayoutProvider() {
|
|
|
24145
24245
|
}
|
|
24146
24246
|
|
|
24147
24247
|
// src/components/SideNav/SideNav.tsx
|
|
24148
|
-
import { trussProps as
|
|
24149
|
-
import { jsx as
|
|
24248
|
+
import { trussProps as trussProps103 } from "@homebound/truss/runtime";
|
|
24249
|
+
import { jsx as jsx195, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
24150
24250
|
function SideNav(props) {
|
|
24151
24251
|
const {
|
|
24152
24252
|
top,
|
|
@@ -24160,7 +24260,7 @@ function SideNav(props) {
|
|
|
24160
24260
|
const panelCollapsed = navState === "collapse";
|
|
24161
24261
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
24162
24262
|
return /* @__PURE__ */ jsxs98("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
24163
|
-
top !== void 0 && /* @__PURE__ */
|
|
24263
|
+
top !== void 0 && /* @__PURE__ */ jsx195("div", { ...trussProps103({
|
|
24164
24264
|
flexShrink: "fs0",
|
|
24165
24265
|
paddingLeft: "pl2",
|
|
24166
24266
|
paddingRight: "pr2",
|
|
@@ -24171,7 +24271,7 @@ function SideNav(props) {
|
|
|
24171
24271
|
paddingBottom: "pb4"
|
|
24172
24272
|
} : {}
|
|
24173
24273
|
}), ...tid.top, children: top }),
|
|
24174
|
-
/* @__PURE__ */
|
|
24274
|
+
/* @__PURE__ */ jsx195("div", { ...trussProps103({
|
|
24175
24275
|
flexGrow: "fg1",
|
|
24176
24276
|
overflowY: "oya",
|
|
24177
24277
|
display: "df",
|
|
@@ -24183,8 +24283,8 @@ function SideNav(props) {
|
|
|
24183
24283
|
...top === void 0 ? {
|
|
24184
24284
|
paddingTop: "pt5"
|
|
24185
24285
|
} : {}
|
|
24186
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */
|
|
24187
|
-
footer !== void 0 && /* @__PURE__ */
|
|
24286
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx195(AppNavItems, { items, panelCollapsed }) }),
|
|
24287
|
+
footer !== void 0 && /* @__PURE__ */ jsx195("div", { ...trussProps103({
|
|
24188
24288
|
flexShrink: "fs0",
|
|
24189
24289
|
paddingLeft: "pl2",
|
|
24190
24290
|
paddingRight: "pr2",
|
|
@@ -24259,10 +24359,10 @@ function useSnackbar() {
|
|
|
24259
24359
|
var snackbarId = 1;
|
|
24260
24360
|
|
|
24261
24361
|
// src/components/Stepper.tsx
|
|
24262
|
-
import { useRef as
|
|
24263
|
-
import { useButton as useButton12, useFocusRing as
|
|
24264
|
-
import { trussProps as
|
|
24265
|
-
import { jsx as
|
|
24362
|
+
import { useRef as useRef62 } from "react";
|
|
24363
|
+
import { useButton as useButton12, useFocusRing as useFocusRing18, useHover as useHover22 } from "react-aria";
|
|
24364
|
+
import { trussProps as trussProps104, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
24365
|
+
import { jsx as jsx196, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
24266
24366
|
import { createElement as createElement5 } from "react";
|
|
24267
24367
|
var __maybeInc20 = (inc) => {
|
|
24268
24368
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -24282,7 +24382,7 @@ function Stepper(props) {
|
|
|
24282
24382
|
const minStepWidth = 100;
|
|
24283
24383
|
const gap = 8;
|
|
24284
24384
|
return /* @__PURE__ */ jsxs99("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
24285
|
-
/* @__PURE__ */
|
|
24385
|
+
/* @__PURE__ */ jsx196("ol", { ...trussProps104({
|
|
24286
24386
|
padding: "p_0",
|
|
24287
24387
|
margin: "m_0",
|
|
24288
24388
|
listStyle: "lis_none",
|
|
@@ -24292,7 +24392,7 @@ function Stepper(props) {
|
|
|
24292
24392
|
}]
|
|
24293
24393
|
}), children: steps.map((step) => {
|
|
24294
24394
|
const isCurrent = currentStep === step.value;
|
|
24295
|
-
return /* @__PURE__ */ createElement5("li", { ...
|
|
24395
|
+
return /* @__PURE__ */ createElement5("li", { ...trussProps104({
|
|
24296
24396
|
display: "df",
|
|
24297
24397
|
flexGrow: "fg1",
|
|
24298
24398
|
flexDirection: "fdc",
|
|
@@ -24302,9 +24402,9 @@ function Stepper(props) {
|
|
|
24302
24402
|
minWidth: ["mw_var", {
|
|
24303
24403
|
"--minWidth": `${minStepWidth}px`
|
|
24304
24404
|
}]
|
|
24305
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
24405
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx196(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
24306
24406
|
}) }),
|
|
24307
|
-
/* @__PURE__ */
|
|
24407
|
+
/* @__PURE__ */ jsx196("div", { ...trussProps104({
|
|
24308
24408
|
marginTop: "mt1",
|
|
24309
24409
|
backgroundColor: "bgGray300",
|
|
24310
24410
|
height: "h_4px",
|
|
@@ -24315,7 +24415,7 @@ function Stepper(props) {
|
|
|
24315
24415
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
24316
24416
|
}],
|
|
24317
24417
|
width: "w100"
|
|
24318
|
-
}), children: /* @__PURE__ */
|
|
24418
|
+
}), children: /* @__PURE__ */ jsx196("div", { ...trussProps104({
|
|
24319
24419
|
backgroundColor: "bgBlue600",
|
|
24320
24420
|
transition: "transition_width_200ms",
|
|
24321
24421
|
height: "h100",
|
|
@@ -24337,7 +24437,7 @@ function StepButton(props) {
|
|
|
24337
24437
|
onPress: onClick,
|
|
24338
24438
|
isDisabled: disabled
|
|
24339
24439
|
};
|
|
24340
|
-
const ref =
|
|
24440
|
+
const ref = useRef62(null);
|
|
24341
24441
|
const {
|
|
24342
24442
|
buttonProps,
|
|
24343
24443
|
isPressed
|
|
@@ -24345,18 +24445,18 @@ function StepButton(props) {
|
|
|
24345
24445
|
const {
|
|
24346
24446
|
isFocusVisible,
|
|
24347
24447
|
focusProps
|
|
24348
|
-
} =
|
|
24448
|
+
} = useFocusRing18();
|
|
24349
24449
|
const {
|
|
24350
24450
|
hoverProps,
|
|
24351
24451
|
isHovered
|
|
24352
|
-
} =
|
|
24452
|
+
} = useHover22(ariaProps);
|
|
24353
24453
|
const focusRingStyles2 = state === "error" ? {
|
|
24354
24454
|
boxShadow: "bshDanger"
|
|
24355
24455
|
} : {
|
|
24356
24456
|
boxShadow: "bshFocus"
|
|
24357
24457
|
};
|
|
24358
24458
|
const tid = useTestIds(props, "stepButton");
|
|
24359
|
-
return /* @__PURE__ */ jsxs99("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...
|
|
24459
|
+
return /* @__PURE__ */ jsxs99("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps104({
|
|
24360
24460
|
...{
|
|
24361
24461
|
fontWeight: "fw6",
|
|
24362
24462
|
fontSize: "fz_14px",
|
|
@@ -24408,7 +24508,7 @@ function StepButton(props) {
|
|
|
24408
24508
|
} : {},
|
|
24409
24509
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
24410
24510
|
}), ...tid[defaultTestId(label)], children: [
|
|
24411
|
-
/* @__PURE__ */
|
|
24511
|
+
/* @__PURE__ */ jsx196("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx196(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
24412
24512
|
label
|
|
24413
24513
|
] });
|
|
24414
24514
|
}
|
|
@@ -24419,12 +24519,12 @@ function StepIcon({
|
|
|
24419
24519
|
isCurrent = false
|
|
24420
24520
|
}) {
|
|
24421
24521
|
if (state === "error") {
|
|
24422
|
-
return /* @__PURE__ */
|
|
24522
|
+
return /* @__PURE__ */ jsx196(Icon, { icon: "errorCircle" });
|
|
24423
24523
|
}
|
|
24424
24524
|
if (state === "complete") {
|
|
24425
|
-
return /* @__PURE__ */
|
|
24525
|
+
return /* @__PURE__ */ jsx196(Icon, { icon: "check" });
|
|
24426
24526
|
}
|
|
24427
|
-
return /* @__PURE__ */
|
|
24527
|
+
return /* @__PURE__ */ jsx196("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx196("div", { ...trussProps104({
|
|
24428
24528
|
width: "w_10px",
|
|
24429
24529
|
height: "h_10px",
|
|
24430
24530
|
borderStyle: "bss",
|
|
@@ -24439,8 +24539,8 @@ function StepIcon({
|
|
|
24439
24539
|
|
|
24440
24540
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
24441
24541
|
import { createPortal as createPortal7 } from "react-dom";
|
|
24442
|
-
import { trussProps as
|
|
24443
|
-
import { jsx as
|
|
24542
|
+
import { trussProps as trussProps105 } from "@homebound/truss/runtime";
|
|
24543
|
+
import { jsx as jsx197, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
24444
24544
|
function SuperDrawerHeader(props) {
|
|
24445
24545
|
const {
|
|
24446
24546
|
hideControls
|
|
@@ -24460,17 +24560,17 @@ function SuperDrawerHeader(props) {
|
|
|
24460
24560
|
return createPortal7(/* @__PURE__ */ jsxs100("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
24461
24561
|
isStructuredProps(props) ? /* @__PURE__ */ jsxs100("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
24462
24562
|
/* @__PURE__ */ jsxs100("div", { className: "fg1 df aic gap2", children: [
|
|
24463
|
-
/* @__PURE__ */
|
|
24563
|
+
/* @__PURE__ */ jsx197("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
24464
24564
|
props.left
|
|
24465
24565
|
] }),
|
|
24466
|
-
props.right && /* @__PURE__ */
|
|
24467
|
-
] }) : /* @__PURE__ */
|
|
24468
|
-
!hideControls && /* @__PURE__ */
|
|
24566
|
+
props.right && /* @__PURE__ */ jsx197("div", { className: "fs0", children: props.right })
|
|
24567
|
+
] }) : /* @__PURE__ */ jsx197("div", { className: "fg1", children: props.children }),
|
|
24568
|
+
!hideControls && /* @__PURE__ */ jsx197("div", { ...trussProps105({
|
|
24469
24569
|
flexShrink: "fs0",
|
|
24470
24570
|
...isDetail ? {
|
|
24471
24571
|
visibility: "vh"
|
|
24472
24572
|
} : {}
|
|
24473
|
-
}), children: /* @__PURE__ */
|
|
24573
|
+
}), children: /* @__PURE__ */ jsx197(ButtonGroup, { buttons: [{
|
|
24474
24574
|
icon: "chevronLeft",
|
|
24475
24575
|
onClick: () => onPrevClick && onPrevClick(),
|
|
24476
24576
|
disabled: !onPrevClick
|
|
@@ -24486,7 +24586,7 @@ function isStructuredProps(props) {
|
|
|
24486
24586
|
}
|
|
24487
24587
|
|
|
24488
24588
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
24489
|
-
import { Fragment as Fragment45, jsx as
|
|
24589
|
+
import { Fragment as Fragment45, jsx as jsx198, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
24490
24590
|
function ConfirmCloseModal(props) {
|
|
24491
24591
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
24492
24592
|
const { modalState } = useBeamContext();
|
|
@@ -24494,10 +24594,10 @@ function ConfirmCloseModal(props) {
|
|
|
24494
24594
|
modalState.current = void 0;
|
|
24495
24595
|
}
|
|
24496
24596
|
return /* @__PURE__ */ jsxs101(Fragment45, { children: [
|
|
24497
|
-
/* @__PURE__ */
|
|
24498
|
-
/* @__PURE__ */
|
|
24597
|
+
/* @__PURE__ */ jsx198(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
24598
|
+
/* @__PURE__ */ jsx198(ModalBody, { children: /* @__PURE__ */ jsx198("p", { children: "Any changes you've made so far will be lost." }) }),
|
|
24499
24599
|
/* @__PURE__ */ jsxs101(ModalFooter, { children: [
|
|
24500
|
-
/* @__PURE__ */
|
|
24600
|
+
/* @__PURE__ */ jsx198(
|
|
24501
24601
|
Button,
|
|
24502
24602
|
{
|
|
24503
24603
|
variant: "quaternary",
|
|
@@ -24508,7 +24608,7 @@ function ConfirmCloseModal(props) {
|
|
|
24508
24608
|
}
|
|
24509
24609
|
}
|
|
24510
24610
|
),
|
|
24511
|
-
/* @__PURE__ */
|
|
24611
|
+
/* @__PURE__ */ jsx198(Button, { label: continueText, onClick: closeModal })
|
|
24512
24612
|
] })
|
|
24513
24613
|
] });
|
|
24514
24614
|
}
|
|
@@ -24518,7 +24618,7 @@ import { motion as motion6 } from "framer-motion";
|
|
|
24518
24618
|
|
|
24519
24619
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
24520
24620
|
import { useMemo as useMemo55 } from "react";
|
|
24521
|
-
import { jsx as
|
|
24621
|
+
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
24522
24622
|
function useSuperDrawer() {
|
|
24523
24623
|
const {
|
|
24524
24624
|
drawerContentStack: contentStack,
|
|
@@ -24530,7 +24630,7 @@ function useSuperDrawer() {
|
|
|
24530
24630
|
function canCloseDrawerDetails(i, doChange) {
|
|
24531
24631
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
24532
24632
|
if (!canClose(canCloseDrawerDetail)) {
|
|
24533
|
-
openModal({ content: /* @__PURE__ */
|
|
24633
|
+
openModal({ content: /* @__PURE__ */ jsx199(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
24534
24634
|
return false;
|
|
24535
24635
|
}
|
|
24536
24636
|
}
|
|
@@ -24550,7 +24650,7 @@ function useSuperDrawer() {
|
|
|
24550
24650
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
24551
24651
|
if (!canClose(canCloseDrawer)) {
|
|
24552
24652
|
openModal({
|
|
24553
|
-
content: /* @__PURE__ */
|
|
24653
|
+
content: /* @__PURE__ */ jsx199(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
24554
24654
|
});
|
|
24555
24655
|
return;
|
|
24556
24656
|
}
|
|
@@ -24645,8 +24745,8 @@ function canClose(canCloseCheck) {
|
|
|
24645
24745
|
}
|
|
24646
24746
|
|
|
24647
24747
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
24648
|
-
import { mergeProps as
|
|
24649
|
-
import { Fragment as Fragment46, jsx as
|
|
24748
|
+
import { mergeProps as mergeProps31 } from "@homebound/truss/runtime";
|
|
24749
|
+
import { Fragment as Fragment46, jsx as jsx200, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
24650
24750
|
var SuperDrawerContent = ({
|
|
24651
24751
|
children,
|
|
24652
24752
|
actions
|
|
@@ -24666,7 +24766,7 @@ var SuperDrawerContent = ({
|
|
|
24666
24766
|
} = firstContent ?? {};
|
|
24667
24767
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
24668
24768
|
if (kind === "open") {
|
|
24669
|
-
return /* @__PURE__ */
|
|
24769
|
+
return /* @__PURE__ */ jsx200(motion6.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
24670
24770
|
} else if (kind === "detail") {
|
|
24671
24771
|
return /* @__PURE__ */ jsxs102(motion6.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
24672
24772
|
overflow: "auto"
|
|
@@ -24675,8 +24775,8 @@ var SuperDrawerContent = ({
|
|
|
24675
24775
|
delay: 0.3
|
|
24676
24776
|
}
|
|
24677
24777
|
}, children: [
|
|
24678
|
-
/* @__PURE__ */
|
|
24679
|
-
/* @__PURE__ */
|
|
24778
|
+
/* @__PURE__ */ jsx200(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
24779
|
+
/* @__PURE__ */ jsx200(motion6.div, { initial: {
|
|
24680
24780
|
x: width2,
|
|
24681
24781
|
opacity: 0
|
|
24682
24782
|
}, animate: {
|
|
@@ -24694,7 +24794,7 @@ var SuperDrawerContent = ({
|
|
|
24694
24794
|
}, className: "pt2", children: children2 })
|
|
24695
24795
|
] }, "content");
|
|
24696
24796
|
} else {
|
|
24697
|
-
return /* @__PURE__ */
|
|
24797
|
+
return /* @__PURE__ */ jsx200(motion6.div, { ...mergeProps31(void 0, {
|
|
24698
24798
|
overflow: "auto"
|
|
24699
24799
|
}, {
|
|
24700
24800
|
paddingTop: "pt3",
|
|
@@ -24707,7 +24807,7 @@ var SuperDrawerContent = ({
|
|
|
24707
24807
|
}
|
|
24708
24808
|
return /* @__PURE__ */ jsxs102(Fragment46, { children: [
|
|
24709
24809
|
wrapWithMotionAndMaybeBack(children),
|
|
24710
|
-
actions && /* @__PURE__ */
|
|
24810
|
+
actions && /* @__PURE__ */ jsx200("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ jsx200("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx200(Button, { ...buttonProps }, i)) }) })
|
|
24711
24811
|
] });
|
|
24712
24812
|
};
|
|
24713
24813
|
|
|
@@ -24750,7 +24850,7 @@ function visit(rows, fn) {
|
|
|
24750
24850
|
}
|
|
24751
24851
|
|
|
24752
24852
|
// src/components/TagGroup.tsx
|
|
24753
|
-
import { jsx as
|
|
24853
|
+
import { jsx as jsx201, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
24754
24854
|
function TagGroup(props) {
|
|
24755
24855
|
const {
|
|
24756
24856
|
tags,
|
|
@@ -24759,8 +24859,8 @@ function TagGroup(props) {
|
|
|
24759
24859
|
} = props;
|
|
24760
24860
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
24761
24861
|
return /* @__PURE__ */ jsxs103("div", { ...tid, className: "df aic fww gap1", children: [
|
|
24762
|
-
tags.map((tag) => /* @__PURE__ */
|
|
24763
|
-
onEdit && /* @__PURE__ */
|
|
24862
|
+
tags.map((tag) => /* @__PURE__ */ jsx201(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
24863
|
+
onEdit && /* @__PURE__ */ jsx201("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ jsx201(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
24764
24864
|
] });
|
|
24765
24865
|
}
|
|
24766
24866
|
|
|
@@ -24773,15 +24873,15 @@ function useToast() {
|
|
|
24773
24873
|
}
|
|
24774
24874
|
|
|
24775
24875
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
24776
|
-
import { trussProps as
|
|
24777
|
-
import { jsx as
|
|
24876
|
+
import { trussProps as trussProps106, mergeProps as mergeProps32, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
|
|
24877
|
+
import { jsx as jsx202, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
24778
24878
|
var __maybeInc21 = (inc) => {
|
|
24779
24879
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
24780
24880
|
};
|
|
24781
24881
|
function SideNavLayout(props) {
|
|
24782
24882
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
24783
|
-
if (hasProvider) return /* @__PURE__ */
|
|
24784
|
-
return /* @__PURE__ */
|
|
24883
|
+
if (hasProvider) return /* @__PURE__ */ jsx202(SideNavLayoutContent, { ...props });
|
|
24884
|
+
return /* @__PURE__ */ jsx202(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx202(SideNavLayoutContent, { ...props }) });
|
|
24785
24885
|
}
|
|
24786
24886
|
function SideNavLayoutContent(props) {
|
|
24787
24887
|
const {
|
|
@@ -24803,7 +24903,7 @@ function SideNavLayoutContent(props) {
|
|
|
24803
24903
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
24804
24904
|
const navTop = bannerAndNavbarChromeTop();
|
|
24805
24905
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
24806
|
-
const rail = showRail && /* @__PURE__ */ jsxs104("div", { ...
|
|
24906
|
+
const rail = showRail && /* @__PURE__ */ jsxs104("div", { ...trussProps106({
|
|
24807
24907
|
...{
|
|
24808
24908
|
display: "df",
|
|
24809
24909
|
flexDirection: "fdc",
|
|
@@ -24860,18 +24960,18 @@ function SideNavLayoutContent(props) {
|
|
|
24860
24960
|
}
|
|
24861
24961
|
}
|
|
24862
24962
|
}), ...tid.sideNav, children: [
|
|
24863
|
-
showCollapseToggle && /* @__PURE__ */
|
|
24864
|
-
/* @__PURE__ */
|
|
24963
|
+
showCollapseToggle && /* @__PURE__ */ jsx202("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ jsx202(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
24964
|
+
/* @__PURE__ */ jsx202("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ jsx202(SideNav, { ...sideNav }) })
|
|
24865
24965
|
] });
|
|
24866
|
-
return /* @__PURE__ */
|
|
24966
|
+
return /* @__PURE__ */ jsx202(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs104("div", { ...mergeProps32(void 0, {
|
|
24867
24967
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
24868
24968
|
}, {
|
|
24869
24969
|
display: "df",
|
|
24870
24970
|
flexDirection: "fdr",
|
|
24871
24971
|
width: "w100"
|
|
24872
24972
|
}), ...tid, children: [
|
|
24873
|
-
contrastRail ? /* @__PURE__ */
|
|
24874
|
-
/* @__PURE__ */
|
|
24973
|
+
contrastRail ? /* @__PURE__ */ jsx202(ContrastScope, { children: rail }) : rail,
|
|
24974
|
+
/* @__PURE__ */ jsx202("div", { ...trussProps106({
|
|
24875
24975
|
display: "df",
|
|
24876
24976
|
flexDirection: "fdc",
|
|
24877
24977
|
flexGrow: "fg1",
|
|
@@ -24887,8 +24987,8 @@ function SideNavLayoutContent(props) {
|
|
|
24887
24987
|
}
|
|
24888
24988
|
|
|
24889
24989
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
24890
|
-
import { trussProps as
|
|
24891
|
-
import { jsx as
|
|
24990
|
+
import { trussProps as trussProps107, mergeProps as mergeProps33, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
|
|
24991
|
+
import { jsx as jsx203, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
24892
24992
|
var __maybeInc22 = (inc) => {
|
|
24893
24993
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
24894
24994
|
};
|
|
@@ -24904,18 +25004,18 @@ function EnvironmentBannerLayout(props) {
|
|
|
24904
25004
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
24905
25005
|
};
|
|
24906
25006
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
24907
|
-
return /* @__PURE__ */
|
|
25007
|
+
return /* @__PURE__ */ jsx203(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx203(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ jsxs105("div", { ...mergeProps33(void 0, style, {
|
|
24908
25008
|
display: "df",
|
|
24909
25009
|
flexDirection: "fdc",
|
|
24910
25010
|
width: "wfc",
|
|
24911
25011
|
minWidth: "mw100"
|
|
24912
25012
|
}), ...tid, children: [
|
|
24913
|
-
showBanner && environmentBanner && /* @__PURE__ */
|
|
25013
|
+
showBanner && environmentBanner && /* @__PURE__ */ jsx203("div", { ...mergeProps33(void 0, {
|
|
24914
25014
|
height: environmentBannerSizePx
|
|
24915
25015
|
}, {
|
|
24916
25016
|
flexShrink: "fs0",
|
|
24917
25017
|
width: "w100"
|
|
24918
|
-
}), children: /* @__PURE__ */
|
|
25018
|
+
}), children: /* @__PURE__ */ jsx203("div", { ...trussProps107({
|
|
24919
25019
|
position: "fixed",
|
|
24920
25020
|
top: "top0",
|
|
24921
25021
|
left: "left0",
|
|
@@ -24925,17 +25025,17 @@ function EnvironmentBannerLayout(props) {
|
|
|
24925
25025
|
width: ["w_var", {
|
|
24926
25026
|
"--width": maybeCssVar57(__maybeInc22(innerWidth))
|
|
24927
25027
|
}]
|
|
24928
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */
|
|
25028
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ jsx203(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
24929
25029
|
children
|
|
24930
25030
|
] }) }) });
|
|
24931
25031
|
}
|
|
24932
25032
|
|
|
24933
25033
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
24934
|
-
import { useMemo as useMemo56, useRef as
|
|
24935
|
-
import { mergeProps as
|
|
25034
|
+
import { useMemo as useMemo56, useRef as useRef64 } from "react";
|
|
25035
|
+
import { mergeProps as mergeProps34, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
|
|
24936
25036
|
|
|
24937
25037
|
// src/layouts/useAutoHideOnScroll.ts
|
|
24938
|
-
import { useLayoutEffect as useLayoutEffect8, useRef as
|
|
25038
|
+
import { useLayoutEffect as useLayoutEffect8, useRef as useRef63, useState as useState57 } from "react";
|
|
24939
25039
|
var THRESHOLD = 80;
|
|
24940
25040
|
function getInitialAutoHideState() {
|
|
24941
25041
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -24946,13 +25046,13 @@ function getInitialAutoHideState() {
|
|
|
24946
25046
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
24947
25047
|
const initial = getInitialAutoHideState();
|
|
24948
25048
|
const [state, setState] = useState57(initial.state);
|
|
24949
|
-
const stateRef =
|
|
25049
|
+
const stateRef = useRef63(initial.state);
|
|
24950
25050
|
const [atTop, setAtTop] = useState57(initial.atTop);
|
|
24951
|
-
const atTopRef =
|
|
24952
|
-
const getTopOffsetRef =
|
|
25051
|
+
const atTopRef = useRef63(initial.atTop);
|
|
25052
|
+
const getTopOffsetRef = useRef63(getTopOffset);
|
|
24953
25053
|
getTopOffsetRef.current = getTopOffset;
|
|
24954
|
-
const lastScrollY =
|
|
24955
|
-
const lastScrollHeight =
|
|
25054
|
+
const lastScrollY = useRef63(Number.POSITIVE_INFINITY);
|
|
25055
|
+
const lastScrollHeight = useRef63(0);
|
|
24956
25056
|
useLayoutEffect8(() => {
|
|
24957
25057
|
if (!enabled) {
|
|
24958
25058
|
stateRef.current = "static";
|
|
@@ -25043,17 +25143,17 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
25043
25143
|
|
|
25044
25144
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
25045
25145
|
import { createContext as createContext15, useContext as useContext27 } from "react";
|
|
25046
|
-
import { jsx as
|
|
25146
|
+
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
25047
25147
|
var NavbarLayoutHeightContext = createContext15(0);
|
|
25048
25148
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
25049
|
-
return /* @__PURE__ */
|
|
25149
|
+
return /* @__PURE__ */ jsx204(NavbarLayoutHeightContext.Provider, { value, children });
|
|
25050
25150
|
}
|
|
25051
25151
|
function useNavbarLayoutHeight() {
|
|
25052
25152
|
return useContext27(NavbarLayoutHeightContext);
|
|
25053
25153
|
}
|
|
25054
25154
|
|
|
25055
25155
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25056
|
-
import { jsx as
|
|
25156
|
+
import { jsx as jsx205, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
25057
25157
|
var __maybeInc23 = (inc) => {
|
|
25058
25158
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25059
25159
|
};
|
|
@@ -25063,8 +25163,8 @@ function NavbarLayout(props) {
|
|
|
25063
25163
|
children
|
|
25064
25164
|
} = props;
|
|
25065
25165
|
const tid = useTestIds(props, "navbarLayout");
|
|
25066
|
-
const navMetricsRef =
|
|
25067
|
-
const spacerRef =
|
|
25166
|
+
const navMetricsRef = useRef64(null);
|
|
25167
|
+
const spacerRef = useRef64(null);
|
|
25068
25168
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
25069
25169
|
const {
|
|
25070
25170
|
state: autoHideState,
|
|
@@ -25106,25 +25206,25 @@ function NavbarLayout(props) {
|
|
|
25106
25206
|
const innerStyle = autoHideState !== "static" ? {
|
|
25107
25207
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
25108
25208
|
} : void 0;
|
|
25109
|
-
const navbarEl = useMemo56(() => /* @__PURE__ */
|
|
25110
|
-
return /* @__PURE__ */
|
|
25209
|
+
const navbarEl = useMemo56(() => /* @__PURE__ */ jsx205(Navbar, { ...navbar }), [navbar]);
|
|
25210
|
+
return /* @__PURE__ */ jsx205(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx205(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsxs106("div", { ...mergeProps34(void 0, cssVars, {
|
|
25111
25211
|
display: "df",
|
|
25112
25212
|
flexDirection: "fdc",
|
|
25113
25213
|
width: "wfc",
|
|
25114
25214
|
minWidth: "mw100"
|
|
25115
25215
|
}), ...tid, children: [
|
|
25116
|
-
/* @__PURE__ */
|
|
25216
|
+
/* @__PURE__ */ jsx205("div", { ref: spacerRef, ...mergeProps34(void 0, {
|
|
25117
25217
|
height: navHeight
|
|
25118
25218
|
}, {
|
|
25119
25219
|
flexShrink: "fs0",
|
|
25120
25220
|
width: "w100"
|
|
25121
|
-
}), children: /* @__PURE__ */
|
|
25122
|
-
/* @__PURE__ */
|
|
25221
|
+
}), children: /* @__PURE__ */ jsx205("div", { ref: navMetricsRef, ...mergeProps34(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
25222
|
+
/* @__PURE__ */ jsx205("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
25123
25223
|
] }) }) });
|
|
25124
25224
|
}
|
|
25125
25225
|
|
|
25126
25226
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25127
|
-
import { useCallback as useCallback39, useMemo as useMemo57, useRef as
|
|
25227
|
+
import { useCallback as useCallback39, useMemo as useMemo57, useRef as useRef65 } from "react";
|
|
25128
25228
|
|
|
25129
25229
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
25130
25230
|
function useBannerAndNavbarHeight() {
|
|
@@ -25132,8 +25232,8 @@ function useBannerAndNavbarHeight() {
|
|
|
25132
25232
|
}
|
|
25133
25233
|
|
|
25134
25234
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25135
|
-
import { mergeProps as
|
|
25136
|
-
import { jsx as
|
|
25235
|
+
import { mergeProps as mergeProps35, maybeCssVar as maybeCssVar59 } from "@homebound/truss/runtime";
|
|
25236
|
+
import { jsx as jsx206, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
25137
25237
|
var __maybeInc24 = (inc) => {
|
|
25138
25238
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25139
25239
|
};
|
|
@@ -25144,11 +25244,11 @@ function PageHeaderLayout(props) {
|
|
|
25144
25244
|
} = props;
|
|
25145
25245
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
25146
25246
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
25147
|
-
const bannerAndNavbarHeightRef =
|
|
25247
|
+
const bannerAndNavbarHeightRef = useRef65(bannerAndNavbarHeight);
|
|
25148
25248
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
25149
25249
|
const getBannerAndNavbarHeight = useCallback39(() => bannerAndNavbarHeightRef.current, []);
|
|
25150
|
-
const headerMetricsRef =
|
|
25151
|
-
const spacerRef =
|
|
25250
|
+
const headerMetricsRef = useRef65(null);
|
|
25251
|
+
const spacerRef = useRef65(null);
|
|
25152
25252
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
25153
25253
|
const {
|
|
25154
25254
|
state: autoHideState,
|
|
@@ -25188,19 +25288,19 @@ function PageHeaderLayout(props) {
|
|
|
25188
25288
|
const innerStyle = autoHideState !== "static" ? {
|
|
25189
25289
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
25190
25290
|
} : void 0;
|
|
25191
|
-
const pageHeaderEl = useMemo57(() => /* @__PURE__ */
|
|
25192
|
-
return /* @__PURE__ */
|
|
25291
|
+
const pageHeaderEl = useMemo57(() => /* @__PURE__ */ jsx206(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
25292
|
+
return /* @__PURE__ */ jsx206(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs107("div", { ...mergeProps35(void 0, cssVars, {
|
|
25193
25293
|
display: "df",
|
|
25194
25294
|
flexDirection: "fdc",
|
|
25195
25295
|
width: "w100"
|
|
25196
25296
|
}), ...tid, children: [
|
|
25197
|
-
/* @__PURE__ */
|
|
25297
|
+
/* @__PURE__ */ jsx206("div", { ref: spacerRef, ...mergeProps35(void 0, {
|
|
25198
25298
|
height: headerHeight
|
|
25199
25299
|
}, {
|
|
25200
25300
|
flexShrink: "fs0",
|
|
25201
25301
|
width: "w100"
|
|
25202
|
-
}), children: /* @__PURE__ */
|
|
25203
|
-
/* @__PURE__ */
|
|
25302
|
+
}), children: /* @__PURE__ */ jsx206("div", { ref: headerMetricsRef, ...mergeProps35(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
25303
|
+
/* @__PURE__ */ jsx206("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
25204
25304
|
] }) });
|
|
25205
25305
|
}
|
|
25206
25306
|
export {
|
|
@@ -25293,6 +25393,7 @@ export {
|
|
|
25293
25393
|
Icon,
|
|
25294
25394
|
IconButton,
|
|
25295
25395
|
Icons,
|
|
25396
|
+
JumpLink,
|
|
25296
25397
|
KEPT_GROUP,
|
|
25297
25398
|
Loader,
|
|
25298
25399
|
LoadingSkeleton,
|