@homebound/beam 3.93.0 → 3.95.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 +738 -621
- 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 +676 -560
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19281,7 +19281,7 @@ var variantStyles3 = {
|
|
|
19281
19281
|
};
|
|
19282
19282
|
|
|
19283
19283
|
// src/components/BeamContext.tsx
|
|
19284
|
-
import { createContext as createContext12, useContext as useContext23, useMemo as useMemo44, useReducer, useRef as
|
|
19284
|
+
import { createContext as createContext12, useContext as useContext23, useMemo as useMemo44, useReducer, useRef as useRef56 } from "react";
|
|
19285
19285
|
import { OverlayProvider } from "react-aria";
|
|
19286
19286
|
|
|
19287
19287
|
// src/components/Modal/Modal.tsx
|
|
@@ -19614,10 +19614,12 @@ function getSize(size) {
|
|
|
19614
19614
|
}
|
|
19615
19615
|
|
|
19616
19616
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
19617
|
-
import { createContext as createContext8, useContext as useContext18, useMemo as useMemo32, useState as
|
|
19617
|
+
import { createContext as createContext8, useContext as useContext18, useMemo as useMemo32, useState as useState39 } from "react";
|
|
19618
19618
|
|
|
19619
19619
|
// src/components/Snackbar/SnackbarNotice.tsx
|
|
19620
|
-
import {
|
|
19620
|
+
import { useLayoutEffect as useLayoutEffect7, useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
19621
|
+
import { useCallback as useCallback25, useRef as useRef48, useState as useState38 } from "react";
|
|
19622
|
+
import { trussProps as trussProps80, maybeCssVar as maybeCssVar39 } from "@homebound/truss/runtime";
|
|
19621
19623
|
import { jsx as jsx117, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
19622
19624
|
function SnackbarNotice(props) {
|
|
19623
19625
|
const {
|
|
@@ -19630,45 +19632,79 @@ function SnackbarNotice(props) {
|
|
|
19630
19632
|
} = props;
|
|
19631
19633
|
const tid = useTestIds(props, "snackbar");
|
|
19632
19634
|
const reallyHideClose = hideCloseButton && !persistent;
|
|
19635
|
+
const messageRef = useRef48(null);
|
|
19636
|
+
const [expanded, setExpanded] = useState38(false);
|
|
19637
|
+
const [hasOverflow, setHasOverflow] = useState38(false);
|
|
19638
|
+
const measureOverflow = useCallback25(() => {
|
|
19639
|
+
if (!messageRef.current || expanded) return;
|
|
19640
|
+
setHasOverflow(messageRef.current.scrollHeight > messageRef.current.clientHeight);
|
|
19641
|
+
}, [expanded]);
|
|
19642
|
+
useLayoutEffect7(measureOverflow, [measureOverflow, message]);
|
|
19643
|
+
useResizeObserver6({
|
|
19644
|
+
ref: messageRef,
|
|
19645
|
+
onResize: measureOverflow
|
|
19646
|
+
});
|
|
19633
19647
|
return /* @__PURE__ */ jsxs65("div", { ...trussProps80({
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
|
|
19648
|
+
...{
|
|
19649
|
+
color: ["color_var", {
|
|
19650
|
+
"--color": "var(--b-on-surface)"
|
|
19651
|
+
}],
|
|
19652
|
+
backgroundColor: ["bgColor_var", {
|
|
19653
|
+
"--backgroundColor": "var(--b-surface-raised)"
|
|
19654
|
+
}],
|
|
19655
|
+
borderRadius: "br4",
|
|
19656
|
+
fontWeight: "fw4",
|
|
19657
|
+
fontSize: "fz_16px",
|
|
19658
|
+
lineHeight: "lh_24px",
|
|
19659
|
+
display: "df",
|
|
19660
|
+
paddingTop: "pt_12px",
|
|
19661
|
+
paddingBottom: "pb_12px",
|
|
19662
|
+
maxWidth: ["maxw_var", {
|
|
19663
|
+
"--maxWidth": `${noticeMaxWidthPx}px`
|
|
19664
|
+
}],
|
|
19665
|
+
alignItems: "aifs"
|
|
19666
|
+
},
|
|
19667
|
+
...expanded ? {
|
|
19668
|
+
maxWidth: ["maxw_var", {
|
|
19669
|
+
"--maxWidth": maybeCssVar39(expandedNoticeMaxWidth)
|
|
19670
|
+
}]
|
|
19671
|
+
} : void 0
|
|
19647
19672
|
}), "data-theme": contrastDataTheme, ...tid, role: "alert", children: [
|
|
19648
19673
|
icon && /* @__PURE__ */ jsx117("span", { className: "fs0 pl_12px", children: /* @__PURE__ */ jsx117(Icon, { ...typeToIcon2[icon], ...tid.icon }) }),
|
|
19649
|
-
/* @__PURE__ */
|
|
19650
|
-
"
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19674
|
+
/* @__PURE__ */ jsxs65("div", { ...trussProps80({
|
|
19675
|
+
flexGrow: "fg1",
|
|
19676
|
+
minWidth: "mw0",
|
|
19677
|
+
display: "df",
|
|
19678
|
+
flexDirection: "fdc",
|
|
19679
|
+
alignItems: "aifs",
|
|
19680
|
+
gap: "gap1",
|
|
19681
|
+
paddingRight: "pr2",
|
|
19682
|
+
paddingLeft: ["pl_var", {
|
|
19683
|
+
"--paddingLeft": `${icon ? 8 : 16}px`
|
|
19684
|
+
}]
|
|
19685
|
+
}), children: [
|
|
19686
|
+
/* @__PURE__ */ jsx117(
|
|
19687
|
+
"span",
|
|
19688
|
+
{
|
|
19689
|
+
ref: messageRef,
|
|
19690
|
+
...trussProps80({
|
|
19691
|
+
...!expanded ? {
|
|
19692
|
+
overflow: "oh",
|
|
19693
|
+
display: "d_negwebkit_box",
|
|
19694
|
+
WebkitBoxOrient: "wbo_vertical",
|
|
19695
|
+
textOverflow: "to_ellipsis",
|
|
19696
|
+
WebkitLineClamp: "wlc_3"
|
|
19697
|
+
} : {}
|
|
19698
|
+
}),
|
|
19699
|
+
...typeof message === "string" && !expanded ? {
|
|
19700
|
+
title: message
|
|
19701
|
+
} : void 0,
|
|
19702
|
+
...tid.message,
|
|
19703
|
+
children: message
|
|
19704
|
+
}
|
|
19705
|
+
),
|
|
19706
|
+
hasOverflow && /* @__PURE__ */ jsx117(Button, { variant: "text", size: "sm", label: expanded ? "Collapse" : "Expand", "aria-expanded": expanded, onClick: () => setExpanded((prev) => !prev), ...tid.expand })
|
|
19707
|
+
] }),
|
|
19672
19708
|
(action || !reallyHideClose) && /* @__PURE__ */ jsxs65("span", { className: "fs0 df aic", children: [
|
|
19673
19709
|
action && /* @__PURE__ */ jsx117("span", { ...trussProps80({
|
|
19674
19710
|
textTransform: "ttu",
|
|
@@ -19683,6 +19719,8 @@ function SnackbarNotice(props) {
|
|
|
19683
19719
|
] })
|
|
19684
19720
|
] });
|
|
19685
19721
|
}
|
|
19722
|
+
var noticeMaxWidthPx = 420;
|
|
19723
|
+
var expandedNoticeMaxWidth = `min(${noticeMaxWidthPx * 2}px, calc(100vw - (2 * var(--t-spacing) * 3)))`;
|
|
19686
19724
|
var typeToIcon2 = {
|
|
19687
19725
|
// Can change to a Tupple with IconKey and color?
|
|
19688
19726
|
error: {
|
|
@@ -19708,7 +19746,7 @@ var typeToIcon2 = {
|
|
|
19708
19746
|
};
|
|
19709
19747
|
|
|
19710
19748
|
// src/components/Snackbar/Snackbar.tsx
|
|
19711
|
-
import { trussProps as trussProps81, maybeCssVar as
|
|
19749
|
+
import { trussProps as trussProps81, maybeCssVar as maybeCssVar40 } from "@homebound/truss/runtime";
|
|
19712
19750
|
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
19713
19751
|
function Snackbar({
|
|
19714
19752
|
notices,
|
|
@@ -19718,7 +19756,7 @@ function Snackbar({
|
|
|
19718
19756
|
return /* @__PURE__ */ jsx118("div", { ...tid.snackbarWrapper, ...trussProps81({
|
|
19719
19757
|
position: "fixed",
|
|
19720
19758
|
zIndex: ["z_var", {
|
|
19721
|
-
"--zIndex":
|
|
19759
|
+
"--zIndex": maybeCssVar40(zIndices.snackbar)
|
|
19722
19760
|
}],
|
|
19723
19761
|
bottom: ["bottom_var", {
|
|
19724
19762
|
"--bottom": `${offset.bottom ?? defaultOffset.bottom}px`
|
|
@@ -19740,8 +19778,8 @@ var SnackbarContext = createContext8({ setNotices: () => {
|
|
|
19740
19778
|
}, setOffset: () => {
|
|
19741
19779
|
} });
|
|
19742
19780
|
function SnackbarProvider(props) {
|
|
19743
|
-
const [notices, setNotices] =
|
|
19744
|
-
const [offset, setOffset] =
|
|
19781
|
+
const [notices, setNotices] = useState39([]);
|
|
19782
|
+
const [offset, setOffset] = useState39({});
|
|
19745
19783
|
const contextValue = useMemo32(() => ({ setNotices, setOffset }), []);
|
|
19746
19784
|
return /* @__PURE__ */ jsxs66(SnackbarContext.Provider, { value: contextValue, children: [
|
|
19747
19785
|
props.children,
|
|
@@ -19754,7 +19792,7 @@ function useSnackbarContext() {
|
|
|
19754
19792
|
|
|
19755
19793
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
19756
19794
|
import { AnimatePresence, motion } from "framer-motion";
|
|
19757
|
-
import { useEffect as useEffect25, useRef as
|
|
19795
|
+
import { useEffect as useEffect25, useRef as useRef49 } from "react";
|
|
19758
19796
|
import { createPortal as createPortal4 } from "react-dom";
|
|
19759
19797
|
|
|
19760
19798
|
// src/components/SuperDrawer/utils.ts
|
|
@@ -19765,7 +19803,7 @@ var SuperDrawerWidth = /* @__PURE__ */ ((SuperDrawerWidth2) => {
|
|
|
19765
19803
|
})(SuperDrawerWidth || {});
|
|
19766
19804
|
|
|
19767
19805
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
19768
|
-
import { trussProps as trussProps82, maybeCssVar as
|
|
19806
|
+
import { trussProps as trussProps82, maybeCssVar as maybeCssVar41 } from "@homebound/truss/runtime";
|
|
19769
19807
|
import { Fragment as Fragment27, jsx as jsx120, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
19770
19808
|
import { createElement as createElement4 } from "react";
|
|
19771
19809
|
function SuperDrawer() {
|
|
@@ -19776,7 +19814,7 @@ function SuperDrawer() {
|
|
|
19776
19814
|
const {
|
|
19777
19815
|
closeDrawer
|
|
19778
19816
|
} = useSuperDrawer();
|
|
19779
|
-
const headerRef =
|
|
19817
|
+
const headerRef = useRef49(null);
|
|
19780
19818
|
const testId = useTestIds({}, "superDrawer");
|
|
19781
19819
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
19782
19820
|
const {
|
|
@@ -19821,7 +19859,7 @@ function SuperDrawer() {
|
|
|
19821
19859
|
bottom: "bottom0",
|
|
19822
19860
|
left: "left0",
|
|
19823
19861
|
zIndex: ["z_var", {
|
|
19824
|
-
"--zIndex":
|
|
19862
|
+
"--zIndex": maybeCssVar41(zIndices.superDrawerScrim)
|
|
19825
19863
|
}]
|
|
19826
19864
|
}),
|
|
19827
19865
|
initial: {
|
|
@@ -19847,7 +19885,7 @@ function SuperDrawer() {
|
|
|
19847
19885
|
}],
|
|
19848
19886
|
height: "h100",
|
|
19849
19887
|
maxWidth: ["maxw_var", {
|
|
19850
|
-
"--maxWidth":
|
|
19888
|
+
"--maxWidth": maybeCssVar41(px(width2))
|
|
19851
19889
|
}],
|
|
19852
19890
|
width: "w100",
|
|
19853
19891
|
display: "df",
|
|
@@ -19906,7 +19944,7 @@ function SuperDrawer() {
|
|
|
19906
19944
|
}
|
|
19907
19945
|
|
|
19908
19946
|
// src/components/Layout/FormPageLayout.tsx
|
|
19909
|
-
import React19, { createRef, useCallback as
|
|
19947
|
+
import React19, { createRef, useCallback as useCallback29, useEffect as useEffect26, useMemo as useMemo37, useRef as useRef52, useState as useState44 } from "react";
|
|
19910
19948
|
import { useButton as useButton9, useFocusRing as useFocusRing14 } from "react-aria";
|
|
19911
19949
|
|
|
19912
19950
|
// src/forms/BoundCheckboxField.tsx
|
|
@@ -20132,7 +20170,7 @@ function BoundDateRangeField(props) {
|
|
|
20132
20170
|
}
|
|
20133
20171
|
|
|
20134
20172
|
// src/forms/BoundForm.tsx
|
|
20135
|
-
import { useCallback as
|
|
20173
|
+
import { useCallback as useCallback26, useMemo as useMemo33 } from "react";
|
|
20136
20174
|
|
|
20137
20175
|
// src/forms/BoundListField.tsx
|
|
20138
20176
|
import { Observer as Observer6 } from "mobx-react";
|
|
@@ -20685,7 +20723,7 @@ function BoundTreeSelectField(props) {
|
|
|
20685
20723
|
|
|
20686
20724
|
// src/forms/FormLines.tsx
|
|
20687
20725
|
import { Children as Children2, cloneElement } from "react";
|
|
20688
|
-
import { trussProps as trussProps83, maybeCssVar as
|
|
20726
|
+
import { trussProps as trussProps83, maybeCssVar as maybeCssVar42 } from "@homebound/truss/runtime";
|
|
20689
20727
|
import { jsx as jsx140 } from "react/jsx-runtime";
|
|
20690
20728
|
var __maybeInc19 = (inc) => {
|
|
20691
20729
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -20725,13 +20763,13 @@ function FormLines(props) {
|
|
|
20725
20763
|
display: "df",
|
|
20726
20764
|
flexDirection: "fdc",
|
|
20727
20765
|
gap: ["gap_var", {
|
|
20728
|
-
"--gap":
|
|
20766
|
+
"--gap": maybeCssVar42(__maybeInc19(gap))
|
|
20729
20767
|
}],
|
|
20730
20768
|
paddingBottom: ["pb_var", {
|
|
20731
|
-
"--paddingBottom":
|
|
20769
|
+
"--paddingBottom": maybeCssVar42(__maybeInc19(gap))
|
|
20732
20770
|
}],
|
|
20733
20771
|
width: ["w_var", {
|
|
20734
|
-
"--width":
|
|
20772
|
+
"--width": maybeCssVar42(__maybeInc19(sizes[width2]))
|
|
20735
20773
|
}]
|
|
20736
20774
|
}), children: Children2.map(children, (child) => {
|
|
20737
20775
|
if (child && typeof child === "object" && "type" in child && child.type.isFormHeading) {
|
|
@@ -20766,7 +20804,7 @@ function FieldGroup(props) {
|
|
|
20766
20804
|
display: "dg",
|
|
20767
20805
|
gap: "gap2",
|
|
20768
20806
|
gridTemplateColumns: ["gtc_var", {
|
|
20769
|
-
"--gridTemplateColumns":
|
|
20807
|
+
"--gridTemplateColumns": maybeCssVar42(gtc)
|
|
20770
20808
|
}]
|
|
20771
20809
|
}), children });
|
|
20772
20810
|
}
|
|
@@ -20778,7 +20816,7 @@ var sizes = {
|
|
|
20778
20816
|
};
|
|
20779
20817
|
|
|
20780
20818
|
// src/forms/BoundForm.tsx
|
|
20781
|
-
import { trussProps as trussProps84, maybeCssVar as
|
|
20819
|
+
import { trussProps as trussProps84, maybeCssVar as maybeCssVar43 } from "@homebound/truss/runtime";
|
|
20782
20820
|
import { jsx as jsx141 } from "react/jsx-runtime";
|
|
20783
20821
|
import { createElement as createElement5 } from "react";
|
|
20784
20822
|
var reactNodePrefix = "reactNode";
|
|
@@ -20789,7 +20827,7 @@ function BoundForm(props) {
|
|
|
20789
20827
|
formState
|
|
20790
20828
|
} = props;
|
|
20791
20829
|
const tid = useTestIds({}, "boundForm");
|
|
20792
|
-
const getRowKey =
|
|
20830
|
+
const getRowKey = useCallback26((row, rowType) => {
|
|
20793
20831
|
return `${rowType}-${Object.keys(row).join("-")}`;
|
|
20794
20832
|
}, []);
|
|
20795
20833
|
return /* @__PURE__ */ jsx141("div", { ...tid, children: /* @__PURE__ */ jsx141(FormLines, { width: "full", gap: 3.5, children: rows.map((row) => isListFieldRow(row) ? /* @__PURE__ */ jsx141(ListField, { row, formState }, getRowKey(row, "listField")) : /* @__PURE__ */ jsx141(FormRow, { row, formState }, getRowKey(row, "fieldGroup"))) }) });
|
|
@@ -20835,10 +20873,10 @@ function FormRow({
|
|
|
20835
20873
|
minWidth
|
|
20836
20874
|
}) => /* @__PURE__ */ createElement5("div", { ...trussProps84({
|
|
20837
20875
|
minWidth: ["mw_var", {
|
|
20838
|
-
"--minWidth":
|
|
20876
|
+
"--minWidth": maybeCssVar43(minWidth)
|
|
20839
20877
|
}],
|
|
20840
20878
|
flexBasis: ["fb_var", {
|
|
20841
|
-
"--flexBasis":
|
|
20879
|
+
"--flexBasis": maybeCssVar43(`${itemFlexBasis}%`)
|
|
20842
20880
|
}],
|
|
20843
20881
|
flexGrow: "fg1"
|
|
20844
20882
|
}), key: key.toString() }, isLoading ? /* @__PURE__ */ jsx141(LoadingSkeleton, { size: "lg" }) : component)) });
|
|
@@ -20950,7 +20988,7 @@ function boundTreeSelectField(props) {
|
|
|
20950
20988
|
}
|
|
20951
20989
|
|
|
20952
20990
|
// src/components/internal/CompoundField.tsx
|
|
20953
|
-
import { cloneElement as cloneElement2, useState as
|
|
20991
|
+
import { cloneElement as cloneElement2, useState as useState40 } from "react";
|
|
20954
20992
|
import { trussProps as trussProps85 } from "@homebound/truss/runtime";
|
|
20955
20993
|
import { jsx as jsx142, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
20956
20994
|
function CompoundField({
|
|
@@ -20975,7 +21013,7 @@ function CompoundField({
|
|
|
20975
21013
|
const internalProps = {
|
|
20976
21014
|
compound: true
|
|
20977
21015
|
};
|
|
20978
|
-
const [hasFocusWithin, setHasFocusWithin] =
|
|
21016
|
+
const [hasFocusWithin, setHasFocusWithin] = useState40(false);
|
|
20979
21017
|
function onFocusCapture() {
|
|
20980
21018
|
setHasFocusWithin(true);
|
|
20981
21019
|
}
|
|
@@ -21090,7 +21128,7 @@ FormHeading.isFormHeading = true;
|
|
|
21090
21128
|
|
|
21091
21129
|
// src/components/DnDGrid/DnDGrid.tsx
|
|
21092
21130
|
import equal2 from "fast-deep-equal";
|
|
21093
|
-
import { useCallback as
|
|
21131
|
+
import { useCallback as useCallback27, useRef as useRef50 } from "react";
|
|
21094
21132
|
|
|
21095
21133
|
// src/components/DnDGrid/DnDGridContext.tsx
|
|
21096
21134
|
import { createContext as createContext9, useContext as useContext19 } from "react";
|
|
@@ -21113,13 +21151,13 @@ function DnDGrid(props) {
|
|
|
21113
21151
|
onReorder,
|
|
21114
21152
|
activeItemStyles
|
|
21115
21153
|
} = props;
|
|
21116
|
-
const gridEl =
|
|
21117
|
-
const dragEl =
|
|
21118
|
-
const cloneEl =
|
|
21119
|
-
const initialOrder =
|
|
21120
|
-
const styleSnapshot =
|
|
21121
|
-
const reorderViaKeyboard =
|
|
21122
|
-
const transformFrom =
|
|
21154
|
+
const gridEl = useRef50(null);
|
|
21155
|
+
const dragEl = useRef50();
|
|
21156
|
+
const cloneEl = useRef50();
|
|
21157
|
+
const initialOrder = useRef50();
|
|
21158
|
+
const styleSnapshot = useRef50();
|
|
21159
|
+
const reorderViaKeyboard = useRef50(false);
|
|
21160
|
+
const transformFrom = useRef50({
|
|
21123
21161
|
x: 0,
|
|
21124
21162
|
y: 0
|
|
21125
21163
|
});
|
|
@@ -21127,20 +21165,20 @@ function DnDGrid(props) {
|
|
|
21127
21165
|
const activeStyles3 = activeItemStyles ?? {
|
|
21128
21166
|
boxShadow: "bshModal"
|
|
21129
21167
|
};
|
|
21130
|
-
const getGridItems =
|
|
21168
|
+
const getGridItems = useCallback27(() => {
|
|
21131
21169
|
return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
|
|
21132
21170
|
}, []);
|
|
21133
|
-
const getGridItemIdOrder =
|
|
21171
|
+
const getGridItemIdOrder = useCallback27(() => {
|
|
21134
21172
|
return getGridItems().map((child) => child.getAttribute(gridItemIdKey)).filter(isDefined);
|
|
21135
21173
|
}, [getGridItems]);
|
|
21136
|
-
const initReorder =
|
|
21174
|
+
const initReorder = useCallback27(() => {
|
|
21137
21175
|
if (gridEl.current && dragEl.current) {
|
|
21138
21176
|
initialOrder.current = getGridItemIdOrder();
|
|
21139
21177
|
styleSnapshot.current = snapshotElementStyle(dragEl.current);
|
|
21140
21178
|
applyActiveStyles(dragEl.current, activeStyles3);
|
|
21141
21179
|
}
|
|
21142
21180
|
}, [getGridItemIdOrder, activeStyles3]);
|
|
21143
|
-
const commitReorder =
|
|
21181
|
+
const commitReorder = useCallback27(() => {
|
|
21144
21182
|
if (gridEl.current && dragEl.current) {
|
|
21145
21183
|
const currentOrder = getGridItemIdOrder();
|
|
21146
21184
|
if (!equal2(currentOrder, initialOrder.current)) onReorder(currentOrder);
|
|
@@ -21150,7 +21188,7 @@ function DnDGrid(props) {
|
|
|
21150
21188
|
initialOrder.current = currentOrder;
|
|
21151
21189
|
}
|
|
21152
21190
|
}, [onReorder, getGridItemIdOrder]);
|
|
21153
|
-
const cancelReorder =
|
|
21191
|
+
const cancelReorder = useCallback27(() => {
|
|
21154
21192
|
if (gridEl.current && dragEl.current && initialOrder.current) {
|
|
21155
21193
|
const currentOrder = getGridItemIdOrder();
|
|
21156
21194
|
if (!equal2(currentOrder, initialOrder.current)) {
|
|
@@ -21172,7 +21210,7 @@ function DnDGrid(props) {
|
|
|
21172
21210
|
reorderViaKeyboard.current = false;
|
|
21173
21211
|
}
|
|
21174
21212
|
}, [getGridItemIdOrder, getGridItems]);
|
|
21175
|
-
const onMove =
|
|
21213
|
+
const onMove = useCallback27((e) => {
|
|
21176
21214
|
if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
|
|
21177
21215
|
const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX;
|
|
21178
21216
|
const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY;
|
|
@@ -21195,7 +21233,7 @@ function DnDGrid(props) {
|
|
|
21195
21233
|
}
|
|
21196
21234
|
}
|
|
21197
21235
|
}, []);
|
|
21198
|
-
const onDragStart =
|
|
21236
|
+
const onDragStart = useCallback27((e) => {
|
|
21199
21237
|
if (!reorderViaKeyboard.current && dragEl.current && gridEl.current) {
|
|
21200
21238
|
const rect = dragEl.current.getBoundingClientRect();
|
|
21201
21239
|
const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX;
|
|
@@ -21224,7 +21262,7 @@ function DnDGrid(props) {
|
|
|
21224
21262
|
gridEl.current.addEventListener("touchmove", onMove);
|
|
21225
21263
|
}
|
|
21226
21264
|
}, [initReorder, onMove]);
|
|
21227
|
-
const onDragEnd =
|
|
21265
|
+
const onDragEnd = useCallback27((e) => {
|
|
21228
21266
|
if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
|
|
21229
21267
|
e.preventDefault();
|
|
21230
21268
|
cloneEl.current.replaceWith(dragEl.current);
|
|
@@ -21236,7 +21274,7 @@ function DnDGrid(props) {
|
|
|
21236
21274
|
gridEl.current.removeEventListener("touchmove", onMove);
|
|
21237
21275
|
}
|
|
21238
21276
|
}, [commitReorder, onMove]);
|
|
21239
|
-
const onDragHandleKeyDown =
|
|
21277
|
+
const onDragHandleKeyDown = useCallback27((e) => {
|
|
21240
21278
|
const moveHandle = e.target;
|
|
21241
21279
|
if (dragEl.current instanceof HTMLElement && moveHandle instanceof HTMLElement && gridEl.current) {
|
|
21242
21280
|
const isSpaceKey = e.key === " ";
|
|
@@ -21413,10 +21451,10 @@ var headingByLevel = {
|
|
|
21413
21451
|
};
|
|
21414
21452
|
|
|
21415
21453
|
// src/forms/FormSection/FormSection.tsx
|
|
21416
|
-
import { trussProps as trussProps91, maybeCssVar as
|
|
21454
|
+
import { trussProps as trussProps91, maybeCssVar as maybeCssVar44 } from "@homebound/truss/runtime";
|
|
21417
21455
|
|
|
21418
21456
|
// src/forms/FormSection/FormSectionChild.tsx
|
|
21419
|
-
import { useRef as
|
|
21457
|
+
import { useRef as useRef51 } from "react";
|
|
21420
21458
|
|
|
21421
21459
|
// src/components/DnDGrid/DnDGridItemHandle.tsx
|
|
21422
21460
|
import { mergeProps as mergeProps23, useFocusRing as useFocusRing13, useHover as useHover16 } from "react-aria";
|
|
@@ -21510,7 +21548,7 @@ function FormSectionChild(props) {
|
|
|
21510
21548
|
orderField
|
|
21511
21549
|
} = props;
|
|
21512
21550
|
const tid = useTestIds(props, "formSectionChild");
|
|
21513
|
-
const itemRef =
|
|
21551
|
+
const itemRef = useRef51(null);
|
|
21514
21552
|
const isDraggable = !!orderField;
|
|
21515
21553
|
const {
|
|
21516
21554
|
dragItemProps,
|
|
@@ -21559,7 +21597,7 @@ function FormSection(props) {
|
|
|
21559
21597
|
flexDirection: "fdc",
|
|
21560
21598
|
gap: "gap2",
|
|
21561
21599
|
scrollMarginTop: ["scrollMarginTop_var", {
|
|
21562
|
-
"--scrollMarginTop":
|
|
21600
|
+
"--scrollMarginTop": maybeCssVar44(stickyNavAndHeaderOffset())
|
|
21563
21601
|
}]
|
|
21564
21602
|
}), ...tid.section, children: [
|
|
21565
21603
|
/* @__PURE__ */ jsx150(ContentHeader, { ...tid, title, description, actions, level: 3 }),
|
|
@@ -21678,8 +21716,8 @@ import { useDebouncedCallback as useDebouncedCallback5 } from "use-debounce";
|
|
|
21678
21716
|
|
|
21679
21717
|
// src/components/RightSidebar.tsx
|
|
21680
21718
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
21681
|
-
import { useState as
|
|
21682
|
-
import { trussProps as trussProps93, maybeCssVar as
|
|
21719
|
+
import { useState as useState41 } from "react";
|
|
21720
|
+
import { trussProps as trussProps93, maybeCssVar as maybeCssVar45 } from "@homebound/truss/runtime";
|
|
21683
21721
|
import { Fragment as Fragment29, jsx as jsx153, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
21684
21722
|
var __maybeInc20 = (inc) => {
|
|
21685
21723
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -21689,7 +21727,7 @@ function RightSidebar({
|
|
|
21689
21727
|
content,
|
|
21690
21728
|
headerHeightPx: headerHeightPx2
|
|
21691
21729
|
}) {
|
|
21692
|
-
const [selectedIcon, setSelectedIcon] =
|
|
21730
|
+
const [selectedIcon, setSelectedIcon] = useState41(void 0);
|
|
21693
21731
|
const tid = useTestIds({}, "rightSidebar");
|
|
21694
21732
|
return /* @__PURE__ */ jsxs75(Fragment29, { children: [
|
|
21695
21733
|
/* @__PURE__ */ jsx153("div", { className: "df jcfe absolute right0 pr3", children: /* @__PURE__ */ jsx153(AnimatePresence2, { children: !selectedIcon && /* @__PURE__ */ jsx153(motion2.div, { className: "df fdc gap2 z1", initial: {
|
|
@@ -21725,11 +21763,11 @@ function RightSidebar({
|
|
|
21725
21763
|
}, ...trussProps93({
|
|
21726
21764
|
width: "w100",
|
|
21727
21765
|
minWidth: ["mw_var", {
|
|
21728
|
-
"--minWidth":
|
|
21766
|
+
"--minWidth": maybeCssVar45(RIGHT_SIDEBAR_MIN_WIDTH)
|
|
21729
21767
|
}],
|
|
21730
21768
|
zIndex: "z0",
|
|
21731
21769
|
height: ["h_var", {
|
|
21732
|
-
"--height":
|
|
21770
|
+
"--height": maybeCssVar45(__maybeInc20(`calc(100vh - ${headerHeightPx2}px)`))
|
|
21733
21771
|
}],
|
|
21734
21772
|
overflowY: "oya",
|
|
21735
21773
|
paddingLeft: "pl4",
|
|
@@ -21790,7 +21828,7 @@ function IconButtonList({
|
|
|
21790
21828
|
}
|
|
21791
21829
|
|
|
21792
21830
|
// src/components/Toast/ToastContext.tsx
|
|
21793
|
-
import { createContext as createContext10, useCallback as
|
|
21831
|
+
import { createContext as createContext10, useCallback as useCallback28, useContext as useContext20, useMemo as useMemo35, useState as useState42 } from "react";
|
|
21794
21832
|
import { jsx as jsx154 } from "react/jsx-runtime";
|
|
21795
21833
|
var ToastContext = createContext10({
|
|
21796
21834
|
setNotice: () => {
|
|
@@ -21801,8 +21839,8 @@ var ToastContext = createContext10({
|
|
|
21801
21839
|
notice: void 0
|
|
21802
21840
|
});
|
|
21803
21841
|
function ToastProvider(props) {
|
|
21804
|
-
const [notice, setNotice] =
|
|
21805
|
-
const clear =
|
|
21842
|
+
const [notice, setNotice] = useState42();
|
|
21843
|
+
const clear = useCallback28(() => setNotice(void 0), [setNotice]);
|
|
21806
21844
|
const contextValue = useMemo35(() => ({ setNotice, notice, clear }), [notice, clear]);
|
|
21807
21845
|
return /* @__PURE__ */ jsx154(ToastContext.Provider, { value: contextValue, children: props.children });
|
|
21808
21846
|
}
|
|
@@ -21819,7 +21857,7 @@ function Toast() {
|
|
|
21819
21857
|
}
|
|
21820
21858
|
|
|
21821
21859
|
// src/components/Layout/PageHeaderBreadcrumbs.tsx
|
|
21822
|
-
import { Fragment as Fragment31, useMemo as useMemo36, useState as
|
|
21860
|
+
import { Fragment as Fragment31, useMemo as useMemo36, useState as useState43 } from "react";
|
|
21823
21861
|
import { Link as Link5 } from "react-router-dom";
|
|
21824
21862
|
import { trussProps as trussProps94, mergeProps as mergeProps24 } from "@homebound/truss/runtime";
|
|
21825
21863
|
import { Fragment as Fragment32, jsx as jsx156, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
@@ -21828,7 +21866,7 @@ function PageHeaderBreadcrumbs({
|
|
|
21828
21866
|
}) {
|
|
21829
21867
|
const tids = useTestIds({}, "pageHeaderBreadcrumbs");
|
|
21830
21868
|
const breadcrumbs = useMemo36(() => Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb], [breadcrumb]);
|
|
21831
|
-
const [collapsed, setCollapsed] =
|
|
21869
|
+
const [collapsed, setCollapsed] = useState43(true);
|
|
21832
21870
|
function renderBreadcrumb(bc, index, hideDivisor) {
|
|
21833
21871
|
return (
|
|
21834
21872
|
// Adding index to key to prevent rendering issues when multiple items have the same label
|
|
@@ -21873,7 +21911,7 @@ function PageHeaderBreadcrumbs({
|
|
|
21873
21911
|
}
|
|
21874
21912
|
|
|
21875
21913
|
// src/components/Layout/FormPageLayout.tsx
|
|
21876
|
-
import { trussProps as trussProps95, maybeCssVar as
|
|
21914
|
+
import { trussProps as trussProps95, maybeCssVar as maybeCssVar46 } from "@homebound/truss/runtime";
|
|
21877
21915
|
import { jsx as jsx157, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
21878
21916
|
var headerHeightPx = 120;
|
|
21879
21917
|
var maxContentWidthPx = 1600;
|
|
@@ -21903,7 +21941,7 @@ function FormPageLayoutComponent(props) {
|
|
|
21903
21941
|
left: "left0",
|
|
21904
21942
|
right: "right0",
|
|
21905
21943
|
zIndex: ["z_var", {
|
|
21906
|
-
"--zIndex":
|
|
21944
|
+
"--zIndex": maybeCssVar46(zIndices.pageOverlay)
|
|
21907
21945
|
}],
|
|
21908
21946
|
overflowY: "oya",
|
|
21909
21947
|
backgroundColor: ["bgColor_var", {
|
|
@@ -21919,7 +21957,7 @@ function FormPageLayoutComponent(props) {
|
|
|
21919
21957
|
}],
|
|
21920
21958
|
display: "dg",
|
|
21921
21959
|
gridTemplateColumns: ["gtc_var", {
|
|
21922
|
-
"--gridTemplateColumns":
|
|
21960
|
+
"--gridTemplateColumns": maybeCssVar46(gridColumns)
|
|
21923
21961
|
}],
|
|
21924
21962
|
gridTemplateRows: "gtr_auto_1fr",
|
|
21925
21963
|
columnGap: "cg3",
|
|
@@ -21962,7 +22000,7 @@ function PageHeader(props) {
|
|
|
21962
22000
|
"--backgroundColor": "var(--b-surface)"
|
|
21963
22001
|
}],
|
|
21964
22002
|
zIndex: ["z_var", {
|
|
21965
|
-
"--zIndex":
|
|
22003
|
+
"--zIndex": maybeCssVar46(zIndices.pageStickyHeader)
|
|
21966
22004
|
}],
|
|
21967
22005
|
...!notice ? {
|
|
21968
22006
|
height: ["h_var", {
|
|
@@ -22015,7 +22053,7 @@ function FormSections(props) {
|
|
|
22015
22053
|
gridTemplateRows: "gtr_auto",
|
|
22016
22054
|
marginBottom: "mb_72px",
|
|
22017
22055
|
scrollMarginTop: ["scrollMarginTop_var", {
|
|
22018
|
-
"--scrollMarginTop":
|
|
22056
|
+
"--scrollMarginTop": maybeCssVar46(`${headerHeightPx}px`)
|
|
22019
22057
|
}]
|
|
22020
22058
|
}),
|
|
22021
22059
|
...tids.formSection,
|
|
@@ -22059,7 +22097,7 @@ var activeStyles = {
|
|
|
22059
22097
|
fontSize: "fz_14px",
|
|
22060
22098
|
lineHeight: "lh_20px",
|
|
22061
22099
|
boxShadow: ["boxShadow_var", {
|
|
22062
|
-
"--boxShadow":
|
|
22100
|
+
"--boxShadow": maybeCssVar46(`inset 3px 0px 0 0px var(${"--b-primary" /* Primary */})`)
|
|
22063
22101
|
}]
|
|
22064
22102
|
};
|
|
22065
22103
|
var hoverStyles2 = {
|
|
@@ -22069,7 +22107,7 @@ var hoverStyles2 = {
|
|
|
22069
22107
|
lineHeight: "lh_20px",
|
|
22070
22108
|
color: "blue900",
|
|
22071
22109
|
boxShadow: ["boxShadow_var", {
|
|
22072
|
-
"--boxShadow":
|
|
22110
|
+
"--boxShadow": maybeCssVar46(`inset 3px 0px 0 0px var(${"--b-primary" /* Primary */})`)
|
|
22073
22111
|
}]
|
|
22074
22112
|
};
|
|
22075
22113
|
var defaultFocusRingStyles = {
|
|
@@ -22087,14 +22125,14 @@ function SectionNavLink(props) {
|
|
|
22087
22125
|
ref: sectionRef
|
|
22088
22126
|
} = sectionWithRef;
|
|
22089
22127
|
const active = activeSection === sectionWithRef.sectionKey;
|
|
22090
|
-
const handleNavClick =
|
|
22128
|
+
const handleNavClick = useCallback29(() => {
|
|
22091
22129
|
sectionRef.current?.scrollIntoView({
|
|
22092
22130
|
behavior: "smooth",
|
|
22093
22131
|
block: "start"
|
|
22094
22132
|
});
|
|
22095
22133
|
}, [sectionRef]);
|
|
22096
22134
|
const tids = useTestIds(props);
|
|
22097
|
-
const buttonRef =
|
|
22135
|
+
const buttonRef = useRef52(null);
|
|
22098
22136
|
const {
|
|
22099
22137
|
buttonProps,
|
|
22100
22138
|
isPressed
|
|
@@ -22136,7 +22174,7 @@ function SectionNavLink(props) {
|
|
|
22136
22174
|
}), ...tids.sectionNavLink, children: section.title });
|
|
22137
22175
|
}
|
|
22138
22176
|
function useActiveSection(sectionsWithRefs) {
|
|
22139
|
-
const [activeSection, setActiveSection] =
|
|
22177
|
+
const [activeSection, setActiveSection] = useState44(null);
|
|
22140
22178
|
const debouncedIntersectionCallback = useDebouncedCallback5((entries) => {
|
|
22141
22179
|
const sectionsInView = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio > 0.2).sort((a, b) => {
|
|
22142
22180
|
const ratioDiff = b.intersectionRatio - a.intersectionRatio;
|
|
@@ -22186,7 +22224,7 @@ function useActiveSection(sectionsWithRefs) {
|
|
|
22186
22224
|
}
|
|
22187
22225
|
|
|
22188
22226
|
// src/components/Layout/FullBleed.tsx
|
|
22189
|
-
import { mergeProps as mergeProps25, maybeCssVar as
|
|
22227
|
+
import { mergeProps as mergeProps25, maybeCssVar as maybeCssVar47 } from "@homebound/truss/runtime";
|
|
22190
22228
|
import { cloneElement as cloneElement3 } from "react";
|
|
22191
22229
|
var __maybeInc21 = (inc) => {
|
|
22192
22230
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -22219,17 +22257,17 @@ function FullBleed({
|
|
|
22219
22257
|
// inverts that padding with negative margins before re-applying it to the child.
|
|
22220
22258
|
{
|
|
22221
22259
|
marginLeft: ["ml_var", {
|
|
22222
|
-
"--marginLeft":
|
|
22260
|
+
"--marginLeft": maybeCssVar47(__maybeInc21(invertSpacing(paddingLeft)))
|
|
22223
22261
|
}],
|
|
22224
22262
|
marginRight: ["mr_var", {
|
|
22225
|
-
"--marginRight":
|
|
22263
|
+
"--marginRight": maybeCssVar47(__maybeInc21(invertSpacing(paddingRight)))
|
|
22226
22264
|
}],
|
|
22227
22265
|
...!omitPadding ? {
|
|
22228
22266
|
paddingLeft: ["pl_var", {
|
|
22229
|
-
"--paddingLeft":
|
|
22267
|
+
"--paddingLeft": maybeCssVar47(__maybeInc21(paddingLeft))
|
|
22230
22268
|
}],
|
|
22231
22269
|
paddingRight: ["pr_var", {
|
|
22232
|
-
"--paddingRight":
|
|
22270
|
+
"--paddingRight": maybeCssVar47(__maybeInc21(paddingRight))
|
|
22233
22271
|
}]
|
|
22234
22272
|
} : {}
|
|
22235
22273
|
}
|
|
@@ -22243,8 +22281,8 @@ function invertSpacing(value) {
|
|
|
22243
22281
|
}
|
|
22244
22282
|
|
|
22245
22283
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
22246
|
-
import { useResizeObserver as
|
|
22247
|
-
import React21, { useCallback as
|
|
22284
|
+
import { useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
|
|
22285
|
+
import React21, { useCallback as useCallback33, useEffect as useEffect29, useLayoutEffect as useLayoutEffect9, useMemo as useMemo43, useRef as useRef55, useState as useState49 } from "react";
|
|
22248
22286
|
|
|
22249
22287
|
// src/components/Filters/utils.tsx
|
|
22250
22288
|
function getActiveFilterCount(filter) {
|
|
@@ -22265,7 +22303,7 @@ function isGridTableProps(props) {
|
|
|
22265
22303
|
}
|
|
22266
22304
|
|
|
22267
22305
|
// src/components/Layout/RightPaneLayout/DocumentScrollRightPaneLayout.tsx
|
|
22268
|
-
import { useLayoutEffect as
|
|
22306
|
+
import { useLayoutEffect as useLayoutEffect8 } from "react";
|
|
22269
22307
|
import { mergeProps as mergeProps27 } from "@homebound/truss/runtime";
|
|
22270
22308
|
|
|
22271
22309
|
// src/components/Layout/RightPaneLayout/DocumentScrollRightPane.tsx
|
|
@@ -22286,7 +22324,7 @@ function useEnvironmentBannerLayoutHeight() {
|
|
|
22286
22324
|
}
|
|
22287
22325
|
|
|
22288
22326
|
// src/components/Layout/RightPaneLayout/RightPaneContext.tsx
|
|
22289
|
-
import React20, { useCallback as
|
|
22327
|
+
import React20, { useCallback as useCallback30, useContext as useContext22, useMemo as useMemo38, useState as useState45 } from "react";
|
|
22290
22328
|
import { jsx as jsx159 } from "react/jsx-runtime";
|
|
22291
22329
|
var RightPaneContext = React20.createContext({
|
|
22292
22330
|
openInPane: () => {
|
|
@@ -22299,17 +22337,17 @@ var RightPaneContext = React20.createContext({
|
|
|
22299
22337
|
rightPaneContent: null
|
|
22300
22338
|
});
|
|
22301
22339
|
function RightPaneProvider({ children }) {
|
|
22302
|
-
const [rightPaneContent, setRightPaneContent] =
|
|
22303
|
-
const [isRightPaneOpen, setIsRightPaneOpen] =
|
|
22304
|
-
const openInPane =
|
|
22340
|
+
const [rightPaneContent, setRightPaneContent] = useState45(void 0);
|
|
22341
|
+
const [isRightPaneOpen, setIsRightPaneOpen] = useState45(false);
|
|
22342
|
+
const openInPane = useCallback30(
|
|
22305
22343
|
(opts) => {
|
|
22306
22344
|
setRightPaneContent(opts?.content);
|
|
22307
22345
|
setIsRightPaneOpen(true);
|
|
22308
22346
|
},
|
|
22309
22347
|
[setRightPaneContent]
|
|
22310
22348
|
);
|
|
22311
|
-
const closePane =
|
|
22312
|
-
const clearPane =
|
|
22349
|
+
const closePane = useCallback30(() => setIsRightPaneOpen(false), []);
|
|
22350
|
+
const clearPane = useCallback30(() => setRightPaneContent(void 0), [setRightPaneContent]);
|
|
22313
22351
|
const context = useMemo38(
|
|
22314
22352
|
() => ({ openInPane, closePane, clearPane, rightPaneContent, isRightPaneOpen }),
|
|
22315
22353
|
[openInPane, closePane, rightPaneContent, clearPane, isRightPaneOpen]
|
|
@@ -22321,7 +22359,7 @@ function useRightPaneContext() {
|
|
|
22321
22359
|
}
|
|
22322
22360
|
|
|
22323
22361
|
// src/components/Layout/RightPaneLayout/DocumentScrollRightPane.tsx
|
|
22324
|
-
import { mergeProps as mergeProps26, maybeCssVar as
|
|
22362
|
+
import { mergeProps as mergeProps26, maybeCssVar as maybeCssVar48 } from "@homebound/truss/runtime";
|
|
22325
22363
|
import { jsx as jsx160 } from "react/jsx-runtime";
|
|
22326
22364
|
var __maybeInc22 = (inc) => {
|
|
22327
22365
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -22358,27 +22396,27 @@ function DocumentScrollRightPane({
|
|
|
22358
22396
|
"--backgroundColor": "var(--b-surface)"
|
|
22359
22397
|
}],
|
|
22360
22398
|
zIndex: ["z_var", {
|
|
22361
|
-
"--zIndex":
|
|
22399
|
+
"--zIndex": maybeCssVar48(zIndices.rightPaneMobile)
|
|
22362
22400
|
}]
|
|
22363
22401
|
} : {
|
|
22364
22402
|
position: "fixed",
|
|
22365
22403
|
transition: "transitionTop",
|
|
22366
22404
|
top: ["top_var", {
|
|
22367
|
-
"--top":
|
|
22405
|
+
"--top": maybeCssVar48(__maybeInc22(stickyTableHeaderOffset()))
|
|
22368
22406
|
}],
|
|
22369
22407
|
right: "right_0",
|
|
22370
22408
|
height: ["h_var", {
|
|
22371
|
-
"--height":
|
|
22409
|
+
"--height": maybeCssVar48(__maybeInc22(documentScrollRightPaneHeight()))
|
|
22372
22410
|
}],
|
|
22373
22411
|
width: ["w_var", {
|
|
22374
|
-
"--width":
|
|
22412
|
+
"--width": maybeCssVar48(__maybeInc22(documentScrollRightPaneWidth(paneWidth)))
|
|
22375
22413
|
}],
|
|
22376
22414
|
overflowY: "oya",
|
|
22377
22415
|
backgroundColor: ["bgColor_var", {
|
|
22378
22416
|
"--backgroundColor": "var(--b-surface)"
|
|
22379
22417
|
}],
|
|
22380
22418
|
zIndex: ["z_var", {
|
|
22381
|
-
"--zIndex":
|
|
22419
|
+
"--zIndex": maybeCssVar48(zIndices.rightPane)
|
|
22382
22420
|
}],
|
|
22383
22421
|
borderLeftStyle: "bls_solid",
|
|
22384
22422
|
borderLeftWidth: "blw_1px",
|
|
@@ -22415,7 +22453,7 @@ function DocumentScrollRightPaneLayout(props) {
|
|
|
22415
22453
|
} = useBreakpoint();
|
|
22416
22454
|
const isSplitPaneOpen = isRightPaneOpen && !sm;
|
|
22417
22455
|
const effectivePaneWidth = isSplitPaneOpen ? documentScrollRightPaneWidth(paneWidth) : "0px";
|
|
22418
|
-
|
|
22456
|
+
useLayoutEffect8(() => {
|
|
22419
22457
|
const root = document.documentElement;
|
|
22420
22458
|
const previous = root.style.getPropertyValue(beamFloatingRightOffsetVar);
|
|
22421
22459
|
root.style.setProperty(beamFloatingRightOffsetVar, effectivePaneWidth);
|
|
@@ -22465,10 +22503,10 @@ function DocumentScrollRightPaneSpacer({
|
|
|
22465
22503
|
}
|
|
22466
22504
|
|
|
22467
22505
|
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
22468
|
-
import { memo as memo2, useMemo as useMemo41, useState as
|
|
22506
|
+
import { memo as memo2, useMemo as useMemo41, useState as useState47 } from "react";
|
|
22469
22507
|
|
|
22470
22508
|
// src/components/ButtonMenu.tsx
|
|
22471
|
-
import { useRef as
|
|
22509
|
+
import { useRef as useRef53 } from "react";
|
|
22472
22510
|
import { useMenuTrigger as useMenuTrigger2 } from "react-aria";
|
|
22473
22511
|
import { useMenuTriggerState as useMenuTriggerState2 } from "react-stately";
|
|
22474
22512
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
@@ -22480,7 +22518,7 @@ function ButtonMenu(props) {
|
|
|
22480
22518
|
onChange = props.onChange;
|
|
22481
22519
|
}
|
|
22482
22520
|
const state = useMenuTriggerState2({ isOpen: defaultOpen });
|
|
22483
|
-
const buttonRef =
|
|
22521
|
+
const buttonRef = useRef53(null);
|
|
22484
22522
|
const { menuTriggerProps, menuProps } = useMenuTrigger2({ isDisabled: !!disabled }, state, buttonRef);
|
|
22485
22523
|
const tid = useTestIds(
|
|
22486
22524
|
props,
|
|
@@ -22505,7 +22543,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
22505
22543
|
}
|
|
22506
22544
|
|
|
22507
22545
|
// src/components/CountBadge.tsx
|
|
22508
|
-
import { trussProps as trussProps96, maybeCssVar as
|
|
22546
|
+
import { trussProps as trussProps96, maybeCssVar as maybeCssVar49 } from "@homebound/truss/runtime";
|
|
22509
22547
|
import { jsx as jsx163 } from "react/jsx-runtime";
|
|
22510
22548
|
function CountBadge(props) {
|
|
22511
22549
|
const {
|
|
@@ -22537,12 +22575,12 @@ function CountBadge(props) {
|
|
|
22537
22575
|
alignItems: "aic",
|
|
22538
22576
|
justifyContent: "jcc",
|
|
22539
22577
|
backgroundColor: ["bgColor_var", {
|
|
22540
|
-
"--backgroundColor":
|
|
22578
|
+
"--backgroundColor": maybeCssVar49(bgColor)
|
|
22541
22579
|
}]
|
|
22542
22580
|
},
|
|
22543
22581
|
...{
|
|
22544
22582
|
color: ["color_var", {
|
|
22545
|
-
"--color":
|
|
22583
|
+
"--color": maybeCssVar49(color)
|
|
22546
22584
|
}]
|
|
22547
22585
|
}
|
|
22548
22586
|
}), children: count });
|
|
@@ -22996,7 +23034,7 @@ var CheckboxFilter = class extends BaseFilter {
|
|
|
22996
23034
|
};
|
|
22997
23035
|
|
|
22998
23036
|
// src/components/Filters/FilterModal.tsx
|
|
22999
|
-
import { useState as
|
|
23037
|
+
import { useState as useState46 } from "react";
|
|
23000
23038
|
|
|
23001
23039
|
// src/components/Modal/ConfirmCloseModal.tsx
|
|
23002
23040
|
import { Fragment as Fragment36, jsx as jsx172, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
@@ -23073,7 +23111,7 @@ function FilterModal(props) {
|
|
|
23073
23111
|
const {
|
|
23074
23112
|
closeModal
|
|
23075
23113
|
} = useModal();
|
|
23076
|
-
const [modalFilter, setModalFilter] =
|
|
23114
|
+
const [modalFilter, setModalFilter] = useState46(filter);
|
|
23077
23115
|
return /* @__PURE__ */ jsxs83(Fragment37, { children: [
|
|
23078
23116
|
/* @__PURE__ */ jsx174(ModalHeader, { children: "More Filters" }),
|
|
23079
23117
|
/* @__PURE__ */ jsx174(ModalBody, { children: /* @__PURE__ */ jsx174("div", { className: "df fdc", children: safeEntries(filters).map(([key, f]) => /* @__PURE__ */ jsx174(ModalFilterItem, { label: f.hideLabelInModal ? void 0 : f.label, children: f.render(modalFilter[key], (value) => setModalFilter(updateFilter(modalFilter, key, value)), testId, true, false) }, key)) }) }),
|
|
@@ -23199,7 +23237,7 @@ var ToggleFilter = class extends BaseFilter {
|
|
|
23199
23237
|
};
|
|
23200
23238
|
|
|
23201
23239
|
// src/components/Table/components/EditColumnsButton.tsx
|
|
23202
|
-
import { Fragment as Fragment38, useCallback as
|
|
23240
|
+
import { Fragment as Fragment38, useCallback as useCallback31, useMemo as useMemo40, useRef as useRef54 } from "react";
|
|
23203
23241
|
import { useMenuTrigger as useMenuTrigger3 } from "react-aria";
|
|
23204
23242
|
import { useMenuTriggerState as useMenuTriggerState3 } from "react-stately";
|
|
23205
23243
|
import { trussProps as trussProps99 } from "@homebound/truss/runtime";
|
|
@@ -23214,7 +23252,7 @@ function EditColumnsButton(props) {
|
|
|
23214
23252
|
const state = useMenuTriggerState3({
|
|
23215
23253
|
isOpen: defaultOpen
|
|
23216
23254
|
});
|
|
23217
|
-
const buttonRef =
|
|
23255
|
+
const buttonRef = useRef54(null);
|
|
23218
23256
|
const {
|
|
23219
23257
|
menuTriggerProps
|
|
23220
23258
|
} = useMenuTrigger3({
|
|
@@ -23235,7 +23273,7 @@ function EditColumnsButton(props) {
|
|
|
23235
23273
|
value: column2.id
|
|
23236
23274
|
})), [columns]);
|
|
23237
23275
|
const selectedValues = useComputed(() => api.getVisibleColumnIds(), [api]);
|
|
23238
|
-
const setSelectedValues =
|
|
23276
|
+
const setSelectedValues = useCallback31((ids) => {
|
|
23239
23277
|
api.resetColumnWidths();
|
|
23240
23278
|
api.setVisibleColumns(columns.filter((column2) => column2.canHide ? ids.includes(column2.id) : true).map((c) => c.id));
|
|
23241
23279
|
}, [columns, api]);
|
|
@@ -23444,14 +23482,14 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
23444
23482
|
sm
|
|
23445
23483
|
} = useBreakpoint();
|
|
23446
23484
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
23447
|
-
const [showSearch, setShowSearch] =
|
|
23448
|
-
const [showFilters, setShowFilters] =
|
|
23485
|
+
const [showSearch, setShowSearch] = useState47(false);
|
|
23486
|
+
const [showFilters, setShowFilters] = useState47(false);
|
|
23449
23487
|
const [{
|
|
23450
23488
|
search: initialValue
|
|
23451
23489
|
}, setQueryParams] = useQueryParams3({
|
|
23452
23490
|
search: StringParam2
|
|
23453
23491
|
});
|
|
23454
|
-
const [searchValue, setSearchValue] =
|
|
23492
|
+
const [searchValue, setSearchValue] = useState47(initialValue || "");
|
|
23455
23493
|
const handleSearchDebounced = useDebouncedCallback6((value) => {
|
|
23456
23494
|
if (searchProps) {
|
|
23457
23495
|
searchProps.onSearch(value);
|
|
@@ -23529,7 +23567,7 @@ var _GridTableLayoutActions = memo2(GridTableLayoutActionsComponent);
|
|
|
23529
23567
|
import { useMemo as useMemo42 } from "react";
|
|
23530
23568
|
|
|
23531
23569
|
// src/components/LoadingSkeleton.tsx
|
|
23532
|
-
import { trussProps as trussProps102, maybeCssVar as
|
|
23570
|
+
import { trussProps as trussProps102, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
|
|
23533
23571
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
23534
23572
|
function LoadingSkeleton({
|
|
23535
23573
|
rows = 1,
|
|
@@ -23546,7 +23584,7 @@ function LoadingSkeleton({
|
|
|
23546
23584
|
borderRadius: "br4",
|
|
23547
23585
|
animation: "animation_pulse_2s_cubic_bezier_0_4_0_0_6_1_infinite",
|
|
23548
23586
|
flexGrow: ["flexGrow_var", {
|
|
23549
|
-
"--flexGrow":
|
|
23587
|
+
"--flexGrow": maybeCssVar50(flexGrowForCell)
|
|
23550
23588
|
}],
|
|
23551
23589
|
backgroundColor: ["bgColor_var", {
|
|
23552
23590
|
"--backgroundColor": "var(--b-loader-fill)"
|
|
@@ -23605,10 +23643,10 @@ function LoadingTable(props) {
|
|
|
23605
23643
|
}
|
|
23606
23644
|
|
|
23607
23645
|
// src/components/Layout/GridTableLayout/usePersistedTableView.ts
|
|
23608
|
-
import { useCallback as
|
|
23646
|
+
import { useCallback as useCallback32, useState as useState48 } from "react";
|
|
23609
23647
|
function usePersistedTableView(defaultView, persist) {
|
|
23610
23648
|
const storageKey = persist ? getGridTableViewStorageKey(window.location.pathname) : void 0;
|
|
23611
|
-
const [view, setView] =
|
|
23649
|
+
const [view, setView] = useState48(() => {
|
|
23612
23650
|
if (!storageKey) return defaultView;
|
|
23613
23651
|
try {
|
|
23614
23652
|
return parseStoredTableView(localStorage.getItem(storageKey)) ?? defaultView;
|
|
@@ -23616,7 +23654,7 @@ function usePersistedTableView(defaultView, persist) {
|
|
|
23616
23654
|
return defaultView;
|
|
23617
23655
|
}
|
|
23618
23656
|
});
|
|
23619
|
-
const setViewAndPersist =
|
|
23657
|
+
const setViewAndPersist = useCallback32(
|
|
23620
23658
|
(next) => {
|
|
23621
23659
|
setView(next);
|
|
23622
23660
|
if (storageKey) {
|
|
@@ -23638,7 +23676,7 @@ function parseStoredTableView(raw) {
|
|
|
23638
23676
|
}
|
|
23639
23677
|
|
|
23640
23678
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
23641
|
-
import { trussProps as trussProps103, maybeCssVar as
|
|
23679
|
+
import { trussProps as trussProps103, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
|
|
23642
23680
|
import { Fragment as Fragment40, jsx as jsx184, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
23643
23681
|
var __maybeInc23 = (inc) => {
|
|
23644
23682
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -23668,8 +23706,8 @@ function GridTableLayoutComponent(props) {
|
|
|
23668
23706
|
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView || actionMenu);
|
|
23669
23707
|
const isVirtualized = tableProps.as === "virtual" || view === "card";
|
|
23670
23708
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
23671
|
-
const tableActionsRef =
|
|
23672
|
-
const tableWrapperRef =
|
|
23709
|
+
const tableActionsRef = useRef55(null);
|
|
23710
|
+
const tableWrapperRef = useRef55(null);
|
|
23673
23711
|
useSetTableActionsHeight(tableWrapperRef, tableActionsRef, inDocumentScrollLayout && showTableActions);
|
|
23674
23712
|
const visibleColumnIds = useComputed(() => api.getVisibleColumnIds(), [api]);
|
|
23675
23713
|
useEffect29(() => {
|
|
@@ -23681,8 +23719,8 @@ function GridTableLayoutComponent(props) {
|
|
|
23681
23719
|
const filterSearchProps = useMemo43(() => layoutState?.search ? {
|
|
23682
23720
|
onSearch: layoutState.setSearchString
|
|
23683
23721
|
} : void 0, [layoutState?.search, layoutState?.setSearchString]);
|
|
23684
|
-
const searchApiRef =
|
|
23685
|
-
const clearFilters =
|
|
23722
|
+
const searchApiRef = useRef55();
|
|
23723
|
+
const clearFilters = useCallback33(() => {
|
|
23686
23724
|
layoutState?.clearFilters();
|
|
23687
23725
|
searchApiRef.current?.clear();
|
|
23688
23726
|
}, [layoutState]);
|
|
@@ -23701,16 +23739,16 @@ function GridTableLayoutComponent(props) {
|
|
|
23701
23739
|
transition: "transitionTop",
|
|
23702
23740
|
position: "sticky",
|
|
23703
23741
|
top: ["top_var", {
|
|
23704
|
-
"--top":
|
|
23742
|
+
"--top": maybeCssVar51(__maybeInc23(stickyNavAndHeaderOffset()))
|
|
23705
23743
|
}],
|
|
23706
23744
|
left: ["left_var", {
|
|
23707
|
-
"--left":
|
|
23745
|
+
"--left": maybeCssVar51(__maybeInc23(documentScrollChromeLeft()))
|
|
23708
23746
|
}],
|
|
23709
23747
|
width: ["w_var", {
|
|
23710
|
-
"--width":
|
|
23748
|
+
"--width": maybeCssVar51(__maybeInc23(`min(100%, ${documentScrollChromeWidth()})`))
|
|
23711
23749
|
}],
|
|
23712
23750
|
zIndex: ["z_var", {
|
|
23713
|
-
"--zIndex":
|
|
23751
|
+
"--zIndex": maybeCssVar51(zIndices.tableActions)
|
|
23714
23752
|
}],
|
|
23715
23753
|
backgroundColor: ["bgColor_var", {
|
|
23716
23754
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -23752,11 +23790,11 @@ function useGridTableLayoutState({
|
|
|
23752
23790
|
const groupBy = useGroupBy(maybeGroupBy ?? {
|
|
23753
23791
|
none: "none"
|
|
23754
23792
|
});
|
|
23755
|
-
const [searchString, setSearchString] =
|
|
23793
|
+
const [searchString, setSearchString] = useState49("");
|
|
23756
23794
|
const columnsFallback = "unset-columns";
|
|
23757
23795
|
const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(persistedColumns?.storageKey ?? columnsFallback, void 0);
|
|
23758
23796
|
const filteringActive = getActiveFilterCount(filter) > 0 || !!searchString;
|
|
23759
|
-
const clearFilters =
|
|
23797
|
+
const clearFilters = useCallback33(() => {
|
|
23760
23798
|
setFilter({});
|
|
23761
23799
|
setSearchString("");
|
|
23762
23800
|
}, [setFilter]);
|
|
@@ -23787,7 +23825,7 @@ function composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFi
|
|
|
23787
23825
|
};
|
|
23788
23826
|
}
|
|
23789
23827
|
function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|
|
23790
|
-
const syncHeightVar =
|
|
23828
|
+
const syncHeightVar = useCallback33(() => {
|
|
23791
23829
|
const tableWrapper = tableWrapperRef.current;
|
|
23792
23830
|
if (!tableWrapper) return;
|
|
23793
23831
|
if (!enabled) {
|
|
@@ -23801,11 +23839,11 @@ function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|
|
|
23801
23839
|
tableWrapper.style.removeProperty(beamTableActionsHeightVar);
|
|
23802
23840
|
}
|
|
23803
23841
|
}, [enabled, tableActionsRef, tableWrapperRef]);
|
|
23804
|
-
|
|
23842
|
+
useResizeObserver7({
|
|
23805
23843
|
ref: tableActionsRef,
|
|
23806
23844
|
onResize: enabled ? syncHeightVar : noop
|
|
23807
23845
|
});
|
|
23808
|
-
|
|
23846
|
+
useLayoutEffect9(() => {
|
|
23809
23847
|
syncHeightVar();
|
|
23810
23848
|
const tableWrapper = tableWrapperRef.current;
|
|
23811
23849
|
return () => {
|
|
@@ -23846,7 +23884,7 @@ function PreventBrowserScroll({
|
|
|
23846
23884
|
// src/components/Layout/RightPaneLayout/RightPaneLayout.tsx
|
|
23847
23885
|
import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
|
|
23848
23886
|
import { useEffect as useEffect30 } from "react";
|
|
23849
|
-
import { trussProps as trussProps104, maybeCssVar as
|
|
23887
|
+
import { trussProps as trussProps104, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
|
|
23850
23888
|
import { Fragment as Fragment41, jsx as jsx186, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
23851
23889
|
var __maybeInc24 = (inc) => {
|
|
23852
23890
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -23869,7 +23907,7 @@ function RightPaneLayout(props) {
|
|
|
23869
23907
|
/* @__PURE__ */ jsx186("div", { ...trussProps104({
|
|
23870
23908
|
...{
|
|
23871
23909
|
width: ["w_var", {
|
|
23872
|
-
"--width":
|
|
23910
|
+
"--width": maybeCssVar52(__maybeInc24(`calc(100% - ${paneWidth + 24}px)`))
|
|
23873
23911
|
}],
|
|
23874
23912
|
transition: "transition_width_2s_linear",
|
|
23875
23913
|
height: "h100",
|
|
@@ -23885,7 +23923,7 @@ function RightPaneLayout(props) {
|
|
|
23885
23923
|
...{
|
|
23886
23924
|
...!!defaultPaneContent ? {
|
|
23887
23925
|
width: ["w_var", {
|
|
23888
|
-
"--width":
|
|
23926
|
+
"--width": maybeCssVar52(__maybeInc24(`calc(100% - ${paneWidth + 24}px)`))
|
|
23889
23927
|
}],
|
|
23890
23928
|
marginRight: "mr3"
|
|
23891
23929
|
} : {}
|
|
@@ -23919,7 +23957,7 @@ function RightPaneLayout(props) {
|
|
|
23919
23957
|
"data-testid": "rightPaneContent",
|
|
23920
23958
|
...trussProps104({
|
|
23921
23959
|
backgroundColor: ["bgColor_var", {
|
|
23922
|
-
"--backgroundColor":
|
|
23960
|
+
"--backgroundColor": maybeCssVar52(paneBgColor)
|
|
23923
23961
|
}],
|
|
23924
23962
|
height: "h100",
|
|
23925
23963
|
width: ["w_var", {
|
|
@@ -23976,7 +24014,7 @@ function ScrollableFooter(props) {
|
|
|
23976
24014
|
|
|
23977
24015
|
// src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
|
|
23978
24016
|
import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
|
|
23979
|
-
import { useEffect as useEffect31, useState as
|
|
24017
|
+
import { useEffect as useEffect31, useState as useState50 } from "react";
|
|
23980
24018
|
|
|
23981
24019
|
// src/components/Layout/TableReviewLayout/SidePanel.tsx
|
|
23982
24020
|
import { jsx as jsx188, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
@@ -24000,7 +24038,7 @@ function SidePanel(props) {
|
|
|
24000
24038
|
}
|
|
24001
24039
|
|
|
24002
24040
|
// src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
|
|
24003
|
-
import { trussProps as trussProps105, maybeCssVar as
|
|
24041
|
+
import { trussProps as trussProps105, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
|
|
24004
24042
|
import { jsx as jsx189, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
24005
24043
|
var defaultRightPaneWidth = 450;
|
|
24006
24044
|
function TableReviewLayout(props) {
|
|
@@ -24016,7 +24054,7 @@ function TableReviewLayout(props) {
|
|
|
24016
24054
|
rightPaneWidth = defaultRightPaneWidth
|
|
24017
24055
|
} = props;
|
|
24018
24056
|
const tid = useTestIds(props, "tableReviewLayout");
|
|
24019
|
-
const [isPanelVisible, setIsPanelVisible] =
|
|
24057
|
+
const [isPanelVisible, setIsPanelVisible] = useState50(!!panelContent);
|
|
24020
24058
|
useEffect31(() => {
|
|
24021
24059
|
setIsPanelVisible(!!panelContent);
|
|
24022
24060
|
}, [panelContent]);
|
|
@@ -24049,7 +24087,7 @@ function TableReviewLayout(props) {
|
|
|
24049
24087
|
left: "left0",
|
|
24050
24088
|
right: "right0",
|
|
24051
24089
|
zIndex: ["z_var", {
|
|
24052
|
-
"--zIndex":
|
|
24090
|
+
"--zIndex": maybeCssVar53(zIndices.pageOverlay)
|
|
24053
24091
|
}],
|
|
24054
24092
|
backgroundColor: ["bgColor_var", {
|
|
24055
24093
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -24144,7 +24182,7 @@ var BeamContext = createContext12({
|
|
|
24144
24182
|
});
|
|
24145
24183
|
function BeamProvider({ children, documentTitleConfig, ...presentationProps }) {
|
|
24146
24184
|
const [, tick] = useReducer((prev) => prev + 1, 0);
|
|
24147
|
-
const modalRef =
|
|
24185
|
+
const modalRef = useRef56();
|
|
24148
24186
|
const modalHeaderDiv = useMemo44(() => document.createElement("div"), []);
|
|
24149
24187
|
const modalBannerDiv = useMemo44(() => document.createElement("div"), []);
|
|
24150
24188
|
const modalBodyDiv = useMemo44(() => {
|
|
@@ -24152,11 +24190,11 @@ function BeamProvider({ children, documentTitleConfig, ...presentationProps }) {
|
|
|
24152
24190
|
el.style.height = "100%";
|
|
24153
24191
|
return el;
|
|
24154
24192
|
}, []);
|
|
24155
|
-
const modalCanCloseChecksRef =
|
|
24193
|
+
const modalCanCloseChecksRef = useRef56([]);
|
|
24156
24194
|
const modalFooterDiv = useMemo44(() => document.createElement("div"), []);
|
|
24157
|
-
const drawerContentStackRef =
|
|
24158
|
-
const drawerCanCloseChecks =
|
|
24159
|
-
const drawerCanCloseDetailsChecks =
|
|
24195
|
+
const drawerContentStackRef = useRef56([]);
|
|
24196
|
+
const drawerCanCloseChecks = useRef56([]);
|
|
24197
|
+
const drawerCanCloseDetailsChecks = useRef56([]);
|
|
24160
24198
|
const sdHeaderDiv = useMemo44(() => document.createElement("div"), []);
|
|
24161
24199
|
const context = useMemo44(() => {
|
|
24162
24200
|
return {
|
|
@@ -24201,7 +24239,7 @@ function useBeamContext() {
|
|
|
24201
24239
|
}
|
|
24202
24240
|
|
|
24203
24241
|
// src/components/Breadcrumbs.tsx
|
|
24204
|
-
import { Fragment as Fragment43, useState as
|
|
24242
|
+
import { Fragment as Fragment43, useState as useState51 } from "react";
|
|
24205
24243
|
import { Link as Link6 } from "react-router-dom";
|
|
24206
24244
|
import { trussProps as trussProps106 } from "@homebound/truss/runtime";
|
|
24207
24245
|
import { Fragment as Fragment44, jsx as jsx191, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
@@ -24210,7 +24248,7 @@ function Breadcrumbs({
|
|
|
24210
24248
|
}) {
|
|
24211
24249
|
const tid = useTestIds({}, "breadcrumb");
|
|
24212
24250
|
const items = Array.isArray(breadcrumbs) ? breadcrumbs : [breadcrumbs];
|
|
24213
|
-
const [collapsed, setCollapsed] =
|
|
24251
|
+
const [collapsed, setCollapsed] = useState51(true);
|
|
24214
24252
|
const {
|
|
24215
24253
|
sm
|
|
24216
24254
|
} = useBreakpoint();
|
|
@@ -24249,14 +24287,14 @@ function Breadcrumbs({
|
|
|
24249
24287
|
}
|
|
24250
24288
|
|
|
24251
24289
|
// src/components/ButtonDatePicker.tsx
|
|
24252
|
-
import { useRef as
|
|
24290
|
+
import { useRef as useRef57 } from "react";
|
|
24253
24291
|
import { useMenuTrigger as useMenuTrigger4 } from "react-aria";
|
|
24254
24292
|
import { useMenuTriggerState as useMenuTriggerState4 } from "react-stately";
|
|
24255
24293
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
24256
24294
|
function ButtonDatePicker(props) {
|
|
24257
24295
|
const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
|
|
24258
24296
|
const state = useMenuTriggerState4({ isOpen: defaultOpen });
|
|
24259
|
-
const buttonRef =
|
|
24297
|
+
const buttonRef = useRef57(null);
|
|
24260
24298
|
const {
|
|
24261
24299
|
menuTriggerProps,
|
|
24262
24300
|
menuProps: { autoFocus: _af, ...menuProps }
|
|
@@ -24279,7 +24317,7 @@ function ButtonDatePicker(props) {
|
|
|
24279
24317
|
}
|
|
24280
24318
|
|
|
24281
24319
|
// src/components/ButtonGroup.tsx
|
|
24282
|
-
import { useRef as
|
|
24320
|
+
import { useRef as useRef58 } from "react";
|
|
24283
24321
|
import { useButton as useButton10, useFocusRing as useFocusRing15, useHover as useHover17 } from "react-aria";
|
|
24284
24322
|
import { trussProps as trussProps107 } from "@homebound/truss/runtime";
|
|
24285
24323
|
import { jsx as jsx193, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
@@ -24327,7 +24365,7 @@ function GroupButton(props) {
|
|
|
24327
24365
|
isDisabled: !!disabled,
|
|
24328
24366
|
...otherProps
|
|
24329
24367
|
};
|
|
24330
|
-
const ref =
|
|
24368
|
+
const ref = useRef58(null);
|
|
24331
24369
|
const {
|
|
24332
24370
|
buttonProps,
|
|
24333
24371
|
isPressed
|
|
@@ -24465,8 +24503,8 @@ import { useMemo as useMemo45 } from "react";
|
|
|
24465
24503
|
import { useHover as useHover18 } from "react-aria";
|
|
24466
24504
|
|
|
24467
24505
|
// src/components/Tag.tsx
|
|
24468
|
-
import { useResizeObserver as
|
|
24469
|
-
import { useRef as
|
|
24506
|
+
import { useResizeObserver as useResizeObserver8 } from "@react-aria/utils";
|
|
24507
|
+
import { useRef as useRef59, useState as useState52 } from "react";
|
|
24470
24508
|
import { trussProps as trussProps108 } from "@homebound/truss/runtime";
|
|
24471
24509
|
import { jsx as jsx194, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
24472
24510
|
function Tag(props) {
|
|
@@ -24488,9 +24526,9 @@ function Tag(props) {
|
|
|
24488
24526
|
padding
|
|
24489
24527
|
} = getVariantStyles(variant, type);
|
|
24490
24528
|
const tid = useTestIds(otherProps);
|
|
24491
|
-
const [showTooltip, setShowTooltip] =
|
|
24492
|
-
const ref =
|
|
24493
|
-
|
|
24529
|
+
const [showTooltip, setShowTooltip] = useState52(false);
|
|
24530
|
+
const ref = useRef59(null);
|
|
24531
|
+
useResizeObserver8({
|
|
24494
24532
|
ref,
|
|
24495
24533
|
onResize: () => {
|
|
24496
24534
|
if (!isIconOnly && ref.current) {
|
|
@@ -24608,7 +24646,7 @@ function getPrimaryStyles(type) {
|
|
|
24608
24646
|
}
|
|
24609
24647
|
|
|
24610
24648
|
// src/components/Card.tsx
|
|
24611
|
-
import { trussProps as trussProps109, maybeCssVar as
|
|
24649
|
+
import { trussProps as trussProps109, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
24612
24650
|
import { jsx as jsx195, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
24613
24651
|
function Card(props) {
|
|
24614
24652
|
const {
|
|
@@ -24669,7 +24707,7 @@ function Card(props) {
|
|
|
24669
24707
|
width: "w100",
|
|
24670
24708
|
height: "h100",
|
|
24671
24709
|
objectFit: ["objectFit_var", {
|
|
24672
|
-
"--objectFit":
|
|
24710
|
+
"--objectFit": maybeCssVar54(imageFit)
|
|
24673
24711
|
}]
|
|
24674
24712
|
}), src: imgSrc, alt: title, ...tid.img }) }),
|
|
24675
24713
|
isHovered && buttonMenuItems && /* @__PURE__ */ jsx195("div", { ...trussProps109({
|
|
@@ -25035,7 +25073,7 @@ function ResponsiveGridItem(props) {
|
|
|
25035
25073
|
|
|
25036
25074
|
// src/components/Grid/useResponsiveGrid.ts
|
|
25037
25075
|
import { useMemo as useMemo47 } from "react";
|
|
25038
|
-
import { maybeCssVar as
|
|
25076
|
+
import { maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
25039
25077
|
var __maybeInc25 = (inc) => {
|
|
25040
25078
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25041
25079
|
};
|
|
@@ -25054,11 +25092,11 @@ function useResponsiveGrid(props) {
|
|
|
25054
25092
|
return {
|
|
25055
25093
|
display: "dg",
|
|
25056
25094
|
gridTemplateColumns: ["gtc_var", {
|
|
25057
|
-
"--gridTemplateColumns":
|
|
25095
|
+
"--gridTemplateColumns": maybeCssVar55(gridTemplateColumns)
|
|
25058
25096
|
}],
|
|
25059
25097
|
containerType: "ctis",
|
|
25060
25098
|
gap: ["gap_var", {
|
|
25061
|
-
"--gap":
|
|
25099
|
+
"--gap": maybeCssVar55(__maybeInc25(gridGap))
|
|
25062
25100
|
}]
|
|
25063
25101
|
};
|
|
25064
25102
|
}, [minColumnWidth, gap, columns]);
|
|
@@ -25180,11 +25218,88 @@ function HbSpinnerProvider({
|
|
|
25180
25218
|
return /* @__PURE__ */ jsx200(HbLoadingSpinnerContext.Provider, { value: state, children });
|
|
25181
25219
|
}
|
|
25182
25220
|
|
|
25221
|
+
// src/components/InlineFeedbackBanner.tsx
|
|
25222
|
+
import { trussProps as trussProps113, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
|
|
25223
|
+
import { jsx as jsx201, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
25224
|
+
function InlineFeedbackBanner(props) {
|
|
25225
|
+
const {
|
|
25226
|
+
type,
|
|
25227
|
+
tagText,
|
|
25228
|
+
description,
|
|
25229
|
+
actions = []
|
|
25230
|
+
} = props;
|
|
25231
|
+
const {
|
|
25232
|
+
icon,
|
|
25233
|
+
tagType,
|
|
25234
|
+
borderColor,
|
|
25235
|
+
fallbackTagText
|
|
25236
|
+
} = typeStyles2[type];
|
|
25237
|
+
const tid = useTestIds(props, "inlineFeedbackBanner");
|
|
25238
|
+
const tagProps = tagText ? {
|
|
25239
|
+
type: tagType,
|
|
25240
|
+
icon,
|
|
25241
|
+
text: tagText
|
|
25242
|
+
} : {
|
|
25243
|
+
type: tagType,
|
|
25244
|
+
icon,
|
|
25245
|
+
text: fallbackTagText,
|
|
25246
|
+
iconOnly: true
|
|
25247
|
+
};
|
|
25248
|
+
return /* @__PURE__ */ jsxs100("div", { ...trussProps113({
|
|
25249
|
+
display: "df",
|
|
25250
|
+
alignItems: "ais",
|
|
25251
|
+
gap: "gap1",
|
|
25252
|
+
width: "w100",
|
|
25253
|
+
paddingTop: "pt1",
|
|
25254
|
+
paddingBottom: "pb1",
|
|
25255
|
+
paddingRight: "pr1",
|
|
25256
|
+
paddingLeft: "pl1",
|
|
25257
|
+
borderRadius: "br4",
|
|
25258
|
+
fontWeight: "fw4",
|
|
25259
|
+
fontSize: "fz_12px",
|
|
25260
|
+
lineHeight: "lh_16px",
|
|
25261
|
+
backgroundColor: ["bgColor_var", {
|
|
25262
|
+
"--backgroundColor": "var(--b-surface)"
|
|
25263
|
+
}],
|
|
25264
|
+
borderStyle: "bss",
|
|
25265
|
+
borderWidth: "bw1",
|
|
25266
|
+
borderColor: ["bc_var", {
|
|
25267
|
+
"--borderColor": maybeCssVar56(borderColor)
|
|
25268
|
+
}],
|
|
25269
|
+
boxShadow: "bshBasic"
|
|
25270
|
+
}), ...tid, children: [
|
|
25271
|
+
/* @__PURE__ */ jsx201("span", { className: "df fs0", children: /* @__PURE__ */ jsx201(Tag, { ...tagProps, ...tid.tag }) }),
|
|
25272
|
+
/* @__PURE__ */ jsx201("span", { ...trussProps113({
|
|
25273
|
+
flexGrow: "fg1",
|
|
25274
|
+
minWidth: "mw0",
|
|
25275
|
+
color: ["color_var", {
|
|
25276
|
+
"--color": "var(--b-on-surface)"
|
|
25277
|
+
}]
|
|
25278
|
+
}), ...tid.description, children: description }),
|
|
25279
|
+
actions.length > 0 && /* @__PURE__ */ jsx201("div", { className: "df aic gap_1_5 fs0", children: actions.map((action) => /* @__PURE__ */ jsx201(Button, { ...action, variant: "text" }, `${action.label}`)) })
|
|
25280
|
+
] });
|
|
25281
|
+
}
|
|
25282
|
+
var typeStyles2 = {
|
|
25283
|
+
error: {
|
|
25284
|
+
icon: "xCircle",
|
|
25285
|
+
tagType: "error",
|
|
25286
|
+
borderColor: "--b-danger" /* Danger */,
|
|
25287
|
+
fallbackTagText: "Error"
|
|
25288
|
+
},
|
|
25289
|
+
// Warning has no semantic border token
|
|
25290
|
+
warning: {
|
|
25291
|
+
icon: "error",
|
|
25292
|
+
tagType: "warning",
|
|
25293
|
+
borderColor: "rgba(194, 65, 12, 1)" /* Orange700 */,
|
|
25294
|
+
fallbackTagText: "Warning"
|
|
25295
|
+
}
|
|
25296
|
+
};
|
|
25297
|
+
|
|
25183
25298
|
// src/components/JumpLink.tsx
|
|
25184
|
-
import { useRef as
|
|
25299
|
+
import { useRef as useRef60 } from "react";
|
|
25185
25300
|
import { mergeProps as mergeProps30, useFocusRing as useFocusRing16, useHover as useHover19, useLink } from "react-aria";
|
|
25186
|
-
import { trussProps as
|
|
25187
|
-
import { jsx as
|
|
25301
|
+
import { trussProps as trussProps114 } from "@homebound/truss/runtime";
|
|
25302
|
+
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
25188
25303
|
function JumpLink(props) {
|
|
25189
25304
|
const {
|
|
25190
25305
|
label,
|
|
@@ -25194,7 +25309,7 @@ function JumpLink(props) {
|
|
|
25194
25309
|
__storyState,
|
|
25195
25310
|
...otherProps
|
|
25196
25311
|
} = props;
|
|
25197
|
-
const ref =
|
|
25312
|
+
const ref = useRef60(null);
|
|
25198
25313
|
const {
|
|
25199
25314
|
linkProps
|
|
25200
25315
|
} = useLink({
|
|
@@ -25226,14 +25341,14 @@ function JumpLink(props) {
|
|
|
25226
25341
|
});
|
|
25227
25342
|
}
|
|
25228
25343
|
}
|
|
25229
|
-
return /* @__PURE__ */
|
|
25344
|
+
return /* @__PURE__ */ jsx202("a", { ref, ...mergeProps30(linkProps, focusProps, hoverProps), ...tid, ...trussProps114({
|
|
25230
25345
|
...jumpLinkStyles.baseStyles,
|
|
25231
25346
|
...active && jumpLinkStyles.activeStyles,
|
|
25232
25347
|
...isHovered && !disabled && jumpLinkStyles.hoverStyles,
|
|
25233
25348
|
...isFocusVisible && jumpLinkStyles.focusStyles,
|
|
25234
25349
|
...disabled && jumpLinkStyles.disabledStyles,
|
|
25235
25350
|
...disabled && active && jumpLinkStyles.disabledActiveStyles
|
|
25236
|
-
}), children: /* @__PURE__ */
|
|
25351
|
+
}), children: /* @__PURE__ */ jsx202("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_2", children: label }) });
|
|
25237
25352
|
}
|
|
25238
25353
|
var jumpLinkStyles = {
|
|
25239
25354
|
baseStyles: {
|
|
@@ -25281,37 +25396,37 @@ var jumpLinkStyles = {
|
|
|
25281
25396
|
};
|
|
25282
25397
|
|
|
25283
25398
|
// src/components/MaxLines.tsx
|
|
25284
|
-
import { useLayoutEffect as
|
|
25285
|
-
import { useCallback as
|
|
25286
|
-
import { trussProps as
|
|
25287
|
-
import { jsx as
|
|
25399
|
+
import { useLayoutEffect as useLayoutEffect10, useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
25400
|
+
import { useCallback as useCallback34, useEffect as useEffect33, useRef as useRef61, useState as useState53 } from "react";
|
|
25401
|
+
import { trussProps as trussProps115, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
|
|
25402
|
+
import { jsx as jsx203, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
25288
25403
|
function MaxLines({
|
|
25289
25404
|
maxLines,
|
|
25290
25405
|
children
|
|
25291
25406
|
}) {
|
|
25292
|
-
const elRef =
|
|
25293
|
-
const [hasMore, setHasMore] =
|
|
25294
|
-
const [expanded, setExpanded] =
|
|
25295
|
-
|
|
25407
|
+
const elRef = useRef61(null);
|
|
25408
|
+
const [hasMore, setHasMore] = useState53(false);
|
|
25409
|
+
const [expanded, setExpanded] = useState53(false);
|
|
25410
|
+
useLayoutEffect10(() => {
|
|
25296
25411
|
if (!elRef.current) return;
|
|
25297
25412
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
25298
25413
|
}, []);
|
|
25299
25414
|
useEffect33(() => {
|
|
25300
25415
|
setExpanded(false);
|
|
25301
25416
|
}, [children]);
|
|
25302
|
-
const onResize =
|
|
25417
|
+
const onResize = useCallback34(() => {
|
|
25303
25418
|
if (!elRef.current) return;
|
|
25304
25419
|
!expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
25305
25420
|
}, [expanded]);
|
|
25306
|
-
|
|
25421
|
+
useResizeObserver9({
|
|
25307
25422
|
ref: elRef,
|
|
25308
25423
|
onResize
|
|
25309
25424
|
});
|
|
25310
|
-
return /* @__PURE__ */
|
|
25311
|
-
/* @__PURE__ */
|
|
25425
|
+
return /* @__PURE__ */ jsxs101("div", { children: [
|
|
25426
|
+
/* @__PURE__ */ jsx203("div", { ref: elRef, ...trussProps115({
|
|
25312
25427
|
...!expanded ? {
|
|
25313
25428
|
WebkitLineClamp: ["lineClamp_var", {
|
|
25314
|
-
"--WebkitLineClamp":
|
|
25429
|
+
"--WebkitLineClamp": maybeCssVar57(maxLines)
|
|
25315
25430
|
}],
|
|
25316
25431
|
overflow: "oh",
|
|
25317
25432
|
display: "d_negwebkit_box",
|
|
@@ -25319,7 +25434,7 @@ function MaxLines({
|
|
|
25319
25434
|
textOverflow: "to_ellipsis"
|
|
25320
25435
|
} : {}
|
|
25321
25436
|
}), children }),
|
|
25322
|
-
hasMore && /* @__PURE__ */
|
|
25437
|
+
hasMore && /* @__PURE__ */ jsx203("button", { className: "db fw4 fz_14px lh_20px", onClick: () => setExpanded((prev) => !prev), children: expanded ? "Show Less" : "Show More" })
|
|
25323
25438
|
] });
|
|
25324
25439
|
}
|
|
25325
25440
|
|
|
@@ -25327,15 +25442,15 @@ function MaxLines({
|
|
|
25327
25442
|
import { camelCase as camelCase6 } from "change-case";
|
|
25328
25443
|
|
|
25329
25444
|
// src/components/AppNav/AppNavGroup.tsx
|
|
25330
|
-
import { useResizeObserver as
|
|
25445
|
+
import { useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
|
|
25331
25446
|
import { camelCase as camelCase5, kebabCase } from "change-case";
|
|
25332
|
-
import { useCallback as
|
|
25447
|
+
import { useCallback as useCallback36, useEffect as useEffect34, useMemo as useMemo51, useState as useState55 } from "react";
|
|
25333
25448
|
|
|
25334
25449
|
// src/components/AppNav/AppNavGroupTrigger.tsx
|
|
25335
|
-
import { useMemo as useMemo50, useRef as
|
|
25450
|
+
import { useMemo as useMemo50, useRef as useRef62 } from "react";
|
|
25336
25451
|
import { mergeProps as mergeProps31, useButton as useButton11, useFocusRing as useFocusRing17, useHover as useHover20 } from "react-aria";
|
|
25337
|
-
import { trussProps as
|
|
25338
|
-
import { jsx as
|
|
25452
|
+
import { trussProps as trussProps116, mergeProps as mergeProps_14 } from "@homebound/truss/runtime";
|
|
25453
|
+
import { jsx as jsx204, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
25339
25454
|
function AppNavGroupTrigger(props) {
|
|
25340
25455
|
const {
|
|
25341
25456
|
label,
|
|
@@ -25345,7 +25460,7 @@ function AppNavGroupTrigger(props) {
|
|
|
25345
25460
|
active = false
|
|
25346
25461
|
} = props;
|
|
25347
25462
|
const tid = useTestIds(props, "trigger");
|
|
25348
|
-
const ref =
|
|
25463
|
+
const ref = useRef62(null);
|
|
25349
25464
|
const {
|
|
25350
25465
|
buttonProps,
|
|
25351
25466
|
isPressed
|
|
@@ -25367,7 +25482,7 @@ function AppNavGroupTrigger(props) {
|
|
|
25367
25482
|
hoverStyles: hoverStyles4,
|
|
25368
25483
|
pressedStyles: pressedStyles2
|
|
25369
25484
|
} = useMemo50(() => getNavLinkStyles("side"), []);
|
|
25370
|
-
return /* @__PURE__ */
|
|
25485
|
+
return /* @__PURE__ */ jsxs102("button", { type: "button", ...mergeProps31(buttonProps, focusProps, hoverProps, tid.trigger, {
|
|
25371
25486
|
ref,
|
|
25372
25487
|
"aria-expanded": expanded,
|
|
25373
25488
|
"aria-controls": navGroupId,
|
|
@@ -25385,7 +25500,7 @@ function AppNavGroupTrigger(props) {
|
|
|
25385
25500
|
})
|
|
25386
25501
|
}), children: [
|
|
25387
25502
|
label,
|
|
25388
|
-
/* @__PURE__ */
|
|
25503
|
+
/* @__PURE__ */ jsx204("div", { ...trussProps116({
|
|
25389
25504
|
...{
|
|
25390
25505
|
display: "df",
|
|
25391
25506
|
alignItems: "aic",
|
|
@@ -25395,7 +25510,7 @@ function AppNavGroupTrigger(props) {
|
|
|
25395
25510
|
...props.expanded ? {
|
|
25396
25511
|
transform: "transform_rotate_180deg"
|
|
25397
25512
|
} : {}
|
|
25398
|
-
}), children: /* @__PURE__ */
|
|
25513
|
+
}), children: /* @__PURE__ */ jsx204(Icon, { icon: "chevronDown" }) })
|
|
25399
25514
|
] });
|
|
25400
25515
|
}
|
|
25401
25516
|
|
|
@@ -25504,7 +25619,7 @@ function entryHasIcons(item) {
|
|
|
25504
25619
|
}
|
|
25505
25620
|
|
|
25506
25621
|
// src/components/AppNav/useAppNavGroupExpanded.ts
|
|
25507
|
-
import { useCallback as
|
|
25622
|
+
import { useCallback as useCallback35, useState as useState54 } from "react";
|
|
25508
25623
|
var APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY = "beam.appNav.expandedLinkGroups";
|
|
25509
25624
|
function loadStored() {
|
|
25510
25625
|
try {
|
|
@@ -25523,13 +25638,13 @@ function persistLabel(label, expanded) {
|
|
|
25523
25638
|
}
|
|
25524
25639
|
function useAppNavGroupExpanded(linkGroup) {
|
|
25525
25640
|
const { label } = linkGroup;
|
|
25526
|
-
const [userExpanded, setUserExpanded] =
|
|
25641
|
+
const [userExpanded, setUserExpanded] = useState54(() => {
|
|
25527
25642
|
const stored = loadStored();
|
|
25528
25643
|
return label in stored ? stored[label] : null;
|
|
25529
25644
|
});
|
|
25530
25645
|
const hasActiveLink = appNavLinkGroupLinks(linkGroup).some((l) => l.active);
|
|
25531
25646
|
const expanded = userExpanded !== null ? userExpanded : hasActiveLink ? true : linkGroup.defaultExpanded ?? false;
|
|
25532
|
-
const onToggle =
|
|
25647
|
+
const onToggle = useCallback35(() => {
|
|
25533
25648
|
const next = !expanded;
|
|
25534
25649
|
setUserExpanded(next);
|
|
25535
25650
|
persistLabel(label, next);
|
|
@@ -25538,8 +25653,8 @@ function useAppNavGroupExpanded(linkGroup) {
|
|
|
25538
25653
|
}
|
|
25539
25654
|
|
|
25540
25655
|
// src/components/AppNav/AppNavGroup.tsx
|
|
25541
|
-
import { trussProps as
|
|
25542
|
-
import { Fragment as Fragment45, jsx as
|
|
25656
|
+
import { trussProps as trussProps117, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
|
|
25657
|
+
import { Fragment as Fragment45, jsx as jsx205, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
25543
25658
|
var __maybeInc26 = (inc) => {
|
|
25544
25659
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25545
25660
|
};
|
|
@@ -25550,9 +25665,9 @@ function AppNavGroupView(props) {
|
|
|
25550
25665
|
} = props;
|
|
25551
25666
|
const tid = useTestIds(props, "linkGroup");
|
|
25552
25667
|
if (panelCollapsed) {
|
|
25553
|
-
return /* @__PURE__ */
|
|
25668
|
+
return /* @__PURE__ */ jsx205(Fragment45, { children: appNavLinkGroupLinks(linkGroup).map((link) => /* @__PURE__ */ jsx205(NavLink, { variant: "side", ...link, iconOnly: !!link.icon, ...tid[`link_${camelCase5(link.label)}`] }, link.label)) });
|
|
25554
25669
|
}
|
|
25555
|
-
return /* @__PURE__ */
|
|
25670
|
+
return /* @__PURE__ */ jsx205(AppNavGroupDisclosure, { ...props });
|
|
25556
25671
|
}
|
|
25557
25672
|
function AppNavGroupDisclosure(props) {
|
|
25558
25673
|
const {
|
|
@@ -25564,44 +25679,44 @@ function AppNavGroupDisclosure(props) {
|
|
|
25564
25679
|
} = useAppNavGroupExpanded(linkGroup);
|
|
25565
25680
|
const tid = useTestIds(props, "linkGroup");
|
|
25566
25681
|
const navGroupId = `nav-group-${kebabCase(linkGroup.label)}`;
|
|
25567
|
-
const [contentEl, setContentEl] =
|
|
25682
|
+
const [contentEl, setContentEl] = useState55(null);
|
|
25568
25683
|
const contentRef = useMemo51(() => ({
|
|
25569
25684
|
current: contentEl
|
|
25570
25685
|
}), [contentEl]);
|
|
25571
|
-
const [contentHeight, setContentHeight] =
|
|
25686
|
+
const [contentHeight, setContentHeight] = useState55(expanded ? "auto" : "0");
|
|
25572
25687
|
useEffect34(() => {
|
|
25573
25688
|
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
25574
25689
|
}, [expanded, contentEl]);
|
|
25575
|
-
const onResize =
|
|
25690
|
+
const onResize = useCallback36(() => {
|
|
25576
25691
|
if (contentEl && expanded) {
|
|
25577
25692
|
setContentHeight(`${contentEl.scrollHeight}px`);
|
|
25578
25693
|
}
|
|
25579
25694
|
}, [expanded, contentEl]);
|
|
25580
|
-
|
|
25695
|
+
useResizeObserver10({
|
|
25581
25696
|
ref: contentRef,
|
|
25582
25697
|
onResize
|
|
25583
25698
|
});
|
|
25584
|
-
return /* @__PURE__ */
|
|
25585
|
-
/* @__PURE__ */
|
|
25586
|
-
/* @__PURE__ */
|
|
25699
|
+
return /* @__PURE__ */ jsxs103("div", { className: "df fdc", ...tid, children: [
|
|
25700
|
+
/* @__PURE__ */ jsx205(AppNavGroupTrigger, { label: linkGroup.label, navGroupId, expanded, active: linkGroupHasActiveLink(linkGroup), onClick: onToggle, ...tid }),
|
|
25701
|
+
/* @__PURE__ */ jsx205("div", { id: navGroupId, role: "region", "aria-hidden": !expanded, ...trussProps117({
|
|
25587
25702
|
overflow: "oh",
|
|
25588
25703
|
transition: "transitionHeight",
|
|
25589
25704
|
height: ["h_var", {
|
|
25590
|
-
"--height":
|
|
25705
|
+
"--height": maybeCssVar58(__maybeInc26(contentHeight))
|
|
25591
25706
|
}]
|
|
25592
25707
|
}), ...tid.panel, ...!expanded ? {
|
|
25593
25708
|
inert: "true"
|
|
25594
|
-
} : {}, children: /* @__PURE__ */
|
|
25709
|
+
} : {}, children: /* @__PURE__ */ jsx205("div", { ref: setContentEl, className: "df fdc", children: /* @__PURE__ */ jsx205(AppNavItems, { items: linkGroup.items, panelCollapsed: false, nested: true, ...tid }) }) })
|
|
25595
25710
|
] });
|
|
25596
25711
|
}
|
|
25597
25712
|
|
|
25598
25713
|
// src/components/AppNav/AppNavGroupMenu.tsx
|
|
25599
|
-
import { jsx as
|
|
25714
|
+
import { jsx as jsx206 } from "react/jsx-runtime";
|
|
25600
25715
|
function AppNavGroupMenu({
|
|
25601
25716
|
linkGroup,
|
|
25602
25717
|
...tid
|
|
25603
25718
|
}) {
|
|
25604
|
-
return /* @__PURE__ */
|
|
25719
|
+
return /* @__PURE__ */ jsx206(
|
|
25605
25720
|
ButtonMenu,
|
|
25606
25721
|
{
|
|
25607
25722
|
trigger: {
|
|
@@ -25617,8 +25732,8 @@ function AppNavGroupMenu({
|
|
|
25617
25732
|
}
|
|
25618
25733
|
|
|
25619
25734
|
// src/components/AppNav/AppNavSectionView.tsx
|
|
25620
|
-
import { trussProps as
|
|
25621
|
-
import { jsx as
|
|
25735
|
+
import { trussProps as trussProps118 } from "@homebound/truss/runtime";
|
|
25736
|
+
import { jsx as jsx207, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
25622
25737
|
function AppNavSectionView(props) {
|
|
25623
25738
|
const {
|
|
25624
25739
|
section,
|
|
@@ -25644,7 +25759,7 @@ function AppNavSectionView(props) {
|
|
|
25644
25759
|
"--borderColor": "var(--b-surface-separator)"
|
|
25645
25760
|
}]
|
|
25646
25761
|
};
|
|
25647
|
-
return /* @__PURE__ */
|
|
25762
|
+
return /* @__PURE__ */ jsxs104("div", { ...trussProps118({
|
|
25648
25763
|
...{
|
|
25649
25764
|
display: "df",
|
|
25650
25765
|
flexDirection: "fdc",
|
|
@@ -25652,7 +25767,7 @@ function AppNavSectionView(props) {
|
|
|
25652
25767
|
},
|
|
25653
25768
|
...showDivider ? dividerStyles : {}
|
|
25654
25769
|
}), ...tid, children: [
|
|
25655
|
-
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */
|
|
25770
|
+
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */ jsx207("div", { ...trussProps118({
|
|
25656
25771
|
fontWeight: "fw6",
|
|
25657
25772
|
fontSize: "fz_10px",
|
|
25658
25773
|
lineHeight: "lh_14px",
|
|
@@ -25665,18 +25780,18 @@ function AppNavSectionView(props) {
|
|
|
25665
25780
|
paddingBottom: "pb1",
|
|
25666
25781
|
textTransform: "ttu"
|
|
25667
25782
|
}), ...tid.label, children: section.label }),
|
|
25668
|
-
/* @__PURE__ */
|
|
25783
|
+
/* @__PURE__ */ jsx207(AppNavItems, { ...scopeProps, items: section.items, variant, panelCollapsed, nested })
|
|
25669
25784
|
] });
|
|
25670
25785
|
}
|
|
25671
25786
|
|
|
25672
25787
|
// src/components/AppNav/AppNavItems.tsx
|
|
25673
|
-
import { Fragment as Fragment46, jsx as
|
|
25788
|
+
import { Fragment as Fragment46, jsx as jsx208 } from "react/jsx-runtime";
|
|
25674
25789
|
function AppNavItems(props) {
|
|
25675
25790
|
const { items, variant = "side", panelCollapsed = false, nested = false } = props;
|
|
25676
25791
|
const tid = useTestIds(props, "appNav");
|
|
25677
|
-
return /* @__PURE__ */
|
|
25792
|
+
return /* @__PURE__ */ jsx208(Fragment46, { children: items.map((item, idx) => {
|
|
25678
25793
|
if (isAppNavLink(item)) {
|
|
25679
|
-
return /* @__PURE__ */
|
|
25794
|
+
return /* @__PURE__ */ jsx208(
|
|
25680
25795
|
NavLink,
|
|
25681
25796
|
{
|
|
25682
25797
|
variant,
|
|
@@ -25689,7 +25804,7 @@ function AppNavItems(props) {
|
|
|
25689
25804
|
);
|
|
25690
25805
|
}
|
|
25691
25806
|
if (isAppNavGroup(item)) {
|
|
25692
|
-
return variant === "global" ? /* @__PURE__ */
|
|
25807
|
+
return variant === "global" ? /* @__PURE__ */ jsx208(AppNavGroupMenu, { linkGroup: item, ...tid.linkGroup }, appNavItemKey(item)) : /* @__PURE__ */ jsx208(
|
|
25693
25808
|
AppNavGroupView,
|
|
25694
25809
|
{
|
|
25695
25810
|
linkGroup: item,
|
|
@@ -25700,7 +25815,7 @@ function AppNavItems(props) {
|
|
|
25700
25815
|
);
|
|
25701
25816
|
}
|
|
25702
25817
|
if (isAppNavSection(item)) {
|
|
25703
|
-
return /* @__PURE__ */
|
|
25818
|
+
return /* @__PURE__ */ jsx208(
|
|
25704
25819
|
AppNavSectionView,
|
|
25705
25820
|
{
|
|
25706
25821
|
section: item,
|
|
@@ -25719,19 +25834,19 @@ function AppNavItems(props) {
|
|
|
25719
25834
|
|
|
25720
25835
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
25721
25836
|
import { AnimatePresence as AnimatePresence6, motion as motion6 } from "framer-motion";
|
|
25722
|
-
import { useEffect as useEffect35, useState as
|
|
25837
|
+
import { useEffect as useEffect35, useState as useState57 } from "react";
|
|
25723
25838
|
import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll3 } from "react-aria";
|
|
25724
25839
|
import { createPortal as createPortal7 } from "react-dom";
|
|
25725
25840
|
import { useLocation } from "react-router-dom";
|
|
25726
25841
|
|
|
25727
25842
|
// src/layouts/NavbarLayout/MobileSubNavContext.tsx
|
|
25728
|
-
import { createContext as createContext14, useContext as useContext26, useLayoutEffect as
|
|
25729
|
-
import { jsx as
|
|
25843
|
+
import { createContext as createContext14, useContext as useContext26, useLayoutEffect as useLayoutEffect11, useMemo as useMemo52, useState as useState56 } from "react";
|
|
25844
|
+
import { jsx as jsx209 } from "react/jsx-runtime";
|
|
25730
25845
|
var MobileSubNavContext = createContext14(void 0);
|
|
25731
25846
|
function MobileSubNavProvider(props) {
|
|
25732
|
-
const [mobileSubNav, setMobileSubNav] =
|
|
25847
|
+
const [mobileSubNav, setMobileSubNav] = useState56(null);
|
|
25733
25848
|
const value = useMemo52(() => ({ mobileSubNav, setMobileSubNav }), [mobileSubNav]);
|
|
25734
|
-
return /* @__PURE__ */
|
|
25849
|
+
return /* @__PURE__ */ jsx209(MobileSubNavContext.Provider, { value, children: props.children });
|
|
25735
25850
|
}
|
|
25736
25851
|
function useMobileSubNav() {
|
|
25737
25852
|
return useContext26(MobileSubNavContext)?.mobileSubNav ?? null;
|
|
@@ -25741,11 +25856,11 @@ function useRegisterMobileSubNav(content) {
|
|
|
25741
25856
|
const setMobileSubNav = ctx?.setMobileSubNav;
|
|
25742
25857
|
const enabled = !useBreakpoint().mdAndUp;
|
|
25743
25858
|
const { top, items, footer } = content;
|
|
25744
|
-
|
|
25859
|
+
useLayoutEffect11(() => {
|
|
25745
25860
|
if (!setMobileSubNav || !enabled) return;
|
|
25746
25861
|
setMobileSubNav({ top, items, footer });
|
|
25747
25862
|
}, [setMobileSubNav, enabled, top, items, footer]);
|
|
25748
|
-
|
|
25863
|
+
useLayoutEffect11(() => {
|
|
25749
25864
|
if (!setMobileSubNav || !enabled) return;
|
|
25750
25865
|
return () => setMobileSubNav(null);
|
|
25751
25866
|
}, [setMobileSubNav, enabled]);
|
|
@@ -25753,15 +25868,15 @@ function useRegisterMobileSubNav(content) {
|
|
|
25753
25868
|
}
|
|
25754
25869
|
|
|
25755
25870
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
25756
|
-
import { trussProps as
|
|
25757
|
-
import { Fragment as Fragment47, jsx as
|
|
25871
|
+
import { trussProps as trussProps119, mergeProps as mergeProps32, maybeCssVar as maybeCssVar59 } from "@homebound/truss/runtime";
|
|
25872
|
+
import { Fragment as Fragment47, jsx as jsx210, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
25758
25873
|
function NavbarMobileMenu(props) {
|
|
25759
25874
|
const {
|
|
25760
25875
|
items
|
|
25761
25876
|
} = props;
|
|
25762
25877
|
const tid = useTestIds(props, "navbar");
|
|
25763
|
-
const [isOpen, setIsOpen] =
|
|
25764
|
-
const [level, setLevel] =
|
|
25878
|
+
const [isOpen, setIsOpen] = useState57(false);
|
|
25879
|
+
const [level, setLevel] = useState57("sub");
|
|
25765
25880
|
const {
|
|
25766
25881
|
pathname,
|
|
25767
25882
|
search
|
|
@@ -25774,8 +25889,8 @@ function NavbarMobileMenu(props) {
|
|
|
25774
25889
|
useEffect35(() => {
|
|
25775
25890
|
close();
|
|
25776
25891
|
}, [pathname, search]);
|
|
25777
|
-
return /* @__PURE__ */
|
|
25778
|
-
/* @__PURE__ */
|
|
25892
|
+
return /* @__PURE__ */ jsxs105(Fragment47, { children: [
|
|
25893
|
+
/* @__PURE__ */ jsx210(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => {
|
|
25779
25894
|
if (isOpen) {
|
|
25780
25895
|
close();
|
|
25781
25896
|
return;
|
|
@@ -25785,7 +25900,7 @@ function NavbarMobileMenu(props) {
|
|
|
25785
25900
|
}, ...tid.mobileMenu }),
|
|
25786
25901
|
createPortal7(
|
|
25787
25902
|
/* AnimatePresence keeps the drawer mounted through its slide/fade-out before unmounting.*/
|
|
25788
|
-
/* @__PURE__ */
|
|
25903
|
+
/* @__PURE__ */ jsx210(AnimatePresence6, { children: isOpen && /* @__PURE__ */ jsx210(NavbarMobileDrawer, { items, mobileSubNav, level, onLevelChange: setLevel, onClose: close, tid }) }),
|
|
25789
25904
|
document.body
|
|
25790
25905
|
)
|
|
25791
25906
|
] });
|
|
@@ -25803,14 +25918,14 @@ function NavbarMobileDrawer({
|
|
|
25803
25918
|
top: bannerHeightPx
|
|
25804
25919
|
};
|
|
25805
25920
|
const showSubLevel = mobileSubNav != null && level === "sub";
|
|
25806
|
-
return /* @__PURE__ */
|
|
25807
|
-
/* @__PURE__ */
|
|
25921
|
+
return /* @__PURE__ */ jsxs105(Fragment47, { children: [
|
|
25922
|
+
/* @__PURE__ */ jsx210(motion6.div, { ...mergeProps32(void 0, overlayTopStyle, {
|
|
25808
25923
|
position: "fixed",
|
|
25809
25924
|
right: "right0",
|
|
25810
25925
|
bottom: "bottom0",
|
|
25811
25926
|
left: "left0",
|
|
25812
25927
|
zIndex: ["z_var", {
|
|
25813
|
-
"--zIndex":
|
|
25928
|
+
"--zIndex": maybeCssVar59(zIndices.navbarMobileMenuScrim)
|
|
25814
25929
|
}],
|
|
25815
25930
|
backgroundColor: ["bgColor_var", {
|
|
25816
25931
|
"--backgroundColor": "var(--b-scrim)"
|
|
@@ -25825,7 +25940,7 @@ function NavbarMobileDrawer({
|
|
|
25825
25940
|
ease: "linear",
|
|
25826
25941
|
duration: 0.2
|
|
25827
25942
|
}, onClick: onClose, ...tid.mobileMenuScrim }, "navbarMobileMenuScrim"),
|
|
25828
|
-
/* @__PURE__ */
|
|
25943
|
+
/* @__PURE__ */ jsx210(FocusScope5, { autoFocus: true, contain: true, restoreFocus: true, children: /* @__PURE__ */ jsxs105(motion6.aside, { role: "dialog", "aria-modal": "true", "aria-label": "Navigation", ...mergeProps32(void 0, overlayTopStyle, {
|
|
25829
25944
|
position: "fixed",
|
|
25830
25945
|
bottom: "bottom0",
|
|
25831
25946
|
left: "left0",
|
|
@@ -25835,7 +25950,7 @@ function NavbarMobileDrawer({
|
|
|
25835
25950
|
width: "w_260px",
|
|
25836
25951
|
overflow: "oh",
|
|
25837
25952
|
zIndex: ["z_var", {
|
|
25838
|
-
"--zIndex":
|
|
25953
|
+
"--zIndex": maybeCssVar59(zIndices.navbarMobileMenu)
|
|
25839
25954
|
}],
|
|
25840
25955
|
backgroundColor: ["bgColor_var", {
|
|
25841
25956
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -25850,7 +25965,7 @@ function NavbarMobileDrawer({
|
|
|
25850
25965
|
ease: "linear",
|
|
25851
25966
|
duration: 0.2
|
|
25852
25967
|
}, onClick: (e) => e.stopPropagation(), ...tid.mobileMenuDrawer, children: [
|
|
25853
|
-
/* @__PURE__ */
|
|
25968
|
+
/* @__PURE__ */ jsxs105("div", { ...trussProps119({
|
|
25854
25969
|
...{
|
|
25855
25970
|
display: "df",
|
|
25856
25971
|
alignItems: "aic",
|
|
@@ -25866,13 +25981,13 @@ function NavbarMobileDrawer({
|
|
|
25866
25981
|
},
|
|
25867
25982
|
...pageContentPaddingX
|
|
25868
25983
|
}), children: [
|
|
25869
|
-
/* @__PURE__ */
|
|
25870
|
-
/* @__PURE__ */
|
|
25984
|
+
/* @__PURE__ */ jsx210("div", { className: "mw0", children: showSubLevel && /* @__PURE__ */ jsx210(Button, { label: "Main Menu", icon: "chevronLeft", variant: "quaternary", size: "sm", onClick: () => onLevelChange("global"), ...tid.mobileMenuMainMenu }) }),
|
|
25985
|
+
/* @__PURE__ */ jsx210(IconButton, { icon: "x", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: "Close navigation", onClick: onClose, ...tid.mobileMenuClose })
|
|
25871
25986
|
] }),
|
|
25872
|
-
/* @__PURE__ */
|
|
25987
|
+
/* @__PURE__ */ jsx210("div", { className: "fg1 mh0 oh relative", children: /* @__PURE__ */ jsx210(AnimatePresence6, { initial: false, children: /* @__PURE__ */ jsxs105(
|
|
25873
25988
|
motion6.nav,
|
|
25874
25989
|
{
|
|
25875
|
-
...
|
|
25990
|
+
...trussProps119({
|
|
25876
25991
|
...{
|
|
25877
25992
|
position: "absolute",
|
|
25878
25993
|
top: "top0",
|
|
@@ -25909,7 +26024,7 @@ function NavbarMobileDrawer({
|
|
|
25909
26024
|
...tid.mobileMenuPanel,
|
|
25910
26025
|
children: [
|
|
25911
26026
|
showSubLevel && mobileSubNav?.top,
|
|
25912
|
-
/* @__PURE__ */
|
|
26027
|
+
/* @__PURE__ */ jsx210(AppNavItems, { items: showSubLevel && mobileSubNav ? mobileSubNav.items : items, panelCollapsed: false, ...tid }),
|
|
25913
26028
|
showSubLevel && mobileSubNav?.footer
|
|
25914
26029
|
]
|
|
25915
26030
|
},
|
|
@@ -25920,8 +26035,8 @@ function NavbarMobileDrawer({
|
|
|
25920
26035
|
}
|
|
25921
26036
|
|
|
25922
26037
|
// src/components/Navbar/Navbar.tsx
|
|
25923
|
-
import { trussProps as
|
|
25924
|
-
import { jsx as
|
|
26038
|
+
import { trussProps as trussProps120 } from "@homebound/truss/runtime";
|
|
26039
|
+
import { jsx as jsx211, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
25925
26040
|
function Navbar(props) {
|
|
25926
26041
|
const {
|
|
25927
26042
|
brand,
|
|
@@ -25940,7 +26055,7 @@ function Navbar(props) {
|
|
|
25940
26055
|
overflows
|
|
25941
26056
|
} = useContentOverflow(!sm);
|
|
25942
26057
|
const showMobile = sm || overflows;
|
|
25943
|
-
return /* @__PURE__ */
|
|
26058
|
+
return /* @__PURE__ */ jsx211(ContrastScope, { children: /* @__PURE__ */ jsxs106("nav", { ...trussProps120({
|
|
25944
26059
|
...{
|
|
25945
26060
|
backgroundColor: ["bgColor_var", {
|
|
25946
26061
|
"--backgroundColor": "var(--b-surface-raised)"
|
|
@@ -25956,10 +26071,10 @@ function Navbar(props) {
|
|
|
25956
26071
|
},
|
|
25957
26072
|
...headerContentPaddingX(showMobile)
|
|
25958
26073
|
}), ...tid, children: [
|
|
25959
|
-
/* @__PURE__ */
|
|
25960
|
-
/* @__PURE__ */
|
|
25961
|
-
showMobile && /* @__PURE__ */
|
|
25962
|
-
/* @__PURE__ */
|
|
26074
|
+
/* @__PURE__ */ jsxs106("div", { className: "df aic gap3 fg1 mw0", children: [
|
|
26075
|
+
/* @__PURE__ */ jsxs106("div", { className: "df aic fs0 gap2", children: [
|
|
26076
|
+
showMobile && /* @__PURE__ */ jsx211(NavbarMobileMenu, { items, ...tid }),
|
|
26077
|
+
/* @__PURE__ */ jsx211("div", { ...trussProps120({
|
|
25963
26078
|
flexShrink: "fs0",
|
|
25964
26079
|
...hideBrandOnMobile && showMobile ? {
|
|
25965
26080
|
display: "dn"
|
|
@@ -25968,7 +26083,7 @@ function Navbar(props) {
|
|
|
25968
26083
|
] }),
|
|
25969
26084
|
!sm && // Stays mounted while overflowing (hidden) so the items remain measurable and the bar
|
|
25970
26085
|
// can expand again as space frees up.
|
|
25971
|
-
/* @__PURE__ */
|
|
26086
|
+
/* @__PURE__ */ jsx211("div", { ref: containerRef, ...trussProps120({
|
|
25972
26087
|
display: "df",
|
|
25973
26088
|
alignItems: "aic",
|
|
25974
26089
|
flexGrow: "fg1",
|
|
@@ -25977,11 +26092,11 @@ function Navbar(props) {
|
|
|
25977
26092
|
...overflows ? {
|
|
25978
26093
|
visibility: "visibility_hidden"
|
|
25979
26094
|
} : {}
|
|
25980
|
-
}), ...tid.items, children: /* @__PURE__ */
|
|
26095
|
+
}), ...tid.items, children: /* @__PURE__ */ jsx211("div", { ref: contentRef, className: "df aic gap2 width_max_content", children: /* @__PURE__ */ jsx211(AppNavItems, { variant: "global", items, ...tid }) }) })
|
|
25981
26096
|
] }),
|
|
25982
|
-
/* @__PURE__ */
|
|
25983
|
-
rightSlot && /* @__PURE__ */
|
|
25984
|
-
user && /* @__PURE__ */
|
|
26097
|
+
/* @__PURE__ */ jsxs106("div", { className: "df aic gap1", children: [
|
|
26098
|
+
rightSlot && /* @__PURE__ */ jsx211("div", { className: "df aic gap1", ...tid.rightSlot, children: rightSlot }),
|
|
26099
|
+
user && /* @__PURE__ */ jsx211(NavbarUserMenu, { user, ...tid.userMenu })
|
|
25985
26100
|
] })
|
|
25986
26101
|
] }) });
|
|
25987
26102
|
}
|
|
@@ -25989,7 +26104,7 @@ function NavbarUserMenu({
|
|
|
25989
26104
|
user,
|
|
25990
26105
|
...tid
|
|
25991
26106
|
}) {
|
|
25992
|
-
return /* @__PURE__ */
|
|
26107
|
+
return /* @__PURE__ */ jsx211("div", { className: "df aic fs0 ml1", children: /* @__PURE__ */ jsx211(ButtonMenu, { items: user.menuItems, persistentItems: user.persistentItems, trigger: {
|
|
25993
26108
|
src: user.picture,
|
|
25994
26109
|
name: user.name,
|
|
25995
26110
|
size: "sm",
|
|
@@ -25998,8 +26113,8 @@ function NavbarUserMenu({
|
|
|
25998
26113
|
}
|
|
25999
26114
|
|
|
26000
26115
|
// src/components/Pagination.tsx
|
|
26001
|
-
import { trussProps as
|
|
26002
|
-
import { jsx as
|
|
26116
|
+
import { trussProps as trussProps121 } from "@homebound/truss/runtime";
|
|
26117
|
+
import { jsx as jsx212, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
26003
26118
|
var defaultPage = {
|
|
26004
26119
|
offset: 0,
|
|
26005
26120
|
limit: 100
|
|
@@ -26031,7 +26146,7 @@ function Pagination(props) {
|
|
|
26031
26146
|
}
|
|
26032
26147
|
}
|
|
26033
26148
|
const tid = useTestIds(props, "pagination");
|
|
26034
|
-
return /* @__PURE__ */
|
|
26149
|
+
return /* @__PURE__ */ jsxs107("div", { ...trussProps121({
|
|
26035
26150
|
display: "df",
|
|
26036
26151
|
borderColor: ["bc_var", {
|
|
26037
26152
|
"--borderColor": "var(--b-surface-separator)"
|
|
@@ -26048,24 +26163,24 @@ function Pagination(props) {
|
|
|
26048
26163
|
paddingRight: "pr2",
|
|
26049
26164
|
paddingTop: "pt2"
|
|
26050
26165
|
}), ...tid, children: [
|
|
26051
|
-
/* @__PURE__ */
|
|
26052
|
-
/* @__PURE__ */
|
|
26166
|
+
/* @__PURE__ */ jsx212("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
26167
|
+
/* @__PURE__ */ jsx212("div", { className: "w_78px", children: /* @__PURE__ */ jsx212(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
26053
26168
|
pageNumber: 1,
|
|
26054
26169
|
pageSize: val
|
|
26055
26170
|
}), autoSort: false, ...tid.pageSize }) }),
|
|
26056
|
-
/* @__PURE__ */
|
|
26057
|
-
/* @__PURE__ */
|
|
26171
|
+
/* @__PURE__ */ jsxs107("div", { className: "mla mta mba df", children: [
|
|
26172
|
+
/* @__PURE__ */ jsxs107("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
|
|
26058
26173
|
first,
|
|
26059
26174
|
" ",
|
|
26060
26175
|
showLast ? `- ${last}` : "",
|
|
26061
26176
|
" of ",
|
|
26062
26177
|
totalCount
|
|
26063
26178
|
] }),
|
|
26064
|
-
/* @__PURE__ */
|
|
26179
|
+
/* @__PURE__ */ jsx212(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
26065
26180
|
pageNumber: pageNumber - 1,
|
|
26066
26181
|
pageSize
|
|
26067
26182
|
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
26068
|
-
/* @__PURE__ */
|
|
26183
|
+
/* @__PURE__ */ jsx212(IconButton, { icon: "chevronRight", color: hasNextPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
26069
26184
|
pageNumber: pageNumber + 1,
|
|
26070
26185
|
pageSize
|
|
26071
26186
|
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
@@ -26087,10 +26202,10 @@ function toPageNumberSize(page) {
|
|
|
26087
26202
|
}
|
|
26088
26203
|
|
|
26089
26204
|
// src/components/ScrollShadows.tsx
|
|
26090
|
-
import { useResizeObserver as
|
|
26091
|
-
import { useCallback as
|
|
26092
|
-
import { trussProps as
|
|
26093
|
-
import { jsx as
|
|
26205
|
+
import { useResizeObserver as useResizeObserver11 } from "@react-aria/utils";
|
|
26206
|
+
import { useCallback as useCallback37, useMemo as useMemo53, useRef as useRef63, useState as useState58 } from "react";
|
|
26207
|
+
import { trussProps as trussProps122, maybeCssVar as maybeCssVar60 } from "@homebound/truss/runtime";
|
|
26208
|
+
import { jsx as jsx213, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
26094
26209
|
function ScrollShadows(props) {
|
|
26095
26210
|
const {
|
|
26096
26211
|
children,
|
|
@@ -26106,15 +26221,15 @@ function ScrollShadows(props) {
|
|
|
26106
26221
|
if (!bgColor.includes("rgba")) {
|
|
26107
26222
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
26108
26223
|
}
|
|
26109
|
-
const [showStartShadow, setShowStartShadow] =
|
|
26110
|
-
const [showEndShadow, setShowEndShadow] =
|
|
26111
|
-
const scrollRef =
|
|
26224
|
+
const [showStartShadow, setShowStartShadow] = useState58(false);
|
|
26225
|
+
const [showEndShadow, setShowEndShadow] = useState58(false);
|
|
26226
|
+
const scrollRef = useRef63(null);
|
|
26112
26227
|
const [startShadowStyles, endShadowStyles] = useMemo53(() => {
|
|
26113
26228
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
26114
26229
|
const commonStyles = {
|
|
26115
26230
|
position: "absolute",
|
|
26116
26231
|
zIndex: ["z_var", {
|
|
26117
|
-
"--zIndex":
|
|
26232
|
+
"--zIndex": maybeCssVar60(zIndices.scrollShadow)
|
|
26118
26233
|
}],
|
|
26119
26234
|
pointerEvents: "pointerEvents_none"
|
|
26120
26235
|
};
|
|
@@ -26147,7 +26262,7 @@ function ScrollShadows(props) {
|
|
|
26147
26262
|
...startShadowStyles2,
|
|
26148
26263
|
...{
|
|
26149
26264
|
background: ["background_var", {
|
|
26150
|
-
"--background":
|
|
26265
|
+
"--background": maybeCssVar60(startGradient)
|
|
26151
26266
|
}]
|
|
26152
26267
|
}
|
|
26153
26268
|
}, {
|
|
@@ -26155,12 +26270,12 @@ function ScrollShadows(props) {
|
|
|
26155
26270
|
...endShadowStyles2,
|
|
26156
26271
|
...{
|
|
26157
26272
|
background: ["background_var", {
|
|
26158
|
-
"--background":
|
|
26273
|
+
"--background": maybeCssVar60(endGradient)
|
|
26159
26274
|
}]
|
|
26160
26275
|
}
|
|
26161
26276
|
}];
|
|
26162
26277
|
}, [horizontal, bgColor]);
|
|
26163
|
-
const updateScrollProps =
|
|
26278
|
+
const updateScrollProps = useCallback37((el) => {
|
|
26164
26279
|
const {
|
|
26165
26280
|
scrollTop,
|
|
26166
26281
|
scrollHeight,
|
|
@@ -26175,15 +26290,15 @@ function ScrollShadows(props) {
|
|
|
26175
26290
|
setShowStartShadow(start > 0);
|
|
26176
26291
|
setShowEndShadow(start + boxSize < end);
|
|
26177
26292
|
}, [horizontal]);
|
|
26178
|
-
const onResize =
|
|
26179
|
-
|
|
26293
|
+
const onResize = useCallback37(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
26294
|
+
useResizeObserver11({
|
|
26180
26295
|
ref: scrollRef,
|
|
26181
26296
|
onResize
|
|
26182
26297
|
});
|
|
26183
|
-
return /* @__PURE__ */
|
|
26298
|
+
return /* @__PURE__ */ jsxs108("div", { ...trussProps122({
|
|
26184
26299
|
display: "df",
|
|
26185
26300
|
flexDirection: ["fd_var", {
|
|
26186
|
-
"--flexDirection":
|
|
26301
|
+
"--flexDirection": maybeCssVar60(!horizontal ? "column" : "row")
|
|
26187
26302
|
}],
|
|
26188
26303
|
position: "relative",
|
|
26189
26304
|
overflow: "oh",
|
|
@@ -26196,23 +26311,23 @@ function ScrollShadows(props) {
|
|
|
26196
26311
|
width: width2
|
|
26197
26312
|
}
|
|
26198
26313
|
}), ...tid, children: [
|
|
26199
|
-
/* @__PURE__ */
|
|
26314
|
+
/* @__PURE__ */ jsx213("div", { ...trussProps122({
|
|
26200
26315
|
...startShadowStyles,
|
|
26201
26316
|
...{
|
|
26202
26317
|
opacity: ["o_var", {
|
|
26203
|
-
"--opacity":
|
|
26318
|
+
"--opacity": maybeCssVar60(showStartShadow ? 1 : 0)
|
|
26204
26319
|
}]
|
|
26205
26320
|
}
|
|
26206
26321
|
}), "data-chromatic": "ignore" }),
|
|
26207
|
-
/* @__PURE__ */
|
|
26322
|
+
/* @__PURE__ */ jsx213("div", { ...trussProps122({
|
|
26208
26323
|
...endShadowStyles,
|
|
26209
26324
|
...{
|
|
26210
26325
|
opacity: ["o_var", {
|
|
26211
|
-
"--opacity":
|
|
26326
|
+
"--opacity": maybeCssVar60(showEndShadow ? 1 : 0)
|
|
26212
26327
|
}]
|
|
26213
26328
|
}
|
|
26214
26329
|
}), "data-chromatic": "ignore" }),
|
|
26215
|
-
/* @__PURE__ */
|
|
26330
|
+
/* @__PURE__ */ jsx213("div", { ...trussProps122({
|
|
26216
26331
|
...xss,
|
|
26217
26332
|
...{
|
|
26218
26333
|
overflow: "oa",
|
|
@@ -26226,14 +26341,14 @@ function ScrollShadows(props) {
|
|
|
26226
26341
|
// src/layouts/SideNavLayout/SideNavLayoutContext.tsx
|
|
26227
26342
|
import {
|
|
26228
26343
|
createContext as createContext15,
|
|
26229
|
-
useCallback as
|
|
26344
|
+
useCallback as useCallback38,
|
|
26230
26345
|
useContext as useContext27,
|
|
26231
26346
|
useEffect as useEffect36,
|
|
26232
26347
|
useMemo as useMemo54,
|
|
26233
|
-
useRef as
|
|
26234
|
-
useState as
|
|
26348
|
+
useRef as useRef64,
|
|
26349
|
+
useState as useState59
|
|
26235
26350
|
} from "react";
|
|
26236
|
-
import { jsx as
|
|
26351
|
+
import { jsx as jsx214 } from "react/jsx-runtime";
|
|
26237
26352
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
26238
26353
|
function loadStoredNavState() {
|
|
26239
26354
|
try {
|
|
@@ -26257,18 +26372,18 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
26257
26372
|
}
|
|
26258
26373
|
var SideNavLayoutContext = createContext15(void 0);
|
|
26259
26374
|
function SideNavLayoutProvider(props) {
|
|
26260
|
-
const [navState, setNavStateInternal] =
|
|
26375
|
+
const [navState, setNavStateInternal] = useState59(
|
|
26261
26376
|
() => resolveInitialNavState(props.defaultNavState)
|
|
26262
26377
|
);
|
|
26263
26378
|
const bp = useBreakpoint();
|
|
26264
|
-
const prevMdAndUp =
|
|
26379
|
+
const prevMdAndUp = useRef64(bp.mdAndUp);
|
|
26265
26380
|
useEffect36(() => {
|
|
26266
26381
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
26267
26382
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
26268
26383
|
}
|
|
26269
26384
|
prevMdAndUp.current = bp.mdAndUp;
|
|
26270
26385
|
}, [bp.mdAndUp]);
|
|
26271
|
-
const setNavState =
|
|
26386
|
+
const setNavState = useCallback38((value2) => {
|
|
26272
26387
|
setNavStateInternal((prev) => {
|
|
26273
26388
|
const next = typeof value2 === "function" ? value2(prev) : value2;
|
|
26274
26389
|
if (next === "expanded" || next === "collapse") {
|
|
@@ -26281,7 +26396,7 @@ function SideNavLayoutProvider(props) {
|
|
|
26281
26396
|
});
|
|
26282
26397
|
}, []);
|
|
26283
26398
|
const value = useMemo54(() => ({ navState, setNavState }), [navState, setNavState]);
|
|
26284
|
-
return /* @__PURE__ */
|
|
26399
|
+
return /* @__PURE__ */ jsx214(SideNavLayoutContext.Provider, { value, children: props.children });
|
|
26285
26400
|
}
|
|
26286
26401
|
function useSideNavLayoutContext() {
|
|
26287
26402
|
return useContext27(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
@@ -26292,8 +26407,8 @@ function useHasSideNavLayoutProvider() {
|
|
|
26292
26407
|
}
|
|
26293
26408
|
|
|
26294
26409
|
// src/components/SideNav/SideNav.tsx
|
|
26295
|
-
import { trussProps as
|
|
26296
|
-
import { jsx as
|
|
26410
|
+
import { trussProps as trussProps123 } from "@homebound/truss/runtime";
|
|
26411
|
+
import { jsx as jsx215, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
26297
26412
|
function SideNav(props) {
|
|
26298
26413
|
const {
|
|
26299
26414
|
top,
|
|
@@ -26306,8 +26421,8 @@ function SideNav(props) {
|
|
|
26306
26421
|
const tid = useTestIds(props, "sideNav");
|
|
26307
26422
|
const panelCollapsed = navState === "collapse";
|
|
26308
26423
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
26309
|
-
return /* @__PURE__ */
|
|
26310
|
-
top !== void 0 && /* @__PURE__ */
|
|
26424
|
+
return /* @__PURE__ */ jsxs109("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
26425
|
+
top !== void 0 && /* @__PURE__ */ jsx215("div", { ...trussProps123({
|
|
26311
26426
|
flexShrink: "fs0",
|
|
26312
26427
|
paddingLeft: "pl2",
|
|
26313
26428
|
paddingRight: "pr2",
|
|
@@ -26318,7 +26433,7 @@ function SideNav(props) {
|
|
|
26318
26433
|
paddingBottom: "pb4"
|
|
26319
26434
|
} : {}
|
|
26320
26435
|
}), ...tid.top, children: top }),
|
|
26321
|
-
/* @__PURE__ */
|
|
26436
|
+
/* @__PURE__ */ jsx215("div", { ...trussProps123({
|
|
26322
26437
|
flexGrow: "fg1",
|
|
26323
26438
|
overflowY: "oya",
|
|
26324
26439
|
display: "df",
|
|
@@ -26330,8 +26445,8 @@ function SideNav(props) {
|
|
|
26330
26445
|
...top === void 0 ? {
|
|
26331
26446
|
paddingTop: "pt5"
|
|
26332
26447
|
} : {}
|
|
26333
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */
|
|
26334
|
-
footer !== void 0 && /* @__PURE__ */
|
|
26448
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx215(AppNavItems, { items, panelCollapsed }) }),
|
|
26449
|
+
footer !== void 0 && /* @__PURE__ */ jsx215("div", { ...trussProps123({
|
|
26335
26450
|
flexShrink: "fs0",
|
|
26336
26451
|
paddingLeft: "pl2",
|
|
26337
26452
|
paddingRight: "pr2",
|
|
@@ -26347,10 +26462,10 @@ function SideNav(props) {
|
|
|
26347
26462
|
}
|
|
26348
26463
|
|
|
26349
26464
|
// src/components/Snackbar/useSnackbar.tsx
|
|
26350
|
-
import { useCallback as
|
|
26465
|
+
import { useCallback as useCallback39, useEffect as useEffect37 } from "react";
|
|
26351
26466
|
function useSnackbar() {
|
|
26352
26467
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
26353
|
-
const onClose =
|
|
26468
|
+
const onClose = useCallback39(
|
|
26354
26469
|
(noticeId) => {
|
|
26355
26470
|
setNotices((prev) => {
|
|
26356
26471
|
let returnValue = prev;
|
|
@@ -26367,7 +26482,7 @@ function useSnackbar() {
|
|
|
26367
26482
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26368
26483
|
[]
|
|
26369
26484
|
);
|
|
26370
|
-
const triggerNotice =
|
|
26485
|
+
const triggerNotice = useCallback39(
|
|
26371
26486
|
(props) => {
|
|
26372
26487
|
const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
|
|
26373
26488
|
let maybeTimeout;
|
|
@@ -26396,7 +26511,7 @@ function useSnackbar() {
|
|
|
26396
26511
|
},
|
|
26397
26512
|
[onClose, setNotices]
|
|
26398
26513
|
);
|
|
26399
|
-
const closeNotice =
|
|
26514
|
+
const closeNotice = useCallback39((id) => onClose(id), [onClose]);
|
|
26400
26515
|
const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
|
|
26401
26516
|
setOffset({ bottom });
|
|
26402
26517
|
return () => setOffset({});
|
|
@@ -26406,10 +26521,10 @@ function useSnackbar() {
|
|
|
26406
26521
|
var snackbarId = 1;
|
|
26407
26522
|
|
|
26408
26523
|
// src/components/Stepper.tsx
|
|
26409
|
-
import { useRef as
|
|
26524
|
+
import { useRef as useRef65 } from "react";
|
|
26410
26525
|
import { useButton as useButton12, useFocusRing as useFocusRing18, useHover as useHover21 } from "react-aria";
|
|
26411
|
-
import { trussProps as
|
|
26412
|
-
import { jsx as
|
|
26526
|
+
import { trussProps as trussProps124, maybeCssVar as maybeCssVar61 } from "@homebound/truss/runtime";
|
|
26527
|
+
import { jsx as jsx216, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
26413
26528
|
import { createElement as createElement6 } from "react";
|
|
26414
26529
|
var __maybeInc27 = (inc) => {
|
|
26415
26530
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -26428,8 +26543,8 @@ function Stepper(props) {
|
|
|
26428
26543
|
const maxStepWidth = 200;
|
|
26429
26544
|
const minStepWidth = 100;
|
|
26430
26545
|
const gap = 8;
|
|
26431
|
-
return /* @__PURE__ */
|
|
26432
|
-
/* @__PURE__ */
|
|
26546
|
+
return /* @__PURE__ */ jsxs110("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
26547
|
+
/* @__PURE__ */ jsx216("ol", { ...trussProps124({
|
|
26433
26548
|
padding: "p_0",
|
|
26434
26549
|
margin: "m_0",
|
|
26435
26550
|
listStyle: "lis_none",
|
|
@@ -26439,7 +26554,7 @@ function Stepper(props) {
|
|
|
26439
26554
|
}]
|
|
26440
26555
|
}), children: steps.map((step) => {
|
|
26441
26556
|
const isCurrent = currentStep === step.value;
|
|
26442
|
-
return /* @__PURE__ */ createElement6("li", { ...
|
|
26557
|
+
return /* @__PURE__ */ createElement6("li", { ...trussProps124({
|
|
26443
26558
|
display: "df",
|
|
26444
26559
|
flexGrow: "fg1",
|
|
26445
26560
|
flexDirection: "fdc",
|
|
@@ -26449,9 +26564,9 @@ function Stepper(props) {
|
|
|
26449
26564
|
minWidth: ["mw_var", {
|
|
26450
26565
|
"--minWidth": `${minStepWidth}px`
|
|
26451
26566
|
}]
|
|
26452
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
26567
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx216(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
26453
26568
|
}) }),
|
|
26454
|
-
/* @__PURE__ */
|
|
26569
|
+
/* @__PURE__ */ jsx216("div", { ...trussProps124({
|
|
26455
26570
|
marginTop: "mt1",
|
|
26456
26571
|
backgroundColor: ["bgColor_var", {
|
|
26457
26572
|
"--backgroundColor": "var(--b-field-border-default)"
|
|
@@ -26464,14 +26579,14 @@ function Stepper(props) {
|
|
|
26464
26579
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
26465
26580
|
}],
|
|
26466
26581
|
width: "w100"
|
|
26467
|
-
}), children: /* @__PURE__ */
|
|
26582
|
+
}), children: /* @__PURE__ */ jsx216("div", { ...trussProps124({
|
|
26468
26583
|
backgroundColor: ["bgColor_var", {
|
|
26469
26584
|
"--backgroundColor": "var(--b-primary)"
|
|
26470
26585
|
}],
|
|
26471
26586
|
transition: "transition_width_200ms",
|
|
26472
26587
|
height: "h100",
|
|
26473
26588
|
width: ["w_var", {
|
|
26474
|
-
"--width":
|
|
26589
|
+
"--width": maybeCssVar61(__maybeInc27(`${(lastCompletedStep + 1) / steps.length * 100}%`))
|
|
26475
26590
|
}]
|
|
26476
26591
|
}) }) })
|
|
26477
26592
|
] });
|
|
@@ -26488,7 +26603,7 @@ function StepButton(props) {
|
|
|
26488
26603
|
onPress: onClick,
|
|
26489
26604
|
isDisabled: disabled
|
|
26490
26605
|
};
|
|
26491
|
-
const ref =
|
|
26606
|
+
const ref = useRef65(null);
|
|
26492
26607
|
const {
|
|
26493
26608
|
buttonProps,
|
|
26494
26609
|
isPressed
|
|
@@ -26507,7 +26622,7 @@ function StepButton(props) {
|
|
|
26507
26622
|
boxShadow: "bshFocus"
|
|
26508
26623
|
};
|
|
26509
26624
|
const tid = useTestIds(props, "stepButton");
|
|
26510
|
-
return /* @__PURE__ */
|
|
26625
|
+
return /* @__PURE__ */ jsxs110("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps124({
|
|
26511
26626
|
...{
|
|
26512
26627
|
fontWeight: "fw6",
|
|
26513
26628
|
fontSize: "fz_14px",
|
|
@@ -26568,7 +26683,7 @@ function StepButton(props) {
|
|
|
26568
26683
|
} : {},
|
|
26569
26684
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
26570
26685
|
}), ...tid[defaultTestId(label)], children: [
|
|
26571
|
-
/* @__PURE__ */
|
|
26686
|
+
/* @__PURE__ */ jsx216("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx216(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
26572
26687
|
label
|
|
26573
26688
|
] });
|
|
26574
26689
|
}
|
|
@@ -26579,12 +26694,12 @@ function StepIcon({
|
|
|
26579
26694
|
isCurrent = false
|
|
26580
26695
|
}) {
|
|
26581
26696
|
if (state === "error") {
|
|
26582
|
-
return /* @__PURE__ */
|
|
26697
|
+
return /* @__PURE__ */ jsx216(Icon, { icon: "errorCircle" });
|
|
26583
26698
|
}
|
|
26584
26699
|
if (state === "complete") {
|
|
26585
|
-
return /* @__PURE__ */
|
|
26700
|
+
return /* @__PURE__ */ jsx216(Icon, { icon: "check" });
|
|
26586
26701
|
}
|
|
26587
|
-
return /* @__PURE__ */
|
|
26702
|
+
return /* @__PURE__ */ jsx216("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx216("div", { ...trussProps124({
|
|
26588
26703
|
width: "w_10px",
|
|
26589
26704
|
height: "h_10px",
|
|
26590
26705
|
borderStyle: "bss",
|
|
@@ -26598,10 +26713,10 @@ function StepIcon({
|
|
|
26598
26713
|
}
|
|
26599
26714
|
|
|
26600
26715
|
// src/components/StepperTabs/StepperTab.tsx
|
|
26601
|
-
import { useRef as
|
|
26716
|
+
import { useRef as useRef66 } from "react";
|
|
26602
26717
|
import { mergeProps as mergeProps33, useButton as useButton13, useFocusRing as useFocusRing19, useHover as useHover22, VisuallyHidden as VisuallyHidden10 } from "react-aria";
|
|
26603
|
-
import { trussProps as
|
|
26604
|
-
import { Fragment as Fragment48, jsx as
|
|
26718
|
+
import { trussProps as trussProps125 } from "@homebound/truss/runtime";
|
|
26719
|
+
import { Fragment as Fragment48, jsx as jsx217, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
26605
26720
|
function StepperTab(props) {
|
|
26606
26721
|
const {
|
|
26607
26722
|
label,
|
|
@@ -26617,7 +26732,7 @@ function StepperTab(props) {
|
|
|
26617
26732
|
onPress: () => onClick(value),
|
|
26618
26733
|
isDisabled: disabled || collapsed
|
|
26619
26734
|
};
|
|
26620
|
-
const ref =
|
|
26735
|
+
const ref = useRef66(null);
|
|
26621
26736
|
const {
|
|
26622
26737
|
buttonProps
|
|
26623
26738
|
} = useButton13(ariaProps, ref);
|
|
@@ -26632,7 +26747,7 @@ function StepperTab(props) {
|
|
|
26632
26747
|
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
26633
26748
|
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
26634
26749
|
const tid = useTestIds(props, "stepperTab");
|
|
26635
|
-
return /* @__PURE__ */
|
|
26750
|
+
return /* @__PURE__ */ jsxs111("button", { ref, ...mergeProps33(buttonProps, focusProps, hoverProps), "aria-label": label, ...trussProps125({
|
|
26636
26751
|
...stepperTabStyles.baseStyles,
|
|
26637
26752
|
...getStateStyles(active, completed),
|
|
26638
26753
|
...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
|
|
@@ -26640,10 +26755,10 @@ function StepperTab(props) {
|
|
|
26640
26755
|
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
26641
26756
|
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
26642
26757
|
}), ...tid[defaultTestId(value)], children: [
|
|
26643
|
-
!collapsed && /* @__PURE__ */
|
|
26644
|
-
/* @__PURE__ */
|
|
26645
|
-
/* @__PURE__ */
|
|
26646
|
-
/* @__PURE__ */
|
|
26758
|
+
!collapsed && /* @__PURE__ */ jsxs111(Fragment48, { children: [
|
|
26759
|
+
/* @__PURE__ */ jsxs111("span", { className: "dg jic mw0", children: [
|
|
26760
|
+
/* @__PURE__ */ jsx217("span", { className: "fw6 fz_14px lh_20px visibility_hidden gridArea_1_1 oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1 wordBreak_break_all", "aria-hidden": true, children: label }),
|
|
26761
|
+
/* @__PURE__ */ jsx217("span", { ...trussProps125({
|
|
26647
26762
|
gridArea: "gridArea_1_1",
|
|
26648
26763
|
overflow: "oh",
|
|
26649
26764
|
display: "d_negwebkit_box",
|
|
@@ -26658,7 +26773,7 @@ function StepperTab(props) {
|
|
|
26658
26773
|
} : {}
|
|
26659
26774
|
}), children: label })
|
|
26660
26775
|
] }),
|
|
26661
|
-
/* @__PURE__ */
|
|
26776
|
+
/* @__PURE__ */ jsx217("span", { ...trussProps125({
|
|
26662
26777
|
flexShrink: "fs0",
|
|
26663
26778
|
marginLeft: "ml1",
|
|
26664
26779
|
transition: "transitionAll",
|
|
@@ -26668,10 +26783,10 @@ function StepperTab(props) {
|
|
|
26668
26783
|
opacity: "o100",
|
|
26669
26784
|
transform: "transform_scale_1_translateY_0"
|
|
26670
26785
|
} : {}
|
|
26671
|
-
}), children: /* @__PURE__ */
|
|
26786
|
+
}), children: /* @__PURE__ */ jsx217(Icon, { icon: "check", inc: 2.5, ...tid.check }) })
|
|
26672
26787
|
] }),
|
|
26673
|
-
/* @__PURE__ */
|
|
26674
|
-
/* @__PURE__ */
|
|
26788
|
+
/* @__PURE__ */ jsx217("span", { "aria-hidden": true, ...trussProps125(getIndicatorStyles(active, completed, disabled)), ...tid.indicator }),
|
|
26789
|
+
/* @__PURE__ */ jsx217(VisuallyHidden10, { children: completed ? "Complete" : "Not Complete" })
|
|
26675
26790
|
] });
|
|
26676
26791
|
}
|
|
26677
26792
|
function getStateStyles(active, completed) {
|
|
@@ -26752,8 +26867,8 @@ var stepperTabStyles = {
|
|
|
26752
26867
|
};
|
|
26753
26868
|
|
|
26754
26869
|
// src/components/StepperTabs/StepperTabs.tsx
|
|
26755
|
-
import { trussProps as
|
|
26756
|
-
import { jsx as
|
|
26870
|
+
import { trussProps as trussProps126 } from "@homebound/truss/runtime";
|
|
26871
|
+
import { jsx as jsx218 } from "react/jsx-runtime";
|
|
26757
26872
|
import { createElement as createElement7 } from "react";
|
|
26758
26873
|
function StepperTabs(props) {
|
|
26759
26874
|
const {
|
|
@@ -26769,7 +26884,7 @@ function StepperTabs(props) {
|
|
|
26769
26884
|
const collapsed = isMobile || !!forceCollapsed;
|
|
26770
26885
|
const capWidth = steps.length <= 3;
|
|
26771
26886
|
const currentStepIndex = Math.max(0, steps.findIndex((step) => step.value === currentStep));
|
|
26772
|
-
return /* @__PURE__ */
|
|
26887
|
+
return /* @__PURE__ */ jsx218("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ jsx218("ol", { ...trussProps126({
|
|
26773
26888
|
padding: "p_0",
|
|
26774
26889
|
margin: "m_0",
|
|
26775
26890
|
listStyle: "lis_none",
|
|
@@ -26784,7 +26899,7 @@ function StepperTabs(props) {
|
|
|
26784
26899
|
}), children: steps.map((step, idx) => {
|
|
26785
26900
|
const isCurrent = idx === currentStepIndex;
|
|
26786
26901
|
const isCompleted = idx < currentStepIndex;
|
|
26787
|
-
return /* @__PURE__ */ createElement7("li", { ...
|
|
26902
|
+
return /* @__PURE__ */ createElement7("li", { ...trussProps126({
|
|
26788
26903
|
display: "df",
|
|
26789
26904
|
flexGrow: "fg1",
|
|
26790
26905
|
flexBasis: "fb_0",
|
|
@@ -26796,7 +26911,7 @@ function StepperTabs(props) {
|
|
|
26796
26911
|
"--maxWidth": `${maxStepWidthPx}px`
|
|
26797
26912
|
}]
|
|
26798
26913
|
} : {}
|
|
26799
|
-
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
26914
|
+
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx218(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: isCompleted, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
|
|
26800
26915
|
}) }) });
|
|
26801
26916
|
}
|
|
26802
26917
|
var maxStepWidthPx = 280;
|
|
@@ -26804,8 +26919,8 @@ var gapPx = 6;
|
|
|
26804
26919
|
|
|
26805
26920
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
26806
26921
|
import { createPortal as createPortal8 } from "react-dom";
|
|
26807
|
-
import { trussProps as
|
|
26808
|
-
import { jsx as
|
|
26922
|
+
import { trussProps as trussProps127 } from "@homebound/truss/runtime";
|
|
26923
|
+
import { jsx as jsx219, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
26809
26924
|
function SuperDrawerHeader(props) {
|
|
26810
26925
|
const {
|
|
26811
26926
|
hideControls
|
|
@@ -26822,20 +26937,20 @@ function SuperDrawerHeader(props) {
|
|
|
26822
26937
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
26823
26938
|
const isDetail = currentContent !== firstContent;
|
|
26824
26939
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
26825
|
-
return createPortal8(/* @__PURE__ */
|
|
26826
|
-
isStructuredProps(props) ? /* @__PURE__ */
|
|
26827
|
-
/* @__PURE__ */
|
|
26828
|
-
/* @__PURE__ */
|
|
26940
|
+
return createPortal8(/* @__PURE__ */ jsxs112("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
26941
|
+
isStructuredProps(props) ? /* @__PURE__ */ jsxs112("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
26942
|
+
/* @__PURE__ */ jsxs112("div", { className: "fg1 df aic gap2", children: [
|
|
26943
|
+
/* @__PURE__ */ jsx219("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
26829
26944
|
props.left
|
|
26830
26945
|
] }),
|
|
26831
|
-
props.right && /* @__PURE__ */
|
|
26832
|
-
] }) : /* @__PURE__ */
|
|
26833
|
-
!hideControls && /* @__PURE__ */
|
|
26946
|
+
props.right && /* @__PURE__ */ jsx219("div", { className: "fs0", children: props.right })
|
|
26947
|
+
] }) : /* @__PURE__ */ jsx219("div", { className: "fg1", children: props.children }),
|
|
26948
|
+
!hideControls && /* @__PURE__ */ jsx219("div", { ...trussProps127({
|
|
26834
26949
|
flexShrink: "fs0",
|
|
26835
26950
|
...isDetail ? {
|
|
26836
26951
|
visibility: "vh"
|
|
26837
26952
|
} : {}
|
|
26838
|
-
}), children: /* @__PURE__ */
|
|
26953
|
+
}), children: /* @__PURE__ */ jsx219(ButtonGroup, { buttons: [{
|
|
26839
26954
|
icon: "chevronLeft",
|
|
26840
26955
|
onClick: () => onPrevClick && onPrevClick(),
|
|
26841
26956
|
disabled: !onPrevClick
|
|
@@ -26855,7 +26970,7 @@ import { motion as motion7 } from "framer-motion";
|
|
|
26855
26970
|
|
|
26856
26971
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
26857
26972
|
import { useMemo as useMemo55 } from "react";
|
|
26858
|
-
import { jsx as
|
|
26973
|
+
import { jsx as jsx220 } from "react/jsx-runtime";
|
|
26859
26974
|
function useSuperDrawer() {
|
|
26860
26975
|
const {
|
|
26861
26976
|
drawerContentStack: contentStack,
|
|
@@ -26867,7 +26982,7 @@ function useSuperDrawer() {
|
|
|
26867
26982
|
function canCloseDrawerDetails(i, doChange) {
|
|
26868
26983
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
26869
26984
|
if (!canClose(canCloseDrawerDetail)) {
|
|
26870
|
-
openModal({ content: /* @__PURE__ */
|
|
26985
|
+
openModal({ content: /* @__PURE__ */ jsx220(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
26871
26986
|
return false;
|
|
26872
26987
|
}
|
|
26873
26988
|
}
|
|
@@ -26887,7 +27002,7 @@ function useSuperDrawer() {
|
|
|
26887
27002
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
26888
27003
|
if (!canClose(canCloseDrawer)) {
|
|
26889
27004
|
openModal({
|
|
26890
|
-
content: /* @__PURE__ */
|
|
27005
|
+
content: /* @__PURE__ */ jsx220(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
26891
27006
|
});
|
|
26892
27007
|
return;
|
|
26893
27008
|
}
|
|
@@ -26982,8 +27097,8 @@ function canClose(canCloseCheck) {
|
|
|
26982
27097
|
}
|
|
26983
27098
|
|
|
26984
27099
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
26985
|
-
import { trussProps as
|
|
26986
|
-
import { Fragment as Fragment49, jsx as
|
|
27100
|
+
import { trussProps as trussProps128, mergeProps as mergeProps34 } from "@homebound/truss/runtime";
|
|
27101
|
+
import { Fragment as Fragment49, jsx as jsx221, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
26987
27102
|
var SuperDrawerContent = ({
|
|
26988
27103
|
children,
|
|
26989
27104
|
banner,
|
|
@@ -27004,20 +27119,20 @@ var SuperDrawerContent = ({
|
|
|
27004
27119
|
} = firstContent ?? {};
|
|
27005
27120
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
27006
27121
|
if (kind === "open") {
|
|
27007
|
-
return /* @__PURE__ */
|
|
27008
|
-
banner && /* @__PURE__ */
|
|
27122
|
+
return /* @__PURE__ */ jsxs113(motion7.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: [
|
|
27123
|
+
banner && /* @__PURE__ */ jsx221("div", { className: "ml_neg3 mr_neg3 mt_neg3 mb3", children: banner }),
|
|
27009
27124
|
children2
|
|
27010
27125
|
] }, "content");
|
|
27011
27126
|
} else if (kind === "detail") {
|
|
27012
|
-
return /* @__PURE__ */
|
|
27127
|
+
return /* @__PURE__ */ jsxs113(motion7.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
27013
27128
|
overflow: "auto"
|
|
27014
27129
|
}, transition: {
|
|
27015
27130
|
overflow: {
|
|
27016
27131
|
delay: 0.3
|
|
27017
27132
|
}
|
|
27018
27133
|
}, children: [
|
|
27019
|
-
/* @__PURE__ */
|
|
27020
|
-
/* @__PURE__ */
|
|
27134
|
+
/* @__PURE__ */ jsx221(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
27135
|
+
/* @__PURE__ */ jsx221(motion7.div, { initial: {
|
|
27021
27136
|
x: width2,
|
|
27022
27137
|
opacity: 0
|
|
27023
27138
|
}, animate: {
|
|
@@ -27035,7 +27150,7 @@ var SuperDrawerContent = ({
|
|
|
27035
27150
|
}, className: "pt2", children: children2 })
|
|
27036
27151
|
] }, "content");
|
|
27037
27152
|
} else {
|
|
27038
|
-
return /* @__PURE__ */
|
|
27153
|
+
return /* @__PURE__ */ jsx221(motion7.div, { ...mergeProps34(void 0, {
|
|
27039
27154
|
overflow: "auto"
|
|
27040
27155
|
}, {
|
|
27041
27156
|
paddingTop: "pt3",
|
|
@@ -27046,9 +27161,9 @@ var SuperDrawerContent = ({
|
|
|
27046
27161
|
}) }, "content");
|
|
27047
27162
|
}
|
|
27048
27163
|
}
|
|
27049
|
-
return /* @__PURE__ */
|
|
27164
|
+
return /* @__PURE__ */ jsxs113(Fragment49, { children: [
|
|
27050
27165
|
wrapWithMotionAndMaybeBack(children),
|
|
27051
|
-
actions && /* @__PURE__ */
|
|
27166
|
+
actions && /* @__PURE__ */ jsx221("footer", { ...trussProps128({
|
|
27052
27167
|
borderTopStyle: "bts_solid",
|
|
27053
27168
|
borderTopWidth: "btw_1px",
|
|
27054
27169
|
borderColor: ["bc_var", {
|
|
@@ -27061,7 +27176,7 @@ var SuperDrawerContent = ({
|
|
|
27061
27176
|
display: "df",
|
|
27062
27177
|
alignItems: "aic",
|
|
27063
27178
|
justifyContent: "jcfe"
|
|
27064
|
-
}), children: /* @__PURE__ */
|
|
27179
|
+
}), children: /* @__PURE__ */ jsx221("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx221(Button, { ...buttonProps }, i)) }) })
|
|
27065
27180
|
] });
|
|
27066
27181
|
};
|
|
27067
27182
|
|
|
@@ -27117,19 +27232,19 @@ function visit(rows, fn) {
|
|
|
27117
27232
|
|
|
27118
27233
|
// src/components/Tabs.tsx
|
|
27119
27234
|
import { camelCase as camelCase7 } from "change-case";
|
|
27120
|
-
import { useEffect as useEffect38, useMemo as useMemo56, useRef as
|
|
27235
|
+
import { useEffect as useEffect38, useMemo as useMemo56, useRef as useRef67, useState as useState60 } from "react";
|
|
27121
27236
|
import { mergeProps as mergeProps35, useFocusRing as useFocusRing20, useHover as useHover23 } from "react-aria";
|
|
27122
27237
|
import { matchPath } from "react-router";
|
|
27123
27238
|
import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
|
|
27124
|
-
import { trussProps as
|
|
27125
|
-
import { Fragment as Fragment50, jsx as
|
|
27239
|
+
import { trussProps as trussProps129, maybeCssVar as maybeCssVar62 } from "@homebound/truss/runtime";
|
|
27240
|
+
import { Fragment as Fragment50, jsx as jsx222, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
27126
27241
|
function TabsWithContent(props) {
|
|
27127
27242
|
const styles = hideTabs(props) ? {} : {
|
|
27128
27243
|
paddingTop: "pt3"
|
|
27129
27244
|
};
|
|
27130
|
-
return /* @__PURE__ */
|
|
27131
|
-
/* @__PURE__ */
|
|
27132
|
-
/* @__PURE__ */
|
|
27245
|
+
return /* @__PURE__ */ jsxs114(Fragment50, { children: [
|
|
27246
|
+
/* @__PURE__ */ jsx222(Tabs, { ...props }),
|
|
27247
|
+
/* @__PURE__ */ jsx222(TabContent, { ...props, contentXss: {
|
|
27133
27248
|
...styles,
|
|
27134
27249
|
...props.contentXss
|
|
27135
27250
|
} })
|
|
@@ -27154,7 +27269,7 @@ function TabContent(props) {
|
|
|
27154
27269
|
return (
|
|
27155
27270
|
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
27156
27271
|
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
27157
|
-
/* @__PURE__ */
|
|
27272
|
+
/* @__PURE__ */ jsx222(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx222("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps129(contentXss), children: selectedTab.render() }) })
|
|
27158
27273
|
);
|
|
27159
27274
|
}
|
|
27160
27275
|
function Tabs(props) {
|
|
@@ -27178,8 +27293,8 @@ function Tabs(props) {
|
|
|
27178
27293
|
focusProps
|
|
27179
27294
|
} = useFocusRing20();
|
|
27180
27295
|
const tid = useTestIds(others, "tabs");
|
|
27181
|
-
const [active, setActive] =
|
|
27182
|
-
const ref =
|
|
27296
|
+
const [active, setActive] = useState60(selected);
|
|
27297
|
+
const ref = useRef67(null);
|
|
27183
27298
|
useEffect38(() => setActive(selected), [selected]);
|
|
27184
27299
|
function onKeyUp(e) {
|
|
27185
27300
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
@@ -27196,7 +27311,7 @@ function Tabs(props) {
|
|
|
27196
27311
|
setActive(selected);
|
|
27197
27312
|
}
|
|
27198
27313
|
}
|
|
27199
|
-
return /* @__PURE__ */
|
|
27314
|
+
return /* @__PURE__ */ jsxs114("div", { ...trussProps129({
|
|
27200
27315
|
...{
|
|
27201
27316
|
display: "df",
|
|
27202
27317
|
alignItems: "aic",
|
|
@@ -27214,11 +27329,11 @@ function Tabs(props) {
|
|
|
27214
27329
|
}
|
|
27215
27330
|
} : {}
|
|
27216
27331
|
}), children: [
|
|
27217
|
-
!hideTabs(props) && /* @__PURE__ */
|
|
27332
|
+
!hideTabs(props) && /* @__PURE__ */ jsx222("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
27218
27333
|
const uniqueValue = uniqueTabValue(tab);
|
|
27219
|
-
return /* @__PURE__ */
|
|
27334
|
+
return /* @__PURE__ */ jsx222(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
27220
27335
|
}) }),
|
|
27221
|
-
right && /* @__PURE__ */
|
|
27336
|
+
right && /* @__PURE__ */ jsx222("div", { className: "mla df aic gap1 pb1", children: right })
|
|
27222
27337
|
] });
|
|
27223
27338
|
}
|
|
27224
27339
|
function TabImpl(props) {
|
|
@@ -27264,7 +27379,7 @@ function TabImpl(props) {
|
|
|
27264
27379
|
role: "tab",
|
|
27265
27380
|
tabIndex: active ? 0 : -1,
|
|
27266
27381
|
...others,
|
|
27267
|
-
...
|
|
27382
|
+
...trussProps129({
|
|
27268
27383
|
...baseStyles4,
|
|
27269
27384
|
// Only tints the label while the tab is unselected; selected keeps its own darker treatment.
|
|
27270
27385
|
...aiMode && aiStyles,
|
|
@@ -27282,18 +27397,18 @@ function TabImpl(props) {
|
|
|
27282
27397
|
onClick: () => onClick(tab.value)
|
|
27283
27398
|
}
|
|
27284
27399
|
});
|
|
27285
|
-
const decoration = aiMode ? /* @__PURE__ */
|
|
27286
|
-
const tabLabel = /* @__PURE__ */
|
|
27400
|
+
const decoration = aiMode ? /* @__PURE__ */ jsx222(AiBadge, {}) : icon ? /* @__PURE__ */ jsx222(Icon, { icon }) : endAdornment;
|
|
27401
|
+
const tabLabel = /* @__PURE__ */ jsxs114(Fragment50, { children: [
|
|
27287
27402
|
label,
|
|
27288
|
-
decoration && /* @__PURE__ */
|
|
27403
|
+
decoration && /* @__PURE__ */ jsx222("span", { className: "ml1 df aic", children: decoration })
|
|
27289
27404
|
] });
|
|
27290
27405
|
return isDisabled ? maybeTooltip({
|
|
27291
27406
|
title: resolveTooltip(disabled),
|
|
27292
27407
|
placement: "top",
|
|
27293
|
-
children: /* @__PURE__ */
|
|
27294
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */
|
|
27408
|
+
children: /* @__PURE__ */ jsx222("div", { ...tabProps, children: tabLabel })
|
|
27409
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx222(Link7, { ...mergeProps35(tabProps, interactiveProps, {
|
|
27295
27410
|
className: "navLink"
|
|
27296
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */
|
|
27411
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx222("button", { ...{
|
|
27297
27412
|
...tabProps,
|
|
27298
27413
|
...interactiveProps
|
|
27299
27414
|
}, children: tabLabel });
|
|
@@ -27304,7 +27419,7 @@ function getTabStyles() {
|
|
|
27304
27419
|
const borderBottomStyles = {
|
|
27305
27420
|
borderBottomStyle: "bbs_solid",
|
|
27306
27421
|
borderBottomWidth: ["borderBottomWidth_var", {
|
|
27307
|
-
"--borderBottomWidth":
|
|
27422
|
+
"--borderBottomWidth": maybeCssVar62(`${borderBottomWidthPx}px`)
|
|
27308
27423
|
}],
|
|
27309
27424
|
paddingBottom: ["pb_var", {
|
|
27310
27425
|
"--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
|
|
@@ -27357,7 +27472,7 @@ function getTabStyles() {
|
|
|
27357
27472
|
// The AI label tint is part of the brand ramp rather than a semantic token, same as the sparkle's gradient.
|
|
27358
27473
|
aiStyles: {
|
|
27359
27474
|
color: ["color_var", {
|
|
27360
|
-
"--color":
|
|
27475
|
+
"--color": maybeCssVar62("rgba(109, 40, 217, 1)" /* Purple700 */)
|
|
27361
27476
|
}]
|
|
27362
27477
|
},
|
|
27363
27478
|
focusRingStyles: {
|
|
@@ -27407,7 +27522,7 @@ function hideTabs(props) {
|
|
|
27407
27522
|
}
|
|
27408
27523
|
|
|
27409
27524
|
// src/components/TagGroup.tsx
|
|
27410
|
-
import { jsx as
|
|
27525
|
+
import { jsx as jsx223, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
27411
27526
|
function TagGroup(props) {
|
|
27412
27527
|
const {
|
|
27413
27528
|
tags,
|
|
@@ -27415,30 +27530,30 @@ function TagGroup(props) {
|
|
|
27415
27530
|
...otherProps
|
|
27416
27531
|
} = props;
|
|
27417
27532
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
27418
|
-
return /* @__PURE__ */
|
|
27419
|
-
tags.map((tag) => /* @__PURE__ */
|
|
27420
|
-
onEdit && /* @__PURE__ */
|
|
27533
|
+
return /* @__PURE__ */ jsxs115("div", { ...tid, className: "df aic fww gap1", children: [
|
|
27534
|
+
tags.map((tag) => /* @__PURE__ */ jsx223(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
27535
|
+
onEdit && /* @__PURE__ */ jsx223("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ jsx223(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
27421
27536
|
] });
|
|
27422
27537
|
}
|
|
27423
27538
|
|
|
27424
27539
|
// src/components/Toast/useToast.tsx
|
|
27425
|
-
import { useCallback as
|
|
27540
|
+
import { useCallback as useCallback40 } from "react";
|
|
27426
27541
|
function useToast() {
|
|
27427
27542
|
const { setNotice, clear } = useToastContext();
|
|
27428
|
-
const showToast =
|
|
27543
|
+
const showToast = useCallback40((props) => setNotice(props), [setNotice]);
|
|
27429
27544
|
return { showToast, clear };
|
|
27430
27545
|
}
|
|
27431
27546
|
|
|
27432
27547
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
27433
|
-
import { trussProps as
|
|
27434
|
-
import { jsx as
|
|
27548
|
+
import { trussProps as trussProps130, mergeProps as mergeProps36, maybeCssVar as maybeCssVar63 } from "@homebound/truss/runtime";
|
|
27549
|
+
import { jsx as jsx224, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
27435
27550
|
var __maybeInc28 = (inc) => {
|
|
27436
27551
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27437
27552
|
};
|
|
27438
27553
|
function SideNavLayout(props) {
|
|
27439
27554
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
27440
|
-
if (hasProvider) return /* @__PURE__ */
|
|
27441
|
-
return /* @__PURE__ */
|
|
27555
|
+
if (hasProvider) return /* @__PURE__ */ jsx224(SideNavLayoutContent, { ...props });
|
|
27556
|
+
return /* @__PURE__ */ jsx224(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx224(SideNavLayoutContent, { ...props }) });
|
|
27442
27557
|
}
|
|
27443
27558
|
function SideNavLayoutContent(props) {
|
|
27444
27559
|
const {
|
|
@@ -27461,7 +27576,7 @@ function SideNavLayoutContent(props) {
|
|
|
27461
27576
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
27462
27577
|
const navTop = bannerAndNavbarChromeTop();
|
|
27463
27578
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
27464
|
-
const rail = showRail && /* @__PURE__ */
|
|
27579
|
+
const rail = showRail && /* @__PURE__ */ jsxs116("div", { ...trussProps130({
|
|
27465
27580
|
...{
|
|
27466
27581
|
display: "df",
|
|
27467
27582
|
flexDirection: "fdc",
|
|
@@ -27485,14 +27600,14 @@ function SideNavLayoutContent(props) {
|
|
|
27485
27600
|
position: "sticky",
|
|
27486
27601
|
left: "left0",
|
|
27487
27602
|
zIndex: ["z_var", {
|
|
27488
|
-
"--zIndex":
|
|
27603
|
+
"--zIndex": maybeCssVar63(zIndices.sideNav)
|
|
27489
27604
|
}],
|
|
27490
27605
|
top: ["top_var", {
|
|
27491
|
-
"--top":
|
|
27606
|
+
"--top": maybeCssVar63(__maybeInc28(navTop))
|
|
27492
27607
|
}],
|
|
27493
27608
|
alignSelf: "asfs",
|
|
27494
27609
|
height: ["h_var", {
|
|
27495
|
-
"--height":
|
|
27610
|
+
"--height": maybeCssVar63(__maybeInc28(railViewportHeight))
|
|
27496
27611
|
}],
|
|
27497
27612
|
width: ["w_var", {
|
|
27498
27613
|
"--width": `${collapsed ? railCollapsedWidthPx : railWidthPx}px`
|
|
@@ -27502,11 +27617,11 @@ function SideNavLayoutContent(props) {
|
|
|
27502
27617
|
position: "fixed",
|
|
27503
27618
|
left: "left0",
|
|
27504
27619
|
top: ["top_var", {
|
|
27505
|
-
"--top":
|
|
27620
|
+
"--top": maybeCssVar63(__maybeInc28(navTop))
|
|
27506
27621
|
}],
|
|
27507
27622
|
bottom: "bottom0",
|
|
27508
27623
|
zIndex: ["z_var", {
|
|
27509
|
-
"--zIndex":
|
|
27624
|
+
"--zIndex": maybeCssVar63(zIndices.sideNav)
|
|
27510
27625
|
}]
|
|
27511
27626
|
},
|
|
27512
27627
|
...collapsed ? {
|
|
@@ -27518,18 +27633,18 @@ function SideNavLayoutContent(props) {
|
|
|
27518
27633
|
}
|
|
27519
27634
|
}
|
|
27520
27635
|
}), ...tid.sideNav, children: [
|
|
27521
|
-
showCollapseToggle && /* @__PURE__ */
|
|
27522
|
-
/* @__PURE__ */
|
|
27636
|
+
showCollapseToggle && /* @__PURE__ */ jsx224("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ jsx224(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
27637
|
+
/* @__PURE__ */ jsx224("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ jsx224(SideNav, { ...sideNav }) })
|
|
27523
27638
|
] });
|
|
27524
|
-
return /* @__PURE__ */
|
|
27639
|
+
return /* @__PURE__ */ jsx224(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs116("div", { ...mergeProps36(void 0, {
|
|
27525
27640
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
27526
27641
|
}, {
|
|
27527
27642
|
display: "df",
|
|
27528
27643
|
flexDirection: "fdr",
|
|
27529
27644
|
width: "w100"
|
|
27530
27645
|
}), ...tid, children: [
|
|
27531
|
-
contrastRail ? /* @__PURE__ */
|
|
27532
|
-
/* @__PURE__ */
|
|
27646
|
+
contrastRail ? /* @__PURE__ */ jsx224(ContrastScope, { children: rail }) : rail,
|
|
27647
|
+
/* @__PURE__ */ jsx224("div", { ...trussProps130({
|
|
27533
27648
|
display: "df",
|
|
27534
27649
|
flexDirection: "fdc",
|
|
27535
27650
|
flexGrow: "fg1",
|
|
@@ -27545,8 +27660,8 @@ function SideNavLayoutContent(props) {
|
|
|
27545
27660
|
}
|
|
27546
27661
|
|
|
27547
27662
|
// src/layouts/CenteredLayout/CenteredLayout.tsx
|
|
27548
|
-
import { mergeProps as mergeProps37, maybeCssVar as
|
|
27549
|
-
import { jsx as
|
|
27663
|
+
import { mergeProps as mergeProps37, maybeCssVar as maybeCssVar64 } from "@homebound/truss/runtime";
|
|
27664
|
+
import { jsx as jsx225 } from "react/jsx-runtime";
|
|
27550
27665
|
var __maybeInc29 = (inc) => {
|
|
27551
27666
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27552
27667
|
};
|
|
@@ -27559,7 +27674,7 @@ function CenteredLayout(props) {
|
|
|
27559
27674
|
const {
|
|
27560
27675
|
mdAndUp
|
|
27561
27676
|
} = useBreakpoint();
|
|
27562
|
-
return /* @__PURE__ */
|
|
27677
|
+
return /* @__PURE__ */ jsx225("div", { ...mergeProps37(void 0, {
|
|
27563
27678
|
// layoutContainer descendants (e.g. ContentHeader) read this to inset sticky horizontal chrome within the shell padding.
|
|
27564
27679
|
[beamLayoutContentPaddingXVar]: mdAndUp ? mdAndUpContentPaddingX : smContentPaddingX
|
|
27565
27680
|
}, {
|
|
@@ -27587,16 +27702,16 @@ var smContentPaddingX = "12px";
|
|
|
27587
27702
|
var mdAndUpContentPaddingX = pageContentPaddingXValue;
|
|
27588
27703
|
var centeredPaddingX = {
|
|
27589
27704
|
paddingLeft: ["px_var mdandup_pl3", {
|
|
27590
|
-
"--paddingLeft":
|
|
27705
|
+
"--paddingLeft": maybeCssVar64(__maybeInc29(smContentPaddingX))
|
|
27591
27706
|
}],
|
|
27592
27707
|
paddingRight: ["px_var mdandup_pr3", {
|
|
27593
|
-
"--paddingRight":
|
|
27708
|
+
"--paddingRight": maybeCssVar64(__maybeInc29(smContentPaddingX))
|
|
27594
27709
|
}]
|
|
27595
27710
|
};
|
|
27596
27711
|
|
|
27597
27712
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
27598
|
-
import { trussProps as
|
|
27599
|
-
import { jsx as
|
|
27713
|
+
import { trussProps as trussProps131, mergeProps as mergeProps38, maybeCssVar as maybeCssVar65 } from "@homebound/truss/runtime";
|
|
27714
|
+
import { jsx as jsx226, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
27600
27715
|
var __maybeInc30 = (inc) => {
|
|
27601
27716
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27602
27717
|
};
|
|
@@ -27612,35 +27727,35 @@ function EnvironmentBannerLayout(props) {
|
|
|
27612
27727
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
27613
27728
|
};
|
|
27614
27729
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
27615
|
-
return /* @__PURE__ */
|
|
27730
|
+
return /* @__PURE__ */ jsx226(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx226(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ jsxs117("div", { ...mergeProps38(void 0, style, {
|
|
27616
27731
|
display: "df",
|
|
27617
27732
|
flexDirection: "fdc",
|
|
27618
27733
|
width: "wfc",
|
|
27619
27734
|
minWidth: "mw100"
|
|
27620
27735
|
}), ...tid, children: [
|
|
27621
|
-
showBanner && environmentBanner && /* @__PURE__ */
|
|
27736
|
+
showBanner && environmentBanner && /* @__PURE__ */ jsx226("div", { ...mergeProps38(void 0, {
|
|
27622
27737
|
height: environmentBannerSizePx
|
|
27623
27738
|
}, {
|
|
27624
27739
|
flexShrink: "fs0",
|
|
27625
27740
|
width: "w100"
|
|
27626
|
-
}), children: /* @__PURE__ */
|
|
27741
|
+
}), children: /* @__PURE__ */ jsx226("div", { ...trussProps131({
|
|
27627
27742
|
position: "fixed",
|
|
27628
27743
|
top: "top0",
|
|
27629
27744
|
left: "left0",
|
|
27630
27745
|
zIndex: ["z_var", {
|
|
27631
|
-
"--zIndex":
|
|
27746
|
+
"--zIndex": maybeCssVar65(zIndices.environmentBanner)
|
|
27632
27747
|
}],
|
|
27633
27748
|
width: ["w_var", {
|
|
27634
|
-
"--width":
|
|
27749
|
+
"--width": maybeCssVar65(__maybeInc30(innerWidth))
|
|
27635
27750
|
}]
|
|
27636
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */
|
|
27751
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ jsx226(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
27637
27752
|
children
|
|
27638
27753
|
] }) }) });
|
|
27639
27754
|
}
|
|
27640
27755
|
|
|
27641
27756
|
// src/layouts/FormSectionLayout/FormSectionLayout.tsx
|
|
27642
|
-
import { trussProps as
|
|
27643
|
-
import { jsx as
|
|
27757
|
+
import { trussProps as trussProps132 } from "@homebound/truss/runtime";
|
|
27758
|
+
import { jsx as jsx227, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
27644
27759
|
function FormSectionLayout(props) {
|
|
27645
27760
|
const {
|
|
27646
27761
|
title,
|
|
@@ -27652,7 +27767,7 @@ function FormSectionLayout(props) {
|
|
|
27652
27767
|
aiMode = false
|
|
27653
27768
|
} = props;
|
|
27654
27769
|
const tid = useTestIds(props, "formSectionLayout");
|
|
27655
|
-
const content = /* @__PURE__ */
|
|
27770
|
+
const content = /* @__PURE__ */ jsxs118("div", { ...trussProps132({
|
|
27656
27771
|
display: "df",
|
|
27657
27772
|
flexDirection: "fdc",
|
|
27658
27773
|
gap: "gap8",
|
|
@@ -27663,21 +27778,21 @@ function FormSectionLayout(props) {
|
|
|
27663
27778
|
paddingLeft: "pl3"
|
|
27664
27779
|
} : {}
|
|
27665
27780
|
}), children: [
|
|
27666
|
-
/* @__PURE__ */
|
|
27667
|
-
/* @__PURE__ */
|
|
27781
|
+
/* @__PURE__ */ jsxs118("div", { className: "df fdc gap3", children: [
|
|
27782
|
+
/* @__PURE__ */ jsx227(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
|
|
27668
27783
|
initialFields
|
|
27669
27784
|
] }),
|
|
27670
|
-
sections && /* @__PURE__ */
|
|
27785
|
+
sections && /* @__PURE__ */ jsx227("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ jsx227(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
27671
27786
|
] });
|
|
27672
|
-
return /* @__PURE__ */
|
|
27787
|
+
return /* @__PURE__ */ jsx227(CenteredLayout, { size: "sm", children: aiMode ? /* @__PURE__ */ jsx227(AiCard, { size: "lg", ...tid, children: content }) : content });
|
|
27673
27788
|
}
|
|
27674
27789
|
|
|
27675
27790
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27676
|
-
import { useMemo as useMemo57, useRef as
|
|
27677
|
-
import { mergeProps as mergeProps39, maybeCssVar as
|
|
27791
|
+
import { useMemo as useMemo57, useRef as useRef69 } from "react";
|
|
27792
|
+
import { mergeProps as mergeProps39, maybeCssVar as maybeCssVar66 } from "@homebound/truss/runtime";
|
|
27678
27793
|
|
|
27679
27794
|
// src/layouts/useAutoHideOnScroll.ts
|
|
27680
|
-
import { useLayoutEffect as
|
|
27795
|
+
import { useLayoutEffect as useLayoutEffect12, useRef as useRef68, useState as useState61 } from "react";
|
|
27681
27796
|
var THRESHOLD = 80;
|
|
27682
27797
|
function getInitialAutoHideState() {
|
|
27683
27798
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -27687,15 +27802,15 @@ function getInitialAutoHideState() {
|
|
|
27687
27802
|
}
|
|
27688
27803
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
27689
27804
|
const initial = getInitialAutoHideState();
|
|
27690
|
-
const [state, setState] =
|
|
27691
|
-
const stateRef =
|
|
27692
|
-
const [atTop, setAtTop] =
|
|
27693
|
-
const atTopRef =
|
|
27694
|
-
const getTopOffsetRef =
|
|
27805
|
+
const [state, setState] = useState61(initial.state);
|
|
27806
|
+
const stateRef = useRef68(initial.state);
|
|
27807
|
+
const [atTop, setAtTop] = useState61(initial.atTop);
|
|
27808
|
+
const atTopRef = useRef68(initial.atTop);
|
|
27809
|
+
const getTopOffsetRef = useRef68(getTopOffset);
|
|
27695
27810
|
getTopOffsetRef.current = getTopOffset;
|
|
27696
|
-
const lastScrollY =
|
|
27697
|
-
const lastScrollHeight =
|
|
27698
|
-
|
|
27811
|
+
const lastScrollY = useRef68(Number.POSITIVE_INFINITY);
|
|
27812
|
+
const lastScrollHeight = useRef68(0);
|
|
27813
|
+
useLayoutEffect12(() => {
|
|
27699
27814
|
if (!enabled) {
|
|
27700
27815
|
stateRef.current = "static";
|
|
27701
27816
|
atTopRef.current = true;
|
|
@@ -27767,17 +27882,17 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
27767
27882
|
}
|
|
27768
27883
|
|
|
27769
27884
|
// src/layouts/useMeasuredHeight.ts
|
|
27770
|
-
import { useResizeObserver as
|
|
27771
|
-
import { useCallback as
|
|
27885
|
+
import { useResizeObserver as useResizeObserver12 } from "@react-aria/utils";
|
|
27886
|
+
import { useCallback as useCallback41, useLayoutEffect as useLayoutEffect13, useState as useState62 } from "react";
|
|
27772
27887
|
function useMeasuredHeight(ref, enabled) {
|
|
27773
|
-
const [height, setHeight] =
|
|
27774
|
-
const syncElementHeight =
|
|
27888
|
+
const [height, setHeight] = useState62(0);
|
|
27889
|
+
const syncElementHeight = useCallback41(() => {
|
|
27775
27890
|
const el = ref.current;
|
|
27776
27891
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
27777
27892
|
setHeight((prev) => prev === next ? prev : next);
|
|
27778
27893
|
}, [ref]);
|
|
27779
|
-
|
|
27780
|
-
|
|
27894
|
+
useResizeObserver12({ ref, onResize: syncElementHeight });
|
|
27895
|
+
useLayoutEffect13(() => {
|
|
27781
27896
|
syncElementHeight();
|
|
27782
27897
|
}, [enabled, syncElementHeight]);
|
|
27783
27898
|
return height;
|
|
@@ -27785,17 +27900,17 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
27785
27900
|
|
|
27786
27901
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
27787
27902
|
import { createContext as createContext16, useContext as useContext28 } from "react";
|
|
27788
|
-
import { jsx as
|
|
27903
|
+
import { jsx as jsx228 } from "react/jsx-runtime";
|
|
27789
27904
|
var NavbarLayoutHeightContext = createContext16(0);
|
|
27790
27905
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
27791
|
-
return /* @__PURE__ */
|
|
27906
|
+
return /* @__PURE__ */ jsx228(NavbarLayoutHeightContext.Provider, { value, children });
|
|
27792
27907
|
}
|
|
27793
27908
|
function useNavbarLayoutHeight() {
|
|
27794
27909
|
return useContext28(NavbarLayoutHeightContext);
|
|
27795
27910
|
}
|
|
27796
27911
|
|
|
27797
27912
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27798
|
-
import { jsx as
|
|
27913
|
+
import { jsx as jsx229, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
27799
27914
|
var __maybeInc31 = (inc) => {
|
|
27800
27915
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27801
27916
|
};
|
|
@@ -27805,8 +27920,8 @@ function NavbarLayout(props) {
|
|
|
27805
27920
|
children
|
|
27806
27921
|
} = props;
|
|
27807
27922
|
const tid = useTestIds(props, "navbarLayout");
|
|
27808
|
-
const navMetricsRef =
|
|
27809
|
-
const spacerRef =
|
|
27923
|
+
const navMetricsRef = useRef69(null);
|
|
27924
|
+
const spacerRef = useRef69(null);
|
|
27810
27925
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
27811
27926
|
const {
|
|
27812
27927
|
state: autoHideState,
|
|
@@ -27824,10 +27939,10 @@ function NavbarLayout(props) {
|
|
|
27824
27939
|
position: "sticky",
|
|
27825
27940
|
left: "left0",
|
|
27826
27941
|
zIndex: ["z_var", {
|
|
27827
|
-
"--zIndex":
|
|
27942
|
+
"--zIndex": maybeCssVar66(zIndices.navbar)
|
|
27828
27943
|
}],
|
|
27829
27944
|
width: ["w_var", {
|
|
27830
|
-
"--width":
|
|
27945
|
+
"--width": maybeCssVar66(__maybeInc31(innerWidth))
|
|
27831
27946
|
}]
|
|
27832
27947
|
}
|
|
27833
27948
|
) : (
|
|
@@ -27836,10 +27951,10 @@ function NavbarLayout(props) {
|
|
|
27836
27951
|
position: "fixed",
|
|
27837
27952
|
left: "left0",
|
|
27838
27953
|
zIndex: ["z_var", {
|
|
27839
|
-
"--zIndex":
|
|
27954
|
+
"--zIndex": maybeCssVar66(zIndices.navbar)
|
|
27840
27955
|
}],
|
|
27841
27956
|
width: ["w_var", {
|
|
27842
|
-
"--width":
|
|
27957
|
+
"--width": maybeCssVar66(__maybeInc31(innerWidth))
|
|
27843
27958
|
}],
|
|
27844
27959
|
transition: "transitionTop"
|
|
27845
27960
|
}
|
|
@@ -27848,29 +27963,29 @@ function NavbarLayout(props) {
|
|
|
27848
27963
|
const innerStyle = autoHideState !== "static" ? {
|
|
27849
27964
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
27850
27965
|
} : void 0;
|
|
27851
|
-
const navbarEl = useMemo57(() => /* @__PURE__ */
|
|
27852
|
-
return /* @__PURE__ */
|
|
27966
|
+
const navbarEl = useMemo57(() => /* @__PURE__ */ jsx229(Navbar, { ...navbar }), [navbar]);
|
|
27967
|
+
return /* @__PURE__ */ jsx229(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx229(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsx229(MobileSubNavProvider, { children: /* @__PURE__ */ jsxs119("div", { ...mergeProps39(void 0, cssVars, {
|
|
27853
27968
|
display: "df",
|
|
27854
27969
|
flexDirection: "fdc",
|
|
27855
27970
|
width: "wfc",
|
|
27856
27971
|
minWidth: "mw100"
|
|
27857
27972
|
}), ...tid, children: [
|
|
27858
|
-
/* @__PURE__ */
|
|
27973
|
+
/* @__PURE__ */ jsx229("div", { ref: spacerRef, ...mergeProps39(void 0, {
|
|
27859
27974
|
height: navHeight
|
|
27860
27975
|
}, {
|
|
27861
27976
|
flexShrink: "fs0",
|
|
27862
27977
|
width: "w100"
|
|
27863
|
-
}), children: /* @__PURE__ */
|
|
27864
|
-
/* @__PURE__ */
|
|
27978
|
+
}), children: /* @__PURE__ */ jsx229("div", { ref: navMetricsRef, ...mergeProps39(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
27979
|
+
/* @__PURE__ */ jsx229("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
27865
27980
|
] }) }) }) });
|
|
27866
27981
|
}
|
|
27867
27982
|
|
|
27868
27983
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
27869
|
-
import { useCallback as
|
|
27984
|
+
import { useCallback as useCallback42, useMemo as useMemo58, useRef as useRef70 } from "react";
|
|
27870
27985
|
|
|
27871
27986
|
// src/components/Headers/BaseHeader.tsx
|
|
27872
|
-
import { trussProps as
|
|
27873
|
-
import { jsx as
|
|
27987
|
+
import { trussProps as trussProps133 } from "@homebound/truss/runtime";
|
|
27988
|
+
import { jsx as jsx230, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
27874
27989
|
function BaseHeader(props) {
|
|
27875
27990
|
const {
|
|
27876
27991
|
title,
|
|
@@ -27882,7 +27997,7 @@ function BaseHeader(props) {
|
|
|
27882
27997
|
} = props;
|
|
27883
27998
|
const tid = useTestIds(otherProps, "header");
|
|
27884
27999
|
useDocumentTitle(title, documentTitleSuffix);
|
|
27885
|
-
return /* @__PURE__ */
|
|
28000
|
+
return /* @__PURE__ */ jsxs120("header", { ...tid, ...trussProps133({
|
|
27886
28001
|
display: "df",
|
|
27887
28002
|
flexDirection: "fdc",
|
|
27888
28003
|
paddingTop: "pt3",
|
|
@@ -27896,7 +28011,7 @@ function BaseHeader(props) {
|
|
|
27896
28011
|
"--backgroundColor": "var(--b-surface)"
|
|
27897
28012
|
}]
|
|
27898
28013
|
}), children: [
|
|
27899
|
-
/* @__PURE__ */
|
|
28014
|
+
/* @__PURE__ */ jsxs120("div", { ...trussProps133({
|
|
27900
28015
|
...{
|
|
27901
28016
|
display: "df",
|
|
27902
28017
|
justifyContent: "jcsb",
|
|
@@ -27910,9 +28025,9 @@ function BaseHeader(props) {
|
|
|
27910
28025
|
} : {}
|
|
27911
28026
|
}
|
|
27912
28027
|
}), children: [
|
|
27913
|
-
/* @__PURE__ */
|
|
27914
|
-
breadcrumbs && /* @__PURE__ */
|
|
27915
|
-
/* @__PURE__ */
|
|
28028
|
+
/* @__PURE__ */ jsxs120("div", { className: "mw0", children: [
|
|
28029
|
+
breadcrumbs && /* @__PURE__ */ jsx230(Breadcrumbs, { ...breadcrumbs }),
|
|
28030
|
+
/* @__PURE__ */ jsx230("h1", { ...tid.title, ...trussProps133({
|
|
27916
28031
|
fontWeight: "fw6",
|
|
27917
28032
|
fontSize: "fz_20px",
|
|
27918
28033
|
lineHeight: "lh_28px",
|
|
@@ -27921,22 +28036,22 @@ function BaseHeader(props) {
|
|
|
27921
28036
|
}]
|
|
27922
28037
|
}), children: title })
|
|
27923
28038
|
] }),
|
|
27924
|
-
/* @__PURE__ */
|
|
28039
|
+
/* @__PURE__ */ jsx230("div", { className: "fs0", children: rightSlot })
|
|
27925
28040
|
] }),
|
|
27926
28041
|
bottomSlot
|
|
27927
28042
|
] });
|
|
27928
28043
|
}
|
|
27929
28044
|
|
|
27930
28045
|
// src/components/Headers/PageHeader.tsx
|
|
27931
|
-
import { trussProps as
|
|
27932
|
-
import { jsx as
|
|
28046
|
+
import { trussProps as trussProps134 } from "@homebound/truss/runtime";
|
|
28047
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
27933
28048
|
function PageHeader2(props) {
|
|
27934
28049
|
const {
|
|
27935
28050
|
tabs,
|
|
27936
28051
|
...otherProps
|
|
27937
28052
|
} = props;
|
|
27938
28053
|
const tid = useTestIds(otherProps, "header");
|
|
27939
|
-
return /* @__PURE__ */
|
|
28054
|
+
return /* @__PURE__ */ jsx231(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ jsx231("div", { ...trussProps134(pageContentPaddingX), children: /* @__PURE__ */ jsx231(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
27940
28055
|
}
|
|
27941
28056
|
|
|
27942
28057
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
@@ -27945,8 +28060,8 @@ function useBannerAndNavbarHeight() {
|
|
|
27945
28060
|
}
|
|
27946
28061
|
|
|
27947
28062
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
27948
|
-
import { mergeProps as mergeProps40, maybeCssVar as
|
|
27949
|
-
import { jsx as
|
|
28063
|
+
import { mergeProps as mergeProps40, maybeCssVar as maybeCssVar67 } from "@homebound/truss/runtime";
|
|
28064
|
+
import { jsx as jsx232, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
27950
28065
|
var __maybeInc32 = (inc) => {
|
|
27951
28066
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27952
28067
|
};
|
|
@@ -27957,11 +28072,11 @@ function PageHeaderLayout(props) {
|
|
|
27957
28072
|
} = props;
|
|
27958
28073
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
27959
28074
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
27960
|
-
const bannerAndNavbarHeightRef =
|
|
28075
|
+
const bannerAndNavbarHeightRef = useRef70(bannerAndNavbarHeight);
|
|
27961
28076
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
27962
|
-
const getBannerAndNavbarHeight =
|
|
27963
|
-
const headerMetricsRef =
|
|
27964
|
-
const spacerRef =
|
|
28077
|
+
const getBannerAndNavbarHeight = useCallback42(() => bannerAndNavbarHeightRef.current, []);
|
|
28078
|
+
const headerMetricsRef = useRef70(null);
|
|
28079
|
+
const spacerRef = useRef70(null);
|
|
27965
28080
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
27966
28081
|
const {
|
|
27967
28082
|
state: autoHideState,
|
|
@@ -27977,49 +28092,49 @@ function PageHeaderLayout(props) {
|
|
|
27977
28092
|
const innerCss = autoHideState === "static" ? {
|
|
27978
28093
|
position: "sticky",
|
|
27979
28094
|
left: ["left_var", {
|
|
27980
|
-
"--left":
|
|
28095
|
+
"--left": maybeCssVar67(__maybeInc32(headerLeft))
|
|
27981
28096
|
}],
|
|
27982
28097
|
width: ["w_var", {
|
|
27983
|
-
"--width":
|
|
28098
|
+
"--width": maybeCssVar67(__maybeInc32(headerWidth))
|
|
27984
28099
|
}],
|
|
27985
28100
|
zIndex: ["z_var", {
|
|
27986
|
-
"--zIndex":
|
|
28101
|
+
"--zIndex": maybeCssVar67(zIndices.pageStickyHeader)
|
|
27987
28102
|
}]
|
|
27988
28103
|
} : {
|
|
27989
28104
|
position: "fixed",
|
|
27990
28105
|
left: ["left_var", {
|
|
27991
|
-
"--left":
|
|
28106
|
+
"--left": maybeCssVar67(__maybeInc32(headerLeft))
|
|
27992
28107
|
}],
|
|
27993
28108
|
width: ["w_var", {
|
|
27994
|
-
"--width":
|
|
28109
|
+
"--width": maybeCssVar67(__maybeInc32(headerWidth))
|
|
27995
28110
|
}],
|
|
27996
28111
|
zIndex: ["z_var", {
|
|
27997
|
-
"--zIndex":
|
|
28112
|
+
"--zIndex": maybeCssVar67(zIndices.pageStickyHeader)
|
|
27998
28113
|
}],
|
|
27999
28114
|
transition: "transitionTop"
|
|
28000
28115
|
};
|
|
28001
28116
|
const innerStyle = autoHideState !== "static" ? {
|
|
28002
28117
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
28003
28118
|
} : void 0;
|
|
28004
|
-
const pageHeaderEl = useMemo58(() => /* @__PURE__ */
|
|
28005
|
-
return /* @__PURE__ */
|
|
28119
|
+
const pageHeaderEl = useMemo58(() => /* @__PURE__ */ jsx232(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
28120
|
+
return /* @__PURE__ */ jsx232(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs121("div", { ...mergeProps40(void 0, cssVars, {
|
|
28006
28121
|
display: "df",
|
|
28007
28122
|
flexDirection: "fdc",
|
|
28008
28123
|
width: "w100"
|
|
28009
28124
|
}), ...tid, children: [
|
|
28010
|
-
/* @__PURE__ */
|
|
28125
|
+
/* @__PURE__ */ jsx232("div", { ref: spacerRef, ...mergeProps40(void 0, {
|
|
28011
28126
|
height: headerHeight
|
|
28012
28127
|
}, {
|
|
28013
28128
|
flexShrink: "fs0",
|
|
28014
28129
|
width: "w100"
|
|
28015
|
-
}), children: /* @__PURE__ */
|
|
28016
|
-
/* @__PURE__ */
|
|
28130
|
+
}), children: /* @__PURE__ */ jsx232("div", { ref: headerMetricsRef, ...mergeProps40(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
28131
|
+
/* @__PURE__ */ jsx232("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
28017
28132
|
] }) });
|
|
28018
28133
|
}
|
|
28019
28134
|
|
|
28020
28135
|
// src/layouts/Workflow/JumpLinksRail.tsx
|
|
28021
|
-
import { trussProps as
|
|
28022
|
-
import { jsx as
|
|
28136
|
+
import { trussProps as trussProps135, maybeCssVar as maybeCssVar68 } from "@homebound/truss/runtime";
|
|
28137
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
28023
28138
|
var __maybeInc33 = (inc) => {
|
|
28024
28139
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28025
28140
|
};
|
|
@@ -28030,7 +28145,7 @@ function JumpLinksRail(props) {
|
|
|
28030
28145
|
activeId
|
|
28031
28146
|
} = props;
|
|
28032
28147
|
const tid = useTestIds(props, "jumpLinks");
|
|
28033
|
-
return /* @__PURE__ */
|
|
28148
|
+
return /* @__PURE__ */ jsx233("nav", { ...trussProps135({
|
|
28034
28149
|
display: "df",
|
|
28035
28150
|
flexDirection: "fdc",
|
|
28036
28151
|
flexShrink: "fs0",
|
|
@@ -28040,18 +28155,18 @@ function JumpLinksRail(props) {
|
|
|
28040
28155
|
position: "sticky",
|
|
28041
28156
|
alignSelf: "asfs",
|
|
28042
28157
|
top: ["top_var", {
|
|
28043
|
-
"--top":
|
|
28158
|
+
"--top": maybeCssVar68(__maybeInc33(stickyNavAndHeaderOffset()))
|
|
28044
28159
|
}]
|
|
28045
|
-
}), ...tid, children: links.map((link) => /* @__PURE__ */
|
|
28160
|
+
}), ...tid, children: links.map((link) => /* @__PURE__ */ jsx233(JumpLink, { label: link.label, href: `#${link.id}`, active: link.id === activeId, ...tid.link }, link.id)) });
|
|
28046
28161
|
}
|
|
28047
28162
|
|
|
28048
28163
|
// src/layouts/Workflow/useActiveJumpLink.ts
|
|
28049
|
-
import { useLayoutEffect as
|
|
28164
|
+
import { useLayoutEffect as useLayoutEffect14, useState as useState63 } from "react";
|
|
28050
28165
|
var activationLeadPx = 120;
|
|
28051
28166
|
function useActiveJumpLink(sectionIds) {
|
|
28052
28167
|
const idsKey = sectionIds.join("\0");
|
|
28053
|
-
const [activeId, setActiveId] =
|
|
28054
|
-
|
|
28168
|
+
const [activeId, setActiveId] = useState63(sectionIds[0]);
|
|
28169
|
+
useLayoutEffect14(() => {
|
|
28055
28170
|
const ids = idsKey.length === 0 ? [] : idsKey.split("\0");
|
|
28056
28171
|
if (ids.length === 0) return;
|
|
28057
28172
|
const update = () => {
|
|
@@ -28075,30 +28190,30 @@ function useActiveJumpLink(sectionIds) {
|
|
|
28075
28190
|
}
|
|
28076
28191
|
|
|
28077
28192
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
28078
|
-
import { useLayoutEffect as
|
|
28193
|
+
import { useLayoutEffect as useLayoutEffect15, useRef as useRef72 } from "react";
|
|
28079
28194
|
|
|
28080
28195
|
// src/components/Headers/WorkflowHeader.tsx
|
|
28081
|
-
import { jsx as
|
|
28196
|
+
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
28082
28197
|
function WorkflowHeader(props) {
|
|
28083
28198
|
const { stepperTabs, ...otherProps } = props;
|
|
28084
28199
|
const tid = useTestIds(otherProps, "header");
|
|
28085
|
-
return /* @__PURE__ */
|
|
28200
|
+
return /* @__PURE__ */ jsx234(
|
|
28086
28201
|
BaseHeader,
|
|
28087
28202
|
{
|
|
28088
28203
|
...otherProps,
|
|
28089
|
-
bottomSlot: stepperTabs ? /* @__PURE__ */
|
|
28204
|
+
bottomSlot: stepperTabs ? /* @__PURE__ */ jsx234(StepperTabs, { ...stepperTabs, ...tid.stepperTabs }) : void 0
|
|
28090
28205
|
}
|
|
28091
28206
|
);
|
|
28092
28207
|
}
|
|
28093
28208
|
|
|
28094
28209
|
// src/layouts/Workflow/useUnsavedChangesGuard.tsx
|
|
28095
|
-
import { useEffect as useEffect39, useRef as
|
|
28210
|
+
import { useEffect as useEffect39, useRef as useRef71 } from "react";
|
|
28096
28211
|
import { useBlocker } from "react-router-dom";
|
|
28097
|
-
import { jsx as
|
|
28212
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
28098
28213
|
function useUnsavedChangesGuard(options) {
|
|
28099
28214
|
const { isDirty, onCancel } = options;
|
|
28100
28215
|
const { openModal } = useModal();
|
|
28101
|
-
const isDirtyRef =
|
|
28216
|
+
const isDirtyRef = useRef71(isDirty);
|
|
28102
28217
|
isDirtyRef.current = isDirty;
|
|
28103
28218
|
useEffect39(() => {
|
|
28104
28219
|
const onBeforeUnload = (e) => {
|
|
@@ -28117,7 +28232,7 @@ function useUnsavedChangesGuard(options) {
|
|
|
28117
28232
|
}
|
|
28118
28233
|
openModal({
|
|
28119
28234
|
allowClosing: false,
|
|
28120
|
-
content: /* @__PURE__ */
|
|
28235
|
+
content: /* @__PURE__ */ jsx235(ConfirmCloseModal, { onClose: () => onCancel(e) })
|
|
28121
28236
|
});
|
|
28122
28237
|
};
|
|
28123
28238
|
const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
|
|
@@ -28129,7 +28244,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
28129
28244
|
useEffect39(() => {
|
|
28130
28245
|
openModal({
|
|
28131
28246
|
allowClosing: false,
|
|
28132
|
-
content: /* @__PURE__ */
|
|
28247
|
+
content: /* @__PURE__ */ jsx235(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
|
|
28133
28248
|
});
|
|
28134
28249
|
return () => closeModal();
|
|
28135
28250
|
}, []);
|
|
@@ -28137,7 +28252,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
28137
28252
|
}
|
|
28138
28253
|
|
|
28139
28254
|
// src/layouts/Workflow/WorkflowActions.tsx
|
|
28140
|
-
import { jsx as
|
|
28255
|
+
import { jsx as jsx236, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
28141
28256
|
function WorkflowActions(props) {
|
|
28142
28257
|
const {
|
|
28143
28258
|
onCancel,
|
|
@@ -28155,12 +28270,12 @@ function WorkflowActions(props) {
|
|
|
28155
28270
|
sm: isMobile
|
|
28156
28271
|
} = useBreakpoint();
|
|
28157
28272
|
const primaryVariant = aiMode ? "ai" : "primary";
|
|
28158
|
-
return /* @__PURE__ */
|
|
28159
|
-
/* @__PURE__ */
|
|
28160
|
-
/* @__PURE__ */
|
|
28161
|
-
/* @__PURE__ */
|
|
28162
|
-
onSaveAndExit && /* @__PURE__ */
|
|
28163
|
-
isLastStep ? /* @__PURE__ */
|
|
28273
|
+
return /* @__PURE__ */ jsxs122("div", { className: "df aic jcsb sm_w100", children: [
|
|
28274
|
+
/* @__PURE__ */ jsx236("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ jsx236(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
|
|
28275
|
+
/* @__PURE__ */ jsxs122("div", { className: "df aic gap1", children: [
|
|
28276
|
+
/* @__PURE__ */ jsx236(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
28277
|
+
onSaveAndExit && /* @__PURE__ */ jsx236(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
28278
|
+
isLastStep ? /* @__PURE__ */ jsx236(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ jsx236(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
|
|
28164
28279
|
await onContinue?.();
|
|
28165
28280
|
}, disabled: primaryDisabled })
|
|
28166
28281
|
] })
|
|
@@ -28168,8 +28283,8 @@ function WorkflowActions(props) {
|
|
|
28168
28283
|
}
|
|
28169
28284
|
|
|
28170
28285
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
28171
|
-
import { trussProps as
|
|
28172
|
-
import { jsx as
|
|
28286
|
+
import { trussProps as trussProps136, mergeProps as mergeProps41, maybeCssVar as maybeCssVar69 } from "@homebound/truss/runtime";
|
|
28287
|
+
import { jsx as jsx237, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
28173
28288
|
var __maybeInc34 = (inc) => {
|
|
28174
28289
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28175
28290
|
};
|
|
@@ -28197,8 +28312,8 @@ function WorkflowPageLayout(props) {
|
|
|
28197
28312
|
isDirty,
|
|
28198
28313
|
onCancel
|
|
28199
28314
|
});
|
|
28200
|
-
const actions = /* @__PURE__ */
|
|
28201
|
-
const headerMetricsRef =
|
|
28315
|
+
const actions = /* @__PURE__ */ jsx237(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
|
|
28316
|
+
const headerMetricsRef = useRef72(null);
|
|
28202
28317
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
28203
28318
|
const headerWidth = documentScrollChromeWidth();
|
|
28204
28319
|
const outerTop = bannerAndNavbarChromeTop();
|
|
@@ -28206,7 +28321,7 @@ function WorkflowPageLayout(props) {
|
|
|
28206
28321
|
[beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
|
|
28207
28322
|
} : void 0;
|
|
28208
28323
|
const showFooter = isMobile;
|
|
28209
|
-
|
|
28324
|
+
useLayoutEffect15(() => {
|
|
28210
28325
|
const root = document.documentElement;
|
|
28211
28326
|
const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
|
|
28212
28327
|
root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
|
|
@@ -28218,26 +28333,26 @@ function WorkflowPageLayout(props) {
|
|
|
28218
28333
|
}
|
|
28219
28334
|
};
|
|
28220
28335
|
}, [showFooter]);
|
|
28221
|
-
return /* @__PURE__ */
|
|
28222
|
-
/* @__PURE__ */
|
|
28336
|
+
return /* @__PURE__ */ jsxs123(DocumentScrollLayoutProvider, { children: [
|
|
28337
|
+
/* @__PURE__ */ jsxs123("div", { ...mergeProps41(void 0, cssVars, {
|
|
28223
28338
|
display: "df",
|
|
28224
28339
|
flexDirection: "fdc",
|
|
28225
28340
|
width: "w100"
|
|
28226
28341
|
}), ...tid, children: [
|
|
28227
|
-
/* @__PURE__ */
|
|
28342
|
+
/* @__PURE__ */ jsx237("div", { ref: headerMetricsRef, ...trussProps136({
|
|
28228
28343
|
position: "sticky",
|
|
28229
28344
|
left: "left0",
|
|
28230
28345
|
width: ["w_var", {
|
|
28231
|
-
"--width":
|
|
28346
|
+
"--width": maybeCssVar69(__maybeInc34(headerWidth))
|
|
28232
28347
|
}],
|
|
28233
28348
|
zIndex: ["z_var", {
|
|
28234
|
-
"--zIndex":
|
|
28349
|
+
"--zIndex": maybeCssVar69(zIndices.pageStickyHeader)
|
|
28235
28350
|
}],
|
|
28236
28351
|
top: ["top_var", {
|
|
28237
|
-
"--top":
|
|
28352
|
+
"--top": maybeCssVar69(__maybeInc34(outerTop))
|
|
28238
28353
|
}]
|
|
28239
|
-
}), ...tid.header, children: /* @__PURE__ */
|
|
28240
|
-
/* @__PURE__ */
|
|
28354
|
+
}), ...tid.header, children: /* @__PURE__ */ jsx237(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? void 0 : actions, stepperTabs }) }),
|
|
28355
|
+
/* @__PURE__ */ jsx237("div", { ...trussProps136({
|
|
28241
28356
|
...{
|
|
28242
28357
|
display: "df",
|
|
28243
28358
|
flexDirection: "fdc",
|
|
@@ -28249,28 +28364,28 @@ function WorkflowPageLayout(props) {
|
|
|
28249
28364
|
...aiMode && {
|
|
28250
28365
|
backgroundImage: "aiBackground",
|
|
28251
28366
|
minHeight: ["mh_var", {
|
|
28252
|
-
"--minHeight":
|
|
28367
|
+
"--minHeight": maybeCssVar69(documentScrollBodyMinHeight())
|
|
28253
28368
|
}]
|
|
28254
28369
|
}
|
|
28255
28370
|
}), ...tid.body, children }),
|
|
28256
|
-
showFooter && /* @__PURE__ */
|
|
28371
|
+
showFooter && /* @__PURE__ */ jsx237("div", { ...trussProps136({
|
|
28257
28372
|
flexShrink: "fs0",
|
|
28258
28373
|
width: "w100",
|
|
28259
28374
|
height: ["h_var", {
|
|
28260
28375
|
"--height": `${mobileFooterHeightPx}px`
|
|
28261
28376
|
}]
|
|
28262
|
-
}), children: /* @__PURE__ */
|
|
28377
|
+
}), children: /* @__PURE__ */ jsx237("div", { ...trussProps136({
|
|
28263
28378
|
...{
|
|
28264
28379
|
position: "fixed",
|
|
28265
28380
|
bottom: "bottom0",
|
|
28266
28381
|
width: ["w_var", {
|
|
28267
|
-
"--width":
|
|
28382
|
+
"--width": maybeCssVar69(__maybeInc34(headerWidth))
|
|
28268
28383
|
}],
|
|
28269
28384
|
height: ["h_var", {
|
|
28270
28385
|
"--height": `${mobileFooterHeightPx}px`
|
|
28271
28386
|
}],
|
|
28272
28387
|
zIndex: ["z_var", {
|
|
28273
|
-
"--zIndex":
|
|
28388
|
+
"--zIndex": maybeCssVar69(zIndices.pageStickyFooter)
|
|
28274
28389
|
}],
|
|
28275
28390
|
display: "df",
|
|
28276
28391
|
alignItems: "aic",
|
|
@@ -28288,12 +28403,12 @@ function WorkflowPageLayout(props) {
|
|
|
28288
28403
|
...pageContentPaddingX
|
|
28289
28404
|
}), ...tid.footer, children: actions }) })
|
|
28290
28405
|
] }),
|
|
28291
|
-
navigationBlocker && /* @__PURE__ */
|
|
28406
|
+
navigationBlocker && /* @__PURE__ */ jsx237(UnsavedChangesNavigationModal, { ...navigationBlocker })
|
|
28292
28407
|
] });
|
|
28293
28408
|
}
|
|
28294
28409
|
|
|
28295
28410
|
// src/layouts/Workflow/FocusedFormLayout.tsx
|
|
28296
|
-
import { jsx as
|
|
28411
|
+
import { jsx as jsx238, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
28297
28412
|
function FocusedFormLayout(props) {
|
|
28298
28413
|
const {
|
|
28299
28414
|
onCancel,
|
|
@@ -28320,25 +28435,25 @@ function FocusedFormLayout(props) {
|
|
|
28320
28435
|
});
|
|
28321
28436
|
const activeId = useActiveJumpLink(jumpLinks.map((link) => link.id));
|
|
28322
28437
|
const showRail = withJumpLinks && jumpLinks.length >= 2 && !isMobile;
|
|
28323
|
-
return /* @__PURE__ */
|
|
28324
|
-
showRail && /* @__PURE__ */
|
|
28325
|
-
/* @__PURE__ */
|
|
28438
|
+
return /* @__PURE__ */ jsx238(WorkflowPageLayout, { ...tid, ...headerProps, aiMode, isDirty, onCancel, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !isValid, children: /* @__PURE__ */ jsxs124("div", { className: "df w100", children: [
|
|
28439
|
+
showRail && /* @__PURE__ */ jsx238(JumpLinksRail, { links: jumpLinks, activeId, ...tid.jumpLinks }),
|
|
28440
|
+
/* @__PURE__ */ jsx238("div", { className: "fg1 mw0 mb4", children: /* @__PURE__ */ jsx238(FormSectionLayout, { ...form, aiMode }) })
|
|
28326
28441
|
] }) });
|
|
28327
28442
|
}
|
|
28328
28443
|
|
|
28329
28444
|
// src/layouts/Workflow/StepperLayout.tsx
|
|
28330
|
-
import { useState as
|
|
28331
|
-
import { jsx as
|
|
28445
|
+
import { useState as useState64 } from "react";
|
|
28446
|
+
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
28332
28447
|
function StepperLayout(props) {
|
|
28333
28448
|
const { steps, defaultStep, onCancel, completeLabel, onComplete, onSaveAndExit, isDirty, aiMode, ...headerProps } = props;
|
|
28334
28449
|
const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
|
|
28335
|
-
const [currentStep, setCurrentStep] =
|
|
28450
|
+
const [currentStep, setCurrentStep] = useState64(() => getInitialStep(stepTabs, defaultStep));
|
|
28336
28451
|
const tid = useTestIds(props, "stepperLayout");
|
|
28337
28452
|
const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
|
|
28338
28453
|
const isFirstStep = currentIndex <= 0;
|
|
28339
28454
|
const isLastStep = currentIndex >= stepTabs.length - 1;
|
|
28340
28455
|
const activeStep = stepTabs[currentIndex];
|
|
28341
|
-
return /* @__PURE__ */
|
|
28456
|
+
return /* @__PURE__ */ jsx239(
|
|
28342
28457
|
WorkflowPageLayout,
|
|
28343
28458
|
{
|
|
28344
28459
|
...tid,
|
|
@@ -28482,6 +28597,7 @@ export {
|
|
|
28482
28597
|
Icon,
|
|
28483
28598
|
IconButton,
|
|
28484
28599
|
Icons,
|
|
28600
|
+
InlineFeedbackBanner,
|
|
28485
28601
|
JumpLink,
|
|
28486
28602
|
KEPT_GROUP,
|
|
28487
28603
|
Loader,
|