@homebound/beam 3.50.0 → 3.52.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 +326 -138
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +305 -120
- package/dist/index.js.map +1 -1
- package/dist/truss.css +10 -4
- 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,
|
|
@@ -310,6 +312,7 @@ __export(index_exports, {
|
|
|
310
312
|
px: () => px,
|
|
311
313
|
recursivelyGetContainingRow: () => recursivelyGetContainingRow,
|
|
312
314
|
reservedRowKinds: () => reservedRowKinds,
|
|
315
|
+
resolveGridTableLayoutStyle: () => resolveGridTableLayoutStyle,
|
|
313
316
|
resolveTableContentWidth: () => resolveTableContentWidth,
|
|
314
317
|
resolveTooltip: () => resolveTooltip,
|
|
315
318
|
rowClickRenderFn: () => rowClickRenderFn,
|
|
@@ -9064,23 +9067,26 @@ var cardStyle = {
|
|
|
9064
9067
|
rowIndent: level > 0 ? 24 * level : void 0
|
|
9065
9068
|
})
|
|
9066
9069
|
};
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9070
|
+
var gridStyleDefKeysRecord = {
|
|
9071
|
+
inlineEditing: true,
|
|
9072
|
+
grouped: true,
|
|
9073
|
+
rowHeight: true,
|
|
9074
|
+
cellHighlight: true,
|
|
9075
|
+
allWhite: true,
|
|
9076
|
+
bordered: true,
|
|
9077
|
+
rowHover: true,
|
|
9078
|
+
vAlign: true,
|
|
9079
|
+
cellTypography: true,
|
|
9080
|
+
highlightOnHover: true,
|
|
9081
|
+
roundedHeader: true
|
|
9082
|
+
};
|
|
9083
|
+
function isGridStyleDef(style) {
|
|
9081
9084
|
const keys = safeKeys(style);
|
|
9082
|
-
const defKeys = safeKeys(
|
|
9083
|
-
|
|
9085
|
+
const defKeys = safeKeys(gridStyleDefKeysRecord);
|
|
9086
|
+
return keys.length === 0 || keys.some((k) => defKeys.includes(k));
|
|
9087
|
+
}
|
|
9088
|
+
function resolveStyles(style) {
|
|
9089
|
+
if (isGridStyleDef(style)) {
|
|
9084
9090
|
return getTableStyles(style);
|
|
9085
9091
|
}
|
|
9086
9092
|
return style;
|
|
@@ -17039,7 +17045,7 @@ function GridTableEmptyState(props) {
|
|
|
17039
17045
|
actions
|
|
17040
17046
|
} = props;
|
|
17041
17047
|
const tid = useTestIds(props, "gridTableEmptyState");
|
|
17042
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "df fdc aic
|
|
17048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "df fdc aic pt_12 pb_12 gap2", ...tid, children: [
|
|
17043
17049
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "fw6 fz_20px lh_28px", ...tid.title, children: title }),
|
|
17044
17050
|
description && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "fw4 fz_14px lh_20px gray700", ...tid.description, children: description }),
|
|
17045
17051
|
actions && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { ...tid.actions, children: actions })
|
|
@@ -21584,17 +21590,12 @@ function GridTableLayoutComponent(props) {
|
|
|
21584
21590
|
const emptyState = (0, import_react113.useMemo)(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
|
|
21585
21591
|
const tableActionsEl = /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef });
|
|
21586
21592
|
const cardAs = withCardView && view === "card" ? "card" : void 0;
|
|
21593
|
+
const tableStyle = resolveGridTableLayoutStyle(tableProps.style, inDocumentScrollLayout);
|
|
21587
21594
|
const tableBody = /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_jsx_runtime159.Fragment, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(GridTable, { ...tableProps, ...cardAs ? {
|
|
21588
21595
|
as: cardAs
|
|
21589
|
-
} : {}, api, emptyState, filter: clientSearch, style: {
|
|
21590
|
-
allWhite: true,
|
|
21591
|
-
roundedHeader: !inDocumentScrollLayout
|
|
21592
|
-
}, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(QueryTable, { ...tableProps, ...cardAs ? {
|
|
21596
|
+
} : {}, api, emptyState, filter: clientSearch, style: tableStyle, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(QueryTable, { ...tableProps, ...cardAs ? {
|
|
21593
21597
|
as: cardAs
|
|
21594
|
-
} : {}, api, emptyState, filter: clientSearch, style:
|
|
21595
|
-
allWhite: true,
|
|
21596
|
-
roundedHeader: !inDocumentScrollLayout
|
|
21597
|
-
}, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
|
|
21598
|
+
} : {}, api, emptyState, filter: clientSearch, style: tableStyle, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
|
|
21598
21599
|
const tableScrollContent = /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_jsx_runtime159.Fragment, { children: [
|
|
21599
21600
|
showTableActions && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { ref: tableActionsRef, ...(0, import_runtime88.trussProps)({
|
|
21600
21601
|
...inDocumentScrollLayout ? {
|
|
@@ -21747,6 +21748,22 @@ function Header2(props) {
|
|
|
21747
21748
|
] })
|
|
21748
21749
|
] }) });
|
|
21749
21750
|
}
|
|
21751
|
+
function resolveGridTableLayoutStyle(userStyle, inDocumentScrollLayout) {
|
|
21752
|
+
const layoutDefaults = {
|
|
21753
|
+
allWhite: true,
|
|
21754
|
+
roundedHeader: !inDocumentScrollLayout
|
|
21755
|
+
};
|
|
21756
|
+
if (userStyle === void 0) {
|
|
21757
|
+
return layoutDefaults;
|
|
21758
|
+
}
|
|
21759
|
+
if (isGridStyleDef(userStyle)) {
|
|
21760
|
+
return {
|
|
21761
|
+
...layoutDefaults,
|
|
21762
|
+
...userStyle
|
|
21763
|
+
};
|
|
21764
|
+
}
|
|
21765
|
+
return userStyle;
|
|
21766
|
+
}
|
|
21750
21767
|
|
|
21751
21768
|
// src/components/Layout/PreventBrowserScroll.tsx
|
|
21752
21769
|
var import_jsx_runtime160 = require("react/jsx-runtime");
|
|
@@ -24993,10 +25010,178 @@ function StepIcon({
|
|
|
24993
25010
|
}) }) });
|
|
24994
25011
|
}
|
|
24995
25012
|
|
|
24996
|
-
// src/components/
|
|
24997
|
-
var
|
|
25013
|
+
// src/components/StepperTabs/StepperTab.tsx
|
|
25014
|
+
var import_react144 = require("react");
|
|
25015
|
+
var import_react_aria64 = require("react-aria");
|
|
24998
25016
|
var import_runtime115 = require("@homebound/truss/runtime");
|
|
24999
25017
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
25018
|
+
function StepperTab(props) {
|
|
25019
|
+
const {
|
|
25020
|
+
label,
|
|
25021
|
+
value,
|
|
25022
|
+
active,
|
|
25023
|
+
completed,
|
|
25024
|
+
onClick,
|
|
25025
|
+
disabled = false,
|
|
25026
|
+
collapsed = false
|
|
25027
|
+
} = props;
|
|
25028
|
+
const ariaProps = {
|
|
25029
|
+
onPress: () => onClick(value),
|
|
25030
|
+
isDisabled: disabled || collapsed
|
|
25031
|
+
};
|
|
25032
|
+
const ref = (0, import_react144.useRef)(null);
|
|
25033
|
+
const {
|
|
25034
|
+
buttonProps
|
|
25035
|
+
} = (0, import_react_aria64.useButton)(ariaProps, ref);
|
|
25036
|
+
const {
|
|
25037
|
+
isFocusVisible,
|
|
25038
|
+
focusProps
|
|
25039
|
+
} = (0, import_react_aria64.useFocusRing)();
|
|
25040
|
+
const {
|
|
25041
|
+
hoverProps,
|
|
25042
|
+
isHovered
|
|
25043
|
+
} = (0, import_react_aria64.useHover)(ariaProps);
|
|
25044
|
+
const tid = useTestIds(props, "stepperTab");
|
|
25045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("button", { ref, ...(0, import_react_aria64.mergeProps)(buttonProps, focusProps, hoverProps), "aria-label": label, ...(0, import_runtime115.trussProps)({
|
|
25046
|
+
...stepperTabStyles.baseStyles,
|
|
25047
|
+
...getStateStyles(active, completed),
|
|
25048
|
+
...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
|
|
25049
|
+
...collapsed ? getCollapsedStyles(active, completed) : {},
|
|
25050
|
+
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
25051
|
+
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
25052
|
+
}), ...tid[defaultTestId(value)], children: [
|
|
25053
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1", children: label }),
|
|
25054
|
+
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 }) }),
|
|
25055
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_react_aria64.VisuallyHidden, { children: completed ? "Complete" : "Not Complete" })
|
|
25056
|
+
] });
|
|
25057
|
+
}
|
|
25058
|
+
function withBorderBottom(color) {
|
|
25059
|
+
return {
|
|
25060
|
+
...{
|
|
25061
|
+
borderBottomStyle: "bbs_solid",
|
|
25062
|
+
borderBottomWidth: ["borderBottomWidth_var", {
|
|
25063
|
+
"--borderBottomWidth": (0, import_runtime115.maybeCssVar)(`3px`)
|
|
25064
|
+
}]
|
|
25065
|
+
},
|
|
25066
|
+
...color
|
|
25067
|
+
};
|
|
25068
|
+
}
|
|
25069
|
+
function getStateStyles(active, completed) {
|
|
25070
|
+
return {
|
|
25071
|
+
...{
|
|
25072
|
+
color: "gray400",
|
|
25073
|
+
...active || completed ? {
|
|
25074
|
+
color: "blue700"
|
|
25075
|
+
} : {},
|
|
25076
|
+
...active ? {
|
|
25077
|
+
fontWeight: "fw6",
|
|
25078
|
+
fontSize: "fz_14px",
|
|
25079
|
+
lineHeight: "lh_20px"
|
|
25080
|
+
} : {}
|
|
25081
|
+
},
|
|
25082
|
+
...withBorderBottom(active || completed ? {
|
|
25083
|
+
borderColor: "bcBlue600"
|
|
25084
|
+
} : {
|
|
25085
|
+
borderColor: "bcGray300"
|
|
25086
|
+
})
|
|
25087
|
+
};
|
|
25088
|
+
}
|
|
25089
|
+
function getCollapsedStyles(active, completed) {
|
|
25090
|
+
return {
|
|
25091
|
+
...{
|
|
25092
|
+
cursor: "cursor_default",
|
|
25093
|
+
height: "h_0px",
|
|
25094
|
+
paddingTop: "pt0",
|
|
25095
|
+
paddingBottom: "pb0"
|
|
25096
|
+
},
|
|
25097
|
+
...completed && !active ? {
|
|
25098
|
+
borderColor: "bcBlue600"
|
|
25099
|
+
} : {
|
|
25100
|
+
borderColor: "bcGray300"
|
|
25101
|
+
}
|
|
25102
|
+
};
|
|
25103
|
+
}
|
|
25104
|
+
var stepperTabStyles = {
|
|
25105
|
+
baseStyles: {
|
|
25106
|
+
display: "df",
|
|
25107
|
+
alignItems: "aic",
|
|
25108
|
+
flexGrow: "fg1",
|
|
25109
|
+
paddingTop: "pt1",
|
|
25110
|
+
paddingBottom: "pb1",
|
|
25111
|
+
paddingRight: "pr_12px",
|
|
25112
|
+
paddingLeft: "pl_24px",
|
|
25113
|
+
fontWeight: "fw4",
|
|
25114
|
+
fontSize: "fz_14px",
|
|
25115
|
+
lineHeight: "lh_20px",
|
|
25116
|
+
overflow: "oh",
|
|
25117
|
+
textAlign: "tal"
|
|
25118
|
+
},
|
|
25119
|
+
hoverStyles: {
|
|
25120
|
+
backgroundColor: "bgGray100"
|
|
25121
|
+
},
|
|
25122
|
+
focusRingStyles: {
|
|
25123
|
+
boxShadow: "bshFocus",
|
|
25124
|
+
outline: "outline0"
|
|
25125
|
+
},
|
|
25126
|
+
// Disabled always wins over both the state's and the collapsed border color.
|
|
25127
|
+
disabledStyles: {
|
|
25128
|
+
color: "gray400",
|
|
25129
|
+
cursor: "cursorNotAllowed",
|
|
25130
|
+
borderColor: "bcGray300"
|
|
25131
|
+
}
|
|
25132
|
+
};
|
|
25133
|
+
|
|
25134
|
+
// src/components/StepperTabs/StepperTabs.tsx
|
|
25135
|
+
var import_runtime116 = require("@homebound/truss/runtime");
|
|
25136
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
25137
|
+
var import_react145 = require("react");
|
|
25138
|
+
function StepperTabs(props) {
|
|
25139
|
+
const {
|
|
25140
|
+
steps,
|
|
25141
|
+
currentStep,
|
|
25142
|
+
onChange
|
|
25143
|
+
} = props;
|
|
25144
|
+
const tid = useTestIds(props, "stepperTabs");
|
|
25145
|
+
const {
|
|
25146
|
+
sm: collapsed
|
|
25147
|
+
} = useBreakpoint();
|
|
25148
|
+
const capWidth = steps.length <= 3;
|
|
25149
|
+
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)({
|
|
25150
|
+
padding: "p_0",
|
|
25151
|
+
margin: "m_0",
|
|
25152
|
+
listStyle: "lis_none",
|
|
25153
|
+
display: "df",
|
|
25154
|
+
gap: ["gap_var", {
|
|
25155
|
+
"--gap": `${gapPx}px`
|
|
25156
|
+
}],
|
|
25157
|
+
width: "w100",
|
|
25158
|
+
borderBottomStyle: "bbs_solid",
|
|
25159
|
+
borderBottomWidth: "bbw_1px",
|
|
25160
|
+
borderColor: "bcGray400"
|
|
25161
|
+
}), children: steps.map((step) => {
|
|
25162
|
+
const isCurrent = step.value === currentStep;
|
|
25163
|
+
return /* @__PURE__ */ (0, import_react145.createElement)("li", { ...(0, import_runtime116.trussProps)({
|
|
25164
|
+
display: "df",
|
|
25165
|
+
flexGrow: "fg1",
|
|
25166
|
+
flexBasis: "fb_0",
|
|
25167
|
+
...collapsed ? {
|
|
25168
|
+
minWidth: "mw0"
|
|
25169
|
+
} : {},
|
|
25170
|
+
...capWidth ? {
|
|
25171
|
+
maxWidth: ["maxw_var", {
|
|
25172
|
+
"--maxWidth": `${maxStepWidthPx}px`
|
|
25173
|
+
}]
|
|
25174
|
+
} : {}
|
|
25175
|
+
}), 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 }));
|
|
25176
|
+
}) }) });
|
|
25177
|
+
}
|
|
25178
|
+
var maxStepWidthPx = 280;
|
|
25179
|
+
var gapPx = 6;
|
|
25180
|
+
|
|
25181
|
+
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
25182
|
+
var import_react_dom7 = require("react-dom");
|
|
25183
|
+
var import_runtime117 = require("@homebound/truss/runtime");
|
|
25184
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
25000
25185
|
function SuperDrawerHeader(props) {
|
|
25001
25186
|
const {
|
|
25002
25187
|
hideControls
|
|
@@ -25013,20 +25198,20 @@ function SuperDrawerHeader(props) {
|
|
|
25013
25198
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
25014
25199
|
const isDetail = currentContent !== firstContent;
|
|
25015
25200
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
25016
|
-
return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0,
|
|
25017
|
-
isStructuredProps(props) ? /* @__PURE__ */ (0,
|
|
25018
|
-
/* @__PURE__ */ (0,
|
|
25019
|
-
/* @__PURE__ */ (0,
|
|
25201
|
+
return (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
25202
|
+
isStructuredProps(props) ? /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
25203
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "fg1 df aic gap2", children: [
|
|
25204
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
25020
25205
|
props.left
|
|
25021
25206
|
] }),
|
|
25022
|
-
props.right && /* @__PURE__ */ (0,
|
|
25023
|
-
] }) : /* @__PURE__ */ (0,
|
|
25024
|
-
!hideControls && /* @__PURE__ */ (0,
|
|
25207
|
+
props.right && /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "fs0", children: props.right })
|
|
25208
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "fg1", children: props.children }),
|
|
25209
|
+
!hideControls && /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { ...(0, import_runtime117.trussProps)({
|
|
25025
25210
|
flexShrink: "fs0",
|
|
25026
25211
|
...isDetail ? {
|
|
25027
25212
|
visibility: "vh"
|
|
25028
25213
|
} : {}
|
|
25029
|
-
}), children: /* @__PURE__ */ (0,
|
|
25214
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ButtonGroup, { buttons: [{
|
|
25030
25215
|
icon: "chevronLeft",
|
|
25031
25216
|
onClick: () => onPrevClick && onPrevClick(),
|
|
25032
25217
|
disabled: !onPrevClick
|
|
@@ -25042,18 +25227,18 @@ function isStructuredProps(props) {
|
|
|
25042
25227
|
}
|
|
25043
25228
|
|
|
25044
25229
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
25045
|
-
var
|
|
25230
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
25046
25231
|
function ConfirmCloseModal(props) {
|
|
25047
25232
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
25048
25233
|
const { modalState } = useBeamContext();
|
|
25049
25234
|
function closeModal() {
|
|
25050
25235
|
modalState.current = void 0;
|
|
25051
25236
|
}
|
|
25052
|
-
return /* @__PURE__ */ (0,
|
|
25053
|
-
/* @__PURE__ */ (0,
|
|
25054
|
-
/* @__PURE__ */ (0,
|
|
25055
|
-
/* @__PURE__ */ (0,
|
|
25056
|
-
/* @__PURE__ */ (0,
|
|
25237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
25238
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
25239
|
+
/* @__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." }) }),
|
|
25240
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(ModalFooter, { children: [
|
|
25241
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
25057
25242
|
Button,
|
|
25058
25243
|
{
|
|
25059
25244
|
variant: "quaternary",
|
|
@@ -25064,7 +25249,7 @@ function ConfirmCloseModal(props) {
|
|
|
25064
25249
|
}
|
|
25065
25250
|
}
|
|
25066
25251
|
),
|
|
25067
|
-
/* @__PURE__ */ (0,
|
|
25252
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Button, { label: continueText, onClick: closeModal })
|
|
25068
25253
|
] })
|
|
25069
25254
|
] });
|
|
25070
25255
|
}
|
|
@@ -25073,8 +25258,8 @@ function ConfirmCloseModal(props) {
|
|
|
25073
25258
|
var import_framer_motion6 = require("framer-motion");
|
|
25074
25259
|
|
|
25075
25260
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
25076
|
-
var
|
|
25077
|
-
var
|
|
25261
|
+
var import_react146 = require("react");
|
|
25262
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
25078
25263
|
function useSuperDrawer() {
|
|
25079
25264
|
const {
|
|
25080
25265
|
drawerContentStack: contentStack,
|
|
@@ -25086,7 +25271,7 @@ function useSuperDrawer() {
|
|
|
25086
25271
|
function canCloseDrawerDetails(i, doChange) {
|
|
25087
25272
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
25088
25273
|
if (!canClose(canCloseDrawerDetail)) {
|
|
25089
|
-
openModal({ content: /* @__PURE__ */ (0,
|
|
25274
|
+
openModal({ content: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
25090
25275
|
return false;
|
|
25091
25276
|
}
|
|
25092
25277
|
}
|
|
@@ -25106,14 +25291,14 @@ function useSuperDrawer() {
|
|
|
25106
25291
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
25107
25292
|
if (!canClose(canCloseDrawer)) {
|
|
25108
25293
|
openModal({
|
|
25109
|
-
content: /* @__PURE__ */ (0,
|
|
25294
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
25110
25295
|
});
|
|
25111
25296
|
return;
|
|
25112
25297
|
}
|
|
25113
25298
|
}
|
|
25114
25299
|
doChange();
|
|
25115
25300
|
}
|
|
25116
|
-
const closeActions = (0,
|
|
25301
|
+
const closeActions = (0, import_react146.useMemo)(
|
|
25117
25302
|
() => {
|
|
25118
25303
|
return {
|
|
25119
25304
|
/** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
|
|
@@ -25148,7 +25333,7 @@ function useSuperDrawer() {
|
|
|
25148
25333
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25149
25334
|
[canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
|
|
25150
25335
|
);
|
|
25151
|
-
const actions = (0,
|
|
25336
|
+
const actions = (0, import_react146.useMemo)(
|
|
25152
25337
|
() => {
|
|
25153
25338
|
return {
|
|
25154
25339
|
// TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
|
|
@@ -25201,8 +25386,8 @@ function canClose(canCloseCheck) {
|
|
|
25201
25386
|
}
|
|
25202
25387
|
|
|
25203
25388
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
25204
|
-
var
|
|
25205
|
-
var
|
|
25389
|
+
var import_runtime118 = require("@homebound/truss/runtime");
|
|
25390
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
25206
25391
|
var SuperDrawerContent = ({
|
|
25207
25392
|
children,
|
|
25208
25393
|
actions
|
|
@@ -25222,17 +25407,17 @@ var SuperDrawerContent = ({
|
|
|
25222
25407
|
} = firstContent ?? {};
|
|
25223
25408
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
25224
25409
|
if (kind === "open") {
|
|
25225
|
-
return /* @__PURE__ */ (0,
|
|
25410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_framer_motion6.motion.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
25226
25411
|
} else if (kind === "detail") {
|
|
25227
|
-
return /* @__PURE__ */ (0,
|
|
25412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_framer_motion6.motion.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
25228
25413
|
overflow: "auto"
|
|
25229
25414
|
}, transition: {
|
|
25230
25415
|
overflow: {
|
|
25231
25416
|
delay: 0.3
|
|
25232
25417
|
}
|
|
25233
25418
|
}, children: [
|
|
25234
|
-
/* @__PURE__ */ (0,
|
|
25235
|
-
/* @__PURE__ */ (0,
|
|
25419
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
25420
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_framer_motion6.motion.div, { initial: {
|
|
25236
25421
|
x: width2,
|
|
25237
25422
|
opacity: 0
|
|
25238
25423
|
}, animate: {
|
|
@@ -25250,7 +25435,7 @@ var SuperDrawerContent = ({
|
|
|
25250
25435
|
}, className: "pt2", children: children2 })
|
|
25251
25436
|
] }, "content");
|
|
25252
25437
|
} else {
|
|
25253
|
-
return /* @__PURE__ */ (0,
|
|
25438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_framer_motion6.motion.div, { ...(0, import_runtime118.mergeProps)(void 0, {
|
|
25254
25439
|
overflow: "auto"
|
|
25255
25440
|
}, {
|
|
25256
25441
|
paddingTop: "pt3",
|
|
@@ -25261,9 +25446,9 @@ var SuperDrawerContent = ({
|
|
|
25261
25446
|
}) }, "content");
|
|
25262
25447
|
}
|
|
25263
25448
|
}
|
|
25264
|
-
return /* @__PURE__ */ (0,
|
|
25449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_jsx_runtime202.Fragment, { children: [
|
|
25265
25450
|
wrapWithMotionAndMaybeBack(children),
|
|
25266
|
-
actions && /* @__PURE__ */ (0,
|
|
25451
|
+
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
25452
|
] });
|
|
25268
25453
|
};
|
|
25269
25454
|
|
|
@@ -25306,7 +25491,7 @@ function visit(rows, fn) {
|
|
|
25306
25491
|
}
|
|
25307
25492
|
|
|
25308
25493
|
// src/components/TagGroup.tsx
|
|
25309
|
-
var
|
|
25494
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
25310
25495
|
function TagGroup(props) {
|
|
25311
25496
|
const {
|
|
25312
25497
|
tags,
|
|
@@ -25314,30 +25499,30 @@ function TagGroup(props) {
|
|
|
25314
25499
|
...otherProps
|
|
25315
25500
|
} = props;
|
|
25316
25501
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
25317
|
-
return /* @__PURE__ */ (0,
|
|
25318
|
-
tags.map((tag) => /* @__PURE__ */ (0,
|
|
25319
|
-
onEdit && /* @__PURE__ */ (0,
|
|
25502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)("div", { ...tid, className: "df aic fww gap1", children: [
|
|
25503
|
+
tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
25504
|
+
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
25505
|
] });
|
|
25321
25506
|
}
|
|
25322
25507
|
|
|
25323
25508
|
// src/components/Toast/useToast.tsx
|
|
25324
|
-
var
|
|
25509
|
+
var import_react147 = require("react");
|
|
25325
25510
|
function useToast() {
|
|
25326
25511
|
const { setNotice, clear } = useToastContext();
|
|
25327
|
-
const showToast = (0,
|
|
25512
|
+
const showToast = (0, import_react147.useCallback)((props) => setNotice(props), [setNotice]);
|
|
25328
25513
|
return { showToast, clear };
|
|
25329
25514
|
}
|
|
25330
25515
|
|
|
25331
25516
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
25332
|
-
var
|
|
25333
|
-
var
|
|
25517
|
+
var import_runtime119 = require("@homebound/truss/runtime");
|
|
25518
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
25334
25519
|
var __maybeInc21 = (inc) => {
|
|
25335
25520
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25336
25521
|
};
|
|
25337
25522
|
function SideNavLayout(props) {
|
|
25338
25523
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
25339
|
-
if (hasProvider) return /* @__PURE__ */ (0,
|
|
25340
|
-
return /* @__PURE__ */ (0,
|
|
25524
|
+
if (hasProvider) return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutContent, { ...props });
|
|
25525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNavLayoutContent, { ...props }) });
|
|
25341
25526
|
}
|
|
25342
25527
|
function SideNavLayoutContent(props) {
|
|
25343
25528
|
const {
|
|
@@ -25359,7 +25544,7 @@ function SideNavLayoutContent(props) {
|
|
|
25359
25544
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
25360
25545
|
const navTop = bannerAndNavbarChromeTop();
|
|
25361
25546
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
25362
|
-
const rail = showRail && /* @__PURE__ */ (0,
|
|
25547
|
+
const rail = showRail && /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)("div", { ...(0, import_runtime119.trussProps)({
|
|
25363
25548
|
...{
|
|
25364
25549
|
display: "df",
|
|
25365
25550
|
flexDirection: "fdc",
|
|
@@ -25383,14 +25568,14 @@ function SideNavLayoutContent(props) {
|
|
|
25383
25568
|
position: "sticky",
|
|
25384
25569
|
left: "left0",
|
|
25385
25570
|
zIndex: ["z_var", {
|
|
25386
|
-
"--zIndex": (0,
|
|
25571
|
+
"--zIndex": (0, import_runtime119.maybeCssVar)(zIndices.sideNav)
|
|
25387
25572
|
}],
|
|
25388
25573
|
top: ["top_var", {
|
|
25389
|
-
"--top": (0,
|
|
25574
|
+
"--top": (0, import_runtime119.maybeCssVar)(__maybeInc21(navTop))
|
|
25390
25575
|
}],
|
|
25391
25576
|
alignSelf: "asfs",
|
|
25392
25577
|
height: ["h_var", {
|
|
25393
|
-
"--height": (0,
|
|
25578
|
+
"--height": (0, import_runtime119.maybeCssVar)(__maybeInc21(railViewportHeight))
|
|
25394
25579
|
}],
|
|
25395
25580
|
width: ["w_var", {
|
|
25396
25581
|
"--width": `${collapsed ? railCollapsedWidthPx : railWidthPx}px`
|
|
@@ -25400,11 +25585,11 @@ function SideNavLayoutContent(props) {
|
|
|
25400
25585
|
position: "fixed",
|
|
25401
25586
|
left: "left0",
|
|
25402
25587
|
top: ["top_var", {
|
|
25403
|
-
"--top": (0,
|
|
25588
|
+
"--top": (0, import_runtime119.maybeCssVar)(__maybeInc21(navTop))
|
|
25404
25589
|
}],
|
|
25405
25590
|
bottom: "bottom0",
|
|
25406
25591
|
zIndex: ["z_var", {
|
|
25407
|
-
"--zIndex": (0,
|
|
25592
|
+
"--zIndex": (0, import_runtime119.maybeCssVar)(zIndices.sideNav)
|
|
25408
25593
|
}]
|
|
25409
25594
|
},
|
|
25410
25595
|
...collapsed ? {
|
|
@@ -25416,18 +25601,18 @@ function SideNavLayoutContent(props) {
|
|
|
25416
25601
|
}
|
|
25417
25602
|
}
|
|
25418
25603
|
}), ...tid.sideNav, children: [
|
|
25419
|
-
showCollapseToggle && /* @__PURE__ */ (0,
|
|
25420
|
-
/* @__PURE__ */ (0,
|
|
25604
|
+
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 }) }),
|
|
25605
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(SideNav, { ...sideNav }) })
|
|
25421
25606
|
] });
|
|
25422
|
-
return /* @__PURE__ */ (0,
|
|
25607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)("div", { ...(0, import_runtime119.mergeProps)(void 0, {
|
|
25423
25608
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
25424
25609
|
}, {
|
|
25425
25610
|
display: "df",
|
|
25426
25611
|
flexDirection: "fdr",
|
|
25427
25612
|
width: "w100"
|
|
25428
25613
|
}), ...tid, children: [
|
|
25429
|
-
contrastRail ? /* @__PURE__ */ (0,
|
|
25430
|
-
/* @__PURE__ */ (0,
|
|
25614
|
+
contrastRail ? /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(ContrastScope, { children: rail }) : rail,
|
|
25615
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { ...(0, import_runtime119.trussProps)({
|
|
25431
25616
|
display: "df",
|
|
25432
25617
|
flexDirection: "fdc",
|
|
25433
25618
|
flexGrow: "fg1",
|
|
@@ -25443,8 +25628,8 @@ function SideNavLayoutContent(props) {
|
|
|
25443
25628
|
}
|
|
25444
25629
|
|
|
25445
25630
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
25446
|
-
var
|
|
25447
|
-
var
|
|
25631
|
+
var import_runtime120 = require("@homebound/truss/runtime");
|
|
25632
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
25448
25633
|
var __maybeInc22 = (inc) => {
|
|
25449
25634
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25450
25635
|
};
|
|
@@ -25460,38 +25645,38 @@ function EnvironmentBannerLayout(props) {
|
|
|
25460
25645
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
25461
25646
|
};
|
|
25462
25647
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
25463
|
-
return /* @__PURE__ */ (0,
|
|
25648
|
+
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
25649
|
display: "df",
|
|
25465
25650
|
flexDirection: "fdc",
|
|
25466
25651
|
width: "wfc",
|
|
25467
25652
|
minWidth: "mw100"
|
|
25468
25653
|
}), ...tid, children: [
|
|
25469
|
-
showBanner && environmentBanner && /* @__PURE__ */ (0,
|
|
25654
|
+
showBanner && environmentBanner && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime120.mergeProps)(void 0, {
|
|
25470
25655
|
height: environmentBannerSizePx
|
|
25471
25656
|
}, {
|
|
25472
25657
|
flexShrink: "fs0",
|
|
25473
25658
|
width: "w100"
|
|
25474
|
-
}), children: /* @__PURE__ */ (0,
|
|
25659
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...(0, import_runtime120.trussProps)({
|
|
25475
25660
|
position: "fixed",
|
|
25476
25661
|
top: "top0",
|
|
25477
25662
|
left: "left0",
|
|
25478
25663
|
zIndex: ["z_var", {
|
|
25479
|
-
"--zIndex": (0,
|
|
25664
|
+
"--zIndex": (0, import_runtime120.maybeCssVar)(zIndices.environmentBanner)
|
|
25480
25665
|
}],
|
|
25481
25666
|
width: ["w_var", {
|
|
25482
|
-
"--width": (0,
|
|
25667
|
+
"--width": (0, import_runtime120.maybeCssVar)(__maybeInc22(innerWidth))
|
|
25483
25668
|
}]
|
|
25484
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0,
|
|
25669
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
25485
25670
|
children
|
|
25486
25671
|
] }) }) });
|
|
25487
25672
|
}
|
|
25488
25673
|
|
|
25489
25674
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25490
|
-
var
|
|
25491
|
-
var
|
|
25675
|
+
var import_react151 = require("react");
|
|
25676
|
+
var import_runtime121 = require("@homebound/truss/runtime");
|
|
25492
25677
|
|
|
25493
25678
|
// src/layouts/useAutoHideOnScroll.ts
|
|
25494
|
-
var
|
|
25679
|
+
var import_react148 = require("react");
|
|
25495
25680
|
var THRESHOLD = 80;
|
|
25496
25681
|
function getInitialAutoHideState() {
|
|
25497
25682
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -25501,15 +25686,15 @@ function getInitialAutoHideState() {
|
|
|
25501
25686
|
}
|
|
25502
25687
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
25503
25688
|
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,
|
|
25689
|
+
const [state, setState] = (0, import_react148.useState)(initial.state);
|
|
25690
|
+
const stateRef = (0, import_react148.useRef)(initial.state);
|
|
25691
|
+
const [atTop, setAtTop] = (0, import_react148.useState)(initial.atTop);
|
|
25692
|
+
const atTopRef = (0, import_react148.useRef)(initial.atTop);
|
|
25693
|
+
const getTopOffsetRef = (0, import_react148.useRef)(getTopOffset);
|
|
25509
25694
|
getTopOffsetRef.current = getTopOffset;
|
|
25510
|
-
const lastScrollY = (0,
|
|
25511
|
-
const lastScrollHeight = (0,
|
|
25512
|
-
(0,
|
|
25695
|
+
const lastScrollY = (0, import_react148.useRef)(Number.POSITIVE_INFINITY);
|
|
25696
|
+
const lastScrollHeight = (0, import_react148.useRef)(0);
|
|
25697
|
+
(0, import_react148.useLayoutEffect)(() => {
|
|
25513
25698
|
if (!enabled) {
|
|
25514
25699
|
stateRef.current = "static";
|
|
25515
25700
|
atTopRef.current = true;
|
|
@@ -25581,35 +25766,35 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
25581
25766
|
}
|
|
25582
25767
|
|
|
25583
25768
|
// src/layouts/useMeasuredHeight.ts
|
|
25584
|
-
var
|
|
25585
|
-
var
|
|
25769
|
+
var import_utils171 = require("@react-aria/utils");
|
|
25770
|
+
var import_react149 = require("react");
|
|
25586
25771
|
function useMeasuredHeight(ref, enabled) {
|
|
25587
|
-
const [height, setHeight] = (0,
|
|
25588
|
-
const syncElementHeight = (0,
|
|
25772
|
+
const [height, setHeight] = (0, import_react149.useState)(0);
|
|
25773
|
+
const syncElementHeight = (0, import_react149.useCallback)(() => {
|
|
25589
25774
|
const el = ref.current;
|
|
25590
25775
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
25591
25776
|
setHeight((prev) => prev === next ? prev : next);
|
|
25592
25777
|
}, [ref]);
|
|
25593
|
-
(0,
|
|
25594
|
-
(0,
|
|
25778
|
+
(0, import_utils171.useResizeObserver)({ ref, onResize: syncElementHeight });
|
|
25779
|
+
(0, import_react149.useLayoutEffect)(() => {
|
|
25595
25780
|
syncElementHeight();
|
|
25596
25781
|
}, [enabled, syncElementHeight]);
|
|
25597
25782
|
return height;
|
|
25598
25783
|
}
|
|
25599
25784
|
|
|
25600
25785
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
25601
|
-
var
|
|
25602
|
-
var
|
|
25603
|
-
var NavbarLayoutHeightContext = (0,
|
|
25786
|
+
var import_react150 = require("react");
|
|
25787
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
25788
|
+
var NavbarLayoutHeightContext = (0, import_react150.createContext)(0);
|
|
25604
25789
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
25605
|
-
return /* @__PURE__ */ (0,
|
|
25790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(NavbarLayoutHeightContext.Provider, { value, children });
|
|
25606
25791
|
}
|
|
25607
25792
|
function useNavbarLayoutHeight() {
|
|
25608
|
-
return (0,
|
|
25793
|
+
return (0, import_react150.useContext)(NavbarLayoutHeightContext);
|
|
25609
25794
|
}
|
|
25610
25795
|
|
|
25611
25796
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25612
|
-
var
|
|
25797
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
25613
25798
|
var __maybeInc23 = (inc) => {
|
|
25614
25799
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25615
25800
|
};
|
|
@@ -25619,8 +25804,8 @@ function NavbarLayout(props) {
|
|
|
25619
25804
|
children
|
|
25620
25805
|
} = props;
|
|
25621
25806
|
const tid = useTestIds(props, "navbarLayout");
|
|
25622
|
-
const navMetricsRef = (0,
|
|
25623
|
-
const spacerRef = (0,
|
|
25807
|
+
const navMetricsRef = (0, import_react151.useRef)(null);
|
|
25808
|
+
const spacerRef = (0, import_react151.useRef)(null);
|
|
25624
25809
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
25625
25810
|
const {
|
|
25626
25811
|
state: autoHideState,
|
|
@@ -25638,10 +25823,10 @@ function NavbarLayout(props) {
|
|
|
25638
25823
|
position: "sticky",
|
|
25639
25824
|
left: "left0",
|
|
25640
25825
|
zIndex: ["z_var", {
|
|
25641
|
-
"--zIndex": (0,
|
|
25826
|
+
"--zIndex": (0, import_runtime121.maybeCssVar)(zIndices.navbar)
|
|
25642
25827
|
}],
|
|
25643
25828
|
width: ["w_var", {
|
|
25644
|
-
"--width": (0,
|
|
25829
|
+
"--width": (0, import_runtime121.maybeCssVar)(__maybeInc23(innerWidth))
|
|
25645
25830
|
}]
|
|
25646
25831
|
}
|
|
25647
25832
|
) : (
|
|
@@ -25650,10 +25835,10 @@ function NavbarLayout(props) {
|
|
|
25650
25835
|
position: "fixed",
|
|
25651
25836
|
left: "left0",
|
|
25652
25837
|
zIndex: ["z_var", {
|
|
25653
|
-
"--zIndex": (0,
|
|
25838
|
+
"--zIndex": (0, import_runtime121.maybeCssVar)(zIndices.navbar)
|
|
25654
25839
|
}],
|
|
25655
25840
|
width: ["w_var", {
|
|
25656
|
-
"--width": (0,
|
|
25841
|
+
"--width": (0, import_runtime121.maybeCssVar)(__maybeInc23(innerWidth))
|
|
25657
25842
|
}],
|
|
25658
25843
|
transition: "transitionTop"
|
|
25659
25844
|
}
|
|
@@ -25662,25 +25847,25 @@ function NavbarLayout(props) {
|
|
|
25662
25847
|
const innerStyle = autoHideState !== "static" ? {
|
|
25663
25848
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
25664
25849
|
} : void 0;
|
|
25665
|
-
const navbarEl = (0,
|
|
25666
|
-
return /* @__PURE__ */ (0,
|
|
25850
|
+
const navbarEl = (0, import_react151.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(Navbar, { ...navbar }), [navbar]);
|
|
25851
|
+
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
25852
|
display: "df",
|
|
25668
25853
|
flexDirection: "fdc",
|
|
25669
25854
|
width: "wfc",
|
|
25670
25855
|
minWidth: "mw100"
|
|
25671
25856
|
}), ...tid, children: [
|
|
25672
|
-
/* @__PURE__ */ (0,
|
|
25857
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { ref: spacerRef, ...(0, import_runtime121.mergeProps)(void 0, {
|
|
25673
25858
|
height: navHeight
|
|
25674
25859
|
}, {
|
|
25675
25860
|
flexShrink: "fs0",
|
|
25676
25861
|
width: "w100"
|
|
25677
|
-
}), children: /* @__PURE__ */ (0,
|
|
25678
|
-
/* @__PURE__ */ (0,
|
|
25862
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime121.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
25863
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
25679
25864
|
] }) }) });
|
|
25680
25865
|
}
|
|
25681
25866
|
|
|
25682
25867
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25683
|
-
var
|
|
25868
|
+
var import_react152 = require("react");
|
|
25684
25869
|
|
|
25685
25870
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
25686
25871
|
function useBannerAndNavbarHeight() {
|
|
@@ -25688,8 +25873,8 @@ function useBannerAndNavbarHeight() {
|
|
|
25688
25873
|
}
|
|
25689
25874
|
|
|
25690
25875
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25691
|
-
var
|
|
25692
|
-
var
|
|
25876
|
+
var import_runtime122 = require("@homebound/truss/runtime");
|
|
25877
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
25693
25878
|
var __maybeInc24 = (inc) => {
|
|
25694
25879
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25695
25880
|
};
|
|
@@ -25700,11 +25885,11 @@ function PageHeaderLayout(props) {
|
|
|
25700
25885
|
} = props;
|
|
25701
25886
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
25702
25887
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
25703
|
-
const bannerAndNavbarHeightRef = (0,
|
|
25888
|
+
const bannerAndNavbarHeightRef = (0, import_react152.useRef)(bannerAndNavbarHeight);
|
|
25704
25889
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
25705
|
-
const getBannerAndNavbarHeight = (0,
|
|
25706
|
-
const headerMetricsRef = (0,
|
|
25707
|
-
const spacerRef = (0,
|
|
25890
|
+
const getBannerAndNavbarHeight = (0, import_react152.useCallback)(() => bannerAndNavbarHeightRef.current, []);
|
|
25891
|
+
const headerMetricsRef = (0, import_react152.useRef)(null);
|
|
25892
|
+
const spacerRef = (0, import_react152.useRef)(null);
|
|
25708
25893
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
25709
25894
|
const {
|
|
25710
25895
|
state: autoHideState,
|
|
@@ -25720,43 +25905,43 @@ function PageHeaderLayout(props) {
|
|
|
25720
25905
|
const innerCss = autoHideState === "static" ? {
|
|
25721
25906
|
position: "sticky",
|
|
25722
25907
|
left: ["left_var", {
|
|
25723
|
-
"--left": (0,
|
|
25908
|
+
"--left": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerLeft))
|
|
25724
25909
|
}],
|
|
25725
25910
|
width: ["w_var", {
|
|
25726
|
-
"--width": (0,
|
|
25911
|
+
"--width": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerWidth))
|
|
25727
25912
|
}],
|
|
25728
25913
|
zIndex: ["z_var", {
|
|
25729
|
-
"--zIndex": (0,
|
|
25914
|
+
"--zIndex": (0, import_runtime122.maybeCssVar)(zIndices.pageStickyHeader)
|
|
25730
25915
|
}]
|
|
25731
25916
|
} : {
|
|
25732
25917
|
position: "fixed",
|
|
25733
25918
|
left: ["left_var", {
|
|
25734
|
-
"--left": (0,
|
|
25919
|
+
"--left": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerLeft))
|
|
25735
25920
|
}],
|
|
25736
25921
|
width: ["w_var", {
|
|
25737
|
-
"--width": (0,
|
|
25922
|
+
"--width": (0, import_runtime122.maybeCssVar)(__maybeInc24(headerWidth))
|
|
25738
25923
|
}],
|
|
25739
25924
|
zIndex: ["z_var", {
|
|
25740
|
-
"--zIndex": (0,
|
|
25925
|
+
"--zIndex": (0, import_runtime122.maybeCssVar)(zIndices.pageStickyHeader)
|
|
25741
25926
|
}],
|
|
25742
25927
|
transition: "transitionTop"
|
|
25743
25928
|
};
|
|
25744
25929
|
const innerStyle = autoHideState !== "static" ? {
|
|
25745
25930
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
25746
25931
|
} : void 0;
|
|
25747
|
-
const pageHeaderEl = (0,
|
|
25748
|
-
return /* @__PURE__ */ (0,
|
|
25932
|
+
const pageHeaderEl = (0, import_react152.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
25933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)("div", { ...(0, import_runtime122.mergeProps)(void 0, cssVars, {
|
|
25749
25934
|
display: "df",
|
|
25750
25935
|
flexDirection: "fdc",
|
|
25751
25936
|
width: "w100"
|
|
25752
25937
|
}), ...tid, children: [
|
|
25753
|
-
/* @__PURE__ */ (0,
|
|
25938
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { ref: spacerRef, ...(0, import_runtime122.mergeProps)(void 0, {
|
|
25754
25939
|
height: headerHeight
|
|
25755
25940
|
}, {
|
|
25756
25941
|
flexShrink: "fs0",
|
|
25757
25942
|
width: "w100"
|
|
25758
|
-
}), children: /* @__PURE__ */ (0,
|
|
25759
|
-
/* @__PURE__ */ (0,
|
|
25943
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime122.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
25944
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
25760
25945
|
] }) });
|
|
25761
25946
|
}
|
|
25762
25947
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -25901,6 +26086,8 @@ function PageHeaderLayout(props) {
|
|
|
25901
26086
|
SortHeader,
|
|
25902
26087
|
StaticField,
|
|
25903
26088
|
Stepper,
|
|
26089
|
+
StepperTab,
|
|
26090
|
+
StepperTabs,
|
|
25904
26091
|
SubmitButton,
|
|
25905
26092
|
SuperDrawerContent,
|
|
25906
26093
|
SuperDrawerHeader,
|
|
@@ -26041,6 +26228,7 @@ function PageHeaderLayout(props) {
|
|
|
26041
26228
|
px,
|
|
26042
26229
|
recursivelyGetContainingRow,
|
|
26043
26230
|
reservedRowKinds,
|
|
26231
|
+
resolveGridTableLayoutStyle,
|
|
26044
26232
|
resolveTableContentWidth,
|
|
26045
26233
|
resolveTooltip,
|
|
26046
26234
|
rowClickRenderFn,
|