@homebound/beam 3.94.0 → 3.96.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 +398 -340
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +388 -330
- package/dist/index.js.map +1 -1
- package/dist/truss.css +6 -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) {
|
|
@@ -24527,15 +24565,27 @@ function Tag(props) {
|
|
|
24527
24565
|
}
|
|
24528
24566
|
function getVariantStyles(variant, type) {
|
|
24529
24567
|
if (variant === "secondary") {
|
|
24568
|
+
const isAi = type === "ai";
|
|
24530
24569
|
return {
|
|
24531
|
-
background: {
|
|
24570
|
+
background: isAi ? {
|
|
24571
|
+
backgroundColor: "bgWhite",
|
|
24572
|
+
borderColor: "bcPurple600",
|
|
24573
|
+
borderWidth: "bw1",
|
|
24574
|
+
borderStyle: "bss",
|
|
24575
|
+
color: "purple800"
|
|
24576
|
+
} : {
|
|
24532
24577
|
backgroundColor: "bgWhite",
|
|
24533
24578
|
borderColor: "bcGray300",
|
|
24534
24579
|
borderWidth: "bw1",
|
|
24535
24580
|
borderStyle: "bss"
|
|
24536
24581
|
},
|
|
24537
|
-
|
|
24538
|
-
|
|
24582
|
+
// Note: Ai tags shouldn't be using any icon, the purple outline/text is enough
|
|
24583
|
+
iconColor: isAi ? "rgba(124, 58, 237, 1)" /* Purple600 */ : "rgba(100, 100, 100, 1)" /* Gray700 */,
|
|
24584
|
+
typography: isAi ? {
|
|
24585
|
+
fontWeight: "fw6",
|
|
24586
|
+
fontSize: "fz_12px",
|
|
24587
|
+
lineHeight: "lh_16px"
|
|
24588
|
+
} : {
|
|
24539
24589
|
fontWeight: "fw4",
|
|
24540
24590
|
fontSize: "fz_12px",
|
|
24541
24591
|
lineHeight: "lh_16px"
|
|
@@ -24597,6 +24647,14 @@ function getPrimaryStyles(type) {
|
|
|
24597
24647
|
},
|
|
24598
24648
|
iconColor: "rgba(5, 150, 105, 1)" /* Green600 */
|
|
24599
24649
|
};
|
|
24650
|
+
// Note: Ai tags shouldn't be using any icon, the purple background is enough
|
|
24651
|
+
case "ai":
|
|
24652
|
+
return {
|
|
24653
|
+
background: {
|
|
24654
|
+
backgroundColor: "bgPurple200"
|
|
24655
|
+
},
|
|
24656
|
+
iconColor: "rgba(124, 58, 237, 1)" /* Purple600 */
|
|
24657
|
+
};
|
|
24600
24658
|
default:
|
|
24601
24659
|
return {
|
|
24602
24660
|
background: {
|
|
@@ -24608,7 +24666,7 @@ function getPrimaryStyles(type) {
|
|
|
24608
24666
|
}
|
|
24609
24667
|
|
|
24610
24668
|
// src/components/Card.tsx
|
|
24611
|
-
import { trussProps as trussProps109, maybeCssVar as
|
|
24669
|
+
import { trussProps as trussProps109, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
24612
24670
|
import { jsx as jsx195, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
24613
24671
|
function Card(props) {
|
|
24614
24672
|
const {
|
|
@@ -24669,7 +24727,7 @@ function Card(props) {
|
|
|
24669
24727
|
width: "w100",
|
|
24670
24728
|
height: "h100",
|
|
24671
24729
|
objectFit: ["objectFit_var", {
|
|
24672
|
-
"--objectFit":
|
|
24730
|
+
"--objectFit": maybeCssVar54(imageFit)
|
|
24673
24731
|
}]
|
|
24674
24732
|
}), src: imgSrc, alt: title, ...tid.img }) }),
|
|
24675
24733
|
isHovered && buttonMenuItems && /* @__PURE__ */ jsx195("div", { ...trussProps109({
|
|
@@ -25035,7 +25093,7 @@ function ResponsiveGridItem(props) {
|
|
|
25035
25093
|
|
|
25036
25094
|
// src/components/Grid/useResponsiveGrid.ts
|
|
25037
25095
|
import { useMemo as useMemo47 } from "react";
|
|
25038
|
-
import { maybeCssVar as
|
|
25096
|
+
import { maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
25039
25097
|
var __maybeInc25 = (inc) => {
|
|
25040
25098
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25041
25099
|
};
|
|
@@ -25054,11 +25112,11 @@ function useResponsiveGrid(props) {
|
|
|
25054
25112
|
return {
|
|
25055
25113
|
display: "dg",
|
|
25056
25114
|
gridTemplateColumns: ["gtc_var", {
|
|
25057
|
-
"--gridTemplateColumns":
|
|
25115
|
+
"--gridTemplateColumns": maybeCssVar55(gridTemplateColumns)
|
|
25058
25116
|
}],
|
|
25059
25117
|
containerType: "ctis",
|
|
25060
25118
|
gap: ["gap_var", {
|
|
25061
|
-
"--gap":
|
|
25119
|
+
"--gap": maybeCssVar55(__maybeInc25(gridGap))
|
|
25062
25120
|
}]
|
|
25063
25121
|
};
|
|
25064
25122
|
}, [minColumnWidth, gap, columns]);
|
|
@@ -25181,7 +25239,7 @@ function HbSpinnerProvider({
|
|
|
25181
25239
|
}
|
|
25182
25240
|
|
|
25183
25241
|
// src/components/InlineFeedbackBanner.tsx
|
|
25184
|
-
import { trussProps as trussProps113, maybeCssVar as
|
|
25242
|
+
import { trussProps as trussProps113, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
|
|
25185
25243
|
import { jsx as jsx201, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
25186
25244
|
function InlineFeedbackBanner(props) {
|
|
25187
25245
|
const {
|
|
@@ -25226,7 +25284,7 @@ function InlineFeedbackBanner(props) {
|
|
|
25226
25284
|
borderStyle: "bss",
|
|
25227
25285
|
borderWidth: "bw1",
|
|
25228
25286
|
borderColor: ["bc_var", {
|
|
25229
|
-
"--borderColor":
|
|
25287
|
+
"--borderColor": maybeCssVar56(borderColor)
|
|
25230
25288
|
}],
|
|
25231
25289
|
boxShadow: "bshBasic"
|
|
25232
25290
|
}), ...tid, children: [
|
|
@@ -25258,7 +25316,7 @@ var typeStyles2 = {
|
|
|
25258
25316
|
};
|
|
25259
25317
|
|
|
25260
25318
|
// src/components/JumpLink.tsx
|
|
25261
|
-
import { useRef as
|
|
25319
|
+
import { useRef as useRef60 } from "react";
|
|
25262
25320
|
import { mergeProps as mergeProps30, useFocusRing as useFocusRing16, useHover as useHover19, useLink } from "react-aria";
|
|
25263
25321
|
import { trussProps as trussProps114 } from "@homebound/truss/runtime";
|
|
25264
25322
|
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
@@ -25271,7 +25329,7 @@ function JumpLink(props) {
|
|
|
25271
25329
|
__storyState,
|
|
25272
25330
|
...otherProps
|
|
25273
25331
|
} = props;
|
|
25274
|
-
const ref =
|
|
25332
|
+
const ref = useRef60(null);
|
|
25275
25333
|
const {
|
|
25276
25334
|
linkProps
|
|
25277
25335
|
} = useLink({
|
|
@@ -25358,29 +25416,29 @@ var jumpLinkStyles = {
|
|
|
25358
25416
|
};
|
|
25359
25417
|
|
|
25360
25418
|
// src/components/MaxLines.tsx
|
|
25361
|
-
import { useLayoutEffect as
|
|
25362
|
-
import { useCallback as
|
|
25363
|
-
import { trussProps as trussProps115, maybeCssVar as
|
|
25419
|
+
import { useLayoutEffect as useLayoutEffect10, useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
25420
|
+
import { useCallback as useCallback34, useEffect as useEffect33, useRef as useRef61, useState as useState53 } from "react";
|
|
25421
|
+
import { trussProps as trussProps115, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
|
|
25364
25422
|
import { jsx as jsx203, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
25365
25423
|
function MaxLines({
|
|
25366
25424
|
maxLines,
|
|
25367
25425
|
children
|
|
25368
25426
|
}) {
|
|
25369
|
-
const elRef =
|
|
25370
|
-
const [hasMore, setHasMore] =
|
|
25371
|
-
const [expanded, setExpanded] =
|
|
25372
|
-
|
|
25427
|
+
const elRef = useRef61(null);
|
|
25428
|
+
const [hasMore, setHasMore] = useState53(false);
|
|
25429
|
+
const [expanded, setExpanded] = useState53(false);
|
|
25430
|
+
useLayoutEffect10(() => {
|
|
25373
25431
|
if (!elRef.current) return;
|
|
25374
25432
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
25375
25433
|
}, []);
|
|
25376
25434
|
useEffect33(() => {
|
|
25377
25435
|
setExpanded(false);
|
|
25378
25436
|
}, [children]);
|
|
25379
|
-
const onResize =
|
|
25437
|
+
const onResize = useCallback34(() => {
|
|
25380
25438
|
if (!elRef.current) return;
|
|
25381
25439
|
!expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
25382
25440
|
}, [expanded]);
|
|
25383
|
-
|
|
25441
|
+
useResizeObserver9({
|
|
25384
25442
|
ref: elRef,
|
|
25385
25443
|
onResize
|
|
25386
25444
|
});
|
|
@@ -25388,7 +25446,7 @@ function MaxLines({
|
|
|
25388
25446
|
/* @__PURE__ */ jsx203("div", { ref: elRef, ...trussProps115({
|
|
25389
25447
|
...!expanded ? {
|
|
25390
25448
|
WebkitLineClamp: ["lineClamp_var", {
|
|
25391
|
-
"--WebkitLineClamp":
|
|
25449
|
+
"--WebkitLineClamp": maybeCssVar57(maxLines)
|
|
25392
25450
|
}],
|
|
25393
25451
|
overflow: "oh",
|
|
25394
25452
|
display: "d_negwebkit_box",
|
|
@@ -25404,12 +25462,12 @@ function MaxLines({
|
|
|
25404
25462
|
import { camelCase as camelCase6 } from "change-case";
|
|
25405
25463
|
|
|
25406
25464
|
// src/components/AppNav/AppNavGroup.tsx
|
|
25407
|
-
import { useResizeObserver as
|
|
25465
|
+
import { useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
|
|
25408
25466
|
import { camelCase as camelCase5, kebabCase } from "change-case";
|
|
25409
|
-
import { useCallback as
|
|
25467
|
+
import { useCallback as useCallback36, useEffect as useEffect34, useMemo as useMemo51, useState as useState55 } from "react";
|
|
25410
25468
|
|
|
25411
25469
|
// src/components/AppNav/AppNavGroupTrigger.tsx
|
|
25412
|
-
import { useMemo as useMemo50, useRef as
|
|
25470
|
+
import { useMemo as useMemo50, useRef as useRef62 } from "react";
|
|
25413
25471
|
import { mergeProps as mergeProps31, useButton as useButton11, useFocusRing as useFocusRing17, useHover as useHover20 } from "react-aria";
|
|
25414
25472
|
import { trussProps as trussProps116, mergeProps as mergeProps_14 } from "@homebound/truss/runtime";
|
|
25415
25473
|
import { jsx as jsx204, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
@@ -25422,7 +25480,7 @@ function AppNavGroupTrigger(props) {
|
|
|
25422
25480
|
active = false
|
|
25423
25481
|
} = props;
|
|
25424
25482
|
const tid = useTestIds(props, "trigger");
|
|
25425
|
-
const ref =
|
|
25483
|
+
const ref = useRef62(null);
|
|
25426
25484
|
const {
|
|
25427
25485
|
buttonProps,
|
|
25428
25486
|
isPressed
|
|
@@ -25581,7 +25639,7 @@ function entryHasIcons(item) {
|
|
|
25581
25639
|
}
|
|
25582
25640
|
|
|
25583
25641
|
// src/components/AppNav/useAppNavGroupExpanded.ts
|
|
25584
|
-
import { useCallback as
|
|
25642
|
+
import { useCallback as useCallback35, useState as useState54 } from "react";
|
|
25585
25643
|
var APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY = "beam.appNav.expandedLinkGroups";
|
|
25586
25644
|
function loadStored() {
|
|
25587
25645
|
try {
|
|
@@ -25600,13 +25658,13 @@ function persistLabel(label, expanded) {
|
|
|
25600
25658
|
}
|
|
25601
25659
|
function useAppNavGroupExpanded(linkGroup) {
|
|
25602
25660
|
const { label } = linkGroup;
|
|
25603
|
-
const [userExpanded, setUserExpanded] =
|
|
25661
|
+
const [userExpanded, setUserExpanded] = useState54(() => {
|
|
25604
25662
|
const stored = loadStored();
|
|
25605
25663
|
return label in stored ? stored[label] : null;
|
|
25606
25664
|
});
|
|
25607
25665
|
const hasActiveLink = appNavLinkGroupLinks(linkGroup).some((l) => l.active);
|
|
25608
25666
|
const expanded = userExpanded !== null ? userExpanded : hasActiveLink ? true : linkGroup.defaultExpanded ?? false;
|
|
25609
|
-
const onToggle =
|
|
25667
|
+
const onToggle = useCallback35(() => {
|
|
25610
25668
|
const next = !expanded;
|
|
25611
25669
|
setUserExpanded(next);
|
|
25612
25670
|
persistLabel(label, next);
|
|
@@ -25615,7 +25673,7 @@ function useAppNavGroupExpanded(linkGroup) {
|
|
|
25615
25673
|
}
|
|
25616
25674
|
|
|
25617
25675
|
// src/components/AppNav/AppNavGroup.tsx
|
|
25618
|
-
import { trussProps as trussProps117, maybeCssVar as
|
|
25676
|
+
import { trussProps as trussProps117, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
|
|
25619
25677
|
import { Fragment as Fragment45, jsx as jsx205, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
25620
25678
|
var __maybeInc26 = (inc) => {
|
|
25621
25679
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -25641,20 +25699,20 @@ function AppNavGroupDisclosure(props) {
|
|
|
25641
25699
|
} = useAppNavGroupExpanded(linkGroup);
|
|
25642
25700
|
const tid = useTestIds(props, "linkGroup");
|
|
25643
25701
|
const navGroupId = `nav-group-${kebabCase(linkGroup.label)}`;
|
|
25644
|
-
const [contentEl, setContentEl] =
|
|
25702
|
+
const [contentEl, setContentEl] = useState55(null);
|
|
25645
25703
|
const contentRef = useMemo51(() => ({
|
|
25646
25704
|
current: contentEl
|
|
25647
25705
|
}), [contentEl]);
|
|
25648
|
-
const [contentHeight, setContentHeight] =
|
|
25706
|
+
const [contentHeight, setContentHeight] = useState55(expanded ? "auto" : "0");
|
|
25649
25707
|
useEffect34(() => {
|
|
25650
25708
|
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
25651
25709
|
}, [expanded, contentEl]);
|
|
25652
|
-
const onResize =
|
|
25710
|
+
const onResize = useCallback36(() => {
|
|
25653
25711
|
if (contentEl && expanded) {
|
|
25654
25712
|
setContentHeight(`${contentEl.scrollHeight}px`);
|
|
25655
25713
|
}
|
|
25656
25714
|
}, [expanded, contentEl]);
|
|
25657
|
-
|
|
25715
|
+
useResizeObserver10({
|
|
25658
25716
|
ref: contentRef,
|
|
25659
25717
|
onResize
|
|
25660
25718
|
});
|
|
@@ -25664,7 +25722,7 @@ function AppNavGroupDisclosure(props) {
|
|
|
25664
25722
|
overflow: "oh",
|
|
25665
25723
|
transition: "transitionHeight",
|
|
25666
25724
|
height: ["h_var", {
|
|
25667
|
-
"--height":
|
|
25725
|
+
"--height": maybeCssVar58(__maybeInc26(contentHeight))
|
|
25668
25726
|
}]
|
|
25669
25727
|
}), ...tid.panel, ...!expanded ? {
|
|
25670
25728
|
inert: "true"
|
|
@@ -25796,17 +25854,17 @@ function AppNavItems(props) {
|
|
|
25796
25854
|
|
|
25797
25855
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
25798
25856
|
import { AnimatePresence as AnimatePresence6, motion as motion6 } from "framer-motion";
|
|
25799
|
-
import { useEffect as useEffect35, useState as
|
|
25857
|
+
import { useEffect as useEffect35, useState as useState57 } from "react";
|
|
25800
25858
|
import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll3 } from "react-aria";
|
|
25801
25859
|
import { createPortal as createPortal7 } from "react-dom";
|
|
25802
25860
|
import { useLocation } from "react-router-dom";
|
|
25803
25861
|
|
|
25804
25862
|
// src/layouts/NavbarLayout/MobileSubNavContext.tsx
|
|
25805
|
-
import { createContext as createContext14, useContext as useContext26, useLayoutEffect as
|
|
25863
|
+
import { createContext as createContext14, useContext as useContext26, useLayoutEffect as useLayoutEffect11, useMemo as useMemo52, useState as useState56 } from "react";
|
|
25806
25864
|
import { jsx as jsx209 } from "react/jsx-runtime";
|
|
25807
25865
|
var MobileSubNavContext = createContext14(void 0);
|
|
25808
25866
|
function MobileSubNavProvider(props) {
|
|
25809
|
-
const [mobileSubNav, setMobileSubNav] =
|
|
25867
|
+
const [mobileSubNav, setMobileSubNav] = useState56(null);
|
|
25810
25868
|
const value = useMemo52(() => ({ mobileSubNav, setMobileSubNav }), [mobileSubNav]);
|
|
25811
25869
|
return /* @__PURE__ */ jsx209(MobileSubNavContext.Provider, { value, children: props.children });
|
|
25812
25870
|
}
|
|
@@ -25818,11 +25876,11 @@ function useRegisterMobileSubNav(content) {
|
|
|
25818
25876
|
const setMobileSubNav = ctx?.setMobileSubNav;
|
|
25819
25877
|
const enabled = !useBreakpoint().mdAndUp;
|
|
25820
25878
|
const { top, items, footer } = content;
|
|
25821
|
-
|
|
25879
|
+
useLayoutEffect11(() => {
|
|
25822
25880
|
if (!setMobileSubNav || !enabled) return;
|
|
25823
25881
|
setMobileSubNav({ top, items, footer });
|
|
25824
25882
|
}, [setMobileSubNav, enabled, top, items, footer]);
|
|
25825
|
-
|
|
25883
|
+
useLayoutEffect11(() => {
|
|
25826
25884
|
if (!setMobileSubNav || !enabled) return;
|
|
25827
25885
|
return () => setMobileSubNav(null);
|
|
25828
25886
|
}, [setMobileSubNav, enabled]);
|
|
@@ -25830,15 +25888,15 @@ function useRegisterMobileSubNav(content) {
|
|
|
25830
25888
|
}
|
|
25831
25889
|
|
|
25832
25890
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
25833
|
-
import { trussProps as trussProps119, mergeProps as mergeProps32, maybeCssVar as
|
|
25891
|
+
import { trussProps as trussProps119, mergeProps as mergeProps32, maybeCssVar as maybeCssVar59 } from "@homebound/truss/runtime";
|
|
25834
25892
|
import { Fragment as Fragment47, jsx as jsx210, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
25835
25893
|
function NavbarMobileMenu(props) {
|
|
25836
25894
|
const {
|
|
25837
25895
|
items
|
|
25838
25896
|
} = props;
|
|
25839
25897
|
const tid = useTestIds(props, "navbar");
|
|
25840
|
-
const [isOpen, setIsOpen] =
|
|
25841
|
-
const [level, setLevel] =
|
|
25898
|
+
const [isOpen, setIsOpen] = useState57(false);
|
|
25899
|
+
const [level, setLevel] = useState57("sub");
|
|
25842
25900
|
const {
|
|
25843
25901
|
pathname,
|
|
25844
25902
|
search
|
|
@@ -25887,7 +25945,7 @@ function NavbarMobileDrawer({
|
|
|
25887
25945
|
bottom: "bottom0",
|
|
25888
25946
|
left: "left0",
|
|
25889
25947
|
zIndex: ["z_var", {
|
|
25890
|
-
"--zIndex":
|
|
25948
|
+
"--zIndex": maybeCssVar59(zIndices.navbarMobileMenuScrim)
|
|
25891
25949
|
}],
|
|
25892
25950
|
backgroundColor: ["bgColor_var", {
|
|
25893
25951
|
"--backgroundColor": "var(--b-scrim)"
|
|
@@ -25912,7 +25970,7 @@ function NavbarMobileDrawer({
|
|
|
25912
25970
|
width: "w_260px",
|
|
25913
25971
|
overflow: "oh",
|
|
25914
25972
|
zIndex: ["z_var", {
|
|
25915
|
-
"--zIndex":
|
|
25973
|
+
"--zIndex": maybeCssVar59(zIndices.navbarMobileMenu)
|
|
25916
25974
|
}],
|
|
25917
25975
|
backgroundColor: ["bgColor_var", {
|
|
25918
25976
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -26164,9 +26222,9 @@ function toPageNumberSize(page) {
|
|
|
26164
26222
|
}
|
|
26165
26223
|
|
|
26166
26224
|
// src/components/ScrollShadows.tsx
|
|
26167
|
-
import { useResizeObserver as
|
|
26168
|
-
import { useCallback as
|
|
26169
|
-
import { trussProps as trussProps122, maybeCssVar as
|
|
26225
|
+
import { useResizeObserver as useResizeObserver11 } from "@react-aria/utils";
|
|
26226
|
+
import { useCallback as useCallback37, useMemo as useMemo53, useRef as useRef63, useState as useState58 } from "react";
|
|
26227
|
+
import { trussProps as trussProps122, maybeCssVar as maybeCssVar60 } from "@homebound/truss/runtime";
|
|
26170
26228
|
import { jsx as jsx213, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
26171
26229
|
function ScrollShadows(props) {
|
|
26172
26230
|
const {
|
|
@@ -26183,15 +26241,15 @@ function ScrollShadows(props) {
|
|
|
26183
26241
|
if (!bgColor.includes("rgba")) {
|
|
26184
26242
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
26185
26243
|
}
|
|
26186
|
-
const [showStartShadow, setShowStartShadow] =
|
|
26187
|
-
const [showEndShadow, setShowEndShadow] =
|
|
26188
|
-
const scrollRef =
|
|
26244
|
+
const [showStartShadow, setShowStartShadow] = useState58(false);
|
|
26245
|
+
const [showEndShadow, setShowEndShadow] = useState58(false);
|
|
26246
|
+
const scrollRef = useRef63(null);
|
|
26189
26247
|
const [startShadowStyles, endShadowStyles] = useMemo53(() => {
|
|
26190
26248
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
26191
26249
|
const commonStyles = {
|
|
26192
26250
|
position: "absolute",
|
|
26193
26251
|
zIndex: ["z_var", {
|
|
26194
|
-
"--zIndex":
|
|
26252
|
+
"--zIndex": maybeCssVar60(zIndices.scrollShadow)
|
|
26195
26253
|
}],
|
|
26196
26254
|
pointerEvents: "pointerEvents_none"
|
|
26197
26255
|
};
|
|
@@ -26224,7 +26282,7 @@ function ScrollShadows(props) {
|
|
|
26224
26282
|
...startShadowStyles2,
|
|
26225
26283
|
...{
|
|
26226
26284
|
background: ["background_var", {
|
|
26227
|
-
"--background":
|
|
26285
|
+
"--background": maybeCssVar60(startGradient)
|
|
26228
26286
|
}]
|
|
26229
26287
|
}
|
|
26230
26288
|
}, {
|
|
@@ -26232,12 +26290,12 @@ function ScrollShadows(props) {
|
|
|
26232
26290
|
...endShadowStyles2,
|
|
26233
26291
|
...{
|
|
26234
26292
|
background: ["background_var", {
|
|
26235
|
-
"--background":
|
|
26293
|
+
"--background": maybeCssVar60(endGradient)
|
|
26236
26294
|
}]
|
|
26237
26295
|
}
|
|
26238
26296
|
}];
|
|
26239
26297
|
}, [horizontal, bgColor]);
|
|
26240
|
-
const updateScrollProps =
|
|
26298
|
+
const updateScrollProps = useCallback37((el) => {
|
|
26241
26299
|
const {
|
|
26242
26300
|
scrollTop,
|
|
26243
26301
|
scrollHeight,
|
|
@@ -26252,15 +26310,15 @@ function ScrollShadows(props) {
|
|
|
26252
26310
|
setShowStartShadow(start > 0);
|
|
26253
26311
|
setShowEndShadow(start + boxSize < end);
|
|
26254
26312
|
}, [horizontal]);
|
|
26255
|
-
const onResize =
|
|
26256
|
-
|
|
26313
|
+
const onResize = useCallback37(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
26314
|
+
useResizeObserver11({
|
|
26257
26315
|
ref: scrollRef,
|
|
26258
26316
|
onResize
|
|
26259
26317
|
});
|
|
26260
26318
|
return /* @__PURE__ */ jsxs108("div", { ...trussProps122({
|
|
26261
26319
|
display: "df",
|
|
26262
26320
|
flexDirection: ["fd_var", {
|
|
26263
|
-
"--flexDirection":
|
|
26321
|
+
"--flexDirection": maybeCssVar60(!horizontal ? "column" : "row")
|
|
26264
26322
|
}],
|
|
26265
26323
|
position: "relative",
|
|
26266
26324
|
overflow: "oh",
|
|
@@ -26277,7 +26335,7 @@ function ScrollShadows(props) {
|
|
|
26277
26335
|
...startShadowStyles,
|
|
26278
26336
|
...{
|
|
26279
26337
|
opacity: ["o_var", {
|
|
26280
|
-
"--opacity":
|
|
26338
|
+
"--opacity": maybeCssVar60(showStartShadow ? 1 : 0)
|
|
26281
26339
|
}]
|
|
26282
26340
|
}
|
|
26283
26341
|
}), "data-chromatic": "ignore" }),
|
|
@@ -26285,7 +26343,7 @@ function ScrollShadows(props) {
|
|
|
26285
26343
|
...endShadowStyles,
|
|
26286
26344
|
...{
|
|
26287
26345
|
opacity: ["o_var", {
|
|
26288
|
-
"--opacity":
|
|
26346
|
+
"--opacity": maybeCssVar60(showEndShadow ? 1 : 0)
|
|
26289
26347
|
}]
|
|
26290
26348
|
}
|
|
26291
26349
|
}), "data-chromatic": "ignore" }),
|
|
@@ -26303,12 +26361,12 @@ function ScrollShadows(props) {
|
|
|
26303
26361
|
// src/layouts/SideNavLayout/SideNavLayoutContext.tsx
|
|
26304
26362
|
import {
|
|
26305
26363
|
createContext as createContext15,
|
|
26306
|
-
useCallback as
|
|
26364
|
+
useCallback as useCallback38,
|
|
26307
26365
|
useContext as useContext27,
|
|
26308
26366
|
useEffect as useEffect36,
|
|
26309
26367
|
useMemo as useMemo54,
|
|
26310
|
-
useRef as
|
|
26311
|
-
useState as
|
|
26368
|
+
useRef as useRef64,
|
|
26369
|
+
useState as useState59
|
|
26312
26370
|
} from "react";
|
|
26313
26371
|
import { jsx as jsx214 } from "react/jsx-runtime";
|
|
26314
26372
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
@@ -26334,18 +26392,18 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
26334
26392
|
}
|
|
26335
26393
|
var SideNavLayoutContext = createContext15(void 0);
|
|
26336
26394
|
function SideNavLayoutProvider(props) {
|
|
26337
|
-
const [navState, setNavStateInternal] =
|
|
26395
|
+
const [navState, setNavStateInternal] = useState59(
|
|
26338
26396
|
() => resolveInitialNavState(props.defaultNavState)
|
|
26339
26397
|
);
|
|
26340
26398
|
const bp = useBreakpoint();
|
|
26341
|
-
const prevMdAndUp =
|
|
26399
|
+
const prevMdAndUp = useRef64(bp.mdAndUp);
|
|
26342
26400
|
useEffect36(() => {
|
|
26343
26401
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
26344
26402
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
26345
26403
|
}
|
|
26346
26404
|
prevMdAndUp.current = bp.mdAndUp;
|
|
26347
26405
|
}, [bp.mdAndUp]);
|
|
26348
|
-
const setNavState =
|
|
26406
|
+
const setNavState = useCallback38((value2) => {
|
|
26349
26407
|
setNavStateInternal((prev) => {
|
|
26350
26408
|
const next = typeof value2 === "function" ? value2(prev) : value2;
|
|
26351
26409
|
if (next === "expanded" || next === "collapse") {
|
|
@@ -26424,10 +26482,10 @@ function SideNav(props) {
|
|
|
26424
26482
|
}
|
|
26425
26483
|
|
|
26426
26484
|
// src/components/Snackbar/useSnackbar.tsx
|
|
26427
|
-
import { useCallback as
|
|
26485
|
+
import { useCallback as useCallback39, useEffect as useEffect37 } from "react";
|
|
26428
26486
|
function useSnackbar() {
|
|
26429
26487
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
26430
|
-
const onClose =
|
|
26488
|
+
const onClose = useCallback39(
|
|
26431
26489
|
(noticeId) => {
|
|
26432
26490
|
setNotices((prev) => {
|
|
26433
26491
|
let returnValue = prev;
|
|
@@ -26444,7 +26502,7 @@ function useSnackbar() {
|
|
|
26444
26502
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26445
26503
|
[]
|
|
26446
26504
|
);
|
|
26447
|
-
const triggerNotice =
|
|
26505
|
+
const triggerNotice = useCallback39(
|
|
26448
26506
|
(props) => {
|
|
26449
26507
|
const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
|
|
26450
26508
|
let maybeTimeout;
|
|
@@ -26473,7 +26531,7 @@ function useSnackbar() {
|
|
|
26473
26531
|
},
|
|
26474
26532
|
[onClose, setNotices]
|
|
26475
26533
|
);
|
|
26476
|
-
const closeNotice =
|
|
26534
|
+
const closeNotice = useCallback39((id) => onClose(id), [onClose]);
|
|
26477
26535
|
const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
|
|
26478
26536
|
setOffset({ bottom });
|
|
26479
26537
|
return () => setOffset({});
|
|
@@ -26483,9 +26541,9 @@ function useSnackbar() {
|
|
|
26483
26541
|
var snackbarId = 1;
|
|
26484
26542
|
|
|
26485
26543
|
// src/components/Stepper.tsx
|
|
26486
|
-
import { useRef as
|
|
26544
|
+
import { useRef as useRef65 } from "react";
|
|
26487
26545
|
import { useButton as useButton12, useFocusRing as useFocusRing18, useHover as useHover21 } from "react-aria";
|
|
26488
|
-
import { trussProps as trussProps124, maybeCssVar as
|
|
26546
|
+
import { trussProps as trussProps124, maybeCssVar as maybeCssVar61 } from "@homebound/truss/runtime";
|
|
26489
26547
|
import { jsx as jsx216, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
26490
26548
|
import { createElement as createElement6 } from "react";
|
|
26491
26549
|
var __maybeInc27 = (inc) => {
|
|
@@ -26548,7 +26606,7 @@ function Stepper(props) {
|
|
|
26548
26606
|
transition: "transition_width_200ms",
|
|
26549
26607
|
height: "h100",
|
|
26550
26608
|
width: ["w_var", {
|
|
26551
|
-
"--width":
|
|
26609
|
+
"--width": maybeCssVar61(__maybeInc27(`${(lastCompletedStep + 1) / steps.length * 100}%`))
|
|
26552
26610
|
}]
|
|
26553
26611
|
}) }) })
|
|
26554
26612
|
] });
|
|
@@ -26565,7 +26623,7 @@ function StepButton(props) {
|
|
|
26565
26623
|
onPress: onClick,
|
|
26566
26624
|
isDisabled: disabled
|
|
26567
26625
|
};
|
|
26568
|
-
const ref =
|
|
26626
|
+
const ref = useRef65(null);
|
|
26569
26627
|
const {
|
|
26570
26628
|
buttonProps,
|
|
26571
26629
|
isPressed
|
|
@@ -26675,7 +26733,7 @@ function StepIcon({
|
|
|
26675
26733
|
}
|
|
26676
26734
|
|
|
26677
26735
|
// src/components/StepperTabs/StepperTab.tsx
|
|
26678
|
-
import { useRef as
|
|
26736
|
+
import { useRef as useRef66 } from "react";
|
|
26679
26737
|
import { mergeProps as mergeProps33, useButton as useButton13, useFocusRing as useFocusRing19, useHover as useHover22, VisuallyHidden as VisuallyHidden10 } from "react-aria";
|
|
26680
26738
|
import { trussProps as trussProps125 } from "@homebound/truss/runtime";
|
|
26681
26739
|
import { Fragment as Fragment48, jsx as jsx217, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
@@ -26694,7 +26752,7 @@ function StepperTab(props) {
|
|
|
26694
26752
|
onPress: () => onClick(value),
|
|
26695
26753
|
isDisabled: disabled || collapsed
|
|
26696
26754
|
};
|
|
26697
|
-
const ref =
|
|
26755
|
+
const ref = useRef66(null);
|
|
26698
26756
|
const {
|
|
26699
26757
|
buttonProps
|
|
26700
26758
|
} = useButton13(ariaProps, ref);
|
|
@@ -27194,11 +27252,11 @@ function visit(rows, fn) {
|
|
|
27194
27252
|
|
|
27195
27253
|
// src/components/Tabs.tsx
|
|
27196
27254
|
import { camelCase as camelCase7 } from "change-case";
|
|
27197
|
-
import { useEffect as useEffect38, useMemo as useMemo56, useRef as
|
|
27255
|
+
import { useEffect as useEffect38, useMemo as useMemo56, useRef as useRef67, useState as useState60 } from "react";
|
|
27198
27256
|
import { mergeProps as mergeProps35, useFocusRing as useFocusRing20, useHover as useHover23 } from "react-aria";
|
|
27199
27257
|
import { matchPath } from "react-router";
|
|
27200
27258
|
import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
|
|
27201
|
-
import { trussProps as trussProps129, maybeCssVar as
|
|
27259
|
+
import { trussProps as trussProps129, maybeCssVar as maybeCssVar62 } from "@homebound/truss/runtime";
|
|
27202
27260
|
import { Fragment as Fragment50, jsx as jsx222, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
27203
27261
|
function TabsWithContent(props) {
|
|
27204
27262
|
const styles = hideTabs(props) ? {} : {
|
|
@@ -27255,8 +27313,8 @@ function Tabs(props) {
|
|
|
27255
27313
|
focusProps
|
|
27256
27314
|
} = useFocusRing20();
|
|
27257
27315
|
const tid = useTestIds(others, "tabs");
|
|
27258
|
-
const [active, setActive] =
|
|
27259
|
-
const ref =
|
|
27316
|
+
const [active, setActive] = useState60(selected);
|
|
27317
|
+
const ref = useRef67(null);
|
|
27260
27318
|
useEffect38(() => setActive(selected), [selected]);
|
|
27261
27319
|
function onKeyUp(e) {
|
|
27262
27320
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
@@ -27381,7 +27439,7 @@ function getTabStyles() {
|
|
|
27381
27439
|
const borderBottomStyles = {
|
|
27382
27440
|
borderBottomStyle: "bbs_solid",
|
|
27383
27441
|
borderBottomWidth: ["borderBottomWidth_var", {
|
|
27384
|
-
"--borderBottomWidth":
|
|
27442
|
+
"--borderBottomWidth": maybeCssVar62(`${borderBottomWidthPx}px`)
|
|
27385
27443
|
}],
|
|
27386
27444
|
paddingBottom: ["pb_var", {
|
|
27387
27445
|
"--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
|
|
@@ -27434,7 +27492,7 @@ function getTabStyles() {
|
|
|
27434
27492
|
// The AI label tint is part of the brand ramp rather than a semantic token, same as the sparkle's gradient.
|
|
27435
27493
|
aiStyles: {
|
|
27436
27494
|
color: ["color_var", {
|
|
27437
|
-
"--color":
|
|
27495
|
+
"--color": maybeCssVar62("rgba(109, 40, 217, 1)" /* Purple700 */)
|
|
27438
27496
|
}]
|
|
27439
27497
|
},
|
|
27440
27498
|
focusRingStyles: {
|
|
@@ -27499,15 +27557,15 @@ function TagGroup(props) {
|
|
|
27499
27557
|
}
|
|
27500
27558
|
|
|
27501
27559
|
// src/components/Toast/useToast.tsx
|
|
27502
|
-
import { useCallback as
|
|
27560
|
+
import { useCallback as useCallback40 } from "react";
|
|
27503
27561
|
function useToast() {
|
|
27504
27562
|
const { setNotice, clear } = useToastContext();
|
|
27505
|
-
const showToast =
|
|
27563
|
+
const showToast = useCallback40((props) => setNotice(props), [setNotice]);
|
|
27506
27564
|
return { showToast, clear };
|
|
27507
27565
|
}
|
|
27508
27566
|
|
|
27509
27567
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
27510
|
-
import { trussProps as trussProps130, mergeProps as mergeProps36, maybeCssVar as
|
|
27568
|
+
import { trussProps as trussProps130, mergeProps as mergeProps36, maybeCssVar as maybeCssVar63 } from "@homebound/truss/runtime";
|
|
27511
27569
|
import { jsx as jsx224, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
27512
27570
|
var __maybeInc28 = (inc) => {
|
|
27513
27571
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -27562,14 +27620,14 @@ function SideNavLayoutContent(props) {
|
|
|
27562
27620
|
position: "sticky",
|
|
27563
27621
|
left: "left0",
|
|
27564
27622
|
zIndex: ["z_var", {
|
|
27565
|
-
"--zIndex":
|
|
27623
|
+
"--zIndex": maybeCssVar63(zIndices.sideNav)
|
|
27566
27624
|
}],
|
|
27567
27625
|
top: ["top_var", {
|
|
27568
|
-
"--top":
|
|
27626
|
+
"--top": maybeCssVar63(__maybeInc28(navTop))
|
|
27569
27627
|
}],
|
|
27570
27628
|
alignSelf: "asfs",
|
|
27571
27629
|
height: ["h_var", {
|
|
27572
|
-
"--height":
|
|
27630
|
+
"--height": maybeCssVar63(__maybeInc28(railViewportHeight))
|
|
27573
27631
|
}],
|
|
27574
27632
|
width: ["w_var", {
|
|
27575
27633
|
"--width": `${collapsed ? railCollapsedWidthPx : railWidthPx}px`
|
|
@@ -27579,11 +27637,11 @@ function SideNavLayoutContent(props) {
|
|
|
27579
27637
|
position: "fixed",
|
|
27580
27638
|
left: "left0",
|
|
27581
27639
|
top: ["top_var", {
|
|
27582
|
-
"--top":
|
|
27640
|
+
"--top": maybeCssVar63(__maybeInc28(navTop))
|
|
27583
27641
|
}],
|
|
27584
27642
|
bottom: "bottom0",
|
|
27585
27643
|
zIndex: ["z_var", {
|
|
27586
|
-
"--zIndex":
|
|
27644
|
+
"--zIndex": maybeCssVar63(zIndices.sideNav)
|
|
27587
27645
|
}]
|
|
27588
27646
|
},
|
|
27589
27647
|
...collapsed ? {
|
|
@@ -27622,7 +27680,7 @@ function SideNavLayoutContent(props) {
|
|
|
27622
27680
|
}
|
|
27623
27681
|
|
|
27624
27682
|
// src/layouts/CenteredLayout/CenteredLayout.tsx
|
|
27625
|
-
import { mergeProps as mergeProps37, maybeCssVar as
|
|
27683
|
+
import { mergeProps as mergeProps37, maybeCssVar as maybeCssVar64 } from "@homebound/truss/runtime";
|
|
27626
27684
|
import { jsx as jsx225 } from "react/jsx-runtime";
|
|
27627
27685
|
var __maybeInc29 = (inc) => {
|
|
27628
27686
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -27664,15 +27722,15 @@ var smContentPaddingX = "12px";
|
|
|
27664
27722
|
var mdAndUpContentPaddingX = pageContentPaddingXValue;
|
|
27665
27723
|
var centeredPaddingX = {
|
|
27666
27724
|
paddingLeft: ["px_var mdandup_pl3", {
|
|
27667
|
-
"--paddingLeft":
|
|
27725
|
+
"--paddingLeft": maybeCssVar64(__maybeInc29(smContentPaddingX))
|
|
27668
27726
|
}],
|
|
27669
27727
|
paddingRight: ["px_var mdandup_pr3", {
|
|
27670
|
-
"--paddingRight":
|
|
27728
|
+
"--paddingRight": maybeCssVar64(__maybeInc29(smContentPaddingX))
|
|
27671
27729
|
}]
|
|
27672
27730
|
};
|
|
27673
27731
|
|
|
27674
27732
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
27675
|
-
import { trussProps as trussProps131, mergeProps as mergeProps38, maybeCssVar as
|
|
27733
|
+
import { trussProps as trussProps131, mergeProps as mergeProps38, maybeCssVar as maybeCssVar65 } from "@homebound/truss/runtime";
|
|
27676
27734
|
import { jsx as jsx226, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
27677
27735
|
var __maybeInc30 = (inc) => {
|
|
27678
27736
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -27705,10 +27763,10 @@ function EnvironmentBannerLayout(props) {
|
|
|
27705
27763
|
top: "top0",
|
|
27706
27764
|
left: "left0",
|
|
27707
27765
|
zIndex: ["z_var", {
|
|
27708
|
-
"--zIndex":
|
|
27766
|
+
"--zIndex": maybeCssVar65(zIndices.environmentBanner)
|
|
27709
27767
|
}],
|
|
27710
27768
|
width: ["w_var", {
|
|
27711
|
-
"--width":
|
|
27769
|
+
"--width": maybeCssVar65(__maybeInc30(innerWidth))
|
|
27712
27770
|
}]
|
|
27713
27771
|
}), ...tid.bannerSticky, children: /* @__PURE__ */ jsx226(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
27714
27772
|
children
|
|
@@ -27750,11 +27808,11 @@ function FormSectionLayout(props) {
|
|
|
27750
27808
|
}
|
|
27751
27809
|
|
|
27752
27810
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
27753
|
-
import { useMemo as useMemo57, useRef as
|
|
27754
|
-
import { mergeProps as mergeProps39, maybeCssVar as
|
|
27811
|
+
import { useMemo as useMemo57, useRef as useRef69 } from "react";
|
|
27812
|
+
import { mergeProps as mergeProps39, maybeCssVar as maybeCssVar66 } from "@homebound/truss/runtime";
|
|
27755
27813
|
|
|
27756
27814
|
// src/layouts/useAutoHideOnScroll.ts
|
|
27757
|
-
import { useLayoutEffect as
|
|
27815
|
+
import { useLayoutEffect as useLayoutEffect12, useRef as useRef68, useState as useState61 } from "react";
|
|
27758
27816
|
var THRESHOLD = 80;
|
|
27759
27817
|
function getInitialAutoHideState() {
|
|
27760
27818
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
@@ -27764,15 +27822,15 @@ function getInitialAutoHideState() {
|
|
|
27764
27822
|
}
|
|
27765
27823
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
27766
27824
|
const initial = getInitialAutoHideState();
|
|
27767
|
-
const [state, setState] =
|
|
27768
|
-
const stateRef =
|
|
27769
|
-
const [atTop, setAtTop] =
|
|
27770
|
-
const atTopRef =
|
|
27771
|
-
const getTopOffsetRef =
|
|
27825
|
+
const [state, setState] = useState61(initial.state);
|
|
27826
|
+
const stateRef = useRef68(initial.state);
|
|
27827
|
+
const [atTop, setAtTop] = useState61(initial.atTop);
|
|
27828
|
+
const atTopRef = useRef68(initial.atTop);
|
|
27829
|
+
const getTopOffsetRef = useRef68(getTopOffset);
|
|
27772
27830
|
getTopOffsetRef.current = getTopOffset;
|
|
27773
|
-
const lastScrollY =
|
|
27774
|
-
const lastScrollHeight =
|
|
27775
|
-
|
|
27831
|
+
const lastScrollY = useRef68(Number.POSITIVE_INFINITY);
|
|
27832
|
+
const lastScrollHeight = useRef68(0);
|
|
27833
|
+
useLayoutEffect12(() => {
|
|
27776
27834
|
if (!enabled) {
|
|
27777
27835
|
stateRef.current = "static";
|
|
27778
27836
|
atTopRef.current = true;
|
|
@@ -27844,17 +27902,17 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
27844
27902
|
}
|
|
27845
27903
|
|
|
27846
27904
|
// src/layouts/useMeasuredHeight.ts
|
|
27847
|
-
import { useResizeObserver as
|
|
27848
|
-
import { useCallback as
|
|
27905
|
+
import { useResizeObserver as useResizeObserver12 } from "@react-aria/utils";
|
|
27906
|
+
import { useCallback as useCallback41, useLayoutEffect as useLayoutEffect13, useState as useState62 } from "react";
|
|
27849
27907
|
function useMeasuredHeight(ref, enabled) {
|
|
27850
|
-
const [height, setHeight] =
|
|
27851
|
-
const syncElementHeight =
|
|
27908
|
+
const [height, setHeight] = useState62(0);
|
|
27909
|
+
const syncElementHeight = useCallback41(() => {
|
|
27852
27910
|
const el = ref.current;
|
|
27853
27911
|
const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
|
|
27854
27912
|
setHeight((prev) => prev === next ? prev : next);
|
|
27855
27913
|
}, [ref]);
|
|
27856
|
-
|
|
27857
|
-
|
|
27914
|
+
useResizeObserver12({ ref, onResize: syncElementHeight });
|
|
27915
|
+
useLayoutEffect13(() => {
|
|
27858
27916
|
syncElementHeight();
|
|
27859
27917
|
}, [enabled, syncElementHeight]);
|
|
27860
27918
|
return height;
|
|
@@ -27882,8 +27940,8 @@ function NavbarLayout(props) {
|
|
|
27882
27940
|
children
|
|
27883
27941
|
} = props;
|
|
27884
27942
|
const tid = useTestIds(props, "navbarLayout");
|
|
27885
|
-
const navMetricsRef =
|
|
27886
|
-
const spacerRef =
|
|
27943
|
+
const navMetricsRef = useRef69(null);
|
|
27944
|
+
const spacerRef = useRef69(null);
|
|
27887
27945
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
27888
27946
|
const {
|
|
27889
27947
|
state: autoHideState,
|
|
@@ -27901,10 +27959,10 @@ function NavbarLayout(props) {
|
|
|
27901
27959
|
position: "sticky",
|
|
27902
27960
|
left: "left0",
|
|
27903
27961
|
zIndex: ["z_var", {
|
|
27904
|
-
"--zIndex":
|
|
27962
|
+
"--zIndex": maybeCssVar66(zIndices.navbar)
|
|
27905
27963
|
}],
|
|
27906
27964
|
width: ["w_var", {
|
|
27907
|
-
"--width":
|
|
27965
|
+
"--width": maybeCssVar66(__maybeInc31(innerWidth))
|
|
27908
27966
|
}]
|
|
27909
27967
|
}
|
|
27910
27968
|
) : (
|
|
@@ -27913,10 +27971,10 @@ function NavbarLayout(props) {
|
|
|
27913
27971
|
position: "fixed",
|
|
27914
27972
|
left: "left0",
|
|
27915
27973
|
zIndex: ["z_var", {
|
|
27916
|
-
"--zIndex":
|
|
27974
|
+
"--zIndex": maybeCssVar66(zIndices.navbar)
|
|
27917
27975
|
}],
|
|
27918
27976
|
width: ["w_var", {
|
|
27919
|
-
"--width":
|
|
27977
|
+
"--width": maybeCssVar66(__maybeInc31(innerWidth))
|
|
27920
27978
|
}],
|
|
27921
27979
|
transition: "transitionTop"
|
|
27922
27980
|
}
|
|
@@ -27943,7 +28001,7 @@ function NavbarLayout(props) {
|
|
|
27943
28001
|
}
|
|
27944
28002
|
|
|
27945
28003
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
27946
|
-
import { useCallback as
|
|
28004
|
+
import { useCallback as useCallback42, useMemo as useMemo58, useRef as useRef70 } from "react";
|
|
27947
28005
|
|
|
27948
28006
|
// src/components/Headers/BaseHeader.tsx
|
|
27949
28007
|
import { trussProps as trussProps133 } from "@homebound/truss/runtime";
|
|
@@ -28022,7 +28080,7 @@ function useBannerAndNavbarHeight() {
|
|
|
28022
28080
|
}
|
|
28023
28081
|
|
|
28024
28082
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
28025
|
-
import { mergeProps as mergeProps40, maybeCssVar as
|
|
28083
|
+
import { mergeProps as mergeProps40, maybeCssVar as maybeCssVar67 } from "@homebound/truss/runtime";
|
|
28026
28084
|
import { jsx as jsx232, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
28027
28085
|
var __maybeInc32 = (inc) => {
|
|
28028
28086
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -28034,11 +28092,11 @@ function PageHeaderLayout(props) {
|
|
|
28034
28092
|
} = props;
|
|
28035
28093
|
const tid = useTestIds(props, "pageHeaderLayout");
|
|
28036
28094
|
const bannerAndNavbarHeight = useBannerAndNavbarHeight();
|
|
28037
|
-
const bannerAndNavbarHeightRef =
|
|
28095
|
+
const bannerAndNavbarHeightRef = useRef70(bannerAndNavbarHeight);
|
|
28038
28096
|
bannerAndNavbarHeightRef.current = bannerAndNavbarHeight;
|
|
28039
|
-
const getBannerAndNavbarHeight =
|
|
28040
|
-
const headerMetricsRef =
|
|
28041
|
-
const spacerRef =
|
|
28097
|
+
const getBannerAndNavbarHeight = useCallback42(() => bannerAndNavbarHeightRef.current, []);
|
|
28098
|
+
const headerMetricsRef = useRef70(null);
|
|
28099
|
+
const spacerRef = useRef70(null);
|
|
28042
28100
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
28043
28101
|
const {
|
|
28044
28102
|
state: autoHideState,
|
|
@@ -28054,24 +28112,24 @@ function PageHeaderLayout(props) {
|
|
|
28054
28112
|
const innerCss = autoHideState === "static" ? {
|
|
28055
28113
|
position: "sticky",
|
|
28056
28114
|
left: ["left_var", {
|
|
28057
|
-
"--left":
|
|
28115
|
+
"--left": maybeCssVar67(__maybeInc32(headerLeft))
|
|
28058
28116
|
}],
|
|
28059
28117
|
width: ["w_var", {
|
|
28060
|
-
"--width":
|
|
28118
|
+
"--width": maybeCssVar67(__maybeInc32(headerWidth))
|
|
28061
28119
|
}],
|
|
28062
28120
|
zIndex: ["z_var", {
|
|
28063
|
-
"--zIndex":
|
|
28121
|
+
"--zIndex": maybeCssVar67(zIndices.pageStickyHeader)
|
|
28064
28122
|
}]
|
|
28065
28123
|
} : {
|
|
28066
28124
|
position: "fixed",
|
|
28067
28125
|
left: ["left_var", {
|
|
28068
|
-
"--left":
|
|
28126
|
+
"--left": maybeCssVar67(__maybeInc32(headerLeft))
|
|
28069
28127
|
}],
|
|
28070
28128
|
width: ["w_var", {
|
|
28071
|
-
"--width":
|
|
28129
|
+
"--width": maybeCssVar67(__maybeInc32(headerWidth))
|
|
28072
28130
|
}],
|
|
28073
28131
|
zIndex: ["z_var", {
|
|
28074
|
-
"--zIndex":
|
|
28132
|
+
"--zIndex": maybeCssVar67(zIndices.pageStickyHeader)
|
|
28075
28133
|
}],
|
|
28076
28134
|
transition: "transitionTop"
|
|
28077
28135
|
};
|
|
@@ -28095,7 +28153,7 @@ function PageHeaderLayout(props) {
|
|
|
28095
28153
|
}
|
|
28096
28154
|
|
|
28097
28155
|
// src/layouts/Workflow/JumpLinksRail.tsx
|
|
28098
|
-
import { trussProps as trussProps135, maybeCssVar as
|
|
28156
|
+
import { trussProps as trussProps135, maybeCssVar as maybeCssVar68 } from "@homebound/truss/runtime";
|
|
28099
28157
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
28100
28158
|
var __maybeInc33 = (inc) => {
|
|
28101
28159
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -28117,18 +28175,18 @@ function JumpLinksRail(props) {
|
|
|
28117
28175
|
position: "sticky",
|
|
28118
28176
|
alignSelf: "asfs",
|
|
28119
28177
|
top: ["top_var", {
|
|
28120
|
-
"--top":
|
|
28178
|
+
"--top": maybeCssVar68(__maybeInc33(stickyNavAndHeaderOffset()))
|
|
28121
28179
|
}]
|
|
28122
28180
|
}), ...tid, children: links.map((link) => /* @__PURE__ */ jsx233(JumpLink, { label: link.label, href: `#${link.id}`, active: link.id === activeId, ...tid.link }, link.id)) });
|
|
28123
28181
|
}
|
|
28124
28182
|
|
|
28125
28183
|
// src/layouts/Workflow/useActiveJumpLink.ts
|
|
28126
|
-
import { useLayoutEffect as
|
|
28184
|
+
import { useLayoutEffect as useLayoutEffect14, useState as useState63 } from "react";
|
|
28127
28185
|
var activationLeadPx = 120;
|
|
28128
28186
|
function useActiveJumpLink(sectionIds) {
|
|
28129
28187
|
const idsKey = sectionIds.join("\0");
|
|
28130
|
-
const [activeId, setActiveId] =
|
|
28131
|
-
|
|
28188
|
+
const [activeId, setActiveId] = useState63(sectionIds[0]);
|
|
28189
|
+
useLayoutEffect14(() => {
|
|
28132
28190
|
const ids = idsKey.length === 0 ? [] : idsKey.split("\0");
|
|
28133
28191
|
if (ids.length === 0) return;
|
|
28134
28192
|
const update = () => {
|
|
@@ -28152,7 +28210,7 @@ function useActiveJumpLink(sectionIds) {
|
|
|
28152
28210
|
}
|
|
28153
28211
|
|
|
28154
28212
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
28155
|
-
import { useLayoutEffect as
|
|
28213
|
+
import { useLayoutEffect as useLayoutEffect15, useRef as useRef72 } from "react";
|
|
28156
28214
|
|
|
28157
28215
|
// src/components/Headers/WorkflowHeader.tsx
|
|
28158
28216
|
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
@@ -28169,13 +28227,13 @@ function WorkflowHeader(props) {
|
|
|
28169
28227
|
}
|
|
28170
28228
|
|
|
28171
28229
|
// src/layouts/Workflow/useUnsavedChangesGuard.tsx
|
|
28172
|
-
import { useEffect as useEffect39, useRef as
|
|
28230
|
+
import { useEffect as useEffect39, useRef as useRef71 } from "react";
|
|
28173
28231
|
import { useBlocker } from "react-router-dom";
|
|
28174
28232
|
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
28175
28233
|
function useUnsavedChangesGuard(options) {
|
|
28176
28234
|
const { isDirty, onCancel } = options;
|
|
28177
28235
|
const { openModal } = useModal();
|
|
28178
|
-
const isDirtyRef =
|
|
28236
|
+
const isDirtyRef = useRef71(isDirty);
|
|
28179
28237
|
isDirtyRef.current = isDirty;
|
|
28180
28238
|
useEffect39(() => {
|
|
28181
28239
|
const onBeforeUnload = (e) => {
|
|
@@ -28245,7 +28303,7 @@ function WorkflowActions(props) {
|
|
|
28245
28303
|
}
|
|
28246
28304
|
|
|
28247
28305
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
28248
|
-
import { trussProps as trussProps136, mergeProps as mergeProps41, maybeCssVar as
|
|
28306
|
+
import { trussProps as trussProps136, mergeProps as mergeProps41, maybeCssVar as maybeCssVar69 } from "@homebound/truss/runtime";
|
|
28249
28307
|
import { jsx as jsx237, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
28250
28308
|
var __maybeInc34 = (inc) => {
|
|
28251
28309
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -28275,7 +28333,7 @@ function WorkflowPageLayout(props) {
|
|
|
28275
28333
|
onCancel
|
|
28276
28334
|
});
|
|
28277
28335
|
const actions = /* @__PURE__ */ jsx237(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
|
|
28278
|
-
const headerMetricsRef =
|
|
28336
|
+
const headerMetricsRef = useRef72(null);
|
|
28279
28337
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
28280
28338
|
const headerWidth = documentScrollChromeWidth();
|
|
28281
28339
|
const outerTop = bannerAndNavbarChromeTop();
|
|
@@ -28283,7 +28341,7 @@ function WorkflowPageLayout(props) {
|
|
|
28283
28341
|
[beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
|
|
28284
28342
|
} : void 0;
|
|
28285
28343
|
const showFooter = isMobile;
|
|
28286
|
-
|
|
28344
|
+
useLayoutEffect15(() => {
|
|
28287
28345
|
const root = document.documentElement;
|
|
28288
28346
|
const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
|
|
28289
28347
|
root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
|
|
@@ -28305,13 +28363,13 @@ function WorkflowPageLayout(props) {
|
|
|
28305
28363
|
position: "sticky",
|
|
28306
28364
|
left: "left0",
|
|
28307
28365
|
width: ["w_var", {
|
|
28308
|
-
"--width":
|
|
28366
|
+
"--width": maybeCssVar69(__maybeInc34(headerWidth))
|
|
28309
28367
|
}],
|
|
28310
28368
|
zIndex: ["z_var", {
|
|
28311
|
-
"--zIndex":
|
|
28369
|
+
"--zIndex": maybeCssVar69(zIndices.pageStickyHeader)
|
|
28312
28370
|
}],
|
|
28313
28371
|
top: ["top_var", {
|
|
28314
|
-
"--top":
|
|
28372
|
+
"--top": maybeCssVar69(__maybeInc34(outerTop))
|
|
28315
28373
|
}]
|
|
28316
28374
|
}), ...tid.header, children: /* @__PURE__ */ jsx237(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? void 0 : actions, stepperTabs }) }),
|
|
28317
28375
|
/* @__PURE__ */ jsx237("div", { ...trussProps136({
|
|
@@ -28326,7 +28384,7 @@ function WorkflowPageLayout(props) {
|
|
|
28326
28384
|
...aiMode && {
|
|
28327
28385
|
backgroundImage: "aiBackground",
|
|
28328
28386
|
minHeight: ["mh_var", {
|
|
28329
|
-
"--minHeight":
|
|
28387
|
+
"--minHeight": maybeCssVar69(documentScrollBodyMinHeight())
|
|
28330
28388
|
}]
|
|
28331
28389
|
}
|
|
28332
28390
|
}), ...tid.body, children }),
|
|
@@ -28341,13 +28399,13 @@ function WorkflowPageLayout(props) {
|
|
|
28341
28399
|
position: "fixed",
|
|
28342
28400
|
bottom: "bottom0",
|
|
28343
28401
|
width: ["w_var", {
|
|
28344
|
-
"--width":
|
|
28402
|
+
"--width": maybeCssVar69(__maybeInc34(headerWidth))
|
|
28345
28403
|
}],
|
|
28346
28404
|
height: ["h_var", {
|
|
28347
28405
|
"--height": `${mobileFooterHeightPx}px`
|
|
28348
28406
|
}],
|
|
28349
28407
|
zIndex: ["z_var", {
|
|
28350
|
-
"--zIndex":
|
|
28408
|
+
"--zIndex": maybeCssVar69(zIndices.pageStickyFooter)
|
|
28351
28409
|
}],
|
|
28352
28410
|
display: "df",
|
|
28353
28411
|
alignItems: "aic",
|
|
@@ -28404,12 +28462,12 @@ function FocusedFormLayout(props) {
|
|
|
28404
28462
|
}
|
|
28405
28463
|
|
|
28406
28464
|
// src/layouts/Workflow/StepperLayout.tsx
|
|
28407
|
-
import { useState as
|
|
28465
|
+
import { useState as useState64 } from "react";
|
|
28408
28466
|
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
28409
28467
|
function StepperLayout(props) {
|
|
28410
28468
|
const { steps, defaultStep, onCancel, completeLabel, onComplete, onSaveAndExit, isDirty, aiMode, ...headerProps } = props;
|
|
28411
28469
|
const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
|
|
28412
|
-
const [currentStep, setCurrentStep] =
|
|
28470
|
+
const [currentStep, setCurrentStep] = useState64(() => getInitialStep(stepTabs, defaultStep));
|
|
28413
28471
|
const tid = useTestIds(props, "stepperLayout");
|
|
28414
28472
|
const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
|
|
28415
28473
|
const isFirstStep = currentIndex <= 0;
|