@homebound/beam 3.50.0 → 3.51.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 +285 -113
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +265 -95
- package/dist/index.js.map +1 -1
- package/dist/truss.css +6 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -170,6 +170,8 @@ __export(index_exports, {
|
|
|
170
170
|
SortHeader: () => SortHeader,
|
|
171
171
|
StaticField: () => StaticField,
|
|
172
172
|
Stepper: () => Stepper,
|
|
173
|
+
StepperTab: () => StepperTab,
|
|
174
|
+
StepperTabs: () => StepperTabs,
|
|
173
175
|
SubmitButton: () => SubmitButton,
|
|
174
176
|
SuperDrawerContent: () => SuperDrawerContent,
|
|
175
177
|
SuperDrawerHeader: () => SuperDrawerHeader,
|
|
@@ -24993,10 +24995,178 @@ function StepIcon({
|
|
|
24993
24995
|
}) }) });
|
|
24994
24996
|
}
|
|
24995
24997
|
|
|
24996
|
-
// src/components/
|
|
24997
|
-
var
|
|
24998
|
+
// src/components/StepperTabs/StepperTab.tsx
|
|
24999
|
+
var import_react144 = require("react");
|
|
25000
|
+
var import_react_aria64 = require("react-aria");
|
|
24998
25001
|
var import_runtime115 = require("@homebound/truss/runtime");
|
|
24999
25002
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
25003
|
+
function StepperTab(props) {
|
|
25004
|
+
const {
|
|
25005
|
+
label,
|
|
25006
|
+
value,
|
|
25007
|
+
active,
|
|
25008
|
+
completed,
|
|
25009
|
+
onClick,
|
|
25010
|
+
disabled = false,
|
|
25011
|
+
collapsed = false
|
|
25012
|
+
} = props;
|
|
25013
|
+
const ariaProps = {
|
|
25014
|
+
onPress: () => onClick(value),
|
|
25015
|
+
isDisabled: disabled || collapsed
|
|
25016
|
+
};
|
|
25017
|
+
const ref = (0, import_react144.useRef)(null);
|
|
25018
|
+
const {
|
|
25019
|
+
buttonProps
|
|
25020
|
+
} = (0, import_react_aria64.useButton)(ariaProps, ref);
|
|
25021
|
+
const {
|
|
25022
|
+
isFocusVisible,
|
|
25023
|
+
focusProps
|
|
25024
|
+
} = (0, import_react_aria64.useFocusRing)();
|
|
25025
|
+
const {
|
|
25026
|
+
hoverProps,
|
|
25027
|
+
isHovered
|
|
25028
|
+
} = (0, import_react_aria64.useHover)(ariaProps);
|
|
25029
|
+
const tid = useTestIds(props, "stepperTab");
|
|
25030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("button", { ref, ...(0, import_react_aria64.mergeProps)(buttonProps, focusProps, hoverProps), "aria-label": label, ...(0, import_runtime115.trussProps)({
|
|
25031
|
+
...stepperTabStyles.baseStyles,
|
|
25032
|
+
...getStateStyles(active, completed),
|
|
25033
|
+
...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
|
|
25034
|
+
...collapsed ? getCollapsedStyles(active, completed) : {},
|
|
25035
|
+
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
25036
|
+
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
25037
|
+
}), ...tid[defaultTestId(value)], children: [
|
|
25038
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1", children: label }),
|
|
25039
|
+
completed && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("span", { className: "fs0 ml1", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Icon, { icon: "check", inc: 2.5, ...tid.check }) }),
|
|
25040
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_react_aria64.VisuallyHidden, { children: completed ? "Complete" : "Not Complete" })
|
|
25041
|
+
] });
|
|
25042
|
+
}
|
|
25043
|
+
function withBorderBottom(color) {
|
|
25044
|
+
return {
|
|
25045
|
+
...{
|
|
25046
|
+
borderBottomStyle: "bbs_solid",
|
|
25047
|
+
borderBottomWidth: ["borderBottomWidth_var", {
|
|
25048
|
+
"--borderBottomWidth": (0, import_runtime115.maybeCssVar)(`3px`)
|
|
25049
|
+
}]
|
|
25050
|
+
},
|
|
25051
|
+
...color
|
|
25052
|
+
};
|
|
25053
|
+
}
|
|
25054
|
+
function getStateStyles(active, completed) {
|
|
25055
|
+
return {
|
|
25056
|
+
...{
|
|
25057
|
+
color: "gray400",
|
|
25058
|
+
...active || completed ? {
|
|
25059
|
+
color: "blue700"
|
|
25060
|
+
} : {},
|
|
25061
|
+
...active ? {
|
|
25062
|
+
fontWeight: "fw6",
|
|
25063
|
+
fontSize: "fz_14px",
|
|
25064
|
+
lineHeight: "lh_20px"
|
|
25065
|
+
} : {}
|
|
25066
|
+
},
|
|
25067
|
+
...withBorderBottom(active || completed ? {
|
|
25068
|
+
borderColor: "bcBlue600"
|
|
25069
|
+
} : {
|
|
25070
|
+
borderColor: "bcGray300"
|
|
25071
|
+
})
|
|
25072
|
+
};
|
|
25073
|
+
}
|
|
25074
|
+
function getCollapsedStyles(active, completed) {
|
|
25075
|
+
return {
|
|
25076
|
+
...{
|
|
25077
|
+
cursor: "cursor_default",
|
|
25078
|
+
height: "h_0px",
|
|
25079
|
+
paddingTop: "pt0",
|
|
25080
|
+
paddingBottom: "pb0"
|
|
25081
|
+
},
|
|
25082
|
+
...completed && !active ? {
|
|
25083
|
+
borderColor: "bcBlue600"
|
|
25084
|
+
} : {
|
|
25085
|
+
borderColor: "bcGray300"
|
|
25086
|
+
}
|
|
25087
|
+
};
|
|
25088
|
+
}
|
|
25089
|
+
var stepperTabStyles = {
|
|
25090
|
+
baseStyles: {
|
|
25091
|
+
display: "df",
|
|
25092
|
+
alignItems: "aic",
|
|
25093
|
+
flexGrow: "fg1",
|
|
25094
|
+
paddingTop: "pt1",
|
|
25095
|
+
paddingBottom: "pb1",
|
|
25096
|
+
paddingRight: "pr_12px",
|
|
25097
|
+
paddingLeft: "pl_24px",
|
|
25098
|
+
fontWeight: "fw4",
|
|
25099
|
+
fontSize: "fz_14px",
|
|
25100
|
+
lineHeight: "lh_20px",
|
|
25101
|
+
overflow: "oh",
|
|
25102
|
+
textAlign: "tal"
|
|
25103
|
+
},
|
|
25104
|
+
hoverStyles: {
|
|
25105
|
+
backgroundColor: "bgGray100"
|
|
25106
|
+
},
|
|
25107
|
+
focusRingStyles: {
|
|
25108
|
+
boxShadow: "bshFocus",
|
|
25109
|
+
outline: "outline0"
|
|
25110
|
+
},
|
|
25111
|
+
// Disabled always wins over both the state's and the collapsed border color.
|
|
25112
|
+
disabledStyles: {
|
|
25113
|
+
color: "gray400",
|
|
25114
|
+
cursor: "cursorNotAllowed",
|
|
25115
|
+
borderColor: "bcGray300"
|
|
25116
|
+
}
|
|
25117
|
+
};
|
|
25118
|
+
|
|
25119
|
+
// src/components/StepperTabs/StepperTabs.tsx
|
|
25120
|
+
var import_runtime116 = require("@homebound/truss/runtime");
|
|
25121
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
25122
|
+
var import_react145 = require("react");
|
|
25123
|
+
function StepperTabs(props) {
|
|
25124
|
+
const {
|
|
25125
|
+
steps,
|
|
25126
|
+
currentStep,
|
|
25127
|
+
onChange
|
|
25128
|
+
} = props;
|
|
25129
|
+
const tid = useTestIds(props, "stepperTabs");
|
|
25130
|
+
const {
|
|
25131
|
+
sm: collapsed
|
|
25132
|
+
} = useBreakpoint();
|
|
25133
|
+
const capWidth = steps.length <= 3;
|
|
25134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("ol", { ...(0, import_runtime116.trussProps)({
|
|
25135
|
+
padding: "p_0",
|
|
25136
|
+
margin: "m_0",
|
|
25137
|
+
listStyle: "lis_none",
|
|
25138
|
+
display: "df",
|
|
25139
|
+
gap: ["gap_var", {
|
|
25140
|
+
"--gap": `${gapPx}px`
|
|
25141
|
+
}],
|
|
25142
|
+
width: "w100",
|
|
25143
|
+
borderBottomStyle: "bbs_solid",
|
|
25144
|
+
borderBottomWidth: "bbw_1px",
|
|
25145
|
+
borderColor: "bcGray400"
|
|
25146
|
+
}), children: steps.map((step) => {
|
|
25147
|
+
const isCurrent = step.value === currentStep;
|
|
25148
|
+
return /* @__PURE__ */ (0, import_react145.createElement)("li", { ...(0, import_runtime116.trussProps)({
|
|
25149
|
+
display: "df",
|
|
25150
|
+
flexGrow: "fg1",
|
|
25151
|
+
flexBasis: "fb_0",
|
|
25152
|
+
...collapsed ? {
|
|
25153
|
+
minWidth: "mw0"
|
|
25154
|
+
} : {},
|
|
25155
|
+
...capWidth ? {
|
|
25156
|
+
maxWidth: ["maxw_var", {
|
|
25157
|
+
"--maxWidth": `${maxStepWidthPx}px`
|
|
25158
|
+
}]
|
|
25159
|
+
} : {}
|
|
25160
|
+
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: step.completed, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
|
|
25161
|
+
}) }) });
|
|
25162
|
+
}
|
|
25163
|
+
var maxStepWidthPx = 280;
|
|
25164
|
+
var gapPx = 6;
|
|
25165
|
+
|
|
25166
|
+
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
25167
|
+
var import_react_dom7 = require("react-dom");
|
|
25168
|
+
var import_runtime117 = require("@homebound/truss/runtime");
|
|
25169
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
25000
25170
|
function SuperDrawerHeader(props) {
|
|
25001
25171
|
const {
|
|
25002
25172
|
hideControls
|
|
@@ -25013,20 +25183,20 @@ function SuperDrawerHeader(props) {
|
|
|
25013
25183
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
25014
25184
|
const isDetail = currentContent !== firstContent;
|
|
25015
25185
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
25016
|
-
return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0,
|
|
25017
|
-
isStructuredProps(props) ? /* @__PURE__ */ (0,
|
|
25018
|
-
/* @__PURE__ */ (0,
|
|
25019
|
-
/* @__PURE__ */ (0,
|
|
25186
|
+
return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
25187
|
+
isStructuredProps(props) ? /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
25188
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "fg1 df aic gap2", children: [
|
|
25189
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
25020
25190
|
props.left
|
|
25021
25191
|
] }),
|
|
25022
|
-
props.right && /* @__PURE__ */ (0,
|
|
25023
|
-
] }) : /* @__PURE__ */ (0,
|
|
25024
|
-
!hideControls && /* @__PURE__ */ (0,
|
|
25192
|
+
props.right && /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "fs0", children: props.right })
|
|
25193
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "fg1", children: props.children }),
|
|
25194
|
+
!hideControls && /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { ...(0, import_runtime117.trussProps)({
|
|
25025
25195
|
flexShrink: "fs0",
|
|
25026
25196
|
...isDetail ? {
|
|
25027
25197
|
visibility: "vh"
|
|
25028
25198
|
} : {}
|
|
25029
|
-
}), children: /* @__PURE__ */ (0,
|
|
25199
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ButtonGroup, { buttons: [{
|
|
25030
25200
|
icon: "chevronLeft",
|
|
25031
25201
|
onClick: () => onPrevClick && onPrevClick(),
|
|
25032
25202
|
disabled: !onPrevClick
|
|
@@ -25042,18 +25212,18 @@ function isStructuredProps(props) {
|
|
|
25042
25212
|
}
|
|
25043
25213
|
|
|
25044
25214
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
25045
|
-
var
|
|
25215
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
25046
25216
|
function ConfirmCloseModal(props) {
|
|
25047
25217
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
25048
25218
|
const { modalState } = useBeamContext();
|
|
25049
25219
|
function closeModal() {
|
|
25050
25220
|
modalState.current = void 0;
|
|
25051
25221
|
}
|
|
25052
|
-
return /* @__PURE__ */ (0,
|
|
25053
|
-
/* @__PURE__ */ (0,
|
|
25054
|
-
/* @__PURE__ */ (0,
|
|
25055
|
-
/* @__PURE__ */ (0,
|
|
25056
|
-
/* @__PURE__ */ (0,
|
|
25222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
25223
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
25224
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("p", { children: "Any changes you've made so far will be lost." }) }),
|
|
25225
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(ModalFooter, { children: [
|
|
25226
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
25057
25227
|
Button,
|
|
25058
25228
|
{
|
|
25059
25229
|
variant: "quaternary",
|
|
@@ -25064,7 +25234,7 @@ function ConfirmCloseModal(props) {
|
|
|
25064
25234
|
}
|
|
25065
25235
|
}
|
|
25066
25236
|
),
|
|
25067
|
-
/* @__PURE__ */ (0,
|
|
25237
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Button, { label: continueText, onClick: closeModal })
|
|
25068
25238
|
] })
|
|
25069
25239
|
] });
|
|
25070
25240
|
}
|
|
@@ -25073,8 +25243,8 @@ function ConfirmCloseModal(props) {
|
|
|
25073
25243
|
var import_framer_motion6 = require("framer-motion");
|
|
25074
25244
|
|
|
25075
25245
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
25076
|
-
var
|
|
25077
|
-
var
|
|
25246
|
+
var import_react146 = require("react");
|
|
25247
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
25078
25248
|
function useSuperDrawer() {
|
|
25079
25249
|
const {
|
|
25080
25250
|
drawerContentStack: contentStack,
|
|
@@ -25086,7 +25256,7 @@ function useSuperDrawer() {
|
|
|
25086
25256
|
function canCloseDrawerDetails(i, doChange) {
|
|
25087
25257
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
25088
25258
|
if (!canClose(canCloseDrawerDetail)) {
|
|
25089
|
-
openModal({ content: /* @__PURE__ */ (0,
|
|
25259
|
+
openModal({ content: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
25090
25260
|
return false;
|
|
25091
25261
|
}
|
|
25092
25262
|
}
|
|
@@ -25106,14 +25276,14 @@ function useSuperDrawer() {
|
|
|
25106
25276
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
25107
25277
|
if (!canClose(canCloseDrawer)) {
|
|
25108
25278
|
openModal({
|
|
25109
|
-
content: /* @__PURE__ */ (0,
|
|
25279
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
25110
25280
|
});
|
|
25111
25281
|
return;
|
|
25112
25282
|
}
|
|
25113
25283
|
}
|
|
25114
25284
|
doChange();
|
|
25115
25285
|
}
|
|
25116
|
-
const closeActions = (0,
|
|
25286
|
+
const closeActions = (0, import_react146.useMemo)(
|
|
25117
25287
|
() => {
|
|
25118
25288
|
return {
|
|
25119
25289
|
/** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
|
|
@@ -25148,7 +25318,7 @@ function useSuperDrawer() {
|
|
|
25148
25318
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25149
25319
|
[canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
|
|
25150
25320
|
);
|
|
25151
|
-
const actions = (0,
|
|
25321
|
+
const actions = (0, import_react146.useMemo)(
|
|
25152
25322
|
() => {
|
|
25153
25323
|
return {
|
|
25154
25324
|
// TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
|
|
@@ -25201,8 +25371,8 @@ function canClose(canCloseCheck) {
|
|
|
25201
25371
|
}
|
|
25202
25372
|
|
|
25203
25373
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
25204
|
-
var
|
|
25205
|
-
var
|
|
25374
|
+
var import_runtime118 = require("@homebound/truss/runtime");
|
|
25375
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
25206
25376
|
var SuperDrawerContent = ({
|
|
25207
25377
|
children,
|
|
25208
25378
|
actions
|
|
@@ -25222,17 +25392,17 @@ var SuperDrawerContent = ({
|
|
|
25222
25392
|
} = firstContent ?? {};
|
|
25223
25393
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
25224
25394
|
if (kind === "open") {
|
|
25225
|
-
return /* @__PURE__ */ (0,
|
|
25395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_framer_motion6.motion.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
25226
25396
|
} else if (kind === "detail") {
|
|
25227
|
-
return /* @__PURE__ */ (0,
|
|
25397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_framer_motion6.motion.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
25228
25398
|
overflow: "auto"
|
|
25229
25399
|
}, transition: {
|
|
25230
25400
|
overflow: {
|
|
25231
25401
|
delay: 0.3
|
|
25232
25402
|
}
|
|
25233
25403
|
}, children: [
|
|
25234
|
-
/* @__PURE__ */ (0,
|
|
25235
|
-
/* @__PURE__ */ (0,
|
|
25404
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
25405
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_framer_motion6.motion.div, { initial: {
|
|
25236
25406
|
x: width2,
|
|
25237
25407
|
opacity: 0
|
|
25238
25408
|
}, animate: {
|
|
@@ -25250,7 +25420,7 @@ var SuperDrawerContent = ({
|
|
|
25250
25420
|
}, className: "pt2", children: children2 })
|
|
25251
25421
|
] }, "content");
|
|
25252
25422
|
} else {
|
|
25253
|
-
return /* @__PURE__ */ (0,
|
|
25423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_framer_motion6.motion.div, { ...(0, import_runtime118.mergeProps)(void 0, {
|
|
25254
25424
|
overflow: "auto"
|
|
25255
25425
|
}, {
|
|
25256
25426
|
paddingTop: "pt3",
|
|
@@ -25261,9 +25431,9 @@ var SuperDrawerContent = ({
|
|
|
25261
25431
|
}) }, "content");
|
|
25262
25432
|
}
|
|
25263
25433
|
}
|
|
25264
|
-
return /* @__PURE__ */ (0,
|
|
25434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_jsx_runtime202.Fragment, { children: [
|
|
25265
25435
|
wrapWithMotionAndMaybeBack(children),
|
|
25266
|
-
actions && /* @__PURE__ */ (0,
|
|
25436
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Button, { ...buttonProps }, i)) }) })
|
|
25267
25437
|
] });
|
|
25268
25438
|
};
|
|
25269
25439
|
|
|
@@ -25306,7 +25476,7 @@ function visit(rows, fn) {
|
|
|
25306
25476
|
}
|
|
25307
25477
|
|
|
25308
25478
|
// src/components/TagGroup.tsx
|
|
25309
|
-
var
|
|
25479
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
25310
25480
|
function TagGroup(props) {
|
|
25311
25481
|
const {
|
|
25312
25482
|
tags,
|
|
@@ -25314,30 +25484,30 @@ function TagGroup(props) {
|
|
|
25314
25484
|
...otherProps
|
|
25315
25485
|
} = props;
|
|
25316
25486
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
25317
|
-
return /* @__PURE__ */ (0,
|
|
25318
|
-
tags.map((tag) => /* @__PURE__ */ (0,
|
|
25319
|
-
onEdit && /* @__PURE__ */ (0,
|
|
25487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)("div", { ...tid, className: "df aic fww gap1", children: [
|
|
25488
|
+
tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
25489
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
25320
25490
|
] });
|
|
25321
25491
|
}
|
|
25322
25492
|
|
|
25323
25493
|
// src/components/Toast/useToast.tsx
|
|
25324
|
-
var
|
|
25494
|
+
var import_react147 = require("react");
|
|
25325
25495
|
function useToast() {
|
|
25326
25496
|
const { setNotice, clear } = useToastContext();
|
|
25327
|
-
const showToast = (0,
|
|
25497
|
+
const showToast = (0, import_react147.useCallback)((props) => setNotice(props), [setNotice]);
|
|
25328
25498
|
return { showToast, clear };
|
|
25329
25499
|
}
|
|
25330
25500
|
|
|
25331
25501
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
25332
|
-
var
|
|
25333
|
-
var
|
|
25502
|
+
var import_runtime119 = require("@homebound/truss/runtime");
|
|
25503
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
25334
25504
|
var __maybeInc21 = (inc) => {
|
|
25335
25505
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25336
25506
|
};
|
|
25337
25507
|
function SideNavLayout(props) {
|
|
25338
25508
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
25339
|
-
if (hasProvider) return /* @__PURE__ */ (0,
|
|
25340
|
-
return /* @__PURE__ */ (0,
|
|
25509
|
+
if (hasProvider) return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutContent, { ...props });
|
|
25510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutContent, { ...props }) });
|
|
25341
25511
|
}
|
|
25342
25512
|
function SideNavLayoutContent(props) {
|
|
25343
25513
|
const {
|
|
@@ -25359,7 +25529,7 @@ function SideNavLayoutContent(props) {
|
|
|
25359
25529
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
25360
25530
|
const navTop = bannerAndNavbarChromeTop();
|
|
25361
25531
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
25362
|
-
const rail = showRail && /* @__PURE__ */ (0,
|
|
25532
|
+
const rail = showRail && /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)("div", { ...(0, import_runtime119.trussProps)({
|
|
25363
25533
|
...{
|
|
25364
25534
|
display: "df",
|
|
25365
25535
|
flexDirection: "fdc",
|
|
@@ -25383,14 +25553,14 @@ function SideNavLayoutContent(props) {
|
|
|
25383
25553
|
position: "sticky",
|
|
25384
25554
|
left: "left0",
|
|
25385
25555
|
zIndex: ["z_var", {
|
|
25386
|
-
"--zIndex": (0,
|
|
25556
|
+
"--zIndex": (0, import_runtime119.maybeCssVar)(zIndices.sideNav)
|
|
25387
25557
|
}],
|
|
25388
25558
|
top: ["top_var", {
|
|
25389
|
-
"--top": (0,
|
|
25559
|
+
"--top": (0, import_runtime119.maybeCssVar)(__maybeInc21(navTop))
|
|
25390
25560
|
}],
|
|
25391
25561
|
alignSelf: "asfs",
|
|
25392
25562
|
height: ["h_var", {
|
|
25393
|
-
"--height": (0,
|
|
25563
|
+
"--height": (0, import_runtime119.maybeCssVar)(__maybeInc21(railViewportHeight))
|
|
25394
25564
|
}],
|
|
25395
25565
|
width: ["w_var", {
|
|
25396
25566
|
"--width": `${collapsed ? railCollapsedWidthPx : railWidthPx}px`
|
|
@@ -25400,11 +25570,11 @@ function SideNavLayoutContent(props) {
|
|
|
25400
25570
|
position: "fixed",
|
|
25401
25571
|
left: "left0",
|
|
25402
25572
|
top: ["top_var", {
|
|
25403
|
-
"--top": (0,
|
|
25573
|
+
"--top": (0, import_runtime119.maybeCssVar)(__maybeInc21(navTop))
|
|
25404
25574
|
}],
|
|
25405
25575
|
bottom: "bottom0",
|
|
25406
25576
|
zIndex: ["z_var", {
|
|
25407
|
-
"--zIndex": (0,
|
|
25577
|
+
"--zIndex": (0, import_runtime119.maybeCssVar)(zIndices.sideNav)
|
|
25408
25578
|
}]
|
|
25409
25579
|
},
|
|
25410
25580
|
...collapsed ? {
|
|
@@ -25416,18 +25586,18 @@ function SideNavLayoutContent(props) {
|
|
|
25416
25586
|
}
|
|
25417
25587
|
}
|
|
25418
25588
|
}), ...tid.sideNav, children: [
|
|
25419
|
-
showCollapseToggle && /* @__PURE__ */ (0,
|
|
25420
|
-
/* @__PURE__ */ (0,
|
|
25589
|
+
showCollapseToggle && /* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
25590
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNav, { ...sideNav }) })
|
|
25421
25591
|
] });
|
|
25422
|
-
return /* @__PURE__ */ (0,
|
|
25592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)("div", { ...(0, import_runtime119.mergeProps)(void 0, {
|
|
25423
25593
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
25424
25594
|
}, {
|
|
25425
25595
|
display: "df",
|
|
25426
25596
|
flexDirection: "fdr",
|
|
25427
25597
|
width: "w100"
|
|
25428
25598
|
}), ...tid, children: [
|
|
25429
|
-
contrastRail ? /* @__PURE__ */ (0,
|
|
25430
|
-
/* @__PURE__ */ (0,
|
|
25599
|
+
contrastRail ? /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(ContrastScope, { children: rail }) : rail,
|
|
25600
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { ...(0, import_runtime119.trussProps)({
|
|
25431
25601
|
display: "df",
|
|
25432
25602
|
flexDirection: "fdc",
|
|
25433
25603
|
flexGrow: "fg1",
|
|
@@ -25443,8 +25613,8 @@ function SideNavLayoutContent(props) {
|
|
|
25443
25613
|
}
|
|
25444
25614
|
|
|
25445
25615
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
25446
|
-
var
|
|
25447
|
-
var
|
|
25616
|
+
var import_runtime120 = require("@homebound/truss/runtime");
|
|
25617
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
25448
25618
|
var __maybeInc22 = (inc) => {
|
|
25449
25619
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25450
25620
|
};
|
|
@@ -25460,38 +25630,38 @@ function EnvironmentBannerLayout(props) {
|
|
|
25460
25630
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
25461
25631
|
};
|
|
25462
25632
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
25463
|
-
return /* @__PURE__ */ (0,
|
|
25633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("div", { ...(0, import_runtime120.mergeProps)(void 0, style, {
|
|
25464
25634
|
display: "df",
|
|
25465
25635
|
flexDirection: "fdc",
|
|
25466
25636
|
width: "wfc",
|
|
25467
25637
|
minWidth: "mw100"
|
|
25468
25638
|
}), ...tid, children: [
|
|
25469
|
-
showBanner && environmentBanner && /* @__PURE__ */ (0,
|
|
25639
|
+
showBanner && environmentBanner && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime120.mergeProps)(void 0, {
|
|
25470
25640
|
height: environmentBannerSizePx
|
|
25471
25641
|
}, {
|
|
25472
25642
|
flexShrink: "fs0",
|
|
25473
25643
|
width: "w100"
|
|
25474
|
-
}), children: /* @__PURE__ */ (0,
|
|
25644
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime120.trussProps)({
|
|
25475
25645
|
position: "fixed",
|
|
25476
25646
|
top: "top0",
|
|
25477
25647
|
left: "left0",
|
|
25478
25648
|
zIndex: ["z_var", {
|
|
25479
|
-
"--zIndex": (0,
|
|
25649
|
+
"--zIndex": (0, import_runtime120.maybeCssVar)(zIndices.environmentBanner)
|
|
25480
25650
|
}],
|
|
25481
25651
|
width: ["w_var", {
|
|
25482
|
-
"--width": (0,
|
|
25652
|
+
"--width": (0, import_runtime120.maybeCssVar)(__maybeInc22(innerWidth))
|
|
25483
25653
|
}]
|
|
25484
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0,
|
|
25654
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
25485
25655
|
children
|
|
25486
25656
|
] }) }) });
|
|
25487
25657
|
}
|
|
25488
25658
|
|
|
25489
25659
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25490
|
-
var
|
|
25491
|
-
var
|
|
25660
|
+
var import_react151 = require("react");
|
|
25661
|
+
var import_runtime121 = require("@homebound/truss/runtime");
|
|
25492
25662
|
|
|
25493
25663
|
// src/layouts/useAutoHideOnScroll.ts
|
|
25494
|
-
var
|
|
25664
|
+
var import_react148 = require("react");
|
|
25495
25665
|
var THRESHOLD = 80;
|
|
25496
25666
|
function getInitialAutoHideState() {
|
|
25497
25667
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -25501,15 +25671,15 @@ function getInitialAutoHideState() {
|
|
|
25501
25671
|
}
|
|
25502
25672
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
25503
25673
|
const initial = getInitialAutoHideState();
|
|
25504
|
-
const [state, setState] = (0,
|
|
25505
|
-
const stateRef = (0,
|
|
25506
|
-
const [atTop, setAtTop] = (0,
|
|
25507
|
-
const atTopRef = (0,
|
|
25508
|
-
const getTopOffsetRef = (0,
|
|
25674
|
+
const [state, setState] = (0, import_react148.useState)(initial.state);
|
|
25675
|
+
const stateRef = (0, import_react148.useRef)(initial.state);
|
|
25676
|
+
const [atTop, setAtTop] = (0, import_react148.useState)(initial.atTop);
|
|
25677
|
+
const atTopRef = (0, import_react148.useRef)(initial.atTop);
|
|
25678
|
+
const getTopOffsetRef = (0, import_react148.useRef)(getTopOffset);
|
|
25509
25679
|
getTopOffsetRef.current = getTopOffset;
|
|
25510
|
-
const lastScrollY = (0,
|
|
25511
|
-
const lastScrollHeight = (0,
|
|
25512
|
-
(0,
|
|
25680
|
+
const lastScrollY = (0, import_react148.useRef)(Number.POSITIVE_INFINITY);
|
|
25681
|
+
const lastScrollHeight = (0, import_react148.useRef)(0);
|
|
25682
|
+
(0, import_react148.useLayoutEffect)(() => {
|
|
25513
25683
|
if (!enabled) {
|
|
25514
25684
|
stateRef.current = "static";
|
|
25515
25685
|
atTopRef.current = true;
|
|
@@ -25581,35 +25751,35 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
25581
25751
|
}
|
|
25582
25752
|
|
|
25583
25753
|
// src/layouts/useMeasuredHeight.ts
|
|
25584
|
-
var
|
|
25585
|
-
var
|
|
25754
|
+
var import_utils171 = require("@react-aria/utils");
|
|
25755
|
+
var import_react149 = require("react");
|
|
25586
25756
|
function useMeasuredHeight(ref, enabled) {
|
|
25587
|
-
const [height, setHeight] = (0,
|
|
25588
|
-
const syncElementHeight = (0,
|
|
25757
|
+
const [height, setHeight] = (0, import_react149.useState)(0);
|
|
25758
|
+
const syncElementHeight = (0, import_react149.useCallback)(() => {
|
|
25589
25759
|
const el = ref.current;
|
|
25590
25760
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
25591
25761
|
setHeight((prev) => prev === next ? prev : next);
|
|
25592
25762
|
}, [ref]);
|
|
25593
|
-
(0,
|
|
25594
|
-
(0,
|
|
25763
|
+
(0, import_utils171.useResizeObserver)({ ref, onResize: syncElementHeight });
|
|
25764
|
+
(0, import_react149.useLayoutEffect)(() => {
|
|
25595
25765
|
syncElementHeight();
|
|
25596
25766
|
}, [enabled, syncElementHeight]);
|
|
25597
25767
|
return height;
|
|
25598
25768
|
}
|
|
25599
25769
|
|
|
25600
25770
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
25601
|
-
var
|
|
25602
|
-
var
|
|
25603
|
-
var NavbarLayoutHeightContext = (0,
|
|
25771
|
+
var import_react150 = require("react");
|
|
25772
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
25773
|
+
var NavbarLayoutHeightContext = (0, import_react150.createContext)(0);
|
|
25604
25774
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
25605
|
-
return /* @__PURE__ */ (0,
|
|
25775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(NavbarLayoutHeightContext.Provider, { value, children });
|
|
25606
25776
|
}
|
|
25607
25777
|
function useNavbarLayoutHeight() {
|
|
25608
|
-
return (0,
|
|
25778
|
+
return (0, import_react150.useContext)(NavbarLayoutHeightContext);
|
|
25609
25779
|
}
|
|
25610
25780
|
|
|
25611
25781
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25612
|
-
var
|
|
25782
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
25613
25783
|
var __maybeInc23 = (inc) => {
|
|
25614
25784
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25615
25785
|
};
|
|
@@ -25619,8 +25789,8 @@ function NavbarLayout(props) {
|
|
|
25619
25789
|
children
|
|
25620
25790
|
} = props;
|
|
25621
25791
|
const tid = useTestIds(props, "navbarLayout");
|
|
25622
|
-
const navMetricsRef = (0,
|
|
25623
|
-
const spacerRef = (0,
|
|
25792
|
+
const navMetricsRef = (0, import_react151.useRef)(null);
|
|
25793
|
+
const spacerRef = (0, import_react151.useRef)(null);
|
|
25624
25794
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
25625
25795
|
const {
|
|
25626
25796
|
state: autoHideState,
|
|
@@ -25638,10 +25808,10 @@ function NavbarLayout(props) {
|
|
|
25638
25808
|
position: "sticky",
|
|
25639
25809
|
left: "left0",
|
|
25640
25810
|
zIndex: ["z_var", {
|
|
25641
|
-
"--zIndex": (0,
|
|
25811
|
+
"--zIndex": (0, import_runtime121.maybeCssVar)(zIndices.navbar)
|
|
25642
25812
|
}],
|
|
25643
25813
|
width: ["w_var", {
|
|
25644
|
-
"--width": (0,
|
|
25814
|
+
"--width": (0, import_runtime121.maybeCssVar)(__maybeInc23(innerWidth))
|
|
25645
25815
|
}]
|
|
25646
25816
|
}
|
|
25647
25817
|
) : (
|
|
@@ -25650,10 +25820,10 @@ function NavbarLayout(props) {
|
|
|
25650
25820
|
position: "fixed",
|
|
25651
25821
|
left: "left0",
|
|
25652
25822
|
zIndex: ["z_var", {
|
|
25653
|
-
"--zIndex": (0,
|
|
25823
|
+
"--zIndex": (0, import_runtime121.maybeCssVar)(zIndices.navbar)
|
|
25654
25824
|
}],
|
|
25655
25825
|
width: ["w_var", {
|
|
25656
|
-
"--width": (0,
|
|
25826
|
+
"--width": (0, import_runtime121.maybeCssVar)(__maybeInc23(innerWidth))
|
|
25657
25827
|
}],
|
|
25658
25828
|
transition: "transitionTop"
|
|
25659
25829
|
}
|
|
@@ -25662,25 +25832,25 @@ function NavbarLayout(props) {
|
|
|
25662
25832
|
const innerStyle = autoHideState !== "static" ? {
|
|
25663
25833
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
25664
25834
|
} : void 0;
|
|
25665
|
-
const navbarEl = (0,
|
|
25666
|
-
return /* @__PURE__ */ (0,
|
|
25835
|
+
const navbarEl = (0, import_react151.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(Navbar, { ...navbar }), [navbar]);
|
|
25836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)("div", { ...(0, import_runtime121.mergeProps)(void 0, cssVars, {
|
|
25667
25837
|
display: "df",
|
|
25668
25838
|
flexDirection: "fdc",
|
|
25669
25839
|
width: "wfc",
|
|
25670
25840
|
minWidth: "mw100"
|
|
25671
25841
|
}), ...tid, children: [
|
|
25672
|
-
/* @__PURE__ */ (0,
|
|
25842
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { ref: spacerRef, ...(0, import_runtime121.mergeProps)(void 0, {
|
|
25673
25843
|
height: navHeight
|
|
25674
25844
|
}, {
|
|
25675
25845
|
flexShrink: "fs0",
|
|
25676
25846
|
width: "w100"
|
|
25677
|
-
}), children: /* @__PURE__ */ (0,
|
|
25678
|
-
/* @__PURE__ */ (0,
|
|
25847
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime121.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
25848
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
25679
25849
|
] }) }) });
|
|
25680
25850
|
}
|
|
25681
25851
|
|
|
25682
25852
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25683
|
-
var
|
|
25853
|
+
var import_react152 = require("react");
|
|
25684
25854
|
|
|
25685
25855
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
25686
25856
|
function useBannerAndNavbarHeight() {
|
|
@@ -25688,8 +25858,8 @@ function useBannerAndNavbarHeight() {
|
|
|
25688
25858
|
}
|
|
25689
25859
|
|
|
25690
25860
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25691
|
-
var
|
|
25692
|
-
var
|
|
25861
|
+
var import_runtime122 = require("@homebound/truss/runtime");
|
|
25862
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
25693
25863
|
var __maybeInc24 = (inc) => {
|
|
25694
25864
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25695
25865
|
};
|
|
@@ -25700,11 +25870,11 @@ function PageHeaderLayout(props) {
|
|
|
25700
25870
|
} = props;
|
|
25701
25871
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
25702
25872
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
25703
|
-
const bannerAndNavbarHeightRef = (0,
|
|
25873
|
+
const bannerAndNavbarHeightRef = (0, import_react152.useRef)(bannerAndNavbarHeight);
|
|
25704
25874
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
25705
|
-
const getBannerAndNavbarHeight = (0,
|
|
25706
|
-
const headerMetricsRef = (0,
|
|
25707
|
-
const spacerRef = (0,
|
|
25875
|
+
const getBannerAndNavbarHeight = (0, import_react152.useCallback)(() => bannerAndNavbarHeightRef.current, []);
|
|
25876
|
+
const headerMetricsRef = (0, import_react152.useRef)(null);
|
|
25877
|
+
const spacerRef = (0, import_react152.useRef)(null);
|
|
25708
25878
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
25709
25879
|
const {
|
|
25710
25880
|
state: autoHideState,
|
|
@@ -25720,43 +25890,43 @@ function PageHeaderLayout(props) {
|
|
|
25720
25890
|
const innerCss = autoHideState === "static" ? {
|
|
25721
25891
|
position: "sticky",
|
|
25722
25892
|
left: ["left_var", {
|
|
25723
|
-
"--left": (0,
|
|
25893
|
+
"--left": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerLeft))
|
|
25724
25894
|
}],
|
|
25725
25895
|
width: ["w_var", {
|
|
25726
|
-
"--width": (0,
|
|
25896
|
+
"--width": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerWidth))
|
|
25727
25897
|
}],
|
|
25728
25898
|
zIndex: ["z_var", {
|
|
25729
|
-
"--zIndex": (0,
|
|
25899
|
+
"--zIndex": (0, import_runtime122.maybeCssVar)(zIndices.pageStickyHeader)
|
|
25730
25900
|
}]
|
|
25731
25901
|
} : {
|
|
25732
25902
|
position: "fixed",
|
|
25733
25903
|
left: ["left_var", {
|
|
25734
|
-
"--left": (0,
|
|
25904
|
+
"--left": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerLeft))
|
|
25735
25905
|
}],
|
|
25736
25906
|
width: ["w_var", {
|
|
25737
|
-
"--width": (0,
|
|
25907
|
+
"--width": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerWidth))
|
|
25738
25908
|
}],
|
|
25739
25909
|
zIndex: ["z_var", {
|
|
25740
|
-
"--zIndex": (0,
|
|
25910
|
+
"--zIndex": (0, import_runtime122.maybeCssVar)(zIndices.pageStickyHeader)
|
|
25741
25911
|
}],
|
|
25742
25912
|
transition: "transitionTop"
|
|
25743
25913
|
};
|
|
25744
25914
|
const innerStyle = autoHideState !== "static" ? {
|
|
25745
25915
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
25746
25916
|
} : void 0;
|
|
25747
|
-
const pageHeaderEl = (0,
|
|
25748
|
-
return /* @__PURE__ */ (0,
|
|
25917
|
+
const pageHeaderEl = (0, import_react152.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
25918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)("div", { ...(0, import_runtime122.mergeProps)(void 0, cssVars, {
|
|
25749
25919
|
display: "df",
|
|
25750
25920
|
flexDirection: "fdc",
|
|
25751
25921
|
width: "w100"
|
|
25752
25922
|
}), ...tid, children: [
|
|
25753
|
-
/* @__PURE__ */ (0,
|
|
25923
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { ref: spacerRef, ...(0, import_runtime122.mergeProps)(void 0, {
|
|
25754
25924
|
height: headerHeight
|
|
25755
25925
|
}, {
|
|
25756
25926
|
flexShrink: "fs0",
|
|
25757
25927
|
width: "w100"
|
|
25758
|
-
}), children: /* @__PURE__ */ (0,
|
|
25759
|
-
/* @__PURE__ */ (0,
|
|
25928
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime122.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
25929
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
25760
25930
|
] }) });
|
|
25761
25931
|
}
|
|
25762
25932
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -25901,6 +26071,8 @@ function PageHeaderLayout(props) {
|
|
|
25901
26071
|
SortHeader,
|
|
25902
26072
|
StaticField,
|
|
25903
26073
|
Stepper,
|
|
26074
|
+
StepperTab,
|
|
26075
|
+
StepperTabs,
|
|
25904
26076
|
SubmitButton,
|
|
25905
26077
|
SuperDrawerContent,
|
|
25906
26078
|
SuperDrawerHeader,
|